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