Use is<>() / downcast<>() for Element
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-09-30  Chris Dumez  <cdumez@apple.com>
2
3         Use is<>() / downcast<>() for Element
4         https://bugs.webkit.org/show_bug.cgi?id=137241
5
6         Reviewed by Andreas Kling.
7
8         Use is<>() / downcast<>() for Element instead of isElementNode() /
9         toElement().
10
11         No new tests, no behavior change.
12
13         * accessibility/AXObjectCache.cpp:
14         (WebCore::nodeHasRole):
15         (WebCore::createFromRenderer):
16         (WebCore::AXObjectCache::handleLiveRegionCreated):
17         (WebCore::AXObjectCache::handleMenuItemSelected):
18         (WebCore::AXObjectCache::rootAXEditableElement):
19         (WebCore::isNodeAriaVisible):
20         * accessibility/AccessibilityMenuList.cpp:
21         (WebCore::AccessibilityMenuList::canSetFocusAttribute):
22         * accessibility/AccessibilityNodeObject.cpp:
23         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
24         (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
25         (WebCore::AccessibilityNodeObject::isEnabled):
26         (WebCore::AccessibilityNodeObject::isPressed):
27         (WebCore::AccessibilityNodeObject::isHovered):
28         (WebCore::AccessibilityNodeObject::anchorElement):
29         (WebCore::nativeActionElement):
30         (WebCore::AccessibilityNodeObject::actionElement):
31         (WebCore::AccessibilityNodeObject::mouseButtonListener):
32         (WebCore::AccessibilityNodeObject::titleElementText):
33         (WebCore::AccessibilityNodeObject::helpText):
34         (WebCore::AccessibilityNodeObject::hierarchicalLevel):
35         (WebCore::AccessibilityNodeObject::title):
36         (WebCore::AccessibilityNodeObject::text):
37         (WebCore::accessibleNameForNode):
38         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
39         * accessibility/AccessibilityObject.cpp:
40         (WebCore::AccessibilityObject::press):
41         (WebCore::AccessibilityObject::hasTagName):
42         (WebCore::AccessibilityObject::hasAttribute):
43         (WebCore::AccessibilityObject::element):
44         (WebCore::AccessibilityObject::classList):
45         * accessibility/AccessibilityRenderObject.cpp:
46         (WebCore::AccessibilityRenderObject::anchorElement):
47         (WebCore::AccessibilityRenderObject::helpText):
48         (WebCore::AccessibilityRenderObject::checkboxOrRadioRect):
49         (WebCore::AccessibilityRenderObject::titleUIElement):
50         (WebCore::AccessibilityRenderObject::accessKey):
51         (WebCore::AccessibilityRenderObject::setElementAttributeValue):
52         (WebCore::AccessibilityRenderObject::setFocused):
53         (WebCore::AccessibilityRenderObject::setValue):
54         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
55         (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement):
56         (WebCore::AccessibilityRenderObject::renderObjectIsObservable):
57         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
58         (WebCore::AccessibilityRenderObject::setAccessibleName):
59         (WebCore::AccessibilityRenderObject::stringRoleForMSAA):
60         * accessibility/AccessibilitySearchFieldButtons.cpp:
61         (WebCore::AccessibilitySearchFieldCancelButton::press):
62         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
63         (webkitAccessibleGetAttributes):
64         * bindings/gobject/WebKitDOMPrivate.cpp:
65         (WebKit::wrap):
66         * bindings/js/JSNodeCustom.cpp:
67         (WebCore::isReachableFromDOM):
68         * css/CSSComputedStyleDeclaration.cpp:
69         (WebCore::ComputedStyleExtractor::styledNode):
70         * css/StyleResolver.cpp:
71         (WebCore::StyleResolver::locateCousinList):
72         * dom/ContainerNode.cpp:
73         (WebCore::destroyRenderTreeIfNeeded):
74         (WebCore::ContainerNode::notifyChildRemoved):
75         * dom/ContainerNodeAlgorithms.cpp:
76         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
77         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
78         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
79         (WebCore::assertConnectedSubrameCountIsConsistent):
80         * dom/Document.cpp:
81         (WebCore::Document::importNode):
82         (WebCore::Document::elementFromPoint):
83         * dom/DocumentStyleSheetCollection.cpp:
84         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
85         * dom/Element.cpp:
86         (WebCore::Element::computeInheritedLanguage):
87         * dom/Element.h:
88         (WebCore::isElement):
89         (WebCore::Node::hasAttributes):
90         (WebCore::Node::attributes):
91         (WebCore::Node::parentElement):
92         * dom/ElementTraversal.h:
93         (WebCore::Traversal<Element>::nextTemplate):
94         (WebCore::ElementTraversal::previousIncludingPseudo):
95         (WebCore::ElementTraversal::nextIncludingPseudo):
96         (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
97         (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
98         * dom/LiveNodeList.cpp:
99         (WebCore::LiveNodeList::namedItem):
100         * dom/Node.cpp:
101         (WebCore::Node::dumpStatistics):
102         (WebCore::Node::normalize):
103         (WebCore::Node::pseudoAwareFirstChild):
104         (WebCore::Node::pseudoAwareLastChild):
105         (WebCore::Node::computedStyle):
106         (WebCore::Node::parentOrShadowHostElement):
107         (WebCore::Node::rootEditableElement):
108         (WebCore::Node::isEqualNode):
109         (WebCore::Node::isDefaultNamespace):
110         (WebCore::Node::lookupNamespacePrefix):
111         (WebCore::Node::ancestorElement):
112         (WebCore::appendAttributeDesc):
113         (WebCore::Node::showNodePathForThis):
114         (WebCore::Node::enclosingLinkEventParentOrSelf):
115         (WebCore::Node::handleLocalEvents):
116         (WebCore::Node::willRespondToMouseMoveEvents):
117         (WebCore::Node::willRespondToMouseClickEvents):
118         * dom/NodeRenderingTraversal.cpp:
119         (WebCore::NodeRenderingTraversal::nodeCanBeDistributed):
120         * dom/Position.cpp:
121         (WebCore::Position::element):
122         * dom/Range.cpp:
123         (WebCore::Range::getBorderAndTextQuads):
124         * dom/ShadowRoot.h:
125         (WebCore::Node::shadowRoot):
126         * dom/StaticNodeList.cpp:
127         (WebCore::StaticNodeList::namedItem):
128         * dom/TreeScopeAdopter.cpp:
129         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
130         * editing/ApplyStyleCommand.cpp:
131         (WebCore::dummySpanAncestorForNode):
132         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
133         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
134         (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
135         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
136         (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
137         * editing/BreakBlockquoteCommand.cpp:
138         (WebCore::BreakBlockquoteCommand::doApply):
139         * editing/CompositeEditCommand.cpp:
140         (WebCore::CompositeEditCommand::isRemovableBlock):
141         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
142         (WebCore::CompositeEditCommand::moveParagraphs):
143         * editing/DeleteSelectionCommand.cpp:
144         (WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
145         * editing/Editor.cpp:
146         (WebCore::Editor::isSpellCheckingEnabledFor):
147         (WebCore::Editor::applyEditingStyleToBodyElement):
148         * editing/FormatBlockCommand.cpp:
149         (WebCore::isElementForFormatBlock):
150         (WebCore::FormatBlockCommand::elementForFormatBlockCommand):
151         * editing/FrameSelection.cpp:
152         (WebCore::removingNodeRemovesPosition):
153         (WebCore::CaretBase::paintCaret):
154         (WebCore::FrameSelection::debugRenderer):
155         * editing/IndentOutdentCommand.cpp:
156         (WebCore::IndentOutdentCommand::outdentParagraph):
157         * editing/InsertParagraphSeparatorCommand.cpp:
158         (WebCore::InsertParagraphSeparatorCommand::doApply):
159         * editing/MarkupAccumulator.cpp:
160         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
161         (WebCore::MarkupAccumulator::appendStartMarkup):
162         * editing/MarkupAccumulator.h:
163         (WebCore::MarkupAccumulator::appendEndTag):
164         * editing/ModifySelectionListLevel.cpp:
165         (WebCore::IncreaseSelectionListLevelCommand::doApply):
166         * editing/ReplaceSelectionCommand.cpp:
167         (WebCore::isMailPasteAsQuotationNode):
168         (WebCore::haveSameTagName):
169         (WebCore::handleStyleSpansBeforeInsertion):
170         (WebCore::ReplaceSelectionCommand::doApply):
171         * editing/SpellChecker.cpp:
172         (WebCore::SpellChecker::isCheckable):
173         * editing/SplitTextNodeContainingElementCommand.cpp:
174         (WebCore::SplitTextNodeContainingElementCommand::doApply):
175         * editing/TextIterator.cpp:
176         (WebCore::isRendererReplacedElement):
177         * editing/cocoa/HTMLConverter.mm:
178         (HTMLConverterCaches::propertyValueForNode):
179         (HTMLConverterCaches::floatPropertyValueForNode):
180         (HTMLConverterCaches::colorPropertyValueForNode):
181         (HTMLConverter::aggregatedAttributesForAncestors):
182         (HTMLConverter::aggregatedAttributesForElementAndItsAncestors):
183         (HTMLConverter::_traverseNode):
184         (WebCore::editingAttributedStringFromRange):
185         * editing/htmlediting.cpp:
186         (WebCore::unsplittableElementForPosition):
187         (WebCore::enclosingBlock):
188         (WebCore::enclosingElementWithTag):
189         (WebCore::enclosingTableCell):
190         (WebCore::enclosingAnchorElement):
191         (WebCore::areIdenticalElements):
192         (WebCore::isNonTableCellHTMLBlockElement):
193         (WebCore::deprecatedEnclosingBlockFlowElement):
194         (WebCore::rendererForCaretPainting):
195         * editing/markup.cpp:
196         (WebCore::StyledMarkupAccumulator::wrapWithNode):
197         (WebCore::createMarkupInternal):
198         (WebCore::createFragmentFromText):
199         * html/HTMLDetailsElement.cpp:
200         (WebCore::DetailsSummaryElement::fallbackSummary):
201         * html/HTMLElement.cpp:
202         (WebCore::HTMLElement::insertAdjacentElement):
203         (WebCore::contextElementForInsertion):
204         (WebCore::HTMLElement::directionality):
205         * html/HTMLFormControlElement.h:
206         (WebCore::isHTMLFormControlElement):
207         * html/HTMLMediaElement.h:
208         (WebCore::isHTMLMediaElement):
209         * html/HTMLObjectElement.cpp:
210         (WebCore::HTMLObjectElement::updateDocNamedItem):
211         * html/HTMLOptionElement.cpp:
212         (WebCore::HTMLOptionElement::collectOptionInnerText):
213         * html/HTMLSourceElement.cpp:
214         (WebCore::HTMLSourceElement::removedFrom):
215         * html/HTMLSummaryElement.cpp:
216         (WebCore::isClickableControl):
217         * html/HTMLTextFormControlElement.h:
218         (WebCore::isHTMLTextFormControlElement):
219         * html/parser/HTMLConstructionSite.cpp:
220         (WebCore::HTMLConstructionSite::attachLater):
221         * html/parser/HTMLElementStack.cpp:
222         (WebCore::HTMLElementStack::htmlElement):
223         * html/parser/HTMLStackItem.h:
224         (WebCore::HTMLStackItem::element):
225         * html/shadow/InsertionPoint.h:
226         (WebCore::parentElementForDistribution):
227         (WebCore::shadowRootOfParentForDistribution):
228         * html/shadow/MediaControlElements.cpp:
229         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler):
230         * html/track/VTTCue.cpp:
231         (WebCore::VTTCue::markFutureAndPastNodes):
232         * inspector/DOMPatchSupport.cpp:
233         (WebCore::DOMPatchSupport::innerPatchNode):
234         (WebCore::DOMPatchSupport::createDigest):
235         * inspector/InspectorCSSAgent.cpp:
236         (WebCore::InspectorCSSAgent::elementForId):
237         (WebCore::InspectorCSSAgent::buildArrayForRegions):
238         (WebCore::InspectorCSSAgent::resetPseudoStates):
239         * inspector/InspectorDOMAgent.cpp:
240         (WebCore::InspectorDOMAgent::unbind):
241         (WebCore::InspectorDOMAgent::assertElement):
242         (WebCore::InspectorDOMAgent::setAttributesAsText):
243         (WebCore::InspectorDOMAgent::setNodeName):
244         (WebCore::InspectorDOMAgent::buildObjectForNode):
245         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
246         (WebCore::InspectorDOMAgent::didInvalidateStyleAttr):
247         * inspector/InspectorNodeFinder.cpp:
248         (WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal):
249         * inspector/InspectorOverlay.cpp:
250         (WebCore::buildObjectForElementInfo):
251         * inspector/InspectorStyleSheet.cpp:
252         (WebCore::InspectorStyleSheet::inlineStyleSheetText):
253         * page/DragController.cpp:
254         (WebCore::elementUnderMouse):
255         * page/EventHandler.cpp:
256         (WebCore::findDropZone):
257         (WebCore::EventHandler::updateDragAndDrop):
258         (WebCore::EventHandler::updateMouseEventTargetNode):
259         * page/FocusController.cpp:
260         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
261         (WebCore::isFocusableShadowHost):
262         (WebCore::adjustedTabIndex):
263         (WebCore::FocusController::findFocusableElementAcrossFocusScope):
264         (WebCore::FocusController::findElementWithExactTabIndex):
265         (WebCore::nextElementWithGreaterTabIndex):
266         (WebCore::previousElementWithLowerTabIndex):
267         (WebCore::FocusController::nextFocusableElement):
268         (WebCore::FocusController::previousFocusableElement):
269         (WebCore::FocusController::advanceFocusDirectionallyInContainer):
270         * page/PageSerializer.cpp:
271         (WebCore::PageSerializer::serializeFrame):
272         * rendering/HitTestResult.cpp:
273         (WebCore::HitTestResult::title):
274         (WebCore::HitTestResult::innerTextIfTruncated):
275         (WebCore::HitTestResult::absoluteImageURL):
276         (WebCore::HitTestResult::innerElement):
277         (WebCore::HitTestResult::innerNonSharedElement):
278         * rendering/RenderDeprecatedFlexibleBox.h:
279         * rendering/RenderDetailsMarker.cpp:
280         (WebCore::RenderDetailsMarker::isOpen):
281         * rendering/RenderElement.h:
282         (WebCore::RenderElement::element):
283         (WebCore::RenderElement::nonPseudoElement):
284         (WebCore::RenderElement::generatingElement):
285         * rendering/RenderGrid.h:
286         * rendering/RenderLayerBacking.cpp:
287         (WebCore::isRestartedPlugin):
288         * rendering/RenderListItem.h:
289         * rendering/RenderNamedFlowThread.cpp:
290         (WebCore::RenderNamedFlowThread::isChildAllowed):
291         * rendering/RenderObject.cpp:
292         (WebCore::RenderObject::addPDFURLRect):
293         (WebCore::RenderObject::updateDragState):
294         (WebCore::RenderObject::getUncachedPseudoStyle):
295         * rendering/RenderRuby.h:
296         * rendering/RenderRubyText.h:
297         * rendering/RenderTableCaption.h:
298         * rendering/RenderTableCol.h:
299         * rendering/RenderTheme.cpp:
300         (WebCore::RenderTheme::isEnabled):
301         (WebCore::RenderTheme::isFocused):
302         (WebCore::RenderTheme::isPressed):
303         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
304         (WebCore::RenderTheme::isReadOnlyControl):
305         (WebCore::RenderTheme::isHovered):
306         (WebCore::RenderTheme::isSpinUpButtonPartHovered):
307         * rendering/RenderThemeGtk.cpp:
308         (WebCore::nodeHasClass):
309         * rendering/RenderThemeMac.mm:
310         (WebCore::RenderThemeMac::updatePressedState):
311         (WebCore::RenderThemeMac::paintSliderThumb):
312         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
313         * rendering/RenderTreeAsText.cpp:
314         (WebCore::RenderTreeAsText::writeRenderObject):
315         * rendering/TextAutosizer.cpp:
316         (WebCore::TextAutosizer::isAutosizingContainer):
317         (WebCore::TextAutosizer::containerContainsOneOfTags):
318         * rendering/mathml/RenderMathMLBlock.cpp:
319         (WebCore::RenderMathMLBlock::isChildAllowed):
320         * style/StyleResolveTree.cpp:
321         (WebCore::Style::attachChildren):
322         (WebCore::Style::attachDistributedChildren):
323         (WebCore::Style::detachDistributedChildren):
324         (WebCore::Style::detachChildren):
325         (WebCore::Style::resolveShadowTree):
326         (WebCore::Style::resolveTree):
327         * svg/SVGUseElement.cpp:
328         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
329         * svg/animation/SVGSMILElement.cpp:
330         (WebCore::SVGSMILElement::buildPendingResource):
331         * xml/XPathFunctions.cpp:
332         (WebCore::XPath::FunLang::evaluate):
333         * xml/XPathNodeSet.cpp:
334         (WebCore::XPath::NodeSet::traversalSort):
335         * xml/XPathStep.cpp:
336         (WebCore::XPath::nodeMatchesBasicTest):
337         (WebCore::XPath::Step::nodesInAxis):
338         * xml/parser/XMLDocumentParserLibxml2.cpp:
339         (WebCore::XMLDocumentParser::XMLDocumentParser):
340         (WebCore::XMLDocumentParser::endElementNs):
341
342 2014-09-30  Brian J. Burg  <burg@cs.washington.edu>
343
344         Web Replay: use static Strings instead of AtomicStrings for replay input type tags
345         https://bugs.webkit.org/show_bug.cgi?id=137086
346
347         Reviewed by Joseph Pecoraro.
348
349         This pattern doesn't work when we want to define some inputs in WebKit2,
350         since the ReplayInputTypes class is generated from WebCore inputs only.
351
352         Replace tag-checking uses of ReplayInputTypes with InputTraits<T>::type().
353         Remove thread-local input types, and switch to using a plain const String instead
354         of const AtomicString.
355
356         No new tests, no behavior changed.
357
358         * CMakeLists.txt:
359         * WebCore.xcodeproj/project.pbxproj:
360         * inspector/InspectorReplayAgent.cpp:
361         (WebCore::SerializeInputToJSONFunctor::operator()):
362         * platform/ThreadGlobalData.cpp:
363         (WebCore::ThreadGlobalData::ThreadGlobalData):
364         (WebCore::ThreadGlobalData::destroy):
365         * platform/ThreadGlobalData.h:
366         (WebCore::ThreadGlobalData::inputTypes): Deleted.
367         * replay/AllReplayInputs.h:
368         * replay/EventLoopInput.h:
369         * replay/EventLoopInputDispatcher.cpp:
370         (WebCore::EventLoopInputDispatcher::dispatchInput):
371         * replay/MemoizedDOMResult.cpp:
372         (WebCore::MemoizedDOMResultBase::type):
373         (JSC::InputTraits<MemoizedDOMResultBase>::type):
374         * replay/MemoizedDOMResult.h:
375         * replay/ReplayInputTypes.cpp: Removed.
376         * replay/ReplayInputTypes.h: Removed.
377         * replay/ReplayingInputCursor.cpp:
378         (WebCore::ReplayingInputCursor::loadInput):
379         * replay/SegmentedInputStorage.cpp:
380         (WebCore::SegmentedInputStorage::load):
381         (WebCore::SegmentedInputStorage::store):
382         * replay/SerializationMethods.cpp:
383         (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
384         (JSC::EncodingTraits<NondeterministicInputBase>::decodeValue):
385
386 2014-09-30  Eric Carlson  <eric.carlson@apple.com>
387
388         [Mac] MediaPlayerPrivateQTKit should not use FrameView
389         https://bugs.webkit.org/show_bug.cgi?id=137119
390
391         Reviewed by Carlos Garcia Campos.
392
393         Remove obsolete QTKit code that would fall back to rendering into an NSView.
394         Aside from being dead code, it was only used when accelerated compositing
395         was not enabled and tha hasn't been possible for a long time, it required a
396         layering violation to get the FrameView.
397
398         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
399         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
400         (WebCore::MediaPlayerPrivateQTKit::currentRenderingMode):
401         (WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
402         (WebCore::MediaPlayerPrivateQTKit::setUpVideoRendering):
403         (WebCore::MediaPlayerPrivateQTKit::tearDownVideoRendering):
404         (WebCore::MediaPlayerPrivateQTKit::hasSetUpVideoRendering):
405         (WebCore::MediaPlayerPrivateQTKit::setSize):
406         (WebCore::MediaPlayerPrivateQTKit::paint):
407         (WebCore::mainThreadSetNeedsDisplay): Deleted.
408         (WebCore::MediaPlayerPrivateQTKit::createQTMovieView): Deleted.
409         (WebCore::MediaPlayerPrivateQTKit::detachQTMovieView): Deleted.
410         (-[WebCoreMovieObserver menuForEventDelegate:]): Deleted.
411         (-[WebCoreMovieObserver setView:]): Deleted.
412
413 2014-09-30  Carlos Garcia Campos  <cgarcia@igalia.com>
414
415         [GTK] Move GtkPopupMenu implementation to WebPopupMenuProxyGtk
416         https://bugs.webkit.org/show_bug.cgi?id=137193
417
418         Reviewed by Gustavo Noronha Silva.
419
420         Remove GtkPopupMenu from platform.
421
422         * PlatformGTK.cmake:
423         * platform/gtk/GtkPopupMenu.cpp: Removed.
424         * platform/gtk/GtkPopupMenu.h: Removed.
425
426 2014-09-30  Zan Dobersek  <zdobersek@igalia.com>
427
428         Avoid copying the iterated-over items in range-based for-loops in RenderGrid
429         https://bugs.webkit.org/show_bug.cgi?id=137246
430
431         Reviewed by Sergio Villar Senin.
432
433         Adjust the range-based for-loops in RenderGrid to avoid the unnecessary copying
434         of the items that are being iterated.
435
436         * rendering/RenderGrid.cpp:
437         (WebCore::RenderGrid::computeNormalizedFractionBreadth):
438         (WebCore::RenderGrid::insertItemIntoGrid):
439         (WebCore::RenderGrid::gridAreaBreadthForChild):
440
441 2014-09-29  Sergio Villar Senin  <svillar@igalia.com>
442
443         [CSS Grid Layout] Use modern for-loops in RenderGrid
444         https://bugs.webkit.org/show_bug.cgi?id=137214
445
446         Reviewed by Darin Adler.
447
448         New code is already using modern range based for loops. We had some
449         "old" code pending to be migrated.
450
451         No new tests as there is no change in functionality.
452
453         * rendering/RenderGrid.cpp:
454         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
455         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
456         (WebCore::RenderGrid::computeNormalizedFractionBreadth):
457         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
458         (WebCore::RenderGrid::layoutGridItems):
459
460 2014-08-01  Sergio Villar Senin  <svillar@igalia.com>
461
462         Caret not shown at the end of line in overtype mode
463         https://bugs.webkit.org/show_bug.cgi?id=135508
464
465         Reviewed by Ryosuke Niwa.
466
467         When overtype mode is enabled we usually replace the 'normal'
468         blinking caret shown in contenteditable elements by a block cursor
469         that covers the next character to be replaced. The exception is the
470         end of line where we fallback to the blinking caret even in overtype
471         mode (as there is no next character to replace).
472
473         We were not showing anything at the end of lines in overtype mode
474         because the detection of the end of line was incorrect and not very
475         understandable. Replaced the old code with a proper and clean end of
476         line detection mechanism compatible with bidi text.
477
478         Tests: editing/selection/block-cursor-overtype-mode-end-of-line-rtl.html
479                editing/selection/block-cursor-overtype-mode-end-of-line.html
480
481         * editing/FrameSelection.cpp:
482         (WebCore::FrameSelection::updateAppearance):
483         * editing/VisibleUnits.cpp:
484         (WebCore::isLogicalEndOfLine):
485         * editing/VisibleUnits.h:
486
487 2014-09-29  Brian J. Burg  <burg@cs.washington.edu>
488
489         Web Inspector: InjectedScripts should not be profiled or displayed in Timeline
490         https://bugs.webkit.org/show_bug.cgi?id=136806
491
492         Reviewed by Timothy Hatcher.
493
494         Instead of creating timeline records for injected scripts, suspend profiling
495         of the current page before and after calling injected script functions.
496
497         * inspector/InspectorController.cpp:
498         (WebCore::InspectorController::willCallInjectedScriptFunction):
499         (WebCore::InspectorController::didCallInjectedScriptFunction):
500
501 2014-09-29  Brian J. Burg  <burg@cs.washington.edu>
502
503         Web Inspector: InspectorValues should use references for out parameters
504         https://bugs.webkit.org/show_bug.cgi?id=137190
505
506         Reviewed by Joseph Pecoraro.
507
508         Clean up some call sites to explicitly check for cast success, and simplify
509         some exceptional control flows.
510
511         No new tests, no behavior changed.
512
513         * inspector/CommandLineAPIHost.cpp:
514         (WebCore::CommandLineAPIHost::inspectImpl):
515         * inspector/InspectorCSSAgent.cpp:
516         (WebCore::computePseudoClassMask):
517         * inspector/InspectorDOMAgent.cpp:
518         (WebCore::parseColor):
519         (WebCore::parseConfigColor):
520         (WebCore::parseQuad):
521         (WebCore::InspectorDOMAgent::performSearch):
522         (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
523         (WebCore::InspectorDOMAgent::innerHighlightQuad):
524         (WebCore::InspectorDOMAgent::highlightFrame):
525         * inspector/InspectorDOMStorageAgent.cpp:
526         (WebCore::InspectorDOMStorageAgent::findStorageArea):
527         * inspector/InspectorIndexedDBAgent.cpp: Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
528         * inspector/InspectorPageAgent.cpp:
529         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
530         * inspector/InspectorReplayAgent.cpp:
531         (WebCore::InspectorReplayAgent::replayToPosition):
532         * inspector/InspectorResourceAgent.cpp:
533         (WebCore::InspectorResourceAgent::willSendRequest):
534         * inspector/InspectorStyleSheet.cpp:
535         (WebCore::InspectorStyle::styleWithProperties):
536         * inspector/InspectorStyleSheet.h:
537         (WebCore::InspectorCSSId::InspectorCSSId):
538         * inspector/InspectorTimelineAgent.cpp:
539         (WebCore::InspectorTimelineAgent::startFromConsole):
540         (WebCore::InspectorTimelineAgent::stopFromConsole):
541         * inspector/InspectorWorkerAgent.cpp:
542
543 2014-09-29  Christophe Dumez  <cdumez@apple.com>
544
545         Use is<>() / downcast<>() for Document
546         https://bugs.webkit.org/show_bug.cgi?id=137221
547
548         Reviewed by Andreas Kling.
549
550         Use is<>() / downcast<>() for Document instead of isDocumentNode() /
551         toDocument().
552
553         No new tests, no behavior change.
554
555         * Modules/geolocation/Geolocation.cpp:
556         (WebCore::Geolocation::document):
557         (WebCore::Geolocation::frame):
558         (WebCore::Geolocation::page):
559         * Modules/indexeddb/IDBFactory.cpp:
560         * Modules/mediasource/SourceBuffer.cpp:
561         (WebCore::SourceBuffer::document):
562         * Modules/mediastream/RTCPeerConnection.cpp:
563         (WebCore::RTCPeerConnection::RTCPeerConnection):
564         * Modules/notifications/Notification.cpp:
565         (WebCore::Notification::Notification):
566         (WebCore::Notification::show):
567         (WebCore::Notification::permission):
568         (WebCore::Notification::requestPermission):
569         * Modules/webaudio/AudioContext.cpp:
570         (WebCore::AudioContext::document):
571         * Modules/webaudio/OfflineAudioContext.cpp:
572         (WebCore::OfflineAudioContext::create):
573         * Modules/webdatabase/DatabaseContext.cpp:
574         (WebCore::DatabaseContext::allowDatabaseAccess):
575         (WebCore::DatabaseContext::databaseExceededQuota):
576         * Modules/websockets/ThreadableWebSocketChannel.cpp:
577         (WebCore::ThreadableWebSocketChannel::create):
578         * Modules/websockets/WebSocket.cpp:
579         (WebCore::WebSocket::connect):
580         * Modules/websockets/WebSocketHandshake.cpp:
581         (WebCore::WebSocketHandshake::clientHandshakeMessage):
582         (WebCore::WebSocketHandshake::clientHandshakeRequest):
583         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
584         (WebCore::WorkerThreadableWebSocketChannel::Peer::Peer):
585         * bindings/gobject/WebKitDOMPrivate.cpp:
586         (WebKit::wrap):
587         * bindings/js/DOMConstructorWithDocument.h:
588         (WebCore::DOMConstructorWithDocument::document):
589         * bindings/js/DOMRequestState.h:
590         (WebCore::DOMRequestState::DOMRequestState):
591         (WebCore::DOMRequestState::clear):
592         * bindings/js/JSAudioContextCustom.cpp:
593         (WebCore::constructJSAudioContext):
594         * bindings/js/JSDOMGlobalObject.cpp:
595         (WebCore::toJSDOMGlobalObject):
596         * bindings/js/JSLazyEventListener.cpp:
597         (WebCore::JSLazyEventListener::initializeJSFunction):
598         * bindings/js/JSNodeCustom.cpp:
599         (WebCore::createWrapperInline):
600         * bindings/js/ScheduledAction.cpp:
601         (WebCore::ScheduledAction::execute):
602         * bindings/js/ScriptState.cpp:
603         (WebCore::frameFromExecState):
604         * crypto/SubtleCrypto.cpp:
605         (WebCore::SubtleCrypto::document):
606         * dom/Comment.cpp:
607         (WebCore::Comment::create):
608         * dom/ContainerNode.cpp:
609         (WebCore::checkAcceptChild):
610         * dom/ContainerNodeAlgorithms.cpp:
611         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
612         * dom/Document.h:
613         (WebCore::isDocument):
614         * dom/DocumentFragment.cpp:
615         (WebCore::DocumentFragment::create):
616         * dom/Element.cpp:
617         (WebCore::Element::computeInheritedLanguage):
618         * dom/EventDispatcher.cpp:
619         (WebCore::WindowEventContext::WindowEventContext):
620         * dom/EventTarget.cpp:
621         (WebCore::EventTarget::fireEventListeners):
622         * dom/NamedFlowCollection.cpp:
623         (WebCore::NamedFlowCollection::document):
624         * dom/Node.cpp:
625         (WebCore::Node::isDefaultNamespace):
626         (WebCore::Node::lookupPrefix):
627         (WebCore::Node::lookupNamespaceURI):
628         (WebCore::Node::removedLastRef):
629         * dom/Range.cpp:
630         (WebCore::Range::create):
631         * dom/ScriptExecutionContext.cpp:
632         (WebCore::ScriptExecutionContext::dispatchErrorEvent):
633         * dom/Text.cpp:
634         (WebCore::Text::create):
635         * editing/MarkupAccumulator.cpp:
636         (WebCore::MarkupAccumulator::appendStartMarkup):
637         * html/HTMLDocument.h:
638         (WebCore::isHTMLDocument):
639         * html/HTMLNameCollection.h:
640         (WebCore::HTMLNameCollection::document):
641         * html/HTMLStyleElement.cpp:
642         (WebCore::HTMLStyleElement::insertedInto):
643         * html/ImageDocument.h:
644         (WebCore::isImageDocument):
645         * html/MediaDocument.h:
646         (WebCore::isMediaDocument):
647         * html/PluginDocument.h:
648         (WebCore::isPluginDocument):
649         * html/track/TextTrackCue.h:
650         (WebCore::TextTrackCue::ownerDocument):
651         * html/track/VTTCue.cpp:
652         (WebCore::VTTCue::initialize):
653         * html/track/VTTRegion.h:
654         (WebCore::VTTRegion::ownerDocument):
655         * inspector/InspectorDOMAgent.cpp:
656         (WebCore::InspectorDOMAgent::assertDocument):
657         (WebCore::InspectorDOMAgent::buildObjectForNode):
658         (WebCore::InspectorDOMAgent::innerParentNode):
659         * inspector/InspectorInstrumentation.cpp:
660         (WebCore::frameForScriptExecutionContext):
661         * inspector/InspectorInstrumentation.h:
662         (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
663         * loader/TextTrackLoader.cpp:
664         (WebCore::TextTrackLoader::corsPolicyPreventedLoad):
665         (WebCore::TextTrackLoader::notifyFinished):
666         (WebCore::TextTrackLoader::load):
667         * loader/ThreadableLoader.cpp:
668         (WebCore::ThreadableLoader::create):
669         (WebCore::ThreadableLoader::loadResourceSynchronously):
670         * loader/WorkerThreadableLoader.cpp:
671         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
672         * page/ContentSecurityPolicy.cpp:
673         (WebCore::ContentSecurityPolicy::reportViolation):
674         * page/Crypto.cpp:
675         (WebCore::Crypto::document):
676         * page/DOMTimer.cpp:
677         (WebCore::DOMTimer::install):
678         (WebCore::DOMTimer::fired):
679         * page/DOMWindow.cpp:
680         (WebCore::DOMWindow::focus):
681         (WebCore::DOMWindow::close):
682         (WebCore::DOMWindow::document):
683         (WebCore::DOMWindow::styleMedia):
684         (WebCore::DOMWindow::getComputedStyle):
685         * page/DragController.cpp:
686         (WebCore::DragController::dragExited):
687         (WebCore::DragController::dragEnteredOrUpdated):
688         * page/EventSource.cpp:
689         (WebCore::EventSource::create):
690         * page/FocusController.cpp:
691         (WebCore::FocusController::advanceFocusDirectionally):
692         * page/History.cpp:
693         (WebCore::History::go):
694         * page/SpatialNavigation.cpp:
695         (WebCore::scrollInDirection):
696         (WebCore::scrollableEnclosingBoxOrParentFrameForNodeInDirection):
697         (WebCore::canScrollInDirection):
698         (WebCore::nodeRectInAbsoluteCoordinates):
699         * svg/SVGDocument.h:
700         (WebCore::isSVGDocument):
701         * testing/Internals.cpp:
702         (WebCore::Internals::contextDocument):
703         (WebCore::Internals::frame):
704         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
705         * testing/js/WebCoreTestSupport.cpp:
706         (WebCoreTestSupport::injectInternalsObject):
707         (WebCoreTestSupport::resetInternalsObject):
708         * workers/DefaultSharedWorkerRepository.cpp:
709         (WebCore::SharedWorkerProxy::addToWorkerDocuments):
710         * workers/WorkerMessagingProxy.cpp:
711         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
712         * xml/XMLHttpRequest.cpp:
713         (WebCore::XMLHttpRequest::document):
714         (WebCore::XMLHttpRequest::open):
715
716 2014-09-29  David Hyatt  <hyatt@apple.com>
717
718         REGRESSION (r168046): Confused column spans when combined with dynamic animations
719         https://bugs.webkit.org/show_bug.cgi?id=134048.
720
721         Reviewed by Dean Jackson.
722
723         Added fast/multicol/multicol-fieldset-span-changes.html
724
725         * rendering/RenderMultiColumnFlowThread.cpp:
726         (WebCore::RenderMultiColumnFlowThread::processPossibleSpannerDescendant):
727         Refactor handling of insertions into the multicolumn flow thread into
728         a helper function, processPossibleSpannerDescendant. This makes it easier
729         to call the code from more than one place.
730
731         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
732         Modify the nested columns span shifting code to avoid problems. The
733         new code suppresses notifications and does the move of the spanner back
734         into the original spot *before* removing the placeholder. This ensures that
735         the placeholder parent still exists.
736         
737         The stale placeholder is then removed and destroyed after the spanner has been put back
738         into place.
739
740         (WebCore::RenderMultiColumnFlowThread::handleSpannerRemoval):
741         (WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
742         Refactor the removal notifications for spanners into a helper function so that it can
743         be called to do cleanup from the code that cleans up stale placeholders on a shift.
744
745         * rendering/RenderMultiColumnFlowThread.h:
746         Modified to add the new helpers.
747
748 2014-09-29  Christophe Dumez  <cdumez@apple.com>
749
750         Use SPECIALIZE_TYPE_TRAITS_*() macro for MathMLElement
751         https://bugs.webkit.org/show_bug.cgi?id=137222
752
753         Reviewed by Ryosuke Niwa.
754
755         Use SPECIALIZE_TYPE_TRAITS_*() macro for MathMLElement instead of
756         NODE_TYPE_CASTS() + NodeTypeCastTraits template specialization.
757
758         No new tests, no behavior change.
759
760         * accessibility/AccessibilityNodeObject.cpp:
761         (WebCore::AccessibilityNodeObject::accessibilityDescription):
762         * accessibility/AccessibilityRenderObject.cpp:
763         (WebCore::AccessibilityRenderObject::isMathElement):
764         * css/CSSDefaultStyleSheets.cpp:
765         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
766         * mathml/MathMLElement.cpp:
767         (WebCore::MathMLElement::attributeChanged):
768         * mathml/MathMLElement.h:
769         (WebCore::isMathMLElement):
770         * mathml/MathMLSelectElement.cpp:
771         (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
772
773 2014-09-29  Eric Carlson  <eric.carlson@apple.com>
774
775         [Mac] Remove MediaPlayerPrivateQTKit frame rate code
776         https://bugs.webkit.org/show_bug.cgi?id=137217
777
778         Reviewed by Carlos Garcia Campos.
779
780         No new tests, this removes obsolete code.
781
782         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
783         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
784         (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit):
785         (WebCore::MediaPlayerPrivateQTKit::play):
786         (WebCore::MediaPlayerPrivateQTKit::pause):
787         (WebCore::MediaPlayerPrivateQTKit::didEnd):
788         (WebCore::MediaPlayerPrivateQTKit::repaint):
789         (WebCore::MediaPlayerPrivateQTKit::paint):
790
791 2014-09-29  Chris Fleizach  <cfleizach@apple.com>
792
793         AX: in an aria-labelledby computation, do not traverse into elements whose nameFrom value does not include 'contents'
794         https://bugs.webkit.org/show_bug.cgi?id=136714
795
796         Reviewed by Darin Adler.
797
798         There are certain ARIA elements that tell us we should not query their children when determining the name of the object.
799         Those ones have the "nameFrom" property set to "author" instead of "contents." WebKit needs to honor that status.
800
801         Test: accessibility/aria-namefrom-author.html
802               Modified: accessibility/aria-labelledby-with-descendants.html
803
804         * accessibility/AccessibilityNodeObject.cpp:
805         (WebCore::shouldUseAccessiblityObjectInnerText):
806         (WebCore::shouldAddSpaceBeforeAppendingNextElement):
807         (WebCore::appendNameToStringBuilder):
808         (WebCore::AccessibilityNodeObject::textUnderElement):
809         (WebCore::accessibleNameForNode):
810         (WebCore::AccessibilityNodeObject::accessibilityDescriptionForElements):
811         * accessibility/AccessibilityObject.cpp:
812         (WebCore::AccessibilityObject::accessibleNameDerivesFromContent):
813         (WebCore::initializeRoleMap):
814         * accessibility/AccessibilityObject.h:
815
816 2014-09-29  Eric Carlson  <eric.carlson@apple.com>
817
818         [iOS] Optimize media controls AirPlay discovery
819         https://bugs.webkit.org/show_bug.cgi?id=137180
820
821         Reviewed by Darin Adler.
822         
823         AirPlay discovery mode uses increases power consumption, so don't enable it when there
824         is no chance an AirPlay target picker will be useful.
825
826         * Modules/mediacontrols/mediaControlsiOS.js:
827         (ControllerIOS): Initialize isListeningForPlaybackTargetAvailabilityEvent.
828         (ControllerIOS.prototype.addVideoListeners): Don't enable register wireless playback event
829             listeners, it isn't possible to show the target picker until there is an inline controller.
830         (ControllerIOS.prototype.removeVideoListeners): Call setShouldListenForPlaybackTargetAvailabilityEvent.
831         (ControllerIOS.prototype.setControlsType): Add wireless event listers on when not showing 
832             the one button controller.
833         (ControllerIOS.prototype.updateStatusDisplay): Unregister wireless event listeners when the
834             media element is in an error state.
835         (ControllerIOS.prototype.setShouldListenForPlaybackTargetAvailabilityEvent): New, add or
836             remove event listeners. 
837
838 2014-09-29  Eric Carlson  <eric.carlson@apple.com>
839
840         [iOS] Remove obsolete playbackTargetAvailabilityChanged methods
841         https://bugs.webkit.org/show_bug.cgi?id=137179
842
843         Reviewed by Darin Adler.
844
845         No new tests, this just removes unused code.
846
847         * html/HTMLMediaElement.cpp:
848         (WebCore::HTMLMediaElement::mediaPlayerPlaybackTargetAvailabilityChanged): Deleted.
849         * html/HTMLMediaElement.h:
850
851         * platform/graphics/MediaPlayer.cpp:
852         (WebCore::MediaPlayer::playbackTargetAvailabilityChanged): Deleted.
853         * platform/graphics/MediaPlayer.h:
854         (WebCore::MediaPlayerClient::mediaPlayerPlaybackTargetAvailabilityChanged): Deleted.
855
856 2014-09-29  Christophe Dumez  <cdumez@apple.com>
857
858         Use the new is<>() / downcast<>() for ShadowRoot and StyledElement
859         https://bugs.webkit.org/show_bug.cgi?id=137199
860
861         Reviewed by Darin Adler.
862
863         Use the new is<>() / downcast<>() for ShadowRoot and StyledElement and
864         move towards getting rid of the NODE_TYPE_CASTS() macro.
865
866         No new tests, no behavior change.
867
868         * css/ElementRuleCollector.cpp:
869         (WebCore::ElementRuleCollector::matchAllRules):
870         * css/StyleResolver.cpp:
871         (WebCore::StyleResolver::State::initElement):
872         (WebCore::StyleResolver::State::initForStyleResolve):
873         (WebCore::StyleResolver::locateCousinList):
874         (WebCore::StyleResolver::findSiblingForStyleSharing):
875         * dom/Attr.cpp:
876         (WebCore::Attr::style):
877         * dom/Element.cpp:
878         (WebCore::Element::removeAttribute):
879         * dom/EventDispatcher.cpp:
880         (WebCore::EventRelatedNodeResolver::moveToParentOrShadowHost):
881         (WebCore::EventRelatedNodeResolver::findHostOfTreeScopeInTargetTreeScope):
882         (WebCore::eventTargetRespectingTargetRules):
883         (WebCore::EventPath::EventPath):
884         * dom/Node.cpp:
885         (WebCore::Node::containingShadowRoot):
886         (WebCore::Node::parentOrShadowHostElement):
887         (WebCore::Node::showNodePathForThis):
888         * dom/NodeRenderingTraversal.cpp:
889         (WebCore::NodeRenderingTraversal::traverseParent):
890         * dom/ShadowRoot.h:
891         (WebCore::isShadowRoot):
892         (WebCore::Node::shadowRoot):
893         (WebCore::Node::parentOrShadowHostNode):
894         * dom/StyledElement.h:
895         (WebCore::StyledElement::presentationAttributeStyle):
896         (WebCore::isStyledElement):
897         * dom/Text.cpp:
898         (WebCore::isSVGShadowText):
899         * dom/TreeScope.cpp:
900         (WebCore::TreeScope::focusedElement):
901         * dom/TreeScopeAdopter.cpp:
902         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
903         * editing/ApplyStyleCommand.cpp:
904         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
905         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
906         * editing/EditingStyle.cpp:
907         (WebCore::EditingStyle::wrappingStyleForSerialization):
908         * editing/Editor.cpp:
909         (WebCore::Editor::applyEditingStyleToElement):
910         * editing/ReplaceSelectionCommand.cpp:
911         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
912         * editing/cocoa/HTMLConverter.mm:
913         (HTMLConverterCaches::inlineStylePropertyForElement):
914         * editing/markup.cpp:
915         (WebCore::StyledMarkupAccumulator::appendElement):
916         * inspector/InspectorCSSAgent.cpp:
917         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
918         * inspector/InspectorOverlay.cpp:
919         (WebCore::buildObjectForElementInfo):
920         * page/DragController.cpp:
921         (WebCore::asFileInput):
922         * page/EventHandler.cpp:
923         (WebCore::EventHandler::handleMousePressEvent):
924         * page/FocusController.cpp:
925         (WebCore::FocusNavigationScope::owner):
926         * page/PageSerializer.cpp:
927         (WebCore::PageSerializer::serializeFrame):
928         * rendering/RenderLayer.cpp:
929         (WebCore::RenderLayer::resize):
930         * svg/SVGElement.cpp:
931         (WebCore::SVGElement::title):
932         * testing/Internals.cpp:
933         (WebCore::Internals::shadowRoot):
934         (WebCore::Internals::shadowRootType):
935         (WebCore::Internals::includerFor):
936
937 2014-09-29  Christophe Dumez  <cdumez@apple.com>
938
939         Use the new is<>() / downcast<>() for Text Nodes
940         https://bugs.webkit.org/show_bug.cgi?id=137188
941
942         Reviewed by Darin Adler.
943
944         Use the new is<>() / downcast<>() functions for Text Nodes instead of
945         isText() / toText().
946
947         No new tests, no behavior change.
948
949         * accessibility/AccessibilityNodeObject.cpp:
950         (WebCore::AccessibilityNodeObject::textUnderElement):
951         * bindings/gobject/WebKitDOMPrivate.cpp:
952         (WebKit::wrap):
953         * css/SelectorChecker.cpp:
954         (WebCore::SelectorChecker::checkOne):
955         * dom/CharacterData.cpp:
956         (WebCore::CharacterData::parserAppendData):
957         (WebCore::CharacterData::setDataAndUpdate):
958         * dom/ContainerNode.cpp:
959         (WebCore::destroyRenderTreeIfNeeded):
960         * dom/Node.cpp:
961         (WebCore::Node::normalize):
962         * dom/Position.cpp:
963         (WebCore::Position::containerNode):
964         (WebCore::Position::containerText):
965         (WebCore::Position::isRenderedCharacter):
966         (WebCore::Position::leadingWhitespacePosition):
967         * dom/Range.cpp:
968         (WebCore::Range::insertNode):
969         (WebCore::Range::getBorderAndTextQuads):
970         * dom/Text.cpp:
971         (WebCore::earliestLogicallyAdjacentTextNode):
972         (WebCore::latestLogicallyAdjacentTextNode):
973         * dom/Text.h:
974         (WebCore::isText):
975         * dom/TextNodeTraversal.cpp:
976         (WebCore::TextNodeTraversal::contentsAsString):
977         * dom/TextNodeTraversal.h:
978         (WebCore::TextNodeTraversal::firstTextChildTemplate):
979         (WebCore::TextNodeTraversal::firstTextWithinTemplate):
980         (WebCore::TextNodeTraversal::traverseNextTextTemplate):
981         (WebCore::TextNodeTraversal::nextSibling):
982         * editing/ApplyBlockElementCommand.cpp:
983         (WebCore::isNewLineAtPosition):
984         (WebCore::ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded):
985         * editing/ApplyStyleCommand.cpp:
986         (WebCore::ApplyStyleCommand::splitTextAtEnd):
987         (WebCore::ApplyStyleCommand::splitTextElementAtEnd):
988         (WebCore::ApplyStyleCommand::joinChildTextNodes):
989         * editing/BreakBlockquoteCommand.cpp:
990         (WebCore::BreakBlockquoteCommand::doApply):
991         * editing/CompositeEditCommand.cpp:
992         (WebCore::CompositeEditCommand::insertNodeAt):
993         (WebCore::CompositeEditCommand::positionOutsideTabSpan):
994         (WebCore::CompositeEditCommand::canRebalance):
995         (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
996         (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
997         (WebCore::CompositeEditCommand::deleteInsignificantText):
998         (WebCore::CompositeEditCommand::removePlaceholderAt):
999         (WebCore::CompositeEditCommand::cleanupAfterDeletion):
1000         (WebCore::CompositeEditCommand::moveParagraphs):
1001         * editing/DeleteSelectionCommand.cpp:
1002         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
1003         (WebCore::DeleteSelectionCommand::fixupWhitespace):
1004         (WebCore::DeleteSelectionCommand::doApply):
1005         * editing/Editor.cpp:
1006         (WebCore::Editor::setComposition):
1007         * editing/InsertLineBreakCommand.cpp:
1008         (WebCore::InsertLineBreakCommand::doApply):
1009         * editing/InsertParagraphSeparatorCommand.cpp:
1010         (WebCore::InsertParagraphSeparatorCommand::doApply):
1011         * editing/InsertTextCommand.cpp:
1012         (WebCore::InsertTextCommand::insertTab):
1013         * editing/MarkupAccumulator.cpp:
1014         (WebCore::MarkupAccumulator::appendStartMarkup):
1015         * editing/ReplaceSelectionCommand.cpp:
1016         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
1017         (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):
1018         (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
1019         (WebCore::ReplaceSelectionCommand::insertAsListItems):
1020         (WebCore::ReplaceSelectionCommand::performTrivialReplace):
1021         * editing/TextIterator.cpp:
1022         (WebCore::TextIterator::handleTextNode):
1023         (WebCore::TextIterator::handleTextBox):
1024         (WebCore::SimplifiedBackwardsTextIterator::handleTextNode):
1025         * editing/VisibleUnits.cpp:
1026         (WebCore::startPositionForLine):
1027         (WebCore::endPositionForLine):
1028         (WebCore::startOfParagraph):
1029         (WebCore::endOfParagraph):
1030         * editing/htmlediting.cpp:
1031         (WebCore::lineBreakExistsAtPosition):
1032         * editing/markup.cpp:
1033         (WebCore::StyledMarkupAccumulator::renderedText):
1034         (WebCore::replaceChildrenWithFragment):
1035         (WebCore::replaceChildrenWithText):
1036         * html/HTMLElement.cpp:
1037         (WebCore::mergeWithNextTextNode):
1038         (WebCore::HTMLElement::setOuterHTML):
1039         (WebCore::HTMLElement::setOuterText):
1040         * html/HTMLObjectElement.cpp:
1041         (WebCore::HTMLObjectElement::hasFallbackContent):
1042         (WebCore::HTMLObjectElement::updateDocNamedItem):
1043         * html/HTMLOptionElement.cpp:
1044         (WebCore::HTMLOptionElement::setText):
1045         * html/HTMLScriptElement.cpp:
1046         (WebCore::HTMLScriptElement::setText):
1047         * html/HTMLTextFormControlElement.cpp:
1048         (WebCore::HTMLTextFormControlElement::innerTextValue):
1049         (WebCore::positionForIndex):
1050         (WebCore::HTMLTextFormControlElement::indexForPosition):
1051         (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
1052         * html/HTMLTitleElement.cpp:
1053         (WebCore::HTMLTitleElement::setText):
1054         * html/parser/HTMLConstructionSite.cpp:
1055         (WebCore::HTMLConstructionSite::insertTextNode):
1056         * inspector/InspectorDOMAgent.cpp:
1057         (WebCore::InspectorDOMAgent::setNodeValue):
1058         * rendering/RenderCombineText.h:
1059         * rendering/RenderNamedFlowThread.cpp:
1060         (WebCore::RenderNamedFlowThread::getRanges):
1061         * rendering/RenderText.cpp:
1062         (WebCore::RenderText::textNode):
1063         * rendering/svg/RenderSVGInlineText.h:
1064         * style/StyleResolveTree.cpp:
1065         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
1066         (WebCore::Style::attachChildren):
1067         (WebCore::Style::attachDistributedChildren):
1068         (WebCore::Style::detachDistributedChildren):
1069         (WebCore::Style::detachChildren):
1070         (WebCore::Style::resolveShadowTree):
1071         (WebCore::Style::resolveTree):
1072
1073 2014-09-29  Christophe Dumez  <cdumez@apple.com>
1074
1075         Remove remaining uses of NODE_TYPE_CASTS() from html/
1076         https://bugs.webkit.org/show_bug.cgi?id=137172
1077
1078         Reviewed by Darin Adler.
1079
1080         Remove remaining uses of NODE_TYPE_CASTS() from html/ and use the new
1081         SPECIALIZE_TYPE_TRAITS_*() macro instead so that is<>() / downcast<>()
1082         works for those types.
1083
1084         No new tests, no behavior change.
1085
1086         * css/SelectorCheckerTestFunctions.h:
1087         (WebCore::matchesLangPseudoClass):
1088         (WebCore::matchesFutureCuePseudoClass):
1089         (WebCore::matchesPastCuePseudoClass):
1090         * css/StyleResolver.cpp:
1091         (WebCore::StyleResolver::canShareStyleWithElement):
1092         The new casting function found a bad cast from a StyledElement to VTTElement.
1093         Those two types are unrelated as VTTElement inherits directly from Element.
1094         Knowing that |element| in this method cannot be a VTTElement simplifies the
1095         logic a bit.
1096
1097         * dom/NodeRenderingTraversal.cpp:
1098         (WebCore::NodeRenderingTraversal::findFirstEnteringInsertionPoints):
1099         (WebCore::NodeRenderingTraversal::findLastEnteringInsertionPoints):
1100         (WebCore::NodeRenderingTraversal::traverseParent):
1101         * html/HTMLLabelElement.cpp:
1102         (WebCore::nodeAsSupportedLabelableElement):
1103         * html/HTMLTextAreaElement.cpp:
1104         (WebCore::HTMLTextAreaElement::innerTextElement):
1105         * html/LabelableElement.h:
1106         (WebCore::isLabelableElement):
1107         * html/shadow/ContentDistributor.cpp:
1108         (WebCore::ContentDistributor::ensureInsertionPointList):
1109         * html/shadow/InsertionPoint.h:
1110         (WebCore::isInsertionPoint):
1111         (WebCore::isActiveInsertionPoint):
1112         (WebCore::parentNodeForDistribution):
1113         * html/shadow/TextControlInnerElements.h:
1114         (WebCore::isTextControlInnerTextElement):
1115         * html/track/VTTCue.cpp:
1116         (WebCore::VTTCue::copyWebVTTNodeToDOMTree):
1117         (WebCore::VTTCue::markFutureAndPastNodes):
1118         * html/track/WebVTTElement.h:
1119         (WebCore::isWebVTTElement):
1120         * html/track/WebVTTParser.cpp:
1121         (WebCore::WebVTTTreeBuilder::constructTreeFromToken):
1122         * style/StyleResolveTree.cpp:
1123         (WebCore::Style::attachRenderTree):
1124         (WebCore::Style::detachChildren):
1125
1126 2014-09-29  Christophe Dumez  <cdumez@apple.com>
1127
1128         Make is<>() / downcast<>() work for HTMLDocument and its subclasses
1129         https://bugs.webkit.org/show_bug.cgi?id=137169
1130
1131         Reviewed by Darin Adler.
1132
1133         Make is<>() / downcast<>() work for HTMLDocument and its subclasses by
1134         using the SPECIALIZE_TYPE_TRAITS_*() macro. Drop the DOCUMENT_TYPE_CASTS()
1135         macro as it is no longer needed.
1136
1137         No new tests, no behavior change.
1138
1139         * bindings/js/JSDOMWindowCustom.cpp:
1140         (WebCore::namedItemGetter):
1141         (WebCore::JSDOMWindow::getOwnPropertySlot):
1142         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
1143         * dom/Document.cpp:
1144         (WebCore::Document::prepareForDestruction):
1145         (WebCore::Document::processHttpEquiv):
1146         (WebCore::eventTargetElementForDocument):
1147         * dom/Document.h:
1148         * dom/Element.cpp:
1149         (WebCore::Element::insertedInto):
1150         (WebCore::Element::removedFrom):
1151         (WebCore::Element::updateName):
1152         (WebCore::Element::updateId):
1153         * html/HTMLDocument.h:
1154         (WebCore::isHTMLDocument):
1155         * html/HTMLElement.cpp:
1156         (WebCore::HTMLElement::matchesReadWritePseudoClass):
1157         * html/HTMLEmbedElement.cpp:
1158         (WebCore::HTMLEmbedElement::updateWidget):
1159         * html/HTMLImageElement.cpp:
1160         (WebCore::HTMLImageElement::parseAttribute):
1161         * html/HTMLMediaElement.cpp:
1162         (WebCore::HTMLMediaElement::parseAttribute):
1163         * html/HTMLObjectElement.cpp:
1164         (WebCore::HTMLObjectElement::updateDocNamedItem):
1165         * html/ImageDocument.cpp:
1166         (WebCore::ImageDocumentParser::document):
1167         * html/ImageDocument.h:
1168         (WebCore::isImageDocument):
1169         * html/MediaDocument.h:
1170         (WebCore::isMediaDocument):
1171         * html/PluginDocument.cpp:
1172         (WebCore::PluginDocumentParser::createDocumentStructure):
1173         * html/PluginDocument.h:
1174         (WebCore::isPluginDocument):
1175         * loader/SubframeLoader.cpp:
1176         (WebCore::SubframeLoader::loadPlugin):
1177         * page/DragController.cpp:
1178         (WebCore::DragController::operationForLoad):
1179         * page/FrameView.cpp:
1180         (WebCore::determineLayerFlushThrottleState):
1181
1182 2014-09-29  Bruno de Oliveira Abinader  <bruno.d@partner.samsung.com>
1183
1184         Revert "Support for :enabled selector on Anchor & Area elements"
1185         https://bugs.webkit.org/show_bug.cgi?id=134826
1186
1187         Reviewed by Darin Adler.
1188
1189         HTML spec has been modified [1] to disable support for :enabled CSS
1190         selector on Anchor, Area & Link elements, after discussion on W3C
1191         Bugzilla [2].
1192
1193         This reverts r171671.
1194
1195         [1] https://html5.org/r/8818
1196         [2] https://www.w3.org/Bugs/Public/show_bug.cgi?id=26622
1197
1198         * css/SelectorCheckerTestFunctions.h:
1199         (WebCore::isEnabled):
1200         * html/HTMLAnchorElement.cpp:
1201         (WebCore::HTMLAnchorElement::parseAttribute):
1202
1203 2014-09-29  Darin Adler  <darin@apple.com>
1204
1205         Tweak and tighten SVG font converter
1206         https://bugs.webkit.org/show_bug.cgi?id=136956
1207
1208         Reviewed by Myles Maxfield.
1209
1210         * svg/SVGToOTFFontConversion.cpp: Fixed copyright date.
1211         (WebCore::overwrite32): Changed to use normal subscripting for clarity.
1212         (WebCore::overwrite16): Added.
1213         (WebCore::SVGToOTFFontConverter::GlyphData::GlyphData): Added a move
1214         to make constructing each GlyphData less expensive.
1215         (WebCore::SVGToOTFFontConverter::KerningData): Removed the < operator
1216         since it the struct contains more than what we want to sort it by, so it's
1217         not elegant to build the sorting rule into the struct.
1218         (WebCore::SVGToOTFFontConverter): Removed "k" prefix from some constants.
1219         Replaced many function templates with non-template functions. Changed
1220         key type for m_codepointToIndexMap to UChar32.
1221         (WebCore::integralLog2): Tweaked formatting.
1222         (WebCore::SVGToOTFFontConverter::appendCMAPTable): Removed a stray
1223         cast that doesn't have any effect. Use the Glyph type to index m_glyphs.
1224         (WebCore::SVGToOTFFontConverter::appendHEADTable): Append the magic
1225         number in a more straightforward way.
1226         (WebCore::clampTo): Tweak formatting of the template function.
1227         (WebCore::SVGToOTFFontConverter::appendHHEATable): Made some minor
1228         style changes and improved some comments.
1229         (WebCore::SVGToOTFFontConverter::appendOS2Table): Made some minor
1230         style changes and tightened up code that did parsing a bit, removing the
1231         dynamically allocated array for the fixed length Panose number.
1232         Also use first and last instead of hand-coded versions of those.
1233         (WebCore::appendValidCFFString): Renamed.
1234         (WebCore::SVGToOTFFontConverter::appendCFFTable): Made various tweaks,
1235         including more specific of null for the "no weight" value instead of
1236         either empty or null.
1237         (WebCore::SVGToOTFFontConverter::appendVORGTable): Simplified some of
1238         the numeric parsing, since toInt is guaranteed to return 0 when it also
1239         would return "false" for ok. Also got rid of a local vector and instead
1240         just fixed up the size of the table afterward.
1241         (WebCore::SVGToOTFFontConverter::appendVHEATable): Tweaked comment.
1242         (WebCore::SVGToOTFFontConverter::addCodepointRanges): Use isValidKey
1243         instead of a local hardcoded rule to check hash table key validity.
1244         Check for zero in the result of get rather than using find on the HashMap.
1245         (WebCore::SVGToOTFFontConverter::addCodepointRanges): Ditto.
1246         (WebCore::SVGToOTFFontConverter::addGlyphNames): Ditto.
1247         (WebCore::SVGToOTFFontConverter::addKerningPair): Added. Factored out from
1248         appendKERNSubtable to reduce template bloat and improve clarity.
1249         (WebCore::SVGToOTFFontConverter::appendKERNSubtable): Tweaked formatting.
1250         Moved the bulk of the function into non-template function.
1251         (WebCore::SVGToOTFFontConverter::finishAppendingKERNSubtable): Added.
1252         Non-template part of appendKERNSubtable. Also changed std::sort to supply
1253         custom comparison function rather than trying to use the < operator directly
1254         on KerningData.
1255         (WebCore::writeCFFEncodedNumber): Don't use powf just to multiply by
1256         2^16. It's pretty easy to do that with plain old multiplication.
1257         (WebCore::CFFBuilder::CFFBuilder): Renamed m_firstPoint to
1258         m_hasBoundingBox.
1259         (WebCore::CFFBuilder::boundingBox): Made this public and const and made
1260         the rest of the class private.
1261         (WebCore::CFFBuilder::updateBoundingBox): Used early return and revised
1262         to use m_hasBoundingBox.
1263         (WebCore::CFFBuilder::writePoint): Added. Used to keep the other
1264         functions below smaller.
1265         (WebCore::CFFBuilder::moveTo): Marked virtual and simplified using writePoint.
1266         Might find a way to simplify even further by teaching writePoint about
1267         the PathCoordinateMode.
1268         (WebCore::CFFBuilder::lineTo): Ditto.
1269         (WebCore::CFFBuilder::curveToCubic): Ditto. Also removed comment that said
1270         the function could be faster. Not sure that's important to state like this.
1271         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths): Changed into a
1272         non-template function. Tweaked logic and formatting a bit.
1273         (WebCore::SVGToOTFFontConverter::processGlyphElement): Changed into a
1274         non-template function. Moved the code from appendGlyphData in here.
1275         Use WTF::move so we don't copy the glyph paths when creating a GlyphData.
1276         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Updated a bit for
1277         function changes above. Changed code to use isValidKey to check if we can
1278         add to m_codepointToIndexMap. Parse font-style rather than parsing
1279         font-weight twice. Round weights instead of truncating them. Change rule
1280         to "first wins" instead of "last wins" when there are multiple segments.
1281         Removed one vague and non-helpful comment.
1282         (WebCore::isFourByteAligned): Fixed minor formatting issue by making the
1283         function non-abstract. No reason not to hard-code the number 3 when the
1284         number four appears in the function name.
1285         (WebCore::calculateChecksum): Removed unneeded comment about why the
1286         checksum is little-endian; since this came from Windows documentation there
1287         is no doubt that little-endian is correct, so we don't need a comment creating
1288         fear, uncertainty, and doubt. If the checksum computation is wrong, it should
1289         become obvious that we have a bad checksum. Also changed the for loop to use
1290         its own loop variable instead of changing startingOffset, which is not logical.
1291         (WebCore::SVGToOTFFontConverter::appendTable): Updated for name changes.
1292         (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Ditto. Also streamlined
1293         the checksum code a little. The comment still is a little peculiar; I was
1294         tempted to take it out.
1295
1296 2014-09-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1297
1298         [GTK] Remove MainFrameScrollbarGtk.cpp
1299         https://bugs.webkit.org/show_bug.cgi?id=137211
1300
1301         Reviewed by Philippe Normand.
1302
1303         This was only used by WebKit1.
1304
1305         * PlatformGTK.cmake:
1306         * platform/gtk/MainFrameScrollbarGtk.cpp: Removed.
1307         * platform/gtk/MainFrameScrollbarGtk.h: Removed.
1308
1309 2014-09-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1310
1311         [GTK] Remove IntPointGtk.cpp and IntRectGtk.cpp
1312         https://bugs.webkit.org/show_bug.cgi?id=137209
1313
1314         Reviewed by Philippe Normand.
1315
1316         IntPointGtk is unused and IntRectGtk is only required by GTK+2 and
1317         only used when building with GTK+2 in GtkInputMethodFilter.cpp
1318         that can be easily replaced.
1319
1320         * PlatformGTK.cmake:
1321         * platform/graphics/IntPoint.h:
1322         * platform/graphics/IntRect.h:
1323         * platform/graphics/gtk/IntPointGtk.cpp: Removed.
1324         * platform/graphics/gtk/IntRectGtk.cpp: Removed.
1325         * platform/gtk/GtkInputMethodFilter.cpp:
1326         (WebCore::GtkInputMethodFilter::setCursorRect):
1327
1328 2014-09-02  Sergio Villar Senin  <svillar@igalia.com>
1329
1330         [CSS Grid Layout] Handle percentages of indefinite sizes in minmax() and grid-auto-*
1331         https://bugs.webkit.org/show_bug.cgi?id=136453
1332
1333         Reviewed by Darin Adler.
1334
1335         After r165048 percentages of indefinite sizes were correctly
1336         computed to "auto". The problem is that we were not doing it when
1337         the percentage was inside the minmax() function. In those cases it
1338         should compute to min-content for the min track sizing function or
1339         to max-content for the max track sizing function.
1340
1341         We were not doing it also for the track sizes specified in
1342         grid-auto-{column|row} properties. Fixed as well as the code is
1343         the same.
1344
1345         Tests: fast/css-grid-layout/percent-of-indefinite-track-size-in-auto.html
1346                fast/css-grid-layout/percent-of-indefinite-track-size-in-minmax-crash.html
1347                fast/css-grid-layout/percent-of-indefinite-track-size.html
1348
1349         * rendering/RenderGrid.cpp:
1350         (WebCore::RenderGrid::gridTrackSize):
1351         * rendering/RenderGrid.h:
1352         * rendering/style/GridLength.h:
1353         (WebCore::GridLength::isPercentage):
1354         * rendering/style/GridTrackSize.h:
1355         (WebCore::GridTrackSize::GridTrackSize):
1356
1357 2014-09-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1358
1359         Unreviewed. Move sources not using GTK+ from WebCorePlatformGTK_SOURCES to WebCore_SOURCES.
1360
1361         * PlatformGTK.cmake:
1362
1363 2014-09-29  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1364
1365         Use std::unique_ptr instead of PassOwnPtr|OwnPtr for NamedNodeMap
1366         https://bugs.webkit.org/show_bug.cgi?id=137201
1367
1368         Reviewed by Darin Adler.
1369
1370         No new tests, just refactoring patch.
1371
1372         * dom/ElementRareData.h: Use std::unique_ptr instead of OwnPtr.
1373         (WebCore::ElementRareData::setAttributeMap): Use std::unique_ptr. 
1374         * dom/NamedNodeMap.h:
1375         (WebCore::NamedNodeMap::create): ditto.
1376
1377 2014-09-28  Myles C. Maxfield  <mmaxfield@apple.com>
1378
1379         Replace wkGetGlyphsForCharacters() with CGFontGetGlyphsForUnichars()
1380         https://bugs.webkit.org/show_bug.cgi?id=137197
1381
1382         Reviewed by Alexey Proskuryakov.
1383
1384         No new tests because there is no behavior change.
1385
1386         * WebCore.exp.in:
1387         * WebCore.order:
1388         * WebCore.xcodeproj/project.pbxproj:
1389         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
1390         (WebCore::GlyphPage::fill): Use SPI call instead of WKSI call
1391         * platform/mac/WebCoreSystemInterface.h:
1392         * platform/mac/WebCoreSystemInterface.mm:
1393         * platform/spi/cocoa/CGFontUnicodeSupport.h: Added for SPI call.
1394
1395 2014-09-28  Christophe Dumez  <cdumez@apple.com>
1396
1397         Automatically generate template specializations for most Elements
1398         https://bugs.webkit.org/show_bug.cgi?id=137174
1399
1400         Reviewed by Darin Adler.
1401
1402         Previously, the template specializations to make is<>() / downcast<>()
1403         work for HTML/SVG/MathML elements were only generated if
1404         "generateTypeHelpers" parameter was explicitly specified for the
1405         corresponding tag name in the *Tags.in file.
1406
1407         We are however able to generate the template specializations for most
1408         types so this patch drops the "generateTypeHelpers" parameter and
1409         generates those template specializations by default.
1410
1411         One case we cannot generate the specialization ifor is when a class is
1412         associated to several tag names but this patch updates the
1413         make_names.pl script to detect this and skip those classes.
1414
1415         No new tests, no behavior change.
1416
1417         * CMakeLists.txt:
1418         * WebCore.xcodeproj/project.pbxproj:
1419         * dom/make_names.pl:
1420         (defaultTagPropertyHash):
1421         (printTypeHelpers):
1422         * html/HTMLTagNames.in:
1423         * mathml/mathtags.in:
1424         * svg/SVGAllInOne.cpp:
1425         * svg/SVGAnimateColorElement.cpp:
1426         (WebCore::SVGAnimateColorElement::SVGAnimateColorElement):
1427         (WebCore::SVGAnimateColorElement::determinePropertyValueTypes):
1428         * svg/SVGAnimateColorElement.h:
1429         * svg/SVGAnimateElement.cpp:
1430         (WebCore::SVGAnimateElement::SVGAnimateElement):
1431         (WebCore::SVGAnimateElement::~SVGAnimateElement): Deleted.
1432         (WebCore::SVGAnimateElement::hasValidAttributeType): Deleted.
1433         (WebCore::SVGAnimateElement::determineAnimatedPropertyType): Deleted.
1434         (WebCore::SVGAnimateElement::calculateAnimatedValue): Deleted.
1435         (WebCore::SVGAnimateElement::calculateToAtEndOfDurationValue): Deleted.
1436         (WebCore::SVGAnimateElement::calculateFromAndToValues): Deleted.
1437         (WebCore::SVGAnimateElement::calculateFromAndByValues): Deleted.
1438         (WebCore::propertyTypesAreConsistent): Deleted.
1439         (WebCore::SVGAnimateElement::resetAnimatedType): Deleted.
1440         (WebCore::applyCSSPropertyToTarget): Deleted.
1441         (WebCore::removeCSSPropertyFromTarget): Deleted.
1442         (WebCore::applyCSSPropertyToTargetAndInstances): Deleted.
1443         (WebCore::removeCSSPropertyFromTargetAndInstances): Deleted.
1444         (WebCore::notifyTargetAboutAnimValChange): Deleted.
1445         (WebCore::notifyTargetAndInstancesAboutAnimValChange): Deleted.
1446         (WebCore::SVGAnimateElement::clearAnimatedType): Deleted.
1447         (WebCore::SVGAnimateElement::applyResultsToTarget): Deleted.
1448         (WebCore::SVGAnimateElement::animatedPropertyTypeSupportsAddition): Deleted.
1449         (WebCore::SVGAnimateElement::isAdditive): Deleted.
1450         (WebCore::SVGAnimateElement::calculateDistance): Deleted.
1451         (WebCore::SVGAnimateElement::setTargetElement): Deleted.
1452         (WebCore::SVGAnimateElement::setAttributeName): Deleted.
1453         (WebCore::SVGAnimateElement::resetAnimatedPropertyType): Deleted.
1454         (WebCore::SVGAnimateElement::ensureAnimator): Deleted.
1455         * svg/SVGAnimateElement.h:
1456         (WebCore::isSVGAnimateElement): Deleted.
1457         * svg/SVGAnimateElementBase.cpp: Copied from Source/WebCore/svg/SVGAnimateElement.cpp.
1458         (WebCore::SVGAnimateElementBase::SVGAnimateElementBase):
1459         (WebCore::SVGAnimateElementBase::~SVGAnimateElementBase):
1460         (WebCore::SVGAnimateElementBase::hasValidAttributeType):
1461         (WebCore::SVGAnimateElementBase::determineAnimatedPropertyType):
1462         (WebCore::SVGAnimateElementBase::calculateAnimatedValue):
1463         (WebCore::SVGAnimateElementBase::calculateToAtEndOfDurationValue):
1464         (WebCore::SVGAnimateElementBase::calculateFromAndToValues):
1465         (WebCore::SVGAnimateElementBase::calculateFromAndByValues):
1466         (WebCore::propertyTypesAreConsistent):
1467         (WebCore::SVGAnimateElementBase::resetAnimatedType):
1468         (WebCore::applyCSSPropertyToTarget):
1469         (WebCore::removeCSSPropertyFromTarget):
1470         (WebCore::applyCSSPropertyToTargetAndInstances):
1471         (WebCore::removeCSSPropertyFromTargetAndInstances):
1472         (WebCore::notifyTargetAboutAnimValChange):
1473         (WebCore::notifyTargetAndInstancesAboutAnimValChange):
1474         (WebCore::SVGAnimateElementBase::clearAnimatedType):
1475         (WebCore::SVGAnimateElementBase::applyResultsToTarget):
1476         (WebCore::SVGAnimateElementBase::animatedPropertyTypeSupportsAddition):
1477         (WebCore::SVGAnimateElementBase::isAdditive):
1478         (WebCore::SVGAnimateElementBase::calculateDistance):
1479         (WebCore::SVGAnimateElementBase::setTargetElement):
1480         (WebCore::SVGAnimateElementBase::setAttributeName):
1481         (WebCore::SVGAnimateElementBase::resetAnimatedPropertyType):
1482         (WebCore::SVGAnimateElementBase::ensureAnimator):
1483         * svg/SVGAnimateElementBase.h: Copied from Source/WebCore/svg/SVGAnimateElement.h.
1484         (WebCore::isSVGAnimateElementBase):
1485         * svg/SVGAnimateTransformElement.cpp:
1486         (WebCore::SVGAnimateTransformElement::SVGAnimateTransformElement):
1487         (WebCore::SVGAnimateTransformElement::parseAttribute):
1488         * svg/SVGAnimateTransformElement.h:
1489         * svg/SVGAnimatedAngle.cpp:
1490         * svg/SVGAnimatedBoolean.cpp:
1491         * svg/SVGAnimatedColor.cpp:
1492         * svg/SVGAnimatedInteger.cpp:
1493         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
1494         * svg/SVGAnimatedLength.cpp:
1495         * svg/SVGAnimatedLengthList.cpp:
1496         * svg/SVGAnimatedNumber.cpp:
1497         * svg/SVGAnimatedNumberList.cpp:
1498         * svg/SVGAnimatedNumberOptionalNumber.cpp:
1499         * svg/SVGAnimatedPath.cpp:
1500         * svg/SVGAnimatedPointList.cpp:
1501         * svg/SVGAnimatedPreserveAspectRatio.cpp:
1502         * svg/SVGAnimatedRect.cpp:
1503         * svg/SVGAnimatedString.cpp:
1504         * svg/SVGAnimationElement.cpp:
1505         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
1506         * svg/SVGSetElement.cpp:
1507         (WebCore::SVGSetElement::SVGSetElement):
1508         * svg/SVGSetElement.h:
1509         * svg/svgtags.in:
1510
1511 2014-09-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1512
1513         Use std::unique_ptr for ContextMenuController
1514         https://bugs.webkit.org/show_bug.cgi?id=137178
1515
1516         Reviewed by Darin Adler.
1517
1518         Switch to using std::unique_ptr instead of OwnPtr and PassOwnPtr
1519         for ContextMenuController class. Inherited class is changed by this use as well.
1520
1521         No new tests, no behavior changes.
1522
1523         * loader/EmptyClients.cpp:
1524         (WebCore::EmptyContextMenuClient::customizeMenu):
1525         * loader/EmptyClients.h:
1526         * page/ContextMenuClient.h:
1527         * page/ContextMenuController.cpp:
1528         (WebCore::ContextMenuController::clearContextMenu):
1529         (WebCore::ContextMenuController::maybeCreateContextMenu):
1530         (WebCore::ContextMenuController::showContextMenu):
1531         * page/ContextMenuController.h:
1532
1533 2014-09-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1534
1535         Move ColorInputType class to std::unique_ptr
1536         https://bugs.webkit.org/show_bug.cgi?id=137173
1537
1538         Reviewed by Darin Adler.
1539
1540         Replace uses of PassOwnPtr in code under ColorInputType class with std::unique_ptr.
1541         Child classes follow this change as well.
1542
1543         No new tests, no behavior changes.
1544
1545         * html/ColorInputType.cpp:
1546         (WebCore::ColorInputType::didEndChooser):
1547         * html/ColorInputType.h:
1548         * loader/EmptyClients.cpp:
1549         (WebCore::EmptyChromeClient::createColorChooser):
1550         * loader/EmptyClients.h:
1551         * page/Chrome.cpp:
1552         (WebCore::Chrome::createColorChooser):
1553         * page/Chrome.h:
1554         * page/ChromeClient.h:
1555
1556 2014-09-28  Sungmann Cho  <sungmann.cho@navercorp.com>
1557
1558         Fix some minor typos: psuedo -> pseudo
1559         https://bugs.webkit.org/show_bug.cgi?id=137192
1560
1561         Reviewed by Alexey Proskuryakov.
1562
1563         No new tests, no behavior change.
1564
1565         * css/CSSSelector.cpp:
1566         (WebCore::CSSSelector::specificityForOneSelector):
1567
1568 2014-09-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1569
1570         Unreviewed. Move RenderThemeGtk.h from platform/gtk to rendering.
1571
1572         I forgot to move this file in r173111.
1573
1574         * rendering/RenderThemeGtk.h: Renamed from Source/WebCore/platform/gtk/RenderThemeGtk.h.
1575
1576 2014-09-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1577
1578         [ATK] WebKitAccessibleWrapperAtk should not depend on GTK
1579         https://bugs.webkit.org/show_bug.cgi?id=137177
1580
1581         Reviewed by Martin Robinson.
1582
1583         It's used to get the web view widget, but there's no GtkWidget in
1584         the web process and platformPageClient is always NULL.
1585
1586         * PlatformGTK.cmake: Move accessibility sources to the WebCore
1587         sources list.
1588         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1589         (atkParentOfRootObject): Remove code to get view GtkWidget.
1590         * editing/atk/FrameSelectionAtk.cpp: Remove unneeded header include.
1591
1592 2014-09-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1593
1594         [GTK] Remove unused GtkPluginWidget
1595         https://bugs.webkit.org/show_bug.cgi?id=137176
1596
1597         Reviewed by Csaba Osztrogon√°c.
1598
1599         It was only used by WebKit1.
1600
1601         * PlatformGTK.cmake:
1602         * platform/gtk/GtkPluginWidget.cpp: Removed.
1603         * platform/gtk/GtkPluginWidget.h: Removed.
1604
1605 2014-09-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1606
1607         [cairo] GraphicsContext should not depend on GTK+
1608         https://bugs.webkit.org/show_bug.cgi?id=137175
1609
1610         Reviewed by Martin Robinson.
1611
1612         Remove the unused methods depending on GDK and simplify
1613         GraphicsContext::drawFocusRing() using only cairo API.
1614
1615         * PlatformGTK.cmake: Move GraphicsContextCairo.cpp to the webcore sources.
1616         * platform/graphics/GraphicsContext.h:
1617         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1618         (WebCore::GraphicsContext::drawFocusRing): Iterate the rectangles
1619         instead of creating a region for the rectangles and call gdk_cairo_region().
1620         (WebCore::GraphicsContext::setGdkExposeEvent): Deleted.
1621         (WebCore::GraphicsContext::gdkExposeEvent): Deleted.
1622         (WebCore::GraphicsContext::gdkWindow): Deleted.
1623         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1624         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
1625
1626 2014-09-27  Chris Dumez  <cdumez@apple.com>
1627
1628         HTMLPlugInElement::isUserObservable() is causing layout
1629         https://bugs.webkit.org/show_bug.cgi?id=137156
1630
1631         Reviewed by Ryosuke Niwa.
1632
1633         While profiling the page load of nytimes.com, I noticed that we were
1634         spending ~4-5% of cpu time in HTMLPlugInElement::isUserObservable().
1635         The reason is that the function calls pluginWidget(), which causes a
1636         layout update in HTMLObjectElement::renderWidgetForJSBindings(), to
1637         make sure the plugin is loaded and its renderer is created.
1638
1639         HTMLPlugInElement::isUserObservable() shouldn't need to do a layout.
1640         This patch does the following to address the problem:
1641         - Rename renderWidgetForJSBindings() to renderWidgetLoadingPlugin()
1642           because this function is not always called from the JS Bindings
1643           nowadays. The new name makes it clearer that this will load the
1644           plugin if needed (to make sure the renderer is created, and by
1645           doing a layout).
1646         - Add a PluginLoadingPolicy argument to
1647           HTMLPlugInElement::pluginWidget() to let the caller control if the
1648           plugin should be loaded or not.
1649         - Update the call to pluginWidget() in isUserObservable() so that
1650           we do not attempt to load the plugin (thus not causing a layout).
1651
1652         No new tests, no behavior change.
1653
1654         * WebCore.exp.in:
1655         * WebCore.order:
1656         * html/HTMLAppletElement.cpp:
1657         (WebCore::HTMLAppletElement::renderWidgetLoadingPlugin):
1658         (WebCore::HTMLAppletElement::renderWidgetForJSBindings): Deleted.
1659         * html/HTMLAppletElement.h:
1660         * html/HTMLEmbedElement.cpp:
1661         (WebCore::HTMLEmbedElement::renderWidgetLoadingPlugin):
1662         (WebCore::HTMLEmbedElement::renderWidgetForJSBindings): Deleted.
1663         * html/HTMLEmbedElement.h:
1664         * html/HTMLObjectElement.cpp:
1665         (WebCore::HTMLObjectElement::renderWidgetLoadingPlugin):
1666         (WebCore::HTMLObjectElement::renderWidgetForJSBindings): Deleted.
1667         * html/HTMLObjectElement.h:
1668         * html/HTMLPlugInElement.cpp:
1669         (WebCore::HTMLPlugInElement::pluginWidget):
1670         (WebCore::HTMLPlugInElement::isUserObservable):
1671         * html/HTMLPlugInElement.h:
1672
1673 2014-09-27  Christophe Dumez  <cdumez@apple.com>
1674
1675         Use the new is<>() / downcast<>() for more Node subclasses
1676         https://bugs.webkit.org/show_bug.cgi?id=137184
1677
1678         Reviewed by Ryosuke Niwa.
1679
1680         Use the new is<>() / downcast<>() for more Node subclasses:
1681         CDATASection, CharacterData, Comment, DocumentType,
1682         ProcessingInstruction, and PseudoElement.
1683
1684         No new tests, no behavior change.
1685
1686         * dom/CDATASection.h:
1687         (WebCore::isCDATASection):
1688         * dom/CharacterData.cpp:
1689         (WebCore::CharacterData::setDataAndUpdate):
1690         * dom/CharacterData.h:
1691         (WebCore::isCharacterData):
1692         * dom/Comment.h:
1693         (WebCore::isComment):
1694         * dom/DocumentStyleSheetCollection.cpp:
1695         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
1696         * dom/DocumentType.h:
1697         (WebCore::isDocumentType):
1698         * dom/EventDispatcher.cpp:
1699         (WebCore::eventTargetRespectingTargetRules):
1700         (WebCore::nodeOrHostIfPseudoElement):
1701         * dom/Node.cpp:
1702         (WebCore::markAncestorsWithChildNeedsStyleRecalc):
1703         (WebCore::Node::pseudoAwarePreviousSibling):
1704         (WebCore::Node::pseudoAwareNextSibling):
1705         * dom/NodeTraversal.cpp:
1706         (WebCore::NodeTraversal::previousIncludingPseudo):
1707         (WebCore::NodeTraversal::nextIncludingPseudo):
1708         (WebCore::NodeTraversal::nextIncludingPseudoSkippingChildren):
1709         * dom/ProcessingInstruction.h:
1710         (WebCore::isProcessingInstruction):
1711         * dom/PseudoElement.h:
1712         (WebCore::isPseudoElement):
1713         * dom/Range.cpp:
1714         (WebCore::lengthOfContentsInNode):
1715         (WebCore::Range::processContentsBetweenOffsets):
1716         (WebCore::Range::checkNodeWOffset):
1717         * editing/Editor.cpp:
1718         (WebCore::Editor::shouldInsertFragment):
1719         * editing/MarkupAccumulator.cpp:
1720         (WebCore::MarkupAccumulator::appendStartMarkup):
1721         * editing/cocoa/HTMLConverter.mm:
1722         (HTMLConverter::_traverseNode):
1723         * inspector/InspectorDOMAgent.cpp:
1724         (WebCore::InspectorDOMAgent::buildObjectForNode):
1725         * inspector/InspectorLayerTreeAgent.cpp:
1726         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
1727         * rendering/HitTestResult.cpp:
1728         (WebCore::HitTestResult::setInnerNode):
1729         (WebCore::HitTestResult::setInnerNonSharedNode):
1730         * rendering/RenderListItem.cpp:
1731         (WebCore::enclosingList):
1732         * rendering/RenderObject.cpp:
1733         (WebCore::RenderObject::generatingPseudoHostElement):
1734         * xml/XPathFunctions.cpp:
1735         (WebCore::XPath::expandedNameLocalPart):
1736
1737 2014-09-27  Christophe Dumez  <cdumez@apple.com>
1738
1739         Use the new is<>() / downcast<>() for Attr Nodes
1740         https://bugs.webkit.org/show_bug.cgi?id=137183
1741
1742         Reviewed by Ryosuke Niwa.
1743
1744         Use the new is<>() / downcast<>() for Attr Nodes instead of isAttr() /
1745         toAttr().
1746
1747         No new tests, no behavior change.
1748
1749         * dom/Attr.h:
1750         (WebCore::isAttr):
1751         * dom/Document.cpp:
1752         (WebCore::Document::importNode):
1753         (WebCore::Document::adoptNode):
1754         * dom/NamedNodeMap.cpp:
1755         (WebCore::NamedNodeMap::setNamedItem):
1756         * dom/Node.cpp:
1757         (WebCore::Node::compareDocumentPosition):
1758         * inspector/InspectorDOMAgent.cpp:
1759         (WebCore::InspectorDOMAgent::buildObjectForNode):
1760         * inspector/InspectorNodeFinder.cpp:
1761         (WebCore::InspectorNodeFinder::searchUsingXPath):
1762         * xml/XPathNodeSet.cpp:
1763         (WebCore::XPath::sortBlock):
1764         (WebCore::XPath::NodeSet::sort):
1765         (WebCore::XPath::findRootNode):
1766
1767 2014-09-27  Brian J. Burg  <burg@cs.washington.edu>
1768
1769         Web Replay: Playback position updates should be sent before the next event loop input is dispatched
1770         https://bugs.webkit.org/show_bug.cgi?id=137162
1771
1772         Reviewed by Timothy Hatcher.
1773
1774         To drive playback position updates in the Inspector UI, we send playbackHitPosition protocol
1775         messages as the replay backend dispatches inputs. However, right now the semantics of that
1776         message are muddy. The update is sent *after* the input at the offset is dispatched. This leads
1777         to unexpected results if the debugger pauses while the input is being dispatched: the frontend
1778         will only know about the previous (stale) playback position when the debugger pauses.
1779
1780         With this patch, the backend sends the playbackHitPosition(segmentOffset=n, inputOffset=m)
1781         message when backend is about to dispatch input m, but has not yet begun to do so. Thus, any
1782         subsequent page execution events (profiling, debugger pauses, etc) until the next
1783         playbackHitPosition are caused by input m's being dispatched.
1784
1785         * inspector/protocol/Replay.json: Clarify the message's semantics.
1786         * replay/ReplayController.cpp:
1787         (WebCore::ReplayController::willDispatchInput):
1788         (WebCore::ReplayController::didDispatchInput):
1789
1790 2014-09-27  Benjamin Poulain  <bpoulain@apple.com>
1791
1792         Chaining multiple :nth-child() does not work properly
1793         https://bugs.webkit.org/show_bug.cgi?id=137032
1794
1795         Reviewed by Gavin Barraclough.
1796
1797         When multiple :nth-child() are chained, the evaluation of each "An+B" could depend on
1798         the execution of the previous "An+B". The reason is that the register holding the position
1799         of the current element could be modified by the evaluation of "An+B".
1800
1801         There are two cases in which the register was used as the destination of an operation:
1802         1) When A and B are positive, the counter would be the destination of "counter - B".
1803         2) When A is not 1 or 2, the modulo operation was not preserving the input register.
1804
1805         For (1), we a copy of the counter in that case of generateElementIsNthChild().
1806
1807         For (2), we also preserve a copy of the input if it is used by the operation. In this case,
1808         if the input register is one of the argument we need for idiv, we preserve it on the stack
1809         or in a register depending on what is available.
1810
1811         This increases the register requirements by 2 in the worst case on x86. The extra registers
1812         can push generateElementIsNthChild() above the 4 available registers. To accomodate for that,
1813         minimumRegisterRequirements() reserve more registers on x86.
1814
1815         The extra register pressure has strictly no effect on performance, x86_64 has 9 registers
1816         available without pushing anything. The extra allocation is only necessary for debugging.
1817
1818         Tests: fast/selectors/nth-child-basics.html
1819                fast/selectors/nth-child-chained.html
1820                fast/selectors/nth-child-of-basics-2.html
1821                fast/selectors/nth-child-of-chained.html
1822
1823         * cssjit/SelectorCompiler.cpp:
1824         (WebCore::SelectorCompiler::minimumRegisterRequirements):
1825         (WebCore::SelectorCompiler::SelectorCodeGenerator::modulo):
1826         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
1827
1828 2014-09-26  Christophe Dumez  <cdumez@apple.com>
1829
1830         Stop using legacy NODE_TYPE_CASTS() macro for HTML Elements
1831         https://bugs.webkit.org/show_bug.cgi?id=137137
1832
1833         Reviewed by Benjamin Poulain.
1834
1835         Stop using legacy NODE_TYPE_CASTS() macro for HTML Elements and use the
1836         new SPECIALIZE_TYPE_TRAITS_*() macro instead so that is<>() /
1837         downcast<>() works for those types.
1838
1839         No new tests, no behavior change.
1840
1841         * accessibility/AccessibilityNodeObject.cpp:
1842         (WebCore::AccessibilityNodeObject::labelForElement):
1843         (WebCore::AccessibilityNodeObject::text):
1844         * accessibility/AccessibilityTable.cpp:
1845         (WebCore::AccessibilityTable::isDataTable):
1846         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1847         (webkitAccessibleGetName):
1848         (webkitAccessibleGetDescription):
1849         * bindings/gobject/WebKitDOMPrivate.cpp:
1850         (WebKit::wrap):
1851         * bindings/js/JSElementCustom.cpp:
1852         (WebCore::toJSNewlyCreated):
1853         * bindings/js/JSNodeCustom.cpp:
1854         (WebCore::createWrapperInline):
1855         * bindings/js/JSPluginElementFunctions.cpp:
1856         (WebCore::pluginInstance):
1857         (WebCore::pluginScriptObjectFromPluginViewBase):
1858         (WebCore::pluginScriptObject):
1859         (WebCore::pluginElementCustomPut):
1860         (WebCore::isPluginElement): Deleted.
1861         * bindings/objc/DOM.mm:
1862         (kitClass):
1863         * css/ElementRuleCollector.cpp:
1864         (WebCore::ElementRuleCollector::matchAllRules):
1865         * css/SelectorChecker.cpp:
1866         (WebCore::SelectorChecker::checkOne):
1867         * css/StyleResolver.cpp:
1868         (WebCore::StyleResolver::locateCousinList):
1869         (WebCore::elementHasDirectionAuto):
1870         * cssjit/SelectorCompiler.cpp:
1871         (WebCore::SelectorCompiler::makeContextStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
1872         (WebCore::SelectorCompiler::makeElementStyleUniqueIfNecessaryAndTestIsPlaceholderShown):
1873         (WebCore::SelectorCompiler::isPlaceholderShown):
1874         * dom/ContainerNodeAlgorithms.cpp:
1875         (WebCore::assertConnectedSubrameCountIsConsistent):
1876         (WebCore::collectFrameOwners):
1877         (WebCore::disconnectSubframes):
1878         * dom/Document.cpp:
1879         (WebCore::Document::adoptNode):
1880         (WebCore::Document::setBody):
1881         (WebCore::Document::iconURLs):
1882         (WebCore::Document::dispatchFullScreenChangeOrErrorEvent):
1883         (WebCore::Document::updateHoverActiveState):
1884         * dom/DocumentStyleSheetCollection.cpp:
1885         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
1886         * dom/Range.cpp:
1887         (WebCore::Range::createContextualFragment):
1888         * dom/make_names.pl:
1889         (printTypeHelpers):
1890         * editing/ApplyStyleCommand.cpp:
1891         (WebCore::isLegacyAppleStyleSpan):
1892         (WebCore::isStyleSpanOrSpanWithOnlyStyleAttribute):
1893         (WebCore::isSpanWithoutAttributesOrUnstyledStyleSpan):
1894         (WebCore::isEmptyFontTag):
1895         (WebCore::ApplyStyleCommand::applyBlockStyle):
1896         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1897         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
1898         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
1899         (WebCore::ApplyStyleCommand::removeConflictingInlineStyleFromRun):
1900         (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
1901         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
1902         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
1903         (WebCore::ApplyStyleCommand::removeInlineStyle):
1904         (WebCore::ApplyStyleCommand::shouldSplitTextElement):
1905         (WebCore::ApplyStyleCommand::applyInlineStyleChange):
1906         * editing/DeleteButtonController.cpp:
1907         (WebCore::enclosingDeletableElement):
1908         * editing/Editor.cpp:
1909         (WebCore::Editor::selectionForCommand):
1910         (WebCore::Editor::setBaseWritingDirection):
1911         (WebCore::findFirstMarkable):
1912         * editing/FrameSelection.cpp:
1913         (WebCore::FrameSelection::selectAll):
1914         (WebCore::scanForForm):
1915         * editing/InsertListCommand.cpp:
1916         (WebCore::InsertListCommand::mergeWithNeighboringLists):
1917         * editing/MarkupAccumulator.cpp:
1918         (WebCore::MarkupAccumulator::elementCannotHaveEndTag):
1919         * editing/ReplaceSelectionCommand.cpp:
1920         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
1921         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
1922         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
1923         (WebCore::ReplaceSelectionCommand::doApply):
1924         (WebCore::ReplaceSelectionCommand::insertAsListItems):
1925         * editing/TextIterator.cpp:
1926         (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
1927         (WebCore::shouldEmitExtraNewlineForNode):
1928         * editing/cocoa/HTMLConverter.mm:
1929         (HTMLConverter::_addTableCellForElement):
1930         (HTMLConverter::_processElement):
1931         * editing/htmlediting.cpp:
1932         (WebCore::enclosingList):
1933         (WebCore::embeddedSublist):
1934         (WebCore::appendedSublist):
1935         * editing/ios/EditorIOS.mm:
1936         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
1937         * editing/mac/EditorMac.mm:
1938         (WebCore::maybeCopyNodeAttributesToFragment):
1939         * editing/markup.cpp:
1940         (WebCore::StyledMarkupAccumulator::appendElement):
1941         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
1942         (WebCore::BaseChooserOnlyDateAndTimeInputType::updateAppearance):
1943         * html/ColorInputType.cpp:
1944         (WebCore::ColorInputType::shadowColorSwatch):
1945         * html/HTMLBodyElement.cpp:
1946         (WebCore::HTMLBodyElement::insertedInto):
1947         * html/HTMLCollection.cpp:
1948         (WebCore::HTMLCollection::namedItem):
1949         (WebCore::HTMLCollection::updateNamedElementCache):
1950         * html/HTMLElement.cpp:
1951         (WebCore::HTMLElement::matchesReadWritePseudoClass):
1952         (WebCore::HTMLElement::setOuterHTML):
1953         (WebCore::elementAffectsDirectionality):
1954         (WebCore::HTMLElement::directionality):
1955         (WebCore::HTMLElement::dirAttributeChanged):
1956         * html/HTMLElement.h:
1957         (WebCore::isHTMLElement):
1958         (WebCore::Node::hasTagName):
1959         * html/HTMLFormElement.cpp:
1960         (WebCore::HTMLFormElement::getNamedElements):
1961         * html/HTMLFrameElementBase.h:
1962         (WebCore::isHTMLFrameElementBase):
1963         * html/HTMLFrameOwnerElement.h:
1964         (WebCore::isHTMLFrameOwnerElement):
1965         * html/HTMLMediaElement.h:
1966         (WebCore::isHTMLMediaElement):
1967         * html/HTMLOptionElement.cpp:
1968         (WebCore::HTMLOptionElement::isDisabledFormControl):
1969         * html/HTMLPlugInElement.h:
1970         (WebCore::isHTMLPlugInElement):
1971         * html/HTMLPlugInImageElement.cpp:
1972         (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin):
1973         * html/HTMLPlugInImageElement.h:
1974         (WebCore::isHTMLPlugInImageElement):
1975         * html/HTMLSelectElement.cpp:
1976         (WebCore::HTMLSelectElement::setOption):
1977         (WebCore::HTMLSelectElement::setLength):
1978         (WebCore::HTMLSelectElement::recalcListItems):
1979         * html/HTMLSourceElement.cpp:
1980         (WebCore::HTMLSourceElement::insertedInto):
1981         (WebCore::HTMLSourceElement::removedFrom):
1982         * html/HTMLTableCellElement.cpp:
1983         (WebCore::HTMLTableCellElement::cellAbove):
1984         * html/HTMLTableCellElement.h:
1985         (WebCore::isHTMLTableCellElement):
1986         * html/HTMLTableElement.cpp:
1987         (WebCore::HTMLTableElement::tHead):
1988         (WebCore::HTMLTableElement::tFoot):
1989         (WebCore::HTMLTableElement::lastBody):
1990         * html/HTMLTableRowElement.cpp:
1991         (WebCore::HTMLTableRowElement::rowIndex):
1992         * html/HTMLTableRowsCollection.cpp:
1993         (WebCore::isInSection):
1994         * html/HTMLTableSectionElement.h:
1995         (WebCore::isHTMLTableSectionElement):
1996         * html/HTMLTagNames.in:
1997         * html/HTMLTextFormControlElement.cpp:
1998         (WebCore::enclosingTextFormControl):
1999         * html/HTMLTextFormControlElement.h:
2000         (WebCore::isHTMLTextFormControlElement):
2001         * html/HTMLTrackElement.cpp:
2002         (WebCore::HTMLTrackElement::removedFrom):
2003         (WebCore::HTMLTrackElement::mediaElement):
2004         * html/LabelableElement.h:
2005         (WebCore::isLabelableElement):
2006         * html/RangeInputType.cpp:
2007         (WebCore::RangeInputType::sliderTrackElement):
2008         * html/shadow/MediaControlElementTypes.cpp:
2009         (WebCore::parentMediaElement):
2010         (WebCore::mediaControlElementType):
2011         * html/shadow/TextControlInnerElements.h:
2012         (WebCore::isTextControlInnerTextElement):
2013         * inspector/InspectorDOMAgent.cpp:
2014         (WebCore::InspectorDOMAgent::buildObjectForNode):
2015         * inspector/InspectorNodeFinder.cpp:
2016         (WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal):
2017         * loader/SubframeLoader.cpp:
2018         (WebCore::SubframeLoader::loadSubframe):
2019         * loader/archive/cf/LegacyWebArchive.cpp:
2020         (WebCore::LegacyWebArchive::create):
2021         * mathml/MathMLElement.cpp:
2022         (WebCore::MathMLElement::isPhrasingContent):
2023         (WebCore::MathMLElement::isFlowContent):
2024         (WebCore::MathMLElement::childShouldCreateRenderer):
2025         * mathml/mathtags.in:
2026         * page/DragController.cpp:
2027         (WebCore::DragController::canProcessDrag):
2028         * page/EventHandler.cpp:
2029         (WebCore::targetIsFrame):
2030         * page/FocusController.cpp:
2031         (WebCore::hasCustomFocusLogic):
2032         (WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
2033         (WebCore::FocusController::advanceFocusInDocumentOrder):
2034         * page/Frame.cpp:
2035         (WebCore::Frame::searchForLabelsBeforeElement):
2036         * page/FrameView.cpp:
2037         (WebCore::FrameView::init):
2038         (WebCore::FrameView::addEmbeddedObjectToUpdate):
2039         (WebCore::FrameView::updateEmbeddedObject):
2040         * page/PageSerializer.cpp:
2041         (WebCore::isCharsetSpecifyingNode):
2042         (WebCore::SerializerMarkupAccumulator::appendCustomAttributes):
2043         * page/SpatialNavigation.cpp:
2044         (WebCore::frameOwnerElement):
2045         * rendering/HitTestResult.cpp:
2046         (WebCore::HitTestResult::absolutePDFURL):
2047         (WebCore::HitTestResult::mediaElement):
2048         * rendering/RenderBlockFlow.cpp:
2049         (WebCore::resizeTextPermitted):
2050         * rendering/RenderEmbeddedObject.cpp:
2051         (WebCore::RenderEmbeddedObject::paintContents):
2052         (WebCore::RenderEmbeddedObject::layout):
2053         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
2054         * rendering/RenderLayer.cpp:
2055         (WebCore::RenderLayer::scrollRectToVisible):
2056         (WebCore::RenderLayer::updateSnapOffsets):
2057         * rendering/RenderLayerBacking.cpp:
2058         (WebCore::RenderLayerBacking::updateConfiguration):
2059         (WebCore::isRestartedPlugin):
2060         * rendering/RenderMedia.h:
2061         (WebCore::RenderMedia::mediaElement):
2062         * rendering/RenderObject.cpp:
2063         (WebCore::RenderObject::offsetParent):
2064         * rendering/RenderSnapshottedPlugIn.cpp:
2065         (WebCore::RenderSnapshottedPlugIn::plugInImageElement):
2066         * rendering/RenderTableCell.cpp:
2067         (WebCore::RenderTableCell::parseColSpanFromDOM):
2068         (WebCore::RenderTableCell::parseRowSpanFromDOM):
2069         * rendering/RenderTextControl.cpp:
2070         (WebCore::RenderTextControl::textFormControlElement):
2071         * rendering/RenderThemeGtk.cpp:
2072         (WebCore::getMediaElementFromRenderObject):
2073         * rendering/RenderThemeMac.mm:
2074         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
2075         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
2076         * rendering/RenderTreeAsText.cpp:
2077         (WebCore::isEmptyOrUnstyledAppleStyleSpan):
2078         * rendering/RenderWidget.h:
2079         (WebCore::RenderWidget::frameOwnerElement):
2080         * testing/Internals.cpp:
2081         (WebCore::Internals::visiblePlaceholder):
2082         (WebCore::Internals::simulateAudioInterruption):
2083         (WebCore::Internals::isPluginSnapshotted):
2084         * xml/XPathStep.cpp:
2085         (WebCore::XPath::nodeMatchesBasicTest):
2086
2087 2014-09-26  Joseph Pecoraro  <pecoraro@apple.com>
2088
2089         Web Inspector: Automatic Inspection should continue once all breakpoints are loaded
2090         https://bugs.webkit.org/show_bug.cgi?id=137038
2091
2092         Reviewed by Timothy Hatcher.
2093
2094         Handle frontend initialization messages even though pages cannot
2095         be automatically inspected yet.
2096
2097         * inspector/InspectorController.cpp:
2098         (WebCore::InspectorController::InspectorController):
2099         (WebCore::InspectorController::connectFrontend):
2100         (WebCore::InspectorController::disconnectFrontend):
2101         (WebCore::InspectorController::frontendInitialized):
2102         * inspector/InspectorController.h:
2103         * inspector/WorkerInspectorController.h:
2104         * page/Page.h:
2105         (WebCore::Page::inspectorDebuggable):
2106
2107 2014-09-26  David Kilzer  <ddkilzer@apple.com>
2108
2109         REGRESSION (r173988): Fix unused variable warning in PDFDocumentImage.cpp
2110
2111         Fixes the following build failure in release builds:
2112
2113             WebCore/platform/graphics/cg/PDFDocumentImage.cpp:230:12: error: unused variable 'pageCount' [-Werror,-Wunused-variable]
2114
2115         * platform/graphics/cg/PDFDocumentImage.cpp:
2116         (WebCore::PDFDocumentImage::computeBoundsForCurrentPage): Change
2117         ASSERT() to call pageCount().
2118
2119 2014-09-26  Brian J. Burg  <burg@cs.washington.edu>
2120
2121         StorageTracker::deleteOrigin being called off the main thread (ASSERTs in inspector/test-harness-trivially-works.html test)
2122         https://bugs.webkit.org/show_bug.cgi?id=129642
2123
2124         Apply post-review comments from Alexey Proskuryakov.
2125
2126         * storage/StorageAreaSync.cpp:
2127         (WebCore::StorageAreaSync::deleteEmptyDatabase): Make a thread-safe isolated copy of the string.
2128
2129 2014-09-26  Myles C. Maxfield  <mmaxfield@apple.com>
2130
2131         SVG -> OTF converter bug gardening
2132         https://bugs.webkit.org/show_bug.cgi?id=137088
2133
2134         Reviewed by Darin Adler.
2135
2136         This test fixes some (but not all) of the svg/ layout tests that never worked with the
2137         SVG -> OTF font converter. The actual list of tests this fixes is shown below. I will be
2138         filing bugs for the remaining issues along with the relevant tests that those issues
2139         cause to fail.
2140
2141         Tests: svg/W3C-SVG-1.1/fonts-elem-05-t.svg
2142                svg/W3C-SVG-1.1/fonts-kern-01-t.svg
2143                svg/custom/glyph-setting-d-attribute.svg
2144                svg/custom/scrolling-embedded-svg-file-image-repaint-problem.html
2145                svg/custom/skip-underline-missing-glyph.html
2146                svg/custom/svg-fonts-fallback.xhtml
2147                svg/custom/svg-fonts-in-text-controls.html
2148
2149         * svg/SVGToOTFFontConversion.cpp:
2150         (WebCore::SVGToOTFFontConverter::appendHEADTable): We use the font's minimum and maximum
2151         bounding box information to size <textarea>s and <input>s.
2152         (WebCore::SVGToOTFFontConverter::addCodepointRanges): Codepoint ranges are closed.
2153         (WebCore::SVGToOTFFontConverter::computeKerningData): Typo in appending glyphs to the
2154         wrong set.
2155         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths): Use the font's horizontal
2156         origin if the glyph doesn't have one.
2157         (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): r173852 implemented vhea, vmtx,
2158         and kern.
2159         (WebCore::transcodeGlyphPaths): Moved inside SVGToOTFFontConverter.
2160
2161 2014-09-26  Dan Bernstein  <mitz@apple.com>
2162
2163         iOS build fix following r173989.
2164
2165         * page/ios/FrameIOS.mm:
2166         (WebCore::ancestorRespondingToClickEvents):
2167
2168 2014-09-26  Javier Fernandez  <jfernandez@igalia.com>
2169
2170         [CSS Grid Layout] Empty string case already covered by containesOnlyWhiteSpace.
2171         https://bugs.webkit.org/show_bug.cgi?id=137146
2172
2173         Reviewed by Sergio Villar Senin.
2174
2175         When checking out for white-space only strings in the grid-template-areas
2176         property values, it's not neccessary to check out for empty strings as
2177         such case is already covered.
2178
2179         No new tests, already covered by fast/css-grid-layout/grid-template-areas-empty-string-crash.html.
2180
2181         * css/CSSParser.cpp:
2182         (WebCore::CSSParser::parseGridTemplateAreasRow):
2183
2184 2014-09-23  Sergio Villar Senin  <svillar@igalia.com>
2185
2186         [CSS Grid Layout] Fix the handling of infinity in track growth limits
2187         https://bugs.webkit.org/show_bug.cgi?id=137019
2188
2189         Reviewed by Darin Adler.
2190
2191         The growth limit of content sized tracks is initialized to
2192         infinity which is internally represented as -1. We were not
2193         specialcasing this situation, and thus, -1 was used in the
2194         computations as any other value. This change makes the code aware
2195         of the existence of infinites (like when sorting tracks by growth
2196         potential or when initializing the track growth limits).
2197
2198         There was another bug related to infinities. The code that was
2199         replacing a infinite growth limit by a finite one was not using
2200         the proper indexes so the tracks that were being updated were the
2201         wrong ones.
2202
2203         Test: fast/css-grid-layout/grid-content-sized-columns-resolution.html
2204
2205         * rendering/RenderGrid.cpp:
2206         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2207         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2208         (WebCore::sortByGridTrackGrowthPotential):
2209         (WebCore::RenderGrid::distributeSpaceToTracks):
2210
2211 2014-09-26  Lorenzo Tilve  <ltilve@igalia.com>
2212
2213         [GTK] Fix support for the initial-letter CSS property to first-letter
2214         https://bugs.webkit.org/show_bug.cgi?id=137108
2215
2216         Reviewed by Alejandro G. Castro.
2217
2218         Add support for cap-height to the font system.
2219
2220         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
2221         (WebCore::SimpleFontData::platformInit):
2222
2223 2014-09-25  Brian J. Burg  <burg@cs.washington.edu>
2224
2225         Web Inspector: FunctionCall timeline records omit profile data if the debugger has paused
2226         https://bugs.webkit.org/show_bug.cgi?id=136805
2227
2228         Reviewed by Timothy Hatcher.
2229
2230         TimelineAgent was mismanaging its call stack depth counter, which caused nested FunctionCall
2231         records to steal the parent FunctionCall's captured profile in the child's didCallFunction().
2232         Thus, the top FunctionCall node had no profile data and nested FunctionCall nodes each had
2233         their own profiles. The frontend expected just one profile, so it didn't show anything when
2234         it couldn't be found.
2235
2236         Test: inspector/timeline/debugger-paused-while-recording.html
2237
2238         * inspector/InspectorTimelineAgent.cpp: Rename m_recordingProfileDepth to m_callStackDepth.
2239         (WebCore::InspectorTimelineAgent::willCallFunction): Fix the call stack depth management.
2240         (WebCore::InspectorTimelineAgent::didCallFunction):
2241         (WebCore::InspectorTimelineAgent::willEvaluateScript):
2242         (WebCore::InspectorTimelineAgent::didEvaluateScript):
2243         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
2244         * inspector/InspectorTimelineAgent.h:
2245
2246 2014-09-25  Brian J. Burg  <burg@cs.washington.edu>
2247
2248         StorageTracker::deleteOrigin being called off the main thread (ASSERTs in inspector/test-harness-trivially-works.html test)
2249         https://bugs.webkit.org/show_bug.cgi?id=129642
2250
2251         Reviewed by Brady Eidson.
2252
2253         When tearing down the inspector frontend's page, we trigger a threading violation
2254         in StorageAreaSync's final sync code underneath StorageAreaSync::deleteEmptyDatabase().
2255
2256         No new tests. Regression is covered by inspector/test-harness-trivially-works.html.
2257
2258         * storage/StorageAreaSync.cpp:
2259         (WebCore::StorageAreaSync::deleteEmptyDatabase): add a missing callOnMainThread() when
2260         calling StorageTracker::deleteOriginWithIdentifier().
2261
2262 2014-09-25  Sungmann Cho  <sungmann.cho@navercorp.com>
2263
2264         Unprefix CSS cursor values zoom-in and zoom-out.
2265         https://bugs.webkit.org/show_bug.cgi?id=137061
2266
2267         Reviewed by Benjamin Poulain.
2268
2269         This patch unprefixes CSS cursor values zoom-in and zoom-out.
2270         -webkit-zoom-in and -webkit-zoom-out are kept as aliases.
2271         ECursor members use InterCaps with an initial capital letter for now.
2272
2273         * css/CSSParser.cpp:
2274         (WebCore::CSSParser::parseValue):
2275         * css/CSSPrimitiveValueMappings.h:
2276         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2277         (WebCore::CSSPrimitiveValue::operator ECursor):
2278         * css/CSSValueKeywords.in:
2279         * css/DeprecatedStyleBuilder.cpp:
2280         (WebCore::ApplyPropertyCursor::applyValue):
2281         * html/ImageDocument.cpp:
2282         (WebCore::ImageDocument::resizeImageToFit):
2283         (WebCore::ImageDocument::restoreImageSize):
2284         (WebCore::ImageDocument::windowSizeChanged):
2285         * page/EventHandler.cpp:
2286         (WebCore::EventHandler::selectCursor):
2287         * rendering/style/RenderStyle.h:
2288         * rendering/style/RenderStyleConstants.h:
2289
2290 2014-09-25  Brent Fulgham  <bfulgham@apple.com>
2291
2292         [Win] Debug builds of TestWebKitAPI are crashing.
2293         https://bugs.webkit.org/show_bug.cgi?id=133553
2294
2295         Reviewed by Dean Jackson.
2296
2297         Avoid crash on shutdown due to invalid mutex state in the
2298         HashMap debug implementation during a static destruction operation.
2299
2300         * dom/Node.cpp:
2301         (WebCore::ignoreSet): Convert static value into a NeverDestroyed.
2302         (WebCore::Node::trackForDebugging): Use new NeverDestroyed call.
2303         (WebCore::Node::~Node): Ditto.
2304
2305 2014-09-25  Christophe Dumez  <cdumez@apple.com>
2306
2307         Add support for is<SVGDocument>() / downcast<SVGDocument>()
2308         https://bugs.webkit.org/show_bug.cgi?id=137128
2309
2310         Reviewed by Ryosuke Niwa.
2311
2312         Add support for is<SVGDocument>() / downcast<SVGDocument>() by using
2313         the SPECIALIZE_TYPE_TRAITS_*() macro, instead of the
2314         DOCUMENT_TYPE_CASTS() one.
2315
2316         No new tests, no behavior change.
2317
2318         * accessibility/AccessibilityRenderObject.cpp:
2319         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
2320         * html/HTMLFrameOwnerElement.cpp:
2321         (WebCore::HTMLFrameOwnerElement::getSVGDocument):
2322         * page/EventHandler.cpp:
2323         (WebCore::EventHandler::handleMousePressEvent):
2324         (WebCore::EventHandler::handleMouseMoveEvent):
2325         (WebCore::EventHandler::handleMouseReleaseEvent):
2326         * page/Frame.cpp:
2327         (WebCore::Frame::setPageAndTextZoomFactors):
2328         * page/FrameView.cpp:
2329         (WebCore::FrameView::scrollToAnchor):
2330         * svg/SVGDocument.h:
2331         (WebCore::isSVGDocument):
2332         * svg/graphics/SVGImage.cpp:
2333         (WebCore::SVGImage::hasSingleSecurityOrigin):
2334         (WebCore::SVGImage::setContainerSize):
2335         (WebCore::SVGImage::containerSize):
2336         (WebCore::SVGImage::embeddedContentBox):
2337         (WebCore::SVGImage::hasRelativeWidth):
2338         (WebCore::SVGImage::hasRelativeHeight):
2339         (WebCore::SVGImage::computeIntrinsicDimensions):
2340         (WebCore::SVGImage::startAnimation):
2341         (WebCore::SVGImage::stopAnimation):
2342
2343 2014-09-25  Said Abou-Hallawa  <sabouhallawa@apple.com>
2344
2345         Rename CSSKeyframesRule insertRule to appendRule (57910)
2346         https://bugs.webkit.org/show_bug.cgi?id=57910
2347
2348         Reviewed by Dean Jackson.
2349
2350         Tests: animations/change-keyframes.html
2351
2352         * css/WebKitCSSKeyframesRule.h:
2353         (WebCore::WebKitCSSKeyframesRule::appendRule):
2354         -- Make WebKitCSSKeyframesRule::appendRule to be an alias of WebKitCSSKeyframesRule::insertRule()
2355            to conform with CSS specs
2356         * css/WebKitCSSKeyframesRule.idl:
2357         -- Add the new method WebKitCSSKeyframesRule::appendRule() but keep the original method
2358            WebKitCSSKeyframesRule::appendRule() to not break exiting customers' pages.
2359
2360 2014-09-25  Tim Horton  <timothy_horton@apple.com>
2361
2362         Null deref in setStateScrollingNodeSnapOffsetsAsFloat
2363         https://bugs.webkit.org/show_bug.cgi?id=137133
2364         <rdar://problem/18447820>
2365
2366         Reviewed by Beth Dakin.
2367
2368         * page/scrolling/AsyncScrollingCoordinator.cpp:
2369         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
2370         (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode):
2371         Get the deviceScaleFactor from m_page instead of various other places,
2372         because scrolledContentsLayer can be null in the case of non-composited
2373         overflow scroll.
2374
2375 2014-09-25  Christophe Dumez  <cdumez@apple.com>
2376
2377         Use is<HTML*Element>() instead of isHTML*Element() - Part 2
2378         https://bugs.webkit.org/show_bug.cgi?id=137103
2379
2380         Reviewed by Benjamin Poulain.
2381
2382         Use is<HTML*Element>() instead of isHTML*Element() and drop support for
2383         the generated isHTML*Element() macros.
2384
2385         No new tests, no behavior change.
2386
2387         * accessibility/AXObjectCache.cpp:
2388         (WebCore::AXObjectCache::focusedUIElementForPage):
2389         (WebCore::AXObjectCache::getOrCreate):
2390         (WebCore::AXObjectCache::handleAttributeChanged):
2391         (WebCore::AXObjectCache::labelChanged):
2392         * accessibility/AccessibilityListBoxOption.cpp:
2393         (WebCore::AccessibilityListBoxOption::isEnabled):
2394         (WebCore::AccessibilityListBoxOption::stringValue):
2395         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
2396         * accessibility/AccessibilityNodeObject.cpp:
2397         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
2398         (WebCore::AccessibilityNodeObject::isNativeImage):
2399         (WebCore::AccessibilityNodeObject::anchorElement):
2400         (WebCore::AccessibilityNodeObject::alternativeText):
2401         * accessibility/AccessibilityRenderObject.cpp:
2402         (WebCore::AccessibilityRenderObject::anchorElement):
2403         (WebCore::AccessibilityRenderObject::labelElementContainer):
2404         (WebCore::AccessibilityRenderObject::internalLinkElement):
2405         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2406         (WebCore::AccessibilityRenderObject::url):
2407         (WebCore::AccessibilityRenderObject::getDocumentLinks):
2408         (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
2409         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
2410         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2411         (WebCore::AccessibilityRenderObject::stringValueForMSAA):
2412         (WebCore::AccessibilityRenderObject::isLinked):
2413         * accessibility/AccessibilityTable.cpp:
2414         (WebCore::AccessibilityTable::tableElement):
2415         (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
2416         (WebCore::AccessibilityTable::title):
2417         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
2418         (webkitAccessibleTableGetCaption):
2419         * bindings/js/JSHTMLDocumentCustom.cpp:
2420         (WebCore::JSHTMLDocument::nameGetter):
2421         * bindings/js/JSNodeCustom.cpp:
2422         (WebCore::isReachableFromDOM):
2423         * css/CSSDefaultStyleSheets.cpp:
2424         (WebCore::elementCanUseSimpleDefaultStyle):
2425         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
2426         * css/CSSStyleSheet.cpp:
2427         (WebCore::isAcceptableCSSStyleSheetParent):
2428         * css/StyleResolver.cpp:
2429         (WebCore::StyleResolver::adjustRenderStyle):
2430         * css/StyleSheetList.cpp:
2431         (WebCore::StyleSheetList::getNamedItem):
2432         * dom/CurrentScriptIncrementer.h:
2433         (WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):
2434         * dom/DataTransfer.cpp:
2435         (WebCore::DataTransfer::setDragImage):
2436         * dom/DocumentOrderedMap.cpp:
2437         (WebCore::keyMatchesMapName):
2438         (WebCore::keyMatchesLowercasedMapName):
2439         (WebCore::keyMatchesLowercasedUsemap):
2440         (WebCore::keyMatchesLabelForAttribute):
2441         * dom/DocumentStyleSheetCollection.cpp:
2442         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
2443         * dom/Node.cpp:
2444         (WebCore::Node::enclosingLinkEventParentOrSelf):
2445         * dom/Position.cpp:
2446         (WebCore::endsOfNodeAreVisuallyDistinctPositions):
2447         * dom/ScriptElement.cpp:
2448         (WebCore::toScriptElementIfPossible):
2449         * dom/VisitedLinkState.cpp:
2450         (WebCore::linkHashForElement):
2451         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
2452         * dom/make_names.pl:
2453         (printTypeHelpers):
2454         * editing/DeleteSelectionCommand.cpp:
2455         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
2456         * editing/Editor.cpp:
2457         (WebCore::imageElementFromImageDocument):
2458         * editing/FrameSelection.cpp:
2459         (WebCore::scanForForm):
2460         * editing/InsertLineBreakCommand.cpp:
2461         (WebCore::InsertLineBreakCommand::doApply):
2462         * editing/InsertParagraphSeparatorCommand.cpp:
2463         (WebCore::InsertParagraphSeparatorCommand::doApply):
2464         * editing/ReplaceSelectionCommand.cpp:
2465         (WebCore::removeHeadContents):
2466         * editing/cocoa/HTMLConverter.mm:
2467         (HTMLConverter::_processElement):
2468         * editing/htmlediting.cpp:
2469         (WebCore::isNonTableCellHTMLBlockElement):
2470         * editing/markup.cpp:
2471         (WebCore::ancestorToRetainStructureAndAppearanceForBlock):
2472         (WebCore::collectElementsToRemoveFromFragment):
2473         * html/FTPDirectoryDocument.cpp:
2474         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
2475         * html/FormAssociatedElement.cpp:
2476         (WebCore::FormAssociatedElement::findAssociatedForm):
2477         * html/HTMLAnchorElement.cpp:
2478         (WebCore::appendServerMapMousePosition):
2479         * html/HTMLAreaElement.cpp:
2480         (WebCore::HTMLAreaElement::imageElement):
2481         * html/HTMLDocument.cpp:
2482         (WebCore::HTMLDocument::bgColor):
2483         (WebCore::HTMLDocument::setBgColor):
2484         (WebCore::HTMLDocument::fgColor):
2485         (WebCore::HTMLDocument::setFgColor):
2486         (WebCore::HTMLDocument::alinkColor):
2487         (WebCore::HTMLDocument::setAlinkColor):
2488         (WebCore::HTMLDocument::linkColor):
2489         (WebCore::HTMLDocument::setLinkColor):
2490         (WebCore::HTMLDocument::vlinkColor):
2491         (WebCore::HTMLDocument::setVlinkColor):
2492         (WebCore::HTMLDocument::isFrameSet):
2493         * html/HTMLElement.cpp:
2494         (WebCore::HTMLElement::setInnerHTML):
2495         * html/HTMLFieldSetElement.cpp:
2496         (WebCore::updateFromControlElementsAncestorDisabledStateUnder):
2497         (WebCore::HTMLFieldSetElement::disabledStateChanged):
2498         * html/HTMLFormControlElement.cpp:
2499         (WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor):
2500         * html/HTMLFormControlsCollection.cpp:
2501         (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
2502         (WebCore::HTMLFormControlsCollection::formControlElements):
2503         (WebCore::HTMLFormControlsCollection::formImageElements):
2504         (WebCore::HTMLFormControlsCollection::namedItem):
2505         (WebCore::HTMLFormControlsCollection::updateNamedElementCache):
2506         * html/HTMLFormElement.cpp:
2507         (WebCore::HTMLFormElement::rendererIsNeeded):
2508         * html/HTMLFrameElementBase.h:
2509         (WebCore::isHTMLFrameElementBase):
2510         * html/HTMLImageLoader.cpp:
2511         (WebCore::HTMLImageLoader::dispatchLoadEvent):
2512         * html/HTMLInputElement.cpp:
2513         (WebCore::HTMLInputElement::dataList):
2514         * html/HTMLLegendElement.cpp:
2515         (WebCore::HTMLLegendElement::virtualForm):
2516         * html/HTMLMediaElement.cpp:
2517         (WebCore::HTMLMediaElement::parseAttribute):
2518         * html/HTMLNameCollection.cpp:
2519         (WebCore::WindowNameCollection::elementMatchesIfNameAttributeMatch):
2520         (WebCore::DocumentNameCollection::elementMatches):
2521         * html/HTMLOptionElement.cpp:
2522         (WebCore::HTMLOptionElement::ownerDataListElement):
2523         (WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel):
2524         (WebCore::HTMLOptionElement::isDisabledFormControl):
2525         * html/HTMLSelectElement.cpp:
2526         (WebCore::HTMLSelectElement::recalcListItems):
2527         * html/HTMLTableElement.cpp:
2528         (WebCore::HTMLTableElement::caption):
2529         * html/HTMLTablePartElement.cpp:
2530         (WebCore::HTMLTablePartElement::findParentTable):
2531         * html/HTMLTableRowElement.cpp:
2532         (WebCore::HTMLTableRowElement::rowIndex):
2533         * html/HTMLTableRowsCollection.cpp:
2534         (WebCore::HTMLTableRowsCollection::rowAfter):
2535         (WebCore::HTMLTableRowsCollection::lastRow):
2536         * html/HTMLTagNames.in:
2537         * html/LabelsNodeList.cpp:
2538         (WebCore::LabelsNodeList::elementMatches):
2539         * html/MediaDocument.cpp:
2540         (WebCore::descendentVideoElement):
2541         (WebCore::ancestorVideoElement):
2542         * html/RadioInputType.cpp:
2543         (WebCore::RadioInputType::handleKeydownEvent):
2544         * html/RadioNodeList.cpp:
2545         (WebCore::RadioNodeList::RadioNodeList):
2546         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
2547         * html/parser/HTMLConstructionSite.cpp:
2548         (WebCore::hasImpliedEndTag):
2549         (WebCore::insert):
2550         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
2551         (WebCore::HTMLConstructionSite::insertTextNode):
2552         (WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode):
2553         * html/parser/HTMLElementStack.cpp:
2554         (WebCore::HTMLNames::isScopeMarker):
2555         (WebCore::HTMLNames::isTableScopeMarker):
2556         * html/parser/HTMLTreeBuilder.cpp:
2557         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2558         (WebCore::HTMLTreeBuilder::processStartTag):
2559         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
2560         (WebCore::HTMLTreeBuilder::processEndTag):
2561         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
2562         * inspector/InspectorDOMAgent.cpp:
2563         (WebCore::InspectorDOMAgent::buildObjectForNode):
2564         * inspector/InspectorStyleSheet.cpp:
2565         (WebCore::InspectorStyleSheet::inlineStyleSheetText):
2566         * page/DragController.cpp:
2567         (WebCore::DragController::draggableElement):
2568         * page/FocusController.cpp:
2569         (WebCore::FocusController::advanceFocusDirectionally):
2570         * page/PageSerializer.cpp:
2571         (WebCore::PageSerializer::serializeFrame):
2572         * page/SpatialNavigation.cpp:
2573         (WebCore::FocusCandidate::FocusCandidate):
2574         (WebCore::areElementsOnSameLine):
2575         * page/ios/FrameIOS.mm:
2576         (WebCore::ancestorRespondingToClickEvents):
2577         * rendering/HitTestResult.cpp:
2578         (WebCore::HitTestResult::altDisplayString):
2579         (WebCore::HitTestResult::mediaSupportsFullscreen):
2580         (WebCore::HitTestResult::mediaElement):
2581         (WebCore::HitTestResult::enterFullscreenForVideo):
2582         (WebCore::HitTestResult::mediaIsVideo):
2583         (WebCore::HitTestResult::isLiveLink):
2584         * rendering/RenderCounter.cpp:
2585         (WebCore::planCounter):
2586         * rendering/RenderImage.cpp:
2587         (WebCore::RenderImage::RenderImage):
2588         (WebCore::RenderImage::paintAreaElementFocusRing):
2589         (WebCore::RenderImage::paintIntoRect):
2590         (WebCore::RenderImage::imageMap):
2591         (WebCore::RenderImage::updateAltText):
2592         * rendering/RenderListBox.cpp:
2593         (WebCore::RenderListBox::updateFromElement):
2594         (WebCore::RenderListBox::paintItemForeground):
2595         * rendering/RenderMarquee.cpp:
2596         (WebCore::RenderMarquee::marqueeSpeed):
2597         * rendering/RenderMenuList.cpp:
2598         (RenderMenuList::itemText):
2599         (RenderMenuList::itemIsEnabled):
2600         (RenderMenuList::itemIsLabel):
2601         * rendering/RenderMeter.cpp:
2602         (WebCore::RenderMeter::meterElement):
2603         * rendering/RenderObject.cpp:
2604         (WebCore::RenderObject::shouldRespectImageOrientation):
2605         (WebCore::RenderObject::getTextDecorationColors):
2606         (WebCore::RenderObject::offsetParent):
2607         * rendering/RenderProgress.cpp:
2608         (WebCore::RenderProgress::progressElement):
2609         * rendering/RenderTable.cpp:
2610         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
2611         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
2612         * svg/graphics/SVGImageCache.cpp:
2613         (WebCore::SVGImageCache::imageForRenderer):
2614         * testing/Internals.cpp:
2615         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
2616         * xml/parser/XMLDocumentParserLibxml2.cpp:
2617         (WebCore::XMLDocumentParser::startElementNs):
2618
2619 2014-09-25  Brian J. Burg  <burg@cs.washington.edu>
2620
2621         Web Replay: Check event loop input extents during replay too
2622         https://bugs.webkit.org/show_bug.cgi?id=136316
2623
2624         Reviewed by Timothy Hatcher.
2625
2626         Sometimes we see different nondeterminism during capture and replay
2627         executions, so we should support determinism checks during replay too.
2628
2629         Move the withinEventLoopInputExtent flag to the base class.
2630
2631         No new tests, no behavior changed.
2632
2633         * replay/CapturingInputCursor.cpp:
2634         (WebCore::CapturingInputCursor::CapturingInputCursor):
2635         (WebCore::CapturingInputCursor::setWithinEventLoopInputExtent): Deleted.
2636         * replay/CapturingInputCursor.h:
2637         * replay/EventLoopInput.cpp:
2638         (WebCore::EventLoopInputExtent::EventLoopInputExtent):
2639         (WebCore::EventLoopInputExtent::~EventLoopInputExtent):
2640         Make m_cursor a pointer and add a new constructor so we can conditionally
2641         enter event loop input extents. This is useful in some network replay situations.
2642
2643         * replay/EventLoopInput.h:
2644         * replay/ReplayController.cpp:
2645         (WebCore::ReplayController::willDispatchEvent): Expand the assertion to include replaying.
2646
2647 2014-09-25  Jeremy Jones  <jeremyj@apple.com>
2648
2649         Race in ref pointer for WebVideoFullscreenInterfaceAVKit.
2650         https://bugs.webkit.org/show_bug.cgi?id=137123
2651
2652         Reviewed by Eric Carlson.
2653
2654         Add WebThreadRun to prevent race with RefPtr of WebVideoFullscreenInterfaceAVKit.
2655
2656         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2657         (-[WebVideoFullscreenController didSetupFullscreen]): add WebThreadRun
2658         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2659         (WebVideoFullscreenInterfaceAVKit::setDuration): ditto
2660         (WebVideoFullscreenInterfaceAVKit::setCurrentTime): ditto
2661         (WebVideoFullscreenInterfaceAVKit::setRate): ditto
2662         (WebVideoFullscreenInterfaceAVKit::setVideoDimensions): ditto
2663         (WebVideoFullscreenInterfaceAVKit::setSeekableRanges): ditto
2664         (WebVideoFullscreenInterfaceAVKit::setAudioMediaSelectionOptions): ditto
2665         (WebVideoFullscreenInterfaceAVKit::setLegibleMediaSelectionOptions): ditto
2666         (WebVideoFullscreenInterfaceAVKit::setExternalPlayback): ditto
2667         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): ditto
2668         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): ditto
2669         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): ditto
2670         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): ditto
2671         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto
2672
2673 2014-09-25  Chris Dumez  <cdumez@apple.com>
2674
2675         Unreviewed iOS build fix after r173944.
2676
2677         Add a missing header include.
2678         See <rdar://problem/18454708> for more details.
2679
2680         * html/parser/HTMLTreeBuilder.cpp:
2681
2682 2014-09-25  Christophe Dumez  <cdumez@apple.com>
2683
2684         Stop using legacy NODE_TYPE_CASTS() macro in svg/
2685         https://bugs.webkit.org/show_bug.cgi?id=137106
2686
2687         Reviewed by Ryosuke Niwa.
2688
2689         Stop using legacy NODE_TYPE_CASTS() in svg/ and use the new
2690         SPECIALIZE_TYPE_TRAITS_*() macro instead so that is<>() / downcast<>()
2691         can be used for those types.
2692
2693         No new tests, no behavior change.
2694
2695         * css/CSSComputedStyleDeclaration.cpp:
2696         (WebCore::ComputedStyleExtractor::propertyValue):
2697         * dom/Element.h:
2698         * dom/Node.h:
2699         (WebCore::is):
2700         * dom/make_names.pl:
2701         (printTypeHelpers):
2702         * html/HTMLElement.h:
2703         * html/HTMLMediaElement.h:
2704         * html/HTMLPlugInImageElement.h:
2705         * html/LabelableElement.h:
2706         * mathml/MathMLElement.h:
2707         Rename NodeTypeCastTraits::is() to NodeTypeCastTraits::isType() to
2708         avoid naming conflict with the global is<>() function. This was an
2709         issue when is<>() was called from one of the template specializations.
2710
2711         * rendering/svg/RenderSVGBlock.h:
2712         (WebCore::RenderSVGBlock::graphicsElement):
2713         * rendering/svg/RenderSVGGradientStop.cpp:
2714         (WebCore::RenderSVGGradientStop::gradientElement):
2715         * rendering/svg/RenderSVGInline.h:
2716         (WebCore::RenderSVGInline::graphicsElement):
2717         * rendering/svg/RenderSVGResourceClipper.cpp:
2718         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
2719         * rendering/svg/RenderSVGResourceContainer.cpp:
2720         (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
2721         * rendering/svg/RenderSVGShape.h:
2722         (WebCore::RenderSVGShape::graphicsElement):
2723         * rendering/svg/RenderSVGTransformableContainer.h:
2724         * rendering/svg/SVGRenderSupport.cpp:
2725         (WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending):
2726         * rendering/svg/SVGRenderTreeAsText.cpp:
2727         (WebCore::operator<<):
2728         * rendering/svg/SVGRenderingContext.cpp:
2729         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2730         * rendering/svg/SVGResources.cpp:
2731         (WebCore::targetReferenceFromResource):
2732         * svg/SVGAElement.cpp:
2733         (WebCore::SVGAElement::defaultEventHandler):
2734         * svg/SVGAnimateElement.cpp:
2735         (WebCore::SVGAnimateElement::calculateAnimatedValue):
2736         (WebCore::isSVGAnimateElement): Deleted.
2737         Use is<>() / downcast<>() where appropriate.
2738
2739         * svg/SVGAnimateElement.h:
2740         (WebCore::isSVGAnimateElement):
2741         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and add
2742         overload for isSVGAnimateElement() taking an SVGElement in argument to
2743         bypass the is<SVGElement>() check when the input type is an SVGElement.
2744
2745         * svg/SVGAnimationElement.cpp:
2746         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
2747         * svg/SVGElement.cpp:
2748         (WebCore::SVGElement::getBoundingBox):
2749         Use is<>() / downcast<>() where appropriate.
2750
2751         * svg/SVGElement.h:
2752         * svg/SVGFilterPrimitiveStandardAttributes.h:
2753         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and drop
2754         the pre-existing NodeTypeCastTraits template specialization as it is
2755         now generated by the macro.
2756
2757         * svg/SVGGradientElement.cpp:
2758         (WebCore::isSVGGradientElement): Deleted.
2759         * svg/SVGGradientElement.h:
2760         (WebCore::isSVGGradientElement):
2761         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and add
2762         overload for isSVGAnimateElement() taking an SVGElement in argument to
2763         bypass the is<SVGElement>() check when the input type is an SVGElement.
2764
2765         * svg/SVGGraphicsElement.h:
2766         (WebCore::isSVGGraphicsElement):
2767         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS().
2768
2769         * svg/SVGLinearGradientElement.cpp:
2770         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
2771         * svg/SVGLocatable.cpp:
2772         (WebCore::SVGLocatable::getTransformToElement):
2773         * svg/SVGPolyElement.cpp:
2774         (WebCore::SVGPolyElement::synchronizePoints):
2775         (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
2776         (WebCore::isSVGPolyElement): Deleted.
2777         Use is<>() / downcast<>() where appropriate.
2778
2779         * svg/SVGPolyElement.h:
2780         (WebCore::isSVGPolyElement):
2781         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and add
2782         overload for isPolyElement() taking an SVGElement in argument to
2783         bypass the is<SVGElement>() check when the input type is an SVGElement.
2784
2785         * svg/SVGRadialGradientElement.cpp:
2786         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
2787         * svg/SVGTextContentElement.cpp:
2788         (WebCore::SVGTextContentElement::synchronizeTextLength):
2789         (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
2790         (WebCore::SVGTextContentElement::elementFromRenderer):
2791         Use is<>() / downcast<>() where appropriate.
2792
2793         * svg/SVGTextContentElement.h:
2794         WebCore::isSVGTextContentElement):
2795         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS().
2796
2797         * svg/SVGUseElement.cpp:
2798         (WebCore::SVGUseElement::toClipPath):
2799         Use is<>() / downcast<>() where appropriate. Also use tighter typing
2800         for value returned by shadowTreeElement().
2801
2802         * svg/animation/SVGSMILElement.cpp:
2803         (WebCore::SVGSMILElement::buildPendingResource):
2804         (WebCore::SVGSMILElement::connectConditions):
2805         (WebCore::SVGSMILElement::disconnectConditions):
2806         Use is<>() / downcast<>() where appropriate.
2807
2808         * svg/animation/SVGSMILElement.h:
2809         (WebCore::isSVGSMILElement):
2810         Use SPECIALIZE_TYPE_TRAITS_*() instead of NODE_TYPE_CASTS() and drop
2811         the pre-existing NodeTypeCastTraits template specialization as it is
2812         now generated by the macro.
2813
2814 2014-09-25  Brent Fulgham  <bfulgham@apple.com>
2815
2816         Minor refactoring to mediaType/presentationType
2817         https://bugs.webkit.org/show_bug.cgi?id=137085
2818
2819         Reviewed by Eric Carlson.
2820
2821         Add overloads for presentationType for the audio and video
2822         HTML elements so that we don't have to explicity check the
2823         tag name (via string comparison) to identify the type of
2824         element.
2825
2826         No new tests. Should create no change in behavior.
2827
2828         * html/HTMLAudioElement.h: Overload presentationType to always
2829         indicate audio type.
2830         * html/HTMLMediaElement.cpp:
2831         (WebCore::HTMLMediaElement::mediaType): Use the presentationType
2832         method implementation, rather than duplicating that code.
2833         * html/HTMLVideoElement.h: Overload presentationType to always
2834         return video type.
2835
2836 2014-09-25  Javier Fernandez  <jfernandez@igalia.com>
2837
2838         ASSERTION FAILED: columnCount in WebCore::CSSParser::parseGridTemplateAreasRow
2839         https://bugs.webkit.org/show_bug.cgi?id=136945
2840
2841         Reviewed by Sergio Villar Senin.
2842
2843         Checking out whether the grid-template-areas value contains a white-space only
2844         string, which is not valid as it does not produce a cell token.
2845
2846         Test: fast/css-grid-layout/grid-template-areas-empty-string-crash.html
2847
2848         * css/CSSParser.cpp:
2849         (WebCore::CSSParser::parseGridTemplateAreasRow):
2850
2851 2014-09-25  Csaba Osztrogon√°c  <ossy@webkit.org>
2852
2853         Remove WinCE port from trunk
2854         https://bugs.webkit.org/show_bug.cgi?id=136951
2855
2856         Reviewed by Alex Christensen.
2857
2858         * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp:
2859         * PlatformWinCE.cmake: Removed.
2860         * accessibility/AXObjectCache.cpp:
2861         * editing/FrameSelection.cpp:
2862         (WebCore::FrameSelection::modifyMovingRight):
2863         * loader/icon/wince/IconDatabaseWinCE.cpp: Removed.
2864         * page/EventHandler.cpp:
2865         (WebCore::EventHandler::sendContextMenuEventForKey):
2866         * page/Settings.cpp:
2867         * page/win/EventHandlerWin.cpp:
2868         (WebCore::EventHandler::createDraggingDataTransfer):
2869         * platform/ContextMenu.h:
2870         * platform/DragImage.cpp:
2871         * platform/FileSystem.h:
2872         * platform/graphics/BitmapImage.cpp:
2873         (WebCore::BitmapImage::mayFillWithSolidColor):
2874         * platform/graphics/FontGlyphs.cpp:
2875         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
2876         * platform/graphics/FontPlatformData.h:
2877         * platform/graphics/ImageBufferData.h:
2878         * platform/graphics/MediaPlayer.cpp:
2879         * platform/graphics/SimpleFontData.h:
2880         * platform/graphics/opentype/OpenTypeUtilities.cpp:
2881         (WebCore::renameAndActivateFont):
2882         * platform/graphics/opentype/OpenTypeUtilities.h:
2883         * platform/graphics/win/DIBPixelData.cpp:
2884         (WebCore::DIBPixelData::setRGBABitmapAlpha):
2885         * platform/graphics/win/GDIExtras.cpp: Removed.
2886         * platform/graphics/win/GDIExtras.h:
2887         (WebCore::hasAlphaBlendSupport):
2888         (WebCore::alphaBlendIfSupported):
2889         * platform/graphics/win/IconWin.cpp:
2890         (WebCore::Icon::createIconForFiles):
2891         (WebCore::Icon::paint):
2892         * platform/graphics/win/SimpleFontDataWin.cpp:
2893         (WebCore::SimpleFontData::initGDIFont):
2894         (WebCore::SimpleFontData::platformDestroy):
2895         (WebCore::SimpleFontData::boundsForGDIGlyph):
2896         (WebCore::SimpleFontData::widthForGDIGlyph):
2897         (WebCore::SimpleFontData::scriptFontProperties):
2898         * platform/graphics/wince/FontCacheWinCE.cpp: Removed.
2899         * platform/graphics/wince/FontCustomPlatformData.cpp: Removed.
2900         * platform/graphics/wince/FontCustomPlatformData.h: Removed.
2901         * platform/graphics/wince/FontPlatformData.cpp: Removed.
2902         * platform/graphics/wince/FontPlatformData.h: Removed.
2903         * platform/graphics/wince/FontWinCE.cpp: Removed.
2904         * platform/graphics/wince/GlyphPageTreeNodeWinCE.cpp: Removed.
2905         * platform/graphics/wince/GradientWinCE.cpp: Removed.
2906         * platform/graphics/wince/GraphicsContextWinCE.cpp: Removed.
2907         * platform/graphics/wince/ImageBufferDataWince.h: Removed.
2908         * platform/graphics/wince/ImageBufferWinCE.cpp: Removed.
2909         * platform/graphics/wince/ImageWinCE.cpp: Removed.
2910         * platform/graphics/wince/MediaPlayerPrivateWinCE.h: Removed.
2911         * platform/graphics/wince/MediaPlayerProxy.cpp: Removed.
2912         * platform/graphics/wince/MediaPlayerProxy.h: Removed.
2913         * platform/graphics/wince/PathWinCE.cpp: Removed.
2914         * platform/graphics/wince/PlatformPathWinCE.cpp: Removed.
2915         * platform/graphics/wince/PlatformPathWinCE.h: Removed.
2916         * platform/graphics/wince/SharedBitmap.cpp: Removed.
2917         * platform/graphics/wince/SharedBitmap.h: Removed.
2918         * platform/graphics/wince/SimpleFontDataWinCE.cpp: Removed.
2919         * platform/graphics/wince/WinCEGraphicsExtras.h: Removed.
2920         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
2921         * platform/network/win/NetworkStateNotifierWin.cpp:
2922         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
2923         * platform/win/COMPtr.h:
2924         * platform/win/ClipboardUtilitiesWin.cpp:
2925         * platform/win/ContextMenuItemWin.cpp:
2926         * platform/win/ContextMenuWin.cpp:
2927         (WebCore::ContextMenu::getContextMenuItems):
2928         (WebCore::ContextMenu::createPlatformContextMenuFromItems):
2929         * platform/win/DragImageWin.cpp:
2930         (WebCore::dragLabelFont):
2931         * platform/win/FileSystemWin.cpp:
2932         (WebCore::pathByAppendingComponent):
2933         (WebCore::pathGetFileName):
2934         (WebCore::storageDirectory):
2935         * platform/win/LoggingWin.cpp:
2936         (WebCore::logLevelString):
2937         * platform/win/PasteboardWin.cpp:
2938         (WebCore::PasteboardOwnerWndProc):
2939         (WebCore::Pasteboard::createForCopyAndPaste):
2940         (WebCore::pathRemoveBadFSCharacters):
2941         (WebCore::filesystemPathFromUrlOrTitle):
2942         (WebCore::createGlobalHDropContent):
2943         * platform/win/PlatformMouseEventWin.cpp:
2944         (WebCore::messageToEventType):
2945         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2946         * platform/win/PlatformScreenWin.cpp:
2947         (WebCore::deviceInfoForWidget):
2948         (WebCore::screenIsMonochrome):
2949         * platform/win/PopupMenuWin.cpp:
2950         (WebCore::PopupMenuWin::show):
2951         (WebCore::PopupMenuWin::paint):
2952         (WebCore::PopupMenuWin::registerClass):
2953         (WebCore::PopupMenuWin::wndProc):
2954         * platform/win/ScrollbarThemeWin.cpp:
2955         (WebCore::ScrollbarThemeWin::paintButton):
2956         * platform/win/SharedBufferWin.cpp:
2957         * platform/win/SharedTimerWin.cpp:
2958         (WebCore::TimerWindowWndProc):
2959         (WebCore::initializeOffScreenTimerWindow):
2960         (WebCore::queueTimerProc):
2961         (WebCore::setSharedTimerFireInterval):
2962         (WebCore::stopSharedTimer):
2963         * platform/win/SoftLinking.h:
2964         * platform/win/SystemInfo.cpp:
2965         (WebCore::windowsVersion):
2966         (WebCore::processorArchitecture):
2967         (WebCore::architectureTokenForUAString):
2968         * platform/win/WCDataObject.cpp:
2969         (WebCore::WCDataObject::CopyMedium):
2970         * plugins/PluginDatabase.cpp:
2971         * plugins/PluginView.cpp:
2972         (WebCore::PluginView::stop):
2973         * plugins/PluginViewNone.cpp:
2974         * plugins/win/PluginDatabaseWin.cpp:
2975         (WebCore::addWindowsMediaPlayerPluginDirectory):
2976         (WebCore::addMacromediaPluginDirectories):
2977         * plugins/win/PluginPackageWin.cpp:
2978         (WebCore::PluginPackage::load):
2979         * plugins/win/PluginViewWin.cpp:
2980         (WebCore::setUpOffscreenPaintingHooks):
2981         (WebCore::registerPluginView):
2982         (WebCore::PluginView::wndProc):
2983         (WebCore::PluginView::updatePluginWidget):
2984         (WebCore::PluginView::paintIntoTransformedContext):
2985         (WebCore::PluginView::paint):
2986         (WebCore::PluginView::handleMouseEvent):
2987         (WebCore::PluginView::setParent):
2988         (WebCore::PluginView::setNPWindowRect):
2989         (WebCore::PluginView::platformStart):
2990         * rendering/RenderThemeWinCE.cpp: Removed.
2991         * rendering/RenderThemeWinCE.h: Removed.
2992         * storage/wince/DatabaseThreadWinCE.cpp: Removed.
2993         * storage/wince/DatabaseThreadWinCE.h: Removed.
2994         * storage/wince/StorageThreadWinCE.cpp: Removed.
2995         * storage/wince/StorageThreadWinCE.h: Removed.
2996
2997 2014-09-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2998
2999         Unreviewed. Fix GTK+ build after r173944.
3000
3001         * page/ContextMenuController.cpp: Add missing include.
3002
3003 2014-09-24  Christophe Dumez  <cdumez@apple.com>
3004
3005         Use tighter typing for render objects in RenderGeometryMap
3006         https://bugs.webkit.org/show_bug.cgi?id=137102
3007
3008         Reviewed by Ryosuke Niwa.
3009
3010         Use tighter typing for render objects in RenderGeometryMap for clarity
3011         and efficiency.
3012
3013         In particular, using RenderElement type instead of RenderObject
3014         in canMapBetweenRenderers() allows us to call the faster
3015         RenderElement::style() instead of RenderObject::style().
3016
3017         No new tests, no behavior change.
3018
3019         * rendering/RenderGeometryMap.cpp:
3020         (WebCore::canMapBetweenRenderers):
3021         (WebCore::RenderGeometryMap::pushMappingsToAncestor):
3022
3023 2014-09-24  Christophe Dumez  <cdumez@apple.com>
3024
3025         Add initial is<>() / downcast<>() support for any type of Nodes
3026         https://bugs.webkit.org/show_bug.cgi?id=137056
3027
3028         Reviewed by Benjamin Poulain.
3029
3030         Add initial is<>() / downcast<>() support for any type of Nodes, not
3031         just Elements by:
3032         - Moving the is<>() / downcast<>() declarations from Element.h to
3033           Node.h
3034         - Introducing a SPECIALIZE_TYPE_TRAITS_*() macro that generates the
3035           needed template specializations for is<>() / downcast<>() to work.
3036           This macro will replace NODE_TYPE_CASTS() entirely once the code base
3037           is fully ported.
3038
3039         This patch makes use of SPECIALIZE_TYPE_TRAITS_*() macro for
3040         HTMLFormControlElement, that is an HTMLElement for which the template
3041         specializations cannot be automatically generated because it requires
3042         special handling.
3043
3044         This patch also makes use of SPECIALIZE_TYPE_TRAITS_*() macro for
3045         DocumentFragment to show that it can be used for non-Element Nodes.
3046
3047         No new tests, no behavior change.
3048
3049         * accessibility/AccessibilityNodeObject.cpp:
3050         (WebCore::AccessibilityNodeObject::isReadOnly):
3051         (WebCore::AccessibilityNodeObject::isRequired):
3052         (WebCore::AccessibilityNodeObject::isControl):
3053         * css/SelectorCheckerTestFunctions.h:
3054         (WebCore::isAutofilled):
3055         (WebCore::isDisabled):
3056         (WebCore::isEnabled):
3057         * css/StyleResolver.cpp:
3058         (WebCore::StyleResolver::canShareStyleWithElement):
3059         (WebCore::StyleResolver::adjustRenderStyle):
3060         * dom/Document.cpp:
3061         (WebCore::Document::importNode):
3062         (WebCore::Document::setFocusedElement):
3063         * dom/DocumentFragment.h:
3064         (WebCore::isDocumentFragment):
3065         * dom/Element.cpp:
3066         (WebCore::Element::focus):
3067         * dom/Element.h:
3068         (WebCore::is): Deleted.
3069         (WebCore::downcast): Deleted.
3070         * dom/Node.h:
3071         (WebCore::is):
3072         (WebCore::downcast):
3073         * dom/make_names.pl:
3074         (printTypeHelpers):
3075         * editing/FrameSelection.cpp:
3076         (WebCore::scanForForm):
3077         * editing/TextIterator.cpp:
3078         (WebCore::isRendererReplacedElement):
3079         * html/FormAssociatedElement.h:
3080         * html/HTMLElement.h:
3081         * html/HTMLFieldSetElement.cpp:
3082         (WebCore::updateFromControlElementsAncestorDisabledStateUnder):
3083         (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
3084         * html/HTMLFormControlElement.cpp:
3085         (WebCore::HTMLFormControlElement::enclosingFormControlElement):
3086         * html/HTMLFormControlElement.h:
3087         (WebCore::isHTMLFormControlElement):
3088         * html/HTMLFormElement.cpp:
3089         (WebCore::HTMLFormElement::submitImplicitly):
3090         (WebCore::submitElementFromEvent):
3091         (WebCore::HTMLFormElement::validateInteractively):
3092         (WebCore::HTMLFormElement::submit):
3093         (WebCore::HTMLFormElement::reset):
3094         (WebCore::HTMLFormElement::formElementIndex):
3095         (WebCore::HTMLFormElement::defaultButton):
3096         (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
3097         (WebCore::HTMLFormElement::documentDidResumeFromPageCache):
3098         * html/HTMLMediaElement.h:
3099         * html/HTMLPlugInImageElement.h:
3100         * html/HTMLSummaryElement.cpp:
3101         (WebCore::isClickableControl):
3102         * html/LabelableElement.h:
3103         * html/RadioNodeList.cpp:
3104         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
3105         (WebCore::RadioNodeList::elementMatches):
3106         * html/parser/HTMLConstructionSite.cpp:
3107         (WebCore::HTMLConstructionSite::findFosterSite):
3108         * html/parser/HTMLTreeBuilder.cpp:
3109         (WebCore::disallowTelephoneNumberParsing):
3110         * loader/FormSubmission.cpp:
3111         (WebCore::FormSubmission::create):
3112         * mathml/MathMLElement.h:
3113         * page/ContextMenuController.cpp:
3114         (WebCore::ContextMenuController::populate):
3115         * page/Frame.cpp:
3116         (WebCore::Frame::searchForLabelsBeforeElement):
3117         * rendering/RenderButton.cpp:
3118         (WebCore::RenderButton::formControlElement):
3119         * rendering/RenderLayer.cpp:
3120         (WebCore::RenderLayer::resize):
3121         * rendering/RenderTheme.cpp:
3122         (WebCore::RenderTheme::isReadOnlyControl):
3123         * svg/SVGElement.h:
3124         * svg/SVGFilterPrimitiveStandardAttributes.h:
3125         * svg/animation/SVGSMILElement.h:
3126
3127 2014-09-24  Darin Adler  <darin@apple.com>
3128
3129         Old Turkic characters behave as left-to-right instead of right-to-left, because they are encoded as surrogate pairs.
3130         https://bugs.webkit.org/show_bug.cgi?id=70029
3131
3132         Reviewed by Dan Bernstein.
3133
3134         Test: fast/text/international/old-turkic-direction.html
3135
3136         * CMakeLists.txt: Added InlineIterator.cpp.
3137         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
3138         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3139         * WebCore.xcodeproj/project.pbxproj: Ditto.
3140         * rendering/RenderingAllInOne.cpp: Ditto.
3141
3142         * rendering/InlineIterator.cpp: Added.
3143         (WebCore::InlineIterator::surrogateTextDirection): New function used to compute the direction
3144         when a surrogate pair is involved.
3145         * rendering/InlineIterator.h: Made the characterAt function private.
3146         (WebCore::InlineIterator::previousInSameNode): Took out unneeded range check. A zero will underflow
3147         and become a large number and the characterAt function will return 0 in that case.
3148         (WebCore::InlineIterator::direction): Added code to check U16_IS_SINGLE before calling
3149         u_charDirection, and call surrogateTextDirection instead.
3150
3151 2014-09-24  Christophe Dumez  <cdumez@apple.com>
3152
3153         Unreviewed build fix after r173941.
3154
3155         Rename shadow to m_shadow.
3156
3157         * rendering/TextPainter.h:
3158         (WebCore::ShadowApplier::shadowIsCompletelyCoveredByText):
3159
3160 2014-09-22  Myles C. Maxfield  <mmaxfield@apple.com>
3161
3162         REGRESSION: Text with a zero offset, zero blur shadow vanishes
3163         https://bugs.webkit.org/show_bug.cgi?id=136801
3164
3165         Reviewed by Darin Adler.
3166
3167         This patch performs some cleanup regarding TextPainter's shadow logic and handles an
3168         additional case of empty shadows. Previously, there was tight coupling between
3169         applyShadowToGraphicalContext() and paintTextWithShadows(), as they both used a
3170         collection of variables to determine how shadows are to be drawn. This complexity has
3171         been moved into a helper class, ShadowApplier, which performs what
3172         applyShadowToGraphicsContext() used to do, and cleans up correctly in its destructor.
3173         This removes the tight coupling mentioned earlier.
3174
3175         Test: fast/text/empty-shadow.html
3176
3177         * rendering/InlineTextBox.cpp:
3178         (WebCore::InlineTextBox::applyShadowToGraphicsContext): Moved to ShadowApplier.
3179         * rendering/InlineTextBox.h: Deleted applyShadowToGraphicsContext signature.
3180         * rendering/TextPainter.cpp:
3181         (WebCore::ShadowApplier::ShadowApplier): Perform the contents of applyShadowToGraphicsContext()
3182         (WebCore::ShadowApplier::~ShadowApplier): Undo the work done previously
3183         (WebCore::paintTextWithShadows): Create a ShadowApplier to do the relevant shadow work. In addition,
3184         refactor some boolean flags to more meaningful ones with relation to the computation at hand.
3185         (WebCore::isEmptyShadow): Moved to TextPainter.h, named shadowIsCompletelyCoveredByText()
3186         * rendering/TextPainter.h:
3187         (WebCore::ShadowApplier::ShadowApplier): Moved from InlineTextBox::applyShadowToGraphicsContext().
3188         (WebCore::ShadowApplier::extraOffset): Getter.
3189         (WebCore::ShadowApplier::~ShadowApplier): Moved from TextPainter::paintTextWithShadows().
3190         (WebCore::isLastShadowIteration): Helper function.
3191         (WebCore::shadowIsCompletelyCoveredByText): Determines whether or not we should not draw the shadow.
3192         * rendering/svg/SVGInlineTextBox.cpp:
3193         (WebCore::SVGInlineTextBox::paintTextWithShadows): Update to use ShadowApplier.
3194
3195 2014-09-24  Brian J. Burg  <burg@cs.washington.edu>
3196
3197         Web Inspector: subtract elapsed time while debugger is paused from profile nodes
3198         https://bugs.webkit.org/show_bug.cgi?id=136796
3199
3200         Reviewed by Timothy Hatcher.
3201
3202         * inspector/TimelineRecordFactory.cpp:
3203         (WebCore::buildInspectorObject):
3204
3205 2014-09-24  Christophe Dumez  <cdumez@apple.com>
3206
3207         Use is<HTML*Element>() instead of isHTML*Element() - Part 1
3208         https://bugs.webkit.org/show_bug.cgi?id=137068
3209
3210         Reviewed by Ryosuke Niwa.
3211
3212         Start using is<HTML*Element>() instead of isHTML*Element().
3213         Remaining usages will be updated in a follow-up patch to
3214         reduce the size of the change.
3215
3216         No new tests, no behavior change.
3217
3218         * accessibility/AccessibilityListBoxOption.cpp:
3219         (WebCore::AccessibilityListBoxOption::isSelected):
3220         (WebCore::AccessibilityListBoxOption::canSetSelectedAttribute):
3221         (WebCore::AccessibilityListBoxOption::stringValue):
3222         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
3223         * accessibility/AccessibilityMediaControls.cpp:
3224         (WebCore::AccessibilityMediaTimeline::valueDescription):
3225         * accessibility/AccessibilityMenuListOption.cpp:
3226         (WebCore::AccessibilityMenuListOption::setElement):
3227         * accessibility/AccessibilityMenuListPopup.cpp:
3228         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
3229         * accessibility/AccessibilityNodeObject.cpp:
3230         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
3231         (WebCore::AccessibilityNodeObject::isNativeTextControl):
3232         (WebCore::AccessibilityNodeObject::isNativeImage):
3233         (WebCore::AccessibilityNodeObject::isInputImage):
3234         (WebCore::AccessibilityNodeObject::isReadOnly):
3235         (WebCore::AccessibilityNodeObject::valueForRange):
3236         (WebCore::AccessibilityNodeObject::maxValueForRange):
3237         (WebCore::AccessibilityNodeObject::minValueForRange):
3238         (WebCore::isNodeActionElement):
3239         (WebCore::AccessibilityNodeObject::titleElementText):
3240         (WebCore::AccessibilityNodeObject::visibleText):
3241         (WebCore::AccessibilityNodeObject::title):
3242         (WebCore::AccessibilityNodeObject::colorValue):
3243         (WebCore::accessibleNameForNode):
3244         * accessibility/AccessibilityRenderObject.cpp:
3245         (WebCore::AccessibilityRenderObject::isFileUploadButton):
3246         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
3247         (WebCore::AccessibilityRenderObject::setValue):
3248         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
3249         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3250         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
3251         * accessibility/atk/AXObjectCacheAtk.cpp:
3252         (WebCore::notifyChildrenSelectionChange):
3253         * css/SelectorCheckerTestFunctions.h:
3254         (WebCore::isDisabled):
3255         (WebCore::isEnabled):
3256         (WebCore::isChecked):
3257         * css/StyleResolver.cpp:
3258         (WebCore::StyleResolver::adjustRenderStyle):
3259         * dom/EventDispatcher.cpp:
3260         (WebCore::EventDispatcher::dispatchEvent):
3261         * editing/FrameSelection.cpp:
3262         (WebCore::FrameSelection::selectAll):
3263         * editing/ReplaceSelectionCommand.cpp:
3264         (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
3265         * editing/VisibleSelection.cpp:
3266         (WebCore::VisibleSelection::isInPasswordField):
3267         * editing/cocoa/HTMLConverter.mm:
3268         (HTMLConverter::_processElement):
3269         * editing/gtk/EditorGtk.cpp:
3270         (WebCore::elementURL):
3271         * editing/ios/EditorIOS.mm:
3272         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
3273         * editing/markup.cpp:
3274         (WebCore::StyledMarkupAccumulator::appendText):
3275         (WebCore::isPlainTextMarkup):
3276         (WebCore::collectElementsToRemoveFromFragment):
3277         * html/HTMLCollection.cpp:
3278         (WebCore::isMatchingElement):
3279         * html/HTMLEmbedElement.cpp:
3280         (WebCore::HTMLEmbedElement::rendererIsNeeded):
3281         * html/HTMLFormControlElement.cpp:
3282         (WebCore::shouldAutofocus):
3283         * html/HTMLFormElement.cpp:
3284         (WebCore::HTMLFormElement::getTextFieldValues):
3285         (WebCore::HTMLFormElement::formElementIndex):
3286         * html/HTMLImageLoader.cpp:
3287         (WebCore::HTMLImageLoader::dispatchLoadEvent):
3288         (WebCore::HTMLImageLoader::notifyFinished):
3289         * html/HTMLNameCollection.cpp:
3290         (WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch):
3291         (WebCore::DocumentNameCollection::elementMatchesIfNameAttributeMatch):
3292         (WebCore::DocumentNameCollection::elementMatches):
3293         * html/HTMLOptGroupElement.cpp:
3294         (WebCore::HTMLOptGroupElement::recalcSelectOptions):
3295         (WebCore::HTMLOptGroupElement::ownerSelectElement):
3296         * html/HTMLOptionElement.cpp:
3297         (WebCore::HTMLOptionElement::index):
3298         (WebCore::HTMLOptionElement::ownerSelectElement):
3299         * html/HTMLSelectElement.cpp:
3300         (WebCore::HTMLSelectElement::add):
3301         (WebCore::HTMLSelectElement::value):
3302         (WebCore::HTMLSelectElement::setValue):
3303         (WebCore::HTMLSelectElement::childShouldCreateRenderer):
3304         (WebCore::HTMLSelectElement::setLength):
3305         (WebCore::HTMLSelectElement::nextValidIndex):
3306         (WebCore::HTMLSelectElement::saveLastSelection):
3307         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
3308         (WebCore::HTMLSelectElement::updateListBoxSelection):
3309         (WebCore::HTMLSelectElement::listBoxOnChange):
3310         (WebCore::HTMLSelectElement::recalcListItems):
3311         (WebCore::HTMLSelectElement::selectedIndex):
3312         (WebCore::HTMLSelectElement::selectOption):
3313         (WebCore::HTMLSelectElement::optionToListIndex):
3314         (WebCore::HTMLSelectElement::listToOptionIndex):
3315         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
3316         (WebCore::HTMLSelectElement::saveFormControlState):
3317         (WebCore::HTMLSelectElement::searchOptionsForValue):
3318         (WebCore::HTMLSelectElement::restoreFormControlState):
3319         (WebCore::HTMLSelectElement::appendFormData):
3320         (WebCore::HTMLSelectElement::reset):
3321         (WebCore::HTMLSelectElement::updateSelectedState):
3322         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
3323         (WebCore::HTMLSelectElement::lastSelectedListIndex):
3324         (WebCore::HTMLSelectElement::optionAtIndex):
3325         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
3326         (WebCore::HTMLSelectElement::length):
3327         * html/HTMLTagNames.in:
3328         * html/RadioInputType.cpp:
3329         (WebCore::RadioInputType::handleKeydownEvent):
3330         (WebCore::RadioInputType::isKeyboardFocusable):
3331         * html/parser/HTMLConstructionSite.cpp:
3332         (WebCore::hasImpliedEndTag):
3333         * html/parser/HTMLElementStack.cpp:
3334         (WebCore::HTMLNames::isSelectScopeMarker):
3335         * html/parser/HTMLTreeBuilder.cpp:
3336         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
3337         (WebCore::HTMLTreeBuilder::processStartTag):
3338         (WebCore::HTMLTreeBuilder::processEndTag):
3339         * html/shadow/MediaControlElementTypes.cpp:
3340         (WebCore::mediaControlElementType):
3341         * loader/FormSubmission.cpp:
3342         (WebCore::FormSubmission::create):
3343         * loader/FrameLoader.cpp:
3344         (WebCore::FrameLoader::handleFallbackContent):
3345         * loader/ImageLoader.cpp:
3346         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
3347         * loader/SubframeLoader.cpp:
3348         (WebCore::SubframeLoader::requestObject):
3349         * loader/archive/cf/LegacyWebArchive.cpp:
3350         (WebCore::LegacyWebArchive::create):
3351         * page/Chrome.cpp:
3352         (WebCore::Chrome::setToolTip):
3353         * page/EventHandler.cpp:
3354         (WebCore::isSubmitImage):
3355         (WebCore::EventHandler::handleMousePressEvent):
3356         * page/FocusController.cpp:
3357         (WebCore::clearSelectionIfNeeded):
3358         * page/FrameView.cpp:
3359         (WebCore::FrameView::addEmbeddedObjectToUpdate):
3360         (WebCore::FrameView::updateEmbeddedObject):
3361         * page/PageSerializer.cpp:
3362         (WebCore::frameOwnerURLAttributeName):
3363         * page/SpatialNavigation.cpp:
3364         (WebCore::canScrollInDirection):
3365         * rendering/HitTestResult.cpp:
3366         (WebCore::HitTestResult::altDisplayString):
3367         (WebCore::HitTestResult::absoluteImageURL):
3368         (WebCore::HitTestResult::absolutePDFURL):
3369         (WebCore::HitTestResult::isContentEditable):
3370         * rendering/RenderBlockFlow.cpp:
3371         (WebCore::resizeTextPermitted):
3372         * rendering/RenderBox.cpp:
3373         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
3374         * rendering/RenderButton.cpp:
3375         (WebCore::RenderButton::updateFromElement):
3376         (WebCore::RenderButton::canHaveGeneratedChildren):
3377         * rendering/RenderDetailsMarker.cpp:
3378         (WebCore::RenderDetailsMarker::isOpen):
3379         * rendering/RenderFileUploadControl.cpp:
3380         (WebCore::RenderFileUploadControl::uploadButton):
3381         * rendering/RenderImage.cpp:
3382         (WebCore::RenderImage::updateAltText):
3383         * rendering/RenderListBox.cpp:
3384         (WebCore::RenderListBox::updateFromElement):
3385         (WebCore::RenderListBox::addFocusRingRects):
3386         (WebCore::RenderListBox::paintItemForeground):
3387         (WebCore::RenderListBox::paintItemBackground):
3388         * rendering/RenderMenuList.cpp:
3389         (WebCore::selectedOptionCount):
3390         (RenderMenuList::updateOptionsWidth):
3391         (RenderMenuList::setTextFromOption):
3392         (RenderMenuList::itemText):
3393         (RenderMenuList::itemIsEnabled):
3394         (RenderMenuList::itemIsSelected):
3395         * rendering/RenderTheme.cpp:
3396         (WebCore::RenderTheme::paintSliderTicks):
3397         * testing/Internals.cpp:
3398         (WebCore::Internals::selectColorInColorChooser):
3399         (WebCore::Internals::wasLastChangeUserEdit):
3400         (WebCore::Internals::isSelectPopupVisible):
3401         * xml/parser/XMLDocumentParserLibxml2.cpp:
3402         (WebCore::XMLDocumentParser::startElementNs):
3403
3404 2014-09-24  Eric Carlson  <eric.carlson@apple.com>
3405
3406         [iOS] Remove MediaPlayer::setHasPlaybackTargetAvailabilityListeners
3407         https://bugs.webkit.org/show_bug.cgi?id=137075
3408
3409         Reviewed by Dean Jackson.
3410
3411         No new tests, this just removes unused code.
3412
3413         * platform/graphics/MediaPlayer.cpp:
3414         (WebCore::MediaPlayer::setHasPlaybackTargetAvailabilityListeners): Deleted.
3415         * platform/graphics/MediaPlayer.h:
3416         * platform/graphics/MediaPlayerPrivate.h:
3417         (WebCore::MediaPlayerPrivateInterface::setHasPlaybackTargetAvailabilityListeners): Deleted.
3418
3419 2014-09-21  Timothy Hatcher  <timothy@apple.com>
3420
3421         Make the Web Inspector use a separate web process.
3422
3423         https://bugs.webkit.org/show_bug.cgi?id=135120
3424
3425         Reviewed by Anders Carlsson.
3426
3427         * English.lproj/Localizable.strings: Updated.
3428
3429         * WebCore.exp.in:
3430         * WebCore.xcodeproj/project.pbxproj:
3431         * bindings/js/ScriptGlobalObject.h:
3432         * bindings/js/ScriptState.h:
3433         * inspector/InspectorFrontendHost.h:
3434         * inspector/InspectorPageAgent.h:
3435         * page/Chrome.h:
3436         Exported a few functions and private headers.
3437
3438         * inspector/InspectorController.cpp: