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