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