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