Use is<>() / downcast<>() for list-related render objects
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-10-15  Chris Dumez  <cdumez@apple.com>
2
3         Use is<>() / downcast<>() for list-related render objects
4         https://bugs.webkit.org/show_bug.cgi?id=137764
5
6         Reviewed by Benjamin Poulain.
7
8         Use is<>() / downcast<>() for list-related render objects and clean up
9         the surrounding code.
10
11         No new tests, no behavior change.
12
13         * accessibility/AccessibilityListBox.cpp:
14         (WebCore::AccessibilityListBox::visibleChildren):
15         (WebCore::AccessibilityListBox::elementAccessibilityHitTest):
16         * accessibility/AccessibilityListBoxOption.cpp:
17         (WebCore::AccessibilityListBoxOption::elementRect):
18         * accessibility/AccessibilityObject.cpp:
19         (WebCore::renderListItemContainerForNode):
20         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
21         (getRangeLengthForObject):
22         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
23         (accessibilityObjectLength):
24         (offsetAdjustmentForListItem):
25         (webkitAccessibleTextGetText):
26         * editing/BreakBlockquoteCommand.cpp:
27         (WebCore::BreakBlockquoteCommand::doApply):
28         * html/HTMLLIElement.cpp:
29         (WebCore::HTMLLIElement::didAttachRenderers):
30         (WebCore::HTMLLIElement::parseValue):
31         * html/HTMLSelectElement.cpp:
32         (WebCore::HTMLSelectElement::nextSelectableListIndexPageAway):
33         (WebCore::HTMLSelectElement::scrollToSelection):
34         (WebCore::HTMLSelectElement::setOptionsChangedOnRenderer):
35         (WebCore::HTMLSelectElement::selectOption):
36         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
37         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
38         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
39         * html/HTMLSelectElementWin.cpp:
40         (WebCore::HTMLSelectElement::platformHandleKeydownEvent):
41         * page/mac/EventHandlerMac.mm:
42         (WebCore::EventHandler::platformPrepareForWheelEvents):
43         * rendering/InlineFlowBox.cpp:
44         (WebCore::InlineFlowBox::addToLine):
45         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
46         * rendering/RenderCounter.cpp:
47         (WebCore::planCounter):
48         * rendering/RenderListBox.h:
49         * rendering/RenderListItem.cpp:
50         (WebCore::nextListItem):
51         (WebCore::previousListItem):
52         * rendering/RenderListItem.h:
53         * rendering/RenderListMarker.h:
54         * rendering/RenderMenuList.h:
55         * rendering/RenderTreeAsText.cpp:
56         (WebCore::markerTextForListItem):
57         * rendering/TextAutoSizing.cpp:
58         (WebCore::TextAutoSizingValue::adjustNodeSizes):
59         * rendering/line/BreakingContextInlineHeaders.h:
60         (WebCore::BreakingContext::handleReplaced):
61         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
62         * testing/Internals.cpp:
63         (WebCore::Internals::isSelectPopupVisible):
64
65 2014-10-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
66
67         Use std::unique_ptr for CachedResource
68         https://bugs.webkit.org/show_bug.cgi?id=137736
69
70         Reviewed by Darin Adler.
71
72         No new tests, no behavior change.
73
74         * loader/cache/CachedResource.cpp: Use std::unique_ptr instead of PassOwnPtr|OwnPtr.
75         (WebCore::CachedResource::removeClient):
76         * loader/cache/CachedResource.h: Set ctor from private to public.
77         (WebCore::CachedResource::CachedResourceCallback::schedule):
78
79 2014-10-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
80
81         Move TextCodec classes to std::unique_ptr
82         https://bugs.webkit.org/show_bug.cgi?id=137738
83
84         Reviewed by Darin Adler.
85
86         Replace uses of PassOwnPtr in code under TextCodecFoo class with std::unique_ptr.
87         To do this, ctor of TextCodecFoo classes is changed from private to public. Besides
88         related classes follow this change as well.
89
90         No new tests, no behavior change.
91
92         * html/parser/HTMLMetaCharsetParser.h:
93         * loader/TextResourceDecoder.cpp:
94         (WebCore::TextResourceDecoder::setEncoding):
95         (WebCore::TextResourceDecoder::flush):
96         * loader/TextResourceDecoder.h:
97         * platform/text/TextCodec.h:
98         * platform/text/TextCodecICU.cpp:
99         (WebCore::TextCodecICU::create):
100         * platform/text/TextCodecICU.h:
101         * platform/text/TextCodecLatin1.cpp:
102         (WebCore::newStreamingTextDecoderWindowsLatin1):
103         * platform/text/TextCodecUTF16.cpp:
104         (WebCore::newStreamingTextDecoderUTF16LE):
105         (WebCore::newStreamingTextDecoderUTF16BE):
106         * platform/text/TextCodecUTF8.cpp:
107         (WebCore::TextCodecUTF8::create):
108         * platform/text/TextCodecUTF8.h:
109         * platform/text/TextCodecUserDefined.cpp:
110         (WebCore::newStreamingTextDecoderUserDefined):
111         * platform/text/TextEncodingRegistry.cpp:
112         (WebCore::newTextCodec):
113         * platform/text/TextEncodingRegistry.h:
114         * platform/text/mac/TextCodecMac.cpp:
115         (WebCore::newTextCodecMac):
116
117 2014-10-15  Dean Jackson  <dino@apple.com>
118
119         [Media] Reduce style updates (painting) in controls
120         https://bugs.webkit.org/show_bug.cgi?id=137763
121         <rdar://problem/17833045>
122
123         Reviewed by Simon Fraser.
124
125         Media controls were causing a lot of repaints they were
126         constantly updating the style of the widgets, the value
127         of the forms, or the text in the display.
128
129         This is necessary when the controls are visible, but not
130         necessary when they are hidden. Return immediately in that case.
131
132         * Modules/mediacontrols/mediaControlsApple.js:
133         (Controller.prototype.createControls): Initialise the slider to a zero value.
134         (Controller.prototype.handleDurationChange): Force an update even though we might be hidden.
135         (Controller.prototype.updateProgress): Don't update if we're hidden.
136         (Controller.prototype.updateTime): Ditto.
137         * Modules/mediacontrols/mediaControlsiOS.js:
138         (ControllerIOS.prototype.updateProgress): Ditto.
139
140 2014-10-15  Chris Dumez  <cdumez@apple.com>
141
142         [Mac] Fix inefficiencies in ResourceResponse::platformLazyInit(InitLevel) - Part 2
143         https://bugs.webkit.org/show_bug.cgi?id=137721
144
145         Reviewed by Darin Adler.
146
147         Follow-up patch to r174717 addressing review comments made after the patch landed:
148         - Use modern C++ loop
149         - Remove explicit calls to String(NSString*) constructor
150
151         No new tests, no new tests.
152
153         * platform/network/mac/ResourceResponseMac.mm:
154         (WebCore::ResourceResponse::platformLazyInit):
155
156 2014-10-15  Chris Dumez  <cdumez@apple.com>
157
158         Use is<>() / downcast<>() for InlineBox subclasses
159         https://bugs.webkit.org/show_bug.cgi?id=137749
160
161         Reviewed by Darin Adler.
162
163         Use is<>() / downcast<>() for InlineBox subclasses and clean up the
164         surrounding code.
165
166         No new tests, no behavior change.
167
168         * dom/Position.cpp:
169         (WebCore::Position::upstream):
170         (WebCore::Position::downstream):
171         * editing/VisibleUnits.cpp:
172         (WebCore::wordBreakIteratorForMinOffsetBoundary):
173         (WebCore::wordBreakIteratorForMaxOffsetBoundary):
174         (WebCore::visualWordPosition):
175         (WebCore::startPositionForLine):
176         (WebCore::endPositionForLine):
177         * rendering/InlineBox.cpp:
178         (WebCore::InlineBox::root):
179         (WebCore::InlineBox::nextLeafChild):
180         (WebCore::InlineBox::prevLeafChild):
181         (WebCore::InlineBox::nextLeafChildIgnoringLineBreak):
182         * rendering/InlineBox.h:
183         * rendering/InlineElementBox.h:
184         * rendering/InlineFlowBox.cpp:
185         (WebCore::InlineFlowBox::getFlowSpacingLogicalWidth):
186         (WebCore::InlineFlowBox::addToLine):
187         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
188         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
189         (WebCore::InlineFlowBox::requiresIdeographicBaseline):
190         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
191         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
192         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
193         (WebCore::InlineFlowBox::computeMaxLogicalTop):
194         (WebCore::InlineFlowBox::flipLinesInBlockDirection):
195         (WebCore::InlineFlowBox::computeOverflow):
196         (WebCore::InlineFlowBox::firstLeafChild):
197         (WebCore::InlineFlowBox::lastLeafChild):
198         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
199         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
200         * rendering/InlineFlowBox.h:
201         * rendering/InlineTextBox.h:
202         * rendering/RenderBlockFlow.cpp:
203         (WebCore::RenderBlockFlow::positionForBox):
204         * rendering/RenderBlockFlow.h:
205         (WebCore::RenderBlockFlow::firstRootBox):
206         (WebCore::RenderBlockFlow::lastRootBox):
207         * rendering/RenderBlockLineLayout.cpp:
208         (WebCore::RenderBlockFlow::createLineBoxes):
209         (WebCore::RenderBlockFlow::constructLine):
210         (WebCore::setLogicalWidthForTextRun):
211         (WebCore::computeExpansionForJustifiedText):
212         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
213         (WebCore::RenderBlockFlow::computeBlockDirectionPositionsForLine):
214         (WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns):
215         * rendering/RenderText.cpp:
216         (WebCore::RenderText::localCaretRect):
217         * rendering/RootInlineBox.cpp:
218         (WebCore::RootInlineBox::isHyphenated):
219         (WebCore::RootInlineBox::ascentAndDescentForBox):
220         * rendering/RootInlineBox.h:
221         (WebCore::RootInlineBox::nextRootBox):
222         (WebCore::RootInlineBox::prevRootBox):
223         * rendering/svg/RenderSVGInlineText.cpp:
224         (WebCore::RenderSVGInlineText::localCaretRect):
225         (WebCore::RenderSVGInlineText::positionForPoint):
226         * rendering/svg/RenderSVGText.cpp:
227         (WebCore::RenderSVGText::positionForPoint):
228         * rendering/svg/SVGInlineFlowBox.cpp:
229         (WebCore::SVGInlineFlowBox::paintSelectionBackground):
230         (WebCore::SVGInlineFlowBox::paint):
231         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
232         * rendering/svg/SVGInlineFlowBox.h:
233         * rendering/svg/SVGInlineTextBox.h:
234         * rendering/svg/SVGRenderTreeAsText.cpp:
235         (WebCore::writeRenderSVGTextBox):
236         (WebCore::writeSVGInlineTextBoxes):
237         * rendering/svg/SVGRootInlineBox.cpp:
238         (WebCore::SVGRootInlineBox::paint):
239         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
240         (WebCore::SVGRootInlineBox::layoutChildBoxes):
241         (WebCore::reverseInlineBoxRangeAndValueListsIfNeeded):
242         * rendering/svg/SVGRootInlineBox.h:
243         * rendering/svg/SVGTextQuery.cpp:
244         (WebCore::SVGTextQuery::collectTextBoxesInFlowBox):
245
246 2014-10-15  Roger Fong  <roger_fong@apple.com>
247
248         glReadPixels on NVIDIA cards returns the wrong values for the alpha channel when alpha is off.
249         https://bugs.webkit.org/show_bug.cgi?id=137752.
250         <rdar://problem/15408133>
251
252         Reviewed by Brent Fulgham.
253
254         This change fixed the 1.0.2 conformance test: context/context-attribute-preserve-drawing-buffer.html
255
256         * platform/graphics/GraphicsContext3D.h:
257         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
258         Manually set the alpha channel to 255 when alpha is off on the rendering context.
259
260 2014-10-13  Chris Fleizach  <cfleizach@apple.com>
261
262         AX: Going back is broken for VoiceOver
263         https://bugs.webkit.org/show_bug.cgi?id=137382
264
265         Reviewed by Darin Adler.
266
267         There were two issues preventing VoiceOver from navigating when using page history to go back/forward.
268           1) Existing AXLoadComplete does not get fired when you just move through page history. 
269                There were existing frameLoad notifications used by GTK. I think we should use those which seem more reliable.
270           2) The AccessibilityScrollView cached its children, but on some history page loads, that cache was never cleared out.
271                Rather than trying to find those places to clear out the cache, it's easier to just add the elements to the children
272                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.
273
274         Tests are not possible since they require monitoring notifications across multiple page loads.
275
276         * accessibility/AXObjectCache.h:
277         * accessibility/AccessibilityScrollView.cpp:
278         (WebCore::AccessibilityScrollView::updateChildrenIfNecessary):
279         * accessibility/ios/AXObjectCacheIOS.mm:
280         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
281         * accessibility/mac/AXObjectCacheMac.mm:
282         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
283         * dom/Document.cpp:
284         (WebCore::Document::implicitClose):
285
286 2014-10-15  Simon Fraser  <simon.fraser@apple.com>
287
288         Sometimes can't scroll overflow:scroll areas in subframes
289         https://bugs.webkit.org/show_bug.cgi?id=137746
290         rdar://problem/18603560
291
292         Reviewed by Tim Horton.
293         
294         r169733 introduced a regression which caused us to no longer update the non-fast
295         scrollable region on every layout in subframes, by adding a bogus isMainFrame() check.
296         Revert to the previous code.
297
298         Test: platform/mac-wk2/tiled-drawing/scrolling/frames/scroll-region-after-frame-layout.html
299
300         * page/scrolling/AsyncScrollingCoordinator.cpp:
301         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
302
303 2014-10-15  Chris Dumez  <cdumez@apple.com>
304
305         Use is<>() / downcast<>() for TransformOperation subclasses
306         https://bugs.webkit.org/show_bug.cgi?id=137731
307
308         Reviewed by Darin Adler.
309
310         Use is<>() / downcast<>() for TransformOperation subclasses and clean
311         up the surrounding code.
312
313         No new tests, no behavior change.
314
315         * platform/graphics/GraphicsLayer.cpp:
316         (WebCore::GraphicsLayer::validateTransformOperations):
317         * platform/graphics/ca/GraphicsLayerCA.cpp:
318         (WebCore::getTransformFunctionValue):
319         * platform/graphics/transforms/IdentityTransformOperation.h:
320         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
321         (WebCore::Matrix3DTransformOperation::operator==):
322         * platform/graphics/transforms/Matrix3DTransformOperation.h:
323         * platform/graphics/transforms/MatrixTransformOperation.cpp:
324         (WebCore::MatrixTransformOperation::operator==):
325         (WebCore::MatrixTransformOperation::blend):
326         * platform/graphics/transforms/MatrixTransformOperation.h:
327         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
328         (WebCore::PerspectiveTransformOperation::operator==):
329         (WebCore::PerspectiveTransformOperation::blend):
330         * platform/graphics/transforms/PerspectiveTransformOperation.h:
331         * platform/graphics/transforms/RotateTransformOperation.cpp:
332         (WebCore::RotateTransformOperation::operator==):
333         (WebCore::RotateTransformOperation::blend):
334         * platform/graphics/transforms/RotateTransformOperation.h:
335         * platform/graphics/transforms/ScaleTransformOperation.cpp:
336         (WebCore::ScaleTransformOperation::operator==):
337         (WebCore::ScaleTransformOperation::blend):
338         * platform/graphics/transforms/ScaleTransformOperation.h:
339         * platform/graphics/transforms/SkewTransformOperation.cpp:
340         (WebCore::SkewTransformOperation::operator==):
341         (WebCore::SkewTransformOperation::blend):
342         * platform/graphics/transforms/SkewTransformOperation.h:
343         * platform/graphics/transforms/TransformOperation.h:
344         * platform/graphics/transforms/TranslateTransformOperation.cpp:
345         (WebCore::TranslateTransformOperation::operator==):
346         (WebCore::TranslateTransformOperation::blend):
347         * platform/graphics/transforms/TranslateTransformOperation.h:
348
349 2014-10-15  Chris Dumez  <cdumez@apple.com>
350
351         Use is<>() / downcast<>() for RenderTextControl / RenderTextControlSingleLine
352         https://bugs.webkit.org/show_bug.cgi?id=137727
353
354         Reviewed by Darin Adler.
355
356         Use is<>() / downcast<>() for RenderTextControl / RenderTextControlSingleLine.
357
358         No new tests, no behavior change.
359
360         * accessibility/AccessibilityRenderObject.cpp:
361         (WebCore::AccessibilityRenderObject::selectedText):
362         (WebCore::AccessibilityRenderObject::selectedTextRange):
363         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
364         (WebCore::AccessibilityRenderObject::visiblePositionForIndex):
365         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
366         * editing/TextIterator.cpp:
367         (WebCore::TextIterator::handleReplacedElement):
368         * html/TextFieldInputType.cpp:
369         (WebCore::TextFieldInputType::forwardEvent):
370         * html/shadow/TextControlInnerElements.cpp:
371         (WebCore::TextControlInnerElement::customStyleForRenderer):
372         * page/EventHandler.cpp:
373         (WebCore::EventHandler::capsLockStateMayHaveChanged):
374         * page/ios/FrameIOS.mm:
375         (WebCore::ancestorRespondingToScrollWheelEvents):
376         * rendering/RenderTextControl.h:
377         * rendering/RenderTextControlSingleLine.h:
378         * rendering/SimpleLineLayout.cpp:
379         (WebCore::SimpleLineLayout::canUseFor):
380
381 2014-10-15  Chris Dumez  <cdumez@apple.com>
382
383         Use is<>() / downcast<>() for ClipPathOperation subclasses
384         https://bugs.webkit.org/show_bug.cgi?id=137733
385
386         Reviewed by Mihnea Ovidenie.
387
388         Use is<>() / downcast<>() for ClipPathOperation subclasses.
389
390         No new tests, no behavior change.
391
392         * css/CSSComputedStyleDeclaration.cpp:
393         (WebCore::ComputedStyleExtractor::propertyValue):
394         * css/DeprecatedStyleBuilder.cpp:
395         (WebCore::ApplyPropertyClipPath::applyValue):
396         * rendering/ClipPathOperation.h:
397         * rendering/RenderBlock.cpp:
398         (WebCore::RenderBlock::nodeAtPoint):
399         * rendering/RenderLayer.cpp:
400         (WebCore::RenderLayer::setupClipPath):
401         * rendering/svg/SVGRenderingContext.cpp:
402         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
403
404 2014-10-15  Chris Dumez  <cdumez@apple.com>
405
406         [Mac] Use CFDictionaryContainsKey() in ImageSource::isSizeAvailable()
407         https://bugs.webkit.org/show_bug.cgi?id=137723
408
409         Reviewed by Simon Fraser.
410
411         Use CFDictionaryContainsKey() in ImageSource::isSizeAvailable() instead
412         of CFDictionaryGetValue() as we are not actually interested in the
413         value.
414
415         No new tests, no behavior change.
416
417         * platform/graphics/cg/ImageSourceCG.cpp:
418         (WebCore::ImageSource::isSizeAvailable):
419
420 2014-10-15  Mihnea Ovidenie  <mihnea@adobe.com>
421
422         Use modern loops in subtrees selection code
423         https://bugs.webkit.org/show_bug.cgi?id=137688
424
425         Reviewed by Andreas Kling.
426
427         No new tests as no change in functionality.
428
429         * rendering/RenderView.cpp:
430         (WebCore::RenderView::splitSelectionBetweenSubtrees):
431         (WebCore::RenderView::updateSelectionForSubtrees):
432         (WebCore::RenderView::clearSubtreeSelection):
433         (WebCore::RenderView::applySubtreeSelection):
434         * rendering/RenderView.h:
435
436 2014-10-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
437
438         Clean up unnecessary PassOwnPtr.h inclusion
439         https://bugs.webkit.org/show_bug.cgi?id=137726
440
441         Reviewed by Chris Dumez.
442
443         No new tests, no behavior changes.
444
445         * dom/Document.h: Remove PassOwnPtr.h inclusion.
446         * loader/ResourceBuffer.h: ditto.
447         * loader/cocoa/DiskCacheMonitorCocoa.mm: ditto.
448         * page/scrolling/AxisScrollSnapOffsets.h: ditto.
449         * page/scrolling/ScrollingStateScrollingNode.h: ditto.
450         * platform/ColorChooserClient.h: ditto.
451         * platform/ScrollableArea.cpp: ditto.
452         * platform/ScrollbarThemeClient.h: ditto.
453         * platform/SharedBuffer.cpp: ditto.
454         * platform/Supplementable.h: ditto.
455         * platform/graphics/surfaces/GraphicsSurface.h: ditto.
456         * platform/graphics/surfaces/GraphicsSurfaceToken.h: ditto.
457         * platform/graphics/win/WKCAImageQueue.cpp: ditto.
458         * platform/win/CursorWin.cpp: ditto.
459
460 2014-10-14  Chris Dumez  <cdumez@apple.com>
461
462         Have offsetFromContainer() / offsetFromAncestorContainer() take a RenderElement&
463         https://bugs.webkit.org/show_bug.cgi?id=137728
464
465         Reviewed by Benjamin Poulain.
466
467         Have offsetFromContainer() / offsetFromAncestorContainer() take a RenderElement&
468         instead of a RenderObject*. The argument passed is never null and the type
469         should be a RenderElement as the argument is a container.
470
471         No new tests, no behavior change.
472
473         * editing/htmlediting.cpp:
474         (WebCore::localCaretRectInRendererForCaretPainting):
475         * page/GestureTapHighlighter.cpp:
476         * rendering/RenderBox.cpp:
477         (WebCore::RenderBox::mapLocalToContainer):
478         (WebCore::RenderBox::pushMappingToContainer):
479         (WebCore::RenderBox::offsetFromContainer):
480         (WebCore::RenderBox::computeRectForRepaint):
481         * rendering/RenderBox.h:
482         * rendering/RenderBoxModelObject.cpp:
483         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
484         * rendering/RenderInline.cpp:
485         (WebCore::RenderInline::computeRectForRepaint):
486         (WebCore::RenderInline::offsetFromContainer):
487         (WebCore::RenderInline::mapLocalToContainer):
488         (WebCore::RenderInline::pushMappingToContainer):
489         * rendering/RenderInline.h:
490         * rendering/RenderMultiColumnFlowThread.cpp:
491         (WebCore::RenderMultiColumnFlowThread::offsetFromContainer):
492         * rendering/RenderMultiColumnFlowThread.h:
493         * rendering/RenderNamedFlowFragment.cpp:
494         (WebCore::RenderNamedFlowFragment::offsetFromContainer):
495         * rendering/RenderNamedFlowFragment.h:
496         * rendering/RenderObject.cpp:
497         (WebCore::RenderObject::offsetFromContainer):
498         (WebCore::RenderObject::offsetFromAncestorContainer):
499         * rendering/RenderObject.h:
500         * rendering/RenderTableCell.cpp:
501         (WebCore::RenderTableCell::offsetFromContainer):
502         * rendering/RenderTableCell.h:
503         * rendering/RenderThemeMac.mm:
504         (WebCore::RenderThemeMac::convertToPaintingRect):
505
506 2014-10-14  Jer Noble  <jer.noble@apple.com>
507
508         REGRESSION (r159208): Crash when clicking scrubber after navigating away/back to video
509         https://bugs.webkit.org/show_bug.cgi?id=137715
510
511         Reviewed by Darin Adler.
512
513         Simple null-check of m_player in refreshCachedTime.
514
515         * html/HTMLMediaElement.cpp:
516         (WebCore::HTMLMediaElement::refreshCachedTime):
517
518 2014-10-14  Chris Dumez  <cdumez@apple.com>
519
520         [Mac] Fix inefficiencies in ResourceResponse::platformLazyInit(InitLevel)
521         https://bugs.webkit.org/show_bug.cgi?id=137721
522
523         Reviewed by Geoffrey Garen.
524
525         There were several inefficiencies with the Mac implementation of
526         ResourceResponse::platformLazyInit(InitLevel):
527         1. We end up initializing uncommon fields even if called with
528            'CommonFieldsOnly' initLevel.
529         2. If called with 'AllFields' initLevel (and if currently
530            uninitialized), we end up populating m_httpHeaderFields twice, once
531            with only the common headers, then a second time with ALL the
532            headers. We can skip the common-header case in this case to avoid
533            wasting CPU time.
534
535         This patch addresses both inefficiencies and cleans up the code a
536         little bit to reduce variable scope and to use fast enumeration of
537         header names.
538
539         As a result, we spend almost twice as little time in platformLazyInit()
540         when loading msn.com (~30ms -> ~18ms).
541
542         No new tests, no behavior change.
543
544         * platform/network/mac/ResourceResponseMac.mm:
545         (WebCore::ResourceResponse::platformLazyInit):
546
547 2014-10-14  Zalan Bujtas  <zalan@apple.com>
548
549         REGRESSION (Safari 7.1/8.0): Border-radius and overflow hidden renders incorrectly.
550         https://bugs.webkit.org/show_bug.cgi?id=137205
551
552         Reviewed by Simon Fraser.
553
554         Child layer should not reset radius clipping behaviour.
555
556         Test: fast/layers/parent-clipping-overflow-is-overwritten-by-child-clipping.html
557
558         * rendering/RenderLayer.cpp:
559         (WebCore::RenderLayer::calculateClipRects):
560
561 2014-10-14  Chris Dumez  <cdumez@apple.com>
562
563         Use is<>() / downcast<>() for PlatformCAAnimation subclasses
564         https://bugs.webkit.org/show_bug.cgi?id=137722
565
566         Reviewed by Simon Fraser.
567
568         Use is<>() / downcast<>() for PlatformCAAnimation subclasses and clean
569         up the surrounding code.
570
571         No new tests, no behavior change.
572
573         * page/mac/ServicesOverlayController.mm:
574         (WebCore::ServicesOverlayController::Highlight::fadeIn):
575         (WebCore::ServicesOverlayController::Highlight::fadeOut):
576         * platform/graphics/ca/GraphicsLayerCA.cpp:
577         (WebCore::GraphicsLayerCA::moveOrCopyLayerAnimation):
578         (WebCore::GraphicsLayerCA::updateAnimations):
579         (WebCore::GraphicsLayerCA::setAnimationOnLayer):
580         (WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer):
581         * platform/graphics/ca/GraphicsLayerCA.h:
582         * platform/graphics/ca/PlatformCAAnimation.h:
583         * platform/graphics/ca/PlatformCALayer.h:
584         * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
585         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
586         (PlatformCAAnimationMac::copy):
587         (PlatformCAAnimationMac::copyTimingFunctionFrom):
588         (PlatformCAAnimationMac::copyFromValueFrom):
589         (PlatformCAAnimationMac::copyToValueFrom):
590         (PlatformCAAnimationMac::copyValuesFrom):
591         (PlatformCAAnimationMac::copyKeyTimesFrom):
592         (PlatformCAAnimationMac::copyTimingFunctionsFrom):
593         * platform/graphics/ca/mac/PlatformCALayerMac.h:
594         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
595         (PlatformCALayerMac::addAnimationForKey):
596         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
597         (PlatformCAAnimationWin::copy):
598         (PlatformCAAnimationWin::copyTimingFunctionFrom):
599         (PlatformCAAnimationWin::copyFromValueFrom):
600         (PlatformCAAnimationWin::copyToValueFrom):
601         (PlatformCAAnimationWin::copyValuesFrom):
602         (PlatformCAAnimationWin::copyKeyTimesFrom):
603         (PlatformCAAnimationWin::copyTimingFunctionsFrom):
604         * platform/graphics/ca/win/PlatformCAAnimationWin.h:
605         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
606         (PlatformCALayerWin::addAnimationForKey):
607         * platform/graphics/ca/win/PlatformCALayerWin.h:
608
609 2014-10-14  Chris Dumez  <cdumez@apple.com>
610
611         Use is<>() / downcast<>() for RenderInline
612         https://bugs.webkit.org/show_bug.cgi?id=137704
613
614         Reviewed by Darin Adler.
615
616         Use is<>() / downcast<>() for RenderInline and clean up the surrounding
617         code.
618
619         No new tests, no behavior change.
620
621         * accessibility/AccessibilityRenderObject.cpp:
622         (WebCore::firstChildInContinuation):
623         * editing/SimplifyMarkupCommand.cpp:
624         (WebCore::SimplifyMarkupCommand::doApply):
625         * inspector/InspectorOverlay.cpp:
626         (WebCore::buildRendererHighlight):
627         * page/FrameView.cpp:
628         (WebCore::FrameView::paintContents):
629         * rendering/InlineFlowBox.cpp:
630         (WebCore::InlineFlowBox::removeLineBoxFromRenderObject):
631         (WebCore::InlineFlowBox::extractLineBoxFromRenderObject):
632         (WebCore::InlineFlowBox::attachLineBoxToRenderObject):
633         (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
634         (WebCore::InlineFlowBox::nodeAtPoint):
635         (WebCore::InlineFlowBox::paint):
636         * rendering/InlineIterator.h:
637         (WebCore::bidiFirstSkippingEmptyInlines):
638         * rendering/LayoutState.cpp:
639         (WebCore::LayoutState::LayoutState):
640         * rendering/RenderBlock.cpp:
641         (WebCore::RenderBlock::willBeDestroyed):
642         (WebCore::RenderBlock::paintObject):
643         (WebCore::RenderBlock::inlineElementContinuation):
644         (WebCore::RenderBlock::addFocusRingRects):
645         * rendering/RenderBlockFlow.cpp:
646         (WebCore::RenderBlockFlow::willBeDestroyed):
647         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
648         * rendering/RenderBlockFlow.h:
649         * rendering/RenderBlockLineLayout.cpp:
650         (WebCore::constructBidiRunsForSegment):
651         (WebCore::RenderBlockFlow::layoutLineBoxes):
652         * rendering/RenderBox.cpp:
653         (WebCore::RenderBox::offsetFromContainer):
654         (WebCore::RenderBox::computeRectForRepaint):
655         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
656         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
657         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
658         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
659         (WebCore::RenderBox::layoutOverflowRectForPropagation):
660         * rendering/RenderBoxModelObject.cpp:
661         (WebCore::accumulateInFlowPositionOffsets):
662         * rendering/RenderElement.cpp:
663         (WebCore::RenderElement::willBeRemovedFromTree):
664         * rendering/RenderElement.h:
665         (WebCore::RenderElement::dirtyLinesFromChangedChild):
666         * rendering/RenderFlowThread.cpp:
667         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
668         * rendering/RenderInline.cpp:
669         (WebCore::RenderInline::willBeDestroyed):
670         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
671         (WebCore::RenderInline::clippedOverflowRectForRepaint):
672         * rendering/RenderInline.h:
673         * rendering/RenderLayer.cpp:
674         (WebCore::RenderLayer::updateLayerPosition):
675         (WebCore::RenderLayer::calculateClipRects):
676         * rendering/RenderLineBoxList.cpp:
677         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
678         * rendering/RenderLineBoxList.h:
679         * rendering/RenderNamedFlowThread.cpp:
680         (WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
681         * rendering/RenderObject.cpp:
682         (WebCore::RenderObject::insertedIntoTree):
683         * rendering/RenderRegion.cpp:
684         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
685         (WebCore::RenderRegion::visualOverflowRectForBox):
686         (WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
687         * rendering/RenderRegion.h:
688         * rendering/RenderReplaced.cpp:
689         (WebCore::RenderReplaced::willBeDestroyed):
690         * rendering/RenderTextLineBoxes.cpp:
691         (WebCore::RenderTextLineBoxes::removeAllFromParent):
692         (WebCore::RenderTextLineBoxes::dirtyRange):
693         * rendering/line/BreakingContextInlineHeaders.h:
694         (WebCore::inlineLogicalWidth):
695         (WebCore::BreakingContext::handleEmptyInline):
696         * rendering/line/LineInlineHeaders.h:
697         (WebCore::requiresLineBox):
698         (WebCore::setStaticPositions):
699         * rendering/svg/SVGInlineTextBox.cpp:
700         (WebCore::SVGInlineTextBox::paint):
701
702 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
703
704         [Win] Unreviewed build fix after r174710.
705
706         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
707         (WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
708
709 2014-10-14  Dan Bernstein  <mitz@apple.com>
710
711         URLs that start with http:/// and https:/// lose two slashes when parsed, causing assertion failure and inconsistent behavior
712         https://bugs.webkit.org/show_bug.cgi?id=137718
713
714         Reviewed by Alexey Proskuryakov.
715
716         Added cases to fast/loader/url-parse-1.html.
717
718         * platform/URL.cpp:
719         (WebCore::URL::parse): In hierarchical schemes other than file:, ignore any additional
720         slashes after the ://, as prescribed by the authority-ignore-slashes state in the current
721         URL spec.
722
723 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
724
725         [Win] Unreviewed build fix after r174698 and r174709.
726
727         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
728         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
729         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
730         (WebCore::MediaPlayerPrivateAVFoundationCF::supportsKeySystem):
731         (WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
732         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
733
734 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
735
736         [Win] Unreviewed build fix after r174698
737
738         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
739         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
740         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
741         (WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
742
743 2014-10-14  Myles C. Maxfield  <mmaxfield@apple.com>
744
745         Improve debug description of WAKViews
746         https://bugs.webkit.org/show_bug.cgi?id=137716
747
748         Reviewed by Simon Fraser.
749
750         No new tests because there is no behavior change.
751
752         * platform/ios/wak/WAKView.mm:
753         (-[WAKView description]):
754         * platform/ios/wak/WKView.h:
755         * platform/ios/wak/WKView.mm:
756         (WKViewGetOrigin):
757
758 2014-10-14  Chris Dumez  <cdumez@apple.com>
759
760         Introduce an isCSSAnimated flag on RenderElement for performance
761         https://bugs.webkit.org/show_bug.cgi?id=137583
762
763         Reviewed by Simon Fraser.
764
765         I noticed when profiling the ebay.com page load that isRunningAnimationOnRenderer()
766         and isRunningAcceleratedAnimationOnRenderer() were called frequently, causing
767         ~4.7 millions m_compositeAnimations HashMap lookups.
768
769         This patch introduces an isCSSAnimated flag on RenderElement to return early if
770         there is no animation on the renderer, thus avoiding HashMap lookups. This reduces
771         the number of HashMap lookups from ~4.7 millions to ~68k. On my machine, I see
772         the following performance improvements:
773         - isRunning*AnimationOnRenderer() / computeCompositingRequirements()
774           - before: ~45ms  / ~90ms
775           - after:  ~4ms / ~30ms
776
777         No new tests, no behavior change.
778
779         * page/animation/AnimationController.cpp:
780         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
781         (WebCore::AnimationControllerPrivate::clear):
782         (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
783         (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
784         (WebCore::AnimationController::isRunningAnimationOnRenderer):
785         (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
786         * rendering/RenderElement.cpp:
787         (WebCore::RenderElement::RenderElement):
788         * rendering/RenderElement.h:
789         (WebCore::RenderElement::isCSSAnimating):
790         (WebCore::RenderElement::setIsCSSAnimating):
791
792 2014-10-14  Dean Jackson  <dino@apple.com>
793
794         Crash in WebCore::UserGestureIndicator::processingUserGesture with WebWorkers
795         https://bugs.webkit.org/show_bug.cgi?id=137676
796         <rdar://problem/15735049>
797
798         Reviewed by Alexey Proskuryakov.
799
800         Remove the code I added that tracks the timestamp of the most recent
801         user gesture from the event handling dispatch, as it was both
802         a silly place to do it and it originally crashed when events were fired from
803         Worker threads (although this was fixed in r152238).
804
805         It's now recorded by going through UserGestureIndicator, which is good because
806         it knows when a user has triggered an event. Its constructor now takes
807         a pointer to Document, and updates the timestamp there if necessary.
808
809         Not all UserGestureIndicator instances needed to reset the timestamp; Those did
810         not have to pass along the Document.
811
812         This is untestable due to the fix mentioned above.
813
814         * WebCore.exp.in: Change constructor signature.
815
816         * accessibility/AccessibilityNodeObject.cpp: Pass a pointer to the Document into the UserGestureIndicator.
817         (WebCore::AccessibilityNodeObject::increment):
818         (WebCore::AccessibilityNodeObject::decrement):
819         * accessibility/AccessibilityObject.cpp: Ditto.
820         (WebCore::AccessibilityObject::press):
821
822         * dom/Document.cpp:
823         (WebCore::Document::updateLastHandledUserGestureTimestamp): Renamed.
824         * dom/Document.h:
825
826         * dom/EventTarget.cpp: Remove the code to update the timestamp.
827         (WebCore::EventTarget::fireEventListeners):
828
829         * dom/UserGestureIndicator.cpp:
830         (WebCore::UserGestureIndicator::UserGestureIndicator): If there is a Document and
831         this is a user gesture, then reset the timestamp.
832         * dom/UserGestureIndicator.h:
833
834         * page/EventHandler.cpp: Pass a pointer to the Document.
835         (WebCore::EventHandler::handleMousePressEvent):
836         (WebCore::EventHandler::handleMouseDoubleClickEvent):
837         (WebCore::EventHandler::handleMouseReleaseEvent):
838         (WebCore::EventHandler::keyEvent):
839         (WebCore::EventHandler::handleTouchEvent):
840
841         * rendering/HitTestResult.cpp: Ditto.
842         (WebCore::HitTestResult::toggleMediaFullscreenState):
843         (WebCore::HitTestResult::enterFullscreenForVideo):
844
845 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
846
847         [Win] Unreviewed gardening. Ignore Visual Studio *.sdf files.
848
849         * WebCore.vcxproj: Modified property svn:ignore.
850
851 2014-10-14  Brent Fulgham  <bfulgham@apple.com>
852
853         [Win] Enable Encrypted Media Support
854         https://bugs.webkit.org/show_bug.cgi?id=137710
855         <rdar://problem/18652699>
856
857         Reviewed by Jer Noble.
858
859         This feature is covered by existing media tests.
860
861         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
862         (WebCore::destroyAVFWrapper): Remove redundant ASSERT.
863         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
864         (displayOnMainThreadContext::displayOnMainThreadContext): Added.
865         (redispatchOnMainQueue): Added.
866         (PlatformCALayerWinInternal::displayCallback): Check if a display
867         call is happening on a background queue, and re-dispatch on the
868         main thread if necessary.
869
870 2014-10-14  Chris Dumez  <cdumez@apple.com>
871
872         [Mac] Avoid unnecessary dictionary lookup in ImageSource::isSizeAvailable()
873         https://bugs.webkit.org/show_bug.cgi?id=137701
874
875         Reviewed by Simon Fraser.
876
877         The CG implementation of ImageSource::isSizeAvailable() was looking up
878         both the width and the height keys in the dictionary before determining
879         if the size is available. We can abort early and return false if the
880         first key (the width) is missing, thus avoiding an extra dictionary
881         lookup in this case.
882
883         This is a small win but ImageSource::isSizeAvailable() is called quite
884         frequently during page loads
885
886         No new tests, no behavior change.
887
888         * platform/graphics/cg/ImageSourceCG.cpp:
889         (WebCore::ImageSource::isSizeAvailable):
890
891 2014-10-14  Myles C. Maxfield  <mmaxfield@apple.com>
892
893         Remove unnecessary logging from SimpleFontData
894         https://bugs.webkit.org/show_bug.cgi?id=137699
895
896         Reviewed by Andreas Kling.
897
898         Because of web fonts, fonts that don't have a glyph page 0 are common and expected. Printing out a
899         message is not helpful, especially if you're not dealing with a font-related piece of WebKit.
900
901         No new tests because there is no behavior change.
902
903         * platform/graphics/SimpleFontData.cpp:
904         (WebCore::SimpleFontData::platformGlyphInit):
905
906 2014-10-14  Martin Hock  <mhock@apple.com>
907
908         Update ViewportConfiguration whenever its size attributes change
909         https://bugs.webkit.org/show_bug.cgi?id=137682
910         rdar://problem/18643655
911
912         Reviewed by Benjamin Poulain.
913
914         * page/ViewportConfiguration.cpp:
915         (WebCore::ViewportConfiguration::setMinimumLayoutSize):
916         (WebCore::ViewportConfiguration::setMinimumLayoutSizeForMinimalUI):
917
918 2014-10-14  Joseph Pecoraro  <pecoraro@apple.com>
919
920         Web Inspector: Processing Instruction Nodes appear poorly in DOM Tree
921         https://bugs.webkit.org/show_bug.cgi?id=137681
922
923         Reviewed by Timothy Hatcher.
924
925         * inspector/InspectorDOMAgent.cpp:
926         (WebCore::InspectorDOMAgent::buildObjectForNode):
927         Include the nodeName, localName, and nodeValue (string data)
928         properties for processing instruction nodes.
929
930 2014-10-14  Chris Dumez  <cdumez@apple.com>
931
932         Use is<>() / downcast<>() for RenderFrame / RenderFrameSet
933         https://bugs.webkit.org/show_bug.cgi?id=137696
934
935         Reviewed by Darin Adler.
936
937         Use is<>() / downcast<>() for RenderFrame / RenderFrameSet.
938
939         No new tests, no behavior change.
940
941         * html/HTMLFrameSetElement.cpp:
942         (WebCore::HTMLFrameSetElement::defaultEventHandler):
943         * rendering/RenderFrame.cpp:
944         (WebCore::RenderFrame::updateFromElement):
945         * rendering/RenderFrame.h:
946         * rendering/RenderFrameSet.cpp:
947         (WebCore::RenderFrameSet::computeEdgeInfo):
948         (WebCore::RenderFrameSet::positionFramesWithFlattening):
949         * rendering/RenderFrameSet.h:
950
951 2014-10-14  Youenn Fablet  <youennf@gmail.com>
952
953         [XHR] Abort method execution when m_loader->cancel() in internalAbort() caused reentry
954         https://bugs.webkit.org/show_bug.cgi?id=126975
955
956         Reviewed by Alexey Proskuryakov.
957
958         Merging https://chromium.googlesource.com/chromium/blink/+/0d75daf2053631518606ae15daaece701a25b2c4
959         Ensuring new test from https://codereview.chromium.org/76133002/ is passing.
960
961         Test: http/tests/xmlhttprequest/reentrant-cancel-abort.html
962
963         * xml/XMLHttpRequest.cpp:
964         (WebCore::XMLHttpRequest::open): exit early if internalAbort asks so
965         (WebCore::XMLHttpRequest::abort): exit early if internalAbort asks so
966         (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)   
967         (WebCore::XMLHttpRequest::didTimeout): exit early if internalAbort asks so
968         * xml/XMLHttpRequest.h:
969
970 2014-10-14  Alejandro G. Castro  <alex@igalia.com>
971
972         Multiple refactors in RenderMathMLOperator
973         https://bugs.webkit.org/show_bug.cgi?id=137611
974
975         Reviewed by Darin Adler.
976
977         The changes include:
978         - Rename m_operator to m_textContent.
979         - Make most of the functions private, we needed to create some
980         public member functions to be able to make the some funtions private
981         and move trailingSpaceError to RenderMathMLOperator.
982         - Fix incorrect capitalization of setOperatorProperties function.
983         - Make all data members private and move them to the end of the
984         class defition.
985
986         No new tests as no change in functionality.
987
988         * rendering/mathml/RenderMathMLOperator.cpp:
989         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
990         (WebCore::RenderMathMLOperator::setOperatorProperties): Renamed,
991         incorrect capitalization
992         (WebCore::RenderMathMLOperator::stretchTo):
993         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
994         (WebCore::RenderMathMLOperator::rebuildTokenContent):
995         (WebCore::RenderMathMLOperator::updateFromElement):
996         (WebCore::RenderMathMLOperator::updateOperatorProperties):
997         (WebCore::RenderMathMLOperator::shouldAllowStretching):
998         (WebCore::RenderMathMLOperator::updateStyle):
999         (WebCore::RenderMathMLOperator::trailingSpaceError):
1000         (WebCore::RenderMathMLOperator::SetOperatorProperties): Deleted.
1001         (WebCore::RenderMathMLOperator::advanceForGlyph): Deleted.
1002         (WebCore::RenderMathMLOperator::updateTokenContent): Deleted.
1003         (WebCore::RenderMathMLOperator::getGlyphAssemblyFallBack): Deleted.
1004         * rendering/mathml/RenderMathMLOperator.h:
1005         (WebCore::RenderMathMLOperator::setLeadingSpace): Added.
1006         (WebCore::RenderMathMLOperator::setTrailingSpace):  Added.
1007         (WebCore::RenderMathMLOperator::textContent): Added.
1008         (WebCore::RenderMathMLOperator::isInvisibleOperator):
1009         * rendering/mathml/RenderMathMLRadicalOperator.cpp:
1010         (WebCore::RenderMathMLRadicalOperator::setOperatorProperties):
1011         Renamed, incorrect capitalization
1012         (WebCore::RenderMathMLRadicalOperator::SetOperatorProperties): Deleted.
1013         (WebCore::RenderMathMLRadicalOperator::trailingSpaceError): Deleted.
1014         * rendering/mathml/RenderMathMLRadicalOperator.h:
1015
1016 2014-10-14  Alejandro G. Castro  <alex@igalia.com>
1017
1018         Changes in the stretchy attribute do not update rendering
1019         https://bugs.webkit.org/show_bug.cgi?id=136883
1020
1021         Reviewed by Darin Adler.
1022
1023         Test: mathml/presentation/mo-stretch-update.html
1024
1025         We need to relayout when a change in the stretchy attribute
1026         happens.
1027
1028         * mathml/MathMLTextElement.cpp:
1029         (WebCore::MathMLTextElement::parseAttribute): Parse the
1030         modifications of the stretchy attribute.
1031         * mathml/MathMLTextElement.h:
1032         * rendering/mathml/RenderMathMLOperator.cpp:
1033         (WebCore::RenderMathMLOperator::setOperatorFlagAndScheduleLayoutIfNeeded):
1034         Add function that receives the value instead of looking for it and
1035         checks if the change should schedule a layout.
1036         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
1037         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttributeValue):
1038         Add function that receives the value instead of looking for it.
1039         * rendering/mathml/RenderMathMLOperator.h:
1040
1041 2014-10-14  Chris Dumez  <cdumez@apple.com>
1042
1043         Use is<>() / downcast<>() for RenderImage
1044         https://bugs.webkit.org/show_bug.cgi?id=137683
1045
1046         Reviewed by Mihnea Ovidenie.
1047
1048         Use is<>() / downcast<>() for RenderImage.
1049
1050         No new tests, no behavior change.
1051
1052         * accessibility/AccessibilityNodeObject.cpp:
1053         (WebCore::AccessibilityNodeObject::alternativeText):
1054         * accessibility/AccessibilityRenderObject.cpp:
1055         (WebCore::AccessibilityRenderObject::addImageMapChildren):
1056         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
1057         * bindings/objc/DOM.mm:
1058         (-[DOMElement image]):
1059         (-[DOMElement _imageTIFFRepresentation]):
1060         * editing/TextIterator.cpp:
1061         (WebCore::TextIterator::handleReplacedElement):
1062         * editing/cocoa/HTMLConverter.mm:
1063         (fileWrapperForElement):
1064         * editing/gtk/EditorGtk.cpp:
1065         (WebCore::getImageForElement):
1066         * editing/ios/EditorIOS.mm:
1067         (WebCore::getImage):
1068         * editing/mac/EditorMac.mm:
1069         (WebCore::getImage):
1070         * html/HTMLAnchorElement.cpp:
1071         (WebCore::appendServerMapMousePosition):
1072         * html/HTMLAreaElement.cpp:
1073         (WebCore::HTMLAreaElement::setFocus):
1074         * html/HTMLImageElement.cpp:
1075         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
1076         (WebCore::HTMLImageElement::parseAttribute):
1077         (WebCore::HTMLImageElement::didAttachRenderers):
1078         (WebCore::HTMLImageElement::createImageControls):
1079         (WebCore::HTMLImageElement::destroyImageControls):
1080         * html/HTMLVideoElement.cpp:
1081         (WebCore::HTMLVideoElement::didAttachRenderers):
1082         (WebCore::HTMLVideoElement::parseAttribute):
1083         * html/ImageInputType.cpp:
1084         (WebCore::ImageInputType::altAttributeChanged):
1085         (WebCore::ImageInputType::attach):
1086         * html/canvas/CanvasRenderingContext2D.cpp:
1087         (WebCore::size):
1088         * html/shadow/mac/ImageControlsRootElementMac.cpp:
1089         (WebCore::RenderImageControls::updateLogicalWidth):
1090         (WebCore::RenderImageControls::computeLogicalHeight):
1091         * loader/ImageLoader.cpp:
1092         (WebCore::ImageLoader::renderImageResource):
1093         * page/ContextMenuController.cpp:
1094         (WebCore::imageFromImageElementNode):
1095         * page/DragController.cpp:
1096         (WebCore::getCachedImage):
1097         (WebCore::getImage):
1098         * platform/win/PasteboardWin.cpp:
1099         (WebCore::Pasteboard::writeImage):
1100         (WebCore::getCachedImage):
1101         * rendering/HitTestResult.cpp:
1102         (WebCore::HitTestResult::image):
1103         * rendering/RenderImage.h:
1104         * rendering/RenderImageResource.cpp:
1105         (WebCore::RenderImageResource::getImageSize):
1106         * rendering/RenderLayerBacking.cpp:
1107         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
1108         (WebCore::RenderLayerBacking::updateImageContents):
1109         * rendering/RenderReplaced.cpp:
1110         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
1111         * rendering/shapes/ShapeOutsideInfo.cpp:
1112         (WebCore::ShapeOutsideInfo::createShapeForImage):
1113
1114 2014-10-14  Andrzej Badowski  <a.badowski@samsung.com>
1115
1116         [AX] Improve AccessibilityTableCell columnHeaders and rowHeaders functions.
1117         https://bugs.webkit.org/show_bug.cgi?id=136818
1118
1119         Reviewed by Chris Fleizach.
1120
1121         Take into account that <th> elements can be both the column headers and row headers 
1122         improved the operation of two functions: columnHeaders and rowHeaders.
1123
1124         Test: accessibility/table-headers.html
1125
1126         * accessibility/AccessibilityTableCell.cpp:
1127         (WebCore::AccessibilityTableCell::isColumnHeaderCell):
1128         A new function that helps the main goal.
1129         (WebCore::AccessibilityTableCell::isRowHeaderCell):
1130         A new function that helps the main goal.
1131         (WebCore::AccessibilityTableCell::columnHeaders):
1132         Use isColumnHeaderCell instead of isTableHeaderCell.
1133         (WebCore::AccessibilityTableCell::rowHeaders):
1134         Use isRowHeaderCell also includes <th> row header element next to the scope attribute.
1135         * accessibility/AccessibilityTableCell.h:
1136         Adds new functions to the header file.
1137
1138 2014-10-14  Csaba Osztrogon√°c  <ossy@webkit.org>
1139
1140         Fix the !ENABLE(VIDEO) build after r174353
1141         https://bugs.webkit.org/show_bug.cgi?id=137655
1142
1143         Reviewed by Darin Adler.
1144
1145         * dom/Document.cpp:
1146         * dom/Document.h:
1147         * page/Page.cpp:
1148         * page/Page.h:
1149
1150 2014-10-14  peavo@outlook.com  <peavo@outlook.com>
1151
1152         [Curl] Compile error in CurlDownload.cpp.
1153         https://bugs.webkit.org/show_bug.cgi?id=137654
1154
1155         Reviewed by Philippe Normand.
1156
1157         A template specialization is not needed anymore.
1158
1159         * platform/network/curl/CurlDownload.cpp:
1160
1161 2014-10-13  Joseph Pecoraro  <pecoraro@apple.com>
1162
1163         Web Inspector: Remove unused stale Page protocol methods
1164         https://bugs.webkit.org/show_bug.cgi?id=137678
1165
1166         Reviewed by Andreas Kling.
1167
1168         * inspector/InspectorClient.h:
1169         (WebCore::InspectorClient::canShowDebugBorders): Deleted.
1170         (WebCore::InspectorClient::setShowDebugBorders): Deleted.
1171         (WebCore::InspectorClient::canShowFPSCounter): Deleted.
1172         (WebCore::InspectorClient::setShowFPSCounter): Deleted.
1173         (WebCore::InspectorClient::canContinuouslyPaint): Deleted.
1174         (WebCore::InspectorClient::setContinuousPaintingEnabled): Deleted.
1175         * inspector/InspectorPageAgent.cpp:
1176         (WebCore::InspectorPageAgent::disable):
1177         (WebCore::InspectorPageAgent::canShowDebugBorders): Deleted.
1178         (WebCore::InspectorPageAgent::setShowDebugBorders): Deleted.
1179         (WebCore::InspectorPageAgent::canShowFPSCounter): Deleted.
1180         (WebCore::InspectorPageAgent::setShowFPSCounter): Deleted.
1181         (WebCore::InspectorPageAgent::canContinuouslyPaint): Deleted.
1182         (WebCore::InspectorPageAgent::setContinuousPaintingEnabled): Deleted.
1183         * inspector/InspectorPageAgent.h:
1184         * inspector/protocol/Page.json:
1185
1186 2014-10-13  Eric Carlson  <eric.carlson@apple.com>
1187
1188         [iOS] Refactor AirPlay monitoring code
1189         https://bugs.webkit.org/show_bug.cgi?id=137645
1190         <rdar://problem/18444817>
1191
1192         Reviewed by Jer Noble.
1193
1194         Refactor AirPlay route change monitoring code:
1195         + Have MediaSessionManager register/unregister for route changes depending on the state of
1196             all sessions so it does the right thing when there is more than one media element.
1197         + Make HTMLMediaElement unregister with MediaSession as soon as the media player is cleared
1198             because there can be no wireless playback without a player.
1199
1200         * html/HTMLMediaElement.cpp:
1201         (WebCore::HTMLMediaElement::~HTMLMediaElement): Call mediaSession->setHasPlaybackTargetAvailabilityListeners
1202             when there are target availability changed listeners.
1203         (WebCore::HTMLMediaElement::clearMediaPlayer): Ditto.
1204         (WebCore::HTMLMediaElement::wirelessRoutesAvailableDidChange): New, media session client method.
1205         * html/HTMLMediaElement.h:
1206
1207         * html/HTMLMediaSession.cpp:
1208         (WebCore::HTMLMediaSession::HTMLMediaSession): Initialize m_hasPlaybackTargetAvailabilityListeners.
1209         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners): Remember whether or not
1210             the client has a target availability listener and tell the media session manager to reconfigure
1211             itself instead of telling it to start or stop listening for route changes so it does the 
1212             right thing when there is more than one media element.
1213         * html/HTMLMediaSession.h:
1214         (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): Return true when the client 
1215             has a target availability listener, false otherwise.
1216
1217         * platform/audio/MediaSession.cpp:
1218         (WebCore::MediaSession::wirelessRoutesAvailableDidChange): Inform the client that routes have changed.
1219         * platform/audio/MediaSession.h:
1220         (WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring):
1221         (WebCore::MediaSessionClient::wirelessRoutesAvailableDidChange):
1222
1223         * platform/audio/MediaSessionManager.cpp:
1224         (WebCore::MediaSessionManager::wirelessRoutesAvailableChanged): Implement it.
1225         * platform/audio/MediaSessionManager.h:
1226         (WebCore::MediaSessionManager::configureWireLessTargetMonitoring):
1227         (WebCore::MediaSessionManager::hasWirelessTargetsAvailable):
1228         (WebCore::MediaSessionManager::sessions):
1229         (WebCore::MediaSessionManager::startMonitoringAirPlayRoutes): Deleted.
1230         (WebCore::MediaSessionManager::stopMonitoringAirPlayRoutes): Deleted.
1231
1232         * platform/audio/ios/MediaSessionManagerIOS.h:
1233         * platform/audio/ios/MediaSessionManagerIOS.mm:
1234         (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Start or stop monitoring
1235             for route changes depending on client state.
1236         (WebCore::MediaSessionManageriOS::startMonitoringAirPlayRoutes): Deleted.
1237         (WebCore::MediaSessionManageriOS::stopMonitoringAirPlayRoutes): Deleted.
1238
1239 2014-10-13  Chris Dumez  <cdumez@apple.com>
1240
1241         [Mac] Return value of createImageSourceOptions() is leaked in ImageSourceCG
1242         https://bugs.webkit.org/show_bug.cgi?id=137677
1243
1244         Reviewed by Simon Fraser.
1245
1246         The return value of createImageSourceOptions() was leaked in
1247         ImageSourceCG.cpp. It was returning a CFDictionaryRef created using
1248         CFDictionaryCreate(). Therefore, the return value should have been
1249         released but wasn't.
1250
1251         This patch makes createImageSourceOptions() return a
1252         RetainPtr<CFDictionaryRef> to make sure the CFDictionaryRef properly
1253         gets released after use.
1254
1255         No new tests, no behavior change.
1256
1257         * platform/graphics/cg/ImageSourceCG.cpp:
1258         (WebCore::createImageSourceOptions):
1259         (WebCore::imageSourceOptions):
1260         (WebCore::ImageSource::isSizeAvailable):
1261         (WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
1262         (WebCore::ImageSource::frameSizeAtIndex):
1263         (WebCore::ImageSource::orientationAtIndex):
1264         (WebCore::ImageSource::getHotSpot):
1265         (WebCore::ImageSource::repetitionCount):
1266         (WebCore::ImageSource::createFrameAtIndex):
1267         (WebCore::ImageSource::frameDurationAtIndex):
1268
1269 2014-10-13  Yusuke Suzuki  <utatane.tea@gmail.com>
1270
1271         CSS JIT: Implement :visited pseudo class
1272         https://bugs.webkit.org/show_bug.cgi?id=135293
1273
1274         Reviewed by Benjamin Poulain.
1275
1276         This patch implements CSS JIT for :visited. And it makes :not(:link) JIT-ed.
1277         Following the design discussed at the other bug[1], implemented :visited JIT
1278         without tracking VisitedMatchEnabled state.
1279
1280         In this patch, we change the semantics of :visited / :link
1281         inside functional pseudo classes for further CSS Selector Level 4 extensions.
1282
1283         Edge cases are tested by the existing tests.
1284         :not(:link)
1285             fast/history/link-inside-not.html
1286         :not(:visited)
1287             fast/history/visited-inside-not.html
1288         :-webkit-any(:link)
1289             fast/history/link-inside-any.html
1290         :-webkit-any(:visited)
1291             fast/history/visited-inside-any.html
1292
1293         [1]: https://bugs.webkit.org/show_bug.cgi?id=135639
1294
1295         Test: fast/history/link-inside-not-inside-any.html
1296             To cover the :-webkit-any(:not(:link)), added new tests.
1297
1298         * css/SelectorChecker.cpp:
1299         (WebCore::SelectorChecker::checkOne):
1300         * cssjit/SelectorCompiler.cpp:
1301         (WebCore::SelectorCompiler::addPseudoClassType):
1302         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
1303         (WebCore::SelectorCompiler::constructFragments):
1304         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1305         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorCheckerExcludingPseudoElements):
1306         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRightmostTreeWalker):
1307         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
1308         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
1309         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstLink):
1310         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateStoreLastVisitedElement):
1311
1312 2014-10-13  Chris Dumez  <cdumez@apple.com>
1313
1314         Use modern loops in RenderLayerCompositor
1315         https://bugs.webkit.org/show_bug.cgi?id=137670
1316
1317         Reviewed by Simon Fraser.
1318
1319         Use modern range for-loops in RenderLayerCompositor.
1320
1321         No new tests, no behavior change.
1322
1323         * rendering/RenderLayerCompositor.cpp:
1324         (WebCore::OverlapMapContainer::overlapsLayers):
1325         (WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects):
1326         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush):
1327         (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
1328         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
1329         (WebCore::RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed):
1330         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1331         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
1332         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTreeForNamedFlowFixed):
1333         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1334         (WebCore::RenderLayerCompositor::rebuildRegionCompositingLayerTree):
1335         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
1336         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
1337         (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
1338         (WebCore::resetTrackedRepaintRectsRecursive):
1339         (WebCore::RenderLayerCompositor::layerHas3DContent):
1340         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
1341         (WebCore::RenderLayerCompositor::registerAllScrollingLayers):
1342         (WebCore::RenderLayerCompositor::unregisterAllScrollingLayers):
1343
1344 2014-10-13  Chris Dumez  <cdumez@apple.com>
1345
1346         Drop unnecessary overlapMap null checks in computeCompositingRequirements()
1347         https://bugs.webkit.org/show_bug.cgi?id=137668
1348
1349         Reviewed by Andreas Kling.
1350
1351         Drop unnecessary overlapMap null checks in computeCompositingRequirements().
1352         The function is never called with a null overlapMap so we can make the
1353         argument a reference and drop all the null checks.
1354
1355         No new tests, no behavior change.
1356
1357         * rendering/RenderLayerCompositor.cpp:
1358         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1359         (WebCore::RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed):
1360         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1361         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
1362         * rendering/RenderLayerCompositor.h:
1363
1364 2014-10-13  Chris Dumez  <cdumez@apple.com>
1365
1366         Use is<>() / downcast<>() for PlatformCALayer subclasses
1367         https://bugs.webkit.org/show_bug.cgi?id=137661
1368
1369         Reviewed by Simon Fraser.
1370
1371         Use is<>() / downcast<>() for PlatformCALayer subclasses and clean up
1372         the surrounding code.
1373
1374         No new tests, no behavior change.
1375
1376         * platform/graphics/ca/GraphicsLayerCA.cpp:
1377         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
1378         (WebCore::GraphicsLayerCA::updateContentsRects):
1379         (WebCore::GraphicsLayerCA::updateReplicatedLayers):
1380         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
1381         (WebCore::GraphicsLayerCA::fetchCloneLayers): Deleted.
1382         * platform/graphics/ca/PlatformCALayer.h:
1383         * platform/graphics/ca/TileCoverageMap.cpp:
1384         (WebCore::TileCoverageMap::TileCoverageMap):
1385         * platform/graphics/ca/TileGrid.cpp:
1386         (WebCore::TileGrid::ensureTilesForRect):
1387         * platform/graphics/ca/mac/PlatformCALayerMac.h:
1388         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1389         (PlatformCALayerMac::clone):
1390         (PlatformCALayerMac::appendSublayer):
1391         (PlatformCALayerMac::insertSublayer):
1392         (PlatformCALayerMac::replaceSublayer):
1393         (PlatformCALayerMac::adoptSublayers):
1394         (PlatformCALayerMac::copyFiltersFrom):
1395         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1396         (WebCore::CACFLayerTreeHost::setRootChildLayer):
1397         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1398         (PlatformCALayerWin::clone):
1399         (PlatformCALayerWin::rootLayer):
1400         (PlatformCALayerWin::appendSublayer):
1401         (PlatformCALayerWin::insertSublayer):
1402         (PlatformCALayerWin::replaceSublayer):
1403         (PlatformCALayerWin::adoptSublayers):
1404         (PlatformCALayerWin::copyFiltersFrom):
1405         * platform/graphics/ca/win/PlatformCALayerWin.h:
1406         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
1407         (PlatformCALayerWinInternal::insertSublayer):
1408         * platform/graphics/ca/win/PlatformCALayerWinInternal.h:
1409
1410 2014-10-13  Chris Dumez  <cdumez@apple.com>
1411
1412         Use is<>() / downcast<>() for Filter / FilterOperation subclasses
1413         https://bugs.webkit.org/show_bug.cgi?id=137644
1414
1415         Reviewed by Darin Adler.
1416
1417         Use is<>() / downcast<>() for Filter / FilterOperation subclasses.
1418
1419         No new tests, no behavior change.
1420
1421         * css/CSSComputedStyleDeclaration.cpp:
1422         (WebCore::ComputedStyleExtractor::valueForFilter):
1423         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
1424         (PlatformCAFilters::filterValueForOperation):
1425         (PlatformCAFilters::colorMatrixValueForFilter):
1426         * platform/graphics/filters/Filter.h:
1427         * platform/graphics/filters/FilterOperation.cpp:
1428         (WebCore::DefaultFilterOperation::operator==):
1429         (WebCore::ReferenceFilterOperation::operator==):
1430         (WebCore::BasicColorMatrixFilterOperation::blend):
1431         (WebCore::BasicColorMatrixFilterOperation::operator==):
1432         (WebCore::BasicComponentTransferFilterOperation::blend):
1433         (WebCore::BasicComponentTransferFilterOperation::operator==):
1434         (WebCore::BlurFilterOperation::operator==):
1435         (WebCore::BlurFilterOperation::blend):
1436         (WebCore::DropShadowFilterOperation::operator==):
1437         (WebCore::DropShadowFilterOperation::blend):
1438         * platform/graphics/filters/FilterOperation.h:
1439         * platform/graphics/filters/FilterOperations.cpp:
1440         (WebCore::FilterOperations::outsets):
1441         * rendering/FilterEffectRenderer.cpp:
1442         (WebCore::FilterEffectRenderer::build):
1443         * rendering/RenderLayerFilterInfo.cpp:
1444         (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
1445         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
1446         (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
1447         * svg/graphics/filters/SVGFilter.h:
1448         (isType):
1449
1450 2014-10-13  Chris Dumez  <cdumez@apple.com>
1451
1452         Use is<>() / downcast<>() for Table render objects
1453         https://bugs.webkit.org/show_bug.cgi?id=137641
1454
1455         Reviewed by Mihnea Ovidenie.
1456
1457         Use is<>() / downcast<>() for table-related render objects and clean
1458         up the surrounding code.
1459
1460         No new tests, no behavior change.
1461
1462         * accessibility/AccessibilityARIAGrid.cpp:
1463         (WebCore::AccessibilityARIAGrid::addChildren):
1464         * accessibility/AccessibilityTable.cpp:
1465         (WebCore::AccessibilityTable::tableElement):
1466         (WebCore::AccessibilityTable::isDataTable):
1467         (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
1468         (WebCore::AccessibilityTable::addChildren):
1469         * accessibility/AccessibilityTableCell.cpp:
1470         (WebCore::AccessibilityTableCell::parentTable):
1471         (WebCore::AccessibilityTableCell::rowIndexRange):
1472         (WebCore::AccessibilityTableCell::columnIndexRange):
1473         (WebCore::AccessibilityTableCell::titleUIElement):
1474         * accessibility/AccessibilityTableColumn.cpp:
1475         (WebCore::AccessibilityTableColumn::headerObject):
1476         * editing/DeleteSelectionCommand.cpp:
1477         (WebCore::DeleteSelectionCommand::removeNode):
1478         * editing/TextIterator.cpp:
1479         (WebCore::shouldEmitTabBeforeNode):
1480         (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
1481         * html/HTMLTableCellElement.cpp:
1482         (WebCore::HTMLTableCellElement::parseAttribute):
1483         (WebCore::HTMLTableCellElement::cellAbove):
1484         * html/HTMLTableColElement.cpp:
1485         (WebCore::HTMLTableColElement::parseAttribute):
1486         * mathml/MathMLElement.cpp:
1487         (WebCore::MathMLElement::parseAttribute):
1488         * rendering/AutoTableLayout.cpp:
1489         (WebCore::AutoTableLayout::recalcColumn):
1490         (WebCore::shouldScaleColumns):
1491         * rendering/RenderBlockFlow.cpp:
1492         (WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths):
1493         * rendering/RenderBox.cpp:
1494         (WebCore::RenderBox::computePercentageLogicalHeight):
1495         (WebCore::RenderBox::layoutOverflowRectForPropagation):
1496         * rendering/RenderElement.cpp:
1497         (WebCore::RenderElement::addChild):
1498         * rendering/RenderLayer.cpp:
1499         (WebCore::RenderLayer::calculateClipRects):
1500         * rendering/RenderTable.cpp:
1501         (WebCore::RenderTable::addChild):
1502         (WebCore::RenderTable::layout):
1503         (WebCore::RenderTable::firstColumn):
1504         (WebCore::RenderTable::recalcSections):
1505         (WebCore::RenderTable::sectionAbove):
1506         (WebCore::RenderTable::sectionBelow):
1507         (WebCore::RenderTable::bottomSection):
1508         * rendering/RenderTable.h:
1509         * rendering/RenderTableCaption.cpp:
1510         (WebCore::RenderTableCaption::table):
1511         * rendering/RenderTableCell.h:
1512         (WebCore::RenderTableCell::nextCell):
1513         (WebCore::RenderTableCell::previousCell):
1514         (WebCore::RenderTableRow::firstCell):
1515         (WebCore::RenderTableRow::lastCell):
1516         * rendering/RenderTableCol.cpp:
1517         (WebCore::RenderTableCol::table):
1518         (WebCore::RenderTableCol::enclosingColumnGroup):
1519         (WebCore::RenderTableCol::nextColumn):
1520         * rendering/RenderTableCol.h:
1521         Make updateFromElement() public to allow the callers to use tighter
1522         typing and devitualize the call as the class is final.
1523
1524         * rendering/RenderTableRow.cpp:
1525         (WebCore::RenderTableRow::addChild):
1526         * rendering/RenderTableRow.h:
1527         (WebCore::RenderTableSection::firstRow):
1528         (WebCore::RenderTableSection::lastRow):
1529         (WebCore::RenderTableRow::nextRow):
1530         (WebCore::RenderTableRow::previousRow):
1531         * rendering/RenderTableSection.cpp:
1532         (WebCore::RenderTableSection::addChild):
1533         (WebCore::RenderTableSection::layoutRows):
1534         (WebCore::RenderTableSection::paintCell):
1535         * rendering/RenderTableSection.h:
1536         * rendering/RenderTreeAsText.cpp:
1537         (WebCore::writeTextRun):
1538         (WebCore::writeSimpleLine):
1539
1540 2014-10-08  Jer Noble  <jer.noble@apple.com>
1541
1542         MediaPlayer::characteristicChanged() is not called when new tracks are found in SourceBufferPrivateAVFObjC
1543         https://bugs.webkit.org/show_bug.cgi?id=137533
1544
1545         Reviewed by Darin Adler.
1546
1547         When a new AVAsset is returned out of the AVStreamDataParser, notify the HTMLMediaElement that
1548         characteristics of the player may have changed.
1549
1550         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1551         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1552         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::characteristicsChanged):
1553         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1554         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
1555
1556 2014-10-13  Jer Noble  <jer.noble@apple.com>
1557
1558         [iOS] Stop listening for wireless playback target availability when the default controls are hidden.
1559         https://bugs.webkit.org/show_bug.cgi?id=137633
1560
1561         Reviewed by Dean Jackson.
1562
1563         In order to minimize the excess bandwidth and power consumption required for actively listening
1564         for wireless playback target availablity, unregister for those notifications while the controls
1565         are hidden due to playback, or when the element's document is hidden.
1566
1567         * Modules/mediacontrols/mediaControlsiOS.js:
1568         (ControllerIOS.prototype.createBase): Register for document visiblity change notfications.
1569         (ControllerIOS.prototype.setControlsType): Call updateShouldListenForPlaybackTargetAvailabilityEvent()
1570             instead of setShouldListenForPlaybackTargetAvailabilityEvent()
1571         (ControllerIOS.prototype.hideControls): Ditto.
1572         (ControllerIOS.prototype.showControls): Ditto.
1573         (ControllerIOS.prototype.updateStatusDisplay): Ditto.
1574         (ControllerIOS.prototype.handleVisibilityChange): Ditto.
1575         (ControllerIOS.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent): Added. Only listen
1576             for target availability when the video has no errors, is not in the initial "big play button"
1577             controls state, and when the controls are not hidden.
1578         * platform/audio/ios/MediaSessionManagerIOS.mm:
1579         (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Explicitly set the discoveryMode to "disabled"
1580             rather than waiting for the autoreleasepool to destroy our routing controller.
1581
1582 2014-10-13  Simon Fraser  <simon.fraser@apple.com>
1583
1584         iOS DRT snapshots are limited to the page visible area
1585         https://bugs.webkit.org/show_bug.cgi?id=137650
1586
1587         Reviewed by Daniel Bates.
1588
1589         LegacyTileCache drawing was limited to the window's visible area, found by
1590         crawling up the layer hierarchy to the root layer. This caused test snapshots to
1591         be missing non-composited content outside the iPhone visible area, which hinders
1592         testing.
1593         
1594         Fix by adding a test-only mode where the window visible area is the entire window.
1595
1596         * platform/ios/wak/WAKWindow.h:
1597         * platform/ios/wak/WAKWindow.mm:
1598         (-[WAKWindow setEntireWindowVisibleForTesting:]):
1599         (-[WAKWindow _visibleRectRespectingMasksToBounds:]):
1600
1601 2014-10-13  Mihnea Ovidenie  <mihnea@adobe.com>
1602
1603         [CSSRegions] Make RenderNamedFlowFragment::computeStyleInRegion const
1604         https://bugs.webkit.org/show_bug.cgi?id=137604
1605
1606         Reviewed by Andrei Bucur.
1607
1608         The method computeStyleInRegion should be const as it does not modify
1609         the state of the RenderNamedFlowFragment instance. Make pointers to
1610         the region used for styling const along the way. No new tests as no
1611         change in functionality.
1612
1613         * css/ElementRuleCollector.h:
1614         (WebCore::ElementRuleCollector::ElementRuleCollector):
1615         (WebCore::ElementRuleCollector::setRegionForStyling):
1616         * css/StyleResolver.cpp:
1617         (WebCore::StyleResolver::State::initForStyleResolve):
1618         (WebCore::StyleResolver::styleForElement):
1619         * css/StyleResolver.h:
1620         * rendering/RenderNamedFlowFragment.cpp:
1621         (WebCore::RenderNamedFlowFragment::computeStyleInRegion):
1622         * rendering/RenderNamedFlowFragment.h:
1623
1624 2014-09-30  Sergio Villar Senin  <svillar@igalia.com>
1625
1626         [CSS Grid Layout] Pass the valid set of tracks to grow beyond growth limits
1627         https://bugs.webkit.org/show_bug.cgi?id=137253
1628
1629         Reviewed by Darin Adler.
1630
1631         Section 10.4 of the specs describe how to resolve content based
1632         track sizing functions. Among others it describes the "distribute
1633         extra space" algorithm. The 3rd bullet of that algorithm specifies
1634         how to distribute (and also the target tracks) the extra space
1635         once all the tracks have reached their growth limits.
1636
1637         Our implementation had 2 problems. First we were not passing a
1638         valid subset of tracks (instead we were always using all of
1639         them). Now we use a function that filters the right tracks to be
1640         the target of the extra space distribution depending on whether
1641         we're computing the min track function or the max track function.
1642
1643         Secondly the algorithm that was distributing the extra space was
1644         not using that list of passed in tracks (it iterated over all of
1645         them). From now on it will use the set of tracks selected using
1646         the filter function described above.
1647
1648         * rendering/RenderGrid.cpp:
1649         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
1650         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
1651         (WebCore::RenderGrid::distributeSpaceToTracks):
1652         * rendering/RenderGrid.h:
1653         * rendering/style/GridTrackSize.h:
1654         (WebCore::GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth):
1655         (WebCore::GridTrackSize::hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth):
1656
1657 2014-10-12  Mike West  <mkwst@chromium.org>
1658
1659         Referrer Policy: Update <meta name="referrer"> values to match the spec
1660         https://bugs.webkit.org/show_bug.cgi?id=137635
1661
1662         Reviewed by Jochen Eisinger.
1663
1664         The Referrer Policy specification ([Working Draft][WD], [Editor's
1665         draft[ED]) defines different keywords than we originally
1666         implemented. We should support them in the interests of clarity and
1667         interoperability with other browsers implementing the specification.
1668
1669         [WD]: http://www.w3.org/TR/referrer-policy/#referrer-policy-delivery-meta
1670         [ED]: http://w3c.github.io/webappsec/specs/referrer-policy/#referrer-policy-delivery-meta
1671
1672         This patch is a port of Blink's https://codereview.chromium.org/607433002/
1673
1674         Tests: http/tests/security/referrer-policy-conflicting-policies.html
1675                http/tests/security/referrer-policy-https-no-referrer-when-downgrade.html
1676                http/tests/security/referrer-policy-https-no-referrer.html
1677                http/tests/security/referrer-policy-https-unsafe-url.html
1678                http/tests/security/referrer-policy-no-referrer-when-downgrade.html
1679                http/tests/security/referrer-policy-no-referrer.html
1680
1681         * dom/Document.cpp:
1682         (WebCore::Document::processReferrerPolicy):
1683
1684 2014-10-12  Dhi Aurrahman  <diorahman@rockybars.com>
1685
1686         Support activation behavior of link element
1687         https://bugs.webkit.org/show_bug.cgi?id=137597
1688
1689         Reviewed by Benjamin Poulain.
1690
1691         Support activation behavior of link elements as defined in [1],
1692         i.e. to follow the hyperlink created by the link element when it is fully active.
1693
1694         [1] https://html.spec.whatwg.org/multipage/semantics.html#the-link-element
1695
1696         Tests: fast/dom/html-link-element-activation-behavior-on-element-click.html
1697                fast/dom/html-link-element-activation-behavior-on-mouse-click.html
1698                fast/dom/html-link-element-activation-behavior-url-is-null.html
1699
1700         * dom/MouseEvent.cpp:
1701         (WebCore::MouseEvent::triggerActivationBehavior):
1702         * dom/MouseEvent.h:
1703         * html/HTMLAnchorElement.cpp:
1704         (WebCore::HTMLAnchorElement::defaultEventHandler):
1705         (WebCore::isLinkClick): Deleted.
1706         * html/HTMLAnchorElement.h:
1707         * html/HTMLLinkElement.cpp:
1708         (WebCore::HTMLLinkElement::defaultEventHandler):
1709         (WebCore::HTMLLinkElement::handleClick):
1710         * html/HTMLLinkElement.h:
1711         * svg/SVGAElement.cpp:
1712         (WebCore::SVGAElement::defaultEventHandler):
1713
1714 2014-10-11  KwangHyuk Kim  <hyuki.kim@samsung.com>
1715
1716         [EFL] Enable WebP support.
1717         https://bugs.webkit.org/show_bug.cgi?id=136156
1718
1719         Reviewed by Gyuyoung Kim.
1720
1721         Add WebP library and inlcude path to WebCore path for WK2 Efl.
1722         No new tests since existing feature is just enabled for WK2 Efl.
1723
1724         * PlatformEfl.cmake:
1725
1726 2014-10-11  Carlos Garcia Campos  <cgarcia@igalia.com>
1727
1728         [GLIB] Split GMainLoopSource moving thread safe implementation to its own class GThreadSafeMainLoopSource
1729         https://bugs.webkit.org/show_bug.cgi?id=137485
1730
1731         Reviewed by Sergio Villar Senin.
1732
1733         Use GThreadSafeMainLoopSource for GStreamer sources, since they
1734         can be used from different threads. Also update GMutexLocker
1735         usages, since it's now a template.
1736
1737         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1738         (WebCore::AudioFileReader::createBus):
1739         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
1740         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1741         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1742         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
1743         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
1744         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
1745         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1746         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
1747         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
1748         (webkitVideoSinkTimeoutCallback):
1749         (webkitVideoSinkRender):
1750         (unlockBufferMutex):
1751         (webkitVideoSinkUnlockStop):
1752         (webkitVideoSinkStart):
1753         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
1754         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1755         (webKitWebSrcGetProperty):
1756         (webKitWebSrcStop):
1757         (webKitWebSrcStart):
1758         (webKitWebSrcChangeState):
1759         (webKitWebSrcQueryWithParent):
1760         (webKitWebSrcGetUri):
1761         (webKitWebSrcSetUri):
1762         (webKitWebSrcNeedDataMainCb):
1763         (webKitWebSrcNeedDataCb):
1764         (webKitWebSrcEnoughDataMainCb):
1765         (webKitWebSrcEnoughDataCb):
1766         (webKitWebSrcSeekDataCb):
1767         (webKitWebSrcSetMediaPlayer):
1768         (StreamingClient::createReadBuffer):
1769         (StreamingClient::handleResponseReceived):
1770         (StreamingClient::handleDataReceived):
1771         (StreamingClient::handleNotifyFinished):
1772         (ResourceHandleStreamingClient::wasBlocked):
1773         (ResourceHandleStreamingClient::cannotShowURL):
1774
1775 2014-10-10  Chris Dumez  <cdumez@apple.com>
1776
1777         Use is<>() / downcast<>() for Image subclasses
1778         https://bugs.webkit.org/show_bug.cgi?id=137625
1779
1780         Reviewed by Andreas Kling.
1781
1782         Use is<>() / downcast<>() for Image subclasses.
1783
1784         No new tests, no behavior change.
1785
1786         * accessibility/AccessibilityRenderObject.cpp:
1787         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
1788         * loader/cache/CachedImage.cpp:
1789         (WebCore::CachedImage::imageSizeForRenderer):
1790         (WebCore::CachedImage::createImage):
1791         * platform/graphics/BitmapImage.h:
1792         * platform/graphics/Image.h:
1793         * platform/mac/DragImageMac.mm:
1794         (WebCore::createDragImageFromImage):
1795         * rendering/RenderImage.cpp:
1796         (WebCore::RenderImage::embeddedContentBox):
1797         * svg/graphics/SVGImage.h:
1798
1799 2014-10-10  Chris Dumez  <cdumez@apple.com>
1800
1801         Use is<>() / downcast<>() for RenderElement
1802         https://bugs.webkit.org/show_bug.cgi?id=137622
1803
1804         Reviewed by Benjamin Poulain.
1805
1806         Use is<>() / downcast<>() for RenderElement and clean up the
1807         surrounding code.
1808
1809         No new tests, no behavior change.
1810
1811         * accessibility/AccessibilityImageMapLink.cpp:
1812         (WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
1813         * accessibility/AccessibilityRenderObject.cpp:
1814         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
1815         * css/CSSComputedStyleDeclaration.cpp:
1816         (WebCore::computeRenderStyleForProperty):
1817         * dom/Node.cpp:
1818         (WebCore::Node::materializeRareData):
1819         * dom/Position.cpp:
1820         (WebCore::isNonTextLeafChild):
1821         (WebCore::searchAheadForBetterMatch):
1822         * dom/PseudoElement.cpp:
1823         (WebCore::PseudoElement::didRecalcStyle):
1824         * editing/CompositeEditCommand.cpp:
1825         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
1826         * editing/htmlediting.cpp:
1827         (WebCore::isEmptyTableCell):
1828         * rendering/InlineIterator.h:
1829         (WebCore::bidiNextShared):
1830         * rendering/RenderBlock.cpp:
1831         (WebCore::RenderBlock::getFirstLetter):
1832         * rendering/RenderBox.cpp:
1833         (WebCore::RenderBox::layout):
1834         * rendering/RenderCounter.cpp:
1835         (WebCore::RenderCounter::rendererRemovedFromTree):
1836         (WebCore::RenderCounter::rendererSubtreeAttached):
1837         (showCounterRendererTree):
1838         * rendering/RenderElement.cpp:
1839         (WebCore::RenderElement::insertChildInternal):
1840         (WebCore::RenderElement::removeChildInternal):
1841         (WebCore::RenderElement::findNextLayer):
1842         (WebCore::RenderElement::layout):
1843         * rendering/RenderElement.h:
1844         (WebCore::RenderObject::isRenderLayerModelObject):
1845         (WebCore::RenderObject::isBoxModelObject):
1846         (WebCore::RenderObject::isRenderBlock):
1847         (WebCore::RenderObject::isRenderBlockFlow):
1848         (WebCore::RenderObject::isRenderReplaced):
1849         (WebCore::RenderObject::isRenderInline):
1850         (WebCore::RenderObject::style):
1851         (WebCore::RenderObject::firstLineStyle):
1852         (WebCore::ContainerNode::renderer):
1853         * rendering/RenderFrameSet.cpp:
1854         (WebCore::RenderFrameSet::paint):
1855         * rendering/RenderLayer.cpp:
1856         (WebCore::RenderLayer::calculateClipRects):
1857         * rendering/RenderNamedFlowFragment.cpp:
1858         (WebCore::RenderNamedFlowFragment::computeChildrenStyleInRegion):
1859         (WebCore::RenderNamedFlowFragment::setObjectStyleInRegion):
1860         (WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
1861         * rendering/RenderObject.cpp:
1862         (WebCore::RenderObject::clearNeedsLayout):
1863         (WebCore::RenderObject::willBeDestroyed):
1864         (WebCore::RenderObject::collectAnnotatedRegions):
1865         * rendering/RenderVTTCue.cpp:
1866         (WebCore::RenderVTTCue::initializeLayoutParameters):
1867         (WebCore::RenderVTTCue::repositionGenericCue):
1868         * rendering/mathml/RenderMathMLFraction.cpp:
1869         (WebCore::RenderMathMLFraction::addChild):
1870         * rendering/mathml/RenderMathMLMenclose.cpp:
1871         (WebCore::RenderMathMLMenclose::addChild):
1872         * rendering/mathml/RenderMathMLOperator.cpp:
1873         (WebCore::RenderMathMLOperator::rebuildTokenContent):
1874         (WebCore::RenderMathMLOperator::updateStyle):
1875         * rendering/mathml/RenderMathMLRoot.cpp:
1876         (WebCore::RenderMathMLRoot::addChild):
1877         (WebCore::RenderMathMLRoot::layout):
1878         * rendering/mathml/RenderMathMLToken.cpp:
1879         (WebCore::RenderMathMLToken::addChild):
1880         (WebCore::RenderMathMLToken::updateTokenContent):
1881         (WebCore::RenderMathMLToken::updateStyle):
1882         * rendering/mathml/RenderMathMLUnderOver.cpp:
1883         (WebCore::RenderMathMLUnderOver::layout):
1884         * rendering/svg/RenderSVGResource.cpp:
1885         (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
1886         * rendering/svg/RenderSVGText.cpp:
1887         (WebCore::findPreviousAndNextAttributes):
1888         (WebCore::RenderSVGText::subtreeStyleDidChange):
1889         (WebCore::updateFontInAllDescendants):
1890         * rendering/svg/SVGRenderSupport.cpp:
1891         (WebCore::SVGRenderSupport::layoutChildren):
1892         * rendering/svg/SVGResourcesCache.cpp:
1893         (WebCore::SVGResourcesCache::clientWasAddedToTree):
1894         (WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):
1895         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
1896         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextRenderer):
1897         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForForSubtree):
1898         (WebCore::SVGTextLayoutAttributesBuilder::rebuildMetricsForTextRenderer):
1899         * rendering/svg/SVGTextLayoutAttributesBuilder.h:
1900         * rendering/svg/SVGTextMetricsBuilder.cpp:
1901         (WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer):
1902         (WebCore::SVGTextMetricsBuilder::measureTextRenderer):
1903         (WebCore::SVGTextMetricsBuilder::walkTree):
1904         (WebCore::SVGTextMetricsBuilder::buildMetricsAndLayoutAttributes):
1905         * rendering/svg/SVGTextMetricsBuilder.h:
1906         * rendering/svg/SVGTextRunRenderingContext.cpp:
1907         (WebCore::SVGTextRunRenderingContext::createGlyphToPathTranslator):
1908         (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs):
1909         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
1910         * svg/SVGFontData.cpp:
1911         (WebCore::SVGFontData::applySVGGlyphSelection):
1912
1913 2014-10-10  Benjamin Poulain  <benjamin@webkit.org>
1914
1915         Update :nth-child(An+B of selector-list) to the latest specification
1916         https://bugs.webkit.org/show_bug.cgi?id=137593
1917
1918         Reviewed by Andreas Kling.
1919
1920         Following my implementation feedback on :nth-child(An+B of selector-list),
1921         the CSS WG decided to change the definition such that the current element on which
1922         the selector is matched must also match the selector list in :nth-child().
1923
1924         This patch updates the implementation accordingly.
1925
1926         Test: fast/selectors/nth-child-of-chained-3.html
1927
1928         * css/SelectorChecker.cpp:
1929         (WebCore::SelectorChecker::checkOne):
1930         (WebCore::SelectorChecker::matchSelectorList):
1931         * css/SelectorChecker.h:
1932         * cssjit/SelectorCompiler.cpp:
1933         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
1934         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
1935
1936 2014-10-10  Chris Dumez  <cdumez@apple.com>
1937
1938         Drop RENDER_OBJECT_TYPE_CASTS() for a lot of RenderObject subclasses
1939         https://bugs.webkit.org/show_bug.cgi?id=137594
1940
1941         Reviewed by Darin Adler.
1942
1943         Drop RENDER_OBJECT_TYPE_CASTS() for RenderObject subclasses that no
1944         longer needed it or that required very few changes to do so. This will
1945         make sure developers start using is<>() / downcast<>() for those
1946         classes.
1947
1948         No new tests, no behavior change.
1949
1950         * accessibility/AccessibilityRenderObject.cpp:
1951         (WebCore::AccessibilityRenderObject::textUnderElement):
1952         (WebCore::AccessibilityRenderObject::stringValue):
1953         (WebCore::AccessibilityRenderObject::titleUIElement):
1954         * dom/PseudoElement.cpp:
1955         (WebCore::PseudoElement::didAttachRenderers):
1956         * html/HTMLCanvasElement.cpp:
1957         (WebCore::HTMLCanvasElement::reset):
1958         * html/HTMLPlugInElement.cpp:
1959         (WebCore::HTMLPlugInElement::defaultEventHandler):
1960         * html/HTMLPlugInImageElement.cpp:
1961         (WebCore::HTMLPlugInImageElement::updateSnapshot):
1962         (WebCore::HTMLPlugInImageElement::checkSnapshotStatus):
1963         * html/SearchInputType.cpp:
1964         (WebCore::SearchInputType::addSearchResult):
1965         (WebCore::SearchInputType::didSetValueByUserEdit):
1966         * html/shadow/TextControlInnerElements.cpp:
1967         (WebCore::TextControlInnerTextElement::renderer):
1968         (WebCore::TextControlInnerTextElement::customStyleForRenderer):
1969         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
1970         * page/FrameView.cpp:
1971         (WebCore::FrameView::isInChildFrameWithFrameFlattening):
1972         * rendering/RenderButton.h:
1973         * rendering/RenderCounter.h:
1974         * rendering/RenderDetailsMarker.h:
1975         * rendering/RenderFieldset.h:
1976         * rendering/RenderFileUploadControl.cpp:
1977         (WebCore::RenderFileUploadControl::paintObject):
1978         * rendering/RenderFileUploadControl.h:
1979         * rendering/RenderFlexibleBox.h:
1980         * rendering/RenderFullScreen.h:
1981         * rendering/RenderGrid.h:
1982         * rendering/RenderHTMLCanvas.h:
1983         * rendering/RenderIFrame.h:
1984         * rendering/RenderLayerBacking.cpp:
1985         (WebCore::RenderLayerBacking::contentsBox):
1986         * rendering/RenderMedia.h:
1987         * rendering/RenderQuote.cpp:
1988         (WebCore::RenderQuote::attachQuote):
1989         * rendering/RenderQuote.h:
1990         * rendering/RenderReplaced.h:
1991         * rendering/RenderScrollbarPart.h:
1992         * rendering/RenderSearchField.h:
1993         * rendering/RenderSnapshottedPlugIn.h:
1994         * rendering/RenderTableCaption.h:
1995         * rendering/RenderTextControlMultiLine.h:
1996         * rendering/RenderTextControlSingleLine.h:
1997         * rendering/RenderThemeMac.mm:
1998         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
1999         * rendering/RenderTreeAsText.cpp:
2000         (WebCore::RenderTreeAsText::writeRenderObject):
2001         * rendering/RenderVideo.cpp:
2002         (WebCore::rendererPlaceholder):
2003         * rendering/line/BreakingContextInlineHeaders.h:
2004         (WebCore::updateCounterIfNeeded):
2005         * rendering/svg/RenderSVGContainer.h:
2006         * rendering/svg/RenderSVGGradientStop.h:
2007         * rendering/svg/RenderSVGModelObject.h:
2008         * rendering/svg/RenderSVGPath.h:
2009         * rendering/svg/RenderSVGResourceFilter.h:
2010         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
2011         (WebCore::RenderSVGResourceFilterPrimitive::styleDidChange):
2012         * rendering/svg/RenderSVGTextPath.h:
2013         * rendering/svg/RenderSVGTransformableContainer.h:
2014         * rendering/svg/RenderSVGViewportContainer.h:
2015         * rendering/svg/SVGRenderSupport.cpp:
2016         (WebCore::SVGRenderSupport::repaintRectForRendererInLocalCoordinatesExcludingSVGShadow):
2017         (WebCore::SVGRenderSupport::checkForSVGRepaintDuringLayout):
2018         (WebCore::updateObjectBoundingBox):
2019         (WebCore::layoutSizeOfNearestViewportChanged):
2020         (WebCore::SVGRenderSupport::transformToRootChanged):
2021         (WebCore::SVGRenderSupport::rendererHasSVGShadow):
2022         (WebCore::SVGRenderSupport::setRendererHasSVGShadow):
2023         * rendering/svg/SVGTextLayoutEngine.cpp:
2024         (WebCore::SVGTextLayoutEngine::beginTextPathLayout):
2025         * svg/SVGPathElement.cpp:
2026         (WebCore::SVGPathElement::svgAttributeChanged):
2027         (WebCore::SVGPathElement::pathSegListChanged):
2028         (WebCore::SVGPathElement::getBBox):
2029         * svg/SVGSVGElement.cpp:
2030         (WebCore::SVGSVGElement::currentViewportSize):
2031
2032 2014-10-10  Chris Dumez  <cdumez@apple.com>
2033
2034         Use is<>() / downcast<>() for GraphicsLayer subclasses
2035         https://bugs.webkit.org/show_bug.cgi?id=137595
2036
2037         Reviewed by Darin Adler.
2038
2039         Use is<>() / downcast<>() for GraphicsLayer subclasses and clean up the
2040         surrounding code.
2041
2042         No new tests, no behavior change.
2043
2044         * page/mac/ServicesOverlayController.mm:
2045         (WebCore::ServicesOverlayController::Highlight::Highlight):
2046         (WebCore::ServicesOverlayController::Highlight::fadeIn):
2047         (WebCore::ServicesOverlayController::Highlight::fadeOut):
2048         * platform/graphics/GraphicsLayer.h:
2049         * platform/graphics/ca/GraphicsLayerCA.cpp:
2050         (WebCore::GraphicsLayerCA::removeFromParent):
2051         (WebCore::GraphicsLayerCA::setMaskLayer):
2052         (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush):
2053         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
2054         (WebCore::GraphicsLayerCA::updateSublayerList):
2055         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
2056         (WebCore::GraphicsLayerCA::updateMaskLayer):
2057         (WebCore::GraphicsLayerCA::replicatedLayerRoot):
2058         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
2059         (WebCore::GraphicsLayerCA::propagateLayerChangeToReplicas):
2060         (WebCore::GraphicsLayerCA::fetchCloneLayers):
2061         * platform/graphics/ca/GraphicsLayerCA.h:
2062
2063 2014-10-10  Chris Dumez  <cdumez@apple.com>
2064
2065         Use is<>() / downcast<>() for RenderBoxModelObject
2066         https://bugs.webkit.org/show_bug.cgi?id=137587
2067
2068         Reviewed by Mihnea Ovidenie.
2069
2070         Use is<>() / downcast<>() for RenderBoxModelObject and clean up the
2071         surrounding code.
2072
2073         No new tests, no behavior change.
2074
2075         * accessibility/AXObjectCache.cpp:
2076         (WebCore::createFromRenderer):
2077         * accessibility/AccessibilityRenderObject.cpp:
2078         (WebCore::AccessibilityRenderObject::renderBoxModelObject):
2079         (WebCore::isInlineWithContinuation):
2080         (WebCore::firstChildConsideringContinuation):
2081         (WebCore::lastChildHasContinuation):
2082         (WebCore::AccessibilityRenderObject::nextSibling):
2083         (WebCore::AccessibilityRenderObject::widget):
2084         (WebCore::AccessibilityRenderObject::renderObjectIsObservable):
2085         (WebCore::AccessibilityRenderObject::observableObject):
2086         (WebCore::msaaRoleForRenderer):
2087         * accessibility/AccessibilityRenderObject.h:
2088         * accessibility/AccessibilityTable.cpp:
2089         (WebCore::AccessibilityTable::isDataTable):
2090         * dom/Node.cpp:
2091         (WebCore::Node::renderBox):
2092         (WebCore::Node::renderBoxModelObject):
2093         * inspector/InspectorOverlay.cpp:
2094         (WebCore::buildObjectForElementInfo):
2095         * page/FrameView.cpp:
2096         (WebCore::FrameView::scrollContentsFastPath):
2097         * page/PrintContext.cpp:
2098         (WebCore::enclosingBoxModelObject):
2099         * page/animation/AnimationBase.cpp:
2100         (WebCore::AnimationBase::freezeAtTime):
2101         * page/animation/ImplicitAnimation.cpp:
2102         (WebCore::ImplicitAnimation::startAnimation):
2103         (WebCore::ImplicitAnimation::pauseAnimation):
2104         (WebCore::ImplicitAnimation::endAnimation):
2105         * page/animation/KeyframeAnimation.cpp:
2106         (WebCore::KeyframeAnimation::startAnimation):
2107         (WebCore::KeyframeAnimation::pauseAnimation):
2108         (WebCore::KeyframeAnimation::endAnimation):
2109         * page/ios/FrameIOS.mm:
2110         (WebCore::Frame::overflowScrollPositionChangedForNode):
2111         * page/scrolling/ScrollingCoordinator.cpp:
2112         (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
2113         * rendering/InlineBox.h:
2114         (WebCore::InlineBox::boxModelObject):
2115         * rendering/InlineElementBox.h:
2116         (WebCore::InlineElementBox::renderer):
2117         * rendering/InlineFlowBox.cpp:
2118         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
2119         * rendering/InlineFlowBox.h:
2120         (WebCore::InlineFlowBox::renderer):
2121         * rendering/InlineTextBox.cpp:
2122         (WebCore::InlineTextBox::baselinePosition):
2123         (WebCore::InlineTextBox::lineHeight):
2124         * rendering/RenderBlock.cpp:
2125         (WebCore::RenderBlock::addChildToContinuation):
2126         * rendering/RenderBox.cpp:
2127         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
2128         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
2129         (WebCore::RenderBox::computePositionedLogicalWidth):
2130         (WebCore::RenderBox::computePositionedLogicalHeight):
2131         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
2132         (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
2133         * rendering/RenderBoxModelObject.h:
2134         * rendering/RenderFlowThread.cpp:
2135         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
2136         * rendering/RenderInline.cpp:
2137         (WebCore::RenderInline::splitInlines):
2138         (WebCore::RenderInline::addChildToContinuation):
2139         * rendering/RenderLayer.cpp:
2140         (WebCore::RenderLayer::updateLayerPosition):
2141         (WebCore::RenderLayer::calculateClipRects):
2142         * rendering/RenderLayerBacking.cpp:
2143         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread):
2144         * rendering/RenderLayerCompositor.cpp:
2145         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
2146         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
2147         * rendering/RenderObject.cpp:
2148         (WebCore::RenderObject::destroy):
2149         (WebCore::RenderObject::offsetParent):
2150         * rendering/mathml/RenderMathMLScripts.cpp:
2151         (WebCore::RenderMathMLScripts::base):
2152
2153 2014-10-10  Zan Dobersek  <zdobersek@igalia.com>
2154
2155         Remove CrossThreadTask
2156         https://bugs.webkit.org/show_bug.cgi?id=137570
2157
2158         Reviewed by Darin Adler.
2159
2160         Replace uses of CrossThreadTask with C++11 lambdas. The initializations
2161         of cross-thread copies are rather verbose at the moment, but should look
2162         better once we can switch to using C++14 init capture for lambdas.
2163
2164         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2165         (WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize):
2166         * WebCore.order:
2167         * WebCore.vcxproj/WebCore.vcxproj:
2168         * WebCore.vcxproj/WebCore.vcxproj.filters:
2169         * WebCore.xcodeproj/project.pbxproj:
2170         * dom/CrossThreadTask.h: Removed.
2171         * loader/WorkerThreadableLoader.cpp:
2172         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
2173         (WebCore::WorkerThreadableLoader::MainThreadBridge::destroy):
2174         (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):
2175         (WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
2176         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
2177         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
2178         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
2179         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
2180         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
2181         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
2182         (WebCore::WorkerThreadableLoader::MainThreadBridge::~MainThreadBridge): Deleted.
2183         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader): Deleted.
2184         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadDestroy): Deleted.
2185         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCancel): Deleted.
2186         (WebCore::workerGlobalScopeDidSendData): Deleted.
2187         (WebCore::workerGlobalScopeDidReceiveResponse): Deleted.
2188         (WebCore::workerGlobalScopeDidReceiveData): Deleted.
2189         (WebCore::workerGlobalScopeDidFinishLoading): Deleted.
2190         (WebCore::workerGlobalScopeDidFail): Deleted.
2191         (WebCore::workerGlobalScopeDidFailAccessControlCheck): Deleted.
2192         (WebCore::workerGlobalScopeDidFailRedirectCheck): Deleted.
2193         * loader/WorkerThreadableLoader.h:
2194         * loader/cache/MemoryCache.cpp:
2195         (WebCore::MemoryCache::removeRequestFromCache):
2196         (WebCore::MemoryCache::removeRequestFromSessionCaches):
2197         (WebCore::MemoryCache::removeRequestFromCacheImpl): Deleted.
2198         (WebCore::MemoryCache::removeRequestFromSessionCachesImpl): Deleted.
2199         (WebCore::MemoryCache::crossThreadRemoveRequestFromCache): Deleted.
2200         (WebCore::MemoryCache::crossThreadRemoveRequestFromSessionCaches): Deleted.
2201         * loader/cache/MemoryCache.h:
2202
2203 2014-10-10  Zan Dobersek  <zdobersek@igalia.com>
2204
2205         Avoid defaulting to capture-by-value for C++11 lambdas in WebCore
2206         https://bugs.webkit.org/show_bug.cgi?id=137565
2207
2208         Reviewed by Darin Adler.
2209
2210         C++11 lambas should avoid defaulting to capturing used variables by value as that
2211         can lead to unintended captures that, in worst cases, result in lambdas that are
2212         not self-contained and end up operating on dangling pointers.
2213
2214         Explicitly stating the variables that are to be copied by value can also serve as
2215         a checklist of variables that are actually intented for use in the lambda body. 
2216
2217         * Modules/quota/StorageErrorCallback.cpp:
2218         (WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
2219         * Modules/webdatabase/Database.cpp:
2220         (WebCore::Database::~Database):
2221         (WebCore::Database::runTransaction):
2222         (WebCore::Database::scheduleTransactionCallback):
2223         * Modules/webdatabase/DatabaseManager.cpp:
2224         (WebCore::DatabaseManager::openDatabase):
2225         * Modules/webdatabase/SQLCallbackWrapper.h:
2226         (WebCore::SQLCallbackWrapper::clear):
2227         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
2228         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
2229         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
2230         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
2231         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
2232         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
2233         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
2234         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
2235         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
2236         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2237         (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
2238         (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
2239         (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
2240         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
2241         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
2242         (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
2243         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
2244         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
2245         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
2246         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
2247         (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
2248         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
2249         (WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
2250         (WebCore::WorkerThreadableWebSocketChannel::Bridge::close):
2251         (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
2252         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
2253         (WebCore::WorkerThreadableWebSocketChannel::Bridge::suspend):
2254         (WebCore::WorkerThreadableWebSocketChannel::Bridge::resume):
2255         * bindings/js/JSCallbackData.h:
2256         (WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
2257         * bindings/js/JSDOMGlobalObjectTask.cpp:
2258         (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
2259         * dom/ScriptExecutionContext.h:
2260         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
2261         * dom/StringCallback.cpp:
2262         (WebCore::StringCallback::scheduleCallback):
2263         * fileapi/FileReader.cpp:
2264         (WebCore::FileReader::abort):
2265         * loader/appcache/ApplicationCacheGroup.cpp:
2266         (WebCore::ApplicationCacheGroup::postListenerTask):
2267         * workers/DefaultSharedWorkerRepository.cpp:
2268         (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
2269         (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
2270         (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
2271         * workers/WorkerEventQueue.cpp:
2272         (WebCore::WorkerEventQueue::enqueueEvent):
2273         * workers/WorkerMessagingProxy.cpp:
2274         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
2275         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
2276         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
2277         (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
2278         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
2279         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
2280         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
2281         (WebCore::WorkerMessagingProxy::reportPendingActivity):
2282
2283 2014-10-10  Zan Dobersek  <zdobersek@igalia.com>
2284
2285         Remove MainThreadTask
2286         https://bugs.webkit.org/show_bug.cgi?id=137563
2287
2288         Reviewed by Darin Adler.
2289
2290         Replace the remaining uses of MainThreadTask with C++11 lambdas.
2291         Remove the MainThreadTask header from the build.
2292
2293         * WebCore.order:
2294         * WebCore.vcxproj/WebCore.vcxproj:
2295         * WebCore.vcxproj/WebCore.vcxproj.filters:
2296         * WebCore.xcodeproj/project.pbxproj:
2297         * platform/MainThreadTask.h: Removed.
2298         * platform/network/curl/CurlDownload.cpp:
2299         (WebCore::CurlDownloadManager::downloadThread):
2300         (WebCore::CurlDownload::didReceiveHeader):
2301         (WebCore::CurlDownload::didReceiveData):
2302
2303 2014-10-10  Andrzej Badowski  <a.badowski@samsung.com>
2304
2305         [ATK] Changing the mapping of ARIA rowheader and columnheader into respective ATK roles.
2306         https://bugs.webkit.org/show_bug.cgi?id=136150
2307
2308         Reviewed by Chris Fleizach.
2309
2310         Expose ColumnHeaderRole and RowHeaderRole objects into ATK.
2311
2312         Test: accessibility/table-roles-hierarchy.html
2313
2314         * accessibility/AccessibilityRenderObject.cpp:
2315         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2316         Platforms based on ATK: added distinction of roles for the <th> elements.
2317         * accessibility/AccessibilityTableCell.cpp:
2318         (WebCore::AccessibilityTableCell::determineAccessibilityRole):
2319         Platforms based on ATK: the return value is determined in the ancestor.
2320         * accessibility/atk/AccessibilityObjectAtk.cpp:
2321         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
2322         In addition to CellRole also included ColumnHeaderRole and RowHeaderRole.
2323         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2324         (atkRole):
2325         Changing the mapping of ARIA rowheader and columnheader into respective ATK roles.
2326         (getInterfaceMaskFromObject):
2327         In addition to CellRole also included ColumnHeaderRole and RowHeaderRole.
2328
2329 2014-10-09  Carlos Garcia Campos  <cgarcia@igalia.com>
2330
2331         MediaPlayer should use a reference for the MediaPlayerClient
2332         https://bugs.webkit.org/show_bug.cgi?id=137552
2333
2334         Reviewed by Darin Adler.
2335
2336         The MediaPlayer client is set on constructor by HTMLMediaElement
2337         and cleared on HTMLMediaElement destructor that also frees the
2338         MediaPlayer object. Since the client will never be null while the
2339         MediaPlayer player is alive, we can use a reference and remove all
2340         the unneeded null checks. The member has also been renamed to m_client.
2341
2342         * html/HTMLMediaElement.cpp:
2343         (WebCore::HTMLMediaElement::~HTMLMediaElement):
2344         (WebCore::HTMLMediaElement::parseAttribute):
2345         * platform/graphics/MediaPlayer.cpp:
2346         (WebCore::MediaPlayer::MediaPlayer):
2347         (WebCore::MediaPlayer::~MediaPlayer):
2348         (WebCore::MediaPlayer::loadWithNextMediaEngine):
2349         (WebCore::MediaPlayer::inMediaDocument):
2350         (WebCore::MediaPlayer::currentPlaybackTargetIsWirelessChanged):
2351         (WebCore::MediaPlayer::networkStateChanged):
2352         (WebCore::MediaPlayer::readyStateChanged):
2353         (WebCore::MediaPlayer::volumeChanged):
2354         (WebCore::MediaPlayer::muteChanged):
2355         (WebCore::MediaPlayer::timeChanged):
2356         (WebCore::MediaPlayer::sizeChanged):
2357         (WebCore::MediaPlayer::repaint):
2358         (WebCore::MediaPlayer::durationChanged):
2359         (WebCore::MediaPlayer::rateChanged):
2360         (WebCore::MediaPlayer::playbackStateChanged):
2361         (WebCore::MediaPlayer::firstVideoFrameAvailable):
2362         (WebCore::MediaPlayer::characteristicChanged):
2363         (WebCore::MediaPlayer::keyAdded):
2364         (WebCore::MediaPlayer::keyError):
2365         (WebCore::MediaPlayer::keyMessage):
2366         (WebCore::MediaPlayer::keyNeeded):
2367         (WebCore::MediaPlayer::referrer):
2368         (WebCore::MediaPlayer::userAgent):
2369         (WebCore::MediaPlayer::graphicsDeviceAdapter):
2370         (WebCore::MediaPlayer::cachedResourceLoader):
2371         (WebCore::MediaPlayer::addAudioTrack):
2372         (WebCore::MediaPlayer::removeAudioTrack):
2373         (WebCore::MediaPlayer::addTextTrack):
2374         (WebCore::MediaPlayer::removeTextTrack):
2375         (WebCore::MediaPlayer::addVideoTrack):
2376         (WebCore::MediaPlayer::removeVideoTrack):
2377         (WebCore::MediaPlayer::outOfBandTrackSources):
2378         (WebCore::MediaPlayer::shouldWaitForResponseToAuthenticationChallenge):
2379         (WebCore::MediaPlayer::handlePlaybackCommand):
2380         (WebCore::MediaPlayer::sourceApplicationIdentifier):
2381         (WebCore::MediaPlayer::doesHaveAttribute):
2382         (WebCore::MediaPlayer::mediaPlayerNetworkInterfaceName):
2383         (WebCore::MediaPlayer::getRawCookies):
2384         (WebCore::MediaPlayer::setWirelessVideoPlaybackDisabled): Deleted.
2385         (WebCore::MediaPlayer::audioSourceProvider): Deleted.
2386         (WebCore::MediaPlayer::engineDescription): Deleted.
2387         (WebCore::MediaPlayer::notifyTrackModeChanged): Deleted.
2388         (WebCore::MediaPlayer::totalFrameDelay): Deleted.
2389         (WebCore::MediaPlayerFactorySupport::callRegisterMediaEngine): Deleted.
2390         * platform/graphics/MediaPlayer.h:
2391         (WebCore::MediaPlayer::create):
2392         (WebCore::MediaPlayer::platformVolumeConfigurationRequired):
2393         (WebCore::MediaPlayer::client):
2394         (WebCore::MediaPlayer::mediaPlayerClient): Deleted.
2395         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2396         (WebCore::MediaPlayerPrivateAVFoundation::preferredRenderingMode):
2397         (WebCore::MediaPlayerPrivateAVFoundation::setUpVideoRendering):
2398         (WebCore::MediaPlayerPrivateAVFoundation::prepareForRendering):
2399         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2400         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
2401         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
2402         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
2403         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2404         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged):
2405         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer):
2406         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer):
2407         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
2408         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
2409         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2410         (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
2411         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
2412         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideoCaps):
2413         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
2414         (WebCore::MediaPlayerPrivateGStreamer::didEnd):
2415         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2416         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
2417         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2418         (webKitWebSrcStart):
2419         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2420         (WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
2421         (WebCore::MediaPlayerPrivateQTKit::setUpVideoRendering):
2422         (WebCore::MediaPlayerPrivateQTKit::prepareForRendering):
2423         (WebCore::MediaPlayerPrivateQTKit::sawUnsupportedTracks):
2424
2425 2014-10-09  Mihnea Ovidenie  <mihnea@adobe.com>
2426
2427         [CSSRegions] Make RenderFlowThread::regionAtBlockOffset const
2428         https://bugs.webkit.org/show_bug.cgi?id=137555
2429
2430         Reviewed by David Hyatt.
2431
2432         Make the method const and remove autoGenerateRegionsToBlockOffset method as it
2433         is not used by region-based multicolumn code. Also removed the RegionAutoGenerationPolicy
2434         parameter in the process and the call sites. Make const some of the methods that call
2435         regionAtBlockOffset.
2436
2437         * rendering/RenderFlowThread.cpp:
2438         (WebCore::RenderFlowThread::regionForCompositedLayer):
2439         (WebCore::RenderFlowThread::regionAtBlockOffset):
2440         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
2441         (WebCore::RenderFlowThread::pageLogicalTopForOffset):
2442         (WebCore::RenderFlowThread::pageLogicalWidthForOffset):
2443         (WebCore::RenderFlowThread::pageLogicalHeightForOffset):
2444         (WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
2445         (WebCore::RenderFlowThread::mapFromFlowToRegion):
2446         (WebCore::RenderFlowThread::computedRegionRangeForBox):
2447         * rendering/RenderFlowThread.h:
2448         * rendering/RenderMultiColumnFlowThread.cpp:
2449         (WebCore::RenderMultiColumnFlowThread::regionAtBlockOffset):
2450         (WebCore::RenderMultiColumnFlowThread::mapFromFlowToRegion):
2451         (WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFlowToRegion):
2452         (WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset): Deleted.
2453         * rendering/RenderMultiColumnFlowThread.h:
2454
2455 2014-10-09  Chris Dumez  <cdumez@apple.com>
2456
2457         Use is<>() / downcast<>() for FontData subclasses
2458         https://bugs.webkit.org/show_bug.cgi?id=137591
2459
2460         Reviewed by Andreas Kling.
2461
2462         Use is<>() / downcast<>() for FontData subclasses.
2463
2464         No new tests, no behavior change.
2465
2466         * platform/graphics/FontData.h:
2467         * platform/graphics/FontGlyphs.cpp:
2468         (WebCore::FontGlyphs::releaseFontData):
2469         (WebCore::FontGlyphs::determinePitch):
2470         * platform/graphics/GlyphPageTreeNode.cpp:
2471         (WebCore::GlyphPageTreeNode::initializePage):
2472         * platform/graphics/SegmentedFontData.h:
2473         (isType):
2474         * platform/graphics/SimpleFontData.h:
2475         (isType):
2476
2477 2014-10-09  Simon Fraser  <simon.fraser@apple.com>
2478
2479         Revert part of r174543 that broke grid layout tests.
2480
2481         * css/CSSComputedStyleDeclaration.cpp:
2482         (WebCore::specifiedValueForGridTrackBreadth):
2483
2484 2014-10-09  Dean Jackson  <dino@apple.com>
2485
2486         Computed style for clip is wrong with respect to auto
2487         https://bugs.webkit.org/show_bug.cgi?id=137567
2488
2489         Reviewed by Simon Fraser.
2490
2491         Make sure that the computed style of clip returns the
2492         correct value when the input is "auto", or in this
2493         case "rect(auto, auto, auto, auto)". Before this
2494         patch it returned "rect(0px, 0px, 0px, 0px)" which
2495         was completely wrong.
2496
2497         Test: fast/css/computed-clip-with-auto-rect.html
2498
2499         * css/CSSComputedStyleDeclaration.cpp:
2500         (WebCore::autoOrZoomAdjustedValue): Helper function to make the correct keyword or length.
2501         (WebCore::specifiedValueForGridTrackBreadth): It can use the helper too.
2502         (WebCore::ComputedStyleExtractor::propertyValue): If the
2503         top/right/bottom/left is "auto", add that identifier
2504         to the output rectangle.
2505
2506 2014-10-09  Chris Dumez  <cdumez@apple.com>
2507
2508         Use RenderObject::firstChildSlow() / lastChildSlow() less
2509         https://bugs.webkit.org/show_bug.cgi?id=137573
2510
2511         Reviewed by Andreas Kling.
2512
2513         Use RenderObject::firstChildSlow() / lastChildSlow() less by using
2514         tighter typing at call sites whenever possible to be able to call the
2515         faster RenderElement::firstChild() / lastChild() instead.
2516
2517         This patch also uses more references instead of pointers when possible.
2518
2519         No new tests, no behavior change.
2520
2521         * accessibility/AccessibilityRenderObject.cpp:
2522         (WebCore::firstChildIsInlineContinuation):
2523         (WebCore::AccessibilityRenderObject::previousSibling):
2524         (WebCore::lastChildHasContinuation):
2525         (WebCore::AccessibilityRenderObject::nextSibling):
2526         * page/FrameView.cpp:
2527         (WebCore::countRenderedCharactersInRenderObjectWithThreshold):
2528         (WebCore::FrameView::renderedCharactersExceed):
2529         * rendering/RenderElement.h:
2530         * rendering/RenderRuby.cpp:
2531         (WebCore::isAnonymousRubyInlineBlock):
2532         (WebCore::isRubyBeforeBlock):
2533         (WebCore::isRubyAfterBlock):
2534         * rendering/svg/RenderSVGInline.h:
2535         * rendering/svg/RenderSVGText.cpp:
2536         (WebCore::RenderSVGText::layout):
2537         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
2538         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextRenderer):
2539         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForForSubtree):
2540         (WebCore::SVGTextLayoutAttributesBuilder::collectTextPositioningElements):
2541         (WebCore::SVGTextLayoutAttributesBuilder::buildCharacterDataMap):
2542         * rendering/svg/SVGTextLayoutAttributesBuilder.h:
2543         * svg/SVGTextPositioningElement.cpp:
2544         (WebCore::SVGTextPositioningElement::elementFromRenderer):
2545         * svg/SVGTextPositioningElement.h:
2546
2547 2014-10-09  Roger Fong  <roger_fong@apple.com>
2548
2549         Build fix for Win EWS bots.
2550
2551         * testing/Internals.idl: Move enum declaration to the top of the file.
2552
2553 2014-10-09  Said Abou-Hallawa  <sabouhallawa@apple.com>
2554
2555         RenderMathMLUnderOver adds spacing to the child operator indefinitely when resizing the window.
2556         https://bugs.webkit.org/show_bug.cgi?id=137330
2557
2558         Reviewed by Darin Adler.
2559
2560         The layout for the <mundercover> math object happens in two separate passes. The first pass runs
2561         the layout for the two children and then calculates the maximum child width.  It then sets the 
2562         stretch size for the math operator child.  And finally it runs the second layout pass by calling
2563         the base class layout() function. The base class function then runs the layout for the children
2564         rendering blocks.  In the operator child function computePreferredLogicalWidths(), the stretch 
2565         size is used to adjust the width (or the height) of the operator. Then it adds the leading and
2566         trailing spaces and the total will be the operator child width.
2567
2568         When resizing or zooming the window, the render objects are just invalidated but marked as 'needs-
2569         Layout'.  The problem is happening because the stretch size of the math operator is not reset
2570         before running the layout.  The old logical width (or height) of the the math operator child which
2571         is equal to the stretch size plus the leading and trailing spaces for is compared with the glyph
2572         size if the old logical width ( or height) is larger, it is set to be the stretch size.  When it
2573         is used again because of invalidation, new leading and trailing spaces are included in the new
2574         logical width.  So with every zooming-in or out or window resizing, new leading and trailing 
2575         spaces are added to the logical width of the math operator child or the math <munderober> object.
2576         
2577         Ensure the stretch size of the math operator render object is reset before running its layout.
2578         Running the layout means either the page is just loaded or it's invalidated which means, no 
2579         layout stall data should be used.
2580
2581         Test: mathml/opentype/munderover-window-resize.html
2582
2583         * rendering/mathml/RenderMathMLOperator.cpp:
2584         (WebCore::RenderMathMLOperator::resetStretchSize):
2585         * rendering/mathml/RenderMathMLOperator.h:
2586         resetStretchSize() sets the stretch size to its original value when the class is created.
2587         * rendering/mathml/RenderMathMLUnderOver.cpp:
2588         (WebCore::RenderMathMLUnderOver::layout):
2589         Make sure the operator stretch size is reset before calling its layout. Also make sure the new 
2590         maximum stretch size to the operator objects that were invalid and needsLayout.
2591
2592 2014-10-09  Dean Jackson  <dino@apple.com>
2593
2594         Remove ENABLE_CSS3_CONDITIONAL_RULES
2595         https://bugs.webkit.org/show_bug.cgi?id=137571
2596
2597         Reviewed by Simon Fraser.
2598
2599         We have good enough support for @supports that
2600         it should be a consistent part of the platform. Remove
2601         the compile-time guard.
2602
2603         * Configurations/FeatureDefines.xcconfig:
2604         * WebCore.exp.in:
2605         * bindings/js/JSCSSRuleCustom.cpp:
2606         (WebCore::toJS):
2607         * bindings/objc/DOMCSS.mm:
2608         (kitClass):
2609         * css/CSSGrammar.y.in:
2610         * css/CSSParser.cpp:
2611         (WebCore::CSSParser::CSSParser):
2612         (WebCore::CSSParser::parseSupportsCondition):
2613         (WebCore::CSSParser::detectAtToken):
2614         (WebCore::CSSParser::detectSupportsToken):
2615         (WebCore::CSSParser::realLex):
2616         * css/CSSParser.h:
2617         * css/CSSRule.h:
2618         * css/CSSRule.idl:
2619         * css/CSSSupportsRule.cpp:
2620         * css/CSSSupportsRule.h:
2621         * css/CSSSupportsRule.idl:
2622         * css/DOMWindowCSS.cpp:
2623         * css/DOMWindowCSS.h:
2624         * css/DOMWindowCSS.idl:
2625         * css/InspectorCSSOMWrappers.cpp:
2626         (WebCore::InspectorCSSOMWrappers::collect):
2627         * css/RuleSet.cpp:
2628         (WebCore::RuleSet::addChildRules):
2629         * css/StyleRule.cpp:
2630         (WebCore::StyleRuleBase::destroy):
2631         (WebCore::StyleRuleBase::copy):
2632         (WebCore::StyleRuleBase::createCSSOMWrapper):
2633         (WebCore::StyleRuleSupports::StyleRuleSupports):
2634         * css/StyleRule.h:
2635         (WebCore::toStyleRuleSupports):
2636         * css/StyleSheetContents.cpp:
2637         (WebCore::childRulesHaveFailedOrCanceledSubresources):
2638         * inspector/InspectorStyleSheet.cpp:
2639         (flattenSourceData):
2640         (WebCore::asCSSRuleList):
2641         * page/DOMWindow.cpp:
2642         (WebCore::DOMWindow::css):
2643         * page/DOMWindow.h:
2644         * page/DOMWindow.idl:
2645
2646 2014-10-09  Benjamin Poulain  <benjamin@webkit.org>
2647
2648         Add the baseline implementation of :not(selectorList)
2649         https://bugs.webkit.org/show_bug.cgi?id=137548
2650
2651         Reviewed by Andreas Kling.
2652
2653         This patch extend the pseudo class :not() to support the new definition
2654         in CSS Selectors level 4.
2655
2656         Instead of supporting a single simple selector, :not() now support
2657         an arbitrary selector list, excepted pseudo elements.
2658
2659         One side effect of this change is :visited and :link are no longer supported
2660         inside :not(). The reason has to do with complexity and performance.
2661         Since :not() and :matches() can have arbitrary selector list, keeping track of
2662         :visited and :link can have many combination superposing, some valid, some invalid.
2663
2664         Supporting :visited and :link should be possible by chaning the way we handle
2665         them for style resolution, but given the limited use cases for such features
2666         I'll wait to see if there is any interest before changing everything.
2667
2668         This patch only covers SelectorChecker to keep things simple. The CSS JIT
2669         will come later.
2670
2671         Tests: fast/css/not-basics.html
2672                fast/css/parsing-css-not-1.html
2673                fast/css/parsing-css-not-2.html
2674                fast/css/parsing-css-not-3.html
2675                fast/css/parsing-css-not-4.html
2676                fast/css/parsing-css-not-5.html
2677                fast/css/parsing-css-not-6.html
2678                fast/css/parsing-css-not-7.html
2679                fast/css/parsing-css-not-8.html
2680                fast/css/parsing-css-not-9.html
2681                fast/css/parsing-css-nth-child-of-4.html
2682                fast/selectors/not-basics.html
2683                fast/selectors/not-nested.html
2684                fast/selectors/not-selector-list.html
2685
2686         * css/CSSGrammar.y.in:
2687         Rename selectorListDoesNotMatchAnyPseudoElement() to selectorListDoesNotMatchAnyPseudoElement()
2688         since both :not() and :nth-child(An+B of selectorList) have the same requirements at the moment. 
2689
2690         * css/CSSParserValues.cpp:
2691         (WebCore::selectorListMatchesPseudoElement):
2692         The patch adding :matches() introduced the possibility of putting pseudo element
2693         arbitrary deep in a sequence of nested :matches(). Since this case is forbidded
2694         by :not() and :nth-child(An+B of selectorList), selectorListMatchesPseudoElement()
2695         now becomes recursive to find those pseudo elements.
2696
2697         * css/CSSSelector.cpp:
2698         (WebCore::CSSSelector::selectorText):
2699         CSSOM for the extended :not().
2700
2701         * css/SelectorChecker.cpp:
2702         (WebCore::SelectorChecker::checkOne):
2703         (WebCore::SelectorChecker::determineLinkMatchType):
2704         * cssjit/SelectorCompiler.cpp:
2705
2706         (WebCore::SelectorCompiler::addPseudoClassType):
2707         Disable the new capabilities from the JIT for now.
2708
2709 2014-10-09  Tim Horton  <timothy_horton@apple.com>
2710
2711         Move ServicesOverlayController to WebCore
2712         https://bugs.webkit.org/show_bug.cgi?id=137416
2713         <rdar://problem/18546283>
2714
2715         Reviewed by Anders Carlsson.
2716
2717         Move ServicesOverlayController from WebKit2 to WebCore, as it can be used by both Legacy WebKit and WebKit2.
2718
2719         * WebCore.xcodeproj/project.pbxproj:
2720         * editing/Editor.cpp:
2721         (WebCore::Editor::scanSelectionForTelephoneNumbers):
2722         * editing/SelectionRectGatherer.cpp:
2723         (WebCore::SelectionRectGatherer::Notifier::~Notifier):
2724         Notify ServicesOverlayController of changes via Page instead of EditorClient.
2725
2726         * page/ChromeClient.h:
2727         (WebCore::ChromeClient::handleTelephoneNumberClick):
2728         (WebCore::ChromeClient::handleSelectionServiceClick):
2729         (WebCore::ChromeClient::hasRelevantSelectionServices):
2730         Add ChromeClient functions for services actions.
2731
2732         * page/EditorClient.h:
2733         (WebCore::EditorClient::selectedTelephoneNumberRangesChanged): Deleted.
2734         (WebCore::EditorClient::selectionRectsDidChange): Deleted.
2735         Remove EditorClient functions for notifying ServicesOverlayController of changes,
2736         because it lives in WebCore proper now.
2737
2738         * page/Page.cpp:
2739         (WebCore::Page::Page):
2740         * page/Page.h:
2741         (WebCore::Page::servicesOverlayController):
2742         Keep a ServicesOverlayController on Page.
2743
2744         * page/PageOverlay.cpp:
2745         (WebCore::PageOverlay::mouseEvent):
2746         Use windowToContents instead of rootViewToContents; events come in in window coordinates.
2747
2748         * page/PageOverlayController.cpp:
2749         (WebCore::PageOverlayController::updateSettingsForLayer):
2750         Get Settings from MainFrame, not Page.
2751
2752         * page/Settings.in:
2753         Add servicesControlsEnabled setting.
2754
2755         * page/mac/ServicesOverlayController.h: Renamed from Source/WebKit2/WebProcess/WebPage/ServicesOverlayController.h.
2756         * page/mac/ServicesOverlayController.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm.
2757         Moved from WebKit2. Mostly mechanical changes, plus:
2758             - Use windowToContents instead of rootViewToContents; events come in in window coordinates.
2759             - Cut off rebuild* if serviceControlsEnabled setting is false
2760             - Don't create the overlay if serviceControlsEnabled setting is false
2761             - Send click events via ChromeClient.
2762             - Tie our lifetime to MainFrame instead of Page, and get lots of things from MainFrame instead.
2763
2764         * platform/Logging.h:
2765         Add Services logging channel (moved from WebKit2).
2766
2767 2014-10-09  Brent Fulgham  <bfulgham@apple.com>
2768
2769         [Win] Unreviewed build fix: Revert r174378
2770
2771         Roll back this change, as it didn't fix the EWS builders, and has only
2772         served to make Windows builds take forever.
2773
2774         * WebCore.vcxproj/WebCoreGenerated.make: Don't delete all generated content
2775         every time we build.
2776
2777 2014-10-09  Chris Dumez  <cdumez@apple.com>
2778
2779         Unreviewed GTK build fix after r174504.
2780
2781         Missing header include.
2782
2783         * rendering/svg/SVGTextQuery.cpp:
2784
2785 2014-10-09  Myles C. Maxfield  <mmaxfield@apple.com>
2786
2787         Remove second-to-last client of WebFontCache
2788         https://bugs.webkit.org/show_bug.cgi?id=137550
2789
2790         Reviewed by Darin Adler.
2791
2792         No new tests because no behavior change.
2793
2794         * WebCore.exp.in:
2795         * platform/graphics/FontCache.h: Allow migration of client to getCachedFontData()
2796
2797 2014-10-09  Chris Dumez  <cdumez@apple.com>
2798
2799         [Mac] Spending too much time mapping desired font families to available ones
2800         https://bugs.webkit.org/show_bug.cgi?id=137539
2801
2802         Reviewed by Darin Adler.
2803
2804         While profiling the load of weather.com, I noticed that we are spending
2805         quite a bit of time trying to map the font family requested to a font
2806         that is available on the system. The process involves:
2807         1. Doing a linear search of all the installed font families and do a
2808            case-insensitive string comparison for each of them until we find a
2809            match,
2810         2. Then, if we don't find a match, do another linear search of the
2811            fonts' postscript names this time and do again a case-insensitive
2812            string comparison for each of them.
2813
2814         This process is costly and the fonts requested by weather.com are not
2815         available, causing us to do 2 linear searches and a lot of string
2816         comparisons (accounting for ~2% of the WebProcess CPU time for the page
2817         load). As a result, we end up spending ~90ms in
2818         internalFontWithFamily() when loading weather.com.
2819
2820         This patch introduces a cache for the mapping between desired font
2821         families and available font families. This cuts the time spent in
2822         internalFontWithFamily() in half (~45ms). The cache gets invalidated
2823         when fonts are installed / uninstalled on the system so we don't break
2824         that scenario. The cache is also limited in size to avoid using too
2825         much memory.
2826
2827         No new tests, but manual testing making sure the cache gets invalidated
2828         when installing a font on the system.
2829
2830         * platform/graphics/mac/FontCacheMac.mm:
2831         (WebCore::invalidateFontCache):
2832         * platform/mac/WebFontCache.h:
2833         * platform/mac/WebFontCache.mm:
2834         (desiredFamilyToAvailableFamilyDictionary):
2835         (rememberDesiredFamilyToAvailableFamilyMapping):
2836         (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
2837         (+[WebFontCache invalidate]):
2838
2839 2014-10-09  Bear Travis  <betravis@adobe.com>
2840
2841         [CSS Font Loading] Decrement the font loading count before notifying callbacks
2842         https://bugs.webkit.org/show_bug.cgi?id=137401
2843
2844         Reviewed by Alexey Proskuryakov.
2845
2846         In the callbacks, it should appear that font load has completed. This is
2847         accessed through loading(), which relies on the current number of
2848         fonts loading via JS and CSS.
2849
2850         Unskipping the failing test http/tests/webfont/fontloader-loading-attribute.html
2851         test which tests this.
2852
2853         * css/FontLoader.cpp:
2854         (WebCore::LoadFontCallback::notifyLoaded):
2855
2856 2014-10-09  Chris Dumez  <cdumez@apple.com>
2857
2858         Unreviewed Windows build fix after r174506.
2859
2860         We no longer needed to dereference as it is a reference instead of a
2861         pointer now.
2862
2863         * page/win/EventHandlerWin.cpp:
2864         (WebCore::EventHandler::passWheelEventToWidget):
2865
2866 2014-10-09  Chris Dumez  <cdumez@apple.com>
2867
2868         Use is<>() / downcast<>() for Widget subclasses
2869         https://bugs.webkit.org/show_bug.cgi?id=137549
2870
2871         Reviewed by Darin Adler.
2872
2873         Use is<>() / downcast<>() for Widget subclasses and clean up the
2874         surrounding code.
2875
2876         No new tests, no behavior change.
2877
2878         * accessibility/AXObjectCache.cpp:
2879         (WebCore::AXObjectCache::getOrCreate):
2880         * accessibility/AccessibilityObject.cpp:
2881         (WebCore::appendAccessibilityObject):
2882         * accessibility/AccessibilityRenderObject.cpp:
2883         (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
2884         * accessibility/AccessibilityScrollView.cpp:
2885         (WebCore::AccessibilityScrollView::webAreaObject):
2886         (WebCore::AccessibilityScrollView::documentFrameView):
2887         (WebCore::AccessibilityScrollView::parentObject):
2888         (WebCore::AccessibilityScrollView::parentObjectIfExists):
2889         * bindings/js/JSPluginElementFunctions.cpp:
2890         (WebCore::pluginScriptObjectFromPluginViewBase):
2891         * html/HTMLObjectElement.cpp:
2892         (WebCore::HTMLObjectElement::appendFormData):
2893         * html/HTMLPlugInElement.cpp:
2894         (WebCore::HTMLPlugInElement::canProcessDrag):
2895         (WebCore::HTMLPlugInElement::isKeyboardFocusable):
2896         (WebCore::HTMLPlugInElement::isUserObservable):
2897         * html/HTMLPlugInImageElement.cpp:
2898         (WebCore::HTMLPlugInImageElement::checkSizeChangeForSnapshotting):
2899         (WebCore::HTMLPlugInImageElement::subframeLoaderDidCreatePlugIn):
2900         * html/HTMLPlugInImageElement.h:
2901         * loader/SubframeLoader.cpp:
2902         (WebCore::SubframeLoader::loadPlugin):
2903         * page/DragController.cpp:
2904         (WebCore::DragController::operationForLoad):
2905         * page/EventHandler.cpp:
2906         (WebCore::EventHandler::subframeForTargetNode):
2907         (WebCore::EventHandler::handleWheelEvent):
2908         * page/EventHandler.h:
2909         * page/Frame.cpp:
2910         (WebCore::Frame::frameForWidget):
2911         * page/FrameView.cpp:
2912         (WebCore::FrameView::hasCustomScrollbars):
2913         (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
2914         (WebCore::FrameView::convertToContainingView):
2915         (WebCore::FrameView::convertFromContainingView):
2916         (WebCore::FrameView::removeChild):
2917         * page/FrameView.h:
2918         * page/Page.cpp:
2919         (WebCore::Page::pluginViews):
2920         * page/efl/EventHandlerEfl.cpp:
2921         (WebCore::EventHandler::passWheelEventToWidget):
2922         * page/gtk/EventHandlerGtk.cpp:
2923         (WebCore::EventHandler::passWheelEventToWidget):
2924         * page/ios/EventHandlerIOS.mm:
2925         (WebCore::EventHandler::passWheelEventToWidget):
2926         * page/mac/EventHandlerMac.mm:
2927         (WebCore::EventHandler::passWheelEventToWidget):
2928         * page/scrolling/ScrollingCoordinator.cpp:
2929         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
2930         * page/win/EventHandlerWin.cpp:
2931         (WebCore::EventHandler::passWheelEventToWidget):
2932         * platform/ScrollView.cpp:
2933         (WebCore::ScrollView::removeChild):
2934         (WebCore::ScrollView::setHasHorizontalScrollbar):
2935         (WebCore::ScrollView::setHasVerticalScrollbar):
2936         * platform/ScrollView.h:
2937         * platform/Scrollbar.cpp:
2938         (WebCore::Scrollbar::root):
2939         Uninline as root() because Widget::root() returns a FrameView now and
2940         it is impossible to include FrameView.h in Scrollbar.h without causing
2941         a cycle.
2942
2943         * platform/Scrollbar.h:
2944         * platform/Widget.cpp:
2945         (WebCore::Widget::root):
2946         Use tighter typing and return a FrameView instead of a ScrollView.
2947
2948         (WebCore::Widget::removeFromParent):
2949         * platform/Widget.h:
2950         * platform/efl/WidgetEfl.cpp:
2951         (WebCore::Widget::setCursor):
2952         * platform/gtk/PlatformScreenGtk.cpp:
2953         * platform/gtk/WidgetGtk.cpp:
2954         (WebCore::Widget::setCursor):
2955         * platform/mac/PlatformScreenMac.mm:
2956         (WebCore::displayFromWidget):
2957         * platform/mac/WidgetMac.mm:
2958         (WebCore::Widget::setCursor):
2959         * platform/win/WidgetWin.cpp:
2960         (WebCore::Widget::setCursor):
2961         * plugins/PluginViewBase.h:
2962         * plugins/win/PluginViewWin.cpp:
2963         (WebCore::PluginView::updatePluginWidget):
2964         (WebCore::PluginView::paintIntoTransformedContext):
2965         (WebCore::PluginView::paintWindowedPluginIntoContext):
2966         (WebCore::PluginView::paint):
2967         (WebCore::PluginView::handleMouseEvent):
2968         (WebCore::PluginView::setNPWindowRect):
2969         (WebCore::PluginView::snapshot):
2970         * rendering/RenderEmbeddedObject.cpp:
2971         (WebCore::RenderEmbeddedObject::allowsAcceleratedCompositing):
2972         (WebCore::RenderEmbeddedObject::nodeAtPoint):
2973         (WebCore::RenderEmbeddedObject::scroll):
2974         * rendering/RenderFrameBase.h:
2975         (WebCore::RenderFrameBase::childView):
2976         * rendering/RenderLayerBacking.cpp:
2977         (WebCore::RenderLayerBacking::layerWillBeDestroyed):
2978         (WebCore::RenderLayerBacking::updateConfiguration):
2979         * rendering/RenderLayerCompositor.cpp:
2980         (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame):
2981         * rendering/RenderTreeAsText.cpp:
2982         (WebCore::write):
2983         * rendering/RenderWidget.cpp:
2984         (WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):
2985         (WebCore::RenderWidget::paintContents):
2986         (WebCore::RenderWidget::setOverlapTestResult):
2987         (WebCore::RenderWidget::updateWidgetPosition):
2988         (WebCore::RenderWidget::nodeAtPoint):
2989         (WebCore::RenderWidget::embeddedContentBox):
2990
2991 2014-10-09  Carlos Garcia Campos  <cgarcia@igalia.com>
2992
2993         Layering violation: MediaPlayer should not reference/use FrameView
2994         https://bugs.webkit.org/show_bug.cgi?id=21562
2995
2996         Reviewed by Darin Adler.
2997
2998         Remove FrameView dependency from MediaPlayer.
2999
3000         * html/HTMLMediaElement.cpp:
3001         (WebCore::HTMLMediaElement::mediaPlayerIsInMediaDocument): Check if
3002         the element document is a media document.
3003         * html/HTMLMediaElement.h:
3004         * platform/graphics/MediaPlayer.cpp:
3005         (WebCore::MediaPlayer::MediaPlayer): Remove m_frameView initialization.
3006         (WebCore::MediaPlayer::inMediaDocument): Use the MediaPlayerClient
3007         to check if the media player is in a media document.
3008         * platform/graphics/MediaPlayer.h:
3009         (WebCore::MediaPlayerClient::mediaPlayerIsInMediaDocument):
3010         (WebCore::MediaPlayer::setFrameView): Deleted.
3011         (WebCore::MediaPlayer::frameView): Deleted.
3012         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3013         (WebCore::MediaPlayerPrivateAVFoundation::preferredRenderingMode):
3014         Do not check if the media player has a frame view, checking whether it's visible
3015         is enough.
3016         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3017         Remove unneeded header include.
3018         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Ditto.
3019         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Ditto.
3020         * rendering/RenderVideo.cpp:
3021         (WebCore::RenderVideo::~RenderVideo): Do not call MediaPlayer::setFrameView().
3022         (WebCore::RenderVideo::updatePlayer): Ditto.
3023
3024 2014-10-09  Christophe Dumez  <cdumez@apple.com>
3025
3026         Use is<>() / downcast<>() for RenderBlockFlow
3027         https://bugs.webkit.org/show_bug.cgi?id=137545
3028
3029         Reviewed by Darin Adler.
3030
3031         Use is<>() / downcast<>() for RenderBlockFlow and clean up the
3032         surrounding code.
3033
3034         No new tests, no behavior change.
3035
3036         * accessibility/AccessibilityRenderObject.cpp:
3037         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3038         * dom/Element.cpp:
3039         (WebCore::Element::renderNamedFlowFragment):
3040         (WebCore::Element::webkitGetRegionFlowRanges):
3041         * editing/Editor.cpp:
3042         (WebCore::Editor::hasBidiSelection):
3043         * inspector/InspectorOverlay.cpp:
3044         (WebCore::buildObjectForRegionHighlight):
3045         (WebCore::buildObjectForElementInfo):
3046         * rendering/EllipsisBox.h:
3047         * rendering/HitTestResult.cpp:
3048         (WebCore::HitTestResult::innerTextIfTruncated):
3049         * rendering/LayoutState.cpp:
3050         (WebCore::LayoutState::LayoutState):
3051         * rendering/RenderBlock.cpp:
3052         (WebCore::RenderBlock::removeChild):
3053         * rendering/RenderBlock.h:
3054         (WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo):
3055         * rendering/RenderBlockFlow.cpp:
3056         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
3057         (WebCore::RenderBlockFlow::layoutBlockChild):
3058         (WebCore::RenderBlockFlow::marginOffsetForSelfCollapsingBlock):
3059         (WebCore::RenderBlockFlow::marginValuesForChild):
3060         (WebCore::RenderBlockFlow::collapseMargins):
3061         (WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
3062         (WebCore::RenderBlockFlow::handleAfterSideOfBlock):
3063         (WebCore::RenderBlockFlow::mustDiscardMarginBeforeForChild):
3064         (WebCore::RenderBlockFlow::mustDiscardMarginAfterForChild):
3065         (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
3066         (WebCore::RenderBlockFlow::moveAllChildrenIncludingFloatsTo):
3067         (WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout):
3068         (WebCore::RenderBlockFlow::adjustForBorderFit):
3069         (WebCore::getHeightForLineCount):
3070         * rendering/RenderBlockFlow.h:
3071         (WebCore::RenderElement::isRenderNamedFlowFragmentContainer):
3072         * rendering/RenderBlockLineLayout.cpp:
3073         (WebCore::RenderBlockFlow::createLineBoxes):
3074         * rendering/RenderBox.cpp:
3075         (WebCore::RenderBox::styleDidChange):
3076         * rendering/RenderBoxModelObject.cpp:
3077         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
3078         * rendering/RenderDeprecatedFlexibleBox.cpp:
3079         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
3080         (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
3081         * rendering/RenderFlowThread.cpp:
3082         (WebCore::RenderFlowThread::removeFlowChildInfo):
3083         * rendering/RenderLayer.cpp:
3084         (WebCore::RenderLayer::updateLayerPositions):
3085         (WebCore::expandClipRectForRegionAndReflection):
3086         (WebCore::RenderLayer::calculateClipRects):
3087         * rendering/RenderLayerCompositor.cpp:
3088         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3089         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
3090         * rendering/RenderMultiColumnFlowThread.cpp:
3091         (WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy):
3092         (WebCore::RenderMultiColumnFlowThread::processPossibleSpannerDescendant):
3093         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
3094         * rendering/RenderMultiColumnFlowThread.h:
3095         * rendering/RenderMultiColumnSet.cpp:
3096         (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
3097         (WebCore::RenderMultiColumnSet::columnGap):
3098         * rendering/RenderMultiColumnSet.h:
3099         * rendering/RenderNamedFlowFragment.cpp:
3100         (WebCore::RenderNamedFlowFragment::fragmentContainer):
3101         * rendering/RenderObject.cpp:
3102         (WebCore::RenderObject::adjustComputedFontSizesOnBlocks):
3103         (WebCore::RenderObject::resetTextAutosizing):
3104         (WebCore::RenderObject::showLineTreeForThis):
3105         (WebCore::RenderObject::showRenderSubTreeAndMark):
3106         * rendering/RenderText.cpp:
3107         (WebCore::RenderText::setText):
3108         (WebCore::RenderText::ensureLineBoxes):
3109         (WebCore::RenderText::simpleLineLayout):
3110         * rendering/RenderTreeAsText.cpp:
3111         (WebCore::write):
3112         * rendering/RootInlineBox.cpp:
3113         (WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
3114         (WebCore::RootInlineBox::blockFlow):
3115         * rendering/SimpleLineLayoutFunctions.cpp:
3116         (WebCore::SimpleLineLayout::computeTextBoundingBox):
3117         (WebCore::SimpleLineLayout::computeTextFirstRunLocation):
3118         (WebCore::SimpleLineLayout::collectTextAbsoluteRects):
3119         (WebCore::SimpleLineLayout::collectTextAbsoluteQuads):
3120         * rendering/svg/SVGTextQuery.cpp:
3121         (WebCore::flowBoxForRenderer):
3122
3123 2014-10-09  Philip Chimento  <philip.chimento@gmail.com>
3124
3125         [GTK] Netscape plugin API symbol used outside feature guards
3126         https://bugs.webkit.org/show_bug.cgi?id=137385
3127
3128         Reviewed by Philippe Normand.
3129
3130         * plugins/PluginPackage.cpp:
3131         (WebCore::PluginPackage::unload): Add guards for Netscape Plugin
3132         API around symbol, so that it compiles OK when the API is not
3133         available.
3134
3135 2014-10-08  Mihnea Ovidenie  <mihnea@adobe.com>
3136
3137         [CSSRegions]Remove unused parameter in adjustRegionBoundsFromFlowThreadPortionRect
3138         https://bugs.webkit.org/show_bug.cgi?id=137518
3139
3140         Reviewed by Andrei Bucur.
3141
3142         This method is used only by region code in accelerated compositing.
3143         The first parameter for the method was introduced with the intent to be used for multicolumn,
3144         but without being actually used in multicolumn code. Also make the method const.
3145         No new tests as no change in functionality.
3146
3147         * rendering/RenderLayerBacking.cpp:
3148         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread):
3149         * rendering/RenderMultiColumnSet.cpp:
3150         (WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
3151         * rendering/RenderMultiColumnSet.h:
3152         * rendering/RenderRegion.cpp:
3153         (WebCore::RenderRegion::adjustRegionBoundsFromFlowThreadPortionRect):
3154         * rendering/RenderRegion.h:
3155
3156 2014-10-08  Andreas Kling  <akling@apple.com>
3157
3158         [Mac] Show repaint counters in tile coverage map.
3159         <https://webkit.org/b/137544>
3160
3161         Reviewed by Simon Fraser.
3162
3163         Add repaint counters to the tile layers in the "tiled scrolling
3164         indicator" display. This will be helpful for diagnosing issues with
3165         excessive tile repaints outside the visible viewport.
3166
3167         * platform/graphics/ca/TileController.cpp:
3168         (WebCore::TileController::setNeedsDisplayInRect):
3169         * platform/graphics/ca/TileGrid.cpp:
3170         (WebCore::TileGrid::drawTileMapContents):
3171
3172 2014-10-08  Myles C. Maxfield  <mmaxfield@apple.com>
3173
3174         Unreviewed build fix after r174480. Broke iOS build.
3175
3176         * rendering/RenderObject.cpp:
3177         (WebCore::includeNonFixedHeight):
3178
3179 2014-10-08  Myles C. Maxfield  <litherum@gmail.com>
3180
3181         Inline ruby does not get justified correctly
3182         https://bugs.webkit.org/show_bug.cgi?id=137421
3183
3184         Reviewed by Dave Hyatt.
3185
3186         We justify text in two passes: one counts expansion opportunities within a line,
3187         and the other doles out widths and expansion amounts to constituent inline boxes.
3188         This patch simply modifies both passes to descend into ruby bases. Once it has
3189         done so, we then re-layout the ruby run with the newly found width.
3190
3191         Tests: fast/ruby/ruby-justification-hittest.html
3192                fast/ruby/ruby-justification.html
3193
3194         * rendering/InlineBox.h:
3195         (WebCore::InlineBox::setExpansion): updateRubyForJustifiedText() has to set the
3196         expansion for an inline box, so make setExpansion() public.
3197         * rendering/RenderBlockLineLayout.cpp:
3198         (WebCore::updateRubyForJustifiedText): Given values that have already been
3199         computed in computeInlineDirectionPositionsForSegment(), adjust the widths and
3200         expansion values for all the various pieces of ruby.
3201         (WebCore::computeExpansionForJustifiedText): Call updateRubyForJustifiedText() if
3202         necessary.
3203         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment): When
3204         counting expansion opportunities in a line, include ruby bases.
3205         * rendering/RenderRubyRun.h: Fix grammar in comment.
3206         * rendering/RenderText.cpp:
3207         (WebCore::RenderText::stringView): Give default arguments to function.
3208         * rendering/RenderText.h: Ditto.
3209
3210 2014-10-08  Dean Jackson  <dino@apple.com>
3211
3212         PopupMenus should indicate if they are using a custom rendering
3213         https://bugs.webkit.org/show_bug.cgi?id=137543
3214         <rdar://problem/18544212>
3215
3216         Reviewed by Beth Dakin.
3217
3218         On Yosemite there is an animation as a popup menu closes. We can't use
3219         this when there is a custom rendering, since the animation doesn't match
3220         the final result. Implement this by hooking into the existing code
3221         for hiding the arrows during animation - a WebKitSystemInterface update
3222         will implement the other side.
3223
3224         * platform/mac/WebCoreSystemInterface.h: Rename parameter to be more clear.
3225         * platform/mac/WebCoreSystemInterface.mm:
3226         * rendering/RenderMenuList.cpp:
3227         (RenderMenuList::menuStyle): We need to check that we are a native-looking
3228         button, not just something with appearance.
3229
3230 2014-10-08  Christophe Dumez  <cdumez@apple.com>
3231
3232         Use is<>() / downcast<>() for RenderBlock objects
3233         https://bugs.webkit.org/show_bug.cgi?id=137512
3234
3235         Reviewed by Darin Adler.
3236
3237         Use is<>() / downcast<>() for RenderBlock objects and clean up the
3238         surrounding code.
3239
3240         No new tests, no behavior change.
3241
3242         * accessibility/AccessibilityRenderObject.cpp:
3243         (WebCore::firstChildConsideringContinuation):
3244         (WebCore::lastChildConsideringContinuation):
3245         (WebCore::AccessibilityRenderObject::firstChild):
3246         (WebCore::startOfContinuations):
3247         (WebCore::endOfContinuations):
3248         (WebCore::childBeforeConsideringContinuations):
3249         (WebCore::AccessibilityRenderObject::previousSibling):
3250         (WebCore::AccessibilityRenderObject::nextSibling):
3251         (WebCore::nextContinuation):
3252         (WebCore::AccessibilityRenderObject::renderParentObject):
3253         (WebCore::AccessibilityRenderObject::anchorElement):
3254         (WebCore::AccessibilityRenderObject::setValue):
3255         * bindings/objc/DOMUIKitExtensions.mm:
3256         (-[DOMNode containsOnlyInlineObjects]):
3257         (-[DOMNode isSelectableBlock]):
3258         (-[DOMHTMLElement structuralComplexityContribution]):
3259         * css/CSSComputedStyleDeclaration.cpp:
3260         (WebCore::valueForGridTrackList):
3261         * editing/CompositeEditCommand.cpp:
3262         (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
3263         * editing/TextIterator.cpp:
3264         (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
3265         * page/ios/FrameIOS.mm:
3266         (WebCore::Frame::preferredHeight):
3267         * rendering/LogicalSelectionOffsetCaches.h:
3268         (WebCore::containingBlockForFixedPosition):
3269         (WebCore::containingBlockForAbsolutePosition):
3270         (WebCore::containingBlockForObjectInFlow):
3271         * rendering/RenderBlock.cpp:
3272         (WebCore::RenderBlock::styleWillChange):
3273         (WebCore::RenderBlock::continuationBefore):
3274         (WebCore::RenderBlock::splitBlocks):
3275         (WebCore::RenderBlock::addChildIgnoringContinuation):
3276         (WebCore::canMergeAnonymousBlock):
3277         (WebCore::canMergeContiguousAnonymousBlocks):
3278         (WebCore::RenderBlock::collapseAnonymousBoxChild):
3279         (WebCore::RenderBlock::removeChild):
3280         (WebCore::RenderBlock::blockElementContinuation):
3281         (WebCore::RenderBlock::blockSelectionGaps):
3282         (WebCore::RenderBlock::blockBeforeWithinSelectionRoot):
3283         (WebCore::isChildHitTestCandidate):
3284         (WebCore::RenderBlock::firstLineBlock):
3285         (WebCore::findFirstLetterBlock):
3286         (WebCore::RenderBlock::childBecameNonInline):
3287         (WebCore::RenderBlock::hasMarginBeforeQuirk):
3288         (WebCore::RenderBlock::hasMarginAfterQuirk):
3289         * rendering/RenderBlock.h:
3290         * rendering/RenderBlockFlow.cpp:
3291         (WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
3292         (WebCore::RenderBlockFlow::estimateLogicalTopPosition):
3293         (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
3294         (WebCore::RenderBlockFlow::positionNewFloats):
3295         (WebCore::RenderBlockFlow::markSiblingsWithFloatsForLayout):
3296         * rendering/RenderBlockLineLayout.cpp:
3297         (WebCore::RenderBlockFlow::positionNewFloatOnLine):
3298         * rendering/RenderBox.cpp:
3299         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
3300         (WebCore::RenderBox::availableLogicalHeightUsing):
3301         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
3302         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
3303         (WebCore::computeInlineStaticDistance):
3304         (WebCore::RenderBox::computePositionedLogicalWidth):
3305         (WebCore::RenderBox::computePositionedLogicalHeight):
3306         * rendering/RenderBoxModelObject.cpp:
3307         (WebCore::accumulateInFlowPositionOffsets):
3308         (WebCore::RenderBoxModelObject::moveChildTo):
3309         (WebCore::RenderBoxModelObject::moveChildrenTo):
3310         * rendering/RenderElement.cpp:
3311         (WebCore::RenderElement::propagateStyleToAnonymousChildren):
3312         * rendering/RenderFlowThread.cpp:
3313         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
3314         * rendering/RenderFullScreen.cpp:
3315         (WebCore::RenderFullScreen::unwrapRenderer):
3316         * rendering/RenderInline.cpp:
3317         (WebCore::RenderInline::inlineElementContinuation):
3318         (WebCore::updateStyleOfAnonymousBlockContinuations):
3319         (WebCore::RenderInline::styleDidChange):
3320         (WebCore::nextContinuation):
3321         (WebCore::RenderInline::splitFlow):
3322         (WebCore::RenderInline::positionForPoint):
3323         * rendering/RenderLayer.cpp:
3324         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
3325         (WebCore::RenderLayer::calculateClipRects):
3326         * rendering/RenderListItem.cpp:
3327         (WebCore::getParentOfFirstLineBox):
3328         (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
3329         (WebCore::RenderListItem::positionListMarker):
3330         * rendering/RenderNamedFlowFragment.cpp:
3331         (WebCore::RenderNamedFlowFragment::maxPageLogicalHeight):
3332         * rendering/RenderObject.cpp:
3333         (WebCore::includeNonFixedHeight):
3334         (WebCore::RenderObject::checkBlockPositionedObjectsNeedLayout):
3335         (WebCore::RenderObject::containingBlock):
3336         (WebCore::RenderObject::handleDynamicFloatPositionChange):
3337         (WebCore::RenderObject::removeAnonymousWrappersForInlinesIfNecessary):
3338         (WebCore::RenderObject::getTextDecorationColors):
3339         * rendering/RenderRuby.cpp:
3340         (WebCore::rubyBeforeBlock):
3341         (WebCore::rubyAfterBlock):
3342         * rendering/RenderRubyBase.cpp:
3343         (WebCore::RenderRubyBase::moveInlineChildren):
3344         (WebCore::RenderRubyBase::moveBlockChildren):
3345         * rendering/RenderThemeMac.mm:
3346         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
3347         * rendering/TextAutosizer.cpp:
3348         (WebCore::TextAutosizer::processSubtree):
3349         (WebCore::TextAutosizer::processContainer):
3350         (WebCore::TextAutosizer::measureDescendantTextWidth):
3351         (WebCore::TextAutosizer::findDeepestBlockContainingAllText):
3352         (WebCore::TextAutosizer::findFirstTextLeafNotInCluster):
3353         * rendering/mathml/RenderMathMLRoot.cpp:
3354         (WebCore::RenderMathMLRoot::layout):
3355
3356 2014-10-08  Jer Noble  <jer.noble@apple.com>
3357
3358         Unreviewed follow-up fix for r174460. Do not register for KVOs if the object does not respond to the requested property.
3359
3360         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
3361         (-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]):
3362         (-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]):
3363         (-[CDMSessionMediaSourceAVFObjCObserver invalidate]):
3364
3365 2014-10-08  Dean Jackson  <dino@apple.com>
3366
3367         Add deprecation warning for CSSKeyframesRule::appendRule
3368         https://bugs.webkit.org/show_bug.cgi?id=137532
3369         <rdar://problem/18585745>
3370
3371         Reviewed by Brent Fulgham.
3372
3373         In r173982 (webkit.org/b/57910) we added insertRule to match
3374         the spec. We should print a warning to the JS console suggesting
3375         users move to insertRule.
3376
3377         * css/WebKitCSSKeyframesRule.cpp:
3378         (WebCore::WebKitCSSKeyframesRule::appendRule): Add a message to the system
3379         console.
3380         * css/WebKitCSSKeyframesRule.h:
3381
3382 2014-10-08  Myles C. Maxfield  <mmaxfield@apple.com>
3383
3384         Text drawn with an SVG font has no spaces when word-rounding hacks are enabled
3385         https://bugs.webkit.org/show_bug.cgi?id=137463
3386
3387         Reviewed by Darin Adler.
3388
3389         When rounding hacks are enabled, we use the "adjusted space width" instead of the
3390         regular space width. However, the SVG-font-specific implementation of the
3391         SimpleFontData constructor doesn't initialize this value, so it was getting set
3392         to an undefined value (which happened to be close to 0 in my tests).
3393
3394         Test: svg/text/svg-font-word-rounding-hacks-spaces.html
3395
3396         * css/CSSFontFaceSource.cpp:
3397         (WebCore::CSSFontFaceSource::getFontData):
3398         (WebCore::CSSFontFaceSource::ensureFontData):
3399         * loader/cache/CachedFont.cpp:
3400         (WebCore::CachedFont::ensureCustomFontData):
3401         (WebCore::CachedFont::getSVGFontById):
3402         * platform/graphics/SimpleFontData.h:
3403         * svg/SVGFontData.cpp:
3404         (WebCore::SVGFontData::initializeFontData):
3405
3406 2014-10-08  Brent Fulgham  <bfulgham@apple.com>
3407
3408         [Win] Resolve various static analyzer warnings in WebCore.
3409         https://bugs.webkit.org/show_bug.cgi?id=137526
3410
3411         Reviewed by Dean Jackson.
3412
3413         A series of small changes to resolve various issues found by the MSVC static analyzer.
3414
3415         * inspector/NetworkResourcesData.cpp:
3416         (WebCore::NetworkResourcesData::clear): Add assertion that it->value should never be null.
3417         * page/SessionIDHash.h:
3418         (WTF::HashTraits<WebCore::SessionID>::constructDeletedValue): Add explicit cast to avoid
3419         compiler warning.
3420         (WTF::HashTraits<WebCore::SessionID>::isDeletedValue): Ditto.
3421         * page/win/FrameCGWin.cpp:
3422         (WebCore::imageFromRect): Resolve static analyzer warnings by initializing bits, and
3423         checking the return value of ::CreateDIBSection, which return nullptr on error.
3424         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3425         (printLayer): Use correct MSVC format specifier for size_t.
3426         * platform/graphics/win/FontCacheWin.cpp:
3427         (WebCore::getLinkedFonts): Handle possibility that a font link key does not exist.
3428         (WebCore::FontCache::systemFallbackForCharacters): Handle error case when a valid code page
3429         does not exist for a given character.
3430         * platform/graphics/win/SimpleFontDataWin.cpp:
3431         (WebCore::SimpleFontData::containsCharacters): Handle error cases for mapping to the CP_ACP code page,
3432         and related failures when attempting to access the contents of a given code page.
3433         * platform/graphics/win/UniscribeController.cpp:
3434         (WebCore::UniscribeController::itemizeShapeAndPlace): Handle possible failure in the
3435         ScriptItemize API call.
3436         (WebCore::UniscribeController::shapeAndPlaceItem): Ditto for ScriptXtoCP API call.
3437         * platform/win/BString.h: Use consistent SAL annotations for our typedeof of BSTR as in