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