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