Have is<>(T*) function do a null check on the pointer argument
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-10-01  Christophe Dumez  <cdumez@apple.com>
2
3         Have is<>(T*) function do a null check on the pointer argument
4         https://bugs.webkit.org/show_bug.cgi?id=137333
5
6         Reviewed by Gavin Barraclough.
7
8         Have is<>(T*) function do a null check on the argument instead of a
9         simple assertion. This makes sense for 2 reasons:
10         1. It is more consistent with downcast<>(T*), which will succeed even
11            if the argument is a nullptr.
12         2. It simplifies the code a bit as it gets rid of a lot of explicit
13            null checks.
14
15         No new tests, no behavior change.
16
17         * Modules/indexeddb/IDBFactory.cpp:
18         * Modules/webaudio/OfflineAudioContext.cpp:
19         (WebCore::OfflineAudioContext::create):
20         * Modules/websockets/ThreadableWebSocketChannel.cpp:
21         (WebCore::ThreadableWebSocketChannel::create):
22         * Modules/websockets/WebSocket.cpp:
23         (WebCore::WebSocket::connect):
24         * Modules/websockets/WebSocketHandshake.cpp:
25         (WebCore::WebSocketHandshake::clientHandshakeMessage):
26         * accessibility/AXObjectCache.cpp:
27         (WebCore::AXObjectCache::focusedUIElementForPage):
28         (WebCore::createFromRenderer):
29         (WebCore::AXObjectCache::getOrCreate):
30         (WebCore::AXObjectCache::handleLiveRegionCreated):
31         (WebCore::AXObjectCache::handleAttributeChanged):
32         (WebCore::AXObjectCache::labelChanged):
33         (WebCore::AXObjectCache::rootAXEditableElement):
34         (WebCore::isNodeAriaVisible):
35         * accessibility/AccessibilityListBoxOption.cpp:
36         (WebCore::AccessibilityListBoxOption::isEnabled):
37         (WebCore::AccessibilityListBoxOption::isSelected):
38         (WebCore::AccessibilityListBoxOption::canSetSelectedAttribute):
39         (WebCore::AccessibilityListBoxOption::stringValue):
40         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
41         * accessibility/AccessibilityMediaControls.cpp:
42         (WebCore::AccessibilityMediaTimeline::valueDescription):
43         * accessibility/AccessibilityMenuListPopup.cpp:
44         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
45         * accessibility/AccessibilityNodeObject.cpp:
46         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
47         (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
48         (WebCore::AccessibilityNodeObject::isNativeTextControl):
49         (WebCore::AccessibilityNodeObject::isNativeImage):
50         (WebCore::AccessibilityNodeObject::isInputImage):
51         (WebCore::AccessibilityNodeObject::isEnabled):
52         (WebCore::AccessibilityNodeObject::isPressed):
53         (WebCore::AccessibilityNodeObject::isHovered):
54         (WebCore::AccessibilityNodeObject::isReadOnly):
55         (WebCore::AccessibilityNodeObject::isRequired):
56         (WebCore::AccessibilityNodeObject::valueForRange):
57         (WebCore::AccessibilityNodeObject::maxValueForRange):
58         (WebCore::AccessibilityNodeObject::minValueForRange):
59         (WebCore::AccessibilityNodeObject::isControl):
60         (WebCore::AccessibilityNodeObject::anchorElement):
61         (WebCore::isNodeActionElement):
62         (WebCore::AccessibilityNodeObject::mouseButtonListener):
63         (WebCore::AccessibilityNodeObject::labelForElement):
64         (WebCore::AccessibilityNodeObject::titleElementText):
65         (WebCore::AccessibilityNodeObject::alternativeText):
66         (WebCore::AccessibilityNodeObject::visibleText):
67         (WebCore::AccessibilityNodeObject::accessibilityDescription):
68         (WebCore::AccessibilityNodeObject::helpText):
69         (WebCore::AccessibilityNodeObject::hierarchicalLevel):
70         (WebCore::AccessibilityNodeObject::textUnderElement):
71         (WebCore::AccessibilityNodeObject::title):
72         (WebCore::AccessibilityNodeObject::colorValue):
73         (WebCore::accessibleNameForNode):
74         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
75         * accessibility/AccessibilityObject.cpp:
76         (WebCore::AccessibilityObject::press):
77         (WebCore::AccessibilityObject::hasTagName):
78         (WebCore::AccessibilityObject::hasAttribute):
79         (WebCore::AccessibilityObject::element):
80         (WebCore::AccessibilityObject::classList):
81         * accessibility/AccessibilityRenderObject.cpp:
82         (WebCore::AccessibilityRenderObject::isFileUploadButton):
83         (WebCore::AccessibilityRenderObject::anchorElement):
84         (WebCore::AccessibilityRenderObject::helpText):
85         (WebCore::AccessibilityRenderObject::labelElementContainer):
86         (WebCore::AccessibilityRenderObject::internalLinkElement):
87         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
88         (WebCore::AccessibilityRenderObject::titleUIElement):
89         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
90         (WebCore::AccessibilityRenderObject::accessKey):
91         (WebCore::AccessibilityRenderObject::url):
92         (WebCore::AccessibilityRenderObject::setElementAttributeValue):
93         (WebCore::AccessibilityRenderObject::setFocused):
94         (WebCore::AccessibilityRenderObject::setValue):
95         (WebCore::AccessibilityRenderObject::getDocumentLinks):
96         (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest):
97         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
98         (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement):
99         (WebCore::AccessibilityRenderObject::renderObjectIsObservable):
100         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
101         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
102         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
103         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
104         (WebCore::AccessibilityRenderObject::setAccessibleName):
105         (WebCore::AccessibilityRenderObject::stringValueForMSAA):
106         (WebCore::AccessibilityRenderObject::isLinked):
107         (WebCore::AccessibilityRenderObject::stringRoleForMSAA):
108         (WebCore::AccessibilityRenderObject::isMathElement):
109         * accessibility/AccessibilitySearchFieldButtons.cpp:
110         (WebCore::AccessibilitySearchFieldCancelButton::press):
111         * accessibility/AccessibilityTable.cpp:
112         (WebCore::AccessibilityTable::tableElement):
113         (WebCore::AccessibilityTable::isDataTable):
114         (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
115         (WebCore::AccessibilityTable::title):
116         * accessibility/atk/AXObjectCacheAtk.cpp:
117         (WebCore::notifyChildrenSelectionChange):
118         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
119         (webkitAccessibleTableGetCaption):
120         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
121         (webkitAccessibleGetName):
122         (webkitAccessibleGetDescription):
123         (webkitAccessibleGetAttributes):
124         * bindings/gobject/WebKitDOMPrivate.cpp:
125         (WebKit::wrap):
126         * bindings/js/JSAudioContextCustom.cpp:
127         (WebCore::constructJSAudioContext):
128         * bindings/js/JSDOMGlobalObject.cpp:
129         (WebCore::toJSDOMGlobalObject):
130         * bindings/js/JSDOMWindowCustom.cpp:
131         (WebCore::namedItemGetter):
132         (WebCore::JSDOMWindow::getOwnPropertySlot):
133         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
134         * bindings/js/JSElementCustom.cpp:
135         (WebCore::toJSNewlyCreated):
136         * bindings/js/JSErrorHandler.cpp:
137         (WebCore::JSErrorHandler::handleEvent):
138         * bindings/js/JSEventListener.cpp:
139         (WebCore::JSEventListener::handleEvent):
140         * bindings/js/JSHTMLDocumentCustom.cpp:
141         (WebCore::JSHTMLDocument::nameGetter):
142         * bindings/js/JSLazyEventListener.cpp:
143         (WebCore::JSLazyEventListener::initializeJSFunction):
144         * bindings/js/JSNodeCustom.cpp:
145         (WebCore::isReachableFromDOM):
146         (WebCore::createWrapperInline):
147         * bindings/js/ScheduledAction.cpp:
148         (WebCore::ScheduledAction::execute):
149         * bindings/js/ScriptState.cpp:
150         (WebCore::frameFromExecState):
151         * bindings/objc/DOM.mm:
152         (kitClass):
153         * css/CSSCursorImageValue.cpp:
154         (WebCore::resourceReferencedByCursorElement):
155         * css/CSSStyleSheet.cpp:
156         (WebCore::isAcceptableCSSStyleSheetParent):
157         * css/SelectorChecker.cpp:
158         (WebCore::SelectorChecker::checkOne):
159         * css/SelectorCheckerTestFunctions.h:
160         (WebCore::isAutofilled):
161         (WebCore::isDisabled):
162         (WebCore::isEnabled):
163         (WebCore::isChecked):
164         (WebCore::matchesLangPseudoClass):
165         (WebCore::matchesFutureCuePseudoClass):
166         (WebCore::matchesPastCuePseudoClass):
167         * css/StyleResolver.cpp:
168         (WebCore::StyleResolver::State::initElement):
169         (WebCore::StyleResolver::locateCousinList):
170         (WebCore::elementHasDirectionAuto):
171         (WebCore::StyleResolver::canShareStyleWithElement):
172         (WebCore::StyleResolver::findSiblingForStyleSharing):
173         (WebCore::StyleResolver::adjustRenderStyle):
174         (WebCore::StyleResolver::useSVGZoomRulesForLength):
175         * css/StyleSheetList.cpp:
176         (WebCore::StyleSheetList::getNamedItem):
177         * dom/Attr.cpp:
178         (WebCore::Attr::style):
179         * dom/CharacterData.cpp:
180         (WebCore::CharacterData::parserAppendData):
181         (WebCore::CharacterData::setDataAndUpdate):
182         * dom/ContainerNode.cpp:
183         (WebCore::checkAcceptChild):
184         (WebCore::ContainerNode::notifyChildRemoved):
185         * dom/ContainerNodeAlgorithms.cpp:
186         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
187         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
188         * dom/CurrentScriptIncrementer.h:
189         (WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):
190         * dom/DataTransfer.cpp:
191         (WebCore::DataTransfer::setDragImage):
192         * dom/Document.cpp:
193         (WebCore::Document::elementFromPoint):
194         (WebCore::Document::setTitle):
195         (WebCore::Document::iconURLs):
196         (WebCore::eventTargetElementForDocument):
197         (WebCore::Document::updateHoverActiveState):
198         * dom/DocumentStyleSheetCollection.cpp:
199         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
200         * dom/Element.cpp:
201         (WebCore::Element::computeInheritedLanguage):
202         * dom/Element.h:
203         (WebCore::Node::parentElement):
204         * dom/ElementTraversal.h:
205         (WebCore::Traversal<Element>::nextTemplate):
206         (WebCore::ElementTraversal::previousIncludingPseudo):
207         (WebCore::ElementTraversal::nextIncludingPseudo):
208         (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
209         (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
210         * dom/EventDispatcher.cpp:
211         (WebCore::WindowEventContext::WindowEventContext):
212         (WebCore::EventDispatcher::dispatchEvent):
213         (WebCore::nodeOrHostIfPseudoElement):
214         (WebCore::EventPath::EventPath):
215         * dom/EventTarget.cpp:
216         (WebCore::EventTarget::fireEventListeners):
217         * dom/KeyboardEvent.cpp:
218         (WebCore::findKeyboardEvent):
219         * dom/LiveNodeList.cpp:
220         (WebCore::LiveNodeList::namedItem):
221         * dom/MessagePort.cpp:
222         (WebCore::MessagePort::dispatchMessages):
223         * dom/MouseEvent.cpp:
224         (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
225         * dom/NamedNodeMap.cpp:
226         (WebCore::NamedNodeMap::setNamedItem):
227         * dom/Node.cpp:
228         (WebCore::Node::dumpStatistics):
229         (WebCore::Node::pseudoAwarePreviousSibling):
230         (WebCore::Node::pseudoAwareNextSibling):
231         (WebCore::Node::computedStyle):
232         (WebCore::Node::parentOrShadowHostElement):
233         (WebCore::Node::rootEditableElement):
234         (WebCore::Node::ancestorElement):
235         (WebCore::Node::compareDocumentPosition):
236         (WebCore::appendAttributeDesc):
237         (WebCore::Node::showNodePathForThis):
238         (WebCore::Node::enclosingLinkEventParentOrSelf):
239         (WebCore::Node::dispatchEvent):
240         (WebCore::Node::defaultEventHandler):
241         * dom/NodeRenderingTraversal.cpp:
242         (WebCore::NodeRenderingTraversal::nodeCanBeDistributed):
243         (WebCore::NodeRenderingTraversal::traverseParent):
244         * dom/NodeTraversal.cpp:
245         (WebCore::NodeTraversal::previousIncludingPseudo):
246         (WebCore::NodeTraversal::nextIncludingPseudo):
247         (WebCore::NodeTraversal::nextIncludingPseudoSkippingChildren):
248         * dom/Position.cpp:
249         (WebCore::Position::element):
250         (WebCore::endsOfNodeAreVisuallyDistinctPositions):
251         (WebCore::Position::isRenderedCharacter):
252         (WebCore::Position::leadingWhitespacePosition):
253         * dom/Range.cpp:
254         (WebCore::Range::insertNode):
255         (WebCore::Range::getBorderAndTextQuads):
256         * dom/ScriptElement.cpp:
257         (WebCore::toScriptElementIfPossible):
258         * dom/ShadowRoot.h:
259         (WebCore::Node::parentOrShadowHostNode):
260         * dom/Text.cpp:
261         (WebCore::earliestLogicallyAdjacentTextNode):
262         (WebCore::latestLogicallyAdjacentTextNode):
263         (WebCore::isSVGShadowText):
264         * dom/TextNodeTraversal.cpp:
265         (WebCore::TextNodeTraversal::contentsAsString):
266         * dom/TextNodeTraversal.h:
267         (WebCore::TextNodeTraversal::firstTextChildTemplate):
268         (WebCore::TextNodeTraversal::firstTextWithinTemplate):
269         (WebCore::TextNodeTraversal::traverseNextTextTemplate):
270         (WebCore::TextNodeTraversal::nextSibling):
271         * dom/TreeScopeAdopter.cpp:
272         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
273         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
274         * editing/ApplyBlockElementCommand.cpp:
275         (WebCore::isNewLineAtPosition):
276         (WebCore::ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded):
277         * editing/ApplyStyleCommand.cpp:
278         (WebCore::isLegacyAppleStyleSpan):
279         (WebCore::isStyleSpanOrSpanWithOnlyStyleAttribute):
280         (WebCore::isSpanWithoutAttributesOrUnstyledStyleSpan):
281         (WebCore::isEmptyFontTag):
282         (WebCore::ApplyStyleCommand::applyBlockStyle):
283         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
284         (WebCore::dummySpanAncestorForNode):
285         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
286         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
287         (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle):
288         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
289         (WebCore::ApplyStyleCommand::splitTextAtEnd):
290         (WebCore::ApplyStyleCommand::splitTextElementAtEnd):
291         (WebCore::ApplyStyleCommand::shouldSplitTextElement):
292         (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
293         (WebCore::ApplyStyleCommand::applyInlineStyleChange):
294         (WebCore::ApplyStyleCommand::joinChildTextNodes):
295         * editing/BreakBlockquoteCommand.cpp:
296         (WebCore::BreakBlockquoteCommand::doApply):
297         * editing/CompositeEditCommand.cpp:
298         (WebCore::CompositeEditCommand::isRemovableBlock):
299         (WebCore::CompositeEditCommand::insertNodeAt):
300         (WebCore::CompositeEditCommand::canRebalance):
301         (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
302         (WebCore::CompositeEditCommand::deleteInsignificantText):
303         (WebCore::CompositeEditCommand::removePlaceholderAt):
304         (WebCore::CompositeEditCommand::cleanupAfterDeletion):
305         (WebCore::CompositeEditCommand::moveParagraphs):
306         * editing/DeleteButtonController.cpp:
307         (WebCore::enclosingDeletableElement):
308         * editing/DeleteSelectionCommand.cpp:
309         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
310         (WebCore::DeleteSelectionCommand::fixupWhitespace):
311         (WebCore::DeleteSelectionCommand::doApply):
312         * editing/EditingStyle.cpp:
313         (WebCore::EditingStyle::wrappingStyleForSerialization):
314         * editing/Editor.cpp:
315         (WebCore::imageElementFromImageDocument):
316         (WebCore::Editor::shouldInsertFragment):
317         (WebCore::Editor::setBaseWritingDirection):
318         (WebCore::Editor::setComposition):
319         (WebCore::Editor::isSpellCheckingEnabledFor):
320         (WebCore::Editor::applyEditingStyleToElement):
321         * editing/FormatBlockCommand.cpp:
322         (WebCore::isElementForFormatBlock):
323         * editing/FrameSelection.cpp:
324         (WebCore::removingNodeRemovesPosition):
325         (WebCore::CaretBase::paintCaret):
326         (WebCore::FrameSelection::debugRenderer):
327         (WebCore::FrameSelection::selectAll):
328         (WebCore::scanForForm):
329         * editing/InsertLineBreakCommand.cpp:
330         (WebCore::InsertLineBreakCommand::doApply):
331         * editing/InsertListCommand.cpp:
332         (WebCore::InsertListCommand::mergeWithNeighboringLists):
333         * editing/InsertParagraphSeparatorCommand.cpp:
334         (WebCore::InsertParagraphSeparatorCommand::doApply):
335         * editing/InsertTextCommand.cpp:
336         (WebCore::InsertTextCommand::insertTab):
337         * editing/ReplaceSelectionCommand.cpp:
338         (WebCore::haveSameTagName):
339         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
340         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
341         (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
342         (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):
343         (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
344         (WebCore::ReplaceSelectionCommand::insertAsListItems):
345         (WebCore::ReplaceSelectionCommand::performTrivialReplace):
346         * editing/SpellChecker.cpp:
347         (WebCore::SpellChecker::isCheckable):
348         * editing/SplitTextNodeContainingElementCommand.cpp:
349         (WebCore::SplitTextNodeContainingElementCommand::doApply):
350         * editing/TextIterator.cpp:
351         (WebCore::isRendererReplacedElement):
352         * editing/VisibleSelection.cpp:
353         (WebCore::VisibleSelection::isInPasswordField):
354         * editing/VisibleUnits.cpp:
355         (WebCore::startPositionForLine):
356         (WebCore::endPositionForLine):
357         (WebCore::startOfParagraph):
358         (WebCore::endOfParagraph):
359         * editing/cocoa/HTMLConverter.mm:
360         (HTMLConverter::aggregatedAttributesForAncestors):
361         (HTMLConverter::aggregatedAttributesForElementAndItsAncestors):
362         (WebCore::editingAttributedStringFromRange):
363         * editing/htmlediting.cpp:
364         (WebCore::enclosingBlock):
365         (WebCore::enclosingElementWithTag):
366         (WebCore::enclosingAnchorElement):
367         (WebCore::enclosingList):
368         (WebCore::lineBreakExistsAtPosition):
369         (WebCore::areIdenticalElements):
370         (WebCore::isNonTableCellHTMLBlockElement):
371         (WebCore::deprecatedEnclosingBlockFlowElement):
372         * editing/ios/EditorIOS.mm:
373         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
374         * editing/markup.cpp:
375         (WebCore::StyledMarkupAccumulator::appendText):
376         (WebCore::ancestorToRetainStructureAndAppearanceForBlock):
377         (WebCore::isPlainTextMarkup):
378         * fileapi/FileReader.cpp:
379         (WebCore::FileReader::readAsArrayBuffer):
380         (WebCore::FileReader::readAsBinaryString):
381         (WebCore::FileReader::readAsText):
382         (WebCore::FileReader::readAsDataURL):
383         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
384         (WebCore::BaseChooserOnlyDateAndTimeInputType::updateAppearance):
385         * html/FTPDirectoryDocument.cpp:
386         (WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate):
387         * html/FormAssociatedElement.cpp:
388         (WebCore::FormAssociatedElement::findAssociatedForm):
389         * html/HTMLAnchorElement.cpp:
390         (WebCore::appendServerMapMousePosition):
391         (WebCore::HTMLAnchorElement::defaultEventHandler):
392         (WebCore::HTMLAnchorElement::eventType):
393         (WebCore::isEnterKeyKeydownEvent):
394         (WebCore::isLinkClick):
395         * html/HTMLAreaElement.cpp:
396         (WebCore::HTMLAreaElement::imageElement):
397         * html/HTMLBodyElement.cpp:
398         (WebCore::HTMLBodyElement::insertedInto):
399         * html/HTMLButtonElement.cpp:
400         (WebCore::HTMLButtonElement::defaultEventHandler):
401         * html/HTMLCollection.cpp:
402         (WebCore::HTMLCollection::namedItem):
403         (WebCore::HTMLCollection::updateNamedElementCache):
404         * html/HTMLDocument.cpp:
405         (WebCore::HTMLDocument::bgColor):
406         (WebCore::HTMLDocument::setBgColor):
407         (WebCore::HTMLDocument::fgColor):
408         (WebCore::HTMLDocument::setFgColor):
409         (WebCore::HTMLDocument::alinkColor):
410         (WebCore::HTMLDocument::setAlinkColor):
411         (WebCore::HTMLDocument::linkColor):
412         (WebCore::HTMLDocument::setLinkColor):
413         (WebCore::HTMLDocument::vlinkColor):
414         (WebCore::HTMLDocument::setVlinkColor):
415         (WebCore::HTMLDocument::isFrameSet):
416         * html/HTMLElement.cpp:
417         (WebCore::HTMLElement::matchesReadWritePseudoClass):
418         (WebCore::mergeWithNextTextNode):
419         (WebCore::HTMLElement::setOuterHTML):
420         (WebCore::HTMLElement::setOuterText):
421         (WebCore::HTMLElement::insertAdjacentElement):
422         (WebCore::contextElementForInsertion):
423         (WebCore::HTMLElement::directionality):
424         (WebCore::HTMLElement::dirAttributeChanged):
425         * html/HTMLEmbedElement.cpp:
426         (WebCore::HTMLEmbedElement::rendererIsNeeded):
427         * html/HTMLFieldSetElement.cpp:
428         (WebCore::updateFromControlElementsAncestorDisabledStateUnder):
429         (WebCore::HTMLFieldSetElement::disabledStateChanged):
430         * html/HTMLFormControlElement.cpp:
431         (WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor):
432         (WebCore::shouldAutofocus):
433         (WebCore::HTMLFormControlElement::enclosingFormControlElement):
434         * html/HTMLFormElement.cpp:
435         (WebCore::HTMLFormElement::rendererIsNeeded):
436         (WebCore::HTMLFormElement::submitImplicitly):
437         (WebCore::submitElementFromEvent):
438         (WebCore::HTMLFormElement::validateInteractively):
439         (WebCore::HTMLFormElement::submit):
440         (WebCore::HTMLFormElement::reset):
441         (WebCore::HTMLFormElement::defaultButton):
442         (WebCore::HTMLFormElement::documentDidResumeFromPageCache):
443         * html/HTMLFrameOwnerElement.cpp:
444         (WebCore::HTMLFrameOwnerElement::getSVGDocument):
445         * html/HTMLFrameSetElement.cpp:
446         (WebCore::HTMLFrameSetElement::defaultEventHandler):
447         * html/HTMLInputElement.cpp:
448         (WebCore::HTMLInputElement::defaultEventHandler):
449         (WebCore::HTMLInputElement::dataList):
450         * html/HTMLLabelElement.cpp:
451         (WebCore::nodeAsSupportedLabelableElement):
452         * html/HTMLLegendElement.cpp:
453         (WebCore::HTMLLegendElement::virtualForm):
454         * html/HTMLMediaElement.cpp:
455         (WebCore::HTMLMediaElement::parseAttribute):
456         * html/HTMLObjectElement.cpp:
457         (WebCore::HTMLObjectElement::hasFallbackContent):
458         (WebCore::HTMLObjectElement::updateDocNamedItem):
459         * html/HTMLOptGroupElement.cpp:
460         (WebCore::HTMLOptGroupElement::recalcSelectOptions):
461         (WebCore::HTMLOptGroupElement::ownerSelectElement):
462         * html/HTMLOptionElement.cpp:
463         (WebCore::HTMLOptionElement::setText):
464         (WebCore::HTMLOptionElement::index):
465         (WebCore::HTMLOptionElement::ownerDataListElement):
466         (WebCore::HTMLOptionElement::ownerSelectElement):
467         (WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel):
468         (WebCore::HTMLOptionElement::isDisabledFormControl):
469         (WebCore::HTMLOptionElement::collectOptionInnerText):
470         * html/HTMLPlugInImageElement.cpp:
471         (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin):
472         (WebCore::HTMLPlugInImageElement::defaultEventHandler):
473         * html/HTMLScriptElement.cpp:
474         (WebCore::HTMLScriptElement::setText):
475         * html/HTMLSelectElement.cpp:
476         (WebCore::HTMLSelectElement::nextValidIndex):
477         (WebCore::HTMLSelectElement::saveLastSelection):
478         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
479         (WebCore::HTMLSelectElement::updateListBoxSelection):
480         (WebCore::HTMLSelectElement::listBoxOnChange):
481         (WebCore::HTMLSelectElement::recalcListItems):
482         (WebCore::HTMLSelectElement::selectedIndex):
483         (WebCore::HTMLSelectElement::selectOption):
484         (WebCore::HTMLSelectElement::optionToListIndex):
485         (WebCore::HTMLSelectElement::listToOptionIndex):
486         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
487         (WebCore::HTMLSelectElement::saveFormControlState):
488         (WebCore::HTMLSelectElement::searchOptionsForValue):
489         (WebCore::HTMLSelectElement::restoreFormControlState):
490         (WebCore::HTMLSelectElement::appendFormData):
491         (WebCore::HTMLSelectElement::reset):
492         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
493         (WebCore::HTMLSelectElement::updateSelectedState):
494         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
495         (WebCore::HTMLSelectElement::defaultEventHandler):
496         (WebCore::HTMLSelectElement::lastSelectedListIndex):
497         (WebCore::HTMLSelectElement::optionAtIndex):
498         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
499         (WebCore::HTMLSelectElement::length):
500         * html/HTMLSourceElement.cpp:
501         (WebCore::HTMLSourceElement::insertedInto):
502         (WebCore::HTMLSourceElement::removedFrom):
503         * html/HTMLSummaryElement.cpp:
504         (WebCore::isClickableControl):
505         (WebCore::HTMLSummaryElement::defaultEventHandler):
506         * html/HTMLTableElement.cpp:
507         (WebCore::HTMLTableElement::caption):
508         * html/HTMLTablePartElement.cpp:
509         (WebCore::HTMLTablePartElement::findParentTable):
510         * html/HTMLTableRowElement.cpp:
511         (WebCore::HTMLTableRowElement::rowIndex):
512         * html/HTMLTableRowsCollection.cpp:
513         (WebCore::HTMLTableRowsCollection::rowAfter):
514         (WebCore::HTMLTableRowsCollection::lastRow):
515         * html/HTMLTextAreaElement.cpp:
516         (WebCore::HTMLTextAreaElement::defaultEventHandler):
517         * html/HTMLTextFormControlElement.cpp:
518         (WebCore::HTMLTextFormControlElement::innerTextValue):
519         (WebCore::positionForIndex):
520         (WebCore::HTMLTextFormControlElement::indexForPosition):
521         (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
522         * html/HTMLTitleElement.cpp:
523         (WebCore::HTMLTitleElement::setText):
524         * html/HTMLTrackElement.cpp:
525         (WebCore::HTMLTrackElement::mediaElement):
526         * html/ImageDocument.cpp:
527         (WebCore::ImageEventListener::handleEvent):
528         * html/InputType.cpp:
529         (WebCore::InputType::shouldSubmitImplicitly):
530         * html/MediaDocument.cpp:
531         (WebCore::ancestorVideoElement):
532         (WebCore::MediaDocument::defaultEventHandler):
533         * html/RadioInputType.cpp:
534         (WebCore::RadioInputType::handleKeydownEvent):
535         (WebCore::RadioInputType::isKeyboardFocusable):
536         * html/TextFieldInputType.cpp:
537         (WebCore::TextFieldInputType::shouldSubmitImplicitly):
538         * html/parser/HTMLConstructionSite.cpp:
539         (WebCore::hasImpliedEndTag):
540         (WebCore::HTMLConstructionSite::attachLater):
541         (WebCore::HTMLConstructionSite::insertHTMLFormElement):
542         (WebCore::HTMLConstructionSite::insertTextNode):
543         (WebCore::HTMLConstructionSite::ownerDocumentForCurrentNode):
544         (WebCore::HTMLConstructionSite::findFosterSite):
545         * html/parser/HTMLElementStack.cpp:
546         (WebCore::HTMLNames::isScopeMarker):
547         (WebCore::HTMLNames::isTableScopeMarker):
548         (WebCore::HTMLNames::isSelectScopeMarker):
549         * html/parser/HTMLTreeBuilder.cpp:
550         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
551         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
552         (WebCore::HTMLTreeBuilder::processStartTag):
553         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
554         (WebCore::HTMLTreeBuilder::processEndTag):
555         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
556         * html/shadow/InsertionPoint.h:
557         (WebCore::isActiveInsertionPoint):
558         (WebCore::parentNodeForDistribution):
559         (WebCore::parentElementForDistribution):
560         * html/shadow/MediaControlElementTypes.cpp:
561         (WebCore::parentMediaElement):
562         (WebCore::mediaControlElementType):
563         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
564         * html/shadow/MediaControlElements.cpp:
565         (WebCore::MediaControlPanelElement::defaultEventHandler):
566         (WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler):
567         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler):
568         (WebCore::MediaControlTimelineElement::defaultEventHandler):
569         * html/shadow/MediaControls.cpp:
570         (WebCore::MediaControls::containsRelatedTarget):
571         * html/shadow/MediaControlsApple.cpp:
572         (WebCore::MediaControlsAppleEventListener::handleEvent):
573         * html/shadow/SliderThumbElement.cpp:
574         (WebCore::SliderThumbElement::defaultEventHandler):
575         * html/shadow/SpinButtonElement.cpp:
576         (WebCore::SpinButtonElement::defaultEventHandler):
577         (WebCore::SpinButtonElement::forwardEvent):
578         * html/shadow/TextControlInnerElements.cpp:
579         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
580         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
581         * html/track/VTTCue.cpp:
582         (WebCore::VTTCue::copyWebVTTNodeToDOMTree):
583         (WebCore::VTTCue::markFutureAndPastNodes):
584         * inspector/InspectorCSSAgent.cpp:
585         (WebCore::InspectorCSSAgent::elementForId):
586         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
587         * inspector/InspectorDOMAgent.cpp:
588         (WebCore::InspectorDOMAgent::unbind):
589         (WebCore::InspectorDOMAgent::assertDocument):
590         (WebCore::InspectorDOMAgent::assertElement):
591         (WebCore::InspectorDOMAgent::querySelector):
592         (WebCore::InspectorDOMAgent::querySelectorAll):
593         (WebCore::InspectorDOMAgent::setNodeName):
594         (WebCore::InspectorDOMAgent::buildObjectForNode):
595         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
596         (WebCore::InspectorDOMAgent::innerParentNode):
597         * inspector/InspectorFrontendHost.cpp:
598         (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
599         * inspector/InspectorInstrumentation.cpp:
600         (WebCore::frameForScriptExecutionContext):
601         (WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
602         * inspector/InspectorInstrumentation.h:
603         (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
604         * inspector/InspectorNodeFinder.cpp:
605         (WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal):
606         (WebCore::InspectorNodeFinder::searchUsingXPath):
607         (WebCore::InspectorNodeFinder::searchUsingCSSSelectors):
608         * inspector/InspectorOverlay.cpp:
609         (WebCore::buildObjectForElementInfo):
610         * inspector/InspectorStyleSheet.cpp:
611         (WebCore::InspectorStyleSheet::inlineStyleSheetText):
612         * loader/FormSubmission.cpp:
613         (WebCore::FormSubmission::create):
614         * loader/FrameLoader.cpp:
615         (WebCore::FrameLoader::handleFallbackContent):
616         * loader/SubframeLoader.cpp:
617         (WebCore::SubframeLoader::loadPlugin):
618         * loader/ThreadableLoader.cpp:
619         (WebCore::ThreadableLoader::create):
620         (WebCore::ThreadableLoader::loadResourceSynchronously):
621         * loader/cache/MemoryCache.cpp:
622         (WebCore::MemoryCache::removeRequestFromCache):
623         (WebCore::MemoryCache::removeRequestFromSessionCaches):
624         * mathml/MathMLElement.cpp:
625         (WebCore::MathMLElement::attributeChanged):
626         * mathml/MathMLSelectElement.cpp:
627         (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
628         * page/Chrome.cpp:
629         (WebCore::Chrome::setToolTip):
630         * page/ContextMenuController.cpp:
631         (WebCore::ContextMenuController::maybeCreateContextMenu):
632         (WebCore::ContextMenuController::populate):
633         * page/DOMTimer.cpp:
634         (WebCore::DOMTimer::install):
635         (WebCore::DOMTimer::fired):
636         * page/DragController.cpp:
637         (WebCore::elementUnderMouse):
638         (WebCore::DragController::operationForLoad):
639         (WebCore::DragController::canProcessDrag):
640         (WebCore::DragController::draggableElement):
641         * page/EventHandler.cpp:
642         (WebCore::EventHandler::handleMousePressEvent):
643         (WebCore::isSubmitImage):
644         (WebCore::targetIsFrame):
645         (WebCore::findDropZone):
646         (WebCore::EventHandler::updateDragAndDrop):
647         (WebCore::EventHandler::updateMouseEventTargetNode):
648         (WebCore::EventHandler::handleTextInputEvent):
649         * page/FocusController.cpp:
650         (WebCore::FocusNavigationScope::owner):
651         (WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
652         (WebCore::FocusController::findFocusableElementAcrossFocusScope):
653         (WebCore::FocusController::findElementWithExactTabIndex):
654         (WebCore::nextElementWithGreaterTabIndex):
655         (WebCore::previousElementWithLowerTabIndex):
656         (WebCore::FocusController::nextFocusableElement):
657         (WebCore::FocusController::previousFocusableElement):
658         (WebCore::clearSelectionIfNeeded):
659         (WebCore::FocusController::advanceFocusDirectionally):
660         * page/Frame.cpp:
661         (WebCore::Frame::searchForLabelsBeforeElement):
662         (WebCore::Frame::setPageAndTextZoomFactors):
663         * page/FrameView.cpp:
664         (WebCore::FrameView::init):
665         (WebCore::FrameView::scrollToAnchor):
666         * page/PageSerializer.cpp:
667         (WebCore::PageSerializer::serializeFrame):
668         * page/SpatialNavigation.cpp:
669         (WebCore::FocusCandidate::FocusCandidate):
670         (WebCore::scrollInDirection):
671         (WebCore::scrollableEnclosingBoxOrParentFrameForNodeInDirection):
672         (WebCore::canScrollInDirection):
673         (WebCore::nodeRectInAbsoluteCoordinates):
674         (WebCore::areElementsOnSameLine):
675         * page/ios/FrameIOS.mm:
676         (WebCore::ancestorRespondingToClickEvents):
677         * platform/network/FormData.cpp:
678         (WebCore::FormData::appendKeyValuePairItems):
679         * rendering/HitTestResult.cpp:
680         (WebCore::HitTestResult::setInnerNode):
681         (WebCore::HitTestResult::setInnerNonSharedNode):
682         (WebCore::HitTestResult::title):
683         (WebCore::HitTestResult::innerTextIfTruncated):
684         (WebCore::HitTestResult::mediaSupportsFullscreen):
685         (WebCore::HitTestResult::enterFullscreenForVideo):
686         (WebCore::HitTestResult::mediaIsVideo):
687         (WebCore::HitTestResult::innerElement):
688         (WebCore::HitTestResult::innerNonSharedElement):
689         * rendering/RenderBlockFlow.cpp:
690         (WebCore::resizeTextPermitted):
691         * rendering/RenderBox.cpp:
692         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
693         * rendering/RenderCounter.cpp:
694         (WebCore::planCounter):
695         * rendering/RenderDetailsMarker.cpp:
696         (WebCore::RenderDetailsMarker::isOpen):
697         * rendering/RenderEmbeddedObject.cpp:
698         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
699         * rendering/RenderFileUploadControl.cpp:
700         (WebCore::RenderFileUploadControl::uploadButton):
701         * rendering/RenderImage.cpp:
702         (WebCore::RenderImage::paintAreaElementFocusRing):
703         (WebCore::RenderImage::paintIntoRect):
704         (WebCore::RenderImage::imageMap):
705         * rendering/RenderLayer.cpp:
706         (WebCore::RenderLayer::scrollRectToVisible):
707         (WebCore::RenderLayer::resize):
708         (WebCore::RenderLayer::updateSnapOffsets):
709         * rendering/RenderLayerBacking.cpp:
710         (WebCore::isRestartedPlugin):
711         * rendering/RenderListBox.cpp:
712         (WebCore::RenderListBox::updateFromElement):
713         (WebCore::RenderListBox::addFocusRingRects):
714         (WebCore::RenderListBox::paintItemForeground):
715         (WebCore::RenderListBox::paintItemBackground):
716         * rendering/RenderMarquee.cpp:
717         (WebCore::RenderMarquee::marqueeSpeed):
718         * rendering/RenderMenuList.cpp:
719         (WebCore::selectedOptionCount):
720         (RenderMenuList::updateOptionsWidth):
721         (RenderMenuList::setTextFromOption):
722         (RenderMenuList::itemText):
723         (RenderMenuList::itemIsEnabled):
724         (RenderMenuList::itemIsLabel):
725         (RenderMenuList::itemIsSelected):
726         * rendering/RenderMeter.cpp:
727         (WebCore::RenderMeter::meterElement):
728         * rendering/RenderNamedFlowThread.cpp:
729         (WebCore::RenderNamedFlowThread::isChildAllowed):
730         * rendering/RenderObject.cpp:
731         (WebCore::RenderObject::addPDFURLRect):
732         (WebCore::RenderObject::shouldRespectImageOrientation):
733         (WebCore::RenderObject::updateDragState):
734         (WebCore::RenderObject::getUncachedPseudoStyle):
735         (WebCore::RenderObject::getTextDecorationColors):
736         * rendering/RenderProgress.cpp:
737         (WebCore::RenderProgress::progressElement):
738         * rendering/RenderSnapshottedPlugIn.cpp:
739         (WebCore::RenderSnapshottedPlugIn::handleEvent):
740         * rendering/RenderTable.cpp:
741         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
742         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
743         * rendering/RenderTableCell.cpp:
744         (WebCore::RenderTableCell::parseColSpanFromDOM):
745         (WebCore::RenderTableCell::parseRowSpanFromDOM):
746         * rendering/RenderTheme.cpp:
747         (WebCore::RenderTheme::isEnabled):
748         (WebCore::RenderTheme::isFocused):
749         (WebCore::RenderTheme::isPressed):
750         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
751         (WebCore::RenderTheme::isReadOnlyControl):
752         (WebCore::RenderTheme::isHovered):
753         (WebCore::RenderTheme::isSpinUpButtonPartHovered):
754         (WebCore::RenderTheme::paintSliderTicks):
755         * rendering/RenderThemeGtk.cpp:
756         (WebCore::getMediaElementFromRenderObject):
757         (WebCore::nodeHasClass):
758         * rendering/RenderThemeMac.mm:
759         (WebCore::RenderThemeMac::updatePressedState):
760         (WebCore::RenderThemeMac::paintSliderThumb):
761         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
762         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
763         * rendering/RenderTreeAsText.cpp:
764         (WebCore::isEmptyOrUnstyledAppleStyleSpan):
765         (WebCore::RenderTreeAsText::writeRenderObject):
766         * rendering/TextAutosizer.cpp:
767         (WebCore::TextAutosizer::isAutosizingContainer):
768         (WebCore::TextAutosizer::containerContainsOneOfTags):
769         * rendering/mathml/RenderMathMLBlock.cpp:
770         (WebCore::RenderMathMLBlock::isChildAllowed):
771         * rendering/svg/RenderSVGGradientStop.cpp:
772         (WebCore::RenderSVGGradientStop::gradientElement):
773         * rendering/svg/RenderSVGTransformableContainer.cpp:
774         (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
775         * rendering/svg/SVGRenderingContext.cpp:
776         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
777         * style/StyleResolveTree.cpp:
778         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
779         (WebCore::Style::attachChildren):
780         (WebCore::Style::attachDistributedChildren):
781         (WebCore::Style::detachDistributedChildren):
782         (WebCore::Style::detachChildren):
783         (WebCore::Style::resolveShadowTree):
784         (WebCore::Style::resolveTree):
785         * svg/SVGAElement.cpp:
786         (WebCore::SVGAElement::defaultEventHandler):
787         * svg/SVGAltGlyphElement.cpp:
788         (WebCore::SVGAltGlyphElement::hasValidGlyphElements):
789         * svg/SVGAnimateMotionElement.cpp:
790         (WebCore::SVGAnimateMotionElement::hasValidAttributeType):
791         * svg/SVGDocument.cpp:
792         (WebCore::SVGDocument::rootElement):
793         * svg/SVGElement.cpp:
794         (WebCore::SVGElement::isOutermostSVGSVGElement):
795         (WebCore::SVGElement::ownerSVGElement):
796         (WebCore::SVGElement::viewportElement):
797         * svg/SVGFontData.cpp:
798         (WebCore::SVGFontData::applySVGGlyphSelection):
799         * svg/SVGFontFaceElement.cpp:
800         (WebCore::SVGFontFaceElement::associatedFontElement):
801         (WebCore::SVGFontFaceElement::rebuildFontFace):
802         * svg/SVGFontFaceSrcElement.cpp:
803         (WebCore::SVGFontFaceSrcElement::childrenChanged):
804         * svg/SVGGlyphElement.cpp:
805         (WebCore::SVGGlyphElement::invalidateGlyphCache):
806         * svg/SVGHKernElement.cpp:
807         (WebCore::SVGHKernElement::insertedInto):
808         (WebCore::SVGHKernElement::removedFrom):
809         * svg/SVGLengthContext.cpp:
810         (WebCore::SVGLengthContext::determineViewport):
811         * svg/SVGLinearGradientElement.cpp:
812         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
813         * svg/SVGLocatable.cpp:
814         (WebCore::isViewportElement):
815         (WebCore::SVGLocatable::getTransformToElement):
816         * svg/SVGMPathElement.cpp:
817         (WebCore::SVGMPathElement::pathElement):
818         (WebCore::SVGMPathElement::notifyParentOfPathChange):
819         * svg/SVGPathElement.cpp:
820         (WebCore::SVGPathElement::invalidateMPathDependencies):
821         * svg/SVGPatternElement.cpp:
822         (WebCore::SVGPatternElement::collectPatternAttributes):
823         * svg/SVGRadialGradientElement.cpp:
824         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
825         * svg/SVGSVGElement.cpp:
826         (WebCore::SVGSVGElement::setupInitialView):
827         * svg/SVGTextContentElement.cpp:
828         (WebCore::SVGTextContentElement::elementFromRenderer):
829         * svg/SVGUseElement.cpp:
830         (WebCore::dumpInstanceTree):
831         (WebCore::SVGUseElement::toClipPath):
832         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
833         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
834         * svg/SVGVKernElement.cpp:
835         (WebCore::SVGVKernElement::insertedInto):
836         (WebCore::SVGVKernElement::removedFrom):
837         * svg/animation/SVGSMILElement.cpp:
838         (WebCore::SVGSMILElement::buildPendingResource):
839         * svg/graphics/SVGImageCache.cpp:
840         (WebCore::SVGImageCache::imageForRenderer):
841         * testing/Internals.cpp:
842         (WebCore::Internals::shadowRootType):
843         (WebCore::Internals::visiblePlaceholder):
844         (WebCore::Internals::selectColorInColorChooser):
845         (WebCore::Internals::wasLastChangeUserEdit):
846         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
847         (WebCore::Internals::isSelectPopupVisible):
848         * testing/js/WebCoreTestSupport.cpp:
849         (WebCoreTestSupport::injectInternalsObject):
850         * xml/XMLHttpRequest.cpp:
851         (WebCore::XMLHttpRequest::open):
852         * xml/XPathFunctions.cpp:
853         (WebCore::XPath::expandedNameLocalPart):
854         (WebCore::XPath::FunLang::evaluate):
855         * xml/XPathNodeSet.cpp:
856         (WebCore::XPath::sortBlock):
857         (WebCore::XPath::NodeSet::sort):
858         (WebCore::XPath::findRootNode):
859         (WebCore::XPath::NodeSet::traversalSort):
860         * xml/parser/XMLDocumentParserLibxml2.cpp:
861         (WebCore::XMLDocumentParser::XMLDocumentParser):
862
863 2014-10-02  Rik Cabanier  <cabanier@adobe.com>
864
865         Clean up loops in CSSGradientValue.cpp
866         https://bugs.webkit.org/show_bug.cgi?id=137332
867
868         Reviewed by Andreas Kling.
869
870         This patch cleans up a couple of for loops by using C++11 syntax and
871         fixes some grammar in a comment.
872
873         No new tests, no behavior change.
874
875         * css/CSSGradientValue.cpp:
876         (WebCore::CSSGradientValue::gradientWithStylesResolved): Move for loops to C++11.
877         (WebCore::CSSGradientValue::addStops): Update grammar in comment for gradient midpoints.
878
879 2014-10-02  Krzysztof Czech  <k.czech@samsung.com>
880
881         AX: Default orientation for aria scrollbars should be vertical
882         https://bugs.webkit.org/show_bug.cgi?id=137341
883
884         Reviewed by Chris Fleizach.
885
886         Default orientation for aria scrollbars regarding w3c spec should be vertical
887
888         No new tests, covering by existing one.
889
890         * accessibility/AccessibilityRenderObject.cpp:
891         (WebCore::AccessibilityRenderObject::orientation):
892
893 2014-10-02  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
894
895         Fix minimal build warnings
896         https://bugs.webkit.org/show_bug.cgi?id=137066
897
898         Reviewed by Daniel Bates.
899
900         No new tests, no behavior change.
901
902         * css/CSSParser.cpp:
903         (WebCore::isValidKeywordPropertyAndValue):
904         * html/parser/HTMLPreloadScanner.cpp:
905         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
906         * page/Page.cpp:
907         (WebCore::Page::setPageScaleFactor):
908         * platform/graphics/WidthIterator.cpp:
909         (WebCore::WidthIterator::glyphDataForCharacter):
910         * rendering/svg/SVGInlineTextBox.cpp:
911         (WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting):
912
913 2014-10-01  Benjamin Poulain  <bpoulain@apple.com>
914
915         Click events offset in webkit-overflow-scrolling iframes
916         https://bugs.webkit.org/show_bug.cgi?id=134596
917
918         Reviewed by Sam Weinig.
919
920         * platform/ScrollView.cpp:
921         (WebCore::ScrollView::visibleContentRectInternal):
922         When converting coordinates from the main frame to a subframe's document, the position
923         is first converted to the subframe's FrameView coordinate system, then offset by the scroll
924         offset of the subframe itself.
925
926         The bug in this case was that the scroll offset used was the global scroll offset of the frame
927         in the view instead of the scroll offset of the document in its own frameview.
928
929         The regression was introduced by the refactoring r162663. On iOS WebKit1, the coordinate system
930         is different depending on VisibleContentRectIncludesScrollbars. In r162663, the value was set
931         such that the rect returned is always in absolute coordinate.
932
933         The ideal solution would be to refactor ScrollView::platformVisibleContentRect() to always return
934         the offsets in scroll view coordinates and verify and update all the call sites to use explicit
935         conversion to the top frame. In this patch I only reverted the coordinate change of r162663 to avoid
936         large scale impact.
937
938 2014-10-01  Christophe Dumez  <cdumez@apple.com>
939
940         Use is<>() / downcast<>() for File
941         https://bugs.webkit.org/show_bug.cgi?id=137318
942
943         Reviewed by Gyuyoung Kim.
944
945         Use is<>() / downcast<>() for File instead of isFile() / toFile().
946
947         No new tests, no behavior change.
948
949         * fileapi/Blob.h:
950         * fileapi/File.h:
951         (isType):
952         * fileapi/FileReader.cpp:
953         (WebCore::FileReader::readAsArrayBuffer):
954         (WebCore::FileReader::readAsBinaryString):
955         (WebCore::FileReader::readAsText):
956         (WebCore::FileReader::readAsDataURL):
957         * platform/network/FormData.cpp:
958         (WebCore::FormData::appendKeyValuePairItems):
959
960 2014-10-01  Rik Cabanier  <cabanier@adobe.com>
961
962         Add support for midpoint to CSS gradients
963         https://bugs.webkit.org/show_bug.cgi?id=137171
964
965         Reviewed by Darin Adler.
966
967         This patch adds support for gradient midpoints. It also updates the 
968         gradient tests so they use the feature.
969         Spec: http://dev.w3.org/csswg/css-images-4/#color-interpolation-hint
970
971         Tests: fast/gradients/unprefixed-color-stops2.html
972                fast/gradients/unprefixed-gradient-parsing.html
973                fast/gradients/unprefixed-linear-angle-gradients2.html
974                fast/gradients/unprefixed-radial-gradients.html
975                fast/gradients/unprefixed-radial-gradients2.html
976                fast/gradients/unprefixed-repeating-linear-gradient.html
977                fast/gradients/unprefixed-repeating-radial-gradients.html
978
979         * css/CSSGradientValue.cpp:
980         (WebCore::GradientStop::GradientStop): constructor initializes the midpoint variable
981         (WebCore::CSSGradientValue::gradientWithStylesResolved): this function checks for midpoint color stops
982         (WebCore::CSSGradientValue::addStops): this function processes midpoints and converts them to regular color stops
983         (WebCore::CSSLinearGradientValue::customCSSText): this routine was updated to do correct parsing for midpoints
984         (WebCore::CSSRadialGradientValue::customCSSText):
985         * css/CSSGradientValue.h:
986         (WebCore::CSSGradientColorStop::CSSGradientColorStop): this function stores if a stop is a midpoint
987         * css/CSSParser.cpp:
988         (WebCore::CSSParser::parseGradientColorStops): this function now allows color stops with no color
989
990 2014-10-01  Chris Dumez  <cdumez@apple.com>
991
992         Add basic caching for Document.cookie API
993         https://bugs.webkit.org/show_bug.cgi?id=137225
994
995         Reviewed by Alexey Proskuryakov.
996
997         While profiling the load of nytimes.com, I noticed that the site is
998         accessing ~250 times document.cookie, just during page load. Accessing
999         document.cookie is currently slow because we:
1000         - Call WebPlatformStrategies::cookiesForDOM() virtual function
1001         - Send a sync IPC message to the Network process to retrieve the
1002           cookies
1003             - The Network process gets the list of cookies from CFNetwork then
1004               serializes the result to send it back to the WebProcess
1005         - We unserialize the cookies into an NSList of cookies
1006         - We filter-out the cookies that are 'httpOnly' and construct a new
1007           NSList of cookies
1008         - We create a WTF String out of the cookies NSList
1009
1010         In the case of nytimes.com, it turns out that up to 100 calls to
1011         document.cookie() are made in the same event loop iteration. This patch
1012         thus caches / freezes the cookies until we return to the event
1013         loop so that consecutive calls to document.cookie() are extremely fast.
1014         Doing so seems to be sufficient to achieve a ~87% cache hit for
1015         nytimes.com page load.
1016
1017         The cookies cache is invalidated whenever:
1018         - document.cookie is set
1019         - we return to the event loop
1020         - a network resource is loaded synchronously as it may cause cookies to
1021           be set before we return to the event loop
1022
1023         Test: http/tests/cookies/sync-xhr-set-cookie-invalidates-cache.html
1024
1025         * dom/Document.cpp:
1026         (WebCore::Document::Document):
1027         (WebCore::Document::open):
1028         (WebCore::Document::cookie):
1029         (WebCore::Document::setCookie):
1030         (WebCore::Document::setCookieURL):
1031         (WebCore::Document::initSecurityContext):
1032         (WebCore::Document::setDOMCookieCache):
1033         (WebCore::Document::invalidateDOMCookieCache):
1034         (WebCore::Document::domCookieCacheExpiryTimerFired):
1035         (WebCore::Document::didLoadResourceSynchronously):
1036         * dom/Document.h:
1037         (WebCore::Document::domCookieCache):
1038         (WebCore::Document::isDOMCookieCacheValid):
1039         (WebCore::Document::setCookieURL): Deleted.
1040         * dom/ScriptExecutionContext.cpp:
1041         (WebCore::ScriptExecutionContext::didLoadResourceSynchronously):
1042         * dom/ScriptExecutionContext.h:
1043         * loader/ThreadableLoader.cpp:
1044         (WebCore::ThreadableLoader::loadResourceSynchronously):
1045
1046 2014-10-01  Christophe Dumez  <cdumez@apple.com>
1047
1048         Use is<>() / downcast<>() for Event classes
1049         https://bugs.webkit.org/show_bug.cgi?id=137284
1050
1051         Reviewed by Andreas Kling.
1052
1053         Use is<>() / downcast<>() for Event classes.
1054
1055         No new tests, no behavior change.
1056
1057         * bindings/js/JSErrorHandler.cpp:
1058         (WebCore::JSErrorHandler::handleEvent):
1059         * bindings/js/JSEventListener.cpp:
1060         (WebCore::JSEventListener::handleEvent):
1061         * dom/BeforeTextInsertedEvent.h:
1062         * dom/BeforeUnloadEvent.h:
1063         * dom/ErrorEvent.h:
1064         * dom/Event.h:
1065         * dom/EventContext.cpp:
1066         (WebCore::MouseOrFocusEventContext::handleLocalEvents):
1067         * dom/FocusEvent.h:
1068         * dom/KeyboardEvent.cpp:
1069         (WebCore::findKeyboardEvent):
1070         * dom/KeyboardEvent.h:
1071         * dom/MouseEvent.cpp:
1072         (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
1073         * dom/MouseEvent.h:
1074         * dom/Node.cpp:
1075         (WebCore::Node::defaultEventHandler):
1076         * dom/TextEvent.h:
1077         * dom/UIEvent.h:
1078         * dom/WheelEvent.h:
1079         * html/HTMLAnchorElement.cpp:
1080         (WebCore::appendServerMapMousePosition):
1081         (WebCore::HTMLAnchorElement::defaultEventHandler):
1082         (WebCore::HTMLAnchorElement::eventType):
1083         (WebCore::isEnterKeyKeydownEvent):
1084         (WebCore::isLinkClick):
1085         * html/HTMLButtonElement.cpp:
1086         (WebCore::HTMLButtonElement::defaultEventHandler):
1087         * html/HTMLFormElement.cpp:
1088         (WebCore::HTMLFormElement::submitImplicitly):
1089         * html/HTMLFormElement.h:
1090         * html/HTMLFrameSetElement.cpp:
1091         (WebCore::HTMLFrameSetElement::defaultEventHandler):
1092         * html/HTMLInputElement.cpp:
1093         (WebCore::HTMLInputElement::willDispatchEvent):
1094         (WebCore::HTMLInputElement::defaultEventHandler):
1095         * html/HTMLPlugInImageElement.cpp:
1096         (WebCore::HTMLPlugInImageElement::defaultEventHandler):
1097         * html/HTMLSelectElement.cpp:
1098         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
1099         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1100         (WebCore::HTMLSelectElement::defaultEventHandler):
1101         * html/HTMLSummaryElement.cpp:
1102         (WebCore::HTMLSummaryElement::defaultEventHandler):
1103         * html/HTMLTextAreaElement.cpp:
1104         (WebCore::HTMLTextAreaElement::defaultEventHandler):
1105         * html/ImageDocument.cpp:
1106         (WebCore::ImageEventListener::handleEvent):
1107         * html/ImageInputType.cpp:
1108         (WebCore::ImageInputType::handleDOMActivateEvent):
1109         * html/InputType.cpp:
1110         (WebCore::InputType::shouldSubmitImplicitly):
1111         * html/InputType.h:
1112         * html/MediaDocument.cpp:
1113         (WebCore::MediaDocument::defaultEventHandler):
1114         * html/TextFieldInputType.cpp:
1115         (WebCore::TextFieldInputType::shouldSubmitImplicitly):
1116         * html/TextFieldInputType.h:
1117         * html/shadow/MediaControlElementTypes.cpp:
1118         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
1119         * html/shadow/MediaControlElements.cpp:
1120         (WebCore::MediaControlPanelElement::defaultEventHandler):
1121         (WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler):
1122         (WebCore::MediaControlTimelineElement::defaultEventHandler):
1123         * html/shadow/MediaControls.cpp:
1124         (WebCore::MediaControls::containsRelatedTarget):
1125         * html/shadow/MediaControlsApple.cpp:
1126         (WebCore::MediaControlsAppleEventListener::handleEvent):
1127         * html/shadow/SliderThumbElement.cpp:
1128         (WebCore::SliderThumbElement::defaultEventHandler):
1129         * html/shadow/SpinButtonElement.cpp:
1130         (WebCore::SpinButtonElement::defaultEventHandler):
1131         (WebCore::SpinButtonElement::forwardEvent):
1132         * html/shadow/TextControlInnerElements.cpp:
1133         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
1134         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
1135         * inspector/InspectorFrontendHost.cpp:
1136         (WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):
1137         * page/ContextMenuController.cpp:
1138         (WebCore::ContextMenuController::maybeCreateContextMenu):
1139         * page/EventHandler.cpp:
1140         (WebCore::EventHandler::handleTextInputEvent):
1141         * rendering/RenderEmbeddedObject.cpp:
1142         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
1143         (WebCore::RenderEmbeddedObject::handleUnavailablePluginIndicatorEvent):
1144         * rendering/RenderEmbeddedObject.h:
1145         * rendering/RenderSnapshottedPlugIn.cpp:
1146         (WebCore::RenderSnapshottedPlugIn::handleEvent):
1147
1148 2014-10-01  Zan Dobersek  <zdobersek@igalia.com>
1149
1150         [TexMap] Sprinkle range-based for-loops in GraphicsLayerTextureMapper, TextureMapperLayer
1151         https://bugs.webkit.org/show_bug.cgi?id=137271
1152
1153         Reviewed by Sergio Villar Senin.
1154
1155         Switch to using C++11 range-based for-loops in the
1156         GraphicsLayerTextureMapper and TextureMapperLayer classes.
1157
1158         The for loops that remained unchanged either do further computation
1159         with the loop index or must iterate over the container in reverse.
1160
1161         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1162         (WebCore::toTextureMapperLayerVector):
1163         (WebCore::GraphicsLayerTextureMapper::flushCompositingState):
1164         * platform/graphics/texmap/TextureMapperLayer.cpp:
1165         (WebCore::TextureMapperLayer::computeTransformsRecursive):
1166         (WebCore::TextureMapperLayer::paintSelfAndChildren):
1167         (WebCore::TextureMapperLayer::computeOverlapRegions):
1168         (WebCore::TextureMapperLayer::paintUsingOverlapRegions):
1169         (WebCore::TextureMapperLayer::~TextureMapperLayer):
1170         (WebCore::TextureMapperLayer::setChildren):
1171         (WebCore::TextureMapperLayer::descendantsOrSelfHaveRunningAnimations):
1172         (WebCore::TextureMapperLayer::applyAnimationsRecursively):
1173
1174 2014-10-01  Dan Bernstein  <mitz@apple.com>
1175
1176         Windows build fix.
1177
1178         * platform/network/cf/ResourceResponseCFNet.cpp:
1179
1180 2014-10-01  Dan Bernstein  <mitz@apple.com>
1181
1182         REGRESSION (r173423): [iOS] Sites with EV certificates appear as normal HTTPS sites
1183         https://bugs.webkit.org/show_bug.cgi?id=137262
1184
1185         Reviewed by Antti Koivisto.
1186
1187         No new tests, because the API test harness doesn’t run an HTTP server to test against.
1188
1189         * platform/network/cf/ResourceResponseCFNet.cpp:
1190         (WebCore::ResourceResponse::platformCertificateInfo): Return a CertificateInfo initialized
1191         with the certificate array from the response.
1192
1193 2014-09-30  Yusuke Suzuki  <utatane.tea@gmail.com>
1194
1195         CSS JIT: Enable multiple stack references allocation by allocateUninitialized
1196         https://bugs.webkit.org/show_bug.cgi?id=135293
1197
1198         Reviewed by Benjamin Poulain.
1199
1200         * cssjit/StackAllocator.h:
1201         (WebCore::StackAllocator::stackTop):
1202             Add stackTop method to check references are allocated easily.
1203         (WebCore::StackAllocator::allocateUninitialized):
1204
1205 2014-09-30  Chris Dumez  <cdumez@apple.com>
1206
1207         Drop getPtr() overload taking a Document reference in argument
1208         https://bugs.webkit.org/show_bug.cgi?id=137280
1209
1210         Reviewed by Daniel Bates.
1211
1212         Drop getPtr() overload taking a Document reference in argument. This is
1213         no longer needed as the generic getPtr() function converts references
1214         into pointers just fine after r173765.
1215
1216         No new tests, no behavior change.
1217
1218         * dom/Document.h:
1219         (WTF::getPtr): Deleted.
1220
1221 2014-09-30  Brian J. Burg  <burg@cs.washington.edu>
1222
1223         Web Inspector: ErrorString should be passed by reference
1224         https://bugs.webkit.org/show_bug.cgi?id=137257
1225
1226         Reviewed by Joseph Pecoraro.
1227
1228         Pass the leading ErrorString argument by reference, since it is always an out parameter.
1229         Clean up callsites where the error message is written.
1230
1231         No new tests, no behavior changed.
1232
1233         * inspector/CommandLineAPIHost.cpp:
1234         (WebCore::CommandLineAPIHost::clearConsoleMessages):
1235         * inspector/DOMEditor.cpp:
1236         (WebCore::populateErrorString):
1237         (WebCore::DOMEditor::insertBefore):
1238         (WebCore::DOMEditor::removeChild):
1239         (WebCore::DOMEditor::setAttribute):
1240         (WebCore::DOMEditor::removeAttribute):
1241         (WebCore::DOMEditor::setOuterHTML):
1242         (WebCore::DOMEditor::replaceWholeText):
1243         * inspector/DOMEditor.h:
1244         * inspector/InspectorApplicationCacheAgent.cpp:
1245         (WebCore::InspectorApplicationCacheAgent::enable):
1246         (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
1247         (WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
1248         (WebCore::InspectorApplicationCacheAgent::getManifestForFrame):
1249         (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
1250         * inspector/InspectorApplicationCacheAgent.h:
1251         * inspector/InspectorCSSAgent.cpp:
1252         (WebCore::InspectorCSSAgent::enable):
1253         (WebCore::InspectorCSSAgent::disable):
1254         (WebCore::InspectorCSSAgent::didCreateNamedFlow):
1255         (WebCore::InspectorCSSAgent::regionOversetChanged):
1256         (WebCore::InspectorCSSAgent::didRegisterNamedFlowContentElement):
1257         (WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement):
1258         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
1259         (WebCore::InspectorCSSAgent::getInlineStylesForNode):
1260         (WebCore::InspectorCSSAgent::getComputedStyleForNode):
1261         (WebCore::InspectorCSSAgent::getAllStyleSheets):
1262         (WebCore::InspectorCSSAgent::getStyleSheet):
1263         (WebCore::InspectorCSSAgent::getStyleSheetText):
1264         (WebCore::InspectorCSSAgent::setStyleSheetText):
1265         (WebCore::InspectorCSSAgent::setStyleText):
1266         (WebCore::InspectorCSSAgent::setPropertyText):
1267         (WebCore::InspectorCSSAgent::toggleProperty):
1268         (WebCore::InspectorCSSAgent::setRuleSelector):
1269         (WebCore::InspectorCSSAgent::addRule):
1270         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
1271         (WebCore::InspectorCSSAgent::forcePseudoState):
1272         (WebCore::InspectorCSSAgent::getNamedFlowCollection):
1273         (WebCore::InspectorCSSAgent::elementForId):
1274         (WebCore::InspectorCSSAgent::assertStyleSheetForId):
1275         (WebCore::InspectorCSSAgent::buildArrayForRegions):
1276         (WebCore::InspectorCSSAgent::buildObjectForNamedFlow):
1277         * inspector/InspectorCSSAgent.h:
1278         * inspector/InspectorController.cpp:
1279         (WebCore::InspectorController::hideHighlight):
1280         (WebCore::InspectorController::setProfilerEnabled):
1281         (WebCore::InspectorController::resume):
1282         * inspector/InspectorDOMAgent.cpp:
1283         (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
1284         (WebCore::InspectorDOMAgent::assertNode):
1285         (WebCore::InspectorDOMAgent::assertDocument):
1286         (WebCore::InspectorDOMAgent::assertElement):
1287         (WebCore::InspectorDOMAgent::assertEditableNode):
1288         (WebCore::InspectorDOMAgent::assertEditableElement):
1289         (WebCore::InspectorDOMAgent::getDocument):
1290         (WebCore::InspectorDOMAgent::pushNodeToFrontend):
1291         (WebCore::InspectorDOMAgent::requestChildNodes):
1292         (WebCore::InspectorDOMAgent::querySelector):
1293         (WebCore::InspectorDOMAgent::querySelectorAll):
1294         (WebCore::InspectorDOMAgent::releaseBackendNodeIds):
1295         (WebCore::InspectorDOMAgent::setAttributeValue):
1296         (WebCore::InspectorDOMAgent::setAttributesAsText):
1297         (WebCore::InspectorDOMAgent::removeAttribute):
1298         (WebCore::InspectorDOMAgent::removeNode):
1299         (WebCore::InspectorDOMAgent::setNodeName):
1300         (WebCore::InspectorDOMAgent::getOuterHTML):
1301         (WebCore::InspectorDOMAgent::setOuterHTML):
1302         (WebCore::InspectorDOMAgent::setNodeValue):
1303         (WebCore::InspectorDOMAgent::getEventListenersForNode):
1304         (WebCore::InspectorDOMAgent::getAccessibilityPropertiesForNode):
1305         (WebCore::InspectorDOMAgent::performSearch):
1306         (WebCore::InspectorDOMAgent::getSearchResults):
1307         (WebCore::InspectorDOMAgent::discardSearchResults):
1308         (WebCore::InspectorDOMAgent::inspect):
1309         (WebCore::InspectorDOMAgent::setSearchingForNode):
1310         (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
1311         (WebCore::InspectorDOMAgent::setInspectModeEnabled):
1312         (WebCore::InspectorDOMAgent::highlightRect):
1313         (WebCore::InspectorDOMAgent::highlightQuad):
1314         (WebCore::InspectorDOMAgent::highlightNode):
1315         (WebCore::InspectorDOMAgent::highlightFrame):
1316         (WebCore::InspectorDOMAgent::hideHighlight):
1317         (WebCore::InspectorDOMAgent::moveTo):
1318         (WebCore::InspectorDOMAgent::undo):
1319         (WebCore::InspectorDOMAgent::redo):
1320         (WebCore::InspectorDOMAgent::markUndoableState):
1321         (WebCore::InspectorDOMAgent::focus):
1322         (WebCore::InspectorDOMAgent::resolveNode):
1323         (WebCore::InspectorDOMAgent::getAttributes):
1324         (WebCore::InspectorDOMAgent::requestNode):
1325         (WebCore::InspectorDOMAgent::pushNodeByPathToFrontend):
1326         (WebCore::InspectorDOMAgent::pushNodeByBackendIdToFrontend):
1327         * inspector/InspectorDOMAgent.h:
1328         * inspector/InspectorDOMDebuggerAgent.cpp:
1329         (WebCore::InspectorDOMDebuggerAgent::setEventListenerBreakpoint):
1330         (WebCore::InspectorDOMDebuggerAgent::setInstrumentationBreakpoint):
1331         (WebCore::InspectorDOMDebuggerAgent::setBreakpoint):
1332         (WebCore::InspectorDOMDebuggerAgent::removeEventListenerBreakpoint):
1333         (WebCore::InspectorDOMDebuggerAgent::removeInstrumentationBreakpoint):
1334         (WebCore::InspectorDOMDebuggerAgent::removeBreakpoint):
1335         (WebCore::domTypeForName):
1336         (WebCore::InspectorDOMDebuggerAgent::setDOMBreakpoint):
1337         (WebCore::InspectorDOMDebuggerAgent::removeDOMBreakpoint):
1338         (WebCore::InspectorDOMDebuggerAgent::setXHRBreakpoint):
1339         (WebCore::InspectorDOMDebuggerAgent::removeXHRBreakpoint):
1340         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
1341         * inspector/InspectorDOMDebuggerAgent.h:
1342         * inspector/InspectorDOMStorageAgent.cpp:
1343         (WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
1344         (WebCore::InspectorDOMStorageAgent::enable):
1345         (WebCore::InspectorDOMStorageAgent::disable):
1346         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
1347         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
1348         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
1349         (WebCore::InspectorDOMStorageAgent::findStorageArea):
1350         * inspector/InspectorDOMStorageAgent.h:
1351         * inspector/InspectorDatabaseAgent.cpp:
1352         (WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
1353         (WebCore::InspectorDatabaseAgent::enable):
1354         (WebCore::InspectorDatabaseAgent::disable):
1355         (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
1356         (WebCore::InspectorDatabaseAgent::executeSQL):
1357         * inspector/InspectorDatabaseAgent.h:
1358         * inspector/InspectorIndexedDBAgent.cpp:
1359         (WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
1360         (WebCore::InspectorIndexedDBAgent::enable):
1361         (WebCore::InspectorIndexedDBAgent::disable):
1362         (WebCore::assertDocument):
1363         (WebCore::assertIDBFactory):
1364         (WebCore::InspectorIndexedDBAgent::requestDatabaseNames):
1365         (WebCore::InspectorIndexedDBAgent::requestDatabase):
1366         (WebCore::InspectorIndexedDBAgent::requestData):
1367         (WebCore::InspectorIndexedDBAgent::clearObjectStore):
1368         * inspector/InspectorIndexedDBAgent.h:
1369         * inspector/InspectorLayerTreeAgent.cpp:
1370         (WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
1371         (WebCore::InspectorLayerTreeAgent::enable):
1372         (WebCore::InspectorLayerTreeAgent::disable):
1373         (WebCore::InspectorLayerTreeAgent::layersForNode):
1374         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
1375         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy):
1376         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
1377         (WebCore::InspectorLayerTreeAgent::idForNode):
1378         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
1379         * inspector/InspectorLayerTreeAgent.h:
1380         * inspector/InspectorPageAgent.cpp:
1381         (WebCore::InspectorPageAgent::cachedResourceContent):
1382         (WebCore::InspectorPageAgent::resourceContent):
1383         (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
1384         (WebCore::InspectorPageAgent::enable):
1385         (WebCore::InspectorPageAgent::disable):
1386         (WebCore::InspectorPageAgent::addScriptToEvaluateOnLoad):
1387         (WebCore::InspectorPageAgent::removeScriptToEvaluateOnLoad):
1388         (WebCore::InspectorPageAgent::reload):
1389         (WebCore::InspectorPageAgent::navigate):
1390         (WebCore::InspectorPageAgent::getCookies):
1391         (WebCore::InspectorPageAgent::deleteCookie):
1392         (WebCore::InspectorPageAgent::getResourceTree):
1393         (WebCore::InspectorPageAgent::getResourceContent):
1394         (WebCore::InspectorPageAgent::searchInResource):
1395         (WebCore::InspectorPageAgent::searchInResources):
1396         (WebCore::InspectorPageAgent::setDocumentContent):
1397         (WebCore::InspectorPageAgent::setShowPaintRects):
1398         (WebCore::InspectorPageAgent::canShowDebugBorders):
1399         (WebCore::InspectorPageAgent::setShowDebugBorders):
1400         (WebCore::InspectorPageAgent::canShowFPSCounter):
1401         (WebCore::InspectorPageAgent::setShowFPSCounter):
1402         (WebCore::InspectorPageAgent::canContinuouslyPaint):
1403         (WebCore::InspectorPageAgent::setContinuousPaintingEnabled):
1404         (WebCore::InspectorPageAgent::getScriptExecutionStatus):
1405         (WebCore::InspectorPageAgent::setScriptExecutionDisabled):
1406         (WebCore::InspectorPageAgent::assertFrame):
1407         (WebCore::InspectorPageAgent::assertDocumentLoader):
1408         (WebCore::InspectorPageAgent::setTouchEmulationEnabled):
1409         (WebCore::InspectorPageAgent::setEmulatedMedia):
1410         (WebCore::InspectorPageAgent::getCompositingBordersVisible):
1411         (WebCore::InspectorPageAgent::setCompositingBordersVisible):
1412         (WebCore::InspectorPageAgent::snapshotNode):
1413         (WebCore::InspectorPageAgent::snapshotRect):
1414         (WebCore::InspectorPageAgent::handleJavaScriptDialog):
1415         (WebCore::InspectorPageAgent::archive):
1416         * inspector/InspectorPageAgent.h:
1417         * inspector/InspectorReplayAgent.cpp:
1418         (WebCore::InspectorReplayAgent::startCapturing):
1419         (WebCore::InspectorReplayAgent::stopCapturing):
1420         (WebCore::InspectorReplayAgent::replayToPosition):
1421         (WebCore::InspectorReplayAgent::replayToCompletion):
1422         (WebCore::InspectorReplayAgent::pausePlayback):
1423         (WebCore::InspectorReplayAgent::cancelPlayback):
1424         (WebCore::InspectorReplayAgent::switchSession):
1425         (WebCore::InspectorReplayAgent::insertSessionSegment):
1426         (WebCore::InspectorReplayAgent::removeSessionSegment):
1427         (WebCore::InspectorReplayAgent::findSession):
1428         (WebCore::InspectorReplayAgent::findSegment):
1429         (WebCore::InspectorReplayAgent::currentReplayState):
1430         (WebCore::InspectorReplayAgent::getAvailableSessions):
1431         (WebCore::InspectorReplayAgent::getSessionData):
1432         (WebCore::InspectorReplayAgent::getSegmentData):
1433         * inspector/InspectorReplayAgent.h:
1434         * inspector/InspectorResourceAgent.cpp:
1435         (WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
1436         (WebCore::InspectorResourceAgent::~InspectorResourceAgent):
1437         (WebCore::InspectorResourceAgent::enable):
1438         (WebCore::InspectorResourceAgent::disable):
1439         (WebCore::InspectorResourceAgent::setExtraHTTPHeaders):
1440         (WebCore::InspectorResourceAgent::getResponseBody):
1441         (WebCore::InspectorResourceAgent::replayXHR):
1442         (WebCore::InspectorResourceAgent::canClearBrowserCache):
1443         (WebCore::InspectorResourceAgent::clearBrowserCache):
1444         (WebCore::InspectorResourceAgent::canClearBrowserCookies):
1445         (WebCore::InspectorResourceAgent::clearBrowserCookies):
1446         (WebCore::InspectorResourceAgent::setCacheDisabled):
1447         (WebCore::InspectorResourceAgent::loadResource):
1448         * inspector/InspectorResourceAgent.h:
1449         * inspector/InspectorStyleSheet.cpp:
1450         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
1451         * inspector/InspectorTimelineAgent.cpp:
1452         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
1453         (WebCore::InspectorTimelineAgent::start):
1454         (WebCore::InspectorTimelineAgent::stop):
1455         * inspector/InspectorTimelineAgent.h:
1456         * inspector/InspectorWorkerAgent.cpp:
1457         (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
1458         (WebCore::InspectorWorkerAgent::enable):
1459         (WebCore::InspectorWorkerAgent::disable):
1460         (WebCore::InspectorWorkerAgent::canInspectWorkers):
1461         (WebCore::InspectorWorkerAgent::connectToWorker):
1462         (WebCore::InspectorWorkerAgent::disconnectFromWorker):
1463         (WebCore::InspectorWorkerAgent::sendMessageToWorker):
1464         (WebCore::InspectorWorkerAgent::setAutoconnectToWorkers):
1465         * inspector/InspectorWorkerAgent.h:
1466         * inspector/PageConsoleAgent.cpp:
1467         (WebCore::PageConsoleAgent::clearMessages):
1468         (WebCore::PageConsoleAgent::addInspectedNode):
1469         * inspector/PageConsoleAgent.h:
1470         * inspector/PageDebuggerAgent.cpp:
1471         (WebCore::PageDebuggerAgent::injectedScriptForEval):
1472         (WebCore::PageDebuggerAgent::setOverlayMessage):
1473         * inspector/PageDebuggerAgent.h:
1474         * inspector/PageRuntimeAgent.cpp:
1475         (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
1476         (WebCore::PageRuntimeAgent::enable):
1477         (WebCore::PageRuntimeAgent::disable):
1478         (WebCore::PageRuntimeAgent::injectedScriptForEval):
1479         * inspector/PageRuntimeAgent.h:
1480         * inspector/WebConsoleAgent.cpp:
1481         (WebCore::WebConsoleAgent::setMonitoringXHREnabled):
1482         * inspector/WebConsoleAgent.h:
1483         * inspector/WorkerConsoleAgent.cpp:
1484         (WebCore::WorkerConsoleAgent::addInspectedNode):
1485         * inspector/WorkerConsoleAgent.h:
1486         * inspector/WorkerDebuggerAgent.cpp:
1487         (WebCore::WorkerDebuggerAgent::injectedScriptForEval):
1488         * inspector/WorkerDebuggerAgent.h:
1489         * inspector/WorkerInspectorController.cpp:
1490         (WebCore::WorkerInspectorController::resume):
1491         * inspector/WorkerRuntimeAgent.cpp:
1492         (WebCore::WorkerRuntimeAgent::injectedScriptForEval):
1493         (WebCore::WorkerRuntimeAgent::run):
1494         * inspector/WorkerRuntimeAgent.h:
1495
1496 2014-09-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
1497
1498         Stack overflow with enormous SVG filter
1499         https://bugs.webkit.org/show_bug.cgi?id=63290
1500
1501         Prevent building an SVG filter if it has more than 200 FilterEffect nodes in its map 
1502         regardless whether they will be connected to its lastEffect or not. Also discard any
1503         filter which has more 100 contributing FilterEffect nodes in its tree.
1504
1505         Reviewed by Dean Jackson.
1506
1507         Tests: svg/filters/svg-deeply-nested-crash.html
1508
1509         * platform/graphics/filters/FilterEffect.cpp:
1510         (WebCore::collectEffects):
1511         (WebCore::FilterEffect::totalNumberOfEffectInputs):
1512         * platform/graphics/filters/FilterEffect.h:
1513         -- Add a method to return the total number of input FilterEffect's contributing to a FilterEffect.
1514         * rendering/svg/RenderSVGResourceFilter.cpp:
1515         (WebCore::RenderSVGResourceFilter::buildPrimitives):
1516         -- Do not build a filter if it has more than 200 FilterEffects in its map.
1517         (WebCore::RenderSVGResourceFilter::applyResource):
1518         -- Discard a filter after it was built if it has more than 100 FilterEffects in its tree.
1519
1520 2014-09-30  Christophe Dumez  <cdumez@apple.com>
1521
1522         Use is<>() / downcast<>() for ContainerNode
1523         https://bugs.webkit.org/show_bug.cgi?id=137270
1524
1525         Reviewed by Andreas Kling.
1526
1527         Use is<>() / downcast<>() for ContainerNode instead of isContainerNode()
1528         / toContainerNode(). Also kill the NODE_TYPE_CASTS() macro as this was
1529         its last user.
1530
1531         No new tests, no behavior change.
1532
1533         * dom/ContainerNode.cpp:
1534         (WebCore::collectChildrenAndRemoveFromOldParent):
1535         (WebCore::ContainerNode::willRemoveChild):
1536         (WebCore::cloneChildNodesAvoidingDeleteButton):
1537         * dom/ContainerNode.h:
1538         (WebCore::Node::countChildNodes):
1539         (WebCore::Node::traverseToChildAt):
1540         (WebCore::Node::firstChild):
1541         (WebCore::Node::lastChild):
1542         (isType):
1543         (WebCore::isContainerNode): Deleted.
1544         * dom/ContainerNodeAlgorithms.cpp:
1545         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
1546         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
1547         * dom/ContainerNodeAlgorithms.h:
1548         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
1549         (WebCore::ChildNodeInsertionNotifier::notify):
1550         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument):
1551         (WebCore::ChildNodeRemovalNotifier::notify):
1552         * dom/Node.cpp:
1553         (WebCore::Node::childNodes):
1554         (WebCore::Node::insertBefore):
1555         (WebCore::Node::replaceChild):
1556         (WebCore::Node::removeChild):
1557         (WebCore::Node::appendChild):
1558         (WebCore::Node::setTextContent):
1559         * dom/Node.h:
1560         * dom/Range.cpp:
1561         (WebCore::Range::surroundContents):
1562         * dom/TextNodeTraversal.cpp:
1563         (WebCore::TextNodeTraversal::contentsAsString):
1564         * editing/ApplyStyleCommand.cpp:
1565         (WebCore::ApplyStyleCommand::applyBlockStyle):
1566         * editing/CompositeEditCommand.cpp:
1567         (WebCore::CompositeEditCommand::insertNodeAt):
1568         * editing/Editor.cpp:
1569         (WebCore::correctSpellcheckingPreservingTextCheckingParagraph):
1570         * html/MediaDocument.cpp:
1571         (WebCore::MediaDocument::defaultEventHandler):
1572         * html/parser/HTMLConstructionSite.h:
1573         (WebCore::HTMLConstructionSiteTask::oldParent):
1574         * html/track/VTTCue.cpp:
1575         (WebCore::VTTCue::copyWebVTTNodeToDOMTree):
1576         * inspector/InspectorDOMAgent.cpp:
1577         (WebCore::InspectorDOMAgent::querySelector):
1578         (WebCore::InspectorDOMAgent::querySelectorAll):
1579         * inspector/InspectorNodeFinder.cpp:
1580         (WebCore::InspectorNodeFinder::searchUsingCSSSelectors):
1581
1582 2014-09-30  Roger Fong  <roger_fong@apple.com>
1583
1584         [Windows] Remove an errant WTFLogAlways that makes test output hard to read and generates stderr output.
1585
1586         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
1587         (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading):
1588
1589 2014-09-30  David Hyatt  <hyatt@apple.com>
1590
1591         Remove a multicolumn ASSERT and replace with a guard.
1592         https://bugs.webkit.org/show_bug.cgi?id=137272
1593         
1594         Reviewed by Alexey Proskuryakov.
1595
1596         * rendering/RenderMultiColumnFlowThread.cpp:
1597         (WebCore::isValidColumnSpanner):
1598         For now remove the assert that is tripping and replace it with a guard
1599         until we can figure out why it's getting hit.
1600
1601 2014-09-30  Christophe Dumez  <cdumez@apple.com>
1602
1603         Generalize is<>() / downcast<>() support to all types
1604         https://bugs.webkit.org/show_bug.cgi?id=137243
1605
1606         Reviewed by Benjamin Poulain.
1607
1608         Generalize is<>() / downcast<>() support to all types, not just Nodes.
1609         To achieve this, the following changes were made:
1610         - Move is<> / downcast<>() and NodeTypeCastTraits from Node.h to a new
1611           wtf/TypeCasts.h header. Also move them to WTF namespace instead of
1612           WebCore namespace as they can be used for classes in other namespaces
1613           (e.g. WebKit namespace).
1614         - Rename NodeTypeCastsTraits to TypeCastTraits as it can be specialized
1615           for non-Nodes.
1616         - Since C++ does not allow template specializations in different
1617           namespaces, I had to move all the SPECIALIZE_TYPE_TRAITS_*() uses to
1618           the global scope and use the WebCore:: namespace explicitly in those.
1619           This is a bit unfortunate but I couldn't find a better way.
1620
1621         This patch also takes care of supporting is<>() / downcast<>() for
1622         the WorkerGlobalScope class, which does not derive from Node.
1623
1624         No new tests, no behavior change.
1625
1626         * Modules/indexeddb/IDBFactory.cpp:
1627         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
1628         (WebCore::WorkerGlobalScopeIndexedDatabase::from):
1629         * Modules/websockets/ThreadableWebSocketChannel.cpp:
1630         (WebCore::ThreadableWebSocketChannel::create):
1631         * bindings/js/JSDOMGlobalObject.cpp:
1632         (WebCore::toJSDOMGlobalObject):
1633         * bindings/js/JSEventListener.cpp:
1634         (WebCore::JSEventListener::handleEvent):
1635         * bindings/js/ScheduledAction.cpp:
1636         (WebCore::ScheduledAction::execute):
1637         * dom/Attr.h:
1638         (isType):
1639         (WebCore::isAttr): Deleted.
1640         * dom/CDATASection.h:
1641         (isType):
1642         (WebCore::isCDATASection): Deleted.
1643         * dom/CharacterData.h:
1644         (isType):
1645         (WebCore::isCharacterData): Deleted.
1646         * dom/Comment.h:
1647         (isType):
1648         (WebCore::isComment): Deleted.
1649         * dom/Document.h:
1650         (isType):
1651         (WebCore::isDocument): Deleted.
1652         * dom/DocumentFragment.h:
1653         (isType):
1654         (WebCore::isDocumentFragment): Deleted.
1655         * dom/DocumentType.h:
1656         (isType):
1657         (WebCore::isDocumentType): Deleted.
1658         * dom/Element.h:
1659         * dom/MessagePort.cpp:
1660         (WebCore::MessagePort::dispatchMessages):
1661         * dom/Node.h:
1662         (WebCore::is): Deleted.
1663         (WebCore::downcast): Deleted.
1664         * dom/ProcessingInstruction.h:
1665         (isType):
1666         (WebCore::isProcessingInstruction): Deleted.
1667         * dom/PseudoElement.h:
1668         (isType):
1669         (WebCore::isPseudoElement): Deleted.
1670         * dom/ScriptExecutionContext.cpp:
1671         (WebCore::ScriptExecutionContext::createdMessagePort):
1672         (WebCore::ScriptExecutionContext::destroyedMessagePort):
1673         (WebCore::ScriptExecutionContext::vm):
1674         * dom/ScriptExecutionContext.h:
1675         * dom/ShadowRoot.h:
1676         (isType):
1677         (WebCore::isShadowRoot): Deleted.
1678         * dom/StyledElement.h:
1679         (isType):
1680         (WebCore::isStyledElement): Deleted.
1681         * dom/Text.h:
1682         (isType):
1683         (WebCore::isText): Deleted.
1684         * dom/make_names.pl:
1685         (printTypeHelpers):
1686         (printTypeHelpersHeaderFile):
1687         * html/HTMLDocument.h:
1688         (isType):
1689         (WebCore::isHTMLDocument): Deleted.
1690         * html/HTMLElement.h:
1691         (isType):
1692         (WebCore::isHTMLElement): Deleted.
1693         * html/HTMLFormControlElement.h:
1694         (isType):
1695         (WebCore::isHTMLFormControlElement): Deleted.
1696         * html/HTMLFrameElementBase.h:
1697         (isType):
1698         (WebCore::isHTMLFrameElementBase): Deleted.
1699         * html/HTMLFrameOwnerElement.h:
1700         (isType):
1701         (WebCore::isHTMLFrameOwnerElement): Deleted.
1702         * html/HTMLMediaElement.h:
1703         (isType):
1704         (WebCore::isHTMLMediaElement): Deleted.
1705         * html/HTMLPlugInElement.h:
1706         (isType):
1707         (WebCore::isHTMLPlugInElement): Deleted.
1708         * html/HTMLPlugInImageElement.h:
1709         (isType):
1710         (WebCore::isHTMLPlugInImageElement): Deleted.
1711         * html/HTMLTableCellElement.h:
1712         (isType):
1713         (WebCore::isHTMLTableCellElement): Deleted.
1714         * html/HTMLTableSectionElement.h:
1715         (isType):
1716         (WebCore::isHTMLTableSectionElement): Deleted.
1717         * html/HTMLTextFormControlElement.h:
1718         (isType):
1719         (WebCore::isHTMLTextFormControlElement): Deleted.
1720         * html/ImageDocument.h:
1721         (isType):
1722         (WebCore::isImageDocument): Deleted.
1723         * html/LabelableElement.h:
1724         (isType):
1725         (WebCore::isLabelableElement): Deleted.
1726         * html/MediaDocument.h:
1727         (isType):
1728         (WebCore::isMediaDocument): Deleted.
1729         * html/PluginDocument.h:
1730         (isType):
1731         (WebCore::isPluginDocument): Deleted.
1732         * html/shadow/InsertionPoint.h:
1733         (isType):
1734         (WebCore::isInsertionPoint): Deleted.
1735         * html/shadow/TextControlInnerElements.h:
1736         (isType):
1737         (WebCore::isTextControlInnerTextElement): Deleted.
1738         * html/track/WebVTTElement.h:
1739         (isType):
1740         (WebCore::isWebVTTElement): Deleted.
1741         * inspector/InspectorInstrumentation.cpp:
1742         (WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
1743         * loader/ThreadableLoader.cpp:
1744         (WebCore::ThreadableLoader::create):
1745         (WebCore::ThreadableLoader::loadResourceSynchronously):
1746         * loader/cache/MemoryCache.cpp:
1747         (WebCore::MemoryCache::removeRequestFromCache):
1748         (WebCore::MemoryCache::removeRequestFromSessionCaches):
1749         * mathml/MathMLElement.h:
1750         (isType):
1751         (WebCore::isMathMLElement): Deleted.
1752         * svg/SVGAnimateElementBase.h:
1753         (isType):
1754         (WebCore::isSVGAnimateElementBase): Deleted.
1755         * svg/SVGDocument.h:
1756         (isType):
1757         (WebCore::isSVGDocument): Deleted.
1758         * svg/SVGElement.h:
1759         (isType):
1760         (WebCore::isSVGElement): Deleted.
1761         * svg/SVGFilterPrimitiveStandardAttributes.h:
1762         (isType):
1763         (WebCore::isSVGFilterPrimitiveStandardAttributes): Deleted.
1764         * svg/SVGGradientElement.h:
1765         (isType):
1766         (WebCore::isSVGGradientElement): Deleted.
1767         * svg/SVGGraphicsElement.h:
1768         (isType):
1769         (WebCore::isSVGGraphicsElement): Deleted.
1770         * svg/SVGPolyElement.h:
1771         (isType):
1772         (WebCore::isSVGPolyElement): Deleted.
1773         * svg/SVGTextContentElement.h:
1774         (isType):
1775         (WebCore::isSVGTextContentElement): Deleted.
1776         * svg/animation/SVGSMILElement.h:
1777         (isType):
1778         (WebCore::isSVGSMILElement): Deleted.
1779         * workers/DefaultSharedWorkerRepository.cpp:
1780         (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
1781         * workers/WorkerGlobalScope.cpp:
1782         (WebCore::WorkerGlobalScope::close):
1783         * workers/WorkerGlobalScope.h:
1784         (isType):
1785         * workers/WorkerMessagingProxy.cpp:
1786         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
1787         (WebCore::WorkerMessagingProxy::~WorkerMessagingProxy):
1788         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
1789         (WebCore::WorkerMessagingProxy::connectToInspector):
1790         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
1791         (WebCore::WorkerMessagingProxy::sendMessageToInspector):
1792         * workers/WorkerScriptLoader.cpp:
1793         (WebCore::WorkerScriptLoader::loadSynchronously):
1794         * workers/WorkerThread.cpp:
1795         (WebCore::WorkerThread::stop):
1796
1797 2014-09-30  Chris Dumez  <cdumez@apple.com>
1798
1799         Use is<>() / downcast<>() for Element
1800         https://bugs.webkit.org/show_bug.cgi?id=137241
1801
1802         Reviewed by Andreas Kling.
1803
1804         Use is<>() / downcast<>() for Element instead of isElementNode() /
1805         toElement().
1806
1807         No new tests, no behavior change.
1808
1809         * accessibility/AXObjectCache.cpp:
1810         (WebCore::nodeHasRole):
1811         (WebCore::createFromRenderer):
1812         (WebCore::AXObjectCache::handleLiveRegionCreated):
1813         (WebCore::AXObjectCache::handleMenuItemSelected):
1814         (WebCore::AXObjectCache::rootAXEditableElement):
1815         (WebCore::isNodeAriaVisible):
1816         * accessibility/AccessibilityMenuList.cpp:
1817         (WebCore::AccessibilityMenuList::canSetFocusAttribute):
1818         * accessibility/AccessibilityNodeObject.cpp:
1819         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
1820         (WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
1821         (WebCore::AccessibilityNodeObject::isEnabled):
1822         (WebCore::AccessibilityNodeObject::isPressed):
1823         (WebCore::AccessibilityNodeObject::isHovered):
1824         (WebCore::AccessibilityNodeObject::anchorElement):
1825         (WebCore::nativeActionElement):
1826         (WebCore::AccessibilityNodeObject::actionElement):
1827         (WebCore::AccessibilityNodeObject::mouseButtonListener):
1828         (WebCore::AccessibilityNodeObject::titleElementText):
1829         (WebCore::AccessibilityNodeObject::helpText):
1830         (WebCore::AccessibilityNodeObject::hierarchicalLevel):
1831         (WebCore::AccessibilityNodeObject::title):
1832         (WebCore::AccessibilityNodeObject::text):
1833         (WebCore::accessibleNameForNode):
1834         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
1835         * accessibility/AccessibilityObject.cpp:
1836         (WebCore::AccessibilityObject::press):
1837         (WebCore::AccessibilityObject::hasTagName):
1838         (WebCore::AccessibilityObject::hasAttribute):
1839         (WebCore::AccessibilityObject::element):
1840         (WebCore::AccessibilityObject::classList):
1841         * accessibility/AccessibilityRenderObject.cpp:
1842         (WebCore::AccessibilityRenderObject::anchorElement):
1843         (WebCore::AccessibilityRenderObject::helpText):
1844         (WebCore::AccessibilityRenderObject::checkboxOrRadioRect):
1845         (WebCore::AccessibilityRenderObject::titleUIElement):
1846         (WebCore::AccessibilityRenderObject::accessKey):
1847         (WebCore::AccessibilityRenderObject::setElementAttributeValue):
1848         (WebCore::AccessibilityRenderObject::setFocused):
1849         (WebCore::AccessibilityRenderObject::setValue):
1850         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
1851         (WebCore::AccessibilityRenderObject::correspondingLabelForControlElement):
1852         (WebCore::AccessibilityRenderObject::renderObjectIsObservable):
1853         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
1854         (WebCore::AccessibilityRenderObject::setAccessibleName):
1855         (WebCore::AccessibilityRenderObject::stringRoleForMSAA):
1856         * accessibility/AccessibilitySearchFieldButtons.cpp:
1857         (WebCore::AccessibilitySearchFieldCancelButton::press):
1858         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1859         (webkitAccessibleGetAttributes):
1860         * bindings/gobject/WebKitDOMPrivate.cpp:
1861         (WebKit::wrap):
1862         * bindings/js/JSNodeCustom.cpp:
1863         (WebCore::isReachableFromDOM):
1864         * css/CSSComputedStyleDeclaration.cpp:
1865         (WebCore::ComputedStyleExtractor::styledNode):
1866         * css/StyleResolver.cpp:
1867         (WebCore::StyleResolver::locateCousinList):
1868         * dom/ContainerNode.cpp:
1869         (WebCore::destroyRenderTreeIfNeeded):
1870         (WebCore::ContainerNode::notifyChildRemoved):
1871         * dom/ContainerNodeAlgorithms.cpp:
1872         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
1873         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
1874         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
1875         (WebCore::assertConnectedSubrameCountIsConsistent):
1876         * dom/Document.cpp:
1877         (WebCore::Document::importNode):
1878         (WebCore::Document::elementFromPoint):
1879         * dom/DocumentStyleSheetCollection.cpp:
1880         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
1881         * dom/Element.cpp:
1882         (WebCore::Element::computeInheritedLanguage):
1883         * dom/Element.h:
1884         (WebCore::isElement):
1885         (WebCore::Node::hasAttributes):
1886         (WebCore::Node::attributes):
1887         (WebCore::Node::parentElement):
1888         * dom/ElementTraversal.h:
1889         (WebCore::Traversal<Element>::nextTemplate):
1890         (WebCore::ElementTraversal::previousIncludingPseudo):
1891         (WebCore::ElementTraversal::nextIncludingPseudo):
1892         (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
1893         (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
1894         * dom/LiveNodeList.cpp:
1895         (WebCore::LiveNodeList::namedItem):
1896         * dom/Node.cpp:
1897         (WebCore::Node::dumpStatistics):
1898         (WebCore::Node::normalize):
1899         (WebCore::Node::pseudoAwareFirstChild):
1900         (WebCore::Node::pseudoAwareLastChild):
1901         (WebCore::Node::computedStyle):
1902         (WebCore::Node::parentOrShadowHostElement):
1903         (WebCore::Node::rootEditableElement):
1904         (WebCore::Node::isEqualNode):
1905         (WebCore::Node::isDefaultNamespace):
1906         (WebCore::Node::lookupNamespacePrefix):
1907         (WebCore::Node::ancestorElement):
1908         (WebCore::appendAttributeDesc):
1909         (WebCore::Node::showNodePathForThis):
1910         (WebCore::Node::enclosingLinkEventParentOrSelf):
1911         (WebCore::Node::handleLocalEvents):
1912         (WebCore::Node::willRespondToMouseMoveEvents):
1913         (WebCore::Node::willRespondToMouseClickEvents):
1914         * dom/NodeRenderingTraversal.cpp:
1915         (WebCore::NodeRenderingTraversal::nodeCanBeDistributed):
1916         * dom/Position.cpp:
1917         (WebCore::Position::element):
1918         * dom/Range.cpp:
1919         (WebCore::Range::getBorderAndTextQuads):
1920         * dom/ShadowRoot.h:
1921         (WebCore::Node::shadowRoot):
1922         * dom/StaticNodeList.cpp:
1923         (WebCore::StaticNodeList::namedItem):
1924         * dom/TreeScopeAdopter.cpp:
1925         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
1926         * editing/ApplyStyleCommand.cpp:
1927         (WebCore::dummySpanAncestorForNode):
1928         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
1929         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
1930         (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
1931         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
1932         (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
1933         * editing/BreakBlockquoteCommand.cpp:
1934         (WebCore::BreakBlockquoteCommand::doApply):
1935         * editing/CompositeEditCommand.cpp:
1936         (WebCore::CompositeEditCommand::isRemovableBlock):
1937         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
1938         (WebCore::CompositeEditCommand::moveParagraphs):
1939         * editing/DeleteSelectionCommand.cpp:
1940         (WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
1941         * editing/Editor.cpp:
1942         (WebCore::Editor::isSpellCheckingEnabledFor):
1943         (WebCore::Editor::applyEditingStyleToBodyElement):
1944         * editing/FormatBlockCommand.cpp:
1945         (WebCore::isElementForFormatBlock):
1946         (WebCore::FormatBlockCommand::elementForFormatBlockCommand):
1947         * editing/FrameSelection.cpp:
1948         (WebCore::removingNodeRemovesPosition):
1949         (WebCore::CaretBase::paintCaret):
1950         (WebCore::FrameSelection::debugRenderer):
1951         * editing/IndentOutdentCommand.cpp:
1952         (WebCore::IndentOutdentCommand::outdentParagraph):
1953         * editing/InsertParagraphSeparatorCommand.cpp:
1954         (WebCore::InsertParagraphSeparatorCommand::doApply):
1955         * editing/MarkupAccumulator.cpp:
1956         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
1957         (WebCore::MarkupAccumulator::appendStartMarkup):
1958         * editing/MarkupAccumulator.h:
1959         (WebCore::MarkupAccumulator::appendEndTag):
1960         * editing/ModifySelectionListLevel.cpp:
1961         (WebCore::IncreaseSelectionListLevelCommand::doApply):
1962         * editing/ReplaceSelectionCommand.cpp:
1963         (WebCore::isMailPasteAsQuotationNode):
1964         (WebCore::haveSameTagName):
1965         (WebCore::handleStyleSpansBeforeInsertion):
1966         (WebCore::ReplaceSelectionCommand::doApply):
1967         * editing/SpellChecker.cpp:
1968         (WebCore::SpellChecker::isCheckable):
1969         * editing/SplitTextNodeContainingElementCommand.cpp:
1970         (WebCore::SplitTextNodeContainingElementCommand::doApply):
1971         * editing/TextIterator.cpp:
1972         (WebCore::isRendererReplacedElement):
1973         * editing/cocoa/HTMLConverter.mm:
1974         (HTMLConverterCaches::propertyValueForNode):
1975         (HTMLConverterCaches::floatPropertyValueForNode):
1976         (HTMLConverterCaches::colorPropertyValueForNode):
1977         (HTMLConverter::aggregatedAttributesForAncestors):
1978         (HTMLConverter::aggregatedAttributesForElementAndItsAncestors):
1979         (HTMLConverter::_traverseNode):
1980         (WebCore::editingAttributedStringFromRange):
1981         * editing/htmlediting.cpp:
1982         (WebCore::unsplittableElementForPosition):
1983         (WebCore::enclosingBlock):
1984         (WebCore::enclosingElementWithTag):
1985         (WebCore::enclosingTableCell):
1986         (WebCore::enclosingAnchorElement):
1987         (WebCore::areIdenticalElements):
1988         (WebCore::isNonTableCellHTMLBlockElement):
1989         (WebCore::deprecatedEnclosingBlockFlowElement):
1990         (WebCore::rendererForCaretPainting):
1991         * editing/markup.cpp:
1992         (WebCore::StyledMarkupAccumulator::wrapWithNode):
1993         (WebCore::createMarkupInternal):
1994         (WebCore::createFragmentFromText):
1995         * html/HTMLDetailsElement.cpp:
1996         (WebCore::DetailsSummaryElement::fallbackSummary):
1997         * html/HTMLElement.cpp:
1998         (WebCore::HTMLElement::insertAdjacentElement):
1999         (WebCore::contextElementForInsertion):
2000         (WebCore::HTMLElement::directionality):
2001         * html/HTMLFormControlElement.h:
2002         (WebCore::isHTMLFormControlElement):
2003         * html/HTMLMediaElement.h:
2004         (WebCore::isHTMLMediaElement):
2005         * html/HTMLObjectElement.cpp:
2006         (WebCore::HTMLObjectElement::updateDocNamedItem):
2007         * html/HTMLOptionElement.cpp:
2008         (WebCore::HTMLOptionElement::collectOptionInnerText):
2009         * html/HTMLSourceElement.cpp:
2010         (WebCore::HTMLSourceElement::removedFrom):
2011         * html/HTMLSummaryElement.cpp:
2012         (WebCore::isClickableControl):
2013         * html/HTMLTextFormControlElement.h:
2014         (WebCore::isHTMLTextFormControlElement):
2015         * html/parser/HTMLConstructionSite.cpp:
2016         (WebCore::HTMLConstructionSite::attachLater):
2017         * html/parser/HTMLElementStack.cpp:
2018         (WebCore::HTMLElementStack::htmlElement):
2019         * html/parser/HTMLStackItem.h:
2020         (WebCore::HTMLStackItem::element):
2021         * html/shadow/InsertionPoint.h:
2022         (WebCore::parentElementForDistribution):
2023         (WebCore::shadowRootOfParentForDistribution):
2024         * html/shadow/MediaControlElements.cpp:
2025         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler):
2026         * html/track/VTTCue.cpp:
2027         (WebCore::VTTCue::markFutureAndPastNodes):
2028         * inspector/DOMPatchSupport.cpp:
2029         (WebCore::DOMPatchSupport::innerPatchNode):
2030         (WebCore::DOMPatchSupport::createDigest):
2031         * inspector/InspectorCSSAgent.cpp:
2032         (WebCore::InspectorCSSAgent::elementForId):
2033         (WebCore::InspectorCSSAgent::buildArrayForRegions):
2034         (WebCore::InspectorCSSAgent::resetPseudoStates):
2035         * inspector/InspectorDOMAgent.cpp:
2036         (WebCore::InspectorDOMAgent::unbind):
2037         (WebCore::InspectorDOMAgent::assertElement):
2038         (WebCore::InspectorDOMAgent::setAttributesAsText):
2039         (WebCore::InspectorDOMAgent::setNodeName):
2040         (WebCore::InspectorDOMAgent::buildObjectForNode):
2041         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
2042         (WebCore::InspectorDOMAgent::didInvalidateStyleAttr):
2043         * inspector/InspectorNodeFinder.cpp:
2044         (WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal):
2045         * inspector/InspectorOverlay.cpp:
2046         (WebCore::buildObjectForElementInfo):
2047         * inspector/InspectorStyleSheet.cpp:
2048         (WebCore::InspectorStyleSheet::inlineStyleSheetText):
2049         * page/DragController.cpp:
2050         (WebCore::elementUnderMouse):
2051         * page/EventHandler.cpp:
2052         (WebCore::findDropZone):
2053         (WebCore::EventHandler::updateDragAndDrop):
2054         (WebCore::EventHandler::updateMouseEventTargetNode):
2055         * page/FocusController.cpp:
2056         (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
2057         (WebCore::isFocusableShadowHost):
2058         (WebCore::adjustedTabIndex):
2059         (WebCore::FocusController::findFocusableElementAcrossFocusScope):
2060         (WebCore::FocusController::findElementWithExactTabIndex):
2061         (WebCore::nextElementWithGreaterTabIndex):
2062         (WebCore::previousElementWithLowerTabIndex):
2063         (WebCore::FocusController::nextFocusableElement):
2064         (WebCore::FocusController::previousFocusableElement):
2065         (WebCore::FocusController::advanceFocusDirectionallyInContainer):
2066         * page/PageSerializer.cpp:
2067         (WebCore::PageSerializer::serializeFrame):
2068         * rendering/HitTestResult.cpp:
2069         (WebCore::HitTestResult::title):
2070         (WebCore::HitTestResult::innerTextIfTruncated):
2071         (WebCore::HitTestResult::absoluteImageURL):
2072         (WebCore::HitTestResult::innerElement):
2073         (WebCore::HitTestResult::innerNonSharedElement):
2074         * rendering/RenderDeprecatedFlexibleBox.h:
2075         * rendering/RenderDetailsMarker.cpp:
2076         (WebCore::RenderDetailsMarker::isOpen):
2077         * rendering/RenderElement.h:
2078         (WebCore::RenderElement::element):
2079         (WebCore::RenderElement::nonPseudoElement):
2080         (WebCore::RenderElement::generatingElement):
2081         * rendering/RenderGrid.h:
2082         * rendering/RenderLayerBacking.cpp:
2083         (WebCore::isRestartedPlugin):
2084         * rendering/RenderListItem.h:
2085         * rendering/RenderNamedFlowThread.cpp:
2086         (WebCore::RenderNamedFlowThread::isChildAllowed):
2087         * rendering/RenderObject.cpp:
2088         (WebCore::RenderObject::addPDFURLRect):
2089         (WebCore::RenderObject::updateDragState):
2090         (WebCore::RenderObject::getUncachedPseudoStyle):
2091         * rendering/RenderRuby.h:
2092         * rendering/RenderRubyText.h:
2093         * rendering/RenderTableCaption.h:
2094         * rendering/RenderTableCol.h:
2095         * rendering/RenderTheme.cpp:
2096         (WebCore::RenderTheme::isEnabled):
2097         (WebCore::RenderTheme::isFocused):
2098         (WebCore::RenderTheme::isPressed):
2099         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
2100         (WebCore::RenderTheme::isReadOnlyControl):
2101         (WebCore::RenderTheme::isHovered):
2102         (WebCore::RenderTheme::isSpinUpButtonPartHovered):
2103         * rendering/RenderThemeGtk.cpp:
2104         (WebCore::nodeHasClass):
2105         * rendering/RenderThemeMac.mm:
2106         (WebCore::RenderThemeMac::updatePressedState):
2107         (WebCore::RenderThemeMac::paintSliderThumb):
2108         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
2109         * rendering/RenderTreeAsText.cpp:
2110         (WebCore::RenderTreeAsText::writeRenderObject):
2111         * rendering/TextAutosizer.cpp:
2112         (WebCore::TextAutosizer::isAutosizingContainer):
2113         (WebCore::TextAutosizer::containerContainsOneOfTags):
2114         * rendering/mathml/RenderMathMLBlock.cpp:
2115         (WebCore::RenderMathMLBlock::isChildAllowed):
2116         * style/StyleResolveTree.cpp:
2117         (WebCore::Style::attachChildren):
2118         (WebCore::Style::attachDistributedChildren):
2119         (WebCore::Style::detachDistributedChildren):
2120         (WebCore::Style::detachChildren):
2121         (WebCore::Style::resolveShadowTree):
2122         (WebCore::Style::resolveTree):
2123         * svg/SVGUseElement.cpp:
2124         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
2125         * svg/animation/SVGSMILElement.cpp:
2126         (WebCore::SVGSMILElement::buildPendingResource):
2127         * xml/XPathFunctions.cpp:
2128         (WebCore::XPath::FunLang::evaluate):
2129         * xml/XPathNodeSet.cpp:
2130         (WebCore::XPath::NodeSet::traversalSort):
2131         * xml/XPathStep.cpp:
2132         (WebCore::XPath::nodeMatchesBasicTest):
2133         (WebCore::XPath::Step::nodesInAxis):
2134         * xml/parser/XMLDocumentParserLibxml2.cpp:
2135         (WebCore::XMLDocumentParser::XMLDocumentParser):
2136         (WebCore::XMLDocumentParser::endElementNs):
2137
2138 2014-09-30  Brian J. Burg  <burg@cs.washington.edu>
2139
2140         Web Replay: use static Strings instead of AtomicStrings for replay input type tags
2141         https://bugs.webkit.org/show_bug.cgi?id=137086
2142
2143         Reviewed by Joseph Pecoraro.
2144
2145         This pattern doesn't work when we want to define some inputs in WebKit2,
2146         since the ReplayInputTypes class is generated from WebCore inputs only.
2147
2148         Replace tag-checking uses of ReplayInputTypes with InputTraits<T>::type().
2149         Remove thread-local input types, and switch to using a plain const String instead
2150         of const AtomicString.
2151
2152         No new tests, no behavior changed.
2153
2154         * CMakeLists.txt:
2155         * WebCore.xcodeproj/project.pbxproj:
2156         * inspector/InspectorReplayAgent.cpp:
2157         (WebCore::SerializeInputToJSONFunctor::operator()):
2158         * platform/ThreadGlobalData.cpp:
2159         (WebCore::ThreadGlobalData::ThreadGlobalData):
2160         (WebCore::ThreadGlobalData::destroy):
2161         * platform/ThreadGlobalData.h:
2162         (WebCore::ThreadGlobalData::inputTypes): Deleted.
2163         * replay/AllReplayInputs.h:
2164         * replay/EventLoopInput.h:
2165         * replay/EventLoopInputDispatcher.cpp:
2166         (WebCore::EventLoopInputDispatcher::dispatchInput):
2167         * replay/MemoizedDOMResult.cpp:
2168         (WebCore::MemoizedDOMResultBase::type):
2169         (JSC::InputTraits<MemoizedDOMResultBase>::type):
2170         * replay/MemoizedDOMResult.h:
2171         * replay/ReplayInputTypes.cpp: Removed.
2172         * replay/ReplayInputTypes.h: Removed.
2173         * replay/ReplayingInputCursor.cpp:
2174         (WebCore::ReplayingInputCursor::loadInput):
2175         * replay/SegmentedInputStorage.cpp:
2176         (WebCore::SegmentedInputStorage::load):
2177         (WebCore::SegmentedInputStorage::store):
2178         * replay/SerializationMethods.cpp:
2179         (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
2180         (JSC::EncodingTraits<NondeterministicInputBase>::decodeValue):
2181
2182 2014-09-30  Eric Carlson  <eric.carlson@apple.com>
2183
2184         [Mac] MediaPlayerPrivateQTKit should not use FrameView
2185         https://bugs.webkit.org/show_bug.cgi?id=137119
2186
2187         Reviewed by Carlos Garcia Campos.
2188
2189         Remove obsolete QTKit code that would fall back to rendering into an NSView.
2190         Aside from being dead code, it was only used when accelerated compositing
2191         was not enabled and tha hasn't been possible for a long time, it required a
2192         layering violation to get the FrameView.
2193
2194         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2195         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2196         (WebCore::MediaPlayerPrivateQTKit::currentRenderingMode):
2197         (WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
2198         (WebCore::MediaPlayerPrivateQTKit::setUpVideoRendering):
2199         (WebCore::MediaPlayerPrivateQTKit::tearDownVideoRendering):
2200         (WebCore::MediaPlayerPrivateQTKit::hasSetUpVideoRendering):
2201         (WebCore::MediaPlayerPrivateQTKit::setSize):
2202         (WebCore::MediaPlayerPrivateQTKit::paint):
2203         (WebCore::mainThreadSetNeedsDisplay): Deleted.
2204         (WebCore::MediaPlayerPrivateQTKit::createQTMovieView): Deleted.
2205         (WebCore::MediaPlayerPrivateQTKit::detachQTMovieView): Deleted.
2206         (-[WebCoreMovieObserver menuForEventDelegate:]): Deleted.
2207         (-[WebCoreMovieObserver setView:]): Deleted.
2208
2209 2014-09-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2210
2211         [GTK] Move GtkPopupMenu implementation to WebPopupMenuProxyGtk
2212         https://bugs.webkit.org/show_bug.cgi?id=137193
2213
2214         Reviewed by Gustavo Noronha Silva.
2215
2216         Remove GtkPopupMenu from platform.
2217
2218         * PlatformGTK.cmake:
2219         * platform/gtk/GtkPopupMenu.cpp: Removed.
2220         * platform/gtk/GtkPopupMenu.h: Removed.
2221
2222 2014-09-30  Zan Dobersek  <zdobersek@igalia.com>
2223
2224         Avoid copying the iterated-over items in range-based for-loops in RenderGrid
2225         https://bugs.webkit.org/show_bug.cgi?id=137246
2226
2227         Reviewed by Sergio Villar Senin.
2228
2229         Adjust the range-based for-loops in RenderGrid to avoid the unnecessary copying
2230         of the items that are being iterated.
2231
2232         * rendering/RenderGrid.cpp:
2233         (WebCore::RenderGrid::computeNormalizedFractionBreadth):
2234         (WebCore::RenderGrid::insertItemIntoGrid):
2235         (WebCore::RenderGrid::gridAreaBreadthForChild):
2236
2237 2014-09-29  Sergio Villar Senin  <svillar@igalia.com>
2238
2239         [CSS Grid Layout] Use modern for-loops in RenderGrid
2240         https://bugs.webkit.org/show_bug.cgi?id=137214
2241
2242         Reviewed by Darin Adler.
2243
2244         New code is already using modern range based for loops. We had some
2245         "old" code pending to be migrated.
2246
2247         No new tests as there is no change in functionality.
2248
2249         * rendering/RenderGrid.cpp:
2250         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
2251         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2252         (WebCore::RenderGrid::computeNormalizedFractionBreadth):
2253         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
2254         (WebCore::RenderGrid::layoutGridItems):
2255
2256 2014-08-01  Sergio Villar Senin  <svillar@igalia.com>
2257
2258         Caret not shown at the end of line in overtype mode
2259         https://bugs.webkit.org/show_bug.cgi?id=135508
2260
2261         Reviewed by Ryosuke Niwa.
2262
2263         When overtype mode is enabled we usually replace the 'normal'
2264         blinking caret shown in contenteditable elements by a block cursor
2265         that covers the next character to be replaced. The exception is the
2266         end of line where we fallback to the blinking caret even in overtype
2267         mode (as there is no next character to replace).
2268
2269         We were not showing anything at the end of lines in overtype mode
2270         because the detection of the end of line was incorrect and not very
2271         understandable. Replaced the old code with a proper and clean end of
2272         line detection mechanism compatible with bidi text.
2273
2274         Tests: editing/selection/block-cursor-overtype-mode-end-of-line-rtl.html
2275                editing/selection/block-cursor-overtype-mode-end-of-line.html
2276
2277         * editing/FrameSelection.cpp:
2278         (WebCore::FrameSelection::updateAppearance):
2279         * editing/VisibleUnits.cpp:
2280         (WebCore::isLogicalEndOfLine):
2281         * editing/VisibleUnits.h:
2282
2283 2014-09-29  Brian J. Burg  <burg@cs.washington.edu>
2284
2285         Web Inspector: InjectedScripts should not be profiled or displayed in Timeline
2286         https://bugs.webkit.org/show_bug.cgi?id=136806
2287
2288         Reviewed by Timothy Hatcher.
2289
2290         Instead of creating timeline records for injected scripts, suspend profiling
2291         of the current page before and after calling injected script functions.
2292
2293         * inspector/InspectorController.cpp:
2294         (WebCore::InspectorController::willCallInjectedScriptFunction):
2295         (WebCore::InspectorController::didCallInjectedScriptFunction):
2296
2297 2014-09-29  Brian J. Burg  <burg@cs.washington.edu>
2298
2299         Web Inspector: InspectorValues should use references for out parameters
2300         https://bugs.webkit.org/show_bug.cgi?id=137190
2301
2302         Reviewed by Joseph Pecoraro.
2303
2304         Clean up some call sites to explicitly check for cast success, and simplify
2305         some exceptional control flows.
2306
2307         No new tests, no behavior changed.
2308
2309         * inspector/CommandLineAPIHost.cpp:
2310         (WebCore::CommandLineAPIHost::inspectImpl):
2311         * inspector/InspectorCSSAgent.cpp:
2312         (WebCore::computePseudoClassMask):
2313         * inspector/InspectorDOMAgent.cpp:
2314         (WebCore::parseColor):
2315         (WebCore::parseConfigColor):
2316         (WebCore::parseQuad):
2317         (WebCore::InspectorDOMAgent::performSearch):
2318         (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
2319         (WebCore::InspectorDOMAgent::innerHighlightQuad):
2320         (WebCore::InspectorDOMAgent::highlightFrame):
2321         * inspector/InspectorDOMStorageAgent.cpp:
2322         (WebCore::InspectorDOMStorageAgent::findStorageArea):
2323         * inspector/InspectorIndexedDBAgent.cpp: Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
2324         * inspector/InspectorPageAgent.cpp:
2325         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
2326         * inspector/InspectorReplayAgent.cpp:
2327         (WebCore::InspectorReplayAgent::replayToPosition):
2328         * inspector/InspectorResourceAgent.cpp:
2329         (WebCore::InspectorResourceAgent::willSendRequest):
2330         * inspector/InspectorStyleSheet.cpp:
2331         (WebCore::InspectorStyle::styleWithProperties):
2332         * inspector/InspectorStyleSheet.h:
2333         (WebCore::InspectorCSSId::InspectorCSSId):
2334         * inspector/InspectorTimelineAgent.cpp:
2335         (WebCore::InspectorTimelineAgent::startFromConsole):
2336         (WebCore::InspectorTimelineAgent::stopFromConsole):
2337         * inspector/InspectorWorkerAgent.cpp:
2338
2339 2014-09-29  Christophe Dumez  <cdumez@apple.com>
2340
2341         Use is<>() / downcast<>() for Document
2342         https://bugs.webkit.org/show_bug.cgi?id=137221
2343
2344         Reviewed by Andreas Kling.
2345
2346         Use is<>() / downcast<>() for Document instead of isDocumentNode() /
2347         toDocument().
2348
2349         No new tests, no behavior change.
2350
2351         * Modules/geolocation/Geolocation.cpp:
2352         (WebCore::Geolocation::document):
2353         (WebCore::Geolocation::frame):
2354         (WebCore::Geolocation::page):
2355         * Modules/indexeddb/IDBFactory.cpp:
2356         * Modules/mediasource/SourceBuffer.cpp:
2357         (WebCore::SourceBuffer::document):
2358         * Modules/mediastream/RTCPeerConnection.cpp:
2359         (WebCore::RTCPeerConnection::RTCPeerConnection):
2360         * Modules/notifications/Notification.cpp:
2361         (WebCore::Notification::Notification):
2362         (WebCore::Notification::show):
2363         (WebCore::Notification::permission):
2364         (WebCore::Notification::requestPermission):
2365         * Modules/webaudio/AudioContext.cpp:
2366         (WebCore::AudioContext::document):
2367         * Modules/webaudio/OfflineAudioContext.cpp:
2368         (WebCore::OfflineAudioContext::create):
2369         * Modules/webdatabase/DatabaseContext.cpp:
2370         (WebCore::DatabaseContext::allowDatabaseAccess):
2371         (WebCore::DatabaseContext::databaseExceededQuota):
2372         * Modules/websockets/ThreadableWebSocketChannel.cpp:
2373         (WebCore::ThreadableWebSocketChannel::create):
2374         * Modules/websockets/WebSocket.cpp:
2375         (WebCore::WebSocket::connect):
2376         * Modules/websockets/WebSocketHandshake.cpp:
2377         (WebCore::WebSocketHandshake::clientHandshakeMessage):
2378         (WebCore::WebSocketHandshake::clientHandshakeRequest):
2379         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2380         (WebCore::WorkerThreadableWebSocketChannel::Peer::Peer):
2381         * bindings/gobject/WebKitDOMPrivate.cpp:
2382         (WebKit::wrap):
2383         * bindings/js/DOMConstructorWithDocument.h:
2384         (WebCore::DOMConstructorWithDocument::document):
2385         * bindings/js/DOMRequestState.h:
2386         (WebCore::DOMRequestState::DOMRequestState):
2387         (WebCore::DOMRequestState::clear):
2388         * bindings/js/JSAudioContextCustom.cpp:
2389         (WebCore::constructJSAudioContext):
2390         * bindings/js/JSDOMGlobalObject.cpp:
2391         (WebCore::toJSDOMGlobalObject):
2392         * bindings/js/JSLazyEventListener.cpp:
2393         (WebCore::JSLazyEventListener::initializeJSFunction):
2394         * bindings/js/JSNodeCustom.cpp:
2395         (WebCore::createWrapperInline):
2396         * bindings/js/ScheduledAction.cpp:
2397         (WebCore::ScheduledAction::execute):
2398         * bindings/js/ScriptState.cpp:
2399         (WebCore::frameFromExecState):
2400         * crypto/SubtleCrypto.cpp:
2401         (WebCore::SubtleCrypto::document):
2402         * dom/Comment.cpp:
2403         (WebCore::Comment::create):
2404         * dom/ContainerNode.cpp:
2405         (WebCore::checkAcceptChild):
2406         * dom/ContainerNodeAlgorithms.cpp:
2407         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
2408         * dom/Document.h:
2409         (WebCore::isDocument):
2410         * dom/DocumentFragment.cpp:
2411         (WebCore::DocumentFragment::create):
2412         * dom/Element.cpp:
2413         (WebCore::Element::computeInheritedLanguage):
2414         * dom/EventDispatcher.cpp:
2415         (WebCore::WindowEventContext::WindowEventContext):
2416         * dom/EventTarget.cpp:
2417         (WebCore::EventTarget::fireEventListeners):
2418         * dom/NamedFlowCollection.cpp:
2419         (WebCore::NamedFlowCollection::document):
2420         * dom/Node.cpp:
2421         (WebCore::Node::isDefaultNamespace):
2422         (WebCore::Node::lookupPrefix):
2423         (WebCore::Node::lookupNamespaceURI):
2424         (WebCore::Node::removedLastRef):
2425         * dom/Range.cpp:
2426         (WebCore::Range::create):
2427         * dom/ScriptExecutionContext.cpp:
2428         (WebCore::ScriptExecutionContext::dispatchErrorEvent):
2429         * dom/Text.cpp:
2430         (WebCore::Text::create):
2431         * editing/MarkupAccumulator.cpp:
2432         (WebCore::MarkupAccumulator::appendStartMarkup):
2433         * html/HTMLDocument.h:
2434         (WebCore::isHTMLDocument):
2435         * html/HTMLNameCollection.h:
2436         (WebCore::HTMLNameCollection::document):
2437         * html/HTMLStyleElement.cpp:
2438         (WebCore::HTMLStyleElement::insertedInto):
2439         * html/ImageDocument.h:
2440         (WebCore::isImageDocument):
2441         * html/MediaDocument.h:
2442         (WebCore::isMediaDocument):
2443         * html/PluginDocument.h:
2444         (WebCore::isPluginDocument):
2445         * html/track/TextTrackCue.h:
2446         (WebCore::TextTrackCue::ownerDocument):
2447         * html/track/VTTCue.cpp:
2448         (WebCore::VTTCue::initialize):
2449         * html/track/VTTRegion.h:
2450         (WebCore::VTTRegion::ownerDocument):
2451         * inspector/InspectorDOMAgent.cpp:
2452         (WebCore::InspectorDOMAgent::assertDocument):
2453         (WebCore::InspectorDOMAgent::buildObjectForNode):
2454         (WebCore::InspectorDOMAgent::innerParentNode):
2455         * inspector/InspectorInstrumentation.cpp:
2456         (WebCore::frameForScriptExecutionContext):
2457         * inspector/InspectorInstrumentation.h:
2458         (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
2459         * loader/TextTrackLoader.cpp:
2460         (WebCore::TextTrackLoader::corsPolicyPreventedLoad):
2461         (WebCore::TextTrackLoader::notifyFinished):
2462         (WebCore::TextTrackLoader::load):
2463         * loader/ThreadableLoader.cpp:
2464         (WebCore::ThreadableLoader::create):
2465         (WebCore::ThreadableLoader::loadResourceSynchronously):
2466         * loader/WorkerThreadableLoader.cpp:
2467         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
2468         * page/ContentSecurityPolicy.cpp:
2469         (WebCore::ContentSecurityPolicy::reportViolation):
2470         * page/Crypto.cpp:
2471         (WebCore::Crypto::document):
2472         * page/DOMTimer.cpp:
2473         (WebCore::DOMTimer::install):
2474         (WebCore::DOMTimer::fired):
2475         * page/DOMWindow.cpp:
2476         (WebCore::DOMWindow::focus):
2477         (WebCore::DOMWindow::close):
2478         (WebCore::DOMWindow::document):
2479         (WebCore::DOMWindow::styleMedia):
2480         (WebCore::DOMWindow::getComputedStyle):
2481         * page/DragController.cpp:
2482         (WebCore::DragController::dragExited):
2483         (WebCore::DragController::dragEnteredOrUpdated):
2484         * page/EventSource.cpp:
2485         (WebCore::EventSource::create):
2486         * page/FocusController.cpp:
2487         (WebCore::FocusController::advanceFocusDirectionally):
2488         * page/History.cpp:
2489         (WebCore::History::go):
2490         * page/SpatialNavigation.cpp:
2491         (WebCore::scrollInDirection):
2492         (WebCore::scrollableEnclosingBoxOrParentFrameForNodeInDirection):
2493         (WebCore::canScrollInDirection):
2494         (WebCore::nodeRectInAbsoluteCoordinates):
2495         * svg/SVGDocument.h:
2496         (WebCore::isSVGDocument):
2497         * testing/Internals.cpp:
2498         (WebCore::Internals::contextDocument):
2499         (WebCore::Internals::frame):
2500         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
2501         * testing/js/WebCoreTestSupport.cpp:
2502         (WebCoreTestSupport::injectInternalsObject):
2503         (WebCoreTestSupport::resetInternalsObject):
2504         * workers/DefaultSharedWorkerRepository.cpp:
2505         (WebCore::SharedWorkerProxy::addToWorkerDocuments):
2506         * workers/WorkerMessagingProxy.cpp:
2507         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
2508         * xml/XMLHttpRequest.cpp:
2509         (WebCore::XMLHttpRequest::document):
2510         (WebCore::XMLHttpRequest::open):
2511
2512 2014-09-29  David Hyatt  <hyatt@apple.com>
2513
2514         REGRESSION (r168046): Confused column spans when combined with dynamic animations
2515         https://bugs.webkit.org/show_bug.cgi?id=134048.
2516
2517         Reviewed by Dean Jackson.
2518
2519         Added fast/multicol/multicol-fieldset-span-changes.html
2520
2521         * rendering/RenderMultiColumnFlowThread.cpp:
2522         (WebCore::RenderMultiColumnFlowThread::processPossibleSpannerDescendant):
2523         Refactor handling of insertions into the multicolumn flow thread into
2524         a helper function, processPossibleSpannerDescendant. This makes it easier
2525         to call the code from more than one place.
2526
2527         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
2528         Modify the nested columns span shifting code to avoid problems. The
2529         new code suppresses notifications and does the move of the spanner back
2530         into the original spot *before* removing the placeholder. This ensures that
2531         the placeholder parent still exists.
2532         
2533         The stale placeholder is then removed and destroyed after the spanner has been put back
2534         into place.
2535
2536         (WebCore::RenderMultiColumnFlowThread::handleSpannerRemoval):
2537         (WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
2538         Refactor the removal notifications for spanners into a helper function so that it can
2539         be called to do cleanup from the code that cleans up stale placeholders on a shift.
2540
2541         * rendering/RenderMultiColumnFlowThread.h:
2542         Modified to add the new helpers.
2543
2544 2014-09-29  Christophe Dumez  <cdumez@apple.com>
2545
2546         Use SPECIALIZE_TYPE_TRAITS_*() macro for MathMLElement
2547         https://bugs.webkit.org/show_bug.cgi?id=137222
2548
2549         Reviewed by Ryosuke Niwa.
2550
2551         Use SPECIALIZE_TYPE_TRAITS_*() macro for MathMLElement instead of
2552         NODE_TYPE_CASTS() + NodeTypeCastTraits template specialization.
2553
2554         No new tests, no behavior change.
2555
2556         * accessibility/AccessibilityNodeObject.cpp:
2557         (WebCore::AccessibilityNodeObject::accessibilityDescription):
2558         * accessibility/AccessibilityRenderObject.cpp:
2559         (WebCore::AccessibilityRenderObject::isMathElement):
2560         * css/CSSDefaultStyleSheets.cpp:
2561         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
2562         * mathml/MathMLElement.cpp:
2563         (WebCore::MathMLElement::attributeChanged):
2564         * mathml/MathMLElement.h:
2565         (WebCore::isMathMLElement):
2566         * mathml/MathMLSelectElement.cpp:
2567         (WebCore::MathMLSelectElement::getSelectedSemanticsChild):
2568
2569 2014-09-29  Eric Carlson  <eric.carlson@apple.com>
2570
2571         [Mac] Remove MediaPlayerPrivateQTKit frame rate code
2572         https://bugs.webkit.org/show_bug.cgi?id=137217
2573
2574         Reviewed by Carlos Garcia Campos.
2575
2576         No new tests, this removes obsolete code.
2577
2578         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2579         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2580         (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit):
2581         (WebCore::MediaPlayerPrivateQTKit::play):
2582         (WebCore::MediaPlayerPrivateQTKit::pause):
2583         (WebCore::MediaPlayerPrivateQTKit::didEnd):
2584         (WebCore::MediaPlayerPrivateQTKit::repaint):
2585         (WebCore::MediaPlayerPrivateQTKit::paint):
2586
2587 2014-09-29  Chris Fleizach  <cfleizach@apple.com>
2588
2589         AX: in an aria-labelledby computation, do not traverse into elements whose nameFrom value does not include 'contents'
2590         https://bugs.webkit.org/show_bug.cgi?id=136714
2591
2592         Reviewed by Darin Adler.
2593
2594         There are certain ARIA elements that tell us we should not query their children when determining the name of the object.
2595         Those ones have the "nameFrom" property set to "author" instead of "contents." WebKit needs to honor that status.
2596
2597         Test: accessibility/aria-namefrom-author.html
2598               Modified: accessibility/aria-labelledby-with-descendants.html
2599
2600         * accessibility/AccessibilityNodeObject.cpp:
2601         (WebCore::shouldUseAccessiblityObjectInnerText):
2602         (WebCore::shouldAddSpaceBeforeAppendingNextElement):
2603         (WebCore::appendNameToStringBuilder):
2604         (WebCore::AccessibilityNodeObject::textUnderElement):
2605         (WebCore::accessibleNameForNode):
2606         (WebCore::AccessibilityNodeObject::accessibilityDescriptionForElements):
2607         * accessibility/AccessibilityObject.cpp:
2608         (WebCore::AccessibilityObject::accessibleNameDerivesFromContent):
2609         (WebCore::initializeRoleMap):
2610         * accessibility/AccessibilityObject.h:
2611
2612 2014-09-29  Eric Carlson  <eric.carlson@apple.com>
2613
2614         [iOS] Optimize media controls AirPlay discovery
2615         https://bugs.webkit.org/show_bug.cgi?id=137180
2616
2617         Reviewed by Darin Adler.
2618         
2619         AirPlay discovery mode uses increases power consumption, so don't enable it when there
2620         is no chance an AirPlay target picker will be useful.
2621
2622         * Modules/mediacontrols/mediaControlsiOS.js:
2623         (ControllerIOS): Initialize isListeningForPlaybackTargetAvailabilityEvent.
2624         (ControllerIOS.prototype.addVideoListeners): Don't enable register wireless playback event
2625             listeners, it isn't possible to show the target picker until there is an inline controller.
2626         (ControllerIOS.prototype.removeVideoListeners): Call setShouldListenForPlaybackTargetAvailabilityEvent.
2627         (ControllerIOS.prototype.setControlsType): Add wireless event listers on when not showing 
2628             the one button controller.
2629         (ControllerIOS.prototype.updateStatusDisplay): Unregister wireless event listeners when the
2630             media element is in an error state.
2631         (ControllerIOS.prototype.setShouldListenForPlaybackTargetAvailabilityEvent): New, add or
2632             remove event listeners. 
2633
2634 2014-09-29  Eric Carlson  <eric.carlson@apple.com>
2635
2636         [iOS] Remove obsolete playbackTargetAvailabilityChanged methods
2637         https://bugs.webkit.org/show_bug.cgi?id=137179
2638
2639         Reviewed by Darin Adler.
2640
2641         No new tests, this just removes unused code.
2642
2643         * html/HTMLMediaElement.cpp:
2644         (WebCore::HTMLMediaElement::mediaPlayerPlaybackTargetAvailabilityChanged): Deleted.
2645         * html/HTMLMediaElement.h:
2646
2647         * platform/graphics/MediaPlayer.cpp:
2648         (WebCore::MediaPlayer::playbackTargetAvailabilityChanged): Deleted.
2649         * platform/graphics/MediaPlayer.h:
2650         (WebCore::MediaPlayerClient::mediaPlayerPlaybackTargetAvailabilityChanged): Deleted.
2651
2652 2014-09-29  Christophe Dumez  <cdumez@apple.com>
2653
2654         Use the new is<>() / downcast<>() for ShadowRoot and StyledElement
2655         https://bugs.webkit.org/show_bug.cgi?id=137199
2656
2657         Reviewed by Darin Adler.
2658
2659         Use the new is<>() / downcast<>() for ShadowRoot and StyledElement and
2660         move towards getting rid of the NODE_TYPE_CASTS() macro.
2661
2662         No new tests, no behavior change.
2663
2664         * css/ElementRuleCollector.cpp:
2665         (WebCore::ElementRuleCollector::matchAllRules):
2666         * css/StyleResolver.cpp:
2667         (WebCore::StyleResolver::State::initElement):
2668         (WebCore::StyleResolver::State::initForStyleResolve):
2669         (WebCore::StyleResolver::locateCousinList):
2670         (WebCore::StyleResolver::findSiblingForStyleSharing):
2671         * dom/Attr.cpp:
2672         (WebCore::Attr::style):
2673         * dom/Element.cpp:
2674         (WebCore::Element::removeAttribute):
2675         * dom/EventDispatcher.cpp:
2676         (WebCore::EventRelatedNodeResolver::moveToParentOrShadowHost):
2677         (WebCore::EventRelatedNodeResolver::findHostOfTreeScopeInTargetTreeScope):
2678         (WebCore::eventTargetRespectingTargetRules):
2679         (WebCore::EventPath::EventPath):
2680         * dom/Node.cpp:
2681         (WebCore::Node::containingShadowRoot):
2682         (WebCore::Node::parentOrShadowHostElement):
2683         (WebCore::Node::showNodePathForThis):
2684         * dom/NodeRenderingTraversal.cpp:
2685         (WebCore::NodeRenderingTraversal::traverseParent):
2686         * dom/ShadowRoot.h:
2687         (WebCore::isShadowRoot):
2688         (WebCore::Node::shadowRoot):
2689         (WebCore::Node::parentOrShadowHostNode):
2690         * dom/StyledElement.h:
2691         (WebCore::StyledElement::presentationAttributeStyle):
2692         (WebCore::isStyledElement):
2693         * dom/Text.cpp:
2694         (WebCore::isSVGShadowText):
2695         * dom/TreeScope.cpp:
2696         (WebCore::TreeScope::focusedElement):
2697         * dom/TreeScopeAdopter.cpp:
2698         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
2699         * editing/ApplyStyleCommand.cpp:
2700         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
2701         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
2702         * editing/EditingStyle.cpp:
2703         (WebCore::EditingStyle::wrappingStyleForSerialization):
2704         * editing/Editor.cpp:
2705         (WebCore::Editor::applyEditingStyleToElement):
2706         * editing/ReplaceSelectionCommand.cpp:
2707         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
2708         * editing/cocoa/HTMLConverter.mm:
2709         (HTMLConverterCaches::inlineStylePropertyForElement):
2710         * editing/markup.cpp:
2711         (WebCore::StyledMarkupAccumulator::appendElement):
2712         * inspector/InspectorCSSAgent.cpp:
2713         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
2714         * inspector/InspectorOverlay.cpp:
2715         (WebCore::buildObjectForElementInfo):
2716         * page/DragController.cpp:
2717         (WebCore::asFileInput):
2718         * page/EventHandler.cpp:
2719         (WebCore::EventHandler::handleMousePressEvent):
2720         * page/FocusController.cpp:
2721         (WebCore::FocusNavigationScope::owner):
2722         * page/PageSerializer.cpp:
2723         (WebCore::PageSerializer::serializeFrame):
2724         * rendering/RenderLayer.cpp:
2725         (WebCore::RenderLayer::resize):
2726         * svg/SVGElement.cpp:
2727         (WebCore::SVGElement::title):
2728         * testing/Internals.cpp:
2729         (WebCore::Internals::shadowRoot):
2730         (WebCore::Internals::shadowRootType):
2731         (WebCore::Internals::includerFor):
2732
2733 2014-09-29  Christophe Dumez  <cdumez@apple.com>
2734
2735         Use the new is<>() / downcast<>() for Text Nodes
2736         https://bugs.webkit.org/show_bug.cgi?id=137188
2737
2738         Reviewed by Darin Adler.
2739
2740         Use the new is<>() / downcast<>() functions for Text Nodes instead of
2741         isText() / toText().
2742
2743         No new tests, no behavior change.
2744
2745         * accessibility/AccessibilityNodeObject.cpp:
2746         (WebCore::AccessibilityNodeObject::textUnderElement):
2747         * bindings/gobject/WebKitDOMPrivate.cpp:
2748         (WebKit::wrap):
2749         * css/SelectorChecker.cpp:
2750         (WebCore::SelectorChecker::checkOne):
2751         * dom/CharacterData.cpp:
2752         (WebCore::CharacterData::parserAppendData):
2753         (WebCore::CharacterData::setDataAndUpdate):
2754         * dom/ContainerNode.cpp:
2755         (WebCore::destroyRenderTreeIfNeeded):
2756         * dom/Node.cpp:
2757         (WebCore::Node::normalize):
2758         * dom/Position.cpp:
2759         (WebCore::Position::containerNode):
2760         (WebCore::Position::containerText):
2761         (WebCore::Position::isRenderedCharacter):
2762         (WebCore::Position::leadingWhitespacePosition):
2763         * dom/Range.cpp:
2764         (WebCore::Range::insertNode):
2765         (WebCore::Range::getBorderAndTextQuads):
2766         * dom/Text.cpp:
2767         (WebCore::earliestLogicallyAdjacentTextNode):
2768         (WebCore::latestLogicallyAdjacentTextNode):
2769         * dom/Text.h:
2770         (WebCore::isText):
2771         * dom/TextNodeTraversal.cpp:
2772         (WebCore::TextNodeTraversal::contentsAsString):
2773         * dom/TextNodeTraversal.h:
2774         (WebCore::TextNodeTraversal::firstTextChildTemplate):
2775         (WebCore::TextNodeTraversal::firstTextWithinTemplate):
2776         (WebCore::TextNodeTraversal::traverseNextTextTemplate):
2777         (WebCore::TextNodeTraversal::nextSibling):
2778         * editing/ApplyBlockElementCommand.cpp:
2779         (WebCore::isNewLineAtPosition):
2780         (WebCore::ApplyBlockElementCommand::endOfNextParagrahSplittingTextNodesIfNeeded):
2781         * editing/ApplyStyleCommand.cpp:
2782         (WebCore::ApplyStyleCommand::splitTextAtEnd):
2783         (WebCore::ApplyStyleCommand::splitTextElementAtEnd):
2784         (WebCore::ApplyStyleCommand::joinChildTextNodes):
2785         * editing/BreakBlockquoteCommand.cpp:
2786         (WebCore::BreakBlockquoteCommand::doApply):
2787         * editing/CompositeEditCommand.cpp:
2788         (WebCore::CompositeEditCommand::insertNodeAt):
2789         (WebCore::CompositeEditCommand::positionOutsideTabSpan):
2790         (WebCore::CompositeEditCommand::canRebalance):
2791         (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
2792         (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit):
2793         (WebCore::CompositeEditCommand::deleteInsignificantText):
2794         (WebCore::CompositeEditCommand::removePlaceholderAt):
2795         (WebCore::CompositeEditCommand::cleanupAfterDeletion):
2796         (WebCore::CompositeEditCommand::moveParagraphs):
2797         * editing/DeleteSelectionCommand.cpp:
2798         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
2799         (WebCore::DeleteSelectionCommand::fixupWhitespace):
2800         (WebCore::DeleteSelectionCommand::doApply):
2801         * editing/Editor.cpp:
2802         (WebCore::Editor::setComposition):
2803         * editing/InsertLineBreakCommand.cpp:
2804         (WebCore::InsertLineBreakCommand::doApply):
2805         * editing/InsertParagraphSeparatorCommand.cpp:
2806         (WebCore::InsertParagraphSeparatorCommand::doApply):
2807         * editing/InsertTextCommand.cpp:
2808         (WebCore::InsertTextCommand::insertTab):
2809         * editing/MarkupAccumulator.cpp:
2810         (WebCore::MarkupAccumulator::appendStartMarkup):
2811         * editing/ReplaceSelectionCommand.cpp:
2812         (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds):
2813         (WebCore::ReplaceSelectionCommand::addSpacesForSmartReplace):
2814         (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
2815         (WebCore::ReplaceSelectionCommand::insertAsListItems):
2816         (WebCore::ReplaceSelectionCommand::performTrivialReplace):
2817         * editing/TextIterator.cpp:
2818         (WebCore::TextIterator::handleTextNode):
2819         (WebCore::TextIterator::handleTextBox):
2820         (WebCore::SimplifiedBackwardsTextIterator::handleTextNode):
2821         * editing/VisibleUnits.cpp:
2822         (WebCore::startPositionForLine):
2823         (WebCore::endPositionForLine):
2824         (WebCore::startOfParagraph):
2825         (WebCore::endOfParagraph):
2826         * editing/htmlediting.cpp:
2827         (WebCore::lineBreakExistsAtPosition):
2828         * editing/markup.cpp:
2829         (WebCore::StyledMarkupAccumulator::renderedText):
2830         (WebCore::replaceChildrenWithFragment):
2831         (WebCore::replaceChildrenWithText):
2832         * html/HTMLElement.cpp:
2833         (WebCore::mergeWithNextTextNode):
2834         (WebCore::HTMLElement::setOuterHTML):
2835         (WebCore::HTMLElement::setOuterText):
2836         * html/HTMLObjectElement.cpp:
2837         (WebCore::HTMLObjectElement::hasFallbackContent):
2838         (WebCore::HTMLObjectElement::updateDocNamedItem):
2839         * html/HTMLOptionElement.cpp:
2840         (WebCore::HTMLOptionElement::setText):
2841         * html/HTMLScriptElement.cpp:
2842         (WebCore::HTMLScriptElement::setText):
2843         * html/HTMLTextFormControlElement.cpp:
2844         (WebCore::HTMLTextFormControlElement::innerTextValue):
2845         (WebCore::positionForIndex):
2846         (WebCore::HTMLTextFormControlElement::indexForPosition):
2847         (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
2848         * html/HTMLTitleElement.cpp:
2849         (WebCore::HTMLTitleElement::setText):
2850         * html/parser/HTMLConstructionSite.cpp:
2851         (WebCore::HTMLConstructionSite::insertTextNode):
2852         * inspector/InspectorDOMAgent.cpp:
2853         (WebCore::InspectorDOMAgent::setNodeValue):
2854         * rendering/RenderCombineText.h:
2855         * rendering/RenderNamedFlowThread.cpp:
2856         (WebCore::RenderNamedFlowThread::getRanges):
2857         * rendering/RenderText.cpp:
2858         (WebCore::RenderText::textNode):
2859         * rendering/svg/RenderSVGInlineText.h:
2860         * style/StyleResolveTree.cpp:
2861         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
2862         (WebCore::Style::attachChildren):
2863         (WebCore::Style::attachDistributedChildren):
2864         (WebCore::Style::detachDistributedChildren):
2865         (WebCore::Style::detachChildren):
2866         (WebCore::Style::resolveShadowTree):
2867         (WebCore::Style::resolveTree):
2868
2869 2014-09-29  Christophe Dumez  <cdumez@apple.com>
2870
2871         Remove remaining uses of NODE_TYPE_CASTS() from html/
2872         https://bugs.webkit.org/show_bug.cgi?id=137172
2873
2874         Reviewed by Darin Adler.
2875
2876         Remove remaining uses of NODE_TYPE_CASTS() from html/ and use the new
2877         SPECIALIZE_TYPE_TRAITS_*() macro instead so that is<>() / downcast<>()
2878         works for those types.
2879
2880         No new tests, no behavior change.
2881
2882         * css/SelectorCheckerTestFunctions.h:
2883         (WebCore::matchesLangPseudoClass):
2884         (WebCore::matchesFutureCuePseudoClass):
2885         (WebCore::matchesPastCuePseudoClass):
2886         * css/StyleResolver.cpp:
2887         (WebCore::StyleResolver::canShareStyleWithElement):
2888         The new casting function found a bad cast from a StyledElement to VTTElement.
2889         Those two types are unrelated as VTTElement inherits directly from Element.
2890         Knowing that |element| in this method cannot be a VTTElement simplifies the
2891         logic a bit.
2892
2893         * dom/NodeRenderingTraversal.cpp:
2894         (WebCore::NodeRenderingTraversal::findFirstEnteringInsertionPoints):
2895         (WebCore::NodeRenderingTraversal::findLastEnteringInsertionPoints):
2896         (WebCore::NodeRenderingTraversal::traverseParent):
2897         * html/HTMLLabelElement.cpp:
2898         (WebCore::nodeAsSupportedLabelableElement):
2899         * html/HTMLTextAreaElement.cpp:
2900         (WebCore::HTMLTextAreaElement::innerTextElement):
2901         * html/LabelableElement.h:
2902         (WebCore::isLabelableElement):
2903         * html/shadow/ContentDistributor.cpp:
2904         (WebCore::ContentDistributor::ensureInsertionPointList):
2905         * html/shadow/InsertionPoint.h:
2906         (WebCore::isInsertionPoint):
2907         (WebCore::isActiveInsertionPoint):
2908         (WebCore::parentNodeForDistribution):
2909         * html/shadow/TextControlInnerElements.h:
2910         (WebCore::isTextControlInnerTextElement):
2911         * html/track/VTTCue.cpp:
2912         (WebCore::VTTCue::copyWebVTTNodeToDOMTree):
2913         (WebCore::VTTCue::markFutureAndPastNodes):
2914         * html/track/WebVTTElement.h:
2915         (WebCore::isWebVTTElement):
2916         * html/track/WebVTTParser.cpp:
2917         (WebCore::WebVTTTreeBuilder::constructTreeFromToken):
2918         * style/StyleResolveTree.cpp:
2919         (WebCore::Style::attachRenderTree):
2920         (WebCore::Style::detachChildren):
2921
2922 2014-09-29  Christophe Dumez  <cdumez@apple.com>
2923
2924         Make is<>() / downcast<>() work for HTMLDocument and its subclasses
2925         https://bugs.webkit.org/show_bug.cgi?id=137169
2926
2927         Reviewed by Darin Adler.
2928
2929         Make is<>() / downcast<>() work for HTMLDocument and its subclasses by
2930         using the SPECIALIZE_TYPE_TRAITS_*() macro. Drop the DOCUMENT_TYPE_CASTS()
2931         macro as it is no longer needed.
2932
2933         No new tests, no behavior change.
2934
2935         * bindings/js/JSDOMWindowCustom.cpp:
2936         (WebCore::namedItemGetter):
2937         (WebCore::JSDOMWindow::getOwnPropertySlot):
2938         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
2939         * dom/Document.cpp:
2940         (WebCore::Document::prepareForDestruction):
2941         (WebCore::Document::processHttpEquiv):
2942         (WebCore::eventTargetElementForDocument):
2943         * dom/Document.h:
2944         * dom/Element.cpp:
2945         (WebCore::Element::insertedInto):
2946         (WebCore::Element::removedFrom):
2947         (WebCore::Element::updateName):
2948         (WebCore::Element::updateId):
2949         * html/HTMLDocument.h:
2950         (WebCore::isHTMLDocument):
2951         * html/HTMLElement.cpp:
2952         (WebCore::HTMLElement::matchesReadWritePseudoClass):
2953         * html/HTMLEmbedElement.cpp:
2954         (WebCore::HTMLEmbedElement::updateWidget):
2955         * html/HTMLImageElement.cpp:
2956         (WebCore::HTMLImageElement::parseAttribute):
2957         * html/HTMLMediaElement.cpp:
2958         (WebCore::HTMLMediaElement::parseAttribute):
2959         * html/HTMLObjectElement.cpp:
2960         (WebCore::HTMLObjectElement::updateDocNamedItem):
2961         * html/ImageDocument.cpp:
2962         (WebCore::ImageDocumentParser::document):
2963         * html/ImageDocument.h:
2964         (WebCore::isImageDocument):
2965         * html/MediaDocument.h:
2966         (WebCore::isMediaDocument):
2967         * html/PluginDocument.cpp:
2968         (WebCore::PluginDocumentParser::createDocumentStructure):
2969         * html/PluginDocument.h:
2970         (WebCore::isPluginDocument):
2971         * loader/SubframeLoader.cpp:
2972         (WebCore::SubframeLoader::loadPlugin):
2973         * page/DragController.cpp:
2974         (WebCore::DragController::operationForLoad):
2975         * page/FrameView.cpp:
2976         (WebCore::determineLayerFlushThrottleState):
2977
2978 2014-09-29  Bruno de Oliveira Abinader  <bruno.d@partner.samsung.com>
2979
2980         Revert "Support for :enabled selector on Anchor & Area elements"
2981         https://bugs.webkit.org/show_bug.cgi?id=134826
2982
2983         Reviewed by Darin Adler.
2984
2985         HTML spec has been modified [1] to disable support for :enabled CSS
2986         selector on Anchor, Area & Link elements, after discussion on W3C
2987         Bugzilla [2].
2988
2989         This reverts r171671.
2990
2991         [1] https://html5.org/r/8818
2992         [2] https://www.w3.org/Bugs/Public/show_bug.cgi?id=26622
2993
2994         * css/SelectorCheckerTestFunctions.h:
2995         (WebCore::isEnabled):
2996         * html/HTMLAnchorElement.cpp:
2997         (WebCore::HTMLAnchorElement::parseAttribute):
2998
2999 2014-09-29  Darin Adler  <darin@apple.com>
3000
3001         Tweak and tighten SVG font converter
3002         https://bugs.webkit.org/show_bug.cgi?id=136956
3003
3004         Reviewed by Myles Maxfield.
3005
3006         * svg/SVGToOTFFontConversion.cpp: Fixed copyright date.
3007         (WebCore::overwrite32): Changed to use normal subscripting for clarity.
3008         (WebCore::overwrite16): Added.
3009         (WebCore::SVGToOTFFontConverter::GlyphData::GlyphData): Added a move
3010         to make constructing each GlyphData less expensive.
3011         (WebCore::SVGToOTFFontConverter::KerningData): Removed the < operator
3012         since it the struct contains more than what we want to sort it by, so it's
3013         not elegant to build the sorting rule into the struct.
3014         (WebCore::SVGToOTFFontConverter): Removed "k" prefix from some constants.
3015         Replaced many function templates with non-template functions. Changed
3016         key type for m_codepointToIndexMap to UChar32.
3017         (WebCore::integralLog2): Tweaked formatting.
3018         (WebCore::SVGToOTFFontConverter::appendCMAPTable): Removed a stray
3019         cast that doesn't have any effect. Use the Glyph type to index m_glyphs.
3020         (WebCore::SVGToOTFFontConverter::appendHEADTable): Append the magic
3021         number in a more straightforward way.
3022         (WebCore::clampTo): Tweak formatting of the template function.
3023         (WebCore::SVGToOTFFontConverter::appendHHEATable): Made some minor
3024         style changes and improved some comments.
3025         (WebCore::SVGToOTFFontConverter::appendOS2Table): Made some minor
3026         style changes and tightened up code that did parsing a bit, removing the
3027         dynamically allocated array for the fixed length Panose number.
3028         Also use first and last instead of hand-coded versions of those.
3029         (WebCore::appendValidCFFString): Renamed.
3030         (WebCore::SVGToOTFFontConverter::appendCFFTable): Made various tweaks,
3031         including more specific of null for the "no weight" value instead of
3032         either empty or null.
3033         (WebCore::SVGToOTFFontConverter::appendVORGTable): Simplified some of
3034         the numeric parsing, since toInt is guaranteed to return 0 when it also
3035         would return "false" for ok. Also got rid of a local vector and instead
3036         just fixed up the size of the table afterward.
3037         (WebCore::SVGToOTFFontConverter::appendVHEATable): Tweaked comment.
3038         (WebCore::SVGToOTFFontConverter::addCodepointRanges): Use isValidKey
3039         instead of a local hardcoded rule to check hash table key validity.
3040         Check for zero in the result of get rather than using find on the HashMap.
3041         (WebCore::SVGToOTFFontConverter::addCodepointRanges): Ditto.
3042         (WebCore::SVGToOTFFontConverter::addGlyphNames): Ditto.
3043         (WebCore::SVGToOTFFontConverter::addKerningPair): Added. Factored out from
3044         appendKERNSubtable to reduce template bloat and improve clarity.
3045         (WebCore::SVGToOTFFontConverter::appendKERNSubtable): Tweaked formatting.
3046         Moved the bulk of the function into non-template function.
3047         (WebCore::SVGToOTFFontConverter::finishAppendingKERNSubtable): Added.
3048         Non-template part of appendKERNSubtable. Also changed std::sort to supply
3049         custom comparison function rather than trying to use the < operator directly
3050         on KerningData.
3051         (WebCore::writeCFFEncodedNumber): Don't use powf just to multiply by
3052         2^16. It's pretty easy to do that with plain old multiplication.
3053         (WebCore::CFFBuilder::CFFBuilder): Renamed m_firstPoint to
3054         m_hasBoundingBox.
3055         (WebCore::CFFBuilder::boundingBox): Made this public and const and made
3056         the rest of the class private.
3057         (WebCore::CFFBuilder::updateBoundingBox): Used early return and revised
3058         to use m_hasBoundingBox.
3059         (WebCore::CFFBuilder::writePoint): Added. Used to keep the other
3060         functions below smaller.
3061         (WebCore::CFFBuilder::moveTo): Marked virtual and simplified using writePoint.
3062         Might find a way to simplify even further by teaching writePoint about
3063         the PathCoordinateMode.
3064         (WebCore::CFFBuilder::lineTo): Ditto.
3065         (WebCore::CFFBuilder::curveToCubic): Ditto. Also removed comment that said
3066         the function could be faster. Not sure that's important to state like this.
3067         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths): Changed into a
3068         non-template function. Tweaked logic and formatting a bit.
3069         (WebCore::SVGToOTFFontConverter::processGlyphElement): Changed into a
3070         non-template function. Moved the code from appendGlyphData in here.
3071         Use WTF::move so we don't copy the glyph paths when creating a GlyphData.
3072         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter): Updated a bit for
3073         function changes above. Changed code to use isValidKey to check if we can
3074         add to m_codepointToIndexMap. Parse font-style rather than parsing
3075         font-weight twice. Round weights instead of truncating them. Change rule
3076         to "first wins" instead of "last wins" when there are multiple segments.
3077         Removed one vague and non-helpful comment.
3078         (WebCore::isFourByteAligned): Fixed minor formatting issue by making the
3079         function non-abstract. No reason not to hard-code the number 3 when the
3080         number four appears in the function name.
3081         (WebCore::calculateChecksum): Removed unneeded comment about why the
3082         checksum is little-endian; since this came from Windows documentation there
3083         is no doubt that little-endian is correct, so we don't need a comment creating
3084         fear, uncertainty, and doubt. If the checksum computation is wrong, it should
3085         become obvious that we have a bad checksum. Also changed the for loop to use
3086         its own loop variable instead of changing startingOffset, which is not logical.
3087         (WebCore::SVGToOTFFontConverter::appendTable): Updated for name changes.
3088         (WebCore::SVGToOTFFontConverter::convertSVGToOTFFont): Ditto. Also streamlined
3089         the checksum code a little. The comment still is a little peculiar; I was
3090         tempted to take it out.
3091
3092 2014-09-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3093
3094         [GTK] Remove MainFrameScrollbarGtk.cpp
3095         https://bugs.webkit.org/show_bug.cgi?id=137211
3096
3097         Reviewed by Philippe Normand.
3098
3099         This was only used by WebKit1.
3100
3101         * PlatformGTK.cmake:
3102         * platform/gtk/MainFrameScrollbarGtk.cpp: Removed.
3103         * platform/gtk/MainFrameScrollbarGtk.h: Removed.
3104
3105 2014-09-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3106
3107         [GTK] Remove IntPointGtk.cpp and IntRectGtk.cpp
3108         https://bugs.webkit.org/show_bug.cgi?id=137209
3109
3110         Reviewed by Philippe Normand.
3111
3112         IntPointGtk is unused and IntRectGtk is only required by GTK+2 and
3113         only used when building with GTK+2 in GtkInputMethodFilter.cpp
3114         that can be easily replaced.
3115
3116         * PlatformGTK.cmake:
3117         * platform/graphics/IntPoint.h:
3118         * platform/graphics/IntRect.h:
3119         * platform/graphics/gtk/IntPointGtk.cpp: Removed.
3120         * platform/graphics/gtk/IntRectGtk.cpp: Removed.
3121         * platform/gtk/GtkInputMethodFilter.cpp:
3122         (WebCore::GtkInputMethodFilter::setCursorRect):
3123
3124 2014-09-02  Sergio Villar Senin  <svillar@igalia.com>
3125
3126         [CSS Grid Layout] Handle percentages of indefinite sizes in minmax() and grid-auto-*
3127         https://bugs.webkit.org/show_bug.cgi?id=136453
3128
3129         Reviewed by Darin Adler.
3130
3131         After r165048 percentages of indefinite sizes were correctly
3132         computed to "auto". The problem is that we were not doing it when
3133         the percentage was inside the minmax() function. In those cases it
3134         should compute to min-content for the min track sizing function or
3135         to max-content for the max track sizing function.
3136
3137         We were not doing it also for the track sizes specified in
3138         grid-auto-{column|row} properties. Fixed as well as the code is
3139         the same.
3140
3141         Tests: fast/css-grid-layout/percent-of-indefinite-track-size-in-auto.html
3142                fast/css-grid-layout/percent-of-indefinite-track-size-in-minmax-crash.html
3143                fast/css-grid-layout/percent-of-indefinite-track-size.html
3144
3145         * rendering/RenderGrid.cpp:
3146         (WebCore::RenderGrid::gridTrackSize):
3147         * rendering/RenderGrid.h:
3148         * rendering/style/GridLength.h:
3149         (WebCore::GridLength::isPercentage):
3150         * rendering/style/GridTrackSize.h:
3151         (WebCore::GridTrackSize::GridTrackSize):
3152
3153 2014-09-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3154
3155         Unreviewed. Move sources not using GTK+ from WebCorePlatformGTK_SOURCES to WebCore_SOURCES.
3156
3157         * PlatformGTK.cmake:
3158
3159 2014-09-29  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3160
3161         Use std::unique_ptr instead of PassOwnPtr|OwnPtr for NamedNodeMap
3162         https://bugs.webkit.org/show_bug.cgi?id=137201
3163
3164         Reviewed by Darin Adler.
3165
3166         No new tests, just refactoring patch.
3167
3168         * dom/ElementRareData.h: Use std::unique_ptr instead of OwnPtr.
3169         (WebCore::ElementRareData::setAttributeMap): Use std::unique_ptr. 
3170         * dom/NamedNodeMap.h:
3171         (WebCore::NamedNodeMap::create): ditto.
3172
3173 2014-09-28  Myles C. Maxfield  <mmaxfield@apple.com>
3174
3175         Replace wkGetGlyphsForCharacters() with CGFontGetGlyphsForUnichars()
3176         https://bugs.webkit.org/show_bug.cgi?id=137197
3177
3178         Reviewed by Alexey Proskuryakov.
3179
3180         No new tests because there is no behavior change.
3181
3182         * WebCore.exp.in:
3183         * WebCore.order:
3184         * WebCore.xcodeproj/project.pbxproj:
3185         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
3186         (WebCore::GlyphPage::fill): Use SPI call instead of WKSI call
3187         * platform/mac/WebCoreSystemInterface.h:
3188         * platform/mac/WebCoreSystemInterface.mm:
3189         * platform/spi/cocoa/CGFontUnicodeSupport.h: Added for SPI call.
3190
3191 2014-09-28  Christophe Dumez  <cdumez@apple.com>
3192
3193         Automatically generate template specializations for most Elements
3194         https://bugs.webkit.org/show_bug.cgi?id=137174
3195
3196         Reviewed by Darin Adler.
3197
3198         Previously, the template specializations to make is<>() / downcast<>()
3199         work for HTML/SVG/MathML elements were only generated if
3200         "generateTypeHelpers" parameter was explicitly specified for the
3201         corresponding tag name in the *Tags.in file.
3202
3203         We are however able to generate the template specializations for most
3204         types so this patch drops the "generateTypeHelpers" parameter and
3205         generates those template specializations by default.
3206
3207         One case we cannot generate the specialization ifor is when a class is
3208         associated to several tag names but this patch updates the
3209         make_names.pl script to detect this and skip those classes.
3210
3211         No new tests, no behavior change.
3212
3213         * CMakeLists.txt:
3214         * WebCore.xcodeproj/project.pbxproj:
3215         * dom/make_names.pl:
3216         (defaultTagPropertyHash):
3217         (printTypeHelpers):
3218         * html/HTMLTagNames.in:
3219         * mathml/mathtags.in:
3220         * svg/SVGAllInOne.cpp:
3221         * svg/SVGAnimateColorElement.cpp:
3222         (WebCore::SVGAnimateColorElement::SVGAnimateColorElement):
3223         (WebCore::SVGAnimateColorElement::determinePropertyValueTypes):
3224         * svg/SVGAnimateColorElement.h:
3225         * svg/SVGAnimateElement.cpp:
3226         (WebCore::SVGAnimateElement::SVGAnimateElement):
3227         (WebCore::SVGAnimateElement::~SVGAnimateElement): Deleted.
3228         (WebCore::SVGAnimateElement::hasValidAttributeType): Deleted.
3229         (WebCore::SVGAnimateElement::determineAnimatedPropertyType): Deleted.
3230         (WebCore::SVGAnimateElement::calculateAnimatedValue): Deleted.
3231         (WebCore::SVGAnimateElement::calculateToAtEndOfDurationValue): Deleted.
3232         (WebCore::SVGAnimateElement::calculateFromAndToValues): Deleted.
3233         (WebCore::SVGAnimateElement::calculateFromAndByValues): Deleted.
3234         (WebCore::propertyTypesAreConsistent): Deleted.
3235         (WebCore::SVGAnimateElement::resetAnimatedType): Deleted.
3236         (WebCore::applyCSSPropertyToTarget): Deleted.
3237         (WebCore::removeCSSPropertyFromTarget): Deleted.
3238         (WebCore::applyCSSPropertyToTargetAndInstances): Deleted.
3239         (WebCore::removeCSSPropertyFromTargetAndInstances): Deleted.
3240         (WebCore::notifyTargetAboutAnimValChange): Deleted.
3241         (WebCore::notifyTargetAndInstancesAboutAnimValChange): Deleted.
3242         (WebCore::SVGAnimateElement::clearAnimatedType): Deleted.
3243         (WebCore::SVGAnimateElement::applyResultsToTarget): Deleted.
3244         (WebCore::SVGAnimateElement::animatedPropertyTypeSupportsAddition): Deleted.
3245         (WebCore::SVGAnimateElement::isAdditive): Deleted.
3246         (WebCore::SVGAnimateElement::calculateDistance): Deleted.
3247         (WebCore::SVGAnimateElement::setTargetElement): Deleted.
3248         (WebCore::SVGAnimateElement::setAttributeName): Deleted.
3249         (WebCore::SVGAnimateElement::resetAnimatedPropertyType): Deleted.
3250         (WebCore::SVGAnimateElement::ensureAnimator): Deleted.
3251         * svg/SVGAnimateElement.h:
3252         (WebCore::isSVGAnimateElement): Deleted.
3253         * svg/SVGAnimateElementBase.cpp: Copied from Source/WebCore/svg/SVGAnimateElement.cpp.
3254         (WebCore::SVGAnimateElementBase::SVGAnimateElementBase):
3255         (WebCore::SVGAnimateElementBase::~SVGAnimateElementBase):
3256         (WebCore::SVGAnimateElementBase::hasValidAttributeType):
3257         (WebCore::SVGAnimateElementBase::determineAnimatedPropertyType):
3258         (WebCore::SVGAnimateElementBase::calculateAnimatedValue):
3259         (WebCore::SVGAnimateElementBase::calculateToAtEndOfDurationValue):
3260         (WebCore::SVGAnimateElementBase::calculateFromAndToValues):
3261         (WebCore::SVGAnimateElementBase::calculateFromAndByValues):
3262         (WebCore::propertyTypesAreConsistent):
3263         (WebCore::SVGAnimateElementBase::resetAnimatedType):
3264         (WebCore::applyCSSPropertyToTarget):
3265         (WebCore::removeCSSPropertyFromTarget):
3266         (WebCore::applyCSSPropertyToTargetAndInstances):
3267         (WebCore::removeCSSPropertyFromTargetAndInstances):
3268         (WebCore::notifyTargetAboutAnimValChange):
3269         (WebCore::notifyTargetAndInstancesAboutAnimValChange):
3270         (WebCore::SVGAnimateElementBase::clearAnimatedType):
3271         (WebCore::SVGAnimateElementBase::applyResultsToTarget):
3272         (WebCore::SVGAnimateElementBase::animatedPropertyTypeSupportsAddition):
3273         (WebCore::SVGAnimateElementBase::isAdditive):
3274         (WebCore::SVGAnimateElementBase::calculateDistance):
3275         (WebCore::SVGAnimateElementBase::setTargetElement):
3276         (WebCore::SVGAnimateElementBase::setAttributeName):
3277         (WebCore::SVGAnimateElementBase::resetAnimatedPropertyType):
3278         (WebCore::SVGAnimateElementBase::ensureAnimator):
3279         * svg/SVGAnimateElementBase.h: Copied from Source/WebCore/svg/SVGAnimateElement.h.
3280         (WebCore::isSVGAnimateElementBase):
3281         * svg/SVGAnimateTransformElement.cpp:
3282         (WebCore::SVGAnimateTransformElement::SVGAnimateTransformElement):
3283         (WebCore::SVGAnimateTransformElement::parseAttribute):
3284         * svg/SVGAnimateTransformElement.h:
3285         * svg/SVGAnimatedAngle.cpp:
3286         * svg/SVGAnimatedBoolean.cpp:
3287         * svg/SVGAnimatedColor.cpp:
3288         * svg/SVGAnimatedInteger.cpp:
3289         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
3290         * svg/SVGAnimatedLength.cpp:
3291         * svg/SVGAnimatedLengthList.cpp:
3292         * svg/SVGAnimatedNumber.cpp:
3293         * svg/SVGAnimatedNumberList.cpp:
3294         * svg/SVGAnimatedNumberOptionalNumber.cpp:
3295         * svg/SVGAnimatedPath.cpp:
3296         * svg/SVGAnimatedPointList.cpp:
3297         * svg/SVGAnimatedPreserveAspectRatio.cpp:
3298         * svg/SVGAnimatedRect.cpp:
3299         * svg/SVGAnimatedString.cpp:
3300         * svg/SVGAnimationElement.cpp:
3301         (WebCore::SVGAnimationElement::currentValuesForValuesAnimation):
3302         * svg/SVGSetElement.cpp:
3303         (WebCore::SVGSetElement::SVGSetElement):
3304         * svg/SVGSetElement.h:
3305         * svg/svgtags.in:
3306
3307 2014-09-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3308
3309         Use std::unique_ptr for ContextMenuController
3310         https://bugs.webkit.org/show_bug.cgi?id=137178
3311
3312         Reviewed by Darin Adler.
3313
3314         Switch to using std::unique_ptr instead of OwnPtr and PassOwnPtr
3315         for ContextMenuController class. Inherited class is changed by this use as well.
3316
3317         No new tests, no behavior changes.
3318
3319         * loader/EmptyClients.cpp:
3320         (WebCore::EmptyContextMenuClient::customizeMenu):
3321         * loader/EmptyClients.h:
3322         * page/ContextMenuClient.h:
3323         * page/ContextMenuController.cpp:
3324         (WebCore::ContextMenuController::clearContextMenu):
3325         (WebCore::ContextMenuController::maybeCreateContextMenu):
3326         (WebCore::ContextMenuController::showContextMenu):
3327         * page/ContextMenuController.h:
3328
3329 2014-09-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3330
3331         Move ColorInputType class to std::unique_ptr
3332         https://bugs.webkit.org/show_bug.cgi?id=137173
3333
3334         Reviewed by Darin Adler.
3335
3336         Replace uses of PassOwnPtr in code under ColorInputType class with std::unique_ptr.
3337         Child classes follow this change as well.
3338
3339         No new tests, no behavior changes.
3340
3341         * html/ColorInputType.cpp:
3342         (WebCore::ColorInputType::didEndChooser):
3343         * html/ColorInputType.h:
3344         * loader/EmptyClients.cpp:
3345         (WebCore::EmptyChromeClient::createColorChooser):
3346         * loader/EmptyClients.h:
3347         * page/Chrome.cpp:
3348         (WebCore::Chrome::createColorChooser):
3349         * page/Chrome.h:
3350         * page/ChromeClient.h:
3351
3352 2014-09-28  Sungmann Cho  <sungmann.cho@navercorp.com>
3353
3354         Fix some minor typos: psuedo -> pseudo
3355         https://bugs.webkit.org/show_bug.cgi?id=137192
3356
3357         Reviewed by Alexey Proskuryakov.
3358
3359         No new tests, no behavior change.
3360
3361         * css/CSSSelector.cpp:
3362         (WebCore::CSSSelector::specificityForOneSelector):
3363
3364 2014-09-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3365
3366         Unreviewed. Move RenderThemeGtk.h from platform/gtk to rendering.
3367
3368         I forgot to move this file in r173111.
3369
3370         * rendering/RenderThemeGtk.h: Renamed from Source/WebCore/platform/gtk/RenderThemeGtk.h.
3371
3372 2014-09-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3373
3374         [ATK] WebKitAccessibleWrapperAtk should not depend on GTK
3375         https://bugs.webkit.org/show_bug.cgi?id=137177
3376
3377         Reviewed by Martin Robinson.
3378
3379         It's used to get the web view widget, but there's no GtkWidget in
3380         the web process and platformPageClient is always NULL.
3381
3382         * PlatformGTK.cmake: Move accessibility sources to the WebCore
3383         sources list.
3384         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3385         (atkParentOfRootObject): Remove code to get view GtkWidget.
3386         * editing/atk/FrameSelectionAtk.cpp: Remove unneeded header include.
3387
3388 2014-09-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3389
3390         [GTK] Remove unused GtkPluginWidget
3391         https://bugs.webkit.org/show_bug.cgi?id=137176
3392
3393         Reviewed by Csaba Osztrogonác.
3394
3395         It was only used by WebKit1.
3396
3397         * PlatformGTK.cmake:
3398         * platform/gtk/GtkPluginWidget.cpp: Removed.
3399         * platform/gtk/GtkPluginWidget.h: Removed.
3400
3401 2014-09-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3402
3403         [cairo] GraphicsContext should not depend on GTK+
3404         https://bugs.webkit.org/show_bug.cgi?id=137175
3405
3406         Reviewed by Martin Robinson.
3407
3408         Remove the unused methods depending on GDK and simplify
3409         GraphicsContext::drawFocusRing() using only cairo API.
3410
3411         * PlatformGTK.cmake: Move GraphicsContextCairo.cpp to the webcore sources.
3412         * platform/graphics/GraphicsContext.h:
3413         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3414         (WebCore::GraphicsContext::drawFocusRing): Iterate the rectangles
3415         instead of creating a region for the rectangles and call gdk_cairo_region().
3416         (WebCore::GraphicsContext::setGdkExposeEvent): Deleted.
3417         (WebCore::GraphicsContext::gdkExposeEvent): Deleted.
3418         (WebCore::GraphicsContext::gdkWindow): Deleted.
3419         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
3420         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
3421
3422 2014-09-27  Chris Dumez  <cdumez@apple.com>
3423
3424         HTMLPlugInElement::isUserObservable() is causing layout
3425         https://bugs.webkit.org/show_bug.cgi?id=137156
3426
3427         Reviewed by Ryosuke Niwa.