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