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