56f6a0fce23cb00d01674465b260e4e6c4c74083
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-10-19  Chris Dumez  <cdumez@apple.com>
2
3         Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar
4         https://bugs.webkit.org/show_bug.cgi?id=137854
5
6         Reviewed by Darin Adler.
7
8         Use SPECIALIZE_TYPE_TRAITS_*() macro for RenderScrollbar instead of a
9         custom toRenderScrollbar() function, for consistency.
10
11         No new tests, no behavior change.
12
13         * rendering/RenderScrollbar.h:
14         (isType):
15         (WebCore::toRenderScrollbar): Deleted.
16         * rendering/RenderScrollbarTheme.cpp:
17         (WebCore::RenderScrollbarTheme::minimumThumbLength):
18         (WebCore::RenderScrollbarTheme::backButtonRect):
19         (WebCore::RenderScrollbarTheme::forwardButtonRect):
20         (WebCore::RenderScrollbarTheme::trackRect):
21         (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces):
22         (WebCore::RenderScrollbarTheme::willPaintScrollbar):
23         (WebCore::RenderScrollbarTheme::didPaintScrollbar):
24         (WebCore::RenderScrollbarTheme::paintScrollbarBackground):
25         (WebCore::RenderScrollbarTheme::paintTrackBackground):
26         (WebCore::RenderScrollbarTheme::paintTrackPiece):
27         (WebCore::RenderScrollbarTheme::paintButton):
28         (WebCore::RenderScrollbarTheme::paintThumb):
29
30 2014-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
31
32         [GTK] Move GtkDragAndDropHelper from Platform to WebKit2
33         https://bugs.webkit.org/show_bug.cgi?id=137422
34
35         Reviewed by Martin Robinson.
36
37         Remove ClipboardUtilitiesGtk and GtkDragAndDropHelper.
38
39         * PlatformGTK.cmake:
40         * platform/gtk/ClipboardUtilitiesGtk.cpp: Removed.
41         * platform/gtk/ClipboardUtilitiesGtk.h: Removed.
42         * platform/gtk/GtkDragAndDropHelper.cpp: Removed.
43         * platform/gtk/GtkDragAndDropHelper.h: Removed.
44
45 2014-10-19  Roger Fong  <roger_fong@apple.com>
46
47         Unreviewed. Style fix following r174855.
48
49         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
50         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
51
52 2014-10-18  Antti Koivisto  <antti@apple.com>
53
54         REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
55         https://bugs.webkit.org/show_bug.cgi?id=137855
56
57         Reviewed by Dan Bernstein.
58
59         We lose the sniffed MIME type for the response when synthesizing an NSURLResponse. Sniffing requires
60         backchannel data that the synthesized response doesn't have.
61
62         Test: http/tests/mime/mime-type-sniff.html
63
64         * platform/network/mac/ResourceResponseMac.mm:
65         (WebCore::ResourceResponse::initNSURLResponse):
66
67             When synthesizing NSURLResponse explicitly set the Content-type header to the sniffed type.
68
69 2014-10-18  Chris Dumez  <cdumez@apple.com>
70
71         [Mac] Use Fast enumeration consistently in WebFontCache.mm
72         https://bugs.webkit.org/show_bug.cgi?id=137791
73
74         Reviewed by Darin Adler.
75
76         Use fast enumeration consistently in WebFontCache.mm as this results in
77         more efficient, concise and safer code.
78
79         No new tests, no behavior change.
80
81         * platform/mac/WebFontCache.mm:
82         (+[WebFontCache getTraits:inFamily:]):
83         Reserve Vector capacity before the loop as we know how many traits we
84         are going to append. Also use uncheckedAppend() for performance.
85
86         (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
87
88 2014-10-18  Chris Fleizach  <cfleizach@apple.com>
89
90         AX: Tables with <colgroups> are not reporting table column headers
91         https://bugs.webkit.org/show_bug.cgi?id=137846
92
93         Reviewed by Mario Sanchez Prada.
94
95         The code to search for header objects was getting stuck on anonymous RenderTableSections.
96         We also need to check more rows for headers, in case the first row or more is not visible or is empty.
97
98         Test: accessibility/table-column-headers-with-captions.html
99
100         * accessibility/AccessibilityTableColumn.cpp:
101         (WebCore::AccessibilityTableColumn::headerObject):
102         (WebCore::AccessibilityTableColumn::headerObjectForSection):
103
104 2014-10-18  KwangHyuk Kim  <hyuki.kim@samsung.com>
105
106         [EFL] build break occurs on webkit efl build.
107         https://bugs.webkit.org/show_bug.cgi?id=137844
108
109         Reviewed by Gyuyoung Kim.
110
111         As local variable elementAddressRegisterIndex is assigned but not used, there is build break for the webkit efl.
112
113         No new tests because it's just to fix build break.
114
115         * cssjit/SelectorCompiler.cpp:
116         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
117
118 2014-10-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
119
120         Apply std::unique_ptr to FooFont classes
121         https://bugs.webkit.org/show_bug.cgi?id=137769
122
123         Reviewed by Andreas Kling.
124
125         As a step to use std::unique_ptr, this patch applies std::unique_ptr to Font classes.
126
127         No new tests, no behavior changes.
128
129         * platform/graphics/Font.cpp:
130         (WebCore::retrieveOrAddCachedFontGlyphs):
131         (WebCore::Font::createLayout):
132         * platform/graphics/SimpleFontData.cpp:
133         (WebCore::SimpleFontData::DerivedFontData::create):
134         * platform/graphics/SimpleFontData.h:
135         Remove create() factory function because public ctor and std::make_unique<> can replace it.
136         * platform/graphics/mac/ComplexTextController.cpp:
137         (WebCore::Font::createLayout):
138
139 2014-10-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
140
141         Use std::unique_ptr in WebCore/bindings
142         https://bugs.webkit.org/show_bug.cgi?id=137808
143
144         Reviewed by Andreas Kling.
145
146         Clean up PassOwnPtr|OwnPtr in WebCore/bindings by using std::unique_ptr, std::make_unique
147         and WTF::move.
148
149         No new tests, no behavior changes.
150
151         * bindings/generic/ActiveDOMCallback.h:
152         * bindings/js/JSMessageEventCustom.cpp:
153         (WebCore::handleInitMessageEvent):
154         * bindings/js/SerializedScriptValue.cpp:
155         (WebCore::SerializedScriptValue::SerializedScriptValue):
156         (WebCore::SerializedScriptValue::transferArrayBuffers):
157         (WebCore::SerializedScriptValue::create):
158         * bindings/js/SerializedScriptValue.h:
159         * bindings/js/WorkerScriptDebugServer.cpp:
160         (WebCore::WorkerScriptDebugServer::interruptAndRunTask):
161         * bindings/js/WorkerScriptDebugServer.h:
162         * inspector/WorkerDebuggerAgent.cpp:
163         (WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
164
165 2014-10-16  Roger Fong  <roger_fong@apple.com>
166
167         Calling glReadPixels with BGRA format on an NVIDIA machine with an opaque context returns the wrong alpha values.
168         https://bugs.webkit.org/show_bug.cgi?id=137793.
169         <rdar://problem/15408133>
170
171         Reviewed by Dean Jackson.
172
173         This fixes conformance test context/context-attribute-preserve-drawing-buffer.html.
174
175         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
176         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
177         On an NVIDIA machine, when the context has alpha turned off, call glReadPixels with RGBA format and then convert to RGBA.
178
179 2014-10-17  Chris Dumez  <cdumez@apple.com>
180
181         Use is<>() / downcast<>() for all SVG RenderObjects
182         https://bugs.webkit.org/show_bug.cgi?id=137840
183
184         Reviewed by Benjamin Poulain.
185
186         Use is<>() / downcast<>() for all SVG RenderObjects and clean up the
187         surrounding code.
188
189         No new tests, no behaviro change.
190
191         * accessibility/AccessibilityRenderObject.cpp:
192         (WebCore::AccessibilityRenderObject::supportsPath):
193         (WebCore::AccessibilityRenderObject::elementPath):
194         * page/FrameView.cpp:
195         (WebCore::FrameView::applyOverflowToViewport):
196         (WebCore::FrameView::forceLayoutParentViewIfNeeded):
197         * rendering/RenderLayerFilterInfo.cpp:
198         (WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients):
199         * rendering/svg/RenderSVGGradientStop.cpp:
200         (WebCore::RenderSVGGradientStop::styleDidChange):
201         * rendering/svg/RenderSVGImage.h:
202         * rendering/svg/RenderSVGInlineText.h:
203         * rendering/svg/RenderSVGResourceContainer.cpp:
204         (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
205         * rendering/svg/RenderSVGResourceContainer.h:
206         * rendering/svg/RenderSVGRoot.cpp:
207         (WebCore::RenderSVGRoot::addResourceForClientInvalidation):
208         * rendering/svg/RenderSVGRoot.h:
209         * rendering/svg/RenderSVGShape.h:
210         * rendering/svg/RenderSVGText.cpp:
211         (WebCore::collectLayoutAttributes):
212         (WebCore::RenderSVGText::subtreeChildWillBeRemoved):
213         (WebCore::RenderSVGText::subtreeTextDidChange):
214         (WebCore::updateFontInAllDescendants):
215         * rendering/svg/RenderSVGText.h:
216         * rendering/svg/SVGInlineTextBox.h:
217         * rendering/svg/SVGRenderSupport.cpp:
218         (WebCore::SVGRenderSupport::mapLocalToContainer):
219         (WebCore::SVGRenderSupport::pushMappingToContainer):
220         (WebCore::SVGRenderSupport::computeContainerBoundingBoxes):
221         * rendering/svg/SVGRenderTreeAsText.cpp:
222         (WebCore::writeStyle):
223         * rendering/svg/SVGRenderingContext.cpp:
224         (WebCore::SVGRenderingContext::bufferForeground):
225         * rendering/svg/SVGResourcesCycleSolver.cpp:
226         (WebCore::SVGResourcesCycleSolver::resolveCycles):
227         * rendering/svg/SVGRootInlineBox.cpp:
228         (WebCore::SVGRootInlineBox::renderSVGText):
229         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
230         * svg/SVGCircleElement.cpp:
231         (WebCore::SVGCircleElement::svgAttributeChanged):
232         * svg/SVGElement.cpp:
233         (WebCore::SVGElement::svgAttributeChanged):
234         * svg/SVGEllipseElement.cpp:
235         (WebCore::SVGEllipseElement::svgAttributeChanged):
236         * svg/SVGImageElement.cpp:
237         (WebCore::SVGImageElement::svgAttributeChanged):
238         (WebCore::SVGImageElement::didAttachRenderers):
239         * svg/SVGLineElement.cpp:
240         (WebCore::SVGLineElement::svgAttributeChanged):
241         * svg/SVGPolyElement.cpp:
242         (WebCore::SVGPolyElement::svgAttributeChanged):
243         * svg/SVGRectElement.cpp:
244         (WebCore::SVGRectElement::svgAttributeChanged):
245         * svg/SVGSVGElement.cpp:
246         (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
247         (WebCore::SVGSVGElement::currentViewBoxRect):
248         * svg/graphics/SVGImage.cpp:
249         (WebCore::SVGImage::setContainerSize):
250         (WebCore::SVGImage::containerSize):
251
252 2014-10-17  Chris Dumez  <cdumez@apple.com>
253
254         Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms()
255         https://bugs.webkit.org/show_bug.cgi?id=137836
256
257         Reviewed by Andreas Kling.
258
259         Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms().
260         This function is only called from WidthIterator::applyFontTransforms(),
261         which already makes sure to call applyTransforms() if isSVGFont()
262         returns false. This patch replaces the check with a simple assertion.
263
264         No new tests, no behavior change.
265
266         * platform/graphics/SimpleFontData.h:
267         * svg/SVGFontData.h:
268
269 2014-10-17  Michael Saboff  <msaboff@apple.com>
270
271         Don't create cached functions that access lexicalGlobalObject()
272         https://bugs.webkit.org/show_bug.cgi?id=137839
273
274         Reviewed by Geoffrey Garen.
275
276         Made it so that all the JSDOMWindow special functions blur(), close(), focus() and postMessage()
277         are always created as needed for every prototype.  Made it so that JSHTMLDocument does
278         the same for open().  Updated test to account for these methods not being cached
279
280         Updated tests accordingly.
281
282         * bindings/js/JSDOMWindowCustom.cpp: 
283         (WebCore::JSDOMWindow::getOwnPropertySlot): Updated to always create cached versions of the
284         special functions.
285         * bindings/js/JSHTMLDocumentCustom.cpp:
286         (WebCore::JSHTMLDocument::getOwnPropertySlot): Added to create an uncached open() method when
287         it is first accessed.
288         * html/HTMLDocument.idl: Added CustomGetOwnPropertySlot and implemented it in JSHTMLDocumentCustom.cpp.
289
290 2014-10-17  Simon Fraser  <simon.fraser@apple.com>
291
292         [iOS] Speculative fix for a crash under RenderLayerCompositor::updateScrollCoordinatedLayer()
293         https://bugs.webkit.org/show_bug.cgi?id=137837
294         rdar://problem/18545452
295
296         Reviewed by Tim Horton.
297
298         Crash logs suggest that an iframe's RenderView's RenderLayer's backing can be null
299         in a call to updateScrollCoordinatedLayer(), so add an assertion (to help find a reproducible case)
300         and a null check.
301
302         * rendering/RenderLayerCompositor.cpp:
303         (WebCore::RenderLayerCompositor::attachScrollingNode):
304
305 2014-10-17  Andreas Kling  <akling@apple.com>
306
307         Re-arrange parentheses for compilation purposes.
308
309         * cssjit/SelectorCompiler.cpp:
310         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
311
312 2014-10-17  Andreas Kling  <akling@apple.com>
313
314         Unreviewed build fix after r174838.
315
316         Use StackAllocator::addressOf() instead of the old way of grabbing at a stack reference.
317
318         * cssjit/SelectorCompiler.cpp:
319         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
320
321 2014-10-17  Chris Dumez  <cdumez@apple.com>
322
323         Use is<>() / downcast<>() for RenderBox
324         https://bugs.webkit.org/show_bug.cgi?id=137804
325
326         Reviewed by Andreas Kling.
327
328         Use is<>() / downcast<>() for RenderBox and clean up the surrounding
329         code.
330
331         No new tests, no behavior change.
332
333         * accessibility/AccessibilityRenderObject.cpp:
334         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
335         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
336         (WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable):
337         (WebCore::AccessibilityRenderObject::scrollTo):
338         * bindings/objc/DOMHTML.mm:
339         (-[DOMHTMLElement scrollYOffset]):
340         (-[DOMHTMLElement setScrollXOffset:scrollYOffset:adjustForIOSCaret:]):
341         * bindings/objc/DOMUIKitExtensions.mm:
342         (-[DOMNode borderRadii]):
343         * css/CSSComputedStyleDeclaration.cpp:
344         (WebCore::sizingBox):
345         (WebCore::computedTransform):
346         (WebCore::zoomAdjustedPaddingOrMarginPixelValue):
347         (WebCore::ComputedStyleExtractor::propertyValue):
348         * dom/ContainerNode.cpp:
349         (WebCore::ContainerNode::getLowerRightCorner):
350         * dom/Document.cpp:
351         (WebCore::Document::webkitWillEnterFullScreenForElement):
352         * dom/Element.cpp:
353         (WebCore::Element::scrollByUnits):
354         * dom/Node.cpp:
355         (WebCore::Node::defaultEventHandler):
356         * dom/Position.cpp:
357         (WebCore::endsOfNodeAreVisuallyDistinctPositions):
358         * editing/DeleteButtonController.cpp:
359         (WebCore::isDeletableElement):
360         * editing/EditorCommand.cpp:
361         (WebCore::verticalScrollDistance):
362         * editing/FrameSelection.cpp:
363         (WebCore::CaretBase::paintCaret):
364         * editing/TextIterator.cpp:
365         (WebCore::fullyClipsContents):
366         (WebCore::shouldEmitExtraNewlineForNode):
367         * editing/htmlediting.cpp:
368         (WebCore::absoluteBoundsForLocalCaretRect):
369         * html/HTMLFormControlElement.cpp:
370         (WebCore::HTMLFormControlElement::isFocusable):
371         * html/HTMLPlugInImageElement.cpp:
372         (WebCore::HTMLPlugInImageElement::checkSizeChangeForSnapshotting):
373         * html/HTMLSelectElement.cpp:
374         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
375         * html/shadow/SliderThumbElement.cpp:
376         (WebCore::SliderThumbElement::setPositionFromPoint):
377         * inspector/InspectorOverlay.cpp:
378         (WebCore::buildObjectForElementInfo):
379         * page/AutoscrollController.cpp:
380         (WebCore::AutoscrollController::updateAutoscrollRenderer):
381         * page/EventHandler.cpp:
382         (WebCore::EventHandler::startPanScrolling):
383         * page/FrameView.cpp:
384         (WebCore::FrameView::embeddedContentBox):
385         * page/GestureTapHighlighter.cpp:
386         * page/SpatialNavigation.cpp:
387         (WebCore::isScrollableNode):
388         * page/animation/CSSPropertyAnimation.cpp:
389         (WebCore::blendFunc):
390         * platform/efl/RenderThemeEfl.cpp:
391         (WebCore::RenderThemeEfl::baselinePosition):
392         * plugins/PluginView.cpp:
393         (WebCore::PluginView::invalidateWindowlessPluginRect):
394         * rendering/InlineBox.cpp:
395         (WebCore::InlineBox::logicalHeight):
396         (WebCore::InlineBox::adjustPosition):
397         * rendering/InlineElementBox.cpp:
398         (WebCore::InlineElementBox::deleteLine):
399         (WebCore::InlineElementBox::extractLine):
400         (WebCore::InlineElementBox::attachLine):
401         (WebCore::InlineElementBox::paint):
402         (WebCore::InlineElementBox::nodeAtPoint):
403         * rendering/InlineFlowBox.cpp:
404         (WebCore::InlineFlowBox::addToLine):
405         (WebCore::InlineFlowBox::addReplacedChildOverflow):
406         * rendering/LayoutState.cpp:
407         (WebCore::LayoutState::LayoutState):
408         * rendering/RenderBlock.cpp:
409         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
410         (WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
411         (WebCore::RenderBlock::clearPercentHeightDescendantsFrom):
412         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
413         (WebCore::RenderBlock::addFocusRingRects):
414         * rendering/RenderBlockFlow.cpp:
415         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
416         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
417         * rendering/RenderBlockLineLayout.cpp:
418         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
419         (WebCore::RenderBlockFlow::layoutLineBoxes):
420         * rendering/RenderBox.cpp:
421         (WebCore::RenderBox::findAutoscrollable):
422         (WebCore::computeBlockStaticDistance):
423         (WebCore::RenderBox::positionForPoint):
424         (WebCore::RenderBox::layoutOverflowRectForPropagation):
425         * rendering/RenderBox.h:
426         (WebCore::RenderBox::previousSiblingBox):
427         (WebCore::RenderBox::nextSiblingBox):
428         (WebCore::RenderBox::parentBox):
429         (WebCore::RenderBox::firstChildBox):
430         (WebCore::RenderBox::lastChildBox):
431         * rendering/RenderBoxModelObject.cpp:
432         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
433         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
434         (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
435         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
436         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
437         * rendering/RenderElement.cpp:
438         (WebCore::RenderElement::removeChildInternal):
439         (WebCore::RenderElement::styleWillChange):
440         (WebCore::RenderElement::repaintAfterLayoutIfNeeded):
441         * rendering/RenderEmbeddedObject.cpp:
442         (WebCore::RenderEmbeddedObject::layout):
443         * rendering/RenderFieldset.cpp:
444         (WebCore::RenderFieldset::findLegend):
445         * rendering/RenderFlowThread.cpp:
446         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
447         (WebCore::RenderFlowThread::currentActiveRenderBox):
448         * rendering/RenderFlowThread.h:
449         * rendering/RenderFullScreen.cpp:
450         (WebCore::RenderFullScreen::unwrapRenderer):
451         * rendering/RenderImage.cpp:
452         (WebCore::RenderImage::layoutShadowControls):
453         (WebCore::RenderImage::computeIntrinsicRatioInformation):
454         * rendering/RenderInline.cpp:
455         (WebCore::RenderInline::absoluteRects):
456         (WebCore::RenderInline::addFocusRingRects):
457         * rendering/RenderLayer.cpp:
458         (WebCore::RenderLayer::updateLayerPosition):
459         (WebCore::RenderLayer::perspectiveTransform):
460         (WebCore::RenderLayer::perspectiveOrigin):
461         (WebCore::parentLayerCrossFrame):
462         (WebCore::RenderLayer::enclosingScrollableLayer):
463         (WebCore::RenderLayer::resize):
464         (WebCore::RenderLayer::scrollsOverflow):
465         (WebCore::computeReferenceBox):
466         (WebCore::RenderLayer::calculateClipRects):
467         * rendering/RenderLayer.h:
468         * rendering/RenderLayerBacking.cpp:
469         (WebCore::RenderLayerBacking::updateTransform):
470         (WebCore::RenderLayerBacking::updateGeometry):
471         (WebCore::RenderLayerBacking::resetContentsRect):
472         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
473         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
474         (WebCore::RenderLayerBacking::contentsBox):
475         (WebCore::RenderLayerBacking::backgroundBoxForPainting):
476         (WebCore::RenderLayerBacking::startAnimation):
477         (WebCore::RenderLayerBacking::startTransition):
478         * rendering/RenderLineBoxList.cpp:
479         (WebCore::RenderLineBoxList::rangeIntersectsRect):
480         * rendering/RenderMediaControlElements.cpp:
481         (WebCore::RenderMediaVolumeSliderContainer::layout):
482         * rendering/RenderMultiColumnFlowThread.cpp:
483         (WebCore::RenderMultiColumnFlowThread::firstColumnSetOrSpanner):
484         (WebCore::RenderMultiColumnFlowThread::nextColumnSetOrSpannerSiblingOf):
485         (WebCore::RenderMultiColumnFlowThread::previousColumnSetOrSpannerSiblingOf):
486         (WebCore::RenderMultiColumnFlowThread::resolveMovedChild):
487         (WebCore::isValidColumnSpanner):
488         (WebCore::RenderMultiColumnFlowThread::handleSpannerRemoval):
489         * rendering/RenderNamedFlowThread.cpp:
490         (WebCore::RenderNamedFlowThread::getRanges):
491         * rendering/RenderObject.cpp:
492         (WebCore::RenderObject::computeRectForRepaint):
493         (WebCore::RenderObject::showRegionsInformation):
494         (WebCore::RenderObject::showRenderObject):
495         (WebCore::RenderObject::mapLocalToContainer):
496         (WebCore::RenderObject::pushMappingToContainer):
497         (WebCore::RenderObject::mapAbsoluteToLocalPoint):
498         (WebCore::RenderObject::addAnnotatedRegions):
499         * rendering/RenderTable.cpp:
500         (WebCore::RenderTable::nodeAtPoint):
501         * rendering/RenderTextControlMultiLine.cpp:
502         (WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild):
503         * rendering/RenderTheme.cpp:
504         (WebCore::RenderTheme::baselinePosition):
505         * rendering/RenderThemeGtk.cpp:
506         (WebCore::RenderThemeGtk::baselinePosition):
507         (WebCore::centerRectVerticallyInParentInputElement):
508         * rendering/RenderThemeIOS.mm:
509         (WebCore::RenderThemeIOS::baselinePosition):
510         * rendering/RenderThemeSafari.cpp:
511         (WebCore::RenderThemeSafari::baselinePosition):
512         * rendering/RenderThemeWin.cpp:
513         (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
514         (WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
515         (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
516         * rendering/RenderTreeAsText.cpp:
517         (WebCore::RenderTreeAsText::writeRenderObject):
518         (WebCore::externalRepresentation):
519         * rendering/RenderView.cpp:
520         (WebCore::RenderView::paintBoxDecorations):
521         * rendering/RootInlineBox.cpp:
522         (WebCore::RootInlineBox::setLineBreakInfo):
523         * rendering/line/BreakingContextInlineHeaders.h:
524         (WebCore::BreakingContext::handleOutOfFlowPositioned):
525         (WebCore::BreakingContext::handleFloat):
526         (WebCore::BreakingContext::handleReplaced):
527         * rendering/line/LineBreaker.cpp:
528         (WebCore::LineBreaker::skipTrailingWhitespace):
529         (WebCore::LineBreaker::skipLeadingWhitespace):
530         * rendering/mathml/RenderMathMLUnderOver.cpp:
531         (WebCore::RenderMathMLUnderOver::layout):
532         * svg/graphics/SVGImage.cpp:
533         (WebCore::SVGImage::embeddedContentBox):
534
535 2014-10-17  Andreas Kling  <akling@apple.com>
536
537         Get rid of wrapperContext() in DOM bindings.
538         <https://webkit.org/b/137834>
539
540         Reviewed by Chris Dumez.
541
542         The "wrapper context" is always the DOMWrapperWorld, and since we're passing that around
543         already, we don't need a separate mechanism to get at the context.
544
545         The context is extra data stored in the DOM object's JSC::Weak (the wrapper GC object.)
546
547         * bindings/js/JSDOMBinding.h:
548         (WebCore::setInlineCachedWrapper):
549         (WebCore::cacheWrapper):
550         (WebCore::wrapperContext): Deleted.
551         * bindings/scripts/CodeGeneratorJS.pm:
552         (GenerateHeader):
553
554 2014-10-17  Benjamin Poulain  <benjamin@webkit.org>
555
556         Make a better use of the available registers when compiling nested selector lists
557         https://bugs.webkit.org/show_bug.cgi?id=137802
558
559         Reviewed by Andreas Kling.
560
561         Previously, when compiling a nested selector list, the compiler would start by pushing all
562         the allocated registers to the stack to free them for the compiled selector list.
563         While neat to ensure register allocation is correct, this is very inefficient.
564
565         This patch brings the first step for reducing the overhead. Instead of pushing everything
566         to the stack, we just push as many registers as we need for compiling the selector list.
567
568         In most cases, we have so many registers that we don't even need to push anything to the stack.
569
570         Test: fast/selectors/nth-child-of-register-requirement.html
571
572         * cssjit/SelectorCompiler.cpp:
573         Add an explicit type for SelectorList to keep information aggregated from all
574         SelectorFragmentList inside it.
575
576         SelectorFragmentList is also extended to include its register and stack requirements.
577         This information is then used to create a SelectorList and to compile the SelectorFragmentList.
578
579         (WebCore::SelectorCompiler::hasAnyCombinators):
580         We only change the elementAddressRegister when moving over combinators. This is used to detect
581         if a selector list clobber the elementAddressRegister or leave it untouched.
582
583         (WebCore::SelectorCompiler::computeBacktrackingMemoryRequirements):
584         (WebCore::SelectorCompiler::computeBacktrackingInformation):
585         Instead of returning a BacktrackingMemoryRequirements, update the SelectorFragmentList and SelectorList directly.
586
587         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
588         This is where the fun happen.
589         First step is keep the input untouched. For now it is simply pushed on the stack. This can be improved later.
590
591         Then we find how many allocated registers we need to save to compile the input selector list. We push those registers
592         to the stack and give them back to the register allocator.
593
594         With enough registers we can now compile the nested selector list. The code has changed a bit for efficiency. Instead
595         of creating a shortcut for success case, the code now exit on error and proceed on success. This is the general pattern
596         of SelectorCompiler and it is quite a bit more efficient in the common cases.
597
598         Finally, we reallocate the registers and get their values back from the stack. The "tail" is duplicated but that's fine
599         because in the vast majority of cases it is 1 or 2 pop.
600
601         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
602         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
603         * cssjit/StackAllocator.h:
604         (WebCore::StackAllocator::push):
605
606 2014-10-17  Chris Dumez  <cdumez@apple.com>
607
608         Use is<>() / downcast<>() for StyleImage
609         https://bugs.webkit.org/show_bug.cgi?id=137824
610
611         Reviewed by Andreas Kling.
612
613         Use is<>() / downcast<>() for StyleImage and clean up the surrouding
614         code.
615
616         No new tests, no behavior change.
617
618         * css/CSSCursorImageValue.cpp:
619         (WebCore::CSSCursorImageValue::detachPendingImage):
620         (WebCore::CSSCursorImageValue::cachedImage):
621         (WebCore::CSSCursorImageValue::cachedImageURL):
622         * css/CSSImageSetValue.cpp:
623         (WebCore::CSSImageSetValue::detachPendingImage):
624         (WebCore::CSSImageSetValue::~CSSImageSetValue):
625         (WebCore::CSSImageSetValue::cachedImageSet):
626         (WebCore::CSSImageSetValue::hasFailedOrCanceledSubresources):
627         * css/CSSImageValue.cpp:
628         (WebCore::CSSImageValue::detachPendingImage):
629         (WebCore::CSSImageValue::cachedImage):
630         (WebCore::CSSImageValue::hasFailedOrCanceledSubresources):
631         * css/StyleResolver.cpp:
632         (WebCore::StyleResolver::loadPendingShapeImage):
633         (WebCore::StyleResolver::loadPendingImages):
634         * page/PageSerializer.cpp:
635         (WebCore::PageSerializer::retrieveResourcesForProperties):
636         * page/animation/CSSPropertyAnimation.cpp:
637         (WebCore::blendFunc):
638         * rendering/style/StyleCachedImage.h:
639         * rendering/style/StyleCachedImageSet.h:
640         * rendering/style/StyleGeneratedImage.h:
641         * rendering/style/StyleImage.h:
642         * rendering/style/StylePendingImage.h:
643
644 2014-10-17  Dean Jackson  <dino@apple.com>
645
646         [Media] Always update controls for <audio> since they are always visible
647         https://bugs.webkit.org/show_bug.cgi?id=137829
648         <rdar://problem/18693987>
649
650         Reviewed by Brent Fulgham.
651
652         Revision 174756 made a change to only update the display of the controls
653         while they are visible. However, <audio> elements didn't detect visibility
654         the same way, since their controls do not auto-hide.
655
656         Change controlsAreHidden to check if we're an audio element.
657
658         * Modules/mediacontrols/mediaControlsApple.js:
659         (Controller.prototype.controlsAreHidden): Audio elements do not auto-hide their controls.
660
661 2014-10-17  peavo@outlook.com  <peavo@outlook.com>
662
663         [WinCairo] Accelerated compositing is not implemented.
664         https://bugs.webkit.org/show_bug.cgi?id=137345
665
666         Reviewed by Brent Fulgham.
667
668         This patch is based on GTK, and the texture mapper graphics layer type.
669
670         * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy texmap headers.
671         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: Added method and flag indicating whether animation has started.
672         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
673         (WebCore::GraphicsLayerTextureMapper::addAnimation):
674         * platform/graphics/texmap/GraphicsLayerTextureMapper.h: Ditto.
675         (WebCore::GraphicsLayerTextureMapper::startedAnimation):
676         * platform/graphics/texmap/TextureMapperShaderProgram.cpp: Use same precision for uniform in vertex shader as in fragment shader.
677         Otherwise glLinkProgram() will fail, and nothing will be rendered.
678
679 2014-10-17  Alexey Proskuryakov  <ap@apple.com>
680
681         [iOS] Crash when load is canceled while waiting for the user to type HTTP authentication credentials
682         https://bugs.webkit.org/show_bug.cgi?id=137826
683         rdar://problem/17329599
684
685         Reviewed by Brady Eidson.
686
687         No new tests, as we don't have a way to simulate details of user interaction with
688         an auth dialog.
689
690         * platform/network/cf/ResourceHandleCFNet.cpp:
691         (WebCore::ResourceHandle::receivedCredential):
692         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
693         (WebCore::ResourceHandle::receivedRequestToPerformDefaultHandling):
694         (WebCore::ResourceHandle::receivedChallengeRejection):
695         Added null checks before passing m_connection for CFNetwork functions, making this
696         match what Mac code does when sending a message to a nil receiver.
697
698 2014-10-17  Simon Fraser  <simon.fraser@apple.com>
699
700         Fix the iOS build.
701
702         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
703         (WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption):
704
705 2014-10-16  Jer Noble  <jer.noble@apple.com>
706
707         [Mac] Represent AVMediaSelectionOptions as AudioTracks
708         https://bugs.webkit.org/show_bug.cgi?id=137474
709
710         Reviewed by Brent Fulgham.
711
712         Test: http/tests/media/hls/hls-audio-tracks.html
713
714         Support selecting audio "tracks" in HLS streams by exposing AVMediaSelectionOptions
715         as entries in the video's AudioTrackList.
716
717         AVMediaSessionGroups and AVPlayerItems don't have KVO or notifications to track when options
718         are selected and deselected, so wrap AVMediaSessionGroup and AVMediaSessionOption in C++
719         wrappers. Each AVMediaSelectionGroup can have only one AVMediaSelectionOption selected at a
720         time, so the wrapper will take care of answering which AVMediaSelectionOption is currently
721         selected, as without KVO notifications, asking the AVMediaSelectionGroup directly is
722         inconsistent. Because setting the selected option multiple times in the same run-loop can
723         cause flakiness, coalesce calls to setSelectedOption() by setting a one-shot timer to do
724         the actual selection in the next run-loop.
725
726         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: Added.
727         (WebCore::MediaSelectionOptionAVFObjC::avMediaSelectionOption):
728         (WebCore::MediaSelectionOptionAVFObjC::clearGroup): Clear backpointer to group from option.
729         (WebCore::MediaSelectionGroupAVFObjC::selectedOption): Simple accessor.
730         (WebCore::MediaSelectionGroupAVFObjC::options):  Simple accessor.
731         (WebCore::MediaSelectionGroupAVFObjC::avMediaSelectionGroup): Simple accessor.
732         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: Added.
733         (WebCore::MediaSelectionOptionAVFObjC::create): Simple factory method.
734         (WebCore::MediaSelectionOptionAVFObjC::MediaSelectionOptionAVFObjC): Simple constructor.
735         (WebCore::MediaSelectionOptionAVFObjC::setSelected): Pass through to MediaSelectionGroupAVFObjC.
736         (WebCore::MediaSelectionOptionAVFObjC::selected): Ditto.
737         (WebCore::MediaSelectionOptionAVFObjC::index): Return index of this object in the group's object.
738         (WebCore::MediaSelectionGroupAVFObjC::create):
739         (WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC):
740         (WebCore::MediaSelectionGroupAVFObjC::~MediaSelectionGroupAVFObjC):
741         (WebCore::MediaSelectionGroupAVFObjC::updateOptions): Discover added or removed options.
742         (WebCore::MediaSelectionGroupAVFObjC::setSelectedOption): Set a one shot timer to coalesce multiple calls.
743         (WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired): Set the selected AVSelectionOption.
744
745         Modify AVTrackPrivateAVFObjCImpl to support both AVPlayerItemTracks and these new
746         MediaSelectionOptionAVFObjC objects.
747
748         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
749         (WebCore::AVTrackPrivateAVFObjCImpl::mediaSelectionOption): Simple accessor.
750         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
751         (WebCore::AVTrackPrivateAVFObjCImpl::AVTrackPrivateAVFObjCImpl):  Simple constructor.
752         (WebCore::AVTrackPrivateAVFObjCImpl::~AVTrackPrivateAVFObjCImpl): Simple destructor.
753         (WebCore::AVTrackPrivateAVFObjCImpl::enabled): Use MediaSelectionOptionAVFObjC, if present.
754         (WebCore::AVTrackPrivateAVFObjCImpl::setEnabled): Ditto.
755         (WebCore::AVTrackPrivateAVFObjCImpl::audioKind): Ditto.
756         (WebCore::AVTrackPrivateAVFObjCImpl::videoKind): Ditto.
757         (WebCore::AVTrackPrivateAVFObjCImpl::index): Ditto.
758         (WebCore::AVTrackPrivateAVFObjCImpl::id): Ditto.
759         (WebCore::AVTrackPrivateAVFObjCImpl::label): Ditto.
760         (WebCore::AVTrackPrivateAVFObjCImpl::language): Ditto.
761         (WebCore::AVTrackPrivateAVFObjCImpl::languageForAVMediaSelectionOption): Ditto.
762         (WebCore::AVTrackPrivateAVFObjCImpl::trackID): Ditto.
763
764         Allow AudioTrackPrivateAVFObjC and VideoTrackPrivateAVFObjC to be created with
765         a MediaSelectionOptionAVFObjC.
766
767         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
768         (WebCore::AudioTrackPrivateAVFObjC::create): Takes a MediaSelectionOptionAVFObjC.
769         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
770         (WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC): Simple constructor.
771         (WebCore::AudioTrackPrivateAVFObjC::setMediaSelectionOption): Create a new AVTrackPrivateAVFObjCImpl.
772         (WebCore::AudioTrackPrivateAVFObjC::mediaSelectionOption): Simple accessor.
773         * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
774         (WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC): Simple constructor.
775         (WebCore::VideoTrackPrivateAVFObjC::setMediaSelectonOption): Create a new AVTrackPrivateAVFObjCImpl.
776         (WebCore::VideoTrackPrivateAVFObjC::mediaSelectionOption): Simple accessor.
777         * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
778
779         Because IDs are not necessarily unique across AVPlayerItemTracks and AVMediaSelectionOptions,
780         use the index of the track or option instead of it's self-declared ID for ordering for the
781         trackIndex.
782
783         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
784         (WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack):
785         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
786         (WebCore::VideoTrackPrivateMediaSourceAVFObjC::resetPropertiesFromTrack):
787
788         Rather than making allowing the AVPlayerItem to automatically select the "best"
789         AVMediaSelectionOption, select the automatic options when creating the AVPlayerItem
790         and thereafter allow the users manual selections "stick".
791
792         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
793         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
794         (WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayer):
795         (WebCore::MediaPlayerPrivateAVFoundationObjC::ensureAVPlayerItem):
796
797         Determine whether any MediaSelectionOptionsAVFObjC have been added or removed and send trackChange events accordingly.
798
799         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
800         (WebCore::determineChangedTracksFromNewTracksAndOldItems): Added.
801         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): Search for updated selection options.
802         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): Ditto.
803         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia): Return selection group, if available.
804         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia): Ditto.
805         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Filter out AVPlayerItemTracks without
806             AVAssetTracks, as these will be represented by MediaSelectionGroupObjCs instead.
807         
808         Add new files to project.
809         * WebCore.xcodeproj/project.pbxproj:
810
811 2014-10-17  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
812
813         [EFL] window.screen.width returns wrong value if more displays are available
814         https://bugs.webkit.org/show_bug.cgi?id=137778
815
816         Reviewed by Gyuyoung Kim.
817
818         ecore_x_screen_size_get() retrieves the size of Ecore_X_Screen, for example,
819         having two displays of 1680x1050, it will return 3360x1050.
820
821         Unlike EFL's MiniBrowser, Firefox and Chrome return screen of the current display.
822
823         No new tests. Hardware specific bug including multiple displays.
824
825         * platform/efl/PlatformScreenEfl.cpp:
826         (WebCore::screenRect):
827         Use ecore's xrandr to determine the screen on which browser window is displayed.
828
829 2014-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
830
831         [GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
832         https://bugs.webkit.org/show_bug.cgi?id=137782
833
834         Reviewed by Sergio Villar Senin.
835
836         * platform/gtk/SharedTimerGtk.cpp:
837         (WebCore::setSharedTimerFireInterval): Use microseconds instead of
838         milliseconds.
839
840 2014-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
841
842         [GTK] Move touch events handling from Platform to WebKit2
843         https://bugs.webkit.org/show_bug.cgi?id=137735
844
845         Reviewed by Sergio Villar Senin.
846
847         Remove GtkTouchContextHelper.
848
849         * PlatformGTK.cmake:
850         * platform/gtk/GtkTouchContextHelper.cpp: Removed.
851         * platform/gtk/GtkTouchContextHelper.h: Removed.
852
853 2014-10-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
854
855         Remove unused function in WorkerThreadableLoader.h 
856         https://bugs.webkit.org/show_bug.cgi?id=137811
857
858         Reviewed by Csaba Osztrogon√°c.
859
860         mainThreadCreateLoader() isn't used anywhere. Even there is no implementation.
861
862         * loader/WorkerThreadableLoader.h:
863
864 2014-10-15  Yusuke Suzuki  <utatane.tea@gmail.com>
865
866         CSS Selectors Level 4: Implement :matches in SelectorChecker
867         https://bugs.webkit.org/show_bug.cgi?id=137393
868
869         Reviewed by Benjamin Poulain.
870
871         In this patch, we introduce initial :matches implementation.
872         In this current implementation, we don't consider pseudo elements.
873
874         Test: fast/selectors/querySelector-matches.html
875
876         * css/SelectorChecker.cpp:
877         (WebCore::SelectorChecker::checkOne):
878
879 2014-10-16  Yusuke Suzuki  <utatane.tea@gmail.com>
880
881         CSS JIT: Introduce StackAllocator::addressOf
882         https://bugs.webkit.org/show_bug.cgi?id=137771
883
884         Reviewed by Benjamin Poulain.
885
886         Introduce StackAllocator::addressOf and drop offsetToStackReference, it's too primitive.
887
888         * cssjit/SelectorCompiler.cpp:
889         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
890         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateParentElementTreeWalker):
891         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
892         (WebCore::SelectorCompiler::SelectorCodeGenerator::loadCheckingContext):
893         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
894         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDescendantBacktrackingTail):
895         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstLink):
896         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateStoreLastVisitedElement):
897         * cssjit/StackAllocator.h:
898         (WebCore::StackAllocator::addressOf):
899         (WebCore::StackAllocator::offsetToStackReference):
900
901 2014-10-16  Alexey Proskuryakov  <ap@apple.com>
902
903         REGRESSION (r169024): Undetermined text is not displayed in the search field of Adobe Help Website
904         https://bugs.webkit.org/show_bug.cgi?id=137679
905         rdar://problem/18450335
906
907         Reviewed by Enrica Casucci.
908
909         Test: platform/mac/editing/input/selected-composed-text-painting.html
910
911         * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::paint): We do not paint
912         selection beckground for unconfirmed text with underlines, so we should use a regular
913         style for text painting, as well.
914
915 2014-10-16  Chris Dumez  <cdumez@apple.com>
916
917         Use is<>() / downcast<>() for BasicShape subclasses
918         https://bugs.webkit.org/show_bug.cgi?id=137766
919
920         Reviewed by Andreas Kling.
921
922         Use is<>() / downcast<>() for BasicShape subclasses and clean up the
923         surrounding code.
924
925         No new tests, no behavior change.
926
927         * css/BasicShapeFunctions.cpp:
928         (WebCore::valueForBasicShape):
929         (WebCore::basicShapeForValue):
930         * css/BasicShapeFunctions.h:
931         * css/CSSComputedStyleDeclaration.cpp:
932         (WebCore::shapePropertyValue):
933         * page/animation/CSSPropertyAnimation.cpp:
934         (WebCore::blendFunc):
935         * rendering/ClipPathOperation.h:
936         (WebCore::ShapeClipPathOperation::create):
937         Take a PassRef<BasicShape> in argument to make it obvious it is never
938         null.
939
940         (WebCore::ShapeClipPathOperation::basicShape):
941         Return a reference instead of a pointer as it can never return null.
942
943         (WebCore::ShapeClipPathOperation::windRule):
944         (WebCore::ShapeClipPathOperation::pathForReferenceRect):
945         Make it non-const due to the const-correctness of Ref::get().
946
947         (WebCore::ShapeClipPathOperation::ShapeClipPathOperation):
948         * rendering/RenderBlock.cpp:
949         (WebCore::RenderBlock::nodeAtPoint):
950         * rendering/RenderLayer.cpp:
951         (WebCore::RenderLayer::setupClipPath):
952         * rendering/shapes/Shape.cpp:
953         (WebCore::Shape::createShape):
954         * rendering/shapes/Shape.h:
955         * rendering/shapes/ShapeOutsideInfo.cpp:
956         (WebCore::ShapeOutsideInfo::computedShape):
957         * rendering/style/BasicShapes.cpp:
958         (WebCore::BasicShape::canBlend):
959         (WebCore::BasicShapeCircle::blend):
960         (WebCore::BasicShapeEllipse::blend):
961         (WebCore::BasicShapePolygon::blend):
962         (WebCore::BasicShapeInset::blend):
963         * rendering/style/BasicShapes.h:
964         * rendering/svg/SVGRenderingContext.cpp:
965         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
966
967 2014-10-16  Chris Dumez  <cdumez@apple.com>
968
969         Leverage the new RenderElement::m_isCSSAnimating flag in more places
970         https://bugs.webkit.org/show_bug.cgi?id=137786
971
972         Reviewed by Simon Fraser.
973
974         Leverage the new RenderElement::m_isCSSAnimating flag that was introduced
975         in r174703 in more places, for performance. This avoids doing extra work
976         for renderers on which we are not running animations on. This patch also
977         updates the API a bit to use more references instead of pointers, making
978         it clear the RenderElement cannot be null and thus avoiding unnecessary
979         null checks.
980
981         No new tests, no behavior change.
982
983         * css/CSSComputedStyleDeclaration.cpp:
984         (WebCore::computeRenderStyleForProperty):
985         * page/animation/AnimationController.cpp:
986         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
987         (WebCore::AnimationControllerPrivate::clear):
988         (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
989         (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
990         (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
991         (WebCore::AnimationControllerPrivate::pauseAnimationAtTime):
992         (WebCore::AnimationControllerPrivate::pauseTransitionAtTime):
993         (WebCore::AnimationControllerPrivate::getAnimatedStyleForRenderer):
994         (WebCore::AnimationController::cancelAnimations):
995         (WebCore::AnimationController::updateAnimations):
996         (WebCore::AnimationController::getAnimatedStyleForRenderer):
997         (WebCore::AnimationController::notifyAnimationStarted):
998         (WebCore::AnimationController::isRunningAnimationOnRenderer):
999         (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
1000         * page/animation/AnimationController.h:
1001         * page/animation/AnimationControllerPrivate.h:
1002         * rendering/RenderElement.cpp:
1003         (WebCore::RenderElement::willBeDestroyed):
1004         * rendering/RenderLayer.cpp:
1005         (WebCore::RenderLayer::currentTransform):
1006         * rendering/RenderLayerBacking.cpp:
1007         (WebCore::RenderLayerBacking::updateGeometry):
1008         (WebCore::RenderLayerBacking::notifyAnimationStarted):
1009         * rendering/RenderLayerCompositor.cpp:
1010         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
1011         (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation):
1012
1013 2014-10-16  Adrien Destugues  <pulkomandy@gmail.com>
1014
1015         Missing RefPtr.release() calls in TextureMapper
1016         https://bugs.webkit.org/show_bug.cgi?id=137777
1017
1018         Reviewed by Chris Dumez.
1019
1020         No new tests: no functional change, cleanup/optimization.
1021
1022         Avoids useless ref/deref cycle when returning from functions.
1023
1024         * platform/graphics/texmap/TextureMapper.cpp:
1025         (WebCore::TextureMapper::acquireTextureFromPool):
1026         * platform/graphics/texmap/TextureMapperLayer.cpp:
1027         (WebCore::TextureMapperLayer::paintIntoSurface):
1028
1029 2014-10-16  Chris Dumez  <cdumez@apple.com>
1030
1031         Use is<>() / downcast<>() for ContentData subclasses
1032         https://bugs.webkit.org/show_bug.cgi?id=137768
1033
1034         Reviewed by Andreas Kling.
1035
1036         Use is<>() / downcast<>() for ContentData subclasses.
1037
1038         No new tests, no behavior change.
1039
1040         * css/CSSComputedStyleDeclaration.cpp:
1041         (WebCore::contentToCSSValue):
1042         * css/StyleResolver.cpp:
1043         (WebCore::StyleResolver::loadPendingImages):
1044         * rendering/RenderElement.cpp:
1045         (WebCore::RenderElement::createFor):
1046         * rendering/style/ContentData.h:
1047         (WebCore::operator==):
1048         * rendering/style/RenderStyle.cpp:
1049         (WebCore::RenderStyle::setContent):
1050
1051 2014-10-16  Commit Queue  <commit-queue@webkit.org>
1052
1053         Unreviewed, rolling out r174744.
1054         https://bugs.webkit.org/show_bug.cgi?id=137790
1055
1056         Caused another WebGL conformance test to fail (Requested by
1057         rfong on #webkit).
1058
1059         Reverted changeset:
1060
1061         "glReadPixels on NVIDIA cards returns the wrong values for the
1062         alpha channel when alpha is off."
1063         https://bugs.webkit.org/show_bug.cgi?id=137752
1064         http://trac.webkit.org/changeset/174744
1065
1066 2014-10-16  Tim Horton  <timothy_horton@apple.com>
1067
1068         Implement selection services menu for Legacy WebKit
1069         https://bugs.webkit.org/show_bug.cgi?id=137582
1070         <rdar://problem/18604241>
1071
1072         Reviewed by Brady Eidson.
1073
1074         * WebCore.exp.in:
1075         * editing/Editor.h:
1076         * editing/ios/EditorIOS.mm:
1077         (WebCore::Editor::replaceSelectionWithAttributedString):
1078         * editing/mac/EditorMac.mm:
1079         (WebCore::Editor::replaceSelectionWithAttributedString):
1080         Add replaceSelectionWithAttributedString, which replaces the selection
1081         with the given attributed string (converting to plain text if the destination
1082         is not richly editable).
1083
1084 2014-10-16  Alexey Proskuryakov  <ap@apple.com>
1085
1086         Crashes in ResourceHandleCFURLConnectionDelegateWithOperationQueue due to unimplemented retain/release
1087         https://bugs.webkit.org/show_bug.cgi?id=137779
1088         rdar://problem/18679320
1089
1090         Reviewed by Brady Eidson.
1091
1092         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
1093         (WebCore::ResourceHandleCFURLConnectionDelegate::retain):
1094         (WebCore::ResourceHandleCFURLConnectionDelegate::release):
1095         (WebCore::ResourceHandleCFURLConnectionDelegate::makeConnectionClient):
1096         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
1097         Implemented retain/release. They are necessary, as ResourceHandle goes away when
1098         it's canceled, and there is noone else to keep the client object alive but
1099         CFURLConnection itself.
1100
1101         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
1102         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest):
1103         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse):
1104         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData):
1105         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading):
1106         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail):
1107         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse):
1108         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge):
1109         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData):
1110         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace):
1111         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveDataArray):
1112         Added a FIXME about potential improvements that I spotted while invsestigating this.
1113
1114 2014-10-15  Andrei Bucur  <abucur@adobe.com>
1115
1116         ASSERTION  FAILED in WebCore::RenderFlowThread::getRegionRangeForBox
1117         https://bugs.webkit.org/show_bug.cgi?id=135563
1118
1119         Reviewed by David Hyatt.
1120
1121         The new multi-column code doesn't work correctly when the document contains nested fragmentation
1122         contexts. The problem is the current flow thread concept that can store only one RenderFlowThread
1123         at a time and use it during layout.
1124
1125         The stored flow thread is always correct for regions because named flow threads are absolutley positioned
1126         so every child renderer is contained inside them (with the expcetion of fixed positioned elements which are
1127         treated separately).
1128
1129         For multi-column elements this is no longer the case. An absolutely positioned element inside a static
1130         multi-column element will be contained by a block outside the fragmentation context. It can even be
1131         contained by a different multi-column element in the case of nested flow threads.
1132
1133         The patch below explores a solution that's not based on a current flow thread stored globally. The proposed
1134         patch makes every block to store a pointer to its fragmentation context and a flag that states if this pointer
1135         needs to be updated or not. If the renderer is not a block it will get its flow thread from the containing
1136         block. Once the containing flow thread is requested for the block, the pointer is computed and cached until
1137         invalidated:
1138         - when a subtree is removed from a flow thread
1139         - when the position property of an element inside a flow thread changes
1140
1141         The process is recursive and it doesn't affect elements that are not nested inside a flow thread. If a block
1142         changes position from relative to static, any element that was contained by it can only be contained by an
1143         ancestor of the block. This ancestor will still be outside of any flow thread. This ensures that non-fragmentation
1144         code is not affected from a performance perspective.
1145
1146         The patch affects the results of the performance tests:
1147         - the regions layout tests have a decreased performance raging from 2% to 5-6%
1148         - the regions selection tests have an increased performance raging from 1-2% to 10%
1149         - the multicolumn layout tests (now pending review in b137687) have an increased performance
1150         raging from 1.8% to 5%
1151
1152         Tests: fast/multicol/multicol-all-positioned-crash.html
1153                fast/multicol/multicol-transform-containing-block.html
1154
1155         * rendering/FlowThreadController.cpp:
1156         (WebCore::FlowThreadController::FlowThreadController):
1157         * rendering/FlowThreadController.h:
1158         (WebCore::FlowThreadController::currentRenderFlowThread): Deleted.
1159         (WebCore::FlowThreadController::setCurrentRenderFlowThread): Deleted.
1160         * rendering/LayoutState.h:
1161         (WebCore::LayoutState::currentRenderFlowThread):
1162         (WebCore::LayoutState::setCurrentRenderFlowThread):
1163         * rendering/RenderBlock.cpp:
1164         (WebCore::RenderBlockRareData::RenderBlockRareData):
1165         (WebCore::RenderBlock::styleWillChange):
1166         (WebCore::RenderBlock::styleDidChange):
1167         (WebCore::RenderBlock::collapseAnonymousBoxChild):
1168         (WebCore::RenderBlock::cachedFlowThreadContainingBlock):
1169         (WebCore::RenderBlock::cachedFlowThreadContainingBlockNeedsUpdate):
1170         (WebCore::RenderBlock::setCachedFlowThreadContainingBlockNeedsUpdate):
1171         (WebCore::RenderBlock::updateCachedFlowThreadContainingBlock):
1172         (WebCore::RenderBlock::locateFlowThreadContainingBlock):
1173         * rendering/RenderBlock.h:
1174         * rendering/RenderBlockFlow.cpp:
1175         (WebCore::RenderBlockFlow::styleWillChange):
1176         * rendering/RenderBox.cpp:
1177         (WebCore::RenderBox::borderBoxRectInRegion):
1178         * rendering/RenderFlowThread.cpp:
1179         (WebCore::RenderFlowThread::layout):
1180         (WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
1181         (WebCore::RenderFlowThread::repaintRectangleInRegions):
1182         (WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer): Deleted.
1183         (WebCore::CurrentRenderFlowThreadMaintainer::~CurrentRenderFlowThreadMaintainer): Deleted.
1184         (WebCore::CurrentRenderFlowThreadDisabler::CurrentRenderFlowThreadDisabler): Deleted.
1185         (WebCore::CurrentRenderFlowThreadDisabler::~CurrentRenderFlowThreadDisabler): Deleted.
1186         * rendering/RenderFlowThread.h:
1187         * rendering/RenderLayer.cpp:
1188         (WebCore::RenderLayer::paintLayer):
1189         (WebCore::RenderLayer::hitTestLayer):
1190         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
1191         (WebCore::RenderLayer::calculateClipRects):
1192         * rendering/RenderObject.cpp:
1193         (WebCore::RenderObject::showRegionsInformation):
1194         (WebCore::RenderObject::insertedIntoTree):
1195         (WebCore::RenderObject::removeFromRenderFlowThread):
1196         (WebCore::RenderObject::removeFromRenderFlowThreadIncludingDescendants):
1197         (WebCore::RenderObject::invalidateFlowThreadContainingBlockIncludingDescendants):
1198         (WebCore::RenderObject::currentRenderNamedFlowFragment):
1199         (WebCore::RenderObject::locateFlowThreadContainingBlock):
1200         (WebCore::RenderObject::locateFlowThreadContainingBlockNoCache): Deleted.
1201         (WebCore::RenderObject::removeFromRenderFlowThreadRecursive): Deleted.
1202         * rendering/RenderObject.h:
1203         (WebCore::RenderObject::flowThreadContainingBlock):
1204         * rendering/RenderRegion.cpp:
1205         (WebCore::RenderRegion::computeOverflowFromFlowThread):
1206         * rendering/RenderView.cpp:
1207         (WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
1208         (WebCore::RenderView::popLayoutStateForCurrentFlowThread):
1209         * rendering/RenderView.h:
1210
1211 2014-10-15  Chris Dumez  <cdumez@apple.com>
1212
1213         Use is<>() / downcast<>() for list-related render objects
1214         https://bugs.webkit.org/show_bug.cgi?id=137764
1215
1216         Reviewed by Benjamin Poulain.
1217
1218         Use is<>() / downcast<>() for list-related render objects and clean up
1219         the surrounding code.
1220
1221         No new tests, no behavior change.
1222
1223         * accessibility/AccessibilityListBox.cpp:
1224         (WebCore::AccessibilityListBox::visibleChildren):
1225         (WebCore::AccessibilityListBox::elementAccessibilityHitTest):
1226         * accessibility/AccessibilityListBoxOption.cpp:
1227         (WebCore::AccessibilityListBoxOption::elementRect):
1228         * accessibility/AccessibilityObject.cpp:
1229         (WebCore::renderListItemContainerForNode):
1230         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
1231         (getRangeLengthForObject):
1232         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1233         (accessibilityObjectLength):
1234         (offsetAdjustmentForListItem):
1235         (webkitAccessibleTextGetText):
1236         * editing/BreakBlockquoteCommand.cpp:
1237         (WebCore::BreakBlockquoteCommand::doApply):
1238         * html/HTMLLIElement.cpp:
1239         (WebCore::HTMLLIElement::didAttachRenderers):
1240         (WebCore::HTMLLIElement::parseValue):
1241         * html/HTMLSelectElement.cpp:
1242         (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway):
1243         (WebCore::HTMLSelectElement::scrollToSelection):
1244         (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer):
1245         (WebCore::HTMLSelectElement::selectOption):
1246         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
1247         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
1248         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1249         * html/HTMLSelectElementWin.cpp:
1250         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
1251         * page/mac/EventHandlerMac.mm:
1252         (WebCore::EventHandler::platformPrepareForWheelEvents):
1253         * rendering/InlineFlowBox.cpp:
1254         (WebCore::InlineFlowBox::addToLine):
1255         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
1256         * rendering/RenderCounter.cpp:
1257         (WebCore::planCounter):
1258         * rendering/RenderListBox.h:
1259         * rendering/RenderListItem.cpp:
1260         (WebCore::nextListItem):
1261         (WebCore::previousListItem):
1262         * rendering/RenderListItem.h:
1263         * rendering/RenderListMarker.h:
1264         * rendering/RenderMenuList.h:
1265         * rendering/RenderTreeAsText.cpp:
1266         (WebCore::markerTextForListItem):
1267         * rendering/TextAutoSizing.cpp:
1268         (WebCore::TextAutoSizingValue::adjustNodeSizes):
1269         * rendering/line/BreakingContextInlineHeaders.h:
1270         (WebCore::BreakingContext::handleReplaced):
1271         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
1272         * testing/Internals.cpp:
1273         (WebCore::Internals::isSelectPopupVisible):
1274
1275 2014-10-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1276
1277         Use std::unique_ptr for CachedResource
1278         https://bugs.webkit.org/show_bug.cgi?id=137736
1279
1280         Reviewed by Darin Adler.
1281
1282         No new tests, no behavior change.
1283
1284         * loader/cache/CachedResource.cpp: Use std::unique_ptr instead of PassOwnPtr|OwnPtr.
1285         (WebCore::CachedResource::removeClient):
1286         * loader/cache/CachedResource.h: Set ctor from private to public.
1287         (WebCore::CachedResource::CachedResourceCallback::schedule):
1288
1289 2014-10-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1290
1291         Move TextCodec classes to std::unique_ptr
1292         https://bugs.webkit.org/show_bug.cgi?id=137738
1293
1294         Reviewed by Darin Adler.
1295
1296         Replace uses of PassOwnPtr in code under TextCodecFoo class with std::unique_ptr.
1297         To do this, ctor of TextCodecFoo classes is changed from private to public. Besides
1298         related classes follow this change as well.
1299
1300         No new tests, no behavior change.
1301
1302         * html/parser/HTMLMetaCharsetParser.h:
1303         * loader/TextResourceDecoder.cpp:
1304         (WebCore::TextResourceDecoder::setEncoding):
1305         (WebCore::TextResourceDecoder::flush):
1306         * loader/TextResourceDecoder.h:
1307         * platform/text/TextCodec.h:
1308         * platform/text/TextCodecICU.cpp:
1309         (WebCore::TextCodecICU::create):
1310         * platform/text/TextCodecICU.h:
1311         * platform/text/TextCodecLatin1.cpp:
1312         (WebCore::newStreamingTextDecoderWindowsLatin1):
1313         * platform/text/TextCodecUTF16.cpp:
1314         (WebCore::newStreamingTextDecoderUTF16LE):
1315         (WebCore::newStreamingTextDecoderUTF16BE):
1316         * platform/text/TextCodecUTF8.cpp:
1317         (WebCore::TextCodecUTF8::create):
1318         * platform/text/TextCodecUTF8.h:
1319         * platform/text/TextCodecUserDefined.cpp:
1320         (WebCore::newStreamingTextDecoderUserDefined):
1321         * platform/text/TextEncodingRegistry.cpp:
1322         (WebCore::newTextCodec):
1323         * platform/text/TextEncodingRegistry.h:
1324         * platform/text/mac/TextCodecMac.cpp:
1325         (WebCore::newTextCodecMac):
1326
1327 2014-10-15  Dean Jackson  <dino@apple.com>
1328
1329         [Media] Reduce style updates (painting) in controls
1330         https://bugs.webkit.org/show_bug.cgi?id=137763
1331         <rdar://problem/17833045>
1332
1333         Reviewed by Simon Fraser.
1334
1335         Media controls were causing a lot of repaints they were
1336         constantly updating the style of the widgets, the value
1337         of the forms, or the text in the display.
1338
1339         This is necessary when the controls are visible, but not
1340         necessary when they are hidden. Return immediately in that case.
1341
1342         * Modules/mediacontrols/mediaControlsApple.js:
1343         (Controller.prototype.createControls): Initialise the slider to a zero value.
1344         (Controller.prototype.handleDurationChange): Force an update even though we might be hidden.
1345         (Controller.prototype.updateProgress): Don't update if we're hidden.
1346         (Controller.prototype.updateTime): Ditto.
1347         * Modules/mediacontrols/mediaControlsiOS.js:
1348         (ControllerIOS.prototype.updateProgress): Ditto.
1349
1350 2014-10-15  Chris Dumez  <cdumez@apple.com>
1351
1352         [Mac] Fix inefficiencies in ResourceResponse::platformLazyInit(InitLevel) - Part 2
1353         https://bugs.webkit.org/show_bug.cgi?id=137721
1354
1355         Reviewed by Darin Adler.
1356
1357         Follow-up patch to r174717 addressing review comments made after the patch landed:
1358         - Use modern C++ loop
1359         - Remove explicit calls to String(NSString*) constructor
1360
1361         No new tests, no new tests.
1362
1363         * platform/network/mac/ResourceResponseMac.mm:
1364         (WebCore::ResourceResponse::platformLazyInit):
1365
1366 2014-10-15  Chris Dumez  <cdumez@apple.com>
1367
1368         Use is<>() / downcast<>() for InlineBox subclasses
1369         https://bugs.webkit.org/show_bug.cgi?id=137749
1370
1371         Reviewed by Darin Adler.
1372
1373         Use is<>() / downcast<>() for InlineBox subclasses and clean up the
1374         surrounding code.
1375
1376         No new tests, no behavior change.
1377
1378         * dom/Position.cpp:
1379         (WebCore::Position::upstream):
1380         (WebCore::Position::downstream):
1381         * editing/VisibleUnits.cpp:
1382         (WebCore::wordBreakIteratorForMinOffsetBoundary):
1383         (WebCore::wordBreakIteratorForMaxOffsetBoundary):
1384         (WebCore::visualWordPosition):
1385         (WebCore::startPositionForLine):
1386         (WebCore::endPositionForLine):
1387         * rendering/InlineBox.cpp:
1388         (WebCore::InlineBox::root):
1389         (WebCore::InlineBox::nextLeafChild):
1390         (WebCore::InlineBox::prevLeafChild):
1391         (WebCore::InlineBox::nextLeafChildIgnoringLineBreak):
1392         * rendering/InlineBox.h:
1393         * rendering/InlineElementBox.h:
1394         * rendering/InlineFlowBox.cpp:
1395         (WebCore::InlineFlowBox::getFlowSpacingLogicalWidth):
1396         (WebCore::InlineFlowBox::addToLine):
1397         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
1398         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
1399         (WebCore::InlineFlowBox::requiresIdeographicBaseline):
1400         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
1401         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
1402         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
1403         (WebCore::InlineFlowBox::computeMaxLogicalTop):
1404         (WebCore::InlineFlowBox::flipLinesInBlockDirection):
1405         (WebCore::InlineFlowBox::computeOverflow):
1406         (WebCore::InlineFlowBox::firstLeafChild):
1407         (WebCore::InlineFlowBox::lastLeafChild):
1408         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
1409         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
1410         * rendering/InlineFlowBox.h:
1411         * rendering/InlineTextBox.h:
1412         * rendering/RenderBlockFlow.cpp:
1413         (WebCore::RenderBlockFlow::positionForBox):
1414         * rendering/RenderBlockFlow.h:
1415         (WebCore::RenderBlockFlow::firstRootBox):
1416         (WebCore::RenderBlockFlow::lastRootBox):
1417         * rendering/RenderBlockLineLayout.cpp:
1418         (WebCore::RenderBlockFlow::createLineBoxes):
1419         (WebCore::RenderBlockFlow::constructLine):
1420         (WebCore::setLogicalWidthForTextRun):
1421         (WebCore::computeExpansionForJustifiedText):
1422         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
1423         (WebCore::RenderBlockFlow::computeBlockDirectionPositionsForLine):
1424         (WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns):
1425         * rendering/RenderText.cpp:
1426         (WebCore::RenderText::localCaretRect):
1427         * rendering/RootInlineBox.cpp:
1428         (WebCore::RootInlineBox::isHyphenated):
1429         (WebCore::RootInlineBox::ascentAndDescentForBox):
1430         * rendering/RootInlineBox.h:
1431         (WebCore::RootInlineBox::nextRootBox):
1432         (WebCore::RootInlineBox::prevRootBox):
1433         * rendering/svg/RenderSVGInlineText.cpp:
1434         (WebCore::RenderSVGInlineText::localCaretRect):
1435         (WebCore::RenderSVGInlineText::positionForPoint):
1436         * rendering/svg/RenderSVGText.cpp:
1437         (WebCore::RenderSVGText::positionForPoint):
1438         * rendering/svg/SVGInlineFlowBox.cpp:
1439         (WebCore::SVGInlineFlowBox::paintSelectionBackground):
1440         (WebCore::SVGInlineFlowBox::paint):
1441         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
1442         * rendering/svg/SVGInlineFlowBox.h:
1443         * rendering/svg/SVGInlineTextBox.h:
1444         * rendering/svg/SVGRenderTreeAsText.cpp:
1445         (WebCore::writeRenderSVGTextBox):
1446         (WebCore::writeSVGInlineTextBoxes):
1447         * rendering/svg/SVGRootInlineBox.cpp:
1448         (WebCore::SVGRootInlineBox::paint):
1449         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
1450         (WebCore::SVGRootInlineBox::layoutChildBoxes):
1451         (WebCore::reverseInlineBoxRangeAndValueListsIfNeeded):
1452         * rendering/svg/SVGRootInlineBox.h:
1453         * rendering/svg/SVGTextQuery.cpp:
1454         (WebCore::SVGTextQuery::collectTextBoxesInFlowBox):
1455
1456 2014-10-15  Roger Fong  <roger_fong@apple.com>
1457
1458         glReadPixels on NVIDIA cards returns the wrong values for the alpha channel when alpha is off.
1459         https://bugs.webkit.org/show_bug.cgi?id=137752.
1460         <rdar://problem/15408133>
1461
1462         Reviewed by Brent Fulgham.
1463
1464         This change fixed the 1.0.2 conformance test: context/context-attribute-preserve-drawing-buffer.html
1465
1466         * platform/graphics/GraphicsContext3D.h:
1467         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1468         Manually set the alpha channel to 255 when alpha is off on the rendering context.
1469
1470 2014-10-13  Chris Fleizach  <cfleizach@apple.com>
1471
1472         AX: Going back is broken for VoiceOver
1473         https://bugs.webkit.org/show_bug.cgi?id=137382
1474
1475         Reviewed by Darin Adler.
1476
1477         There were two issues preventing VoiceOver from navigating when using page history to go back/forward.
1478           1) Existing AXLoadComplete does not get fired when you just move through page history. 
1479                There were existing frameLoad notifications used by GTK. I think we should use those which seem more reliable.
1480           2) The AccessibilityScrollView cached its children, but on some history page loads, that cache was never cleared out.
1481                Rather than trying to find those places to clear out the cache, it's easier to just add the elements to the children
1482                array everytime it's asked for. Since there's only ever 3 elements (web area + 2 scroll bars) this should not be a performance hit.
1483
1484         Tests are not possible since they require monitoring notifications across multiple page loads.
1485
1486         * accessibility/AXObjectCache.h:
1487         * accessibility/AccessibilityScrollView.cpp:
1488         (WebCore::AccessibilityScrollView::updateChildrenIfNecessary):
1489         * accessibility/ios/AXObjectCacheIOS.mm:
1490         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
1491         * accessibility/mac/AXObjectCacheMac.mm:
1492         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
1493         * dom/Document.cpp:
1494         (WebCore::Document::implicitClose):
1495
1496 2014-10-15  Simon Fraser  <simon.fraser@apple.com>
1497
1498         Sometimes can't scroll overflow:scroll areas in subframes
1499         https://bugs.webkit.org/show_bug.cgi?id=137746
1500         rdar://problem/18603560
1501
1502         Reviewed by Tim Horton.
1503         
1504         r169733 introduced a regression which caused us to no longer update the non-fast
1505         scrollable region on every layout in subframes, by adding a bogus isMainFrame() check.
1506         Revert to the previous code.
1507
1508         Test: platform/mac-wk2/tiled-drawing/scrolling/frames/scroll-region-after-frame-layout.html
1509
1510         * page/scrolling/AsyncScrollingCoordinator.cpp:
1511         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
1512
1513 2014-10-15  Chris Dumez  <cdumez@apple.com>
1514
1515         Use is<>() / downcast<>() for TransformOperation subclasses
1516         https://bugs.webkit.org/show_bug.cgi?id=137731
1517
1518         Reviewed by Darin Adler.
1519
1520         Use is<>() / downcast<>() for TransformOperation subclasses and clean
1521         up the surrounding code.
1522
1523         No new tests, no behavior change.
1524
1525         * platform/graphics/GraphicsLayer.cpp:
1526         (WebCore::GraphicsLayer::validateTransformOperations):
1527         * platform/graphics/ca/GraphicsLayerCA.cpp:
1528         (WebCore::getTransformFunctionValue):
1529         * platform/graphics/transforms/IdentityTransformOperation.h:
1530         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
1531         (WebCore::Matrix3DTransformOperation::operator==):
1532         * platform/graphics/transforms/Matrix3DTransformOperation.h:
1533         * platform/graphics/transforms/MatrixTransformOperation.cpp:
1534         (WebCore::MatrixTransformOperation::operator==):
1535         (WebCore::MatrixTransformOperation::blend):
1536         * platform/graphics/transforms/MatrixTransformOperation.h:
1537         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
1538         (WebCore::PerspectiveTransformOperation::operator==):
1539         (WebCore::PerspectiveTransformOperation::blend):
1540         * platform/graphics/transforms/PerspectiveTransformOperation.h:
1541         * platform/graphics/transforms/RotateTransformOperation.cpp:
1542         (WebCore::RotateTransformOperation::operator==):
1543         (WebCore::RotateTransformOperation::blend):
1544         * platform/graphics/transforms/RotateTransformOperation.h:
1545         * platform/graphics/transforms/ScaleTransformOperation.cpp:
1546         (WebCore::ScaleTransformOperation::operator==):
1547         (WebCore::ScaleTransformOperation::blend):
1548         * platform/graphics/transforms/ScaleTransformOperation.h:
1549         * platform/graphics/transforms/SkewTransformOperation.cpp:
1550         (WebCore::SkewTransformOperation::operator==):
1551         (WebCore::SkewTransformOperation::blend):
1552         * platform/graphics/transforms/SkewTransformOperation.h:
1553         * platform/graphics/transforms/TransformOperation.h:
1554         * platform/graphics/transforms/TranslateTransformOperation.cpp:
1555         (WebCore::TranslateTransformOperation::operator==):
1556         (WebCore::TranslateTransformOperation::blend):
1557         * platform/graphics/transforms/TranslateTransformOperation.h:
1558
1559 2014-10-15  Chris Dumez  <cdumez@apple.com>
1560
1561         Use is<>() / downcast<>() for RenderTextControl / RenderTextControlSingleLine
1562         https://bugs.webkit.org/show_bug.cgi?id=137727
1563
1564         Reviewed by Darin Adler.
1565
1566         Use is<>() / downcast<>() for RenderTextControl / RenderTextControlSingleLine.
1567
1568         No new tests, no behavior change.
1569
1570         * accessibility/AccessibilityRenderObject.cpp:
1571         (WebCore::AccessibilityRenderObject::selectedText):
1572         (WebCore::AccessibilityRenderObject::selectedTextRange):
1573         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
1574         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
1575         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
1576         * editing/TextIterator.cpp:
1577         (WebCore::TextIterator::handleReplacedElement):
1578         * html/TextFieldInputType.cpp:
1579         (WebCore::TextFieldInputType::forwardEvent):
1580         * html/shadow/TextControlInnerElements.cpp:
1581         (WebCore::TextControlInnerElement::customStyleForRenderer):
1582         * page/EventHandler.cpp:
1583         (WebCore::EventHandler::capsLockStateMayHaveChanged):
1584         * page/ios/FrameIOS.mm:
1585         (WebCore::ancestorRespondingToScrollWheelEvents):
1586         * rendering/RenderTextControl.h:
1587         * rendering/RenderTextControlSingleLine.h:
1588         * rendering/SimpleLineLayout.cpp:
1589         (WebCore::SimpleLineLayout::canUseFor):
1590
1591 2014-10-15  Chris Dumez  <cdumez@apple.com>
1592
1593         Use is<>() / downcast<>() for ClipPathOperation subclasses
1594         https://bugs.webkit.org/show_bug.cgi?id=137733
1595
1596         Reviewed by Mihnea Ovidenie.
1597
1598         Use is<>() / downcast<>() for ClipPathOperation subclasses.
1599
1600         No new tests, no behavior change.
1601
1602         * css/CSSComputedStyleDeclaration.cpp:
1603         (WebCore::ComputedStyleExtractor::propertyValue):
1604         * css/DeprecatedStyleBuilder.cpp:
1605         (WebCore::ApplyPropertyClipPath::applyValue):
1606         * rendering/ClipPathOperation.h:
1607         * rendering/RenderBlock.cpp:
1608         (WebCore::RenderBlock::nodeAtPoint):
1609         * rendering/RenderLayer.cpp:
1610         (WebCore::RenderLayer::setupClipPath):
1611         * rendering/svg/SVGRenderingContext.cpp:
1612         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
1613
1614 2014-10-15  Chris Dumez  <cdumez@apple.com>
1615
1616         [Mac] Use CFDictionaryContainsKey() in ImageSource::isSizeAvailable()
1617         https://bugs.webkit.org/show_bug.cgi?id=137723
1618
1619         Reviewed by Simon Fraser.
1620
1621         Use CFDictionaryContainsKey() in ImageSource::isSizeAvailable() instead
1622         of CFDictionaryGetValue() as we are not actually interested in the
1623         value.
1624
1625         No new tests, no behavior change.
1626
1627         * platform/graphics/cg/ImageSourceCG.cpp:
1628         (WebCore::ImageSource::isSizeAvailable):
1629
1630 2014-10-15  Mihnea Ovidenie  <mihnea@adobe.com>
1631
1632         Use modern loops in subtrees selection code
1633         https://bugs.webkit.org/show_bug.cgi?id=137688
1634
1635         Reviewed by Andreas Kling.
1636
1637         No new tests as no change in functionality.
1638
1639         * rendering/RenderView.cpp:
1640         (WebCore::RenderView::splitSelectionBetweenSubtrees):
1641         (WebCore::RenderView::updateSelectionForSubtrees):
1642         (WebCore::RenderView::clearSubtreeSelection):
1643         (WebCore::RenderView::applySubtreeSelection):
1644         * rendering/RenderView.h:
1645
1646 2014-10-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1647
1648         Clean up unnecessary PassOwnPtr.h inclusion
1649         https://bugs.webkit.org/show_bug.cgi?id=137726
1650
1651         Reviewed by Chris Dumez.
1652
1653         No new tests, no behavior changes.
1654
1655         * dom/Document.h: Remove PassOwnPtr.h inclusion.
1656         * loader/ResourceBuffer.h: ditto.
1657         * loader/cocoa/DiskCacheMonitorCocoa.mm: ditto.
1658         * page/scrolling/AxisScrollSnapOffsets.h: ditto.
1659         * page/scrolling/ScrollingStateScrollingNode.h: ditto.
1660         * platform/ColorChooserClient.h: ditto.
1661         * platform/ScrollableArea.cpp: ditto.
1662         * platform/ScrollbarThemeClient.h: ditto.
1663         * platform/SharedBuffer.cpp: ditto.
1664         * platform/Supplementable.h: ditto.
1665         * platform/graphics/surfaces/GraphicsSurface.h: ditto.
1666         * platform/graphics/surfaces/GraphicsSurfaceToken.h: ditto.
1667         * platform/graphics/win/WKCAImageQueue.cpp: ditto.
1668         * platform/win/CursorWin.cpp: ditto.
1669
1670 2014-10-14  Chris Dumez  <cdumez@apple.com>
1671
1672         Have offsetFromContainer() / offsetFromAncestorContainer() take a RenderElement&
1673         https://bugs.webkit.org/show_bug.cgi?id=137728
1674
1675         Reviewed by Benjamin Poulain.
1676
1677         Have offsetFromContainer() / offsetFromAncestorContainer() take a RenderElement&
1678         instead of a RenderObject*. The argument passed is never null and the type
1679         should be a RenderElement as the argument is a container.
1680
1681         No new tests, no behavior change.
1682
1683         * editing/htmlediting.cpp:
1684         (WebCore::localCaretRectInRendererForCaretPainting):
1685         * page/GestureTapHighlighter.cpp:
1686         * rendering/RenderBox.cpp:
1687         (WebCore::RenderBox::mapLocalToContainer):
1688         (WebCore::RenderBox::pushMappingToContainer):
1689         (WebCore::RenderBox::offsetFromContainer):
1690         (WebCore::RenderBox::computeRectForRepaint):
1691         * rendering/RenderBox.h:
1692         * rendering/RenderBoxModelObject.cpp:
1693         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
1694         * rendering/RenderInline.cpp:
1695         (WebCore::RenderInline::computeRectForRepaint):
1696         (WebCore::RenderInline::offsetFromContainer):
1697         (WebCore::RenderInline::mapLocalToContainer):
1698         (WebCore::RenderInline::pushMappingToContainer):
1699         * rendering/RenderInline.h:
1700         * rendering/RenderMultiColumnFlowThread.cpp:
1701         (WebCore::RenderMultiColumnFlowThread::offsetFromContainer):
1702         * rendering/RenderMultiColumnFlowThread.h:
1703         * rendering/RenderNamedFlowFragment.cpp:
1704         (WebCore::RenderNamedFlowFragment::offsetFromContainer):
1705         * rendering/RenderNamedFlowFragment.h:
1706         * rendering/RenderObject.cpp:
1707         (WebCore::RenderObject::offsetFromContainer):
1708         (WebCore::RenderObject::offsetFromAncestorContainer):
1709         * rendering/RenderObject.h:
1710         * rendering/RenderTableCell.cpp:
1711         (WebCore::RenderTableCell::offsetFromContainer):
1712         * rendering/RenderTableCell.h:
1713         * rendering/RenderThemeMac.mm:
1714         (WebCore::RenderThemeMac::convertToPaintingRect):
1715
1716 2014-10-14  Jer Noble  <jer.noble@apple.com>
1717
1718         REGRESSION (r159208): Crash when clicking scrubber after navigating away/back to video
1719         https://bugs.webkit.org/show_bug.cgi?id=137715
1720
1721         Reviewed by Darin Adler.
1722
1723         Simple null-check of m_player in refreshCachedTime.
1724
1725         * html/HTMLMediaElement.cpp:
1726         (WebCore::HTMLMediaElement::refreshCachedTime):
1727
1728 2014-10-14  Chris Dumez  <cdumez@apple.com>
1729
1730         [Mac] Fix inefficiencies in ResourceResponse::platformLazyInit(InitLevel)
1731         https://bugs.webkit.org/show_bug.cgi?id=137721
1732
1733         Reviewed by Geoffrey Garen.
1734
1735         There were several inefficiencies with the Mac implementation of
1736         ResourceResponse::platformLazyInit(InitLevel):
1737         1. We end up initializing uncommon fields even if called with
1738            'CommonFieldsOnly' initLevel.
1739         2. If called with 'AllFields' initLevel (and if currently
1740            uninitialized), we end up populating m_httpHeaderFields twice, once
1741            with only the common headers, then a second time with ALL the
1742            headers. We can skip the common-header case in this case to avoid
1743            wasting CPU time.
1744
1745         This patch addresses both inefficiencies and cleans up the code a
1746         little bit to reduce variable scope and to use fast enumeration of
1747         header names.
1748
1749         As a result, we spend almost twice as little time in platformLazyInit()
1750         when loading msn.com (~30ms -> ~18ms).
1751
1752         No new tests, no behavior change.
1753
1754         * platform/network/mac/ResourceResponseMac.mm:
1755         (WebCore::ResourceResponse::platformLazyInit):
1756
1757 2014-10-14  Zalan Bujtas  <zalan@apple.com>
1758
1759         REGRESSION (Safari 7.1/8.0): Border-radius and overflow hidden renders incorrectly.
1760         https://bugs.webkit.org/show_bug.cgi?id=137205
1761
1762         Reviewed by Simon Fraser.
1763
1764         Child layer should not reset radius clipping behaviour.
1765
1766         Test: fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping.html
1767
1768         * rendering/RenderLayer.cpp:
1769         (WebCore::RenderLayer::calculateClipRects):
1770
1771 2014-10-14  Chris Dumez  <cdumez@apple.com>
1772
1773         Use is<>() / downcast<>() for PlatformCAAnimation subclasses
1774         https://bugs.webkit.org/show_bug.cgi?id=137722
1775
1776         Reviewed by Simon Fraser.
1777
1778         Use is<>() / downcast<>() for PlatformCAAnimation subclasses and clean
1779         up the surrounding code.
1780
1781         No new tests, no behavior change.
1782
1783         * page/mac/ServicesOverlayController.mm:
1784         (WebCore::ServicesOverlayController::Highlight::fadeIn):
1785         (WebCore::ServicesOverlayController::Highlight::fadeOut):
1786         * platform/graphics/ca/GraphicsLayerCA.cpp:
1787         (WebCore::GraphicsLayerCA::moveOrCopyLayerAnimation):
1788         (WebCore::GraphicsLayerCA::updateAnimations):
1789         (WebCore::GraphicsLayerCA::setAnimationOnLayer):
1790         (WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer):
1791         * platform/graphics/ca/GraphicsLayerCA.h:
1792         * platform/graphics/ca/PlatformCAAnimation.h:
1793         * platform/graphics/ca/PlatformCALayer.h:
1794         * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
1795         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
1796         (PlatformCAAnimationMac::copy):
1797         (PlatformCAAnimationMac::copyTimingFunctionFrom):
1798         (PlatformCAAnimationMac::copyFromValueFrom):
1799         (PlatformCAAnimationMac::copyToValueFrom):
1800         (PlatformCAAnimationMac::copyValuesFrom):
1801         (PlatformCAAnimationMac::copyKeyTimesFrom):
1802         (PlatformCAAnimationMac::copyTimingFunctionsFrom):
1803         * platform/graphics/ca/mac/PlatformCALayerMac.h:
1804         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1805         (PlatformCALayerMac::addAnimationForKey):
1806         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
1807         (PlatformCAAnimationWin::copy):
1808         (PlatformCAAnimationWin::copyTimingFunctionFrom):
1809         (PlatformCAAnimationWin::copyFromValueFrom):
1810         (PlatformCAAnimationWin::copyToValueFrom):
1811         (PlatformCAAnimationWin::copyValuesFrom):
1812         (PlatformCAAnimationWin::copyKeyTimesFrom):
1813         (PlatformCAAnimationWin::copyTimingFunctionsFrom):
1814         * platform/graphics/ca/win/PlatformCAAnimationWin.h:
1815         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1816         (PlatformCALayerWin::addAnimationForKey):
1817         * platform/graphics/ca/win/PlatformCALayerWin.h:
1818
1819 2014-10-14  Chris Dumez  <cdumez@apple.com>
1820
1821         Use is<>() / downcast<>() for RenderInline
1822         https://bugs.webkit.org/show_bug.cgi?id=137704
1823
1824         Reviewed by Darin Adler.
1825
1826         Use is<>() / downcast<>() for RenderInline and clean up the surrounding
1827         code.
1828
1829         No new tests, no behavior change.
1830
1831         * accessibility/AccessibilityRenderObject.cpp:
1832         (WebCore::firstChildInContinuation):
1833         * editing/SimplifyMarkupCommand.cpp:
1834         (WebCore::SimplifyMarkupCommand::doApply):
1835         * inspector/InspectorOverlay.cpp:
1836         (WebCore::buildRendererHighlight):
1837         * page/FrameView.cpp:
1838         (WebCore::FrameView::paintContents):
1839         * rendering/InlineFlowBox.cpp:
1840         (WebCore::InlineFlowBox::removeLineBoxFromRenderObject):
1841         (WebCore::InlineFlowBox::extractLineBoxFromRenderObject):
1842         (WebCore::InlineFlowBox::attachLineBoxToRenderObject):
1843         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
1844         (WebCore::InlineFlowBox::nodeAtPoint):
1845         (WebCore::InlineFlowBox::paint):
1846         * rendering/InlineIterator.h:
1847         (WebCore::bidiFirstSkippingEmptyInlines):
1848         * rendering/LayoutState.cpp:
1849         (WebCore::LayoutState::LayoutState):
1850         * rendering/RenderBlock.cpp:
1851         (WebCore::RenderBlock::willBeDestroyed):
1852         (WebCore::RenderBlock::paintObject):
1853         (WebCore::RenderBlock::inlineElementContinuation):
1854         (WebCore::RenderBlock::addFocusRingRects):
1855         * rendering/RenderBlockFlow.cpp:
1856         (WebCore::RenderBlockFlow::willBeDestroyed):
1857         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
1858         * rendering/RenderBlockFlow.h:
1859         * rendering/RenderBlockLineLayout.cpp:
1860         (WebCore::constructBidiRunsForSegment):
1861         (WebCore::RenderBlockFlow::layoutLineBoxes):
1862         * rendering/RenderBox.cpp:
1863         (WebCore::RenderBox::offsetFromContainer):
1864         (WebCore::RenderBox::computeRectForRepaint):
1865         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
1866         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
1867         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
1868         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
1869         (WebCore::RenderBox::layoutOverflowRectForPropagation):
1870         * rendering/RenderBoxModelObject.cpp:
1871         (WebCore::accumulateInFlowPositionOffsets):
1872         * rendering/RenderElement.cpp:
1873         (WebCore::RenderElement::willBeRemovedFromTree):
1874         * rendering/RenderElement.h:
1875         (WebCore::RenderElement::dirtyLinesFromChangedChild):
1876         * rendering/RenderFlowThread.cpp:
1877         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
1878         * rendering/RenderInline.cpp:
1879         (WebCore::RenderInline::willBeDestroyed):
1880         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
1881         (WebCore::RenderInline::clippedOverflowRectForRepaint):
1882         * rendering/RenderInline.h:
1883         * rendering/RenderLayer.cpp:
1884         (WebCore::RenderLayer::updateLayerPosition):
1885         (WebCore::RenderLayer::calculateClipRects):
1886         * rendering/RenderLineBoxList.cpp:
1887         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
1888         * rendering/RenderLineBoxList.h:
1889         * rendering/RenderNamedFlowThread.cpp:
1890         (WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
1891         * rendering/RenderObject.cpp:
1892         (WebCore::RenderObject::insertedIntoTree):
1893         * rendering/RenderRegion.cpp:
1894         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
1895         (WebCore::RenderRegion::visualOverflowRectForBox):
1896         (WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
1897         * rendering/RenderRegion.h:
1898         * rendering/RenderReplaced.cpp:
1899         (WebCore::RenderReplaced::willBeDestroyed):
1900         * rendering/RenderTextLineBoxes.cpp:
1901         (WebCore::RenderTextLineBoxes::removeAllFromParent):
1902         (WebCore::RenderTextLineBoxes::dirtyRange):
1903         * rendering/line/BreakingContextInlineHeaders.h:
1904         (WebCore::inlineLogicalWidth):
1905         (WebCore::BreakingContext::handleEmptyInline):
1906         * rendering/line/LineInlineHeaders.h:
1907         (WebCore::requiresLineBox):
1908         (WebCore::setStaticPositions):
1909         * rendering/svg/SVGInlineTextBox.cpp:
1910         (WebCore::SVGInlineTextBox::paint):
1911
1912 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
1913
1914         [Win] Unreviewed build fix after r174710.
1915
1916         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1917         (WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
1918
1919 2014-10-14  Dan Bernstein  <mitz@apple.com>
1920
1921         URLs that start with http:/// and https:/// lose two slashes when parsed, causing assertion failure and inconsistent behavior
1922         https://bugs.webkit.org/show_bug.cgi?id=137718
1923
1924         Reviewed by Alexey Proskuryakov.
1925
1926         Added cases to fast/loader/url-parse-1.html.
1927
1928         * platform/URL.cpp:
1929         (WebCore::URL::parse): In hierarchical schemes other than file:, ignore any additional
1930         slashes after the ://, as prescribed by the authority-ignore-slashes state in the current
1931         URL spec.
1932
1933 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
1934
1935         [Win] Unreviewed build fix after r174698 and r174709.
1936
1937         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
1938         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
1939         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1940         (WebCore::MediaPlayerPrivateAVFoundationCF::supportsKeySystem):
1941         (WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
1942         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
1943
1944 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
1945
1946         [Win] Unreviewed build fix after r174698
1947
1948         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
1949         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
1950         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1951         (WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
1952
1953 2014-10-14  Myles C. Maxfield  <mmaxfield@apple.com>
1954
1955         Improve debug description of WAKViews
1956         https://bugs.webkit.org/show_bug.cgi?id=137716
1957
1958         Reviewed by Simon Fraser.
1959
1960         No new tests because there is no behavior change.
1961
1962         * platform/ios/wak/WAKView.mm:
1963         (-[WAKView description]):
1964         * platform/ios/wak/WKView.h:
1965         * platform/ios/wak/WKView.mm:
1966         (WKViewGetOrigin):
1967
1968 2014-10-14  Chris Dumez  <cdumez@apple.com>
1969
1970         Introduce an isCSSAnimated flag on RenderElement for performance
1971         https://bugs.webkit.org/show_bug.cgi?id=137583
1972
1973         Reviewed by Simon Fraser.
1974
1975         I noticed when profiling the ebay.com page load that isRunningAnimationOnRenderer()
1976         and isRunningAcceleratedAnimationOnRenderer() were called frequently, causing
1977         ~4.7 millions m_compositeAnimations HashMap lookups.
1978
1979         This patch introduces an isCSSAnimated flag on RenderElement to return early if
1980         there is no animation on the renderer, thus avoiding HashMap lookups. This reduces
1981         the number of HashMap lookups from ~4.7 millions to ~68k. On my machine, I see
1982         the following performance improvements:
1983         - isRunning*AnimationOnRenderer() / computeCompositingRequirements()
1984           - before: ~45ms  / ~90ms
1985           - after:  ~4ms / ~30ms
1986
1987         No new tests, no behavior change.
1988
1989         * page/animation/AnimationController.cpp:
1990         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
1991         (WebCore::AnimationControllerPrivate::clear):
1992         (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
1993         (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
1994         (WebCore::AnimationController::isRunningAnimationOnRenderer):
1995         (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
1996         * rendering/RenderElement.cpp:
1997         (WebCore::RenderElement::RenderElement):
1998         * rendering/RenderElement.h:
1999         (WebCore::RenderElement::isCSSAnimating):
2000         (WebCore::RenderElement::setIsCSSAnimating):
2001
2002 2014-10-14  Dean Jackson  <dino@apple.com>
2003
2004         Crash in WebCore::UserGestureIndicator::processingUserGesture with WebWorkers
2005         https://bugs.webkit.org/show_bug.cgi?id=137676
2006         <rdar://problem/15735049>
2007
2008         Reviewed by Alexey Proskuryakov.
2009
2010         Remove the code I added that tracks the timestamp of the most recent
2011         user gesture from the event handling dispatch, as it was both
2012         a silly place to do it and it originally crashed when events were fired from
2013         Worker threads (although this was fixed in r152238).
2014
2015         It's now recorded by going through UserGestureIndicator, which is good because
2016         it knows when a user has triggered an event. Its constructor now takes
2017         a pointer to Document, and updates the timestamp there if necessary.
2018
2019         Not all UserGestureIndicator instances needed to reset the timestamp; Those did
2020         not have to pass along the Document.
2021
2022         This is untestable due to the fix mentioned above.
2023
2024         * WebCore.exp.in: Change constructor signature.
2025
2026         * accessibility/AccessibilityNodeObject.cpp: Pass a pointer to the Document into the UserGestureIndicator.
2027         (WebCore::AccessibilityNodeObject::increment):
2028         (WebCore::AccessibilityNodeObject::decrement):
2029         * accessibility/AccessibilityObject.cpp: Ditto.
2030         (WebCore::AccessibilityObject::press):
2031
2032         * dom/Document.cpp:
2033         (WebCore::Document::updateLastHandledUserGestureTimestamp): Renamed.
2034         * dom/Document.h:
2035
2036         * dom/EventTarget.cpp: Remove the code to update the timestamp.
2037         (WebCore::EventTarget::fireEventListeners):
2038
2039         * dom/UserGestureIndicator.cpp:
2040         (WebCore::UserGestureIndicator::UserGestureIndicator): If there is a Document and
2041         this is a user gesture, then reset the timestamp.
2042         * dom/UserGestureIndicator.h:
2043
2044         * page/EventHandler.cpp: Pass a pointer to the Document.
2045         (WebCore::EventHandler::handleMousePressEvent):
2046         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2047         (WebCore::EventHandler::handleMouseReleaseEvent):
2048         (WebCore::EventHandler::keyEvent):
2049         (WebCore::EventHandler::handleTouchEvent):
2050
2051         * rendering/HitTestResult.cpp: Ditto.
2052         (WebCore::HitTestResult::toggleMediaFullscreenState):
2053         (WebCore::HitTestResult::enterFullscreenForVideo):
2054
2055 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
2056
2057         [Win] Unreviewed gardening. Ignore Visual Studio *.sdf files.
2058
2059         * WebCore.vcxproj: Modified property svn:ignore.
2060
2061 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
2062
2063         [Win] Enable Encrypted Media Support
2064         https://bugs.webkit.org/show_bug.cgi?id=137710
2065         <rdar://problem/18652699>
2066
2067         Reviewed by Jer Noble.
2068
2069         This feature is covered by existing media tests.
2070
2071         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2072         (WebCore::destroyAVFWrapper): Remove redundant ASSERT.
2073         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
2074         (displayOnMainThreadContext::displayOnMainThreadContext): Added.
2075         (redispatchOnMainQueue): Added.
2076         (PlatformCALayerWinInternal::displayCallback): Check if a display
2077         call is happening on a background queue, and re-dispatch on the
2078         main thread if necessary.
2079
2080 2014-10-14  Chris Dumez  <cdumez@apple.com>
2081
2082         [Mac] Avoid unnecessary dictionary lookup in ImageSource::isSizeAvailable()
2083         https://bugs.webkit.org/show_bug.cgi?id=137701
2084
2085         Reviewed by Simon Fraser.
2086
2087         The CG implementation of ImageSource::isSizeAvailable() was looking up
2088         both the width and the height keys in the dictionary before determining
2089         if the size is available. We can abort early and return false if the
2090         first key (the width) is missing, thus avoiding an extra dictionary
2091         lookup in this case.
2092
2093         This is a small win but ImageSource::isSizeAvailable() is called quite
2094         frequently during page loads
2095
2096         No new tests, no behavior change.
2097
2098         * platform/graphics/cg/ImageSourceCG.cpp:
2099         (WebCore::ImageSource::isSizeAvailable):
2100
2101 2014-10-14  Myles C. Maxfield  <mmaxfield@apple.com>
2102
2103         Remove unnecessary logging from SimpleFontData
2104         https://bugs.webkit.org/show_bug.cgi?id=137699
2105
2106         Reviewed by Andreas Kling.
2107
2108         Because of web fonts, fonts that don't have a glyph page 0 are common and expected. Printing out a
2109         message is not helpful, especially if you're not dealing with a font-related piece of WebKit.
2110
2111         No new tests because there is no behavior change.
2112
2113         * platform/graphics/SimpleFontData.cpp:
2114         (WebCore::SimpleFontData::platformGlyphInit):
2115
2116 2014-10-14  Martin Hock  <mhock@apple.com>
2117
2118         Update ViewportConfiguration whenever its size attributes change
2119         https://bugs.webkit.org/show_bug.cgi?id=137682
2120         rdar://problem/18643655
2121
2122         Reviewed by Benjamin Poulain.
2123
2124         * page/ViewportConfiguration.cpp:
2125         (WebCore::ViewportConfiguration::setMinimumLayoutSize):
2126         (WebCore::ViewportConfiguration::setMinimumLayoutSizeForMinimalUI):
2127
2128 2014-10-14  Joseph Pecoraro  <pecoraro@apple.com>
2129
2130         Web Inspector: Processing Instruction Nodes appear poorly in DOM Tree
2131         https://bugs.webkit.org/show_bug.cgi?id=137681
2132
2133         Reviewed by Timothy Hatcher.
2134
2135         * inspector/InspectorDOMAgent.cpp:
2136         (WebCore::InspectorDOMAgent::buildObjectForNode):
2137         Include the nodeName, localName, and nodeValue (string data)
2138         properties for processing instruction nodes.
2139
2140 2014-10-14  Chris Dumez  <cdumez@apple.com>
2141
2142         Use is<>() / downcast<>() for RenderFrame / RenderFrameSet
2143         https://bugs.webkit.org/show_bug.cgi?id=137696
2144
2145         Reviewed by Darin Adler.
2146
2147         Use is<>() / downcast<>() for RenderFrame / RenderFrameSet.
2148
2149         No new tests, no behavior change.
2150
2151         * html/HTMLFrameSetElement.cpp:
2152         (WebCore::HTMLFrameSetElement::defaultEventHandler):
2153         * rendering/RenderFrame.cpp:
2154         (WebCore::RenderFrame::updateFromElement):
2155         * rendering/RenderFrame.h:
2156         * rendering/RenderFrameSet.cpp:
2157         (WebCore::RenderFrameSet::computeEdgeInfo):
2158         (WebCore::RenderFrameSet::positionFramesWithFlattening):
2159         * rendering/RenderFrameSet.h:
2160
2161 2014-10-14  Youenn Fablet  <youennf@gmail.com>
2162
2163         [XHR] Abort method execution when m_loader->cancel() in internalAbort() caused reentry
2164         https://bugs.webkit.org/show_bug.cgi?id=126975
2165
2166         Reviewed by Alexey Proskuryakov.
2167
2168         Merging https://chromium.googlesource.com/chromium/blink/+/0d75daf2053631518606ae15daaece701a25b2c4
2169         Ensuring new test from https://codereview.chromium.org/76133002/ is passing.
2170
2171         Test: http/tests/xmlhttprequest/reentrant-cancel-abort.html
2172
2173         * xml/XMLHttpRequest.cpp:
2174         (WebCore::XMLHttpRequest::open): exit early if internalAbort asks so
2175         (WebCore::XMLHttpRequest::abort): exit early if internalAbort asks so
2176         (WebCore::XMLHttpRequest::internalAbort): ask calling function to exit early if a new loader is created during the cancellation of the loader (potential reentrant case through window.onload callback)   
2177         (WebCore::XMLHttpRequest::didTimeout): exit early if internalAbort asks so
2178         * xml/XMLHttpRequest.h:
2179
2180 2014-10-14  Alejandro G. Castro  <alex@igalia.com>
2181
2182         Multiple refactors in RenderMathMLOperator
2183         https://bugs.webkit.org/show_bug.cgi?id=137611
2184
2185         Reviewed by Darin Adler.
2186
2187         The changes include:
2188         - Rename m_operator to m_textContent.
2189         - Make most of the functions private, we needed to create some
2190         public member functions to be able to make the some funtions private
2191         and move trailingSpaceError to RenderMathMLOperator.
2192         - Fix incorrect capitalization of setOperatorProperties function.
2193         - Make all data members private and move them to the end of the
2194         class defition.
2195
2196         No new tests as no change in functionality.
2197
2198         * rendering/mathml/RenderMathMLOperator.cpp:
2199         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
2200         (WebCore::RenderMathMLOperator::setOperatorProperties): Renamed,
2201         incorrect capitalization
2202         (WebCore::RenderMathMLOperator::stretchTo):
2203         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
2204         (WebCore::RenderMathMLOperator::rebuildTokenContent):
2205         (WebCore::RenderMathMLOperator::updateFromElement):
2206         (WebCore::RenderMathMLOperator::updateOperatorProperties):
2207         (WebCore::RenderMathMLOperator::shouldAllowStretching):
2208         (WebCore::RenderMathMLOperator::updateStyle):
2209         (WebCore::RenderMathMLOperator::trailingSpaceError):
2210         (WebCore::RenderMathMLOperator::SetOperatorProperties): Deleted.
2211         (WebCore::RenderMathMLOperator::advanceForGlyph): Deleted.
2212         (WebCore::RenderMathMLOperator::updateTokenContent): Deleted.
2213         (WebCore::RenderMathMLOperator::getGlyphAssemblyFallBack): Deleted.
2214         * rendering/mathml/RenderMathMLOperator.h:
2215         (WebCore::RenderMathMLOperator::setLeadingSpace): Added.
2216         (WebCore::RenderMathMLOperator::setTrailingSpace):  Added.
2217         (WebCore::RenderMathMLOperator::textContent): Added.
2218         (WebCore::RenderMathMLOperator::isInvisibleOperator):
2219         * rendering/mathml/RenderMathMLRadicalOperator.cpp:
2220         (WebCore::RenderMathMLRadicalOperator::setOperatorProperties):
2221         Renamed, incorrect capitalization
2222         (WebCore::RenderMathMLRadicalOperator::SetOperatorProperties): Deleted.
2223         (WebCore::RenderMathMLRadicalOperator::trailingSpaceError): Deleted.
2224         * rendering/mathml/RenderMathMLRadicalOperator.h:
2225
2226 2014-10-14  Alejandro G. Castro  <alex@igalia.com>
2227
2228         Changes in the stretchy attribute do not update rendering
2229         https://bugs.webkit.org/show_bug.cgi?id=136883
2230
2231         Reviewed by Darin Adler.
2232
2233         Test: mathml/presentation/mo-stretch-update.html
2234
2235         We need to relayout when a change in the stretchy attribute
2236         happens.
2237
2238         * mathml/MathMLTextElement.cpp:
2239         (WebCore::MathMLTextElement::parseAttribute): Parse the
2240         modifications of the stretchy attribute.
2241         * mathml/MathMLTextElement.h:
2242         * rendering/mathml/RenderMathMLOperator.cpp:
2243         (WebCore::RenderMathMLOperator::setOperatorFlagAndScheduleLayoutIfNeeded):
2244         Add function that receives the value instead of looking for it and
2245         checks if the change should schedule a layout.
2246         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
2247         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttributeValue):
2248         Add function that receives the value instead of looking for it.
2249         * rendering/mathml/RenderMathMLOperator.h:
2250
2251 2014-10-14  Chris Dumez  <cdumez@apple.com>
2252
2253         Use is<>() / downcast<>() for RenderImage
2254         https://bugs.webkit.org/show_bug.cgi?id=137683
2255
2256         Reviewed by Mihnea Ovidenie.
2257
2258         Use is<>() / downcast<>() for RenderImage.
2259
2260         No new tests, no behavior change.
2261
2262         * accessibility/AccessibilityNodeObject.cpp:
2263         (WebCore::AccessibilityNodeObject::alternativeText):
2264         * accessibility/AccessibilityRenderObject.cpp:
2265         (WebCore::AccessibilityRenderObject::addImageMapChildren):
2266         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
2267         * bindings/objc/DOM.mm:
2268         (-[DOMElement image]):
2269         (-[DOMElement _imageTIFFRepresentation]):
2270         * editing/TextIterator.cpp:
2271         (WebCore::TextIterator::handleReplacedElement):
2272         * editing/cocoa/HTMLConverter.mm:
2273         (fileWrapperForElement):
2274         * editing/gtk/EditorGtk.cpp:
2275         (WebCore::getImageForElement):
2276         * editing/ios/EditorIOS.mm:
2277         (WebCore::getImage):
2278         * editing/mac/EditorMac.mm:
2279         (WebCore::getImage):
2280         * html/HTMLAnchorElement.cpp:
2281         (WebCore::appendServerMapMousePosition):
2282         * html/HTMLAreaElement.cpp:
2283         (WebCore::HTMLAreaElement::setFocus):
2284         * html/HTMLImageElement.cpp:
2285         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
2286         (WebCore::HTMLImageElement::parseAttribute):
2287         (WebCore::HTMLImageElement::didAttachRenderers):
2288         (WebCore::HTMLImageElement::createImageControls):
2289         (WebCore::HTMLImageElement::destroyImageControls):
2290         * html/HTMLVideoElement.cpp:
2291         (WebCore::HTMLVideoElement::didAttachRenderers):
2292         (WebCore::HTMLVideoElement::parseAttribute):
2293         * html/ImageInputType.cpp:
2294         (WebCore::ImageInputType::altAttributeChanged):
2295         (WebCore::ImageInputType::attach):
2296         * html/canvas/CanvasRenderingContext2D.cpp:
2297         (WebCore::size):
2298         * html/shadow/mac/ImageControlsRootElementMac.cpp:
2299         (WebCore::RenderImageControls::updateLogicalWidth):
2300         (WebCore::RenderImageControls::computeLogicalHeight):
2301         * loader/ImageLoader.cpp:
2302         (WebCore::ImageLoader::renderImageResource):
2303         * page/ContextMenuController.cpp:
2304         (WebCore::imageFromImageElementNode):
2305         * page/DragController.cpp:
2306         (WebCore::getCachedImage):
2307         (WebCore::getImage):
2308         * platform/win/PasteboardWin.cpp:
2309         (WebCore::Pasteboard::writeImage):
2310         (WebCore::getCachedImage):
2311         * rendering/HitTestResult.cpp:
2312         (WebCore::HitTestResult::image):
2313         * rendering/RenderImage.h:
2314         * rendering/RenderImageResource.cpp:
2315         (WebCore::RenderImageResource::getImageSize):
2316         * rendering/RenderLayerBacking.cpp:
2317         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
2318         (WebCore::RenderLayerBacking::updateImageContents):
2319         * rendering/RenderReplaced.cpp:
2320         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
2321         * rendering/shapes/ShapeOutsideInfo.cpp:
2322         (WebCore::ShapeOutsideInfo::createShapeForImage):
2323
2324 2014-10-14  Andrzej Badowski  <a.badowski@samsung.com>
2325
2326         [AX] Improve AccessibilityTableCell columnHeaders and rowHeaders functions.
2327         https://bugs.webkit.org/show_bug.cgi?id=136818
2328
2329         Reviewed by Chris Fleizach.
2330
2331         Take into account that <th> elements can be both the column headers and row headers 
2332         improved the operation of two functions: columnHeaders and rowHeaders.
2333
2334         Test: accessibility/table-headers.html
2335
2336         * accessibility/AccessibilityTableCell.cpp:
2337         (WebCore::AccessibilityTableCell::isColumnHeaderCell):
2338         A new function that helps the main goal.
2339         (WebCore::AccessibilityTableCell::isRowHeaderCell):
2340         A new function that helps the main goal.
2341         (WebCore::AccessibilityTableCell::columnHeaders):
2342         Use isColumnHeaderCell instead of isTableHeaderCell.
2343         (WebCore::AccessibilityTableCell::rowHeaders):
2344         Use isRowHeaderCell also includes <th> row header element next to the scope attribute.
2345         * accessibility/AccessibilityTableCell.h:
2346         Adds new functions to the header file.
2347
2348 2014-10-14  Csaba Osztrogon√°c  <ossy@webkit.org>
2349
2350         Fix the !ENABLE(VIDEO) build after r174353
2351         https://bugs.webkit.org/show_bug.cgi?id=137655
2352
2353         Reviewed by Darin Adler.
2354
2355         * dom/Document.cpp:
2356         * dom/Document.h:
2357         * page/Page.cpp:
2358         * page/Page.h:
2359
2360 2014-10-14  peavo@outlook.com  <peavo@outlook.com>
2361
2362         [Curl] Compile error in CurlDownload.cpp.
2363         https://bugs.webkit.org/show_bug.cgi?id=137654
2364
2365         Reviewed by Philippe Normand.
2366
2367         A template specialization is not needed anymore.
2368
2369         * platform/network/curl/CurlDownload.cpp:
2370
2371 2014-10-13  Joseph Pecoraro  <pecoraro@apple.com>
2372
2373         Web Inspector: Remove unused stale Page protocol methods
2374         https://bugs.webkit.org/show_bug.cgi?id=137678
2375
2376         Reviewed by Andreas Kling.
2377
2378         * inspector/InspectorClient.h:
2379         (WebCore::InspectorClient::canShowDebugBorders): Deleted.
2380         (WebCore::InspectorClient::setShowDebugBorders): Deleted.
2381         (WebCore::InspectorClient::canShowFPSCounter): Deleted.
2382         (WebCore::InspectorClient::setShowFPSCounter): Deleted.
2383         (WebCore::InspectorClient::canContinuouslyPaint): Deleted.
2384         (WebCore::InspectorClient::setContinuousPaintingEnabled): Deleted.
2385         * inspector/InspectorPageAgent.cpp:
2386         (WebCore::InspectorPageAgent::disable):
2387         (WebCore::InspectorPageAgent::canShowDebugBorders): Deleted.
2388         (WebCore::InspectorPageAgent::setShowDebugBorders): Deleted.
2389         (WebCore::InspectorPageAgent::canShowFPSCounter): Deleted.
2390         (WebCore::InspectorPageAgent::setShowFPSCounter): Deleted.
2391         (WebCore::InspectorPageAgent::canContinuouslyPaint): Deleted.
2392         (WebCore::InspectorPageAgent::setContinuousPaintingEnabled): Deleted.
2393         * inspector/InspectorPageAgent.h:
2394         * inspector/protocol/Page.json:
2395
2396 2014-10-13  Eric Carlson  <eric.carlson@apple.com>
2397
2398         [iOS] Refactor AirPlay monitoring code
2399         https://bugs.webkit.org/show_bug.cgi?id=137645
2400         <rdar://problem/18444817>
2401
2402         Reviewed by Jer Noble.
2403
2404         Refactor AirPlay route change monitoring code:
2405         + Have MediaSessionManager register/unregister for route changes depending on the state of
2406             all sessions so it does the right thing when there is more than one media element.
2407         + Make HTMLMediaElement unregister with MediaSession as soon as the media player is cleared
2408             because there can be no wireless playback without a player.
2409
2410         * html/HTMLMediaElement.cpp:
2411         (WebCore::HTMLMediaElement::~HTMLMediaElement): Call mediaSession->setHasPlaybackTargetAvailabilityListeners
2412             when there are target availability changed listeners.
2413         (WebCore::HTMLMediaElement::clearMediaPlayer): Ditto.
2414         (WebCore::HTMLMediaElement::wirelessRoutesAvailableDidChange): New, media session client method.
2415         * html/HTMLMediaElement.h:
2416
2417         * html/HTMLMediaSession.cpp:
2418         (WebCore::HTMLMediaSession::HTMLMediaSession): Initialize m_hasPlaybackTargetAvailabilityListeners.
2419         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners): Remember whether or not
2420             the client has a target availability listener and tell the media session manager to reconfigure
2421             itself instead of telling it to start or stop listening for route changes so it does the 
2422             right thing when there is more than one media element.
2423         * html/HTMLMediaSession.h:
2424         (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): Return true when the client 
2425             has a target availability listener, false otherwise.
2426
2427         * platform/audio/MediaSession.cpp:
2428         (WebCore::MediaSession::wirelessRoutesAvailableDidChange): Inform the client that routes have changed.
2429         * platform/audio/MediaSession.h:
2430         (WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring):
2431         (WebCore::MediaSessionClient::wirelessRoutesAvailableDidChange):
2432
2433         * platform/audio/MediaSessionManager.cpp:
2434         (WebCore::MediaSessionManager::wirelessRoutesAvailableChanged): Implement it.
2435         * platform/audio/MediaSessionManager.h:
2436         (WebCore::MediaSessionManager::configureWireLessTargetMonitoring):
2437         (WebCore::MediaSessionManager::hasWirelessTargetsAvailable):
2438         (WebCore::MediaSessionManager::sessions):
2439         (WebCore::MediaSessionManager::startMonitoringAirPlayRoutes): Deleted.
2440         (WebCore::MediaSessionManager::stopMonitoringAirPlayRoutes): Deleted.
2441
2442         * platform/audio/ios/MediaSessionManagerIOS.h:
2443         * platform/audio/ios/MediaSessionManagerIOS.mm:
2444         (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Start or stop monitoring
2445             for route changes depending on client state.
2446         (WebCore::MediaSessionManageriOS::startMonitoringAirPlayRoutes): Deleted.
2447         (WebCore::MediaSessionManageriOS::stopMonitoringAirPlayRoutes): Deleted.
2448
2449 2014-10-13  Chris Dumez  <cdumez@apple.com>
2450
2451         [Mac] Return value of createImageSourceOptions() is leaked in ImageSourceCG
2452         https://bugs.webkit.org/show_bug.cgi?id=137677
2453
2454         Reviewed by Simon Fraser.
2455
2456         The return value of createImageSourceOptions() was leaked in
2457         ImageSourceCG.cpp. It was returning a CFDictionaryRef created using
2458         CFDictionaryCreate(). Therefore, the return value should have been
2459         released but wasn't.
2460
2461         This patch makes createImageSourceOptions() return a
2462         RetainPtr<CFDictionaryRef> to make sure the CFDictionaryRef properly
2463         gets released after use.
2464
2465         No new tests, no behavior change.
2466
2467         * platform/graphics/cg/ImageSourceCG.cpp:
2468         (WebCore::createImageSourceOptions):
2469         (WebCore::imageSourceOptions):
2470         (WebCore::ImageSource::isSizeAvailable):
2471         (WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
2472         (WebCore::ImageSource::frameSizeAtIndex):
2473         (WebCore::ImageSource::orientationAtIndex):
2474         (WebCore::ImageSource::getHotSpot):
2475         (WebCore::ImageSource::repetitionCount):
2476         (WebCore::ImageSource::createFrameAtIndex):
2477         (WebCore::ImageSource::frameDurationAtIndex):
2478
2479 2014-10-13  Yusuke Suzuki  <utatane.tea@gmail.com>
2480
2481         CSS JIT: Implement :visited pseudo class
2482         https://bugs.webkit.org/show_bug.cgi?id=135293
2483
2484         Reviewed by Benjamin Poulain.
2485
2486         This patch implements CSS JIT for :visited. And it makes :not(:link) JIT-ed.
2487         Following the design discussed at the other bug[1], implemented :visited JIT
2488         without tracking VisitedMatchEnabled state.
2489
2490         In this patch, we change the semantics of :visited / :link
2491         inside functional pseudo classes for further CSS Selector Level 4 extensions.
2492
2493         Edge cases are tested by the existing tests.
2494         :not(:link)
2495             fast/history/link-inside-not.html
2496         :not(:visited)
2497             fast/history/visited-inside-not.html
2498         :-webkit-any(:link)
2499             fast/history/link-inside-any.html
2500         :-webkit-any(:visited)
2501             fast/history/visited-inside-any.html
2502
2503         [1]: https://bugs.webkit.org/show_bug.cgi?id=135639
2504
2505         Test: fast/history/link-inside-not-inside-any.html
2506             To cover the :-webkit-any(:not(:link)), added new tests.
2507
2508         * css/SelectorChecker.cpp:
2509         (WebCore::SelectorChecker::checkOne):
2510         * cssjit/SelectorCompiler.cpp:
2511         (WebCore::SelectorCompiler::addPseudoClassType):
2512         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
2513         (WebCore::SelectorCompiler::constructFragments):
2514         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2515         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorCheckerExcludingPseudoElements):
2516         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRightmostTreeWalker):
2517         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
2518         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
2519         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstLink):
2520         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateStoreLastVisitedElement):
2521
2522 2014-10-13  Chris Dumez  <cdumez@apple.com>
2523
2524         Use modern loops in RenderLayerCompositor
2525         https://bugs.webkit.org/show_bug.cgi?id=137670
2526
2527         Reviewed by Simon Fraser.
2528
2529         Use modern range for-loops in RenderLayerCompositor.
2530
2531         No new tests, no behavior change.
2532
2533         * rendering/RenderLayerCompositor.cpp:
2534         (WebCore::OverlapMapContainer::overlapsLayers):
2535         (WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects):
2536         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush):
2537         (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
2538         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
2539         (WebCore::RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed):
2540         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2541         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
2542         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTreeForNamedFlowFixed):
2543         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
2544         (WebCore::RenderLayerCompositor::rebuildRegionCompositingLayerTree):
2545         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
2546         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
2547         (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
2548         (WebCore::resetTrackedRepaintRectsRecursive):
2549         (WebCore::RenderLayerCompositor::layerHas3DContent):
2550         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
2551         (WebCore::RenderLayerCompositor::registerAllScrollingLayers):
2552         (WebCore::RenderLayerCompositor::unregisterAllScrollingLayers):
2553
2554 2014-10-13  Chris Dumez  <cdumez@apple.com>
2555
2556         Drop unnecessary overlapMap null checks in computeCompositingRequirements()
2557         https://bugs.webkit.org/show_bug.cgi?id=137668
2558
2559         Reviewed by Andreas Kling.
2560
2561         Drop unnecessary overlapMap null checks in computeCompositingRequirements().
2562         The function is never called with a null overlapMap so we can make the
2563         argument a reference and drop all the null checks.
2564
2565         No new tests, no behavior change.
2566
2567         * rendering/RenderLayerCompositor.cpp:
2568         (WebCore::RenderLayerCompositor::updateCompositingLayers):
2569         (WebCore::RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed):
2570         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2571         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
2572         * rendering/RenderLayerCompositor.h:
2573
2574 2014-10-13  Chris Dumez  <cdumez@apple.com>
2575
2576         Use is<>() / downcast<>() for PlatformCALayer subclasses
2577         https://bugs.webkit.org/show_bug.cgi?id=137661
2578
2579         Reviewed by Simon Fraser.
2580
2581         Use is<>() / downcast<>() for PlatformCALayer subclasses and clean up
2582         the surrounding code.
2583
2584         No new tests, no behavior change.
2585
2586         * platform/graphics/ca/GraphicsLayerCA.cpp:
2587         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
2588         (WebCore::GraphicsLayerCA::updateContentsRects):
2589         (WebCore::GraphicsLayerCA::updateReplicatedLayers):
2590         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
2591         (WebCore::GraphicsLayerCA::fetchCloneLayers): Deleted.
2592         * platform/graphics/ca/PlatformCALayer.h:
2593         * platform/graphics/ca/TileCoverageMap.cpp:
2594         (WebCore::TileCoverageMap::TileCoverageMap):
2595         * platform/graphics/ca/TileGrid.cpp:
2596         (WebCore::TileGrid::ensureTilesForRect):
2597         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2598         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2599         (PlatformCALayerMac::clone):
2600         (PlatformCALayerMac::appendSublayer):
2601         (PlatformCALayerMac::insertSublayer):
2602         (PlatformCALayerMac::replaceSublayer):
2603         (PlatformCALayerMac::adoptSublayers):
2604         (PlatformCALayerMac::copyFiltersFrom):
2605         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
2606         (WebCore::CACFLayerTreeHost::setRootChildLayer):
2607         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2608         (PlatformCALayerWin::clone):
2609         (PlatformCALayerWin::rootLayer):
2610         (PlatformCALayerWin::appendSublayer):
2611         (PlatformCALayerWin::insertSublayer):
2612         (PlatformCALayerWin::replaceSublayer):
2613         (PlatformCALayerWin::adoptSublayers):
2614         (PlatformCALayerWin::copyFiltersFrom):
2615         * platform/graphics/ca/win/PlatformCALayerWin.h:
2616         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
2617         (PlatformCALayerWinInternal::insertSublayer):
2618         * platform/graphics/ca/win/PlatformCALayerWinInternal.h:
2619
2620 2014-10-13  Chris Dumez  <cdumez@apple.com>
2621
2622         Use is<>() / downcast<>() for Filter / FilterOperation subclasses
2623         https://bugs.webkit.org/show_bug.cgi?id=137644
2624
2625         Reviewed by Darin Adler.
2626
2627         Use is<>() / downcast<>() for Filter / FilterOperation subclasses.
2628
2629         No new tests, no behavior change.
2630
2631         * css/CSSComputedStyleDeclaration.cpp:
2632         (WebCore::ComputedStyleExtractor::valueForFilter):
2633         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
2634         (PlatformCAFilters::filterValueForOperation):
2635         (PlatformCAFilters::colorMatrixValueForFilter):
2636         * platform/graphics/filters/Filter.h:
2637         * platform/graphics/filters/FilterOperation.cpp:
2638         (WebCore::DefaultFilterOperation::operator==):
2639         (WebCore::ReferenceFilterOperation::operator==):
2640         (WebCore::BasicColorMatrixFilterOperation::blend):
2641         (WebCore::BasicColorMatrixFilterOperation::operator==):
2642         (WebCore::BasicComponentTransferFilterOperation::blend):
2643         (WebCore::BasicComponentTransferFilterOperation::operator==):
2644         (WebCore::BlurFilterOperation::operator==):
2645         (WebCore::BlurFilterOperation::blend):
2646         (WebCore::DropShadowFilterOperation::operator==):
2647         (WebCore::DropShadowFilterOperation::blend):
2648         * platform/graphics/filters/FilterOperation.h:
2649         * platform/graphics/filters/FilterOperations.cpp:
2650         (WebCore::FilterOperations::outsets):
2651         * rendering/FilterEffectRenderer.cpp:
2652         (WebCore::FilterEffectRenderer::build):
2653         * rendering/RenderLayerFilterInfo.cpp:
2654         (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
2655         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
2656         (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
2657         * svg/graphics/filters/SVGFilter.h:
2658         (isType):
2659
2660 2014-10-13  Chris Dumez  <cdumez@apple.com>
2661
2662         Use is<>() / downcast<>() for Table render objects
2663         https://bugs.webkit.org/show_bug.cgi?id=137641
2664
2665         Reviewed by Mihnea Ovidenie.
2666
2667         Use is<>() / downcast<>() for table-related render objects and clean
2668         up the surrounding code.
2669
2670         No new tests, no behavior change.
2671
2672         * accessibility/AccessibilityARIAGrid.cpp:
2673         (WebCore::AccessibilityARIAGrid::addChildren):
2674         * accessibility/AccessibilityTable.cpp:
2675         (WebCore::AccessibilityTable::tableElement):
2676         (WebCore::AccessibilityTable::isDataTable):
2677         (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
2678         (WebCore::AccessibilityTable::addChildren):
2679         * accessibility/AccessibilityTableCell.cpp:
2680         (WebCore::AccessibilityTableCell::parentTable):
2681         (WebCore::AccessibilityTableCell::rowIndexRange):
2682         (WebCore::AccessibilityTableCell::columnIndexRange):
2683         (WebCore::AccessibilityTableCell::titleUIElement):
2684         * accessibility/AccessibilityTableColumn.cpp:
2685         (WebCore::AccessibilityTableColumn::headerObject):
2686         * editing/DeleteSelectionCommand.cpp:
2687         (WebCore::DeleteSelectionCommand::removeNode):
2688         * editing/TextIterator.cpp:
2689         (WebCore::shouldEmitTabBeforeNode):
2690         (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
2691         * html/HTMLTableCellElement.cpp:
2692         (WebCore::HTMLTableCellElement::parseAttribute):
2693         (WebCore::HTMLTableCellElement::cellAbove):
2694         * html/HTMLTableColElement.cpp:
2695         (WebCore::HTMLTableColElement::parseAttribute):
2696         * mathml/MathMLElement.cpp:
2697         (WebCore::MathMLElement::parseAttribute):
2698         * rendering/AutoTableLayout.cpp:
2699         (WebCore::AutoTableLayout::recalcColumn):
2700         (WebCore::shouldScaleColumns):
2701         * rendering/RenderBlockFlow.cpp:
2702         (WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths):
2703         * rendering/RenderBox.cpp:
2704         (WebCore::RenderBox::computePercentageLogicalHeight):
2705         (WebCore::RenderBox::layoutOverflowRectForPropagation):
2706         * rendering/RenderElement.cpp:
2707         (WebCore::RenderElement::addChild):
2708         * rendering/RenderLayer.cpp:
2709         (WebCore::RenderLayer::calculateClipRects):
2710         * rendering/RenderTable.cpp:
2711         (WebCore::RenderTable::addChild):
2712         (WebCore::RenderTable::layout):
2713         (WebCore::RenderTable::firstColumn):
2714         (WebCore::RenderTable::recalcSections):
2715         (WebCore::RenderTable::sectionAbove):
2716         (WebCore::RenderTable::sectionBelow):
2717         (WebCore::RenderTable::bottomSection):
2718         * rendering/RenderTable.h:
2719         * rendering/RenderTableCaption.cpp:
2720         (WebCore::RenderTableCaption::table):
2721         * rendering/RenderTableCell.h:
2722         (WebCore::RenderTableCell::nextCell):
2723         (WebCore::RenderTableCell::previousCell):
2724         (WebCore::RenderTableRow::firstCell):
2725         (WebCore::RenderTableRow::lastCell):
2726         * rendering/RenderTableCol.cpp:
2727         (WebCore::RenderTableCol::table):
2728         (WebCore::RenderTableCol::enclosingColumnGroup):
2729         (WebCore::RenderTableCol::nextColumn):
2730         * rendering/RenderTableCol.h:
2731         Make updateFromElement() public to allow the callers to use tighter
2732         typing and devitualize the call as the class is final.
2733
2734         * rendering/RenderTableRow.cpp:
2735         (WebCore::RenderTableRow::addChild):
2736         * rendering/RenderTableRow.h:
2737         (WebCore::RenderTableSection::firstRow):
2738         (WebCore::RenderTableSection::lastRow):
2739         (WebCore::RenderTableRow::nextRow):
2740         (WebCore::RenderTableRow::previousRow):
2741         * rendering/RenderTableSection.cpp:
2742         (WebCore::RenderTableSection::addChild):
2743         (WebCore::RenderTableSection::layoutRows):
2744         (WebCore::RenderTableSection::paintCell):
2745         * rendering/RenderTableSection.h:
2746         * rendering/RenderTreeAsText.cpp:
2747         (WebCore::writeTextRun):
2748         (WebCore::writeSimpleLine):
2749
2750 2014-10-08  Jer Noble  <jer.noble@apple.com>
2751
2752         MediaPlayer::characteristicChanged() is not called when new tracks are found in SourceBufferPrivateAVFObjC
2753         https://bugs.webkit.org/show_bug.cgi?id=137533
2754
2755         Reviewed by Darin Adler.
2756
2757         When a new AVAsset is returned out of the AVStreamDataParser, notify the HTMLMediaElement that
2758         characteristics of the player may have changed.
2759
2760         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2761         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2762         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::characteristicsChanged):
2763         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2764         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
2765
2766 2014-10-13  Jer Noble  <jer.noble@apple.com>
2767
2768         [iOS] Stop listening for wireless playback target availability when the default controls are hidden.
2769         https://bugs.webkit.org/show_bug.cgi?id=137633
2770
2771         Reviewed by Dean Jackson.
2772
2773         In order to minimize the excess bandwidth and power consumption required for actively listening
2774         for wireless playback target availablity, unregister for those notifications while the controls
2775         are hidden due to playback, or when the element's document is hidden.
2776
2777         * Modules/mediacontrols/mediaControlsiOS.js:
2778         (ControllerIOS.prototype.createBase): Register for document visiblity change notfications.
2779         (ControllerIOS.prototype.setControlsType): Call updateShouldListenForPlaybackTargetAvailabilityEvent()
2780             instead of setShouldListenForPlaybackTargetAvailabilityEvent()
2781         (ControllerIOS.prototype.hideControls): Ditto.
2782         (ControllerIOS.prototype.showControls): Ditto.
2783         (ControllerIOS.prototype.updateStatusDisplay): Ditto.
2784         (ControllerIOS.prototype.handleVisibilityChange): Ditto.
2785         (ControllerIOS.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent): Added. Only listen
2786             for target availability when the video has no errors, is not in the initial "big play button"
2787             controls state, and when the controls are not hidden.
2788         * platform/audio/ios/MediaSessionManagerIOS.mm:
2789         (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Explicitly set the discoveryMode to "disabled"
2790             rather than waiting for the autoreleasepool to destroy our routing controller.
2791
2792 2014-10-13  Simon Fraser  <simon.fraser@apple.com>
2793
2794         iOS DRT snapshots are limited to the page visible area
2795         https://bugs.webkit.org/show_bug.cgi?id=137650
2796
2797         Reviewed by Daniel Bates.
2798
2799         LegacyTileCache drawing was limited to the window's visible area, found by
2800         crawling up the layer hierarchy to the root layer. This caused test snapshots to
2801         be missing non-composited content outside the iPhone visible area, which hinders
2802         testing.
2803         
2804         Fix by adding a test-only mode where the window visible area is the entire window.
2805
2806         * platform/ios/wak/WAKWindow.h:
2807         * platform/ios/wak/WAKWindow.mm:
2808         (-[WAKWindow setEntireWindowVisibleForTesting:]):
2809         (-[WAKWindow _visibleRectRespectingMasksToBounds:]):
2810
2811 2014-10-13  Mihnea Ovidenie  <mihnea@adobe.com>
2812
2813         [CSSRegions] Make RenderNamedFlowFragment::computeStyleInRegion const
2814         https://bugs.webkit.org/show_bug.cgi?id=137604
2815
2816         Reviewed by Andrei Bucur.
2817
2818         The method computeStyleInRegion should be const as it does not modify
2819         the state of the RenderNamedFlowFragment instance. Make pointers to
2820         the region used for styling const along the way. No new tests as no
2821         change in functionality.
2822
2823         * css/ElementRuleCollector.h:
2824         (WebCore::ElementRuleCollector::ElementRuleCollector):
2825         (WebCore::ElementRuleCollector::setRegionForStyling):
2826         * css/StyleResolver.cpp:
2827         (WebCore::StyleResolver::State::initForStyleResolve):
2828         (WebCore::StyleResolver::styleForElement):
2829         * css/StyleResolver.h:
2830         * rendering/RenderNamedFlowFragment.cpp:
2831         (WebCore::RenderNamedFlowFragment::computeStyleInRegion):
2832         * rendering/RenderNamedFlowFragment.h:
2833
2834 2014-09-30  Sergio Villar Senin  <svillar@igalia.com>
2835
2836         [CSS Grid Layout] Pass the valid set of tracks to grow beyond growth limits
2837         https://bugs.webkit.org/show_bug.cgi?id=137253
2838
2839         Reviewed by Darin Adler.
2840
2841         Section 10.4 of the specs describe how to resolve content based
2842         track sizing functions. Among others it describes the "distribute
2843         extra space" algorithm. The 3rd bullet of that algorithm specifies
2844         how to distribute (and also the target tracks) the extra space
2845         once all the tracks have reached their growth limits.
2846
2847         Our implementation had 2 problems. First we were not passing a
2848         valid subset of tracks (instead we were always using all of
2849         them). Now we use a function that filters the right tracks to be
2850         the target of the extra space distribution depending on whether
2851         we're computing the min track function or the max track function.
2852
2853         Secondly the algorithm that was distributing the extra space was
2854         not using that list of passed in tracks (it iterated over all of
2855         them). From now on it will use the set of tracks selected using
2856         the filter function described above.
2857
2858         * rendering/RenderGrid.cpp:
2859         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2860         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2861         (WebCore::RenderGrid::distributeSpaceToTracks):
2862         * rendering/RenderGrid.h:
2863         * rendering/style/GridTrackSize.h:
2864         (WebCore::GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth):
2865         (WebCore::GridTrackSize::hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth):
2866
2867 2014-10-12  Mike West  <mkwst@chromium.org>
2868
2869         Referrer Policy: Update <meta name="referrer"> values to match the spec
2870         https://bugs.webkit.org/show_bug.cgi?id=137635
2871
2872         Reviewed by Jochen Eisinger.
2873
2874         The Referrer Policy specification ([Working Draft][WD], [Editor's
2875         draft[ED]) defines different keywords than we originally
2876         implemented. We should support them in the interests of clarity and
2877         interoperability with other browsers implementing the specification.
2878
2879         [WD]: http://www.w3.org/TR/referrer-policy/#referrer-policy-delivery-meta
2880         [ED]: http://w3c.github.io/webappsec/specs/referrer-policy/#referrer-policy-delivery-meta
2881
2882         This patch is a port of Blink's https://codereview.chromium.org/607433002/
2883
2884         Tests: http/tests/security/referrer-policy-conflicting-policies.html
2885                http/tests/security/referrer-policy-https-no-referrer-when-downgrade.html
2886                http/tests/security/referrer-policy-https-no-referrer.html
2887                http/tests/security/referrer-policy-https-unsafe-url.html
2888                http/tests/security/referrer-policy-no-referrer-when-downgrade.html
2889                http/tests/security/referrer-policy-no-referrer.html
2890
2891         * dom/Document.cpp:
2892         (WebCore::Document::processReferrerPolicy):
2893
2894 2014-10-12  Dhi Aurrahman  <diorahman@rockybars.com>
2895
2896         Support activation behavior of link element
2897         https://bugs.webkit.org/show_bug.cgi?id=137597
2898
2899         Reviewed by Benjamin Poulain.
2900
2901         Support activation behavior of link elements as defined in [1],
2902         i.e. to follow the hyperlink created by the link element when it is fully active.
2903
2904         [1] https://html.spec.whatwg.org/multipage/semantics.html#the-link-element
2905
2906         Tests: fast/dom/html-link-element-activation-behavior-on-element-click.html
2907                fast/dom/html-link-element-activation-behavior-on-mouse-click.html
2908                fast/dom/html-link-element-activation-behavior-url-is-null.html
2909
2910         * dom/MouseEvent.cpp:
2911         (WebCore::MouseEvent::triggerActivationBehavior):
2912         * dom/MouseEvent.h:
2913         * html/HTMLAnchorElement.cpp:
2914         (WebCore::HTMLAnchorElement::defaultEventHandler):
2915         (WebCore::isLinkClick): Deleted.
2916         * html/HTMLAnchorElement.h:
2917         * html/HTMLLinkElement.cpp:
2918         (WebCore::HTMLLinkElement::defaultEventHandler):
2919         (WebCore::HTMLLinkElement::handleClick):
2920         * html/HTMLLinkElement.h:
2921         * svg/SVGAElement.cpp:
2922         (WebCore::SVGAElement::defaultEventHandler):
2923
2924 2014-10-11  KwangHyuk Kim  <hyuki.kim@samsung.com>
2925
2926         [EFL] Enable WebP support.
2927         https://bugs.webkit.org/show_bug.cgi?id=136156
2928
2929         Reviewed by Gyuyoung Kim.
2930
2931         Add WebP library and inlcude path to WebCore path for WK2 Efl.
2932         No new tests since existing feature is just enabled for WK2 Efl.
2933
2934         * PlatformEfl.cmake:
2935
2936 2014-10-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2937
2938         [GLIB] Split GMainLoopSource moving thread safe implementation to its own class GThreadSafeMainLoopSource
2939         https://bugs.webkit.org/show_bug.cgi?id=137485
2940
2941         Reviewed by Sergio Villar Senin.
2942
2943         Use GThreadSafeMainLoopSource for GStreamer sources, since they
2944         can be used from different threads. Also update GMutexLocker
2945         usages, since it's now a template.
2946
2947         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
2948         (WebCore::AudioFileReader::createBus):
2949         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
2950         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2951         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2952         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
2953         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
2954         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
2955         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2956         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
2957         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
2958         (webkitVideoSinkTimeoutCallback):
2959         (webkitVideoSinkRender):
2960         (unlockBufferMutex):
2961         (webkitVideoSinkUnlockStop):
2962         (webkitVideoSinkStart):
2963         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
2964         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2965         (webKitWebSrcGetProperty):
2966         (webKitWebSrcStop):
2967         (webKitWebSrcStart):
2968         (webKitWebSrcChangeState):
2969         (webKitWebSrcQueryWithParent):
2970         (webKitWebSrcGetUri):
2971         (webKitWebSrcSetUri):
2972         (webKitWebSrcNeedDataMainCb):
2973         (webKitWebSrcNeedDataCb):
2974         (webKitWebSrcEnoughDataMainCb):
2975         (webKitWebSrcEnoughDataCb):
2976         (webKitWebSrcSeekDataCb):
2977         (webKitWebSrcSetMediaPlayer):
2978         (StreamingClient::createReadBuffer):
2979         (StreamingClient::handleResponseReceived):
2980         (StreamingClient::handleDataReceived):
2981         (StreamingClient::handleNotifyFinished):
2982         (ResourceHandleStreamingClient::wasBlocked):
2983         (ResourceHandleStreamingClient::cannotShowURL):
2984
2985 2014-10-10  Chris Dumez  <cdumez@apple.com>
2986
2987         Use is<>() / downcast<>() for Image subclasses
2988         https://bugs.webkit.org/show_bug.cgi?id=137625
2989
2990         Reviewed by Andreas Kling.
2991
2992         Use is<>() / downcast<>() for Image subclasses.
2993
2994         No new tests, no behavior change.
2995
2996         * accessibility/AccessibilityRenderObject.cpp:
2997         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
2998         * loader/cache/CachedImage.cpp:
2999         (WebCore::CachedImage::imageSizeForRenderer):
3000         (WebCore::CachedImage::createImage):
3001         * platform/graphics/BitmapImage.h:
3002         * platform/graphics/Image.h:
3003         * platform/mac/DragImageMac.mm:
3004         (WebCore::createDragImageFromImage):
3005         * rendering/RenderImage.cpp:
3006         (WebCore::RenderImage::embeddedContentBox):
3007         * svg/graphics/SVGImage.h:
3008
3009 2014-10-10  Chris Dumez  <cdumez@apple.com>
3010
3011         Use is<>() / downcast<>() for RenderElement
3012         https://bugs.webkit.org/show_bug.cgi?id=137622
3013
3014         Reviewed by Benjamin Poulain.
3015
3016         Use is<>() / downcast<>() for RenderElement and clean up the
3017         surrounding code.
3018
3019         No new tests, no behavior change.
3020
3021         * accessibility/AccessibilityImageMapLink.cpp:
3022         (WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
3023         * accessibility/AccessibilityRenderObject.cpp:
3024         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3025         * css/CSSComputedStyleDeclaration.cpp:
3026         (WebCore::computeRenderStyleForProperty):
3027         * dom/Node.cpp:
3028         (WebCore::Node::materializeRareData):
3029         * dom/Position.cpp:
3030         (WebCore::isNonTextLeafChild):
3031         (WebCore::searchAheadForBetterMatch):
3032         * dom/PseudoElement.cpp:
3033         (WebCore::PseudoElement::didRecalcStyle):
3034         * editing/CompositeEditCommand.cpp:
3035         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
3036         * editing/htmlediting.cpp:
3037         (WebCore::isEmptyTableCell):
3038         * rendering/InlineIterator.h:
3039         (WebCore::bidiNextShared):
3040         * rendering/RenderBlock.cpp:
3041         (WebCore::RenderBlock::getFirstLetter):
3042         * rendering/RenderBox.cpp:
3043         (WebCore::RenderBox::layout):
3044         * rendering/RenderCounter.cpp:
3045         (WebCore::RenderCounter::rendererRemovedFromTree):
3046         (WebCore::RenderCounter::rendererSubtreeAttached):
3047         (showCounterRendererTree):
3048         * rendering/RenderElement.cpp:
3049         (WebCore::RenderElement::insertChildInternal):
3050         (WebCore::RenderElement::removeChildInternal):
3051         (WebCore::RenderElement::findNextLayer):
3052         (WebCore::RenderElement::layout):
3053         * rendering/RenderElement.h:
3054         (WebCore::RenderObject::isRenderLayerModelObject):
3055         (WebCore::RenderObject::isBoxModelObject):
3056         (WebCore::RenderObject::isRenderBlock):
3057         (WebCore::RenderObject::isRenderBlockFlow):
3058         (WebCore::RenderObject::isRenderReplaced):
3059         (WebCore::RenderObject::isRenderInline):
3060         (WebCore::RenderObject::style):
3061         (WebCore::RenderObject::firstLineStyle):
3062         (WebCore::ContainerNode::renderer):
3063         * rendering/RenderFrameSet.cpp:
3064         (WebCore::RenderFrameSet::paint):
3065         * rendering/RenderLayer.cpp:
3066         (WebCore::RenderLayer::calculateClipRects):
3067         * rendering/RenderNamedFlowFragment.cpp:
3068         (WebCore::RenderNamedFlowFragment::computeChildrenStyleInRegion):
3069         (WebCore::RenderNamedFlowFragment::setObjectStyleInRegion):
3070         (WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
3071         * rendering/RenderObject.cpp:
3072         (WebCore::RenderObject::clearNeedsLayout):
3073         (WebCore::RenderObject::willBeDestroyed):
3074         (WebCore::RenderObject::collectAnnotatedRegions):
3075         * rendering/RenderVTTCue.cpp:
3076         (WebCore::RenderVTTCue::initializeLayoutParameters):
3077         (WebCore::RenderVTTCue::repositionGenericCue):
3078         * rendering/mathml/RenderMathMLFraction.cpp:
3079         (WebCore::RenderMathMLFraction::addChild):
3080         * rendering/mathml/RenderMathMLMenclose.cpp:
3081         (WebCore::RenderMathMLMenclose::addChild):
3082         * rendering/mathml/RenderMathMLOperator.cpp:
3083         (WebCore::RenderMathMLOperator::rebuildTokenContent):
3084         (WebCore::RenderMathMLOperator::updateStyle):
3085         * rendering/mathml/RenderMathMLRoot.cpp:
3086         (WebCore::RenderMathMLRoot::addChild):
3087         (WebCore::RenderMathMLRoot::layout):
3088         * rendering/mathml/RenderMathMLToken.cpp:
3089         (WebCore::RenderMathMLToken::addChild):
3090         (WebCore::RenderMathMLToken::updateTokenContent):
3091         (WebCore::RenderMathMLToken::updateStyle):
3092         * rendering/mathml/RenderMathMLUnderOver.cpp:
3093         (WebCore::RenderMathMLUnderOver::layout):
3094         * rendering/svg/RenderSVGResource.cpp:
3095         (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
3096         * rendering/svg/RenderSVGText.cpp:
3097         (WebCore::findPreviousAndNextAttributes):
3098         (WebCore::RenderSVGText::subtreeStyleDidChange):
3099         (WebCore::updateFontInAllDescendants):
3100         * rendering/svg/SVGRenderSupport.cpp:
3101         (WebCore::SVGRenderSupport::layoutChildren):
3102         * rendering/svg/SVGResourcesCache.cpp:
3103         (WebCore::SVGResourcesCache::clientWasAddedToTree):
3104         (WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):
3105         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
3106         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextRenderer):
3107         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForForSubtree):
3108         (WebCore::SVGTextLayoutAttributesBuilder::rebuildMetricsForTextRenderer):
3109         * rendering/svg/SVGTextLayoutAttributesBuilder.h:
3110         * rendering/svg/SVGTextMetricsBuilder.cpp:
3111         (WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer):
3112         (WebCore::SVGTextMetricsBuilder::measureTextRenderer):
3113         (WebCore::SVGTextMetricsBuilder::walkTree):
3114         (WebCore::SVGTextMetricsBuilder::buildMetricsAndLayoutAttributes):
3115         * rendering/svg/SVGTextMetricsBuilder.h:
3116         * rendering/svg/SVGTextRunRenderingContext.cpp:
3117         (WebCore::SVGTextRunRenderingContext::createGlyphToPathTranslator):
3118         (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs):
3119         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
3120         * svg/SVGFontData.cpp:
3121         (WebCore::SVGFontData::applySVGGlyphSelection):
3122
3123 2014-10-10  Benjamin Poulain  <benjamin@webkit.org>
3124
3125         Update :nth-child(An+B of selector-list) to the latest specification
3126         https://bugs.webkit.org/show_bug.cgi?id=137593
3127
3128         Reviewed by Andreas Kling.
3129
3130         Following my implementation feedback on :nth-child(An+B of selector-list),
3131         the CSS WG decided to change the definition such that the current element on which
3132         the selector is matched must also match the selector list in :nth-child().
3133
3134         This patch updates the implementation accordingly.
3135
3136         Test: fast/selectors/nth-child-of-chained-3.html
3137
3138         * css/SelectorChecker.cpp:
3139         (WebCore::SelectorChecker::checkOne):
3140         (WebCore::SelectorChecker::matchSelectorList):
3141         * css/SelectorChecker.h:
3142         * cssjit/SelectorCompiler.cpp:
3143         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
3144         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
3145
3146 2014-10-10  Chris Dumez  <cdumez@apple.com>
3147
3148         Drop RENDER_OBJECT_TYPE_CASTS() for a lot of RenderObject subclasses
3149         https://bugs.webkit.org/show_bug.cgi?id=137594
3150
3151         Reviewed by Darin Adler.
3152
3153         Drop RENDER_OBJECT_TYPE_CASTS() for RenderObject subclasses that no
3154         longer needed it or that required very few changes to do so. This will
3155         make sure developers start using is<>() / downcast<>() for those
3156         classes.
3157
3158         No new tests, no behavior change.
3159
3160         * accessibility/AccessibilityRenderObject.cpp:
3161         (WebCore::AccessibilityRenderObject::textUnderElement):
3162         (WebCore::AccessibilityRenderObject::stringValue):
3163         (WebCore::AccessibilityRenderObject::titleUIElement):
3164         * dom/PseudoElement.cpp:
3165         (WebCore::PseudoElement::didAttachRenderers):
3166         * html/HTMLCanvasElement.cpp:
3167         (WebCore::HTMLCanvasElement::reset):
3168         * html/HTMLPlugInElement.cpp:
3169         (WebCore::HTMLPlugInElement::defaultEventHandler):
3170         * html/HTMLPlugInImageElement.cpp:
3171         (WebCore::HTMLPlugInImageElement::updateSnapshot):
3172         (WebCore::HTMLPlugInImageElement::checkSnapshotStatus):
3173         * html/SearchInputType.cpp:
3174         (WebCore::SearchInputType::addSearchResult):
3175         (WebCore::SearchInputType::didSetValueByUserEdit):
3176         * html/shadow/TextControlInnerElements.cpp:
3177         (WebCore::TextControlInnerTextElement::renderer):
3178         (WebCore::TextControlInnerTextElement::customStyleForRenderer):
3179         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
3180         * page/FrameView.cpp:
3181         (WebCore::FrameView::isInChildFrameWithFrameFlattening):
3182         * rendering/RenderButton.h:
3183         * rendering/RenderCounter.h:
3184         * rendering/RenderDetailsMarker.h:
3185         * rendering/RenderFieldset.h:
3186         * rendering/RenderFileUploadControl.cpp:
3187         (WebCore::RenderFileUploadControl::paintObject):
3188         * rendering/RenderFileUploadControl.h:
3189         * rendering/RenderFlexibleBox.h:
3190         * rendering/RenderFullScreen.h:
3191         * rendering/RenderGrid.h:
3192         * rendering/RenderHTMLCanvas.h:
3193         * rendering/RenderIFrame.h:
3194         * rendering/RenderLayerBacking.cpp:
3195         (WebCore::RenderLayerBacking::contentsBox):
3196         * rendering/RenderMedia.h:
3197         * rendering/RenderQuote.cpp:
3198         (WebCore::RenderQuote::attachQuote):
3199         * rendering/RenderQuote.h:
3200         * rendering/RenderReplaced.h:
3201         * rendering/RenderScrollbarPart.h:
3202         * rendering/RenderSearchField.h:
3203         * rendering/RenderSnapshottedPlugIn.h:
3204         * rendering/RenderTableCaption.h:
3205         * rendering/RenderTextControlMultiLine.h:
3206         * rendering/RenderTextControlSingleLine.h:
3207         * rendering/RenderThemeMac.mm:
3208         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
3209         * rendering/RenderTreeAsText.cpp:
3210         (WebCore::RenderTreeAsText::writeRenderObject):
3211         * rendering/RenderVideo.cpp:
3212         (WebCore::rendererPlaceholder):
3213         * rendering/line/BreakingContextInlineHeaders.h:
3214         (WebCore::updateCounterIfNeeded):
3215         * rendering/svg/RenderSVGContainer.h:
3216         * rendering/svg/RenderSVGGradientStop.h:
3217         * rendering/svg/RenderSVGModelObject.h:
3218         * rendering/svg/RenderSVGPath.h:
3219         * rendering/svg/RenderSVGResourceFilter.h:
3220         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
3221         (WebCore::RenderSVGResourceFilterPrimitive::styleDidChange):
3222         * rendering/svg/RenderSVGTextPath.h:
3223         * rendering/svg/RenderSVGTransformableContainer.h:
3224         * rendering/svg/RenderSVGViewportContainer.h:
3225         * rendering/svg/SVGRenderSupport.cpp:
3226         (WebCore::SVGRenderSupport::repaintRectForRendererInLocalCoordinatesExcludingSVGShadow):
3227         (WebCore::SVGRenderSupport::checkForSVGRepaintDuringLayout):
3228         (WebCore::updateObjectBoundingBox):
3229         (WebCore::layoutSizeOfNearestViewportChanged):
3230         (WebCore::SVGRenderSupport::transformToRootChanged):
3231         (WebCore::SVGRenderSupport::rendererHasSVGShadow):
3232         (WebCore::SVGRenderSupport::setRendererHasSVGShadow):
3233         * rendering/svg/SVGTextLayoutEngine.cpp:
3234         (WebCore::SVGTextLayoutEngine::beginTextPathLayout):
3235         * svg/SVGPathElement.cpp:
3236         (WebCore::SVGPathElement::svgAttributeChanged):
3237         (WebCore::SVGPathElement::pathSegListChanged):
3238         (WebCore::SVGPathElement::getBBox):
3239         * svg/SVGSVGElement.cpp:
3240         (WebCore::SVGSVGElement::currentViewportSize):
3241
3242 2014-10-10  Chris Dumez  <cdumez@apple.com>
3243
3244         Use is<>() / downcast<>() for GraphicsLayer subclasses
3245         https://bugs.webkit.org/show_bug.cgi?id=137595
3246
3247         Reviewed by Darin Adler.
3248
3249         Use is<>() / downcast<>() for GraphicsLayer subclasses and clean up the
3250         surrounding code.
3251
3252         No new tests, no behavior change.
3253
3254         * page/mac/ServicesOverlayController.mm:
3255         (WebCore::ServicesOverlayController::Highlight::Highlight):
3256         (WebCore::ServicesOverlayController::Highlight::fadeIn):
3257         (WebCore::ServicesOverlayController::Highlight::fadeOut):
3258         * platform/graphics/GraphicsLayer.h:
3259         * platform/graphics/ca/GraphicsLayerCA.cpp:
3260         (WebCore::GraphicsLayerCA::removeFromParent):
3261         (WebCore::GraphicsLayerCA::setMaskLayer):
3262         (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush):
3263         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
3264         (WebCore::GraphicsLayerCA::updateSublayerList):
3265         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
3266         (WebCore::GraphicsLayerCA::updateMaskLayer):
3267         (WebCore::GraphicsLayerCA::replicatedLayerRoot):
3268         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
3269         (WebCore::GraphicsLayerCA::propagateLayerChangeToReplicas):
3270         (WebCore::GraphicsLayerCA::fetchCloneLayers):
3271         * platform/graphics/ca/GraphicsLayerCA.h:
3272
3273 2014-10-10  Chris Dumez  <cdumez@apple.com>
3274
3275         Use is<>() / downcast<>() for RenderBoxModelObject
3276         https://bugs.webkit.org/show_bug.cgi?id=137587
3277
3278         Reviewed by Mihnea Ovidenie.
3279
3280         Use is<>() / downcast<>() for RenderBoxModelObject and clean up the
3281         surrounding code.
3282
3283         No new tests, no behavior change.
3284
3285         * accessibility/AXObjectCache.cpp:
3286         (WebCore::createFromRenderer):
3287         * accessibility/AccessibilityRenderObject.cpp:
3288         (WebCore::AccessibilityRenderObject::renderBoxModelObject):
3289         (WebCore::isInlineWithContinuation):
3290         (WebCore::firstChildConsideringContinuation):
3291         (WebCore::lastChildHasContinuation):
3292         (WebCore::AccessibilityRenderObject::nextSibling):
3293         (WebCore::AccessibilityRenderObject::widget):
3294         (WebCore::AccessibilityRenderObject::renderObjectIsObservable):
3295         (WebCore::AccessibilityRenderObject::observableObject):
3296         (WebCore::msaaRoleForRenderer):
3297         * accessibility/AccessibilityRenderObject.h:
3298         * accessibility/AccessibilityTable.cpp:
3299         (WebCore::AccessibilityTable::isDataTable):
3300         * dom/Node.cpp:
3301         (WebCore::Node::renderBox):
3302         (WebCore::Node::renderBoxModelObject):
3303         * inspector/InspectorOverlay.cpp:
3304         (WebCore::buildObjectForElementInfo):
3305         * page/FrameView.cpp:
3306         (WebCore::FrameView::scrollContentsFastPath):
3307         * page/PrintContext.cpp:
3308         (WebCore::enclosingBoxModelObject):
3309         * page/animation/AnimationBase.cpp:
3310         (WebCore::AnimationBase::freezeAtTime):
3311         * page/animation/ImplicitAnimation.cpp:
3312         (WebCore::ImplicitAnimation::startAnimation):
3313         (WebCore::ImplicitAnimation::pauseAnimation):
3314         (WebCore::ImplicitAnimation::endAnimation):
3315         * page/animation/KeyframeAnimation.cpp:
3316         (WebCore::KeyframeAnimation::startAnimation):
3317         (WebCore::KeyframeAnimation::pauseAnimation):
3318         (WebCore::KeyframeAnimation::endAnimation):
3319         * page/ios/FrameIOS.mm:
3320         (WebCore::Frame::overflowScrollPositionChangedForNode):
3321         * page/scrolling/ScrollingCoordinator.cpp:
3322         (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
3323         * rendering/InlineBox.h:
3324         (WebCore::InlineBox::boxModelObject):
3325         * rendering/InlineElementBox.h:
3326         (WebCore::InlineElementBox::renderer):
3327         * rendering/InlineFlowBox.cpp:
3328         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
3329         * rendering/InlineFlowBox.h:
3330         (WebCore::InlineFlowBox::renderer):
3331         * rendering/InlineTextBox.cpp:
3332         (WebCore::InlineTextBox::baselinePosition):
3333         (WebCore::InlineTextBox::lineHeight):
3334         * rendering/RenderBlock.cpp:
3335         (WebCore::RenderBlock::addChildToContinuation):
3336         * rendering/RenderBox.cpp:
3337         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
3338         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
3339         (WebCore::RenderBox::computePositionedLogicalWidth):
3340         (WebCore::RenderBox::computePositionedLogicalHeight):
3341         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
3342         (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
3343         * rendering/RenderBoxModelObject.h:
3344         * rendering/RenderFlowThread.cpp:
3345         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
3346         * rendering/RenderInline.cpp:
3347         (WebCore::RenderInline::splitInlines):
3348         (WebCore::RenderInline::addChildToContinuation):
3349         * rendering/RenderLayer.cpp:
3350         (WebCore::RenderLayer::updateLayerPosition):
3351         (WebCore::RenderLayer::calculateClipRects):
3352         * rendering/RenderLayerBacking.cpp:
3353         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread):
3354         * rendering/RenderLayerCompositor.cpp:
3355         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
3356         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
3357         * rendering/RenderObject.cpp:
3358         (WebCore::RenderObject::destroy):
3359         (WebCore::RenderObject::offsetParent):
3360         * rendering/mathml/RenderMathMLScripts.cpp:
3361         (WebCore::RenderMathMLScripts::base):
3362
3363 2014-10-10  Zan Dobersek  <zdobersek@igalia.com>
3364
3365         Remove CrossThreadTask
3366         https://bugs.webkit.org/show_bug.cgi?id=137570
3367
3368         Reviewed by Darin Adler.
3369
3370         Replace uses of CrossThreadTask with C++11 lambdas. The initializations
3371         of cross-thread copies are rather verbose at the moment, but should look
3372         better once we can switch to using C++14 init capture for lambdas.
3373
3374         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3375         (WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize):
3376         * WebCore.order:
3377         * WebCore.vcxproj/WebCore.vcxproj:
3378         * WebCore.vcxproj/WebCore.vcxproj.filters:
3379         * WebCore.xcodeproj/project.pbxproj:
3380         * dom/CrossThreadTask.h: Removed.
3381         * loader/WorkerThreadableLoader.cpp:
3382         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
3383         (WebCore::WorkerThreadableLoader::MainThreadBridge::destroy):
3384         (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):
3385         (WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
3386         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
3387         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
3388         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
3389         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
3390         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
3391         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
3392         (WebCore::WorkerThreadableLoader::MainThreadBridge::~MainThreadBridge): Deleted.
3393         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader): Deleted.
3394         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadDestroy): Deleted.
3395         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCancel): Deleted.
3396         (WebCore::workerGlobalScopeDidSendData): Deleted.
3397         (WebCore::workerGlobalScopeDidReceiveResponse): Deleted.
3398         (WebCore::workerGlobalScopeDidReceiveData): Deleted.
3399         (WebCore::workerGlobalScopeDidFinishLoading): Deleted.
3400         (WebCore::workerGlobalScopeDidFail): Deleted.
3401         (WebCore::workerGlobalScopeDidFailAccessControlCheck): Deleted.
3402         (WebCore::workerGlobalScopeDidFailRedirectCheck): Deleted.
3403         * loader/WorkerThreadableLoader.h:
3404         * loader/cache/MemoryCache.cpp:
3405         (WebCore::MemoryCache::removeRequestFromCache):
3406         (WebCore::MemoryCache::removeRequestFromSessionCaches):
3407         (WebCore::MemoryCache::removeRequestFromCacheImpl): Deleted.
3408         (WebCore::MemoryCache::removeRequestFromSessionCachesImpl): Deleted.
3409         (WebCore::MemoryCache::crossThreadRemoveRequestFromCache): Deleted.
3410         (WebCore::MemoryCache::crossThreadRemoveRequestFromSessionCaches): Deleted.
3411         * loader/cache/MemoryCache.h:
3412
3413 2014-10-10  Zan Dobersek  <zdobersek@igalia.com>
3414
3415         Avoid defaulting to capture-by-value for C++11 lambdas in WebCore
3416         https://bugs.webkit.org/show_bug.cgi?id=137565
3417
3418         Reviewed by Darin Adler.
3419
3420         C++11 lambas should avoid defaulting to capturing used variables by value as that
3421         can lead to unintended captures that, in worst cases, result in lambdas that are
3422         not self-contained and end up operating on dangling pointers.
3423
3424         Explicitly stating the variables that are to be copied by value can also serve as
3425         a checklist of variables that are actually intented for use in the lambda body. 
3426
3427         * Modules/quota/StorageErrorCallback.cpp:
3428         (WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
3429         * Modules/webdatabase/Database.cpp:
3430         (WebCore::Database::~Database):
3431         (WebCore::Database::runTransaction):
3432         (WebCore::Database::scheduleTransactionCallback):
3433         * Modules/webdatabase/DatabaseManager.cpp:
3434         (WebCore::DatabaseManager::openDatabase):
3435         * Modules/webdatabase/SQLCallbackWrapper.h:
3436         (WebCore::SQLCallbackWrapper::clear):
3437         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3438         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
3439         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
3440         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
3441         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
3442         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
3443         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
3444         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
3445         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
3446         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3447         (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
3448         (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
3449         (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
3450         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
3451         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
3452         (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
3453         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
3454         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
3455         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
3456         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
3457         (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
3458         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
3459         (WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
3460         (WebCore::WorkerThreadableWebSocketChannel::Bridge::close):
3461         (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
3462         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
3463         (WebCore::WorkerThreadableWebSocketChannel::Bridge::suspend):
3464         (WebCore::WorkerThreadableWebSocketChannel::Bridge::resume):
3465         * bindings/js/JSCallbackData.h:
3466         (WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
3467         * bindings/js/JSDOMGlobalObjectTask.cpp:
3468         (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
3469         * dom/ScriptExecutionContext.h:
3470         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
3471         * dom/StringCallback.cpp:
3472         (WebCore::StringCallback::scheduleCallback):
3473         * fileapi/FileReader.cpp:
3474         (WebCore::FileReader::abort):
3475         * loader/appcache/ApplicationCacheGroup.cpp:
3476         (WebCore::ApplicationCacheGroup::postListenerTask):
3477         * workers/DefaultSharedWorkerRepository.cpp:
3478         (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
3479         (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
3480         (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
3481         * workers/WorkerEventQueue.cpp:
3482         (WebCore::WorkerEventQueue::enqueueEvent):
3483         * workers/WorkerMessagingProxy.cpp:
3484         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
3485         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
3486         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
3487         (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
3488         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
3489         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
3490         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
3491         (WebCore::WorkerMessagingProxy::reportPendingActivity):
3492
3493 2014-10-10  Zan Dobersek  <zdobersek@igalia.com>
3494
3495         Remove MainThreadTask
3496         https://bugs.webkit.org/show_bug.cgi?id=137563
3497
3498         Reviewed by Darin Adler.
3499
3500         Replace the remaining uses of MainThreadTask with C++11 lambdas.
3501         Remove the MainThreadTask header from the build.
3502
3503         * WebCore.order:
3504         * WebCore.vcxproj/WebCore.vcxproj:
3505         * WebCore.vcxproj/WebCore.vcxproj.filters:
3506         * WebCore.xcodeproj/project.pbxproj:
3507         * platform/MainThreadTask.h: Removed.
3508         * platform/network/curl/CurlDownload.cpp:
3509         (WebCore::CurlDownloadManager::downloadThread):
3510         (WebCore::CurlDownload::didReceiveHeader):
3511         (WebCore::CurlDownload::didReceiveData):
3512
3513 2014-10-10  Andrzej Badowski  <a.badowski@samsung.com>
3514
3515         [ATK] Changing the mapping of ARIA rowheader and columnheader into respective ATK roles.
3516         https://bugs.webkit.org/show_bug.cgi?id=136150
3517
3518         Reviewed by Chris Fleizach.
3519
3520         Expose ColumnHeaderRole and RowHeaderRole objects into ATK.
3521
3522         Test: accessibility/table-roles-hierarchy.html
3523
3524         * accessibility/AccessibilityRenderObject.cpp:
3525         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3526         Platforms based on ATK: added distinction of roles for the <th> elements.
3527         * accessibility/AccessibilityTableCell.cpp:
3528         (WebCore::AccessibilityTableCell::determineAccessibilityRole):
3529         Platforms based on ATK: the return value is determined in the ancestor.
3530         * accessibility/atk/AccessibilityObjectAtk.cpp:
3531         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
3532         In addition to CellRole also included ColumnHeaderRole and RowHeaderRole.
3533         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3534         (atkRole):
3535         Changing the mapping of ARIA rowheader and columnheader into respective ATK roles.
3536         (getInterfaceMaskFromObject):
3537         In addition to CellRole also included ColumnHeaderRole and RowHeaderRole.
3538
3539 2014-10-09  Carlos Garcia Campos  <cgarcia@igalia.com>
3540
3541         MediaPlayer should use a reference for the MediaPlayerClient
3542         https://bugs.webkit.org/show_bug.cgi?id=137552
3543
3544         Reviewed by Darin Adler.
3545
3546         The MediaPlayer client is set on constructor by HTMLMediaElement
3547         and cleared on HTMLMediaElement destructor that also frees the
3548         MediaPlayer object. Since the client will never be null while the
3549         MediaPlayer player is alive, we can use a reference and remove all
3550         the unneeded null checks. The member has also been renamed to m_client.
3551
3552         * html/HTMLMediaElement.cpp:
3553         (WebCore::HTMLMediaElement::~HTMLMediaElement):
3554         (WebCore::HTMLMediaElement::parseAttribute):
3555         * platform/graphics/MediaPlayer.cpp:
3556         (WebCore::MediaPlayer::MediaPlayer):
3557         (WebCore::MediaPlayer::~MediaPlayer):
3558         (WebCore::MediaPlayer::loadWithNextMediaEngine):
3559         (WebCore::MediaPlayer::inMediaDocument):
3560         (WebCore::MediaPlayer::currentPlaybackTargetIsWirelessChanged):
3561         (WebCore::MediaPlayer::networkStateChanged):
3562         (WebCore::MediaPlayer::readyStateChanged):
3563         (WebCore::MediaPlayer::volumeChanged):
3564         (WebCore::MediaPlayer::muteChanged):
3565         (WebCore::MediaPlayer::timeChanged):
3566         (WebCore::MediaPlayer::sizeChanged):
3567         (WebCore::MediaPlayer::repaint):
3568         (WebCore::MediaPlayer::durationChanged):
3569         (WebCore::MediaPlayer::rateChanged):
3570         (WebCore::MediaPlayer::playbackStateChanged):
3571         (WebCore::MediaPlayer::firstVideoFrameAvailable):
3572         (WebCore::MediaPlayer::characteristicChanged):
3573         (WebCore::MediaPlayer::keyAdded):
3574         (WebCore::MediaPlayer::keyError):
3575         (WebCore::MediaPlayer::keyMessage):
3576         (WebCore::MediaPlayer::keyNeeded):
3577         (WebCore::MediaPlayer::referrer):
3578         (WebCore::MediaPlayer::userAgent):
3579         (WebCore::MediaPlayer::graphicsDeviceAdapter):
3580         (WebCore::MediaPlayer::cachedResourceLoader):
3581         (WebCore::MediaPlayer::addAudioTrack):
3582         (WebCore::MediaPlayer::removeAudioTrack):
3583         (WebCore::MediaPlayer::addTextTrack):
3584         (WebCore::MediaPlayer::removeTextTrack):
3585         (WebCore::MediaPlayer::addVideoTrack):
3586         (WebCore::MediaPlayer::removeVideoTrack):
3587         (WebCore::MediaPlayer::outOfBandTrackSources):
3588         (WebCore::MediaPlayer::shouldWaitForResponseToAuthenticationChallenge):
3589         (WebCore::MediaPlayer::handlePlaybackCommand):
3590         (WebCore::MediaPlayer::sourceApplicationIdentifier):
3591         (WebCore::MediaPlayer::doesHaveAttribute):
3592         (WebCore::MediaPlayer::mediaPlayerNetworkInterfaceName):
3593         (WebCore::MediaPlayer::getRawCookies):
3594         (WebCore::MediaPlayer::setWirelessVideoPlaybackDisabled): Deleted.
3595         (WebCore::MediaPlayer::audioSourceProvider): Deleted.
3596         (WebCore::MediaPlayer::engineDescription): Deleted.
3597         (WebCore::MediaPlayer::notifyTrackModeChanged): Deleted.
3598         (WebCore::MediaPlayer::totalFrameDelay): Deleted.
3599         (WebCore::MediaPlayerFactorySupport::callRegisterMediaEngine): Deleted.
3600         * platform/graphics/MediaPlayer.h:
3601         (WebCore::MediaPlayer::create):
3602         (WebCore::MediaPlayer::platformVolumeConfigurationRequired):
3603         (WebCore::MediaPlayer::client):
3604         (WebCore::MediaPlayer::mediaPlayerClient): Deleted.
3605         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3606         (WebCore::MediaPlayerPrivateAVFoundation::preferredRenderingMode):
3607         (WebCore::MediaPlayerPrivateAVFoundation::setUpVideoRendering):
3608         (WebCore::MediaPlayerPrivateAVFoundation::prepareForRendering):
3609         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3610         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
3611         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
3612         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
3613         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3614         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged):
3615         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer):
3616         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer):
3617         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
3618         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
3619         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3620         (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
3621         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
3622         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideoCaps):
3623         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
3624         (WebCore::MediaPlayerPrivateGStreamer::didEnd):
3625         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3626         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
3627         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3628         (webKitWebSrcStart):
3629         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3630         (WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
3631         (WebCore::MediaPlayerPrivateQTKit::setUpVideoRendering):
3632         (WebCore::MediaPlayerPrivateQTKit::prepareForRendering):
3633         (WebCore::MediaPlayerPrivateQTKit::sawUnsupportedTracks):
3634
3635 2014-10-09  Mihnea Ovidenie  <mihnea@adobe.com>
3636
3637         [CSSRegions] Make RenderFlowThread::regionAtBlockOffset const
3638         https://bugs.webkit.org/show_bug.cgi?id=137555
3639
3640         Reviewed by David Hyatt.
3641
3642         Make the method const and remove autoGenerateRegionsToBlockOffset method as it
3643         is not used by region-based multicolumn code. Also removed the RegionAutoGenerationPolicy
3644         parameter in the process and the call sites. Make const some of the methods that call
3645         regionAtBlockOffset.
3646
3647         * rendering/RenderFlowThread.cpp:
3648         (WebCore::RenderFlowThread::regionForCompositedLayer):
3649         (WebCore::RenderFlowThread::regionAtBlockOffset):
3650         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
3651         (WebCore::RenderFlowThread::pageLogicalTopForOffset):
3652         (WebCore::RenderFlowThread::pageLogicalWidthForOffset):
3653         (WebCore::RenderFlowThread::pageLogicalHeightForOffset):
3654         (WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
3655         (WebCore::RenderFlowThread::mapFromFlowToRegion):
3656         (WebCore::RenderFlowThread::computedRegionRangeForBox):
3657         * rendering/RenderFlowThread.h:
3658         * rendering/RenderMultiColumnFlowThread.cpp:
3659         (WebCore::RenderMultiColumnFlowThread::regionAtBlockOffset):
3660         (WebCore::RenderMultiColumnFlowThread::mapFromFlowToRegion):
3661         (WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFlowToRegion):
3662         (WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset): Deleted.
3663         * rendering/RenderMultiColumnFlowThread.h:
3664
3665 2014-10-09  Chris Dumez  <cdumez@apple.com>
3666
3667         Use is<>() / downcast<>() for FontData subclasses
3668         https://bugs.webkit.org/show_bug.cgi?id=137591
3669
3670         Reviewed by Andreas Kling.
3671
3672         Use is<>() / downcast<>() for FontData subclasses.
3673
3674         No new tests, no behavior change.
3675
3676         * platform/graphics/FontData.h:
3677         * platform/graphics/FontGlyphs.cpp:
3678         (WebCore::FontGlyphs::releaseFontData):
3679         (WebCore::FontGlyphs::determinePitch):
3680         * platform/graphics/GlyphPageTreeNode.cpp:
3681         (WebCore::GlyphPageTreeNode::initializePage):
3682         * platform/graphics/SegmentedFontData.h:
3683         (isType):
3684         * platform/graphics/SimpleFontData.h:
3685         (isType):
3686
3687 2014-10-09  Simon Fraser  <simon.fraser@apple.com>
3688
3689         Revert part of r174543 that broke grid layout tests.
3690
3691         * css/CSSComputedStyleDeclaration.cpp:
3692         (WebCore::specifiedValueForGridTrackBreadth):
3693
3694 2014-10-09  Dean Jackson  <dino@apple.com>
3695
3696         Computed style for clip is wrong with respect to auto
3697         https://bugs.webkit.org/show_bug.cgi?id=137567
3698
3699         Reviewed by Simon Fraser.
3700
3701         Make sure that the computed style of clip returns the
3702         correct value when the input is "auto", or in this
3703         case "rect(auto, auto, auto, auto)". Before this
3704         patch it returned "rect(0px, 0px, 0px, 0px)" which
3705         was completely wrong.
3706
3707         Test: fast/css/computed-clip-with-auto-rect.html
3708
3709         * css/CSSComputedStyleDeclaration.cpp:
3710         (WebCore::autoOrZoomAdjustedValue): Helper function to make the correct keyword or length.
3711         (WebCore::specifiedValueForGridTrackBreadth): It can use the helper too.
3712         (WebCore::ComputedStyleExtractor::propertyValue): If the
3713         top/right/bottom/left is "auto", add that identifier
3714         to the output rectangle.
3715
3716 2014-10-09  Chris Dumez  <cdumez@apple.com>
3717
3718         Use RenderObject::firstChildSlow() / lastChildSlow() less
3719         https://bugs.webkit.org/show_bug.cgi?id=137573
3720
3721         Reviewed by Andreas Kling.
3722
3723         Use RenderObject::firstChildSlow() / lastChildSlow() less by using
3724         tighter typing at call sites whenever possible to be able to call the
3725         faster RenderElement::firstChild() / lastChild() instead.
3726
3727         This patch also uses more references instead of pointers when possible.
3728
3729         No new tests, no behavior change.
3730
3731         * accessibility/AccessibilityRenderObject.cpp:
3732         (WebCore::firstChildIsInlineContinuation):
3733         (WebCore::AccessibilityRenderObject::previousSibling):
3734         (WebCore::lastChildHasContinuation):
3735         (WebCore::AccessibilityRenderObject::nextSibling):
3736         * page/FrameView.cpp:
3737         (WebCore::countRenderedCharactersInRenderObjectWithThreshold):
3738         (WebCore::FrameView::renderedCharactersExceed):
3739         * rendering/RenderElement.h:
3740         * rendering/RenderRuby.cpp:
3741         (WebCore::isAnonymousRubyInlineBlock):
3742         (WebCore::isRubyBeforeBlock):
3743         (WebCore::isRubyAfterBlock):
3744         * rendering/svg/RenderSVGInline.h:
3745         * rendering/svg/RenderSVGText.cpp:
3746         (WebCore::RenderSVGText::layout):
3747         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
3748         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextRenderer):
3749         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForForSubtree):
3750         (WebCore::SVGTextLayoutAttributesBuilder::collectTextPositioningElements):
3751         (WebCore::SVGTextLayoutAttributesBuilder::buildCharacterDataMap):
3752         * rendering/svg/SVGTextLayoutAttributesBuilder.h:
3753         * svg/SVGTextPositioningElement.cpp:
3754         (WebCore::SVGTextPositioningElement::elementFromRenderer):
3755         * svg/SVGTextPositioningElement.h:
3756
3757 2014-10-09  Roger Fong  <roger_fong@apple.com>
3758
3759         Build fix for Win EWS bots.
3760
3761         * testing/Internals.idl: Move enum declaration to the top of the file.
3762
3763 2014-10-09  Said Abou-Hallawa  <sabouhallawa@apple.com>
3764
3765         RenderMathMLUnderOver adds spacing to the child operator indefinitely when resizing the window.
3766         https://bugs.webkit.org/show_bug.cgi?id=137330
3767
3768         Reviewed by Darin Adler.
3769
3770         The layout for the <mundercover> math object happens in two separate passes. The first pass runs
3771         the layout for the two children and then calculates the maximum child width.  It then sets the 
3772         stretch size for the math operator child.  And finally it runs the second layout pass by calling
3773         the base class layout() function. The base class function then runs the layout for the children
3774         rendering blocks.  In the operator child function computePreferredLogicalWidths(), the stretch 
3775         size is used to adjust the width (or the height) of the operator. Then it adds the leading and
3776         trailing spaces and the total will be the operator child width.
3777
3778         When resizing or zooming the window, the render objects are just invalidated but marked as 'needs-
3779         Layout'.  The problem is happening because the stretch size of the math operator is not reset
3780         before running the layout.  The old logical width (or height) of the the math operator child which
3781         is equal to the stretch size plus the leading and trailing spaces for is compared with the glyph
3782         size if the old logical width ( or height) is larger, it is set to be the stretch size.  When it
3783         is used again because of invalidation, new leading and trailing spaces are included in the new
3784         logical width.  So with every zooming-in or out or window resizing, new leading and trailing 
3785         spaces are added to the logical width of the math operator child or the math <munderober> object.
3786         
3787         Ensure the stretch size of the math operator render object is reset before running its layout.
3788         Running the layout means either the page is just loaded or it's invalidated which means, no 
3789         layout stall data should be used.
3790
3791         Test: mathml/opentype/munderover-window-resize.html
3792
3793         * rendering/mathml/RenderMathMLOperator.cpp:
3794         (WebCore::RenderMathMLOperator::resetStretchSize):
3795         * rendering/mathml/RenderMathMLOperator.h:
3796         resetStretchSize() sets the stretch size to its original value when the class is created.
3797         * rendering/mathml/RenderMathMLUnderOver.cpp:
3798         (WebCore::RenderMathMLUnderOver::layout):
3799         Make sure the operator stretch size is reset before calling its layout. Also make sure the new 
3800         maximum stretch size to the operator objects that were invalid and needsLayout.
3801
3802 2014-10-09  Dean Jackson  <dino@apple.com>
3803
3804         Remove ENABLE_CSS3_CONDITIONAL_RULES
3805         https://bugs.webkit.org/show_bug.cgi?id=137571
3806
3807         Reviewed by Simon Fraser.
3808
3809         We have good enough support for @supports that
3810         it should be a consistent part of the platform. Remove
3811         the compile-time guard.
3812
3813         * Configurations/FeatureDefines.xcconfig:
3814         * WebCore.exp.in:
3815         * bindings/js/JSCSSRuleCustom.cpp:
3816         (WebCore::toJS):
3817         * bindings/objc/DOMCSS.mm:
3818         (kitClass):
3819         * css/CSSGrammar.y.in:
3820         * css/CSSParser.cpp:
3821         (WebCore::CSSParser::CSSParser):
3822         (WebCore::CSSParser::parseSupportsCondition):
3823         (WebCore::CSSParser::detectAtToken):
3824         (WebCore::CSSParser::detectSupportsToken):
3825         (WebCore::CSSParser::realLex):
3826         * css/CSSParser.h:
3827         * css/CSSRule.h:
3828         * css/CSSRule.idl:
3829         * css/CSSSupportsRule.cpp:
3830         * css/CSSSupportsRule.h:
3831         * css/CSSSupportsRule.idl:
3832         * css/DOMWindowCSS.cpp:
3833         * css/DOMWindowCSS.h:
3834         * css/DOMWindowCSS.idl:
3835         * css/InspectorCSSOMWrappers.cpp:
3836         (WebCore::InspectorCSSOMWrappers::collect):
3837         * css/RuleSet.cpp:
3838         (WebCore::RuleSet::addChildRules):
3839         * css/StyleRule.cpp:
3840         (WebCore::StyleRuleBase::destroy):
3841         (WebCore::StyleRuleBase::copy):
3842         (WebCore::StyleRuleBase::createCSSOMWrapper):
3843         (WebCore::StyleRuleSupports::StyleRuleSupports):
3844         * css/StyleRule.h:
3845         (WebCore::toStyleRuleSupports):
3846         * css/StyleSheetContents.cpp:
3847         (WebCore::childRulesHaveFailedOrCanceledSubresources):
3848         * inspector/InspectorStyleSheet.cpp:
3849         (flattenSourceData):
3850         (WebCore::asCSSRuleList):
3851         * page/DOMWindow.cpp:
3852         (WebCore::DOMWindow::css):
3853         * page/DOMWindow.h:
3854         * page/DOMWindow.idl:
3855
3856 2014-10-09  Benjamin Poulain  <benjamin@webkit.org>
3857
3858         Add the baseline implementation of :not(selectorList)
3859         https://bugs.webkit.org/show_bug.cgi?id=137548
3860
3861         Reviewed by Andreas Kling.
3862
3863         This patch extend the pseudo class :not() to support the new definition
3864         in CSS Selectors level 4.
3865
3866         Instead of supporting a single simple selector, :not() now support
3867         an arbitrary selector list, excepted pseudo elements.
3868
3869         One side effect of this change is :visited and :link are no longer supported
3870         inside :not(). The reason has to do with complexity and performance.
3871         Since :not() and :matches() can have arbitrary selector list, keeping track of
3872         :visited and :link can have many combination superposing, some valid, some invalid.
3873
3874         Supporting :visited and :link should be possible by chaning the way we handle
3875         them for style resolution, but given the limited use cases for such features
3876         I'll wait to see if there is any interest before changing everything.
3877
3878         This patch only covers SelectorChecker to keep things simple. The CSS JIT
3879         will come later.
3880
3881         Tests: fast/css/not-basics.html
3882                fast/css/parsing-css-not-1.html
3883                fast/css/parsing-css-not-2.html
3884                fast/css/parsing-css-not-3.html
3885                fast/css/parsing-css-not-4.html
3886                fast/css/parsing-css-not-5.html
3887                fast/css/parsing-css-not-6.html
3888                fast/css/parsing-css-not-7.html
3889                fast/css/parsing-css-not-8.html
3890                fast/css/parsing-css-not-9.html
3891                fast/css/parsing-css-nth-child-of-4.html
3892                fast/selectors/not-basics.html
3893                fast/selectors/not-nested.html
3894                fast/selectors/not-selector-list.html
3895
3896         * css/CSSGrammar.y.in:
3897         Rename selectorListDoesNotMatchAnyPseudoElement() to selectorListDoesNotMatchAnyPseudoElement()
3898         since both :not() and :nth-child(An+B of selectorList) have the same requirements at the moment. 
3899
3900         * css/CSSParserValues.cpp:
3901         (WebCore::selectorListMatchesPseudoElement):
3902         The patch adding :matches() introduced the possibility of putting pseudo element
3903         arbitrary deep in a sequence of nested :matches(). Since this case is forbidded
3904         by :not() and :nth-child(An+B of selectorList), selectorListMatchesPseudoElement()
3905         now becomes recursive to find those pseudo elements.
3906
3907         * css/CSSSelector.cpp:
3908         (WebCore::CSSSelector::selectorText):
3909         CSSOM for the extended :not().
3910
3911         * css/SelectorChecker.cpp:
3912         (WebCore::SelectorChecker::checkOne):
3913         (WebCore::SelectorChecker::determineLinkMatchType):
3914         * cssjit/SelectorCompiler.cpp:
3915
3916         (WebCore::SelectorCompiler::addPseudoClassType):
3917         Disable the new capabilities from the JIT for now.
3918
3919 2014-10-09  Tim Horton  <timothy_horton@apple.com>
3920
3921         Move ServicesOverlayController to WebCore
3922         https://bugs.webkit.org/show_bug.cgi?id=137416
3923         <rdar://problem/18546283>
3924
3925         Reviewed by Anders Carlsson.
3926
3927         Move ServicesOverlayController from WebKit2 to WebCore, as it can be used by both Legacy WebKit and WebKit2.
3928
3929         * WebCore.xcodeproj/project.pbxproj:
3930         * editing/Editor.cpp:
3931         (WebCore::Editor::scanSelectionForTelephoneNumbers):
3932         * editing/SelectionRectGatherer.cpp:
3933         (WebCore::SelectionRectGatherer::Notifier::~Notifier):
3934         Notify ServicesOverlayController of changes via Page instead of EditorClient.
3935
3936         * page/ChromeClient.h:
3937         (WebCore::ChromeClient::handleTelephoneNumberClick):
3938         (WebCore::ChromeClient::handleSelectionServiceClick):
3939         (WebCore::ChromeClient::hasRelevantSelectionServices):
3940         Add ChromeClient functions for services actions.
3941
3942         * page/EditorClient.h:
3943         (WebCore::EditorClient::selectedTelephoneNumberRangesChanged): Deleted.
3944         (WebCore::EditorClient::selectionRectsDidChange): Deleted.
3945         Remove EditorClient functions for notifying ServicesOverlayController of changes,
3946         because it lives in WebCore proper now.
3947
3948         * page/Page.cpp:
3949         (WebCore::Page::Page):
3950         * page/Page.h:
3951         (WebCore::Page::servicesOverlayController):
3952         Keep a ServicesOverlayController on Page.
3953
3954         * page/PageOverlay.cpp:
3955         (WebCore::PageOverlay::mouseEvent):
3956         Use windowToContents instead of rootViewToContents; events come in in window coordinates.
3957
3958         * page/PageOverlayController.cpp:
3959         (WebCore::PageOverlayController::updateSettingsForLayer):
3960         Get Settings from MainFrame, not Page.
3961
3962         * page/Settings.in:
3963         Add servicesControlsEnabled setting.
3964
3965         * page/mac/ServicesOverlayController.h: Renamed from Source/WebKit2/WebProcess/WebPage/ServicesOverlayController.h.
3966         * page/mac/ServicesOverlayController.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm.
3967         Moved from WebKit2. Mostly mechanical changes, plus:
3968             - Use windowToContents instead of rootViewToContents; events come in in window coordinates.
3969             - Cut off rebuild* if serviceControlsEnabled setting is false
3970             - Don't create the overlay if serviceControlsEnabled setting is false
3971             - Send click events via ChromeClient.
3972             - Tie our lifetime to MainFrame instead of Page, and get lots of things from MainFrame instead.
3973
3974         * platform/Logging.h:
3975         Add Services logging channel (moved from WebKit2).
3976
3977 2014-10-09  Brent Fulgham  <bfulgham@apple.com>
3978
3979         [Win] Unreviewed build fix: Revert r174378
3980
3981         Roll back this change, as it didn't fix the EWS builders, and has only
3982         served to make Windows builds take forever.
3983
3984         * WebCore.vcxproj/WebCoreGenerated.make: Don't delete all generated content
3985         every time we build.
3986
3987 2014-10-09  Chris Dumez  <cdumez@apple.com>
3988
3989         Unreviewed GTK build fix after r174504.
3990
3991         Missing header include.
3992
3993         * rendering/svg/SVGTextQuery.cpp:
3994
3995 2014-10-09  Myles C. Maxfield  <mmaxfield@apple.com>
3996
3997         Remove second-to-last client of WebFontCache
3998         https://bugs.webkit.org/show_bug.cgi?id=137550
3999
4000         Reviewed by Darin Adler.
4001
4002         No new tests because no behavior change.
4003
4004         * WebCore.exp.in:
4005         * platform/graphics/FontCache.h: Allow migration of client to getCachedFontData()
4006
4007 2014-10-09  Chris Dumez  <cdumez@apple.com>
4008
4009         [Mac] Spending too much time mapping desired font families to available ones
4010         https://bugs.webkit.org/show_bug.cgi?id=137539
4011
4012         Reviewed by Darin Adler.
4013
4014         While profiling the load of weather.com, I noticed that we are spending
4015         quite a bit of time trying to map the font family requested to a font
4016         that is available on the system. The process involves:
4017         1. Doing a linear search of all the installed font families and do a
4018            case-insensitive string comparison for each of them until we find a
4019            match,
4020         2. Then, if we don't find a match, do another linear search of the
4021            fonts' postscript names this time and do again a case-insensitive