5f0b319a8f5032982c5ef404f93172d8b13278dc
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-10-14  Martin Hock  <mhock@apple.com>
2
3         Update ViewportConfiguration whenever its size attributes change
4         https://bugs.webkit.org/show_bug.cgi?id=137682
5         rdar://problem/18643655
6
7         Reviewed by Benjamin Poulain.
8
9         * page/ViewportConfiguration.cpp:
10         (WebCore::ViewportConfiguration::setMinimumLayoutSize):
11         (WebCore::ViewportConfiguration::setMinimumLayoutSizeForMinimalUI):
12
13 2014-10-14  Joseph Pecoraro  <pecoraro@apple.com>
14
15         Web Inspector: Processing Instruction Nodes appear poorly in DOM Tree
16         https://bugs.webkit.org/show_bug.cgi?id=137681
17
18         Reviewed by Timothy Hatcher.
19
20         * inspector/InspectorDOMAgent.cpp:
21         (WebCore::InspectorDOMAgent::buildObjectForNode):
22         Include the nodeName, localName, and nodeValue (string data)
23         properties for processing instruction nodes.
24
25 2014-10-14  Chris Dumez  <cdumez@apple.com>
26
27         Use is<>() / downcast<>() for RenderFrame / RenderFrameSet
28         https://bugs.webkit.org/show_bug.cgi?id=137696
29
30         Reviewed by Darin Adler.
31
32         Use is<>() / downcast<>() for RenderFrame / RenderFrameSet.
33
34         No new tests, no behavior change.
35
36         * html/HTMLFrameSetElement.cpp:
37         (WebCore::HTMLFrameSetElement::defaultEventHandler):
38         * rendering/RenderFrame.cpp:
39         (WebCore::RenderFrame::updateFromElement):
40         * rendering/RenderFrame.h:
41         * rendering/RenderFrameSet.cpp:
42         (WebCore::RenderFrameSet::computeEdgeInfo):
43         (WebCore::RenderFrameSet::positionFramesWithFlattening):
44         * rendering/RenderFrameSet.h:
45
46 2014-10-14  Youenn Fablet  <youennf@gmail.com>
47
48         [XHR] Abort method execution when m_loader->cancel() in internalAbort() caused reentry
49         https://bugs.webkit.org/show_bug.cgi?id=126975
50
51         Reviewed by Alexey Proskuryakov.
52
53         Merging https://chromium.googlesource.com/chromium/blink/+/0d75daf2053631518606ae15daaece701a25b2c4
54         Ensuring new test from https://codereview.chromium.org/76133002/ is passing.
55
56         Test: http/tests/xmlhttprequest/reentrant-cancel-abort.html
57
58         * xml/XMLHttpRequest.cpp:
59         (WebCore::XMLHttpRequest::open): exit early if internalAbort asks so
60         (WebCore::XMLHttpRequest::abort): exit early if internalAbort asks so
61         (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)   
62         (WebCore::XMLHttpRequest::didTimeout): exit early if internalAbort asks so
63         * xml/XMLHttpRequest.h:
64
65 2014-10-14  Alejandro G. Castro  <alex@igalia.com>
66
67         Multiple refactors in RenderMathMLOperator
68         https://bugs.webkit.org/show_bug.cgi?id=137611
69
70         Reviewed by Darin Adler.
71
72         The changes include:
73         - Rename m_operator to m_textContent.
74         - Make most of the functions private, we needed to create some
75         public member functions to be able to make the some funtions private
76         and move trailingSpaceError to RenderMathMLOperator.
77         - Fix incorrect capitalization of setOperatorProperties function.
78         - Make all data members private and move them to the end of the
79         class defition.
80
81         No new tests as no change in functionality.
82
83         * rendering/mathml/RenderMathMLOperator.cpp:
84         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
85         (WebCore::RenderMathMLOperator::setOperatorProperties): Renamed,
86         incorrect capitalization
87         (WebCore::RenderMathMLOperator::stretchTo):
88         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
89         (WebCore::RenderMathMLOperator::rebuildTokenContent):
90         (WebCore::RenderMathMLOperator::updateFromElement):
91         (WebCore::RenderMathMLOperator::updateOperatorProperties):
92         (WebCore::RenderMathMLOperator::shouldAllowStretching):
93         (WebCore::RenderMathMLOperator::updateStyle):
94         (WebCore::RenderMathMLOperator::trailingSpaceError):
95         (WebCore::RenderMathMLOperator::SetOperatorProperties): Deleted.
96         (WebCore::RenderMathMLOperator::advanceForGlyph): Deleted.
97         (WebCore::RenderMathMLOperator::updateTokenContent): Deleted.
98         (WebCore::RenderMathMLOperator::getGlyphAssemblyFallBack): Deleted.
99         * rendering/mathml/RenderMathMLOperator.h:
100         (WebCore::RenderMathMLOperator::setLeadingSpace): Added.
101         (WebCore::RenderMathMLOperator::setTrailingSpace):  Added.
102         (WebCore::RenderMathMLOperator::textContent): Added.
103         (WebCore::RenderMathMLOperator::isInvisibleOperator):
104         * rendering/mathml/RenderMathMLRadicalOperator.cpp:
105         (WebCore::RenderMathMLRadicalOperator::setOperatorProperties):
106         Renamed, incorrect capitalization
107         (WebCore::RenderMathMLRadicalOperator::SetOperatorProperties): Deleted.
108         (WebCore::RenderMathMLRadicalOperator::trailingSpaceError): Deleted.
109         * rendering/mathml/RenderMathMLRadicalOperator.h:
110
111 2014-10-14  Alejandro G. Castro  <alex@igalia.com>
112
113         Changes in the stretchy attribute do not update rendering
114         https://bugs.webkit.org/show_bug.cgi?id=136883
115
116         Reviewed by Darin Adler.
117
118         Test: mathml/presentation/mo-stretch-update.html
119
120         We need to relayout when a change in the stretchy attribute
121         happens.
122
123         * mathml/MathMLTextElement.cpp:
124         (WebCore::MathMLTextElement::parseAttribute): Parse the
125         modifications of the stretchy attribute.
126         * mathml/MathMLTextElement.h:
127         * rendering/mathml/RenderMathMLOperator.cpp:
128         (WebCore::RenderMathMLOperator::setOperatorFlagAndScheduleLayoutIfNeeded):
129         Add function that receives the value instead of looking for it and
130         checks if the change should schedule a layout.
131         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttribute):
132         (WebCore::RenderMathMLOperator::setOperatorFlagFromAttributeValue):
133         Add function that receives the value instead of looking for it.
134         * rendering/mathml/RenderMathMLOperator.h:
135
136 2014-10-14  Chris Dumez  <cdumez@apple.com>
137
138         Use is<>() / downcast<>() for RenderImage
139         https://bugs.webkit.org/show_bug.cgi?id=137683
140
141         Reviewed by Mihnea Ovidenie.
142
143         Use is<>() / downcast<>() for RenderImage.
144
145         No new tests, no behavior change.
146
147         * accessibility/AccessibilityNodeObject.cpp:
148         (WebCore::AccessibilityNodeObject::alternativeText):
149         * accessibility/AccessibilityRenderObject.cpp:
150         (WebCore::AccessibilityRenderObject::addImageMapChildren):
151         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
152         * bindings/objc/DOM.mm:
153         (-[DOMElement image]):
154         (-[DOMElement _imageTIFFRepresentation]):
155         * editing/TextIterator.cpp:
156         (WebCore::TextIterator::handleReplacedElement):
157         * editing/cocoa/HTMLConverter.mm:
158         (fileWrapperForElement):
159         * editing/gtk/EditorGtk.cpp:
160         (WebCore::getImageForElement):
161         * editing/ios/EditorIOS.mm:
162         (WebCore::getImage):
163         * editing/mac/EditorMac.mm:
164         (WebCore::getImage):
165         * html/HTMLAnchorElement.cpp:
166         (WebCore::appendServerMapMousePosition):
167         * html/HTMLAreaElement.cpp:
168         (WebCore::HTMLAreaElement::setFocus):
169         * html/HTMLImageElement.cpp:
170         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
171         (WebCore::HTMLImageElement::parseAttribute):
172         (WebCore::HTMLImageElement::didAttachRenderers):
173         (WebCore::HTMLImageElement::createImageControls):
174         (WebCore::HTMLImageElement::destroyImageControls):
175         * html/HTMLVideoElement.cpp:
176         (WebCore::HTMLVideoElement::didAttachRenderers):
177         (WebCore::HTMLVideoElement::parseAttribute):
178         * html/ImageInputType.cpp:
179         (WebCore::ImageInputType::altAttributeChanged):
180         (WebCore::ImageInputType::attach):
181         * html/canvas/CanvasRenderingContext2D.cpp:
182         (WebCore::size):
183         * html/shadow/mac/ImageControlsRootElementMac.cpp:
184         (WebCore::RenderImageControls::updateLogicalWidth):
185         (WebCore::RenderImageControls::computeLogicalHeight):
186         * loader/ImageLoader.cpp:
187         (WebCore::ImageLoader::renderImageResource):
188         * page/ContextMenuController.cpp:
189         (WebCore::imageFromImageElementNode):
190         * page/DragController.cpp:
191         (WebCore::getCachedImage):
192         (WebCore::getImage):
193         * platform/win/PasteboardWin.cpp:
194         (WebCore::Pasteboard::writeImage):
195         (WebCore::getCachedImage):
196         * rendering/HitTestResult.cpp:
197         (WebCore::HitTestResult::image):
198         * rendering/RenderImage.h:
199         * rendering/RenderImageResource.cpp:
200         (WebCore::RenderImageResource::getImageSize):
201         * rendering/RenderLayerBacking.cpp:
202         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
203         (WebCore::RenderLayerBacking::updateImageContents):
204         * rendering/RenderReplaced.cpp:
205         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
206         * rendering/shapes/ShapeOutsideInfo.cpp:
207         (WebCore::ShapeOutsideInfo::createShapeForImage):
208
209 2014-10-14  Andrzej Badowski  <a.badowski@samsung.com>
210
211         [AX] Improve AccessibilityTableCell columnHeaders and rowHeaders functions.
212         https://bugs.webkit.org/show_bug.cgi?id=136818
213
214         Reviewed by Chris Fleizach.
215
216         Take into account that <th> elements can be both the column headers and row headers 
217         improved the operation of two functions: columnHeaders and rowHeaders.
218
219         Test: accessibility/table-headers.html
220
221         * accessibility/AccessibilityTableCell.cpp:
222         (WebCore::AccessibilityTableCell::isColumnHeaderCell):
223         A new function that helps the main goal.
224         (WebCore::AccessibilityTableCell::isRowHeaderCell):
225         A new function that helps the main goal.
226         (WebCore::AccessibilityTableCell::columnHeaders):
227         Use isColumnHeaderCell instead of isTableHeaderCell.
228         (WebCore::AccessibilityTableCell::rowHeaders):
229         Use isRowHeaderCell also includes <th> row header element next to the scope attribute.
230         * accessibility/AccessibilityTableCell.h:
231         Adds new functions to the header file.
232
233 2014-10-14  Csaba Osztrogon√°c  <ossy@webkit.org>
234
235         Fix the !ENABLE(VIDEO) build after r174353
236         https://bugs.webkit.org/show_bug.cgi?id=137655
237
238         Reviewed by Darin Adler.
239
240         * dom/Document.cpp:
241         * dom/Document.h:
242         * page/Page.cpp:
243         * page/Page.h:
244
245 2014-10-14  peavo@outlook.com  <peavo@outlook.com>
246
247         [Curl] Compile error in CurlDownload.cpp.
248         https://bugs.webkit.org/show_bug.cgi?id=137654
249
250         Reviewed by Philippe Normand.
251
252         A template specialization is not needed anymore.
253
254         * platform/network/curl/CurlDownload.cpp:
255
256 2014-10-13  Joseph Pecoraro  <pecoraro@apple.com>
257
258         Web Inspector: Remove unused stale Page protocol methods
259         https://bugs.webkit.org/show_bug.cgi?id=137678
260
261         Reviewed by Andreas Kling.
262
263         * inspector/InspectorClient.h:
264         (WebCore::InspectorClient::canShowDebugBorders): Deleted.
265         (WebCore::InspectorClient::setShowDebugBorders): Deleted.
266         (WebCore::InspectorClient::canShowFPSCounter): Deleted.
267         (WebCore::InspectorClient::setShowFPSCounter): Deleted.
268         (WebCore::InspectorClient::canContinuouslyPaint): Deleted.
269         (WebCore::InspectorClient::setContinuousPaintingEnabled): Deleted.
270         * inspector/InspectorPageAgent.cpp:
271         (WebCore::InspectorPageAgent::disable):
272         (WebCore::InspectorPageAgent::canShowDebugBorders): Deleted.
273         (WebCore::InspectorPageAgent::setShowDebugBorders): Deleted.
274         (WebCore::InspectorPageAgent::canShowFPSCounter): Deleted.
275         (WebCore::InspectorPageAgent::setShowFPSCounter): Deleted.
276         (WebCore::InspectorPageAgent::canContinuouslyPaint): Deleted.
277         (WebCore::InspectorPageAgent::setContinuousPaintingEnabled): Deleted.
278         * inspector/InspectorPageAgent.h:
279         * inspector/protocol/Page.json:
280
281 2014-10-13  Eric Carlson  <eric.carlson@apple.com>
282
283         [iOS] Refactor AirPlay monitoring code
284         https://bugs.webkit.org/show_bug.cgi?id=137645
285         <rdar://problem/18444817>
286
287         Reviewed by Jer Noble.
288
289         Refactor AirPlay route change monitoring code:
290         + Have MediaSessionManager register/unregister for route changes depending on the state of
291             all sessions so it does the right thing when there is more than one media element.
292         + Make HTMLMediaElement unregister with MediaSession as soon as the media player is cleared
293             because there can be no wireless playback without a player.
294
295         * html/HTMLMediaElement.cpp:
296         (WebCore::HTMLMediaElement::~HTMLMediaElement): Call mediaSession->setHasPlaybackTargetAvailabilityListeners
297             when there are target availability changed listeners.
298         (WebCore::HTMLMediaElement::clearMediaPlayer): Ditto.
299         (WebCore::HTMLMediaElement::wirelessRoutesAvailableDidChange): New, media session client method.
300         * html/HTMLMediaElement.h:
301
302         * html/HTMLMediaSession.cpp:
303         (WebCore::HTMLMediaSession::HTMLMediaSession): Initialize m_hasPlaybackTargetAvailabilityListeners.
304         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners): Remember whether or not
305             the client has a target availability listener and tell the media session manager to reconfigure
306             itself instead of telling it to start or stop listening for route changes so it does the 
307             right thing when there is more than one media element.
308         * html/HTMLMediaSession.h:
309         (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): Return true when the client 
310             has a target availability listener, false otherwise.
311
312         * platform/audio/MediaSession.cpp:
313         (WebCore::MediaSession::wirelessRoutesAvailableDidChange): Inform the client that routes have changed.
314         * platform/audio/MediaSession.h:
315         (WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring):
316         (WebCore::MediaSessionClient::wirelessRoutesAvailableDidChange):
317
318         * platform/audio/MediaSessionManager.cpp:
319         (WebCore::MediaSessionManager::wirelessRoutesAvailableChanged): Implement it.
320         * platform/audio/MediaSessionManager.h:
321         (WebCore::MediaSessionManager::configureWireLessTargetMonitoring):
322         (WebCore::MediaSessionManager::hasWirelessTargetsAvailable):
323         (WebCore::MediaSessionManager::sessions):
324         (WebCore::MediaSessionManager::startMonitoringAirPlayRoutes): Deleted.
325         (WebCore::MediaSessionManager::stopMonitoringAirPlayRoutes): Deleted.
326
327         * platform/audio/ios/MediaSessionManagerIOS.h:
328         * platform/audio/ios/MediaSessionManagerIOS.mm:
329         (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Start or stop monitoring
330             for route changes depending on client state.
331         (WebCore::MediaSessionManageriOS::startMonitoringAirPlayRoutes): Deleted.
332         (WebCore::MediaSessionManageriOS::stopMonitoringAirPlayRoutes): Deleted.
333
334 2014-10-13  Chris Dumez  <cdumez@apple.com>
335
336         [Mac] Return value of createImageSourceOptions() is leaked in ImageSourceCG
337         https://bugs.webkit.org/show_bug.cgi?id=137677
338
339         Reviewed by Simon Fraser.
340
341         The return value of createImageSourceOptions() was leaked in
342         ImageSourceCG.cpp. It was returning a CFDictionaryRef created using
343         CFDictionaryCreate(). Therefore, the return value should have been
344         released but wasn't.
345
346         This patch makes createImageSourceOptions() return a
347         RetainPtr<CFDictionaryRef> to make sure the CFDictionaryRef properly
348         gets released after use.
349
350         No new tests, no behavior change.
351
352         * platform/graphics/cg/ImageSourceCG.cpp:
353         (WebCore::createImageSourceOptions):
354         (WebCore::imageSourceOptions):
355         (WebCore::ImageSource::isSizeAvailable):
356         (WebCore::ImageSource::allowSubsamplingOfFrameAtIndex):
357         (WebCore::ImageSource::frameSizeAtIndex):
358         (WebCore::ImageSource::orientationAtIndex):
359         (WebCore::ImageSource::getHotSpot):
360         (WebCore::ImageSource::repetitionCount):
361         (WebCore::ImageSource::createFrameAtIndex):
362         (WebCore::ImageSource::frameDurationAtIndex):
363
364 2014-10-13  Yusuke Suzuki  <utatane.tea@gmail.com>
365
366         CSS JIT: Implement :visited pseudo class
367         https://bugs.webkit.org/show_bug.cgi?id=135293
368
369         Reviewed by Benjamin Poulain.
370
371         This patch implements CSS JIT for :visited. And it makes :not(:link) JIT-ed.
372         Following the design discussed at the other bug[1], implemented :visited JIT
373         without tracking VisitedMatchEnabled state.
374
375         In this patch, we change the semantics of :visited / :link
376         inside functional pseudo classes for further CSS Selector Level 4 extensions.
377
378         Edge cases are tested by the existing tests.
379         :not(:link)
380             fast/history/link-inside-not.html
381         :not(:visited)
382             fast/history/visited-inside-not.html
383         :-webkit-any(:link)
384             fast/history/link-inside-any.html
385         :-webkit-any(:visited)
386             fast/history/visited-inside-any.html
387
388         [1]: https://bugs.webkit.org/show_bug.cgi?id=135639
389
390         Test: fast/history/link-inside-not-inside-any.html
391             To cover the :-webkit-any(:not(:link)), added new tests.
392
393         * css/SelectorChecker.cpp:
394         (WebCore::SelectorChecker::checkOne):
395         * cssjit/SelectorCompiler.cpp:
396         (WebCore::SelectorCompiler::addPseudoClassType):
397         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
398         (WebCore::SelectorCompiler::constructFragments):
399         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
400         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorCheckerExcludingPseudoElements):
401         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRightmostTreeWalker):
402         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
403         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
404         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsFirstLink):
405         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateStoreLastVisitedElement):
406
407 2014-10-13  Chris Dumez  <cdumez@apple.com>
408
409         Use modern loops in RenderLayerCompositor
410         https://bugs.webkit.org/show_bug.cgi?id=137670
411
412         Reviewed by Simon Fraser.
413
414         Use modern range for-loops in RenderLayerCompositor.
415
416         No new tests, no behavior change.
417
418         * rendering/RenderLayerCompositor.cpp:
419         (WebCore::OverlapMapContainer::overlapsLayers):
420         (WebCore::RenderLayerCompositor::OverlapMap::RectList::intersects):
421         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush):
422         (WebCore::RenderLayerCompositor::updateCustomLayersAfterFlush):
423         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
424         (WebCore::RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed):
425         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
426         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
427         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTreeForNamedFlowFixed):
428         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
429         (WebCore::RenderLayerCompositor::rebuildRegionCompositingLayerTree):
430         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
431         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
432         (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
433         (WebCore::resetTrackedRepaintRectsRecursive):
434         (WebCore::RenderLayerCompositor::layerHas3DContent):
435         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
436         (WebCore::RenderLayerCompositor::registerAllScrollingLayers):
437         (WebCore::RenderLayerCompositor::unregisterAllScrollingLayers):
438
439 2014-10-13  Chris Dumez  <cdumez@apple.com>
440
441         Drop unnecessary overlapMap null checks in computeCompositingRequirements()
442         https://bugs.webkit.org/show_bug.cgi?id=137668
443
444         Reviewed by Andreas Kling.
445
446         Drop unnecessary overlapMap null checks in computeCompositingRequirements().
447         The function is never called with a null overlapMap so we can make the
448         argument a reference and drop all the null checks.
449
450         No new tests, no behavior change.
451
452         * rendering/RenderLayerCompositor.cpp:
453         (WebCore::RenderLayerCompositor::updateCompositingLayers):
454         (WebCore::RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed):
455         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
456         (WebCore::RenderLayerCompositor::computeRegionCompositingRequirements):
457         * rendering/RenderLayerCompositor.h:
458
459 2014-10-13  Chris Dumez  <cdumez@apple.com>
460
461         Use is<>() / downcast<>() for PlatformCALayer subclasses
462         https://bugs.webkit.org/show_bug.cgi?id=137661
463
464         Reviewed by Simon Fraser.
465
466         Use is<>() / downcast<>() for PlatformCALayer subclasses and clean up
467         the surrounding code.
468
469         No new tests, no behavior change.
470
471         * platform/graphics/ca/GraphicsLayerCA.cpp:
472         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
473         (WebCore::GraphicsLayerCA::updateContentsRects):
474         (WebCore::GraphicsLayerCA::updateReplicatedLayers):
475         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
476         (WebCore::GraphicsLayerCA::fetchCloneLayers): Deleted.
477         * platform/graphics/ca/PlatformCALayer.h:
478         * platform/graphics/ca/TileCoverageMap.cpp:
479         (WebCore::TileCoverageMap::TileCoverageMap):
480         * platform/graphics/ca/TileGrid.cpp:
481         (WebCore::TileGrid::ensureTilesForRect):
482         * platform/graphics/ca/mac/PlatformCALayerMac.h:
483         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
484         (PlatformCALayerMac::clone):
485         (PlatformCALayerMac::appendSublayer):
486         (PlatformCALayerMac::insertSublayer):
487         (PlatformCALayerMac::replaceSublayer):
488         (PlatformCALayerMac::adoptSublayers):
489         (PlatformCALayerMac::copyFiltersFrom):
490         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
491         (WebCore::CACFLayerTreeHost::setRootChildLayer):
492         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
493         (PlatformCALayerWin::clone):
494         (PlatformCALayerWin::rootLayer):
495         (PlatformCALayerWin::appendSublayer):
496         (PlatformCALayerWin::insertSublayer):
497         (PlatformCALayerWin::replaceSublayer):
498         (PlatformCALayerWin::adoptSublayers):
499         (PlatformCALayerWin::copyFiltersFrom):
500         * platform/graphics/ca/win/PlatformCALayerWin.h:
501         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
502         (PlatformCALayerWinInternal::insertSublayer):
503         * platform/graphics/ca/win/PlatformCALayerWinInternal.h:
504
505 2014-10-13  Chris Dumez  <cdumez@apple.com>
506
507         Use is<>() / downcast<>() for Filter / FilterOperation subclasses
508         https://bugs.webkit.org/show_bug.cgi?id=137644
509
510         Reviewed by Darin Adler.
511
512         Use is<>() / downcast<>() for Filter / FilterOperation subclasses.
513
514         No new tests, no behavior change.
515
516         * css/CSSComputedStyleDeclaration.cpp:
517         (WebCore::ComputedStyleExtractor::valueForFilter):
518         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
519         (PlatformCAFilters::filterValueForOperation):
520         (PlatformCAFilters::colorMatrixValueForFilter):
521         * platform/graphics/filters/Filter.h:
522         * platform/graphics/filters/FilterOperation.cpp:
523         (WebCore::DefaultFilterOperation::operator==):
524         (WebCore::ReferenceFilterOperation::operator==):
525         (WebCore::BasicColorMatrixFilterOperation::blend):
526         (WebCore::BasicColorMatrixFilterOperation::operator==):
527         (WebCore::BasicComponentTransferFilterOperation::blend):
528         (WebCore::BasicComponentTransferFilterOperation::operator==):
529         (WebCore::BlurFilterOperation::operator==):
530         (WebCore::BlurFilterOperation::blend):
531         (WebCore::DropShadowFilterOperation::operator==):
532         (WebCore::DropShadowFilterOperation::blend):
533         * platform/graphics/filters/FilterOperation.h:
534         * platform/graphics/filters/FilterOperations.cpp:
535         (WebCore::FilterOperations::outsets):
536         * rendering/FilterEffectRenderer.cpp:
537         (WebCore::FilterEffectRenderer::build):
538         * rendering/RenderLayerFilterInfo.cpp:
539         (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):
540         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
541         (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
542         * svg/graphics/filters/SVGFilter.h:
543         (isType):
544
545 2014-10-13  Chris Dumez  <cdumez@apple.com>
546
547         Use is<>() / downcast<>() for Table render objects
548         https://bugs.webkit.org/show_bug.cgi?id=137641
549
550         Reviewed by Mihnea Ovidenie.
551
552         Use is<>() / downcast<>() for table-related render objects and clean
553         up the surrounding code.
554
555         No new tests, no behavior change.
556
557         * accessibility/AccessibilityARIAGrid.cpp:
558         (WebCore::AccessibilityARIAGrid::addChildren):
559         * accessibility/AccessibilityTable.cpp:
560         (WebCore::AccessibilityTable::tableElement):
561         (WebCore::AccessibilityTable::isDataTable):
562         (WebCore::AccessibilityTable::isTableExposableThroughAccessibility):
563         (WebCore::AccessibilityTable::addChildren):
564         * accessibility/AccessibilityTableCell.cpp:
565         (WebCore::AccessibilityTableCell::parentTable):
566         (WebCore::AccessibilityTableCell::rowIndexRange):
567         (WebCore::AccessibilityTableCell::columnIndexRange):
568         (WebCore::AccessibilityTableCell::titleUIElement):
569         * accessibility/AccessibilityTableColumn.cpp:
570         (WebCore::AccessibilityTableColumn::headerObject):
571         * editing/DeleteSelectionCommand.cpp:
572         (WebCore::DeleteSelectionCommand::removeNode):
573         * editing/TextIterator.cpp:
574         (WebCore::shouldEmitTabBeforeNode):
575         (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
576         * html/HTMLTableCellElement.cpp:
577         (WebCore::HTMLTableCellElement::parseAttribute):
578         (WebCore::HTMLTableCellElement::cellAbove):
579         * html/HTMLTableColElement.cpp:
580         (WebCore::HTMLTableColElement::parseAttribute):
581         * mathml/MathMLElement.cpp:
582         (WebCore::MathMLElement::parseAttribute):
583         * rendering/AutoTableLayout.cpp:
584         (WebCore::AutoTableLayout::recalcColumn):
585         (WebCore::shouldScaleColumns):
586         * rendering/RenderBlockFlow.cpp:
587         (WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths):
588         * rendering/RenderBox.cpp:
589         (WebCore::RenderBox::computePercentageLogicalHeight):
590         (WebCore::RenderBox::layoutOverflowRectForPropagation):
591         * rendering/RenderElement.cpp:
592         (WebCore::RenderElement::addChild):
593         * rendering/RenderLayer.cpp:
594         (WebCore::RenderLayer::calculateClipRects):
595         * rendering/RenderTable.cpp:
596         (WebCore::RenderTable::addChild):
597         (WebCore::RenderTable::layout):
598         (WebCore::RenderTable::firstColumn):
599         (WebCore::RenderTable::recalcSections):
600         (WebCore::RenderTable::sectionAbove):
601         (WebCore::RenderTable::sectionBelow):
602         (WebCore::RenderTable::bottomSection):
603         * rendering/RenderTable.h:
604         * rendering/RenderTableCaption.cpp:
605         (WebCore::RenderTableCaption::table):
606         * rendering/RenderTableCell.h:
607         (WebCore::RenderTableCell::nextCell):
608         (WebCore::RenderTableCell::previousCell):
609         (WebCore::RenderTableRow::firstCell):
610         (WebCore::RenderTableRow::lastCell):
611         * rendering/RenderTableCol.cpp:
612         (WebCore::RenderTableCol::table):
613         (WebCore::RenderTableCol::enclosingColumnGroup):
614         (WebCore::RenderTableCol::nextColumn):
615         * rendering/RenderTableCol.h:
616         Make updateFromElement() public to allow the callers to use tighter
617         typing and devitualize the call as the class is final.
618
619         * rendering/RenderTableRow.cpp:
620         (WebCore::RenderTableRow::addChild):
621         * rendering/RenderTableRow.h:
622         (WebCore::RenderTableSection::firstRow):
623         (WebCore::RenderTableSection::lastRow):
624         (WebCore::RenderTableRow::nextRow):
625         (WebCore::RenderTableRow::previousRow):
626         * rendering/RenderTableSection.cpp:
627         (WebCore::RenderTableSection::addChild):
628         (WebCore::RenderTableSection::layoutRows):
629         (WebCore::RenderTableSection::paintCell):
630         * rendering/RenderTableSection.h:
631         * rendering/RenderTreeAsText.cpp:
632         (WebCore::writeTextRun):
633         (WebCore::writeSimpleLine):
634
635 2014-10-08  Jer Noble  <jer.noble@apple.com>
636
637         MediaPlayer::characteristicChanged() is not called when new tracks are found in SourceBufferPrivateAVFObjC
638         https://bugs.webkit.org/show_bug.cgi?id=137533
639
640         Reviewed by Darin Adler.
641
642         When a new AVAsset is returned out of the AVStreamDataParser, notify the HTMLMediaElement that
643         characteristics of the player may have changed.
644
645         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
646         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
647         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::characteristicsChanged):
648         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
649         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
650
651 2014-10-13  Jer Noble  <jer.noble@apple.com>
652
653         [iOS] Stop listening for wireless playback target availability when the default controls are hidden.
654         https://bugs.webkit.org/show_bug.cgi?id=137633
655
656         Reviewed by Dean Jackson.
657
658         In order to minimize the excess bandwidth and power consumption required for actively listening
659         for wireless playback target availablity, unregister for those notifications while the controls
660         are hidden due to playback, or when the element's document is hidden.
661
662         * Modules/mediacontrols/mediaControlsiOS.js:
663         (ControllerIOS.prototype.createBase): Register for document visiblity change notfications.
664         (ControllerIOS.prototype.setControlsType): Call updateShouldListenForPlaybackTargetAvailabilityEvent()
665             instead of setShouldListenForPlaybackTargetAvailabilityEvent()
666         (ControllerIOS.prototype.hideControls): Ditto.
667         (ControllerIOS.prototype.showControls): Ditto.
668         (ControllerIOS.prototype.updateStatusDisplay): Ditto.
669         (ControllerIOS.prototype.handleVisibilityChange): Ditto.
670         (ControllerIOS.prototype.updateShouldListenForPlaybackTargetAvailabilityEvent): Added. Only listen
671             for target availability when the video has no errors, is not in the initial "big play button"
672             controls state, and when the controls are not hidden.
673         * platform/audio/ios/MediaSessionManagerIOS.mm:
674         (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Explicitly set the discoveryMode to "disabled"
675             rather than waiting for the autoreleasepool to destroy our routing controller.
676
677 2014-10-13  Simon Fraser  <simon.fraser@apple.com>
678
679         iOS DRT snapshots are limited to the page visible area
680         https://bugs.webkit.org/show_bug.cgi?id=137650
681
682         Reviewed by Daniel Bates.
683
684         LegacyTileCache drawing was limited to the window's visible area, found by
685         crawling up the layer hierarchy to the root layer. This caused test snapshots to
686         be missing non-composited content outside the iPhone visible area, which hinders
687         testing.
688         
689         Fix by adding a test-only mode where the window visible area is the entire window.
690
691         * platform/ios/wak/WAKWindow.h:
692         * platform/ios/wak/WAKWindow.mm:
693         (-[WAKWindow setEntireWindowVisibleForTesting:]):
694         (-[WAKWindow _visibleRectRespectingMasksToBounds:]):
695
696 2014-10-13  Mihnea Ovidenie  <mihnea@adobe.com>
697
698         [CSSRegions] Make RenderNamedFlowFragment::computeStyleInRegion const
699         https://bugs.webkit.org/show_bug.cgi?id=137604
700
701         Reviewed by Andrei Bucur.
702
703         The method computeStyleInRegion should be const as it does not modify
704         the state of the RenderNamedFlowFragment instance. Make pointers to
705         the region used for styling const along the way. No new tests as no
706         change in functionality.
707
708         * css/ElementRuleCollector.h:
709         (WebCore::ElementRuleCollector::ElementRuleCollector):
710         (WebCore::ElementRuleCollector::setRegionForStyling):
711         * css/StyleResolver.cpp:
712         (WebCore::StyleResolver::State::initForStyleResolve):
713         (WebCore::StyleResolver::styleForElement):
714         * css/StyleResolver.h:
715         * rendering/RenderNamedFlowFragment.cpp:
716         (WebCore::RenderNamedFlowFragment::computeStyleInRegion):
717         * rendering/RenderNamedFlowFragment.h:
718
719 2014-09-30  Sergio Villar Senin  <svillar@igalia.com>
720
721         [CSS Grid Layout] Pass the valid set of tracks to grow beyond growth limits
722         https://bugs.webkit.org/show_bug.cgi?id=137253
723
724         Reviewed by Darin Adler.
725
726         Section 10.4 of the specs describe how to resolve content based
727         track sizing functions. Among others it describes the "distribute
728         extra space" algorithm. The 3rd bullet of that algorithm specifies
729         how to distribute (and also the target tracks) the extra space
730         once all the tracks have reached their growth limits.
731
732         Our implementation had 2 problems. First we were not passing a
733         valid subset of tracks (instead we were always using all of
734         them). Now we use a function that filters the right tracks to be
735         the target of the extra space distribution depending on whether
736         we're computing the min track function or the max track function.
737
738         Secondly the algorithm that was distributing the extra space was
739         not using that list of passed in tracks (it iterated over all of
740         them). From now on it will use the set of tracks selected using
741         the filter function described above.
742
743         * rendering/RenderGrid.cpp:
744         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
745         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
746         (WebCore::RenderGrid::distributeSpaceToTracks):
747         * rendering/RenderGrid.h:
748         * rendering/style/GridTrackSize.h:
749         (WebCore::GridTrackSize::hasMinContentMinTrackBreadthAndMinOrMaxContentMaxTrackBreadth):
750         (WebCore::GridTrackSize::hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth):
751
752 2014-10-12  Mike West  <mkwst@chromium.org>
753
754         Referrer Policy: Update <meta name="referrer"> values to match the spec
755         https://bugs.webkit.org/show_bug.cgi?id=137635
756
757         Reviewed by Jochen Eisinger.
758
759         The Referrer Policy specification ([Working Draft][WD], [Editor's
760         draft[ED]) defines different keywords than we originally
761         implemented. We should support them in the interests of clarity and
762         interoperability with other browsers implementing the specification.
763
764         [WD]: http://www.w3.org/TR/referrer-policy/#referrer-policy-delivery-meta
765         [ED]: http://w3c.github.io/webappsec/specs/referrer-policy/#referrer-policy-delivery-meta
766
767         This patch is a port of Blink's https://codereview.chromium.org/607433002/
768
769         Tests: http/tests/security/referrer-policy-conflicting-policies.html
770                http/tests/security/referrer-policy-https-no-referrer-when-downgrade.html
771                http/tests/security/referrer-policy-https-no-referrer.html
772                http/tests/security/referrer-policy-https-unsafe-url.html
773                http/tests/security/referrer-policy-no-referrer-when-downgrade.html
774                http/tests/security/referrer-policy-no-referrer.html
775
776         * dom/Document.cpp:
777         (WebCore::Document::processReferrerPolicy):
778
779 2014-10-12  Dhi Aurrahman  <diorahman@rockybars.com>
780
781         Support activation behavior of link element
782         https://bugs.webkit.org/show_bug.cgi?id=137597
783
784         Reviewed by Benjamin Poulain.
785
786         Support activation behavior of link elements as defined in [1],
787         i.e. to follow the hyperlink created by the link element when it is fully active.
788
789         [1] https://html.spec.whatwg.org/multipage/semantics.html#the-link-element
790
791         Tests: fast/dom/html-link-element-activation-behavior-on-element-click.html
792                fast/dom/html-link-element-activation-behavior-on-mouse-click.html
793                fast/dom/html-link-element-activation-behavior-url-is-null.html
794
795         * dom/MouseEvent.cpp:
796         (WebCore::MouseEvent::triggerActivationBehavior):
797         * dom/MouseEvent.h:
798         * html/HTMLAnchorElement.cpp:
799         (WebCore::HTMLAnchorElement::defaultEventHandler):
800         (WebCore::isLinkClick): Deleted.
801         * html/HTMLAnchorElement.h:
802         * html/HTMLLinkElement.cpp:
803         (WebCore::HTMLLinkElement::defaultEventHandler):
804         (WebCore::HTMLLinkElement::handleClick):
805         * html/HTMLLinkElement.h:
806         * svg/SVGAElement.cpp:
807         (WebCore::SVGAElement::defaultEventHandler):
808
809 2014-10-11  KwangHyuk Kim  <hyuki.kim@samsung.com>
810
811         [EFL] Enable WebP support.
812         https://bugs.webkit.org/show_bug.cgi?id=136156
813
814         Reviewed by Gyuyoung Kim.
815
816         Add WebP library and inlcude path to WebCore path for WK2 Efl.
817         No new tests since existing feature is just enabled for WK2 Efl.
818
819         * PlatformEfl.cmake:
820
821 2014-10-11  Carlos Garcia Campos  <cgarcia@igalia.com>
822
823         [GLIB] Split GMainLoopSource moving thread safe implementation to its own class GThreadSafeMainLoopSource
824         https://bugs.webkit.org/show_bug.cgi?id=137485
825
826         Reviewed by Sergio Villar Senin.
827
828         Use GThreadSafeMainLoopSource for GStreamer sources, since they
829         can be used from different threads. Also update GMutexLocker
830         usages, since it's now a template.
831
832         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
833         (WebCore::AudioFileReader::createBus):
834         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
835         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
836         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
837         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
838         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
839         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
840         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
841         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
842         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
843         (webkitVideoSinkTimeoutCallback):
844         (webkitVideoSinkRender):
845         (unlockBufferMutex):
846         (webkitVideoSinkUnlockStop):
847         (webkitVideoSinkStart):
848         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
849         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
850         (webKitWebSrcGetProperty):
851         (webKitWebSrcStop):
852         (webKitWebSrcStart):
853         (webKitWebSrcChangeState):
854         (webKitWebSrcQueryWithParent):
855         (webKitWebSrcGetUri):
856         (webKitWebSrcSetUri):
857         (webKitWebSrcNeedDataMainCb):
858         (webKitWebSrcNeedDataCb):
859         (webKitWebSrcEnoughDataMainCb):
860         (webKitWebSrcEnoughDataCb):
861         (webKitWebSrcSeekDataCb):
862         (webKitWebSrcSetMediaPlayer):
863         (StreamingClient::createReadBuffer):
864         (StreamingClient::handleResponseReceived):
865         (StreamingClient::handleDataReceived):
866         (StreamingClient::handleNotifyFinished):
867         (ResourceHandleStreamingClient::wasBlocked):
868         (ResourceHandleStreamingClient::cannotShowURL):
869
870 2014-10-10  Chris Dumez  <cdumez@apple.com>
871
872         Use is<>() / downcast<>() for Image subclasses
873         https://bugs.webkit.org/show_bug.cgi?id=137625
874
875         Reviewed by Andreas Kling.
876
877         Use is<>() / downcast<>() for Image subclasses.
878
879         No new tests, no behavior change.
880
881         * accessibility/AccessibilityRenderObject.cpp:
882         (WebCore::AccessibilityRenderObject::remoteSVGRootElement):
883         * loader/cache/CachedImage.cpp:
884         (WebCore::CachedImage::imageSizeForRenderer):
885         (WebCore::CachedImage::createImage):
886         * platform/graphics/BitmapImage.h:
887         * platform/graphics/Image.h:
888         * platform/mac/DragImageMac.mm:
889         (WebCore::createDragImageFromImage):
890         * rendering/RenderImage.cpp:
891         (WebCore::RenderImage::embeddedContentBox):
892         * svg/graphics/SVGImage.h:
893
894 2014-10-10  Chris Dumez  <cdumez@apple.com>
895
896         Use is<>() / downcast<>() for RenderElement
897         https://bugs.webkit.org/show_bug.cgi?id=137622
898
899         Reviewed by Benjamin Poulain.
900
901         Use is<>() / downcast<>() for RenderElement and clean up the
902         surrounding code.
903
904         No new tests, no behavior change.
905
906         * accessibility/AccessibilityImageMapLink.cpp:
907         (WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
908         * accessibility/AccessibilityRenderObject.cpp:
909         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
910         * css/CSSComputedStyleDeclaration.cpp:
911         (WebCore::computeRenderStyleForProperty):
912         * dom/Node.cpp:
913         (WebCore::Node::materializeRareData):
914         * dom/Position.cpp:
915         (WebCore::isNonTextLeafChild):
916         (WebCore::searchAheadForBetterMatch):
917         * dom/PseudoElement.cpp:
918         (WebCore::PseudoElement::didRecalcStyle):
919         * editing/CompositeEditCommand.cpp:
920         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
921         * editing/htmlediting.cpp:
922         (WebCore::isEmptyTableCell):
923         * rendering/InlineIterator.h:
924         (WebCore::bidiNextShared):
925         * rendering/RenderBlock.cpp:
926         (WebCore::RenderBlock::getFirstLetter):
927         * rendering/RenderBox.cpp:
928         (WebCore::RenderBox::layout):
929         * rendering/RenderCounter.cpp:
930         (WebCore::RenderCounter::rendererRemovedFromTree):
931         (WebCore::RenderCounter::rendererSubtreeAttached):
932         (showCounterRendererTree):
933         * rendering/RenderElement.cpp:
934         (WebCore::RenderElement::insertChildInternal):
935         (WebCore::RenderElement::removeChildInternal):
936         (WebCore::RenderElement::findNextLayer):
937         (WebCore::RenderElement::layout):
938         * rendering/RenderElement.h:
939         (WebCore::RenderObject::isRenderLayerModelObject):
940         (WebCore::RenderObject::isBoxModelObject):
941         (WebCore::RenderObject::isRenderBlock):
942         (WebCore::RenderObject::isRenderBlockFlow):
943         (WebCore::RenderObject::isRenderReplaced):
944         (WebCore::RenderObject::isRenderInline):
945         (WebCore::RenderObject::style):
946         (WebCore::RenderObject::firstLineStyle):
947         (WebCore::ContainerNode::renderer):
948         * rendering/RenderFrameSet.cpp:
949         (WebCore::RenderFrameSet::paint):
950         * rendering/RenderLayer.cpp:
951         (WebCore::RenderLayer::calculateClipRects):
952         * rendering/RenderNamedFlowFragment.cpp:
953         (WebCore::RenderNamedFlowFragment::computeChildrenStyleInRegion):
954         (WebCore::RenderNamedFlowFragment::setObjectStyleInRegion):
955         (WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
956         * rendering/RenderObject.cpp:
957         (WebCore::RenderObject::clearNeedsLayout):
958         (WebCore::RenderObject::willBeDestroyed):
959         (WebCore::RenderObject::collectAnnotatedRegions):
960         * rendering/RenderVTTCue.cpp:
961         (WebCore::RenderVTTCue::initializeLayoutParameters):
962         (WebCore::RenderVTTCue::repositionGenericCue):
963         * rendering/mathml/RenderMathMLFraction.cpp:
964         (WebCore::RenderMathMLFraction::addChild):
965         * rendering/mathml/RenderMathMLMenclose.cpp:
966         (WebCore::RenderMathMLMenclose::addChild):
967         * rendering/mathml/RenderMathMLOperator.cpp:
968         (WebCore::RenderMathMLOperator::rebuildTokenContent):
969         (WebCore::RenderMathMLOperator::updateStyle):
970         * rendering/mathml/RenderMathMLRoot.cpp:
971         (WebCore::RenderMathMLRoot::addChild):
972         (WebCore::RenderMathMLRoot::layout):
973         * rendering/mathml/RenderMathMLToken.cpp:
974         (WebCore::RenderMathMLToken::addChild):
975         (WebCore::RenderMathMLToken::updateTokenContent):
976         (WebCore::RenderMathMLToken::updateStyle):
977         * rendering/mathml/RenderMathMLUnderOver.cpp:
978         (WebCore::RenderMathMLUnderOver::layout):
979         * rendering/svg/RenderSVGResource.cpp:
980         (WebCore::RenderSVGResource::markForLayoutAndParentResourceInvalidation):
981         * rendering/svg/RenderSVGText.cpp:
982         (WebCore::findPreviousAndNextAttributes):
983         (WebCore::RenderSVGText::subtreeStyleDidChange):
984         (WebCore::updateFontInAllDescendants):
985         * rendering/svg/SVGRenderSupport.cpp:
986         (WebCore::SVGRenderSupport::layoutChildren):
987         * rendering/svg/SVGResourcesCache.cpp:
988         (WebCore::SVGResourcesCache::clientWasAddedToTree):
989         (WebCore::SVGResourcesCache::clientWillBeRemovedFromTree):
990         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
991         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextRenderer):
992         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForForSubtree):
993         (WebCore::SVGTextLayoutAttributesBuilder::rebuildMetricsForTextRenderer):
994         * rendering/svg/SVGTextLayoutAttributesBuilder.h:
995         * rendering/svg/SVGTextMetricsBuilder.cpp:
996         (WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer):
997         (WebCore::SVGTextMetricsBuilder::measureTextRenderer):
998         (WebCore::SVGTextMetricsBuilder::walkTree):
999         (WebCore::SVGTextMetricsBuilder::buildMetricsAndLayoutAttributes):
1000         * rendering/svg/SVGTextMetricsBuilder.h:
1001         * rendering/svg/SVGTextRunRenderingContext.cpp:
1002         (WebCore::SVGTextRunRenderingContext::createGlyphToPathTranslator):
1003         (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs):
1004         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
1005         * svg/SVGFontData.cpp:
1006         (WebCore::SVGFontData::applySVGGlyphSelection):
1007
1008 2014-10-10  Benjamin Poulain  <benjamin@webkit.org>
1009
1010         Update :nth-child(An+B of selector-list) to the latest specification
1011         https://bugs.webkit.org/show_bug.cgi?id=137593
1012
1013         Reviewed by Andreas Kling.
1014
1015         Following my implementation feedback on :nth-child(An+B of selector-list),
1016         the CSS WG decided to change the definition such that the current element on which
1017         the selector is matched must also match the selector list in :nth-child().
1018
1019         This patch updates the implementation accordingly.
1020
1021         Test: fast/selectors/nth-child-of-chained-3.html
1022
1023         * css/SelectorChecker.cpp:
1024         (WebCore::SelectorChecker::checkOne):
1025         (WebCore::SelectorChecker::matchSelectorList):
1026         * css/SelectorChecker.h:
1027         * cssjit/SelectorCompiler.cpp:
1028         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatchesSelectorList):
1029         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChildOf):
1030
1031 2014-10-10  Chris Dumez  <cdumez@apple.com>
1032
1033         Drop RENDER_OBJECT_TYPE_CASTS() for a lot of RenderObject subclasses
1034         https://bugs.webkit.org/show_bug.cgi?id=137594
1035
1036         Reviewed by Darin Adler.
1037
1038         Drop RENDER_OBJECT_TYPE_CASTS() for RenderObject subclasses that no
1039         longer needed it or that required very few changes to do so. This will
1040         make sure developers start using is<>() / downcast<>() for those
1041         classes.
1042
1043         No new tests, no behavior change.
1044
1045         * accessibility/AccessibilityRenderObject.cpp:
1046         (WebCore::AccessibilityRenderObject::textUnderElement):
1047         (WebCore::AccessibilityRenderObject::stringValue):
1048         (WebCore::AccessibilityRenderObject::titleUIElement):
1049         * dom/PseudoElement.cpp:
1050         (WebCore::PseudoElement::didAttachRenderers):
1051         * html/HTMLCanvasElement.cpp:
1052         (WebCore::HTMLCanvasElement::reset):
1053         * html/HTMLPlugInElement.cpp:
1054         (WebCore::HTMLPlugInElement::defaultEventHandler):
1055         * html/HTMLPlugInImageElement.cpp:
1056         (WebCore::HTMLPlugInImageElement::updateSnapshot):
1057         (WebCore::HTMLPlugInImageElement::checkSnapshotStatus):
1058         * html/SearchInputType.cpp:
1059         (WebCore::SearchInputType::addSearchResult):
1060         (WebCore::SearchInputType::didSetValueByUserEdit):
1061         * html/shadow/TextControlInnerElements.cpp:
1062         (WebCore::TextControlInnerTextElement::renderer):
1063         (WebCore::TextControlInnerTextElement::customStyleForRenderer):
1064         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
1065         * page/FrameView.cpp:
1066         (WebCore::FrameView::isInChildFrameWithFrameFlattening):
1067         * rendering/RenderButton.h:
1068         * rendering/RenderCounter.h:
1069         * rendering/RenderDetailsMarker.h:
1070         * rendering/RenderFieldset.h:
1071         * rendering/RenderFileUploadControl.cpp:
1072         (WebCore::RenderFileUploadControl::paintObject):
1073         * rendering/RenderFileUploadControl.h:
1074         * rendering/RenderFlexibleBox.h:
1075         * rendering/RenderFullScreen.h:
1076         * rendering/RenderGrid.h:
1077         * rendering/RenderHTMLCanvas.h:
1078         * rendering/RenderIFrame.h:
1079         * rendering/RenderLayerBacking.cpp:
1080         (WebCore::RenderLayerBacking::contentsBox):
1081         * rendering/RenderMedia.h:
1082         * rendering/RenderQuote.cpp:
1083         (WebCore::RenderQuote::attachQuote):
1084         * rendering/RenderQuote.h:
1085         * rendering/RenderReplaced.h:
1086         * rendering/RenderScrollbarPart.h:
1087         * rendering/RenderSearchField.h:
1088         * rendering/RenderSnapshottedPlugIn.h:
1089         * rendering/RenderTableCaption.h:
1090         * rendering/RenderTextControlMultiLine.h:
1091         * rendering/RenderTextControlSingleLine.h:
1092         * rendering/RenderThemeMac.mm:
1093         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
1094         * rendering/RenderTreeAsText.cpp:
1095         (WebCore::RenderTreeAsText::writeRenderObject):
1096         * rendering/RenderVideo.cpp:
1097         (WebCore::rendererPlaceholder):
1098         * rendering/line/BreakingContextInlineHeaders.h:
1099         (WebCore::updateCounterIfNeeded):
1100         * rendering/svg/RenderSVGContainer.h:
1101         * rendering/svg/RenderSVGGradientStop.h:
1102         * rendering/svg/RenderSVGModelObject.h:
1103         * rendering/svg/RenderSVGPath.h:
1104         * rendering/svg/RenderSVGResourceFilter.h:
1105         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
1106         (WebCore::RenderSVGResourceFilterPrimitive::styleDidChange):
1107         * rendering/svg/RenderSVGTextPath.h:
1108         * rendering/svg/RenderSVGTransformableContainer.h:
1109         * rendering/svg/RenderSVGViewportContainer.h:
1110         * rendering/svg/SVGRenderSupport.cpp:
1111         (WebCore::SVGRenderSupport::repaintRectForRendererInLocalCoordinatesExcludingSVGShadow):
1112         (WebCore::SVGRenderSupport::checkForSVGRepaintDuringLayout):
1113         (WebCore::updateObjectBoundingBox):
1114         (WebCore::layoutSizeOfNearestViewportChanged):
1115         (WebCore::SVGRenderSupport::transformToRootChanged):
1116         (WebCore::SVGRenderSupport::rendererHasSVGShadow):
1117         (WebCore::SVGRenderSupport::setRendererHasSVGShadow):
1118         * rendering/svg/SVGTextLayoutEngine.cpp:
1119         (WebCore::SVGTextLayoutEngine::beginTextPathLayout):
1120         * svg/SVGPathElement.cpp:
1121         (WebCore::SVGPathElement::svgAttributeChanged):
1122         (WebCore::SVGPathElement::pathSegListChanged):
1123         (WebCore::SVGPathElement::getBBox):
1124         * svg/SVGSVGElement.cpp:
1125         (WebCore::SVGSVGElement::currentViewportSize):
1126
1127 2014-10-10  Chris Dumez  <cdumez@apple.com>
1128
1129         Use is<>() / downcast<>() for GraphicsLayer subclasses
1130         https://bugs.webkit.org/show_bug.cgi?id=137595
1131
1132         Reviewed by Darin Adler.
1133
1134         Use is<>() / downcast<>() for GraphicsLayer subclasses and clean up the
1135         surrounding code.
1136
1137         No new tests, no behavior change.
1138
1139         * page/mac/ServicesOverlayController.mm:
1140         (WebCore::ServicesOverlayController::Highlight::Highlight):
1141         (WebCore::ServicesOverlayController::Highlight::fadeIn):
1142         (WebCore::ServicesOverlayController::Highlight::fadeOut):
1143         * platform/graphics/GraphicsLayer.h:
1144         * platform/graphics/ca/GraphicsLayerCA.cpp:
1145         (WebCore::GraphicsLayerCA::removeFromParent):
1146         (WebCore::GraphicsLayerCA::setMaskLayer):
1147         (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush):
1148         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
1149         (WebCore::GraphicsLayerCA::updateSublayerList):
1150         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
1151         (WebCore::GraphicsLayerCA::updateMaskLayer):
1152         (WebCore::GraphicsLayerCA::replicatedLayerRoot):
1153         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
1154         (WebCore::GraphicsLayerCA::propagateLayerChangeToReplicas):
1155         (WebCore::GraphicsLayerCA::fetchCloneLayers):
1156         * platform/graphics/ca/GraphicsLayerCA.h:
1157
1158 2014-10-10  Chris Dumez  <cdumez@apple.com>
1159
1160         Use is<>() / downcast<>() for RenderBoxModelObject
1161         https://bugs.webkit.org/show_bug.cgi?id=137587
1162
1163         Reviewed by Mihnea Ovidenie.
1164
1165         Use is<>() / downcast<>() for RenderBoxModelObject and clean up the
1166         surrounding code.
1167
1168         No new tests, no behavior change.
1169
1170         * accessibility/AXObjectCache.cpp:
1171         (WebCore::createFromRenderer):
1172         * accessibility/AccessibilityRenderObject.cpp:
1173         (WebCore::AccessibilityRenderObject::renderBoxModelObject):
1174         (WebCore::isInlineWithContinuation):
1175         (WebCore::firstChildConsideringContinuation):
1176         (WebCore::lastChildHasContinuation):
1177         (WebCore::AccessibilityRenderObject::nextSibling):
1178         (WebCore::AccessibilityRenderObject::widget):
1179         (WebCore::AccessibilityRenderObject::renderObjectIsObservable):
1180         (WebCore::AccessibilityRenderObject::observableObject):
1181         (WebCore::msaaRoleForRenderer):
1182         * accessibility/AccessibilityRenderObject.h:
1183         * accessibility/AccessibilityTable.cpp:
1184         (WebCore::AccessibilityTable::isDataTable):
1185         * dom/Node.cpp:
1186         (WebCore::Node::renderBox):
1187         (WebCore::Node::renderBoxModelObject):
1188         * inspector/InspectorOverlay.cpp:
1189         (WebCore::buildObjectForElementInfo):
1190         * page/FrameView.cpp:
1191         (WebCore::FrameView::scrollContentsFastPath):
1192         * page/PrintContext.cpp:
1193         (WebCore::enclosingBoxModelObject):
1194         * page/animation/AnimationBase.cpp:
1195         (WebCore::AnimationBase::freezeAtTime):
1196         * page/animation/ImplicitAnimation.cpp:
1197         (WebCore::ImplicitAnimation::startAnimation):
1198         (WebCore::ImplicitAnimation::pauseAnimation):
1199         (WebCore::ImplicitAnimation::endAnimation):
1200         * page/animation/KeyframeAnimation.cpp:
1201         (WebCore::KeyframeAnimation::startAnimation):
1202         (WebCore::KeyframeAnimation::pauseAnimation):
1203         (WebCore::KeyframeAnimation::endAnimation):
1204         * page/ios/FrameIOS.mm:
1205         (WebCore::Frame::overflowScrollPositionChangedForNode):
1206         * page/scrolling/ScrollingCoordinator.cpp:
1207         (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
1208         * rendering/InlineBox.h:
1209         (WebCore::InlineBox::boxModelObject):
1210         * rendering/InlineElementBox.h:
1211         (WebCore::InlineElementBox::renderer):
1212         * rendering/InlineFlowBox.cpp:
1213         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
1214         * rendering/InlineFlowBox.h:
1215         (WebCore::InlineFlowBox::renderer):
1216         * rendering/InlineTextBox.cpp:
1217         (WebCore::InlineTextBox::baselinePosition):
1218         (WebCore::InlineTextBox::lineHeight):
1219         * rendering/RenderBlock.cpp:
1220         (WebCore::RenderBlock::addChildToContinuation):
1221         * rendering/RenderBox.cpp:
1222         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1223         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1224         (WebCore::RenderBox::computePositionedLogicalWidth):
1225         (WebCore::RenderBox::computePositionedLogicalHeight):
1226         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
1227         (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
1228         * rendering/RenderBoxModelObject.h:
1229         * rendering/RenderFlowThread.cpp:
1230         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
1231         * rendering/RenderInline.cpp:
1232         (WebCore::RenderInline::splitInlines):
1233         (WebCore::RenderInline::addChildToContinuation):
1234         * rendering/RenderLayer.cpp:
1235         (WebCore::RenderLayer::updateLayerPosition):
1236         (WebCore::RenderLayer::calculateClipRects):
1237         * rendering/RenderLayerBacking.cpp:
1238         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread):
1239         * rendering/RenderLayerCompositor.cpp:
1240         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason):
1241         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
1242         * rendering/RenderObject.cpp:
1243         (WebCore::RenderObject::destroy):
1244         (WebCore::RenderObject::offsetParent):
1245         * rendering/mathml/RenderMathMLScripts.cpp:
1246         (WebCore::RenderMathMLScripts::base):
1247
1248 2014-10-10  Zan Dobersek  <zdobersek@igalia.com>
1249
1250         Remove CrossThreadTask
1251         https://bugs.webkit.org/show_bug.cgi?id=137570
1252
1253         Reviewed by Darin Adler.
1254
1255         Replace uses of CrossThreadTask with C++11 lambdas. The initializations
1256         of cross-thread copies are rather verbose at the moment, but should look
1257         better once we can switch to using C++14 init capture for lambdas.
1258
1259         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
1260         (WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize):
1261         * WebCore.order:
1262         * WebCore.vcxproj/WebCore.vcxproj:
1263         * WebCore.vcxproj/WebCore.vcxproj.filters:
1264         * WebCore.xcodeproj/project.pbxproj:
1265         * dom/CrossThreadTask.h: Removed.
1266         * loader/WorkerThreadableLoader.cpp:
1267         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
1268         (WebCore::WorkerThreadableLoader::MainThreadBridge::destroy):
1269         (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):
1270         (WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
1271         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
1272         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
1273         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
1274         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
1275         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
1276         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
1277         (WebCore::WorkerThreadableLoader::MainThreadBridge::~MainThreadBridge): Deleted.
1278         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader): Deleted.
1279         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadDestroy): Deleted.
1280         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCancel): Deleted.
1281         (WebCore::workerGlobalScopeDidSendData): Deleted.
1282         (WebCore::workerGlobalScopeDidReceiveResponse): Deleted.
1283         (WebCore::workerGlobalScopeDidReceiveData): Deleted.
1284         (WebCore::workerGlobalScopeDidFinishLoading): Deleted.
1285         (WebCore::workerGlobalScopeDidFail): Deleted.
1286         (WebCore::workerGlobalScopeDidFailAccessControlCheck): Deleted.
1287         (WebCore::workerGlobalScopeDidFailRedirectCheck): Deleted.
1288         * loader/WorkerThreadableLoader.h:
1289         * loader/cache/MemoryCache.cpp:
1290         (WebCore::MemoryCache::removeRequestFromCache):
1291         (WebCore::MemoryCache::removeRequestFromSessionCaches):
1292         (WebCore::MemoryCache::removeRequestFromCacheImpl): Deleted.
1293         (WebCore::MemoryCache::removeRequestFromSessionCachesImpl): Deleted.
1294         (WebCore::MemoryCache::crossThreadRemoveRequestFromCache): Deleted.
1295         (WebCore::MemoryCache::crossThreadRemoveRequestFromSessionCaches): Deleted.
1296         * loader/cache/MemoryCache.h:
1297
1298 2014-10-10  Zan Dobersek  <zdobersek@igalia.com>
1299
1300         Avoid defaulting to capture-by-value for C++11 lambdas in WebCore
1301         https://bugs.webkit.org/show_bug.cgi?id=137565
1302
1303         Reviewed by Darin Adler.
1304
1305         C++11 lambas should avoid defaulting to capturing used variables by value as that
1306         can lead to unintended captures that, in worst cases, result in lambdas that are
1307         not self-contained and end up operating on dangling pointers.
1308
1309         Explicitly stating the variables that are to be copied by value can also serve as
1310         a checklist of variables that are actually intented for use in the lambda body. 
1311
1312         * Modules/quota/StorageErrorCallback.cpp:
1313         (WebCore::StorageErrorCallback::CallbackTask::CallbackTask):
1314         * Modules/webdatabase/Database.cpp:
1315         (WebCore::Database::~Database):
1316         (WebCore::Database::runTransaction):
1317         (WebCore::Database::scheduleTransactionCallback):
1318         * Modules/webdatabase/DatabaseManager.cpp:
1319         (WebCore::DatabaseManager::openDatabase):
1320         * Modules/webdatabase/SQLCallbackWrapper.h:
1321         (WebCore::SQLCallbackWrapper::clear):
1322         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
1323         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
1324         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
1325         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
1326         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
1327         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
1328         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
1329         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
1330         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
1331         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
1332         (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
1333         (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
1334         (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
1335         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
1336         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
1337         (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
1338         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
1339         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
1340         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
1341         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
1342         (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
1343         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
1344         (WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
1345         (WebCore::WorkerThreadableWebSocketChannel::Bridge::close):
1346         (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
1347         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
1348         (WebCore::WorkerThreadableWebSocketChannel::Bridge::suspend):
1349         (WebCore::WorkerThreadableWebSocketChannel::Bridge::resume):
1350         * bindings/js/JSCallbackData.h:
1351         (WebCore::DeleteCallbackDataTask::DeleteCallbackDataTask):
1352         * bindings/js/JSDOMGlobalObjectTask.cpp:
1353         (WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
1354         * dom/ScriptExecutionContext.h:
1355         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
1356         * dom/StringCallback.cpp:
1357         (WebCore::StringCallback::scheduleCallback):
1358         * fileapi/FileReader.cpp:
1359         (WebCore::FileReader::abort):
1360         * loader/appcache/ApplicationCacheGroup.cpp:
1361         (WebCore::ApplicationCacheGroup::postListenerTask):
1362         * workers/DefaultSharedWorkerRepository.cpp:
1363         (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
1364         (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
1365         (WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
1366         * workers/WorkerEventQueue.cpp:
1367         (WebCore::WorkerEventQueue::enqueueEvent):
1368         * workers/WorkerMessagingProxy.cpp:
1369         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
1370         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
1371         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
1372         (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
1373         (WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
1374         (WebCore::WorkerMessagingProxy::postMessageToPageInspector):
1375         (WebCore::WorkerMessagingProxy::confirmMessageFromWorkerObject):
1376         (WebCore::WorkerMessagingProxy::reportPendingActivity):
1377
1378 2014-10-10  Zan Dobersek  <zdobersek@igalia.com>
1379
1380         Remove MainThreadTask
1381         https://bugs.webkit.org/show_bug.cgi?id=137563
1382
1383         Reviewed by Darin Adler.
1384
1385         Replace the remaining uses of MainThreadTask with C++11 lambdas.
1386         Remove the MainThreadTask header from the build.
1387
1388         * WebCore.order:
1389         * WebCore.vcxproj/WebCore.vcxproj:
1390         * WebCore.vcxproj/WebCore.vcxproj.filters:
1391         * WebCore.xcodeproj/project.pbxproj:
1392         * platform/MainThreadTask.h: Removed.
1393         * platform/network/curl/CurlDownload.cpp:
1394         (WebCore::CurlDownloadManager::downloadThread):
1395         (WebCore::CurlDownload::didReceiveHeader):
1396         (WebCore::CurlDownload::didReceiveData):
1397
1398 2014-10-10  Andrzej Badowski  <a.badowski@samsung.com>
1399
1400         [ATK] Changing the mapping of ARIA rowheader and columnheader into respective ATK roles.
1401         https://bugs.webkit.org/show_bug.cgi?id=136150
1402
1403         Reviewed by Chris Fleizach.
1404
1405         Expose ColumnHeaderRole and RowHeaderRole objects into ATK.
1406
1407         Test: accessibility/table-roles-hierarchy.html
1408
1409         * accessibility/AccessibilityRenderObject.cpp:
1410         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1411         Platforms based on ATK: added distinction of roles for the <th> elements.
1412         * accessibility/AccessibilityTableCell.cpp:
1413         (WebCore::AccessibilityTableCell::determineAccessibilityRole):
1414         Platforms based on ATK: the return value is determined in the ancestor.
1415         * accessibility/atk/AccessibilityObjectAtk.cpp:
1416         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
1417         In addition to CellRole also included ColumnHeaderRole and RowHeaderRole.
1418         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1419         (atkRole):
1420         Changing the mapping of ARIA rowheader and columnheader into respective ATK roles.
1421         (getInterfaceMaskFromObject):
1422         In addition to CellRole also included ColumnHeaderRole and RowHeaderRole.
1423
1424 2014-10-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1425
1426         MediaPlayer should use a reference for the MediaPlayerClient
1427         https://bugs.webkit.org/show_bug.cgi?id=137552
1428
1429         Reviewed by Darin Adler.
1430
1431         The MediaPlayer client is set on constructor by HTMLMediaElement
1432         and cleared on HTMLMediaElement destructor that also frees the
1433         MediaPlayer object. Since the client will never be null while the
1434         MediaPlayer player is alive, we can use a reference and remove all
1435         the unneeded null checks. The member has also been renamed to m_client.
1436
1437         * html/HTMLMediaElement.cpp:
1438         (WebCore::HTMLMediaElement::~HTMLMediaElement):
1439         (WebCore::HTMLMediaElement::parseAttribute):
1440         * platform/graphics/MediaPlayer.cpp:
1441         (WebCore::MediaPlayer::MediaPlayer):
1442         (WebCore::MediaPlayer::~MediaPlayer):
1443         (WebCore::MediaPlayer::loadWithNextMediaEngine):
1444         (WebCore::MediaPlayer::inMediaDocument):
1445         (WebCore::MediaPlayer::currentPlaybackTargetIsWirelessChanged):
1446         (WebCore::MediaPlayer::networkStateChanged):
1447         (WebCore::MediaPlayer::readyStateChanged):
1448         (WebCore::MediaPlayer::volumeChanged):
1449         (WebCore::MediaPlayer::muteChanged):
1450         (WebCore::MediaPlayer::timeChanged):
1451         (WebCore::MediaPlayer::sizeChanged):
1452         (WebCore::MediaPlayer::repaint):
1453         (WebCore::MediaPlayer::durationChanged):
1454         (WebCore::MediaPlayer::rateChanged):
1455         (WebCore::MediaPlayer::playbackStateChanged):
1456         (WebCore::MediaPlayer::firstVideoFrameAvailable):
1457         (WebCore::MediaPlayer::characteristicChanged):
1458         (WebCore::MediaPlayer::keyAdded):
1459         (WebCore::MediaPlayer::keyError):
1460         (WebCore::MediaPlayer::keyMessage):
1461         (WebCore::MediaPlayer::keyNeeded):
1462         (WebCore::MediaPlayer::referrer):
1463         (WebCore::MediaPlayer::userAgent):
1464         (WebCore::MediaPlayer::graphicsDeviceAdapter):
1465         (WebCore::MediaPlayer::cachedResourceLoader):
1466         (WebCore::MediaPlayer::addAudioTrack):
1467         (WebCore::MediaPlayer::removeAudioTrack):
1468         (WebCore::MediaPlayer::addTextTrack):
1469         (WebCore::MediaPlayer::removeTextTrack):
1470         (WebCore::MediaPlayer::addVideoTrack):
1471         (WebCore::MediaPlayer::removeVideoTrack):
1472         (WebCore::MediaPlayer::outOfBandTrackSources):
1473         (WebCore::MediaPlayer::shouldWaitForResponseToAuthenticationChallenge):
1474         (WebCore::MediaPlayer::handlePlaybackCommand):
1475         (WebCore::MediaPlayer::sourceApplicationIdentifier):
1476         (WebCore::MediaPlayer::doesHaveAttribute):
1477         (WebCore::MediaPlayer::mediaPlayerNetworkInterfaceName):
1478         (WebCore::MediaPlayer::getRawCookies):
1479         (WebCore::MediaPlayer::setWirelessVideoPlaybackDisabled): Deleted.
1480         (WebCore::MediaPlayer::audioSourceProvider): Deleted.
1481         (WebCore::MediaPlayer::engineDescription): Deleted.
1482         (WebCore::MediaPlayer::notifyTrackModeChanged): Deleted.
1483         (WebCore::MediaPlayer::totalFrameDelay): Deleted.
1484         (WebCore::MediaPlayerFactorySupport::callRegisterMediaEngine): Deleted.
1485         * platform/graphics/MediaPlayer.h:
1486         (WebCore::MediaPlayer::create):
1487         (WebCore::MediaPlayer::platformVolumeConfigurationRequired):
1488         (WebCore::MediaPlayer::client):
1489         (WebCore::MediaPlayer::mediaPlayerClient): Deleted.
1490         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1491         (WebCore::MediaPlayerPrivateAVFoundation::preferredRenderingMode):
1492         (WebCore::MediaPlayerPrivateAVFoundation::setUpVideoRendering):
1493         (WebCore::MediaPlayerPrivateAVFoundation::prepareForRendering):
1494         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1495         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
1496         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
1497         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
1498         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1499         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged):
1500         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer):
1501         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer):
1502         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
1503         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeAudioRenderer):
1504         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1505         (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
1506         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
1507         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideoCaps):
1508         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
1509         (WebCore::MediaPlayerPrivateGStreamer::didEnd):
1510         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1511         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
1512         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1513         (webKitWebSrcStart):
1514         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1515         (WebCore::MediaPlayerPrivateQTKit::preferredRenderingMode):
1516         (WebCore::MediaPlayerPrivateQTKit::setUpVideoRendering):
1517         (WebCore::MediaPlayerPrivateQTKit::prepareForRendering):
1518         (WebCore::MediaPlayerPrivateQTKit::sawUnsupportedTracks):
1519
1520 2014-10-09  Mihnea Ovidenie  <mihnea@adobe.com>
1521
1522         [CSSRegions] Make RenderFlowThread::regionAtBlockOffset const
1523         https://bugs.webkit.org/show_bug.cgi?id=137555
1524
1525         Reviewed by David Hyatt.
1526
1527         Make the method const and remove autoGenerateRegionsToBlockOffset method as it
1528         is not used by region-based multicolumn code. Also removed the RegionAutoGenerationPolicy
1529         parameter in the process and the call sites. Make const some of the methods that call
1530         regionAtBlockOffset.
1531
1532         * rendering/RenderFlowThread.cpp:
1533         (WebCore::RenderFlowThread::regionForCompositedLayer):
1534         (WebCore::RenderFlowThread::regionAtBlockOffset):
1535         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
1536         (WebCore::RenderFlowThread::pageLogicalTopForOffset):
1537         (WebCore::RenderFlowThread::pageLogicalWidthForOffset):
1538         (WebCore::RenderFlowThread::pageLogicalHeightForOffset):
1539         (WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
1540         (WebCore::RenderFlowThread::mapFromFlowToRegion):
1541         (WebCore::RenderFlowThread::computedRegionRangeForBox):
1542         * rendering/RenderFlowThread.h:
1543         * rendering/RenderMultiColumnFlowThread.cpp:
1544         (WebCore::RenderMultiColumnFlowThread::regionAtBlockOffset):
1545         (WebCore::RenderMultiColumnFlowThread::mapFromFlowToRegion):
1546         (WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFlowToRegion):
1547         (WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset): Deleted.
1548         * rendering/RenderMultiColumnFlowThread.h:
1549
1550 2014-10-09  Chris Dumez  <cdumez@apple.com>
1551
1552         Use is<>() / downcast<>() for FontData subclasses
1553         https://bugs.webkit.org/show_bug.cgi?id=137591
1554
1555         Reviewed by Andreas Kling.
1556
1557         Use is<>() / downcast<>() for FontData subclasses.
1558
1559         No new tests, no behavior change.
1560
1561         * platform/graphics/FontData.h:
1562         * platform/graphics/FontGlyphs.cpp:
1563         (WebCore::FontGlyphs::releaseFontData):
1564         (WebCore::FontGlyphs::determinePitch):
1565         * platform/graphics/GlyphPageTreeNode.cpp:
1566         (WebCore::GlyphPageTreeNode::initializePage):
1567         * platform/graphics/SegmentedFontData.h:
1568         (isType):
1569         * platform/graphics/SimpleFontData.h:
1570         (isType):
1571
1572 2014-10-09  Simon Fraser  <simon.fraser@apple.com>
1573
1574         Revert part of r174543 that broke grid layout tests.
1575
1576         * css/CSSComputedStyleDeclaration.cpp:
1577         (WebCore::specifiedValueForGridTrackBreadth):
1578
1579 2014-10-09  Dean Jackson  <dino@apple.com>
1580
1581         Computed style for clip is wrong with respect to auto
1582         https://bugs.webkit.org/show_bug.cgi?id=137567
1583
1584         Reviewed by Simon Fraser.
1585
1586         Make sure that the computed style of clip returns the
1587         correct value when the input is "auto", or in this
1588         case "rect(auto, auto, auto, auto)". Before this
1589         patch it returned "rect(0px, 0px, 0px, 0px)" which
1590         was completely wrong.
1591
1592         Test: fast/css/computed-clip-with-auto-rect.html
1593
1594         * css/CSSComputedStyleDeclaration.cpp:
1595         (WebCore::autoOrZoomAdjustedValue): Helper function to make the correct keyword or length.
1596         (WebCore::specifiedValueForGridTrackBreadth): It can use the helper too.
1597         (WebCore::ComputedStyleExtractor::propertyValue): If the
1598         top/right/bottom/left is "auto", add that identifier
1599         to the output rectangle.
1600
1601 2014-10-09  Chris Dumez  <cdumez@apple.com>
1602
1603         Use RenderObject::firstChildSlow() / lastChildSlow() less
1604         https://bugs.webkit.org/show_bug.cgi?id=137573
1605
1606         Reviewed by Andreas Kling.
1607
1608         Use RenderObject::firstChildSlow() / lastChildSlow() less by using
1609         tighter typing at call sites whenever possible to be able to call the
1610         faster RenderElement::firstChild() / lastChild() instead.
1611
1612         This patch also uses more references instead of pointers when possible.
1613
1614         No new tests, no behavior change.
1615
1616         * accessibility/AccessibilityRenderObject.cpp:
1617         (WebCore::firstChildIsInlineContinuation):
1618         (WebCore::AccessibilityRenderObject::previousSibling):
1619         (WebCore::lastChildHasContinuation):
1620         (WebCore::AccessibilityRenderObject::nextSibling):
1621         * page/FrameView.cpp:
1622         (WebCore::countRenderedCharactersInRenderObjectWithThreshold):
1623         (WebCore::FrameView::renderedCharactersExceed):
1624         * rendering/RenderElement.h:
1625         * rendering/RenderRuby.cpp:
1626         (WebCore::isAnonymousRubyInlineBlock):
1627         (WebCore::isRubyBeforeBlock):
1628         (WebCore::isRubyAfterBlock):
1629         * rendering/svg/RenderSVGInline.h:
1630         * rendering/svg/RenderSVGText.cpp:
1631         (WebCore::RenderSVGText::layout):
1632         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
1633         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForTextRenderer):
1634         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributesForForSubtree):
1635         (WebCore::SVGTextLayoutAttributesBuilder::collectTextPositioningElements):
1636         (WebCore::SVGTextLayoutAttributesBuilder::buildCharacterDataMap):
1637         * rendering/svg/SVGTextLayoutAttributesBuilder.h:
1638         * svg/SVGTextPositioningElement.cpp:
1639         (WebCore::SVGTextPositioningElement::elementFromRenderer):
1640         * svg/SVGTextPositioningElement.h:
1641
1642 2014-10-09  Roger Fong  <roger_fong@apple.com>
1643
1644         Build fix for Win EWS bots.
1645
1646         * testing/Internals.idl: Move enum declaration to the top of the file.
1647
1648 2014-10-09  Said Abou-Hallawa  <sabouhallawa@apple.com>
1649
1650         RenderMathMLUnderOver adds spacing to the child operator indefinitely when resizing the window.
1651         https://bugs.webkit.org/show_bug.cgi?id=137330
1652
1653         Reviewed by Darin Adler.
1654
1655         The layout for the <mundercover> math object happens in two separate passes. The first pass runs
1656         the layout for the two children and then calculates the maximum child width.  It then sets the 
1657         stretch size for the math operator child.  And finally it runs the second layout pass by calling
1658         the base class layout() function. The base class function then runs the layout for the children
1659         rendering blocks.  In the operator child function computePreferredLogicalWidths(), the stretch 
1660         size is used to adjust the width (or the height) of the operator. Then it adds the leading and
1661         trailing spaces and the total will be the operator child width.
1662
1663         When resizing or zooming the window, the render objects are just invalidated but marked as 'needs-
1664         Layout'.  The problem is happening because the stretch size of the math operator is not reset
1665         before running the layout.  The old logical width (or height) of the the math operator child which
1666         is equal to the stretch size plus the leading and trailing spaces for is compared with the glyph
1667         size if the old logical width ( or height) is larger, it is set to be the stretch size.  When it
1668         is used again because of invalidation, new leading and trailing spaces are included in the new
1669         logical width.  So with every zooming-in or out or window resizing, new leading and trailing 
1670         spaces are added to the logical width of the math operator child or the math <munderober> object.
1671         
1672         Ensure the stretch size of the math operator render object is reset before running its layout.
1673         Running the layout means either the page is just loaded or it's invalidated which means, no 
1674         layout stall data should be used.
1675
1676         Test: mathml/opentype/munderover-window-resize.html
1677
1678         * rendering/mathml/RenderMathMLOperator.cpp:
1679         (WebCore::RenderMathMLOperator::resetStretchSize):
1680         * rendering/mathml/RenderMathMLOperator.h:
1681         resetStretchSize() sets the stretch size to its original value when the class is created.
1682         * rendering/mathml/RenderMathMLUnderOver.cpp:
1683         (WebCore::RenderMathMLUnderOver::layout):
1684         Make sure the operator stretch size is reset before calling its layout. Also make sure the new 
1685         maximum stretch size to the operator objects that were invalid and needsLayout.
1686
1687 2014-10-09  Dean Jackson  <dino@apple.com>
1688
1689         Remove ENABLE_CSS3_CONDITIONAL_RULES
1690         https://bugs.webkit.org/show_bug.cgi?id=137571
1691
1692         Reviewed by Simon Fraser.
1693
1694         We have good enough support for @supports that
1695         it should be a consistent part of the platform. Remove
1696         the compile-time guard.
1697
1698         * Configurations/FeatureDefines.xcconfig:
1699         * WebCore.exp.in:
1700         * bindings/js/JSCSSRuleCustom.cpp:
1701         (WebCore::toJS):
1702         * bindings/objc/DOMCSS.mm:
1703         (kitClass):
1704         * css/CSSGrammar.y.in:
1705         * css/CSSParser.cpp:
1706         (WebCore::CSSParser::CSSParser):
1707         (WebCore::CSSParser::parseSupportsCondition):
1708         (WebCore::CSSParser::detectAtToken):
1709         (WebCore::CSSParser::detectSupportsToken):
1710         (WebCore::CSSParser::realLex):
1711         * css/CSSParser.h:
1712         * css/CSSRule.h:
1713         * css/CSSRule.idl:
1714         * css/CSSSupportsRule.cpp:
1715         * css/CSSSupportsRule.h:
1716         * css/CSSSupportsRule.idl:
1717         * css/DOMWindowCSS.cpp:
1718         * css/DOMWindowCSS.h:
1719         * css/DOMWindowCSS.idl:
1720         * css/InspectorCSSOMWrappers.cpp:
1721         (WebCore::InspectorCSSOMWrappers::collect):
1722         * css/RuleSet.cpp:
1723         (WebCore::RuleSet::addChildRules):
1724         * css/StyleRule.cpp:
1725         (WebCore::StyleRuleBase::destroy):
1726         (WebCore::StyleRuleBase::copy):
1727         (WebCore::StyleRuleBase::createCSSOMWrapper):
1728         (WebCore::StyleRuleSupports::StyleRuleSupports):
1729         * css/StyleRule.h:
1730         (WebCore::toStyleRuleSupports):
1731         * css/StyleSheetContents.cpp:
1732         (WebCore::childRulesHaveFailedOrCanceledSubresources):
1733         * inspector/InspectorStyleSheet.cpp:
1734         (flattenSourceData):
1735         (WebCore::asCSSRuleList):
1736         * page/DOMWindow.cpp:
1737         (WebCore::DOMWindow::css):
1738         * page/DOMWindow.h:
1739         * page/DOMWindow.idl:
1740
1741 2014-10-09  Benjamin Poulain  <benjamin@webkit.org>
1742
1743         Add the baseline implementation of :not(selectorList)
1744         https://bugs.webkit.org/show_bug.cgi?id=137548
1745
1746         Reviewed by Andreas Kling.
1747
1748         This patch extend the pseudo class :not() to support the new definition
1749         in CSS Selectors level 4.
1750
1751         Instead of supporting a single simple selector, :not() now support
1752         an arbitrary selector list, excepted pseudo elements.
1753
1754         One side effect of this change is :visited and :link are no longer supported
1755         inside :not(). The reason has to do with complexity and performance.
1756         Since :not() and :matches() can have arbitrary selector list, keeping track of
1757         :visited and :link can have many combination superposing, some valid, some invalid.
1758
1759         Supporting :visited and :link should be possible by chaning the way we handle
1760         them for style resolution, but given the limited use cases for such features
1761         I'll wait to see if there is any interest before changing everything.
1762
1763         This patch only covers SelectorChecker to keep things simple. The CSS JIT
1764         will come later.
1765
1766         Tests: fast/css/not-basics.html
1767                fast/css/parsing-css-not-1.html
1768                fast/css/parsing-css-not-2.html
1769                fast/css/parsing-css-not-3.html
1770                fast/css/parsing-css-not-4.html
1771                fast/css/parsing-css-not-5.html
1772                fast/css/parsing-css-not-6.html
1773                fast/css/parsing-css-not-7.html
1774                fast/css/parsing-css-not-8.html
1775                fast/css/parsing-css-not-9.html
1776                fast/css/parsing-css-nth-child-of-4.html
1777                fast/selectors/not-basics.html
1778                fast/selectors/not-nested.html
1779                fast/selectors/not-selector-list.html
1780
1781         * css/CSSGrammar.y.in:
1782         Rename selectorListDoesNotMatchAnyPseudoElement() to selectorListDoesNotMatchAnyPseudoElement()
1783         since both :not() and :nth-child(An+B of selectorList) have the same requirements at the moment. 
1784
1785         * css/CSSParserValues.cpp:
1786         (WebCore::selectorListMatchesPseudoElement):
1787         The patch adding :matches() introduced the possibility of putting pseudo element
1788         arbitrary deep in a sequence of nested :matches(). Since this case is forbidded
1789         by :not() and :nth-child(An+B of selectorList), selectorListMatchesPseudoElement()
1790         now becomes recursive to find those pseudo elements.
1791
1792         * css/CSSSelector.cpp:
1793         (WebCore::CSSSelector::selectorText):
1794         CSSOM for the extended :not().
1795
1796         * css/SelectorChecker.cpp:
1797         (WebCore::SelectorChecker::checkOne):
1798         (WebCore::SelectorChecker::determineLinkMatchType):
1799         * cssjit/SelectorCompiler.cpp:
1800
1801         (WebCore::SelectorCompiler::addPseudoClassType):
1802         Disable the new capabilities from the JIT for now.
1803
1804 2014-10-09  Tim Horton  <timothy_horton@apple.com>
1805
1806         Move ServicesOverlayController to WebCore
1807         https://bugs.webkit.org/show_bug.cgi?id=137416
1808         <rdar://problem/18546283>
1809
1810         Reviewed by Anders Carlsson.
1811
1812         Move ServicesOverlayController from WebKit2 to WebCore, as it can be used by both Legacy WebKit and WebKit2.
1813
1814         * WebCore.xcodeproj/project.pbxproj:
1815         * editing/Editor.cpp:
1816         (WebCore::Editor::scanSelectionForTelephoneNumbers):
1817         * editing/SelectionRectGatherer.cpp:
1818         (WebCore::SelectionRectGatherer::Notifier::~Notifier):
1819         Notify ServicesOverlayController of changes via Page instead of EditorClient.
1820
1821         * page/ChromeClient.h:
1822         (WebCore::ChromeClient::handleTelephoneNumberClick):
1823         (WebCore::ChromeClient::handleSelectionServiceClick):
1824         (WebCore::ChromeClient::hasRelevantSelectionServices):
1825         Add ChromeClient functions for services actions.
1826
1827         * page/EditorClient.h:
1828         (WebCore::EditorClient::selectedTelephoneNumberRangesChanged): Deleted.
1829         (WebCore::EditorClient::selectionRectsDidChange): Deleted.
1830         Remove EditorClient functions for notifying ServicesOverlayController of changes,
1831         because it lives in WebCore proper now.
1832
1833         * page/Page.cpp:
1834         (WebCore::Page::Page):
1835         * page/Page.h:
1836         (WebCore::Page::servicesOverlayController):
1837         Keep a ServicesOverlayController on Page.
1838
1839         * page/PageOverlay.cpp:
1840         (WebCore::PageOverlay::mouseEvent):
1841         Use windowToContents instead of rootViewToContents; events come in in window coordinates.
1842
1843         * page/PageOverlayController.cpp:
1844         (WebCore::PageOverlayController::updateSettingsForLayer):
1845         Get Settings from MainFrame, not Page.
1846
1847         * page/Settings.in:
1848         Add servicesControlsEnabled setting.
1849
1850         * page/mac/ServicesOverlayController.h: Renamed from Source/WebKit2/WebProcess/WebPage/ServicesOverlayController.h.
1851         * page/mac/ServicesOverlayController.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/ServicesOverlayController.mm.
1852         Moved from WebKit2. Mostly mechanical changes, plus:
1853             - Use windowToContents instead of rootViewToContents; events come in in window coordinates.
1854             - Cut off rebuild* if serviceControlsEnabled setting is false
1855             - Don't create the overlay if serviceControlsEnabled setting is false
1856             - Send click events via ChromeClient.
1857             - Tie our lifetime to MainFrame instead of Page, and get lots of things from MainFrame instead.
1858
1859         * platform/Logging.h:
1860         Add Services logging channel (moved from WebKit2).
1861
1862 2014-10-09  Brent Fulgham  <bfulgham@apple.com>
1863
1864         [Win] Unreviewed build fix: Revert r174378
1865
1866         Roll back this change, as it didn't fix the EWS builders, and has only
1867         served to make Windows builds take forever.
1868
1869         * WebCore.vcxproj/WebCoreGenerated.make: Don't delete all generated content
1870         every time we build.
1871
1872 2014-10-09  Chris Dumez  <cdumez@apple.com>
1873
1874         Unreviewed GTK build fix after r174504.
1875
1876         Missing header include.
1877
1878         * rendering/svg/SVGTextQuery.cpp:
1879
1880 2014-10-09  Myles C. Maxfield  <mmaxfield@apple.com>
1881
1882         Remove second-to-last client of WebFontCache
1883         https://bugs.webkit.org/show_bug.cgi?id=137550
1884
1885         Reviewed by Darin Adler.
1886
1887         No new tests because no behavior change.
1888
1889         * WebCore.exp.in:
1890         * platform/graphics/FontCache.h: Allow migration of client to getCachedFontData()
1891
1892 2014-10-09  Chris Dumez  <cdumez@apple.com>
1893
1894         [Mac] Spending too much time mapping desired font families to available ones
1895         https://bugs.webkit.org/show_bug.cgi?id=137539
1896
1897         Reviewed by Darin Adler.
1898
1899         While profiling the load of weather.com, I noticed that we are spending
1900         quite a bit of time trying to map the font family requested to a font
1901         that is available on the system. The process involves:
1902         1. Doing a linear search of all the installed font families and do a
1903            case-insensitive string comparison for each of them until we find a
1904            match,
1905         2. Then, if we don't find a match, do another linear search of the
1906            fonts' postscript names this time and do again a case-insensitive
1907            string comparison for each of them.
1908
1909         This process is costly and the fonts requested by weather.com are not
1910         available, causing us to do 2 linear searches and a lot of string
1911         comparisons (accounting for ~2% of the WebProcess CPU time for the page
1912         load). As a result, we end up spending ~90ms in
1913         internalFontWithFamily() when loading weather.com.
1914
1915         This patch introduces a cache for the mapping between desired font
1916         families and available font families. This cuts the time spent in
1917         internalFontWithFamily() in half (~45ms). The cache gets invalidated
1918         when fonts are installed / uninstalled on the system so we don't break
1919         that scenario. The cache is also limited in size to avoid using too
1920         much memory.
1921
1922         No new tests, but manual testing making sure the cache gets invalidated
1923         when installing a font on the system.
1924
1925         * platform/graphics/mac/FontCacheMac.mm:
1926         (WebCore::invalidateFontCache):
1927         * platform/mac/WebFontCache.h:
1928         * platform/mac/WebFontCache.mm:
1929         (desiredFamilyToAvailableFamilyDictionary):
1930         (rememberDesiredFamilyToAvailableFamilyMapping):
1931         (+[WebFontCache internalFontWithFamily:traits:weight:size:]):
1932         (+[WebFontCache invalidate]):
1933
1934 2014-10-09  Bear Travis  <betravis@adobe.com>
1935
1936         [CSS Font Loading] Decrement the font loading count before notifying callbacks
1937         https://bugs.webkit.org/show_bug.cgi?id=137401
1938
1939         Reviewed by Alexey Proskuryakov.
1940
1941         In the callbacks, it should appear that font load has completed. This is
1942         accessed through loading(), which relies on the current number of
1943         fonts loading via JS and CSS.
1944
1945         Unskipping the failing test http/tests/webfont/fontloader-loading-attribute.html
1946         test which tests this.
1947
1948         * css/FontLoader.cpp:
1949         (WebCore::LoadFontCallback::notifyLoaded):
1950
1951 2014-10-09  Chris Dumez  <cdumez@apple.com>
1952
1953         Unreviewed Windows build fix after r174506.
1954
1955         We no longer needed to dereference as it is a reference instead of a
1956         pointer now.
1957
1958         * page/win/EventHandlerWin.cpp:
1959         (WebCore::EventHandler::passWheelEventToWidget):
1960
1961 2014-10-09  Chris Dumez  <cdumez@apple.com>
1962
1963         Use is<>() / downcast<>() for Widget subclasses
1964         https://bugs.webkit.org/show_bug.cgi?id=137549
1965
1966         Reviewed by Darin Adler.
1967
1968         Use is<>() / downcast<>() for Widget subclasses and clean up the
1969         surrounding code.
1970
1971         No new tests, no behavior change.
1972
1973         * accessibility/AXObjectCache.cpp:
1974         (WebCore::AXObjectCache::getOrCreate):
1975         * accessibility/AccessibilityObject.cpp:
1976         (WebCore::appendAccessibilityObject):
1977         * accessibility/AccessibilityRenderObject.cpp:
1978         (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
1979         * accessibility/AccessibilityScrollView.cpp:
1980         (WebCore::AccessibilityScrollView::webAreaObject):
1981         (WebCore::AccessibilityScrollView::documentFrameView):
1982         (WebCore::AccessibilityScrollView::parentObject):
1983         (WebCore::AccessibilityScrollView::parentObjectIfExists):
1984         * bindings/js/JSPluginElementFunctions.cpp:
1985         (WebCore::pluginScriptObjectFromPluginViewBase):
1986         * html/HTMLObjectElement.cpp:
1987         (WebCore::HTMLObjectElement::appendFormData):
1988         * html/HTMLPlugInElement.cpp:
1989         (WebCore::HTMLPlugInElement::canProcessDrag):
1990         (WebCore::HTMLPlugInElement::isKeyboardFocusable):
1991         (WebCore::HTMLPlugInElement::isUserObservable):
1992         * html/HTMLPlugInImageElement.cpp:
1993         (WebCore::HTMLPlugInImageElement::checkSizeChangeForSnapshotting):
1994         (WebCore::HTMLPlugInImageElement::subframeLoaderDidCreatePlugIn):
1995         * html/HTMLPlugInImageElement.h:
1996         * loader/SubframeLoader.cpp:
1997         (WebCore::SubframeLoader::loadPlugin):
1998         * page/DragController.cpp:
1999         (WebCore::DragController::operationForLoad):
2000         * page/EventHandler.cpp:
2001         (WebCore::EventHandler::subframeForTargetNode):
2002         (WebCore::EventHandler::handleWheelEvent):
2003         * page/EventHandler.h:
2004         * page/Frame.cpp:
2005         (WebCore::Frame::frameForWidget):
2006         * page/FrameView.cpp:
2007         (WebCore::FrameView::hasCustomScrollbars):
2008         (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
2009         (WebCore::FrameView::convertToContainingView):
2010         (WebCore::FrameView::convertFromContainingView):
2011         (WebCore::FrameView::removeChild):
2012         * page/FrameView.h:
2013         * page/Page.cpp:
2014         (WebCore::Page::pluginViews):
2015         * page/efl/EventHandlerEfl.cpp:
2016         (WebCore::EventHandler::passWheelEventToWidget):
2017         * page/gtk/EventHandlerGtk.cpp:
2018         (WebCore::EventHandler::passWheelEventToWidget):
2019         * page/ios/EventHandlerIOS.mm:
2020         (WebCore::EventHandler::passWheelEventToWidget):
2021         * page/mac/EventHandlerMac.mm:
2022         (WebCore::EventHandler::passWheelEventToWidget):
2023         * page/scrolling/ScrollingCoordinator.cpp:
2024         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
2025         * page/win/EventHandlerWin.cpp:
2026         (WebCore::EventHandler::passWheelEventToWidget):
2027         * platform/ScrollView.cpp:
2028         (WebCore::ScrollView::removeChild):
2029         (WebCore::ScrollView::setHasHorizontalScrollbar):
2030         (WebCore::ScrollView::setHasVerticalScrollbar):
2031         * platform/ScrollView.h:
2032         * platform/Scrollbar.cpp:
2033         (WebCore::Scrollbar::root):
2034         Uninline as root() because Widget::root() returns a FrameView now and
2035         it is impossible to include FrameView.h in Scrollbar.h without causing
2036         a cycle.
2037
2038         * platform/Scrollbar.h:
2039         * platform/Widget.cpp:
2040         (WebCore::Widget::root):
2041         Use tighter typing and return a FrameView instead of a ScrollView.
2042
2043         (WebCore::Widget::removeFromParent):
2044         * platform/Widget.h:
2045         * platform/efl/WidgetEfl.cpp:
2046         (WebCore::Widget::setCursor):
2047         * platform/gtk/PlatformScreenGtk.cpp:
2048         * platform/gtk/WidgetGtk.cpp:
2049         (WebCore::Widget::setCursor):
2050         * platform/mac/PlatformScreenMac.mm:
2051         (WebCore::displayFromWidget):
2052         * platform/mac/WidgetMac.mm:
2053         (WebCore::Widget::setCursor):
2054         * platform/win/WidgetWin.cpp:
2055         (WebCore::Widget::setCursor):
2056         * plugins/PluginViewBase.h:
2057         * plugins/win/PluginViewWin.cpp:
2058         (WebCore::PluginView::updatePluginWidget):
2059         (WebCore::PluginView::paintIntoTransformedContext):
2060         (WebCore::PluginView::paintWindowedPluginIntoContext):
2061         (WebCore::PluginView::paint):
2062         (WebCore::PluginView::handleMouseEvent):
2063         (WebCore::PluginView::setNPWindowRect):
2064         (WebCore::PluginView::snapshot):
2065         * rendering/RenderEmbeddedObject.cpp:
2066         (WebCore::RenderEmbeddedObject::allowsAcceleratedCompositing):
2067         (WebCore::RenderEmbeddedObject::nodeAtPoint):
2068         (WebCore::RenderEmbeddedObject::scroll):
2069         * rendering/RenderFrameBase.h:
2070         (WebCore::RenderFrameBase::childView):
2071         * rendering/RenderLayerBacking.cpp:
2072         (WebCore::RenderLayerBacking::layerWillBeDestroyed):
2073         (WebCore::RenderLayerBacking::updateConfiguration):
2074         * rendering/RenderLayerCompositor.cpp:
2075         (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame):
2076         * rendering/RenderTreeAsText.cpp:
2077         (WebCore::write):
2078         * rendering/RenderWidget.cpp:
2079         (WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):
2080         (WebCore::RenderWidget::paintContents):
2081         (WebCore::RenderWidget::setOverlapTestResult):
2082         (WebCore::RenderWidget::updateWidgetPosition):
2083         (WebCore::RenderWidget::nodeAtPoint):
2084         (WebCore::RenderWidget::embeddedContentBox):
2085
2086 2014-10-09  Carlos Garcia Campos  <cgarcia@igalia.com>
2087
2088         Layering violation: MediaPlayer should not reference/use FrameView
2089         https://bugs.webkit.org/show_bug.cgi?id=21562
2090
2091         Reviewed by Darin Adler.
2092
2093         Remove FrameView dependency from MediaPlayer.
2094
2095         * html/HTMLMediaElement.cpp:
2096         (WebCore::HTMLMediaElement::mediaPlayerIsInMediaDocument): Check if
2097         the element document is a media document.
2098         * html/HTMLMediaElement.h:
2099         * platform/graphics/MediaPlayer.cpp:
2100         (WebCore::MediaPlayer::MediaPlayer): Remove m_frameView initialization.
2101         (WebCore::MediaPlayer::inMediaDocument): Use the MediaPlayerClient
2102         to check if the media player is in a media document.
2103         * platform/graphics/MediaPlayer.h:
2104         (WebCore::MediaPlayerClient::mediaPlayerIsInMediaDocument):
2105         (WebCore::MediaPlayer::setFrameView): Deleted.
2106         (WebCore::MediaPlayer::frameView): Deleted.
2107         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2108         (WebCore::MediaPlayerPrivateAVFoundation::preferredRenderingMode):
2109         Do not check if the media player has a frame view, checking whether it's visible
2110         is enough.
2111         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2112         Remove unneeded header include.
2113         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Ditto.
2114         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Ditto.
2115         * rendering/RenderVideo.cpp:
2116         (WebCore::RenderVideo::~RenderVideo): Do not call MediaPlayer::setFrameView().
2117         (WebCore::RenderVideo::updatePlayer): Ditto.
2118
2119 2014-10-09  Christophe Dumez  <cdumez@apple.com>
2120
2121         Use is<>() / downcast<>() for RenderBlockFlow
2122         https://bugs.webkit.org/show_bug.cgi?id=137545
2123
2124         Reviewed by Darin Adler.
2125
2126         Use is<>() / downcast<>() for RenderBlockFlow and clean up the
2127         surrounding code.
2128
2129         No new tests, no behavior change.
2130
2131         * accessibility/AccessibilityRenderObject.cpp:
2132         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2133         * dom/Element.cpp:
2134         (WebCore::Element::renderNamedFlowFragment):
2135         (WebCore::Element::webkitGetRegionFlowRanges):
2136         * editing/Editor.cpp:
2137         (WebCore::Editor::hasBidiSelection):
2138         * inspector/InspectorOverlay.cpp:
2139         (WebCore::buildObjectForRegionHighlight):
2140         (WebCore::buildObjectForElementInfo):
2141         * rendering/EllipsisBox.h:
2142         * rendering/HitTestResult.cpp:
2143         (WebCore::HitTestResult::innerTextIfTruncated):
2144         * rendering/LayoutState.cpp:
2145         (WebCore::LayoutState::LayoutState):
2146         * rendering/RenderBlock.cpp:
2147         (WebCore::RenderBlock::removeChild):
2148         * rendering/RenderBlock.h:
2149         (WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo):
2150         * rendering/RenderBlockFlow.cpp:
2151         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
2152         (WebCore::RenderBlockFlow::layoutBlockChild):
2153         (WebCore::RenderBlockFlow::marginOffsetForSelfCollapsingBlock):
2154         (WebCore::RenderBlockFlow::marginValuesForChild):
2155         (WebCore::RenderBlockFlow::collapseMargins):
2156         (WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
2157         (WebCore::RenderBlockFlow::handleAfterSideOfBlock):
2158         (WebCore::RenderBlockFlow::mustDiscardMarginBeforeForChild):
2159         (WebCore::RenderBlockFlow::mustDiscardMarginAfterForChild):
2160         (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
2161         (WebCore::RenderBlockFlow::moveAllChildrenIncludingFloatsTo):
2162         (WebCore::RenderBlockFlow::markAllDescendantsWithFloatsForLayout):
2163         (WebCore::RenderBlockFlow::adjustForBorderFit):
2164         (WebCore::getHeightForLineCount):
2165         * rendering/RenderBlockFlow.h:
2166         (WebCore::RenderElement::isRenderNamedFlowFragmentContainer):
2167         * rendering/RenderBlockLineLayout.cpp:
2168         (WebCore::RenderBlockFlow::createLineBoxes):
2169         * rendering/RenderBox.cpp:
2170         (WebCore::RenderBox::styleDidChange):
2171         * rendering/RenderBoxModelObject.cpp:
2172         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
2173         * rendering/RenderDeprecatedFlexibleBox.cpp:
2174         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
2175         (WebCore::RenderDeprecatedFlexibleBox::clearLineClamp):
2176         * rendering/RenderFlowThread.cpp:
2177         (WebCore::RenderFlowThread::removeFlowChildInfo):
2178         * rendering/RenderLayer.cpp:
2179         (WebCore::RenderLayer::updateLayerPositions):
2180         (WebCore::expandClipRectForRegionAndReflection):
2181         (WebCore::RenderLayer::calculateClipRects):
2182         * rendering/RenderLayerCompositor.cpp:
2183         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2184         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
2185         * rendering/RenderMultiColumnFlowThread.cpp:
2186         (WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy):
2187         (WebCore::RenderMultiColumnFlowThread::processPossibleSpannerDescendant):
2188         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
2189         * rendering/RenderMultiColumnFlowThread.h:
2190         * rendering/RenderMultiColumnSet.cpp:
2191         (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
2192         (WebCore::RenderMultiColumnSet::columnGap):
2193         * rendering/RenderMultiColumnSet.h:
2194         * rendering/RenderNamedFlowFragment.cpp:
2195         (WebCore::RenderNamedFlowFragment::fragmentContainer):
2196         * rendering/RenderObject.cpp:
2197         (WebCore::RenderObject::adjustComputedFontSizesOnBlocks):
2198         (WebCore::RenderObject::resetTextAutosizing):
2199         (WebCore::RenderObject::showLineTreeForThis):
2200         (WebCore::RenderObject::showRenderSubTreeAndMark):
2201         * rendering/RenderText.cpp:
2202         (WebCore::RenderText::setText):
2203         (WebCore::RenderText::ensureLineBoxes):
2204         (WebCore::RenderText::simpleLineLayout):
2205         * rendering/RenderTreeAsText.cpp:
2206         (WebCore::write):
2207         * rendering/RootInlineBox.cpp:
2208         (WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
2209         (WebCore::RootInlineBox::blockFlow):
2210         * rendering/SimpleLineLayoutFunctions.cpp:
2211         (WebCore::SimpleLineLayout::computeTextBoundingBox):
2212         (WebCore::SimpleLineLayout::computeTextFirstRunLocation):
2213         (WebCore::SimpleLineLayout::collectTextAbsoluteRects):
2214         (WebCore::SimpleLineLayout::collectTextAbsoluteQuads):
2215         * rendering/svg/SVGTextQuery.cpp:
2216         (WebCore::flowBoxForRenderer):
2217
2218 2014-10-09  Philip Chimento  <philip.chimento@gmail.com>
2219
2220         [GTK] Netscape plugin API symbol used outside feature guards
2221         https://bugs.webkit.org/show_bug.cgi?id=137385
2222
2223         Reviewed by Philippe Normand.
2224
2225         * plugins/PluginPackage.cpp:
2226         (WebCore::PluginPackage::unload): Add guards for Netscape Plugin
2227         API around symbol, so that it compiles OK when the API is not
2228         available.
2229
2230 2014-10-08  Mihnea Ovidenie  <mihnea@adobe.com>
2231
2232         [CSSRegions]Remove unused parameter in adjustRegionBoundsFromFlowThreadPortionRect
2233         https://bugs.webkit.org/show_bug.cgi?id=137518
2234
2235         Reviewed by Andrei Bucur.
2236
2237         This method is used only by region code in accelerated compositing.
2238         The first parameter for the method was introduced with the intent to be used for multicolumn,
2239         but without being actually used in multicolumn code. Also make the method const.
2240         No new tests as no change in functionality.
2241
2242         * rendering/RenderLayerBacking.cpp:
2243         (WebCore::RenderLayerBacking::adjustAncestorCompositingBoundsForFlowThread):
2244         * rendering/RenderMultiColumnSet.cpp:
2245         (WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
2246         * rendering/RenderMultiColumnSet.h:
2247         * rendering/RenderRegion.cpp:
2248         (WebCore::RenderRegion::adjustRegionBoundsFromFlowThreadPortionRect):
2249         * rendering/RenderRegion.h:
2250
2251 2014-10-08  Andreas Kling  <akling@apple.com>
2252
2253         [Mac] Show repaint counters in tile coverage map.
2254         <https://webkit.org/b/137544>
2255
2256         Reviewed by Simon Fraser.
2257
2258         Add repaint counters to the tile layers in the "tiled scrolling
2259         indicator" display. This will be helpful for diagnosing issues with
2260         excessive tile repaints outside the visible viewport.
2261
2262         * platform/graphics/ca/TileController.cpp:
2263         (WebCore::TileController::setNeedsDisplayInRect):
2264         * platform/graphics/ca/TileGrid.cpp:
2265         (WebCore::TileGrid::drawTileMapContents):
2266
2267 2014-10-08  Myles C. Maxfield  <mmaxfield@apple.com>
2268
2269         Unreviewed build fix after r174480. Broke iOS build.
2270
2271         * rendering/RenderObject.cpp:
2272         (WebCore::includeNonFixedHeight):
2273
2274 2014-10-08  Myles C. Maxfield  <litherum@gmail.com>
2275
2276         Inline ruby does not get justified correctly
2277         https://bugs.webkit.org/show_bug.cgi?id=137421
2278
2279         Reviewed by Dave Hyatt.
2280
2281         We justify text in two passes: one counts expansion opportunities within a line,
2282         and the other doles out widths and expansion amounts to constituent inline boxes.
2283         This patch simply modifies both passes to descend into ruby bases. Once it has
2284         done so, we then re-layout the ruby run with the newly found width.
2285
2286         Tests: fast/ruby/ruby-justification-hittest.html
2287                fast/ruby/ruby-justification.html
2288
2289         * rendering/InlineBox.h:
2290         (WebCore::InlineBox::setExpansion): updateRubyForJustifiedText() has to set the
2291         expansion for an inline box, so make setExpansion() public.
2292         * rendering/RenderBlockLineLayout.cpp:
2293         (WebCore::updateRubyForJustifiedText): Given values that have already been
2294         computed in computeInlineDirectionPositionsForSegment(), adjust the widths and
2295         expansion values for all the various pieces of ruby.
2296         (WebCore::computeExpansionForJustifiedText): Call updateRubyForJustifiedText() if
2297         necessary.
2298         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment): When
2299         counting expansion opportunities in a line, include ruby bases.
2300         * rendering/RenderRubyRun.h: Fix grammar in comment.
2301         * rendering/RenderText.cpp:
2302         (WebCore::RenderText::stringView): Give default arguments to function.
2303         * rendering/RenderText.h: Ditto.
2304
2305 2014-10-08  Dean Jackson  <dino@apple.com>
2306
2307         PopupMenus should indicate if they are using a custom rendering
2308         https://bugs.webkit.org/show_bug.cgi?id=137543
2309         <rdar://problem/18544212>
2310
2311         Reviewed by Beth Dakin.
2312
2313         On Yosemite there is an animation as a popup menu closes. We can't use
2314         this when there is a custom rendering, since the animation doesn't match
2315         the final result. Implement this by hooking into the existing code
2316         for hiding the arrows during animation - a WebKitSystemInterface update
2317         will implement the other side.
2318
2319         * platform/mac/WebCoreSystemInterface.h: Rename parameter to be more clear.
2320         * platform/mac/WebCoreSystemInterface.mm:
2321         * rendering/RenderMenuList.cpp:
2322         (RenderMenuList::menuStyle): We need to check that we are a native-looking
2323         button, not just something with appearance.
2324
2325 2014-10-08  Christophe Dumez  <cdumez@apple.com>
2326
2327         Use is<>() / downcast<>() for RenderBlock objects
2328         https://bugs.webkit.org/show_bug.cgi?id=137512
2329
2330         Reviewed by Darin Adler.
2331
2332         Use is<>() / downcast<>() for RenderBlock objects and clean up the
2333         surrounding code.
2334
2335         No new tests, no behavior change.
2336
2337         * accessibility/AccessibilityRenderObject.cpp:
2338         (WebCore::firstChildConsideringContinuation):
2339         (WebCore::lastChildConsideringContinuation):
2340         (WebCore::AccessibilityRenderObject::firstChild):
2341         (WebCore::startOfContinuations):
2342         (WebCore::endOfContinuations):
2343         (WebCore::childBeforeConsideringContinuations):
2344         (WebCore::AccessibilityRenderObject::previousSibling):
2345         (WebCore::AccessibilityRenderObject::nextSibling):
2346         (WebCore::nextContinuation):
2347         (WebCore::AccessibilityRenderObject::renderParentObject):
2348         (WebCore::AccessibilityRenderObject::anchorElement):
2349         (WebCore::AccessibilityRenderObject::setValue):
2350         * bindings/objc/DOMUIKitExtensions.mm:
2351         (-[DOMNode containsOnlyInlineObjects]):
2352         (-[DOMNode isSelectableBlock]):
2353         (-[DOMHTMLElement structuralComplexityContribution]):
2354         * css/CSSComputedStyleDeclaration.cpp:
2355         (WebCore::valueForGridTrackList):
2356         * editing/CompositeEditCommand.cpp:
2357         (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded):
2358         * editing/TextIterator.cpp:
2359         (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
2360         * page/ios/FrameIOS.mm:
2361         (WebCore::Frame::preferredHeight):
2362         * rendering/LogicalSelectionOffsetCaches.h:
2363         (WebCore::containingBlockForFixedPosition):
2364         (WebCore::containingBlockForAbsolutePosition):
2365         (WebCore::containingBlockForObjectInFlow):
2366         * rendering/RenderBlock.cpp:
2367         (WebCore::RenderBlock::styleWillChange):
2368         (WebCore::RenderBlock::continuationBefore):
2369         (WebCore::RenderBlock::splitBlocks):
2370         (WebCore::RenderBlock::addChildIgnoringContinuation):
2371         (WebCore::canMergeAnonymousBlock):
2372         (WebCore::canMergeContiguousAnonymousBlocks):
2373         (WebCore::RenderBlock::collapseAnonymousBoxChild):
2374         (WebCore::RenderBlock::removeChild):
2375         (WebCore::RenderBlock::blockElementContinuation):
2376         (WebCore::RenderBlock::blockSelectionGaps):
2377         (WebCore::RenderBlock::blockBeforeWithinSelectionRoot):
2378         (WebCore::isChildHitTestCandidate):
2379         (WebCore::RenderBlock::firstLineBlock):
2380         (WebCore::findFirstLetterBlock):
2381         (WebCore::RenderBlock::childBecameNonInline):
2382         (WebCore::RenderBlock::hasMarginBeforeQuirk):
2383         (WebCore::RenderBlock::hasMarginAfterQuirk):
2384         * rendering/RenderBlock.h:
2385         * rendering/RenderBlockFlow.cpp:
2386         (WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
2387         (WebCore::RenderBlockFlow::estimateLogicalTopPosition):
2388         (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
2389         (WebCore::RenderBlockFlow::positionNewFloats):
2390         (WebCore::RenderBlockFlow::markSiblingsWithFloatsForLayout):
2391         * rendering/RenderBlockLineLayout.cpp:
2392         (WebCore::RenderBlockFlow::positionNewFloatOnLine):
2393         * rendering/RenderBox.cpp:
2394         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
2395         (WebCore::RenderBox::availableLogicalHeightUsing):
2396         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
2397         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
2398         (WebCore::computeInlineStaticDistance):
2399         (WebCore::RenderBox::computePositionedLogicalWidth):
2400         (WebCore::RenderBox::computePositionedLogicalHeight):
2401         * rendering/RenderBoxModelObject.cpp:
2402         (WebCore::accumulateInFlowPositionOffsets):
2403         (WebCore::RenderBoxModelObject::moveChildTo):
2404         (WebCore::RenderBoxModelObject::moveChildrenTo):
2405         * rendering/RenderElement.cpp:
2406         (WebCore::RenderElement::propagateStyleToAnonymousChildren):
2407         * rendering/RenderFlowThread.cpp:
2408         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
2409         * rendering/RenderFullScreen.cpp:
2410         (WebCore::RenderFullScreen::unwrapRenderer):
2411         * rendering/RenderInline.cpp:
2412         (WebCore::RenderInline::inlineElementContinuation):
2413         (WebCore::updateStyleOfAnonymousBlockContinuations):
2414         (WebCore::RenderInline::styleDidChange):
2415         (WebCore::nextContinuation):
2416         (WebCore::RenderInline::splitFlow):
2417         (WebCore::RenderInline::positionForPoint):
2418         * rendering/RenderLayer.cpp:
2419         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
2420         (WebCore::RenderLayer::calculateClipRects):
2421         * rendering/RenderListItem.cpp:
2422         (WebCore::getParentOfFirstLineBox):
2423         (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
2424         (WebCore::RenderListItem::positionListMarker):
2425         * rendering/RenderNamedFlowFragment.cpp:
2426         (WebCore::RenderNamedFlowFragment::maxPageLogicalHeight):
2427         * rendering/RenderObject.cpp:
2428         (WebCore::includeNonFixedHeight):
2429         (WebCore::RenderObject::checkBlockPositionedObjectsNeedLayout):
2430         (WebCore::RenderObject::containingBlock):
2431         (WebCore::RenderObject::handleDynamicFloatPositionChange):
2432         (WebCore::RenderObject::removeAnonymousWrappersForInlinesIfNecessary):
2433         (WebCore::RenderObject::getTextDecorationColors):
2434         * rendering/RenderRuby.cpp:
2435         (WebCore::rubyBeforeBlock):
2436         (WebCore::rubyAfterBlock):
2437         * rendering/RenderRubyBase.cpp:
2438         (WebCore::RenderRubyBase::moveInlineChildren):
2439         (WebCore::RenderRubyBase::moveBlockChildren):
2440         * rendering/RenderThemeMac.mm:
2441         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
2442         * rendering/TextAutosizer.cpp:
2443         (WebCore::TextAutosizer::processSubtree):
2444         (WebCore::TextAutosizer::processContainer):
2445         (WebCore::TextAutosizer::measureDescendantTextWidth):
2446         (WebCore::TextAutosizer::findDeepestBlockContainingAllText):
2447         (WebCore::TextAutosizer::findFirstTextLeafNotInCluster):
2448         * rendering/mathml/RenderMathMLRoot.cpp:
2449         (WebCore::RenderMathMLRoot::layout):
2450
2451 2014-10-08  Jer Noble  <jer.noble@apple.com>
2452
2453         Unreviewed follow-up fix for r174460. Do not register for KVOs if the object does not respond to the requested property.
2454
2455         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2456         (-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]):
2457         (-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]):
2458         (-[CDMSessionMediaSourceAVFObjCObserver invalidate]):
2459
2460 2014-10-08  Dean Jackson  <dino@apple.com>
2461
2462         Add deprecation warning for CSSKeyframesRule::appendRule
2463         https://bugs.webkit.org/show_bug.cgi?id=137532
2464         <rdar://problem/18585745>
2465
2466         Reviewed by Brent Fulgham.
2467
2468         In r173982 (webkit.org/b/57910) we added insertRule to match
2469         the spec. We should print a warning to the JS console suggesting
2470         users move to insertRule.
2471
2472         * css/WebKitCSSKeyframesRule.cpp:
2473         (WebCore::WebKitCSSKeyframesRule::appendRule): Add a message to the system
2474         console.
2475         * css/WebKitCSSKeyframesRule.h:
2476
2477 2014-10-08  Myles C. Maxfield  <mmaxfield@apple.com>
2478
2479         Text drawn with an SVG font has no spaces when word-rounding hacks are enabled
2480         https://bugs.webkit.org/show_bug.cgi?id=137463
2481
2482         Reviewed by Darin Adler.
2483
2484         When rounding hacks are enabled, we use the "adjusted space width" instead of the
2485         regular space width. However, the SVG-font-specific implementation of the
2486         SimpleFontData constructor doesn't initialize this value, so it was getting set
2487         to an undefined value (which happened to be close to 0 in my tests).
2488
2489         Test: svg/text/svg-font-word-rounding-hacks-spaces.html
2490
2491         * css/CSSFontFaceSource.cpp:
2492         (WebCore::CSSFontFaceSource::getFontData):
2493         (WebCore::CSSFontFaceSource::ensureFontData):
2494         * loader/cache/CachedFont.cpp:
2495         (WebCore::CachedFont::ensureCustomFontData):
2496         (WebCore::CachedFont::getSVGFontById):
2497         * platform/graphics/SimpleFontData.h:
2498         * svg/SVGFontData.cpp:
2499         (WebCore::SVGFontData::initializeFontData):
2500
2501 2014-10-08  Brent Fulgham  <bfulgham@apple.com>
2502
2503         [Win] Resolve various static analyzer warnings in WebCore.
2504         https://bugs.webkit.org/show_bug.cgi?id=137526
2505
2506         Reviewed by Dean Jackson.
2507
2508         A series of small changes to resolve various issues found by the MSVC static analyzer.
2509
2510         * inspector/NetworkResourcesData.cpp:
2511         (WebCore::NetworkResourcesData::clear): Add assertion that it->value should never be null.
2512         * page/SessionIDHash.h:
2513         (WTF::HashTraits<WebCore::SessionID>::constructDeletedValue): Add explicit cast to avoid
2514         compiler warning.
2515         (WTF::HashTraits<WebCore::SessionID>::isDeletedValue): Ditto.
2516         * page/win/FrameCGWin.cpp:
2517         (WebCore::imageFromRect): Resolve static analyzer warnings by initializing bits, and
2518         checking the return value of ::CreateDIBSection, which return nullptr on error.
2519         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2520         (printLayer): Use correct MSVC format specifier for size_t.
2521         * platform/graphics/win/FontCacheWin.cpp:
2522         (WebCore::getLinkedFonts): Handle possibility that a font link key does not exist.
2523         (WebCore::FontCache::systemFallbackForCharacters): Handle error case when a valid code page
2524         does not exist for a given character.
2525         * platform/graphics/win/SimpleFontDataWin.cpp:
2526         (WebCore::SimpleFontData::containsCharacters): Handle error cases for mapping to the CP_ACP code page,
2527         and related failures when attempting to access the contents of a given code page.
2528         * platform/graphics/win/UniscribeController.cpp:
2529         (WebCore::UniscribeController::itemizeShapeAndPlace): Handle possible failure in the
2530         ScriptItemize API call.
2531         (WebCore::UniscribeController::shapeAndPlaceItem): Ditto for ScriptXtoCP API call.
2532         * platform/win/BString.h: Use consistent SAL annotations for our typedeof of BSTR as in
2533         the system header.
2534         * platform/win/COMPtr.h: Ditto for HRESULT.
2535         * platform/win/DragImageCGWin.cpp:
2536         (WebCore::allocImage): Handle case of failing CreateDIBSection API call.
2537         * platform/win/PopupMenuWin.cpp:
2538         (WebCore::PopupMenuWin::show): Handle case of failing SystemParamtersInfo API call.
2539         (WebCore::PopupMenuWin::wndProc): Ditto.
2540
2541 2014-10-07  Jer Noble  <jer.noble@apple.com>
2542
2543         [EME][Mac] Update CDMSessionMediaSourceAVFObjC to match new API provided by AVStreamSession
2544         https://bugs.webkit.org/show_bug.cgi?id=137469
2545
2546         Reviewed by Brent Fulgham.
2547
2548         Update our forward declaration to match the API provided by AVStreamSession.
2549         AVStreamSession now takes an error: parameter in its initialiazer. It also provides the
2550         sessionIdentifier used by the CDM, which CDMSessionMediaSourceAVFObjC will use as the
2551         value of sessionId. Having this identifier allows us to fire a
2552         secure-proof-of-key-release message after the client calls MediaKeySession.close().
2553         Because this call will now generate messages, which have to be responded to in order
2554         to remove those proofs from storage, do not clear the CDMSession from MediaKeySession
2555         after calling close().
2556
2557         * Modules/encryptedmedia/MediaKeySession.cpp:
2558         (WebCore::MediaKeySession::~MediaKeySession):
2559         (WebCore::MediaKeySession::close):
2560         (WebCore::MediaKeySession::setError): Deleted.
2561         (WebCore::MediaKeySession::sessionId): Deleted.
2562         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
2563         (WebCore::CDMSessionMediaSourceAVFObjC::setSessionId):
2564         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2565         (-[CDMSessionMediaSourceAVFObjCListener initWithParent:]):
2566         (-[CDMSessionMediaSourceAVFObjCObserver dealloc]):
2567         (-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]):
2568         (-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]):
2569         (-[CDMSessionMediaSourceAVFObjCObserver invalidate]):
2570         (-[CDMSessionMediaSourceAVFObjCListener observeValueForKeyPath:ofObject:change:context:]):
2571         (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC):
2572         (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC):
2573         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
2574         (WebCore::CDMSessionMediaSourceAVFObjC::update):
2575         (WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer):
2576         (WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer):
2577
2578 2014-10-08  Chris Dumez  <cdumez@apple.com>
2579
2580         Unreviewed build fix after r174456.
2581
2582         I was comparing a signed int to an unsigned one.
2583
2584         * platform/graphics/mac/FontCacheMac.mm:
2585         (WebCore::shouldAutoActivateFontIfNeeded):
2586
2587 2014-10-08  Christophe Dumez  <cdumez@apple.com>
2588
2589         [Mac] We are spending a lot of time loading fonts when loading weather.com
2590         https://bugs.webkit.org/show_bug.cgi?id=137454
2591
2592         Reviewed by Darin Adler.
2593
2594         We are spending a lot of time loading fonts when loading weather.com:
2595         ~4.2% of WebProcess's cpu time in FontCache::getCachedFrontData().
2596         In particular, we are spending a lot of time doing font auto-activation
2597         because we don't have the Open Sans fonts installed and weather.com is
2598         trying to load those.
2599
2600         Before this patch, we were doing font auto-activation ~250 times when
2601         loading weather.com, even though the site is loading ~10 distinct font
2602         families.
2603
2604         This patch adds a cache of font families we already tried to
2605         auto-activate so that we don't try again. This results in ~10 font
2606         auto-activations when loading weather.com instead of 250. It reduces
2607         the amount of time spent in getCachedFrontData() to 62.6ms from 276ms
2608         (4.4x less) when loading weather.com.
2609
2610         No new tests, no behavior change.
2611
2612         * platform/graphics/mac/FontCacheMac.mm:
2613         (WebCore::shouldAutoActivateFontIfNeeded):
2614         (WebCore::FontCache::createFontPlatformData):
2615         * platform/mac/WebFontCache.h:
2616         * platform/mac/WebFontCache.mm:
2617         (+[WebFontCache fontWithFamily:traits:weight:size:shouldAutoActivateIfNeeded:]):
2618         (+[WebFontCache fontWithFamily:traits:weight:size:]):
2619         (+[WebFontCache fontWithFamily:traits:size:]):
2620
2621 2014-10-08  Darin Adler  <darin@apple.com>
2622
2623         ASSERTION FAILED: underlyingStringIsValid()
2624         https://bugs.webkit.org/show_bug.cgi?id=137502
2625
2626         Reviewed by Anders Carlsson.
2627
2628         * rendering/RenderTreeAsText.cpp:
2629         (WebCore::quoteAndEscapeNonPrintables): Take a StringView instead of a String.
2630         (WebCore::writeTextRun): Ditto.
2631         (WebCore::writeSimpleLine): Ditto.
2632
2633         * rendering/RenderTreeAsText.h: Removed unneeded include, tweaked formatting,
2634         changed quoteAndEscapeNonPrintables to take a StringView.
2635
2636         * rendering/SimpleLineLayoutFunctions.cpp:
2637         (WebCore::SimpleLineLayout::paintFlow): Tighten code using a modern for loop.
2638         (WebCore::SimpleLineLayout::showLineLayoutForFlow): Update to work with a
2639         StringView result for SimpleLineLayout::RunResolver::Run::text.
2640
2641         * rendering/SimpleLineLayoutResolver.h:
2642         (WebCore::SimpleLineLayout::RunResolver::Run::text): Changed return type to
2643         StringView to fix the lifetime bug and also to improve performance by getting
2644         rid of the need to allocate and destroy a StringImpl object.
2645
2646 2014-10-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2647
2648         [EFL] Call requestScrollPositionUpdate() instead of delegatedScrollRequested() in ScrollView::scrollTo()
2649         https://bugs.webkit.org/show_bug.cgi?id=137478
2650
2651         Reviewed by Benjamin Poulain.
2652
2653         As r174380 did, ScrollView::scrollTo() also calls requestScrollPositionUpdate() instead of delegatedScrollRequested().
2654         delegatedScrollRequested() will be only called by requestScrollPositionUpdate(), and it needs to be merged by existing
2655         other scroll request function.
2656
2657         No new tests, no behavior changes.
2658
2659         * platform/ScrollView.cpp:
2660         (WebCore::ScrollView::scrollTo):
2661
2662 2014-10-08  Dean Jackson  <dino@apple.com>
2663
2664         Safari 8 on OSX 10.10 does not run WebGL in Retina HiDPI mode.
2665         https://bugs.webkit.org/show_bug.cgi?id=134854
2666         <rdar://problem/18465263>
2667
2668         Reviewed by Tim Horton.
2669
2670         The NSOpenGLLayer has to have its contentScale property
2671         set accordingly when on a retina display. Do this by
2672         adding another value to the GraphicsContext3D creation
2673         attribute dictionary, representing the device pixel ratio.
2674         Then, when we come to draw into the layer, make sure
2675         we set our GL viewport to the correct value.
2676
2677         This is currently untestable because:
2678         - we can't just read from the GL buffer as it is always correct
2679         - WebGL isn't working in reftests
2680         - a layer dump doesn't show the change since it was done in a CALayer subclass.
2681
2682         * html/canvas/WebGLRenderingContext.cpp:
2683         (WebCore::WebGLRenderingContext::create): Pass the devicePixelRatio into the attribute dictionary.
2684         * platform/graphics/GraphicsContext3D.h:
2685         (WebCore::GraphicsContext3D::Attributes::Attributes): Add a devicePixelRatio attribute.
2686         * platform/graphics/mac/WebGLLayer.h: New property to save us looking up the attributes
2687         each frame.
2688         * platform/graphics/mac/WebGLLayer.mm:
2689         (-[WebGLLayer initWithGraphicsContext3D:]): Store the devicePixelRatio, and set our
2690         contents scale appropriately.
2691         (-[WebGLLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]): Draw into
2692         a correctly sized backbuffer.
2693         (-[WebGLLayer copyImageSnapshotWithColorSpace:]): Generate an image of the correct size.
2694
2695 2014-10-07  Simon Fraser  <simon.fraser@apple.com>
2696
2697         Roll-over Changelogs.
2698
2699         * ChangeLog-2014-10-07: Copied from Source/WebCore/ChangeLog.
2700
2701 == Rolled over to ChangeLog-2014-10-07 ==