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