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