4c8c74e229aa6bdf21df7ddef58e33020aaef1a2
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-05-11  Zan Dobersek  <zdobersek@igalia.com>
2
3         Move Source/WebCore/workers/ code to std::unique_ptr
4         https://bugs.webkit.org/show_bug.cgi?id=132401
5
6         Reviewed by Darin Adler.
7
8         Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/workers (and related places)
9         with std::unique_ptr.
10
11         * bindings/js/JSDOMWindowCustom.cpp:
12         (WebCore::JSDOMWindow::setTimeout):
13         (WebCore::JSDOMWindow::setInterval):
14         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
15         (WebCore::JSWorkerGlobalScope::setTimeout):
16         (WebCore::JSWorkerGlobalScope::setInterval):
17         * bindings/js/ScheduledAction.cpp:
18         (WebCore::ScheduledAction::create):
19         * bindings/js/ScheduledAction.h:
20         * page/DOMTimer.cpp:
21         (WebCore::DOMTimer::DOMTimer):
22         (WebCore::DOMTimer::install):
23         (WebCore::DOMTimer::fired):
24         (WebCore::DOMTimer::didStop):
25         * page/DOMTimer.h:
26         * page/DOMWindow.cpp:
27         (WebCore::DOMWindow::setTimeout):
28         (WebCore::DOMWindow::setInterval):
29         * page/DOMWindow.h:
30         * workers/WorkerEventQueue.h:
31         * workers/WorkerGlobalScope.cpp:
32         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
33         (WebCore::WorkerGlobalScope::setTimeout):
34         (WebCore::WorkerGlobalScope::setInterval):
35         * workers/WorkerGlobalScope.h:
36         (WebCore::WorkerGlobalScope::clearScript):
37         * workers/WorkerLoaderProxy.h:
38         * workers/WorkerMessagingProxy.h:
39         * workers/WorkerRunLoop.cpp:
40         (WebCore::WorkerRunLoop::WorkerRunLoop):
41         * workers/WorkerRunLoop.h:
42         * workers/WorkerScriptLoader.cpp:
43         (WebCore::WorkerScriptLoader::loadSynchronously):
44         (WebCore::WorkerScriptLoader::loadAsynchronously):
45         (WebCore::WorkerScriptLoader::createResourceRequest):
46         * workers/WorkerScriptLoader.h:
47         * workers/WorkerThread.cpp:
48         (WebCore::WorkerThread::WorkerThread):
49         (WebCore::WorkerThread::workerThread):
50         (WebCore::WorkerThreadStartupData::create): Deleted.
51         * workers/WorkerThread.h:
52
53 2014-05-09  Myles C. Maxfield  <litherum@gmail.com>
54
55         [Mac] [iOS] Underlines are too low
56         https://bugs.webkit.org/show_bug.cgi?id=132770
57
58         Reviewed by Darin Adler.
59
60         computeUnderlineOffset() inside InlineTextBox.cpp lowers underlines from text
61         baseline by a value that is proportional to the font size. However, this
62         lowering was done a second time in
63         GraphicsContext::computeLineBoundsAndAntialiasingModeForText(). This patch
64         removes this second, platform-dependent lowering.
65
66         This duplication was caused by merging iOS into open source, where iOS used
67         the GraphicsContext approach and open source used the InlineTextBox approach.
68
69         Covered by fast/css3-text/css3-text-decoration/text-decoration-thickness.html.
70
71         * platform/graphics/GraphicsContext.cpp:
72         (WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText): Remove
73         redundant lowering code
74         * rendering/InlineTextBox.cpp:
75         (WebCore::InlineTextBox::paintDecoration): Clean up textDecorationThickness
76         variable
77
78 2014-05-11  Antti Koivisto  <antti@apple.com>
79
80         Text with simple line layout not getting pushed below float when there is not enough space for it
81         https://bugs.webkit.org/show_bug.cgi?id=126991
82
83         Reviewed by Andreas Kling.
84
85         Tests: fast/text/simple-lines-intruding-wide-float-dynamic.html
86                fast/text/simple-lines-intruding-wide-float.html
87
88         * rendering/RenderBlockFlow.cpp:
89         (WebCore::RenderBlockFlow::markLinesDirtyInBlockRange):
90         
91             Invalidate the line layout path when floats change. We need to check SimpleLineLayout::canUseFor again as
92             intruding floats may make this flow ineligible to use the path.
93
94         * rendering/RenderBlockFlow.h:
95         (WebCore::RenderBlockFlow::floatingObjectSet):
96         * rendering/SimpleLineLayout.cpp:
97         (WebCore::SimpleLineLayout::canUseFor):
98         
99             Test the top positions of all floats for case that would push text below the float instead of just testing 
100             the first line. We may have floats in the middle of the paragraph too.
101
102 2014-05-11  peavo@outlook.com  <peavo@outlook.com>
103
104         WinCairo crashes on acid3 test
105         https://bugs.webkit.org/show_bug.cgi?id=131364
106
107         Reviewed by Brent Fulgham.
108
109         When the 304 (Not-modified) response is received, the Curl backend should look up the cached response,
110         and call the client method didReceiveResponse with the cached response, instead of the 304 response.
111         Otherwise the response will contain an empty MIME type, which causes the request to be cancelled, and the client deleted.
112         When the Curl cache manager then accesses the client afterwards, it is deleted, and we crash.
113
114         * platform/network/curl/CurlCacheManager.cpp:
115         (WebCore::CurlCacheManager::didReceiveResponse): Return early if request is cancelled.
116         (WebCore::CurlCacheManager::getCachedResponse): Added method to get cached response.
117         * platform/network/curl/CurlCacheManager.h: Ditto.
118         * platform/network/curl/ResourceHandleManager.cpp:
119         (WebCore::headerCallback): When 304 response is received, look up cached response, and use it.
120
121 2014-05-10  Tim Horton  <timothy_horton@apple.com>
122
123         [WKWebView _updateScrollViewBackground] churns UI-and-CGColors while repainting
124         https://bugs.webkit.org/show_bug.cgi?id=132793
125         <rdar://problem/16877870>
126
127         Reviewed by Dan Bernstein.
128
129         * WebCore.exp.in:
130         Export a Color convenience function.
131
132 2014-05-10  Commit Queue  <commit-queue@webkit.org>
133
134         Unreviewed, rolling out r168578.
135         https://bugs.webkit.org/show_bug.cgi?id=132789
136
137         Speculative rollout since this appears to break PLT3.
138         (Requested by kling on #webkit).
139
140         Reverted changeset:
141
142         "Move Source/WebCore/workers/ code to std::unique_ptr"
143         https://bugs.webkit.org/show_bug.cgi?id=132401
144         http://trac.webkit.org/changeset/168578
145
146 2014-05-10  Darin Adler  <darin@apple.com>
147
148         REGRESSION (r166853): fast/preloader/document-write.html is very flaky
149         https://bugs.webkit.org/show_bug.cgi?id=130942
150
151         Reviewed by Anders Carlsson.
152
153         * style/StyleResolveTree.cpp:
154         (WebCore::Style::suspendMemoryCacheClientCalls): Use a RefPtr to the main
155         frame as a weak pointer to a Page that will work unless the page is destroyed.
156         The old code tried to do it with a RefPtr to a document, but as the FIXME
157         points out, that won't work if the document is disassociated with its frame.
158
159 2014-05-10  Anders Carlsson  <andersca@apple.com>
160
161         Block exceptions when trying to convert attributed strings to RTF and RTFD
162         https://bugs.webkit.org/show_bug.cgi?id=132778
163         <rdar://problem/16675805>
164
165         Reviewed by Darin Adler.
166
167         When the iOS WebHTMLConverter was upstreamed, converting some attributed strings to RTF and RTFD
168         started throwing Objective-C exceptions (see <rdar://problem/16876920>).
169         
170         In WebKit2, we now crash on unhandled exceptions so work around that crash by adding exception blocking macros.
171
172         * editing/ios/EditorIOS.mm:
173         (WebCore::dataInRTFDFormat):
174         (WebCore::dataInRTFFormat):
175         * editing/mac/EditorMac.mm:
176         (WebCore::dataInRTFDFormat):
177         (WebCore::dataInRTFFormat):
178
179 2014-05-10  Zan Dobersek  <zdobersek@igalia.com>
180
181         Move Source/WebCore/workers/ code to std::unique_ptr
182         https://bugs.webkit.org/show_bug.cgi?id=132401
183
184         Reviewed by Andreas Kling.
185
186         Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/workers (and related places)
187         with std::unique_ptr.
188
189         * bindings/js/JSDOMWindowCustom.cpp:
190         (WebCore::JSDOMWindow::setTimeout):
191         (WebCore::JSDOMWindow::setInterval):
192         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
193         (WebCore::JSWorkerGlobalScope::setTimeout):
194         (WebCore::JSWorkerGlobalScope::setInterval):
195         * bindings/js/ScheduledAction.cpp:
196         (WebCore::ScheduledAction::create):
197         * bindings/js/ScheduledAction.h:
198         * page/DOMTimer.cpp:
199         (WebCore::DOMTimer::DOMTimer):
200         (WebCore::DOMTimer::install):
201         (WebCore::DOMTimer::fired):
202         (WebCore::DOMTimer::didStop):
203         * page/DOMTimer.h:
204         * page/DOMWindow.cpp:
205         (WebCore::DOMWindow::setTimeout):
206         (WebCore::DOMWindow::setInterval):
207         * page/DOMWindow.h:
208         * workers/WorkerEventQueue.h:
209         * workers/WorkerGlobalScope.cpp:
210         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
211         (WebCore::WorkerGlobalScope::setTimeout):
212         (WebCore::WorkerGlobalScope::setInterval):
213         * workers/WorkerGlobalScope.h:
214         (WebCore::WorkerGlobalScope::clearScript):
215         * workers/WorkerLoaderProxy.h:
216         * workers/WorkerMessagingProxy.h:
217         * workers/WorkerRunLoop.cpp:
218         (WebCore::WorkerRunLoop::WorkerRunLoop):
219         * workers/WorkerRunLoop.h:
220         * workers/WorkerScriptLoader.cpp:
221         (WebCore::WorkerScriptLoader::loadSynchronously):
222         (WebCore::WorkerScriptLoader::loadAsynchronously):
223         (WebCore::WorkerScriptLoader::createResourceRequest):
224         * workers/WorkerScriptLoader.h:
225         * workers/WorkerThread.cpp:
226         (WebCore::WorkerThread::WorkerThread):
227         (WebCore::WorkerThread::workerThread):
228         (WebCore::WorkerThreadStartupData::create): Deleted.
229         * workers/WorkerThread.h:
230
231 2014-05-09  Dean Jackson  <dino@apple.com>
232
233         -webkit-filter prevents rendering at retina scale
234         https://bugs.webkit.org/show_bug.cgi?id=93471
235
236         Reviewed by Dirk Schulze.
237
238         Implement 2x support for filters that go through
239         the -webkit-filter property. This includes all
240         shorthand filters, and any referenced SVG-style filters
241         (as long as they use only the supported subset of
242         operations - basically the same as is exposed for
243         the shorthands).
244
245         Tests: fast/hidpi/filters-blur.html
246                fast/hidpi/filters-hue-rotate.html
247                fast/hidpi/filters-invert.html
248                fast/hidpi/filters-multiple.html
249                fast/hidpi/filters-reference.html
250                fast/hidpi/filters-shadow.html
251
252         * platform/graphics/cg/ImageBufferCG.cpp:
253         (WebCore::ImageBuffer::getUnmultipliedImageData): Scale the source rectangle if the method was
254         called using LogicalCoordinates.
255         (WebCore::ImageBuffer::getPremultipliedImageData): Ditto.
256         (WebCore::ImageBuffer::putByteArray): Ditto.
257
258         * platform/graphics/filters/FEDropShadow.cpp:
259         (WebCore::FEDropShadow::platformApplySoftware): Make sure to scale the blur radius by the filter
260         resolution, and call the byte-array methods with the native coordinate system.
261         * platform/graphics/filters/FEGaussianBlur.cpp:
262         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize): Fix typo.
263         (WebCore::FEGaussianBlur::platformApplySoftware): Scale the kernel and paint rectangles
264         by the filter scale.
265
266         * platform/graphics/filters/Filter.h:
267         (WebCore::Filter::Filter): Initialise the filter scale.
268         (WebCore::Filter::filterScale): New property which reflects the mapping between logical pixels
269         and device pixels.
270         (WebCore::Filter::setFilterScale):
271
272         * platform/graphics/filters/FilterEffect.cpp:
273         (WebCore::FilterEffect::asImageBuffer): Make sure buffer creation takes scale into account.
274         (WebCore::FilterEffect::asUnmultipliedImage): Ditto.
275         (WebCore::FilterEffect::asPremultipliedImage): Ditto.
276         (WebCore::FilterEffect::copyImageBytes): Scale any incoming regions if they are talking about
277         device pixels rather than logical pixels.
278         (WebCore::FilterEffect::copyUnmultipliedImage): Ditto.
279         (WebCore::FilterEffect::copyPremultipliedImage): Ditto.
280         (WebCore::FilterEffect::createImageBufferResult): Take scale into account when creating byte array.
281         (WebCore::FilterEffect::createUnmultipliedImageResult): Ditto.
282         (WebCore::FilterEffect::createPremultipliedImageResult): Ditto.
283
284         * rendering/FilterEffectRenderer.cpp:
285         (WebCore::FilterEffectRenderer::allocateBackingStoreIfNeeded): Pass filter scale into buffer creation.
286
287         * rendering/RenderLayer.cpp:
288         (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer): Make sure to set the filter scale to
289         the device scale factor, and notice if we ever change scales.
290
291 2014-05-10  Praveen R Jadhav  <praveen.j@samsung.com>
292
293         [MediaStream] Rename NavigatorMediaStream as NavigatorUserMedia.
294         https://bugs.webkit.org/show_bug.cgi?id=132734
295
296         Reviewed by Eric Carlson.
297
298         Spec: http://www.w3.org/TR/mediacapture-streams/#navigatorusermedia
299
300         This patch replaces 'NavigatorMediaStream' with 'NavigatorUserMedia'
301         throughout the code to be consistent with W3C specifications.
302         Test cases remain the same as 'Navigator' implies 'NavigatorUserMedia'.
303
304         * CMakeLists.txt: Compiles NavigatorUserMedia.cpp
305         * DerivedSources.make: Compiles NavigatorUserMedia.idl
306         * Modules/mediastream/NavigatorMediaStream.cpp: Removed.
307         * Modules/mediastream/NavigatorMediaStream.h: Removed.
308         * Modules/mediastream/NavigatorMediaStream.idl: Removed.
309         * Modules/mediastream/NavigatorUserMedia.cpp: Added.
310         (WebCore::NavigatorUserMedia::NavigatorUserMedia):
311         (WebCore::NavigatorUserMedia::~NavigatorUserMedia):
312         (WebCore::NavigatorUserMedia::webkitGetUserMedia):
313         * Modules/mediastream/NavigatorUserMedia.h: Added.
314         * Modules/mediastream/NavigatorUserMedia.idl: Added.
315         * WebCore.xcodeproj/project.pbxproj:
316         * bindings/js/JSNavigatorCustom.cpp:
317         (WebCore::JSNavigator::webkitGetUserMedia): NavigatorUserMedia
318         class is used instead of NavigatorMediaStream.
319
320 2014-05-10  Zalan Bujtas  <zalan@apple.com>
321
322         Subpixel rendering: Empty rects should remain empty after integrally enclosing them.
323         https://bugs.webkit.org/show_bug.cgi?id=132753
324         <rdar://problem/16846801>
325
326         Reviewed by Simon Fraser.
327
328         This patch ensures that empty LayoutRects remain empty after converting to integral enclosing rect.
329         LayoutRects with fractional position get expanded even if they are empty. This makes rectangle
330         operations unreliable and can result in undesired side effects.
331
332         No testable/covered by existing tests.
333
334         * platform/graphics/LayoutRect.cpp:
335         (WebCore::enclosingIntRect):
336         * rendering/InlineTextBox.cpp:
337         (WebCore::InlineTextBox::localSelectionRect):
338         (WebCore::InlineTextBox::paintDocumentMarker):
339         (WebCore::InlineTextBox::paintTextMatchMarker):
340         (WebCore::InlineTextBox::computeRectForReplacementMarker):
341         (WebCore::integralEnclosingRectForSelection): Deleted.
342
343 2014-05-09  Joseph Pecoraro  <pecoraro@apple.com>
344
345         Web Inspector: Allow Remote Inspector to entitlement check UIProcess through WebProcess
346         https://bugs.webkit.org/show_bug.cgi?id=132409
347
348         Reviewed by Timothy Hatcher.
349
350         * inspector/InspectorClient.h:
351         (WebCore::InspectorClient::parentProcessIdentifier): Deleted.
352         * page/PageDebuggable.cpp:
353         (WebCore::PageDebuggable::parentProcessIdentifier): Deleted.
354         * page/PageDebuggable.h:
355         pid per debuggable is no longer needed.
356
357 2014-05-09  Dean Jackson  <dino@apple.com>
358
359         [fullscreen] cursor should auto-hide when over video
360         https://bugs.webkit.org/show_bug.cgi?id=132758
361
362         Unreviewed followup based on test failure.
363
364         * css/fullscreen.css: Append the previous rule - video children of fullscreen elements.
365
366 2014-05-09  Dean Jackson  <dino@apple.com>
367
368         [fullscreen] cursor should auto-hide when over video
369         https://bugs.webkit.org/show_bug.cgi?id=132758
370
371         Reviewed by Brent Fulgham.
372
373         Cursors were not auto-hiding over fullscreen video. There was
374         a small error in the CSS we load for fullscreen content.
375
376         * css/fullscreen.css: Don't hide when video is a child of the fullscreen element - hide when it *is* the fullscreen element.
377         (video:-webkit-full-screen):
378         (:-webkit-full-screen video:hover): Deleted.
379
380 2014-05-09  Zalan Bujtas  <zalan@apple.com>
381
382         Subpixel rendering[iOS]: Top bar on apple.com/support jiggles when the swoosh animates.
383         https://bugs.webkit.org/show_bug.cgi?id=132750
384         <rdar://problem/16803281>
385
386         Reviewed by Simon Fraser.
387
388         This patch ensures that GraphicsLayer and RemoteLayerBackingStore have the same dimensions.
389         
390         Remove integral enclosing when we set the size on RemoteLayerBackingStore. It makes the layer's size
391         different from the backingstore when the passed value is fractional.
392         We scale and integral round this value to size the shareable bitmap later. Rounding ensures that
393         the final size value matches what we calculated at GraphicsLayerCA::updateGeometry()
394
395         Currently not testable.
396
397         * platform/graphics/ca/GraphicsLayerCA.cpp:
398         (WebCore::GraphicsLayerCA::updateGeometry):
399         (WebCore::GraphicsLayerCA::computePixelAlignment): include device scale factor to be able calculate the final content scale.
400         * platform/graphics/ca/GraphicsLayerCA.h:
401
402 2014-05-09  Mark Hahnenberg  <mhahnenberg@apple.com>
403
404         JSDOMWindow should disable property caching after a certain point
405         https://bugs.webkit.org/show_bug.cgi?id=132751
406
407         Reviewed by Filip Pizlo.
408
409         No new tests.
410
411         This is part of removing HasImpureGetOwnPropertySlot from JSDOMWindow. After the lookup in the static 
412         hash table for JSDOMWindow fails we want to disable property caching even if the code that follows thinks 
413         that it has provided a cacheable value.
414
415         * bindings/js/JSDOMWindowCustom.cpp:
416         (WebCore::JSDOMWindow::getOwnPropertySlot):
417
418 2014-05-09  Benjamin Poulain  <bpoulain@apple.com>
419
420         Fix the export file after r168556
421
422         * WebCore.exp.in: I forgot to fix the export file before landing.
423
424 2014-05-09  Benjamin Poulain  <bpoulain@apple.com>
425
426         [iOS][WK2] Set up the resize events
427         https://bugs.webkit.org/show_bug.cgi?id=132726
428
429         Reviewed by Darin Adler and Simon Fraser.
430
431         Let the WebKit2 layer override the size used for resize events.
432
433         * WebCore.exp.in:
434         * page/FrameView.cpp:
435         (WebCore::FrameView::layout):
436         (WebCore::FrameView::sizeForResizeEvent):
437         (WebCore::FrameView::sendResizeEventIfNeeded):
438         (WebCore::FrameView::setCustomSizeForResizeEvent):
439         * page/FrameView.h:
440
441 2014-05-09  Alexey Proskuryakov  <ap@apple.com>
442
443         REGRESSION (r168518): Multiple tests for workers in blobs assert
444         https://bugs.webkit.org/show_bug.cgi?id=132728
445
446         Reviewed by Geoffrey Garen.
447
448         Change File serialization to include name, so that we don't have to regenerate anything
449         on a secondary thread after deserialization.
450
451         Files and Blobs can't be stored persistently, because URLs are transient (IndexedDB
452         has an explicit check, and fails if there were any blob URLs). API doesn't have the
453         check, but given that anyone who tried to use these to serialize a File would fail,
454         it seems OK to change the format.
455
456         * bindings/js/SerializedScriptValue.cpp:
457         (WebCore::CloneSerializer::write):
458         (WebCore::CloneDeserializer::readFile):
459         * fileapi/File.cpp:
460         (WebCore::File::File):
461         * fileapi/File.h:
462
463 2014-05-08  Mark Hahnenberg  <mhahnenberg@apple.com>
464
465         JSDOMWindow should have a WatchpointSet to fire on window close
466         https://bugs.webkit.org/show_bug.cgi?id=132721
467
468         Reviewed by Filip Pizlo.
469
470         No new tests.
471
472         This patch allows us to reset the inline caches that assumed they could skip 
473         the first part of JSDOMWindow::getOwnPropertySlot that checks if the window has 
474         been closed. This is part of getting rid of HasImpureGetOwnPropertySlot on JSDOMWindow.
475
476         JSDOMWindowBase now has a WatchpointSet that the underlying DOMWindow fires when its
477         frame is cleared. In getOwnPropertySlot, we now pass this WatchpointSet to PropertySlot
478         which will shepherd it back up to the code that generates the inline cache (and the 
479         Watchpoint for clearing it).
480
481         * bindings/js/JSDOMWindowBase.cpp:
482         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
483         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
484         * bindings/js/JSDOMWindowBase.h:
485         * bindings/js/JSDOMWindowCustom.cpp:
486         (WebCore::JSDOMWindow::getOwnPropertySlot):
487         * page/DOMWindow.cpp:
488         (WebCore::DOMWindow::frameDestroyed):
489
490 2014-05-09  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
491
492         ASSERTION FAILED: object->style()->overflowX() == object->style()->overflowY()
493         https://bugs.webkit.org/show_bug.cgi?id=121682
494
495         Reviewed by Dirk Schulze.
496
497         Add more overflow freedom to the SVG element:
498         -overflow-x and overflow-y for controlling each scrollbar independently is now supported
499         -overflow:scroll will display scrollbars regardless of the svg overflowing or not (as required by CSS)
500         -overflow:hidden will cause overflow to be clipped away and scrollbars to be hidden
501
502         Merged from Blink r172126 by <ed@opera.com>
503
504         Tests: svg/W3C-SVG-1.1-SE/painting-marker-05-f.svg
505                svg/W3C-SVG-1.1-SE/painting-marker-06-f.svg
506                svg/animations/animate-viewport-overflow-2.html
507                svg/animations/animate-viewport-overflow.html
508                svg/in-html/overflow-repaint.html
509                svg/in-html/overflow-svg-root-attr.html
510                svg/in-html/overflow-svg-root-style.html
511                svg/in-html/overflow-svg-root.html
512                svg/overflow/overflow-on-outermost-svg-element-horizontal-auto.svg
513                svg/overflow/overflow-on-outermost-svg-element-vertical-auto.svg
514                svg/overflow/overflow-scroll-on-outermost-svg-element.svg
515                svg/overflow/overflow-x-hidden-on-outermost-svg-element-expected.svg
516                svg/overflow/overflow-x-hidden-on-outermost-svg-element.svg
517                svg/overflow/overflow-y-hidden-on-outermost-svg-element-expected.svg
518                svg/overflow/overflow-y-hidden-on-outermost-svg-element.svg
519
520         * css/StyleResolver.cpp:
521         (WebCore::StyleResolver::adjustRenderStyle):
522         * page/FrameView.cpp:
523         (WebCore::FrameView::applyOverflowToViewport):
524         * rendering/svg/RenderSVGRoot.cpp:
525         (WebCore::RenderSVGRoot::layout):
526         (WebCore::RenderSVGRoot::shouldApplyViewportClip):
527         (WebCore::RenderSVGRoot::paintReplaced):
528         (WebCore::RenderSVGRoot::computeFloatRectForRepaint):
529         * rendering/svg/RenderSVGRoot.h:
530         * rendering/svg/SVGRenderSupport.cpp:
531         (WebCore::SVGRenderSupport::isOverflowHidden):
532
533 2014-05-09  Jer Noble  <jer.noble@apple.com>
534
535         [MSE][Mac] Destroy the AVStreamDataParser when the SourceBuffer is removed from its MediaSource.
536         https://bugs.webkit.org/show_bug.cgi?id=132710
537
538         Reviewed by Eric Carlson.
539
540         The AVStreamDataParser should be destroyed when the SourceBuffer is removed, so that subsequent
541         SourceBuffers can utilize resources released by the parser on destruction.
542
543         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
544         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
545         (-[WebAVStreamDataParserListener invalidate]):
546         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]):  Protect against _parent being invalidated.
547         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]): Ditto.
548         (-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]): Ditto.
549         (-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]): Ditto.
550         (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC): Call destroyParser();.
551         (WebCore::SourceBufferPrivateAVFObjC::removedFromMediaSource): Ditto.
552         (WebCore::SourceBufferPrivateAVFObjC::destroyParser): Call -[WebAVStreamDataParserListener invalidate].
553
554 2014-05-09  Andrei Bucur  <abucur@adobe.com>
555
556         [CSS Regions] 1-2% performance regression in html5-full-render after r168286
557         https://bugs.webkit.org/show_bug.cgi?id=132672
558
559         Reviewed by Mihnea Ovidenie.
560
561         The patch optimizes the search of regions when there's a single region in the chain.
562         There's no need to execute advanced search logic, we can directly return that region.
563
564         Tests: No function change, no tests.
565
566         * rendering/RenderBlock.cpp:
567         (WebCore::canComputeRegionRangeForBox):
568         * rendering/RenderFlowThread.cpp:
569         (WebCore::RenderFlowThread::regionAtBlockOffset):
570         (WebCore::RenderFlowThread::hasCachedRegionRangeForBox): Renamed from hasRegionRangeForBox to
571         better suggest what the function does.
572         (WebCore::RenderFlowThread::getRegionRangeForBox):
573         (WebCore::RenderFlowThread::hasRegionRangeForBox): Deleted.
574         * rendering/RenderFlowThread.h:
575
576 2014-05-09  Jer Noble  <jer.noble@apple.com>
577
578         [EME] Call suspendIfNeeded() in the MediaKeySession create() method to avoid an ASSERT.
579         https://bugs.webkit.org/show_bug.cgi?id=132712
580
581         Reviewed by Eric Carlson.
582
583         All ActiveDOMObject subclasses must call suspendIfNeeded() immediately after creation.
584
585         * Modules/encryptedmedia/MediaKeySession.cpp:
586         (WebCore::MediaKeySession::MediaKeySession):
587
588 2014-05-09  Zalan Bujtas  <zalan@apple.com>
589
590         Unreviewed. Another attempt to fix Windows build after r168528.
591
592         * platform/graphics/win/FontWin.cpp:
593         (WebCore::Font::adjustSelectionRectForComplexText):
594
595 2014-05-09  Zalan Bujtas  <zalan@apple.com>
596
597         Unreviewed build fix for Win after r168528.
598
599         * platform/graphics/win/FontWin.cpp:
600         (WebCore::Font::adjustSelectionRectForComplexText):
601
602 2014-05-09  Zalan Bujtas  <zalan@apple.com>
603
604         REGRESSION (r168095): 1-pixel gap between adjacent selection inlines
605         https://bugs.webkit.org/show_bug.cgi?id=132474
606         <rdar://problem/16797394>
607
608         Reviewed by David Hyatt.
609
610         This patch changes text selection rectangle calculation from integral to device
611         pixel snapping. It ensures that selection rect painting matches box boundaries for inline elements.
612         Directional rounding (horizontal only atm) is moved out from Font class and now accessible
613         to all the painting code. RTL snapping strategy is changed from floor to round to match ltr behavior.
614         However this patch does not address all the integral snapping across inline elements. There are
615         a few places where we still calculate enclosing rects where snapping is sufficient.
616
617         Test: fast/inline/hidpi-pixel-gap-between-adjacent-selection-inlines.html
618
619         * platform/LayoutUnit.h:
620         (WebCore::roundToDevicePixel): added fudge factor to change rounding direction as directed.
621         * platform/graphics/Font.cpp:
622         (WebCore::Font::adjustSelectionRectForText):
623         (WebCore::Font::selectionRectForText): Deleted.
624         * platform/graphics/Font.h:
625         * platform/graphics/FontFastPath.cpp:
626         (WebCore::Font::adjustSelectionRectForSimpleText): removed directional rounding.
627         (WebCore::Font::selectionRectForSimpleText): Deleted.
628         * platform/graphics/GraphicsContext.cpp:
629         (WebCore::GraphicsContext::drawHighlightForText): Deleted.
630         * platform/graphics/GraphicsContext.h:
631         * platform/graphics/LayoutPoint.h:
632         (WebCore::roundedForPainting):
633         * platform/graphics/LayoutRect.h:
634         (WebCore::directionalPixelSnappedForPainting): Snap top right corner for rtl direction.
635         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
636         (WebCore::Font::adjustSelectionRectForComplexText):
637         (WebCore::Font::selectionRectForComplexText): Deleted.
638         * platform/graphics/mac/FontComplexTextMac.cpp:
639         (WebCore::Font::adjustSelectionRectForComplexText): removed directional rounding.
640         (WebCore::Font::selectionRectForComplexText): Deleted.
641         * platform/graphics/win/FontWin.cpp:
642         (WebCore::Font::adjustSelectionRectForComplexText):
643         (WebCore::Font::selectionRectForComplexText): Deleted.
644         * rendering/EllipsisBox.cpp:
645         (WebCore::EllipsisBox::selectionRect):
646         (WebCore::EllipsisBox::paintSelection):
647         * rendering/InlineTextBox.cpp:
648         (WebCore::integralEnclosingRectForSelection): helper to address enclosing empty rect problem.
649         (WebCore::InlineTextBox::localSelectionRect):
650         (WebCore::InlineTextBox::paintSelection):
651         (WebCore::InlineTextBox::paintCompositionBackground):
652         (WebCore::InlineTextBox::paintDocumentMarker):
653         (WebCore::InlineTextBox::paintTextMatchMarker):
654         (WebCore::InlineTextBox::computeRectForReplacementMarker):
655         (WebCore::InlineTextBox::positionForOffset):
656         * rendering/svg/SVGInlineTextBox.cpp:
657         (WebCore::SVGInlineTextBox::selectionRectForTextFragment):
658
659 2014-05-09  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
660
661         ASSERTION FAILED: !m_code || m_code == defaultExceptionCode
662         in WebCore::constructQualifiedName
663         https://bugs.webkit.org/show_bug.cgi?id=132343
664
665         'Remove bad assertion in SVGSMILElement's constructQualifiedName() by passing
666         IGNORE_EXCEPTION instead ASSERT_NO_EXCEPTION to Document::parseQualifiedName().
667         The constructQualifiedName() function handles parseQualifiedName() failures
668         propertly by returning early so there is no reason to assert on parsing
669         failures.'
670
671         Blink merge: http://src.chromium.org/viewvc/blink?view=revision&revision=173564
672         Based on the patch made by Christophe Dumez <ch.dumez@samsung.com>.
673
674         Reviewed by Dirk Schulze.
675
676         Test: svg/custom/bad-attributeName-crash.html
677
678         * svg/animation/SVGSMILElement.cpp:
679         (WebCore::constructQualifiedName):
680
681 2014-05-08  Brent Fulgham  <bfulgham@apple.com>
682
683         Multiple (stacked) cues when shuttling through video while playing closed captions
684         https://bugs.webkit.org/show_bug.cgi?id=132715
685         <rdar://problem/16795782>
686
687         Reviewed by Eric Carlson.
688
689         Tests: media/track/track-in-band-cues-added-once.html
690
691         * html/track/TextTrack.cpp:
692         (WebCore::TextTrack::hasCue): Revise to use a relaxed time equality.
693         * html/track/TextTrackCue.cpp:
694         (WebCore::TextTrackCue::isEqual): Ditto.
695         (WebCore::TextTrackCue::hasEquivalentStartTime): Added.
696         * html/track/TextTrackCue.h:
697         (WebCore::TextTrackCue::startTimeVariance): Added.
698         * html/track/TextTrackCueGeneric.h:
699         * html/track/TextTrackCueGeneric.cpp:
700         (WebCore::TextTrackCueGeneric::isEqual): Do not call the VTTCue::isEqual method from
701         this class, since cueType() will not equal VTTCue, and the equality will fail.
702
703 2014-05-08  Alexey Proskuryakov  <ap@apple.com>
704
705         Automatically zip document bundles used via File API
706         https://bugs.webkit.org/show_bug.cgi?id=132713
707         <rdar://problem/13397892>
708
709         Reviewed by Anders Carlsson.
710
711         Tests: fast/files/filereader-zip-bundle.html
712                http/tests/local/fileapi/upload-zip-bundle-as-blob.html
713
714         * FileMac.mm: Added.
715         (WebCore::File::shouldReplaceFile):
716         (WebCore::File::computeNameAndContentTypeForReplacedFile):
717         Added code that decides what to do with a bundle. We need this to happen in
718         WebProcess, because HTML5 dropzone depends on this, it needs to know file type
719         even before a File object can be created.
720
721         * WebCore.exp.in: Export new functions.
722
723         * WebCore.xcodeproj/project.pbxproj: Added new files.
724
725         * dom/DataTransfer.cpp: (WebCore::DataTransfer::hasFileOfType): Updated for File
726         interface change.
727
728         * fileapi/File.h:
729         * fileapi/File.cpp:
730         (WebCore::File::File):
731         (WebCore::File::computeNameAndContentType):
732         (WebCore::File::contentTypeForFile):
733         (WebCore::File::contentTypeFromFilePathOrName): Deleted.
734         Make it possible for a subclass to affect file name and content type calculation.
735
736         * platform/network/BlobDataFileReference.cpp:
737         (WebCore::BlobDataFileReference::BlobDataFileReference):
738         (WebCore::BlobDataFileReference::~BlobDataFileReference):
739         (WebCore::BlobDataFileReference::path):
740         (WebCore::BlobDataFileReference::size):
741         (WebCore::BlobDataFileReference::expectedModificationTime):
742         (WebCore::BlobDataFileReference::startTrackingModifications):
743         * platform/network/BlobDataFileReference.h:
744         (WebCore::BlobDataFileReference::path): Deleted.
745         (WebCore::BlobDataFileReference::BlobDataFileReference): Deleted.
746         Use original or replaced file, as appropriate. 
747
748         * platform/network/mac/BlobDataFileReferenceMac.mm: Added.
749         (WebCore::BlobDataFileReference::generateReplacementFile): Implements generateReplacementFile().
750
751         * platform/network/FormData.h: Added a FIXME.
752
753         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::send): Always use Blob code path
754         for blobs, don't unwrap them into a file path.
755
756 2014-05-08  Simon Fraser  <simon.fraser@apple.com>
757
758         Occasional crash under AsyncScrollingCoordinator::frameViewRootLayerDidChange() on history navigation
759         https://bugs.webkit.org/show_bug.cgi?id=132723
760
761         Reviewed by Sam Weinig.
762         
763         Crash reports suggest that when we call AsyncScrollingCoordinator::frameViewRootLayerDidChange()
764         from HistoryController::restoreScrollPositionAndViewState(), the FrameView may not have a 
765         scrolling node ID, which suggests that either the FrameView doesn't have a RenderView,
766         or compositing hasn't happened yet.
767         
768         So if we enter AsyncScrollingCoordinator::frameViewRootLayerDidChange()
769         and the FrameView has no scrollLayerID, just return. We'll fix things up
770         when compositing kicks in later.
771
772         * page/scrolling/AsyncScrollingCoordinator.cpp:
773         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
774
775 2014-05-08  Simon Fraser  <simon.fraser@apple.com>
776
777         [iOS WK2] Bottom-relative position:fixed elements are misplaced on page load
778         https://bugs.webkit.org/show_bug.cgi?id=132719
779         <rdar://problem/16860837>
780
781         Reviewed by Benjamin Poulain.
782
783         Add a couple of functions, and sort.
784
785         * WebCore.exp.in:
786
787 2014-05-08  Jer Noble  <jer.noble@apple.com>
788
789         [Mac, iOS] Add source application accounting to AVURLAsset.
790         https://bugs.webkit.org/show_bug.cgi?id=132637
791
792         Reviewed by Eric Carlson.
793
794         Properly account for the application responisble for data loading by passing the source
795         application identifier through to AVFoundation through AVURLAsset options.
796
797         * html/HTMLMediaElement.cpp:
798         (WebCore::HTMLMediaElement::parseAttribute):
799         * html/HTMLMediaElement.h:
800         * platform/graphics/MediaPlayer.cpp:
801         (WebCore::MediaPlayer::sourceApplicationIdentifier):
802         * platform/graphics/MediaPlayer.h:
803         (WebCore::MediaPlayerClient::mediaPlayerSourceApplicationIdentifier):
804         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
805         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
806         * platform/network/NetworkingContext.h:
807
808 2014-05-08  Jer Noble  <jer.noble@apple.com>
809
810         [MSE][Mac] Move AVStreamDataParser off-main-thread.
811         https://bugs.webkit.org/show_bug.cgi?id=132698
812
813         Reviewed by Eric Carlson.
814
815         -[AVStreamDataParser appendStreamData:] can casue the main thread to hang when a
816         large amount of media data is appended at once. Move the actual parsing of data
817         to a background (synchronous) dispatch queue, and split SourceBuffer::appendBufferTimerFired
818         into two functions, the latter of which will be called after the background queue
819         completes.
820
821         * Modules/mediasource/SourceBuffer.cpp:
822         (WebCore::SourceBuffer::appendBufferTimerFired): Split into sourceBufferPrivateAppendComplete.
823         (WebCore::SourceBuffer::sourceBufferPrivateAppendComplete): Split from appendBufferTimerFired.
824         * Modules/mediasource/SourceBuffer.h:
825         * platform/graphics/SourceBufferPrivate.h:
826         * platform/graphics/SourceBufferPrivateClient.h:
827         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
828         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
829         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]): Re-dispatch to the
830                 web thread.
831         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]): Ditto.
832         (-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]): Ditto.
833         (-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]): Ditto.
834         (-[WebAVStreamDataParserListener streamDataParser:didReachEndOfTrackWithTrackID:mediaType:]): Ditto.
835         (-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]): Ditto.
836         (WebCore::globalDataParserQueue): Added.
837         (WebCore::SourceBufferPrivateAVFObjC::append): Dispatch to the globalDataParserQueue.
838         (WebCore::SourceBufferPrivateAVFObjC::appendCompleted): Added.
839         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
840         (WebCore::MockSourceBufferPrivate::append): Adopt sourceBufferPrivateAppendComplete.
841         * platform/mock/mediasource/MockSourceBufferPrivate.h:
842
843         Update SourceBufferPrivateGStreamer to match the new append return value:
844         * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp:
845         (WebCore::SourceBufferPrivateGStreamer::append):
846         * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h:
847
848 2014-05-08  Commit Queue  <commit-queue@webkit.org>
849
850         Unreviewed, rolling out r168498.
851         https://bugs.webkit.org/show_bug.cgi?id=132714
852
853         broke Mavericks WK2 (Requested by litherum on #webkit).
854
855         Reverted changeset:
856
857         "http/tests/security/xss-DENIED-xsl-document-redirect.xml
858         fails with NetworkProcess"
859         https://bugs.webkit.org/show_bug.cgi?id=132523
860         http://trac.webkit.org/changeset/168498
861
862 2014-05-08  Myles C. Maxfield  <mmaxfield@apple.com>
863
864         http/tests/security/xss-DENIED-xsl-document-redirect.xml fails with NetworkProcess
865         https://bugs.webkit.org/show_bug.cgi?id=132523
866
867         Reviewed by Alexey Proskuryakov.
868
869         We should not manufacture a response in the event of an error during a
870         synchronous XHR. In addition, this test removes one place that is
871         sensitive to such a manufactured response.
872
873         Updates test expectations.
874
875         * platform/network/cf/ResourceHandleCFNet.cpp:
876         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Do not
877         manufacture a response
878         * platform/network/mac/ResourceHandleMac.mm:
879         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Do not
880         manufacture a response
881         * xml/XSLTProcessorLibxslt.cpp:
882         (WebCore::docLoaderFunc): Only use the response's URL if no error
883         occurred.
884
885 2014-05-08  Andreas Kling  <akling@apple.com>
886
887         [iOS] WebKit should listen to critical memory warnings.
888         <https://webkit.org/b/132704>
889         <rdar://problem/16857112>
890
891         Listen for DISPATCH_MEMORYSTATUS_PRESSURE_CRITICAL in addition to
892         DISPATCH_MEMORYSTATUS_PRESSURE_WARN, since we may only get the critical
893         notification on some systems.
894
895         Reviewed by Gavin Barraclough.
896
897         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
898         (WebCore::MemoryPressureHandler::install):
899
900 2014-05-08  Joseph Pecoraro  <pecoraro@apple.com>
901
902         Web Inspector: InspectorDOMAgent::getAccessibilityPropertiesForNode should gracefully handle bad node
903         https://bugs.webkit.org/show_bug.cgi?id=132697
904
905         Reviewed by Timothy Hatcher.
906
907         * inspector/InspectorDOMAgent.cpp:
908         (WebCore::InspectorDOMAgent::getAccessibilityPropertiesForNode):
909         Gracefully handle no node.
910
911 2014-05-08  Tim Horton  <timothy_horton@apple.com>
912
913         Fix the iOS build after r168476.
914
915         * platform/graphics/mac/GraphicsContextMac.mm:
916         (WebCore::GraphicsContext::drawFocusRing):
917
918 2014-05-08  Bem Jones-Bey  <bjonesbe@adobe.com>
919
920         [CSS Shapes] Shapes do not resolve dimensions specified in viewport units
921         https://bugs.webkit.org/show_bug.cgi?id=124052
922
923         Reviewed by Dirk Schulze.
924
925         Viewport unit resolution doesn't work unless the RenderView is passed
926         down into the floatValueForLength methods. All this does is plumb down
927         a RenderView in all of these cases.
928
929         Tests: css3/masking/clip-path-polygon-viewport-units.html
930                fast/shapes/shape-outside-floats/shape-outside-floats-viewport-units.html
931
932         * css/BasicShapeFunctions.cpp:
933         (WebCore::floatValueForCenterCoordinate):
934         * css/BasicShapeFunctions.h:
935         * css/LengthFunctions.cpp:
936         (WebCore::floatSizeForLengthSize):
937         * css/LengthFunctions.h:
938         * rendering/ClipPathOperation.h:
939         (WebCore::ShapeClipPathOperation::pathForReferenceRect):
940         (WebCore::BoxClipPathOperation::pathForReferenceRect):
941         * rendering/RenderLayer.cpp:
942         (WebCore::RenderLayer::setupClipPath):
943         * rendering/shapes/Shape.cpp:
944         (WebCore::Shape::createShape):
945         * rendering/shapes/Shape.h:
946         * rendering/shapes/ShapeOutsideInfo.cpp:
947         (WebCore::ShapeOutsideInfo::computedShape):
948         * rendering/style/BasicShapes.cpp:
949         (WebCore::BasicShapeCircle::floatValueForRadiusInBox):
950         (WebCore::BasicShapeCircle::path):
951         (WebCore::BasicShapeEllipse::floatValueForRadiusInBox):
952         (WebCore::BasicShapeEllipse::path):
953         (WebCore::BasicShapePolygon::path):
954         (WebCore::floatSizeForLengthSize):
955         (WebCore::BasicShapeInset::path):
956         * rendering/style/BasicShapes.h:
957         * rendering/svg/SVGRenderingContext.cpp:
958         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
959
960 2014-05-08  Brent Fulgham  <bfulgham@apple.com>
961
962         Cue display events may not be registered during page load.
963         https://bugs.webkit.org/show_bug.cgi?id=132696
964         <rdar://problem/16652874>
965
966         Reviewed by Eric Carlson.
967
968         * Modules/mediacontrols/mediaControlsApple.js:
969         (Controller.prototype.handleTextTrackAdd): Don't register
970         for 'cuechange' events anymore.
971         (Controller.prototype.handleTextTrackRemove): Ditto.
972         (Controller.prototype.updateCaptionContainer): Reduce CSS
973         churn by not adding/removing 'Hidden' class every time a
974         new cue is processed. Only do this when transitioning
975         track display state.
976         (Controller.prototype.handleTextTrackCueChange): Deleted.
977         * html/HTMLMediaElement.cpp:
978         (WebCore::HTMLMediaElement::updateTextTrackDisplay): Call
979         'updateTextTrackContainer' directory when processing cues,
980         rather than trampolining through the JS layer.
981
982 2014-05-08  Alexey Proskuryakov  <ap@apple.com>
983
984         Make BlobDataFileReference manage its sandbox extension
985         https://bugs.webkit.org/show_bug.cgi?id=132689
986
987         Reviewed by Anders Carlsson.
988
989         * WebCore.exp.in: Export symbols that are now needed in WebKit2 to subclass BlobDataFileReference.
990
991         * fileapi/ThreadableBlobRegistry.cpp: (WebCore::ThreadableBlobRegistry::registerFileBlobURL):
992         * platform/network/BlobData.cpp: (WebCore::BlobData::appendFile):
993         * platform/network/BlobData.h: (WebCore::BlobDataItem::BlobDataItem):
994         * platform/network/BlobRegistry.h:
995         * platform/network/BlobRegistryImpl.cpp: (WebCore::BlobRegistryImpl::registerFileBlobURL):
996         * platform/network/BlobRegistryImpl.h:
997         BlobRegistry now takes a BlobDataFileReference and not a path, so that WebKit2
998         could pass objects that include sandbox extensions.
999
1000         * platform/network/BlobDataFileReference.h:
1001         * platform/network/BlobDataFileReference.cpp:
1002         (WebCore::BlobDataFileReference::~BlobDataFileReference): Added a virtual destructor.
1003         (WebCore::BlobDataFileReference::size): We now record the size and modification time right away, no need to lazily calculate them.
1004         (WebCore::BlobDataFileReference::expectedModificationTime): Ditto.
1005         (WebCore::BlobDataFileReference::startTrackingModifications): Record time and size
1006         (since it's a single call). However, size calculation will become complicated again soon.
1007         (WebCore::BlobDataFileReference::prepareForFileAccess): A hook for subclasses.
1008         (WebCore::BlobDataFileReference::revokeFileAccess): Ditto.
1009         (WebCore::BlobDataFileReference::computeFileSystemData): Deleted.
1010
1011 2014-05-08  Rik Cabanier  <cabanier@adobe.com>
1012
1013         Add support for drawFocusIfNeeded
1014         https://bugs.webkit.org/show_bug.cgi?id=132584
1015
1016         Reviewed by Dirk Schulze.
1017
1018         The drawFocusIfNeeded API will draw a focus ring if the element that is passed
1019         in is focused and a child element of the canvas.
1020
1021         Test: fast/canvas/draw-focus-if-needed.html
1022
1023         * html/canvas/CanvasRenderingContext2D.cpp:
1024         (WebCore::CanvasRenderingContext2D::drawFocusIfNeeded):
1025         * html/canvas/CanvasRenderingContext2D.h:
1026         * html/canvas/CanvasRenderingContext2D.idl:
1027
1028 2014-05-08  Antti Koivisto  <antti@apple.com>
1029
1030         [iOS WebKit2] Can't activate text fields on Facebook
1031         https://bugs.webkit.org/show_bug.cgi?id=132682
1032
1033         Reviewed by Enrica Casucci.
1034
1035         * page/DOMTimer.cpp:
1036         (WebCore::DOMTimer::fired):
1037         
1038             The isDocument() test here had reversed in the merge breaking content change observer callback.
1039
1040 2014-05-07  Sergio Villar Senin  <svillar@igalia.com>
1041
1042         Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in svg/
1043         https://bugs.webkit.org/show_bug.cgi?id=132647
1044
1045         Reviewed by Darin Adler.
1046
1047         * svg/SVGAElement.cpp:
1048         (WebCore::SVGAElement::isSupportedAttribute):
1049         * svg/SVGAnimateMotionElement.cpp:
1050         (WebCore::SVGAnimateMotionElement::isSupportedAttribute):
1051         * svg/SVGAnimateTransformElement.cpp:
1052         (WebCore::SVGAnimateTransformElement::isSupportedAttribute):
1053         * svg/SVGAnimatedLength.cpp:
1054         (WebCore::sharedSVGLength):
1055         * svg/SVGAnimationElement.cpp:
1056         (WebCore::SVGAnimationElement::isSupportedAttribute):
1057         * svg/SVGCircleElement.cpp:
1058         (WebCore::SVGCircleElement::isSupportedAttribute):
1059         * svg/SVGClipPathElement.cpp:
1060         (WebCore::SVGClipPathElement::isSupportedAttribute):
1061         * svg/SVGComponentTransferFunctionElement.cpp:
1062         (WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute):
1063         * svg/SVGCursorElement.cpp:
1064         (WebCore::SVGCursorElement::isSupportedAttribute):
1065         * svg/SVGElement.cpp:
1066         (WebCore::SVGElement::instancesForElement):
1067         (WebCore::SVGElement::childShouldCreateRenderer):
1068         * svg/SVGEllipseElement.cpp:
1069         (WebCore::SVGEllipseElement::isSupportedAttribute):
1070         * svg/SVGFEBlendElement.cpp:
1071         (WebCore::SVGFEBlendElement::isSupportedAttribute):
1072         * svg/SVGFEColorMatrixElement.cpp:
1073         (WebCore::SVGFEColorMatrixElement::isSupportedAttribute):
1074         * svg/SVGFEComponentTransferElement.cpp:
1075         (WebCore::SVGFEComponentTransferElement::isSupportedAttribute):
1076         * svg/SVGFECompositeElement.cpp:
1077         (WebCore::SVGFECompositeElement::isSupportedAttribute):
1078         * svg/SVGFEConvolveMatrixElement.cpp:
1079         (WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute):
1080         * svg/SVGFEDiffuseLightingElement.cpp:
1081         (WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute):
1082         * svg/SVGFEDisplacementMapElement.cpp:
1083         (WebCore::SVGFEDisplacementMapElement::isSupportedAttribute):
1084         * svg/SVGFEDropShadowElement.cpp:
1085         (WebCore::SVGFEDropShadowElement::isSupportedAttribute):
1086         * svg/SVGFEGaussianBlurElement.cpp:
1087         (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute):
1088         * svg/SVGFEImageElement.cpp:
1089         (WebCore::SVGFEImageElement::isSupportedAttribute):
1090         * svg/SVGFELightElement.cpp:
1091         (WebCore::SVGFELightElement::isSupportedAttribute):
1092         * svg/SVGFEMergeNodeElement.cpp:
1093         (WebCore::SVGFEMergeNodeElement::isSupportedAttribute):
1094         * svg/SVGFEMorphologyElement.cpp:
1095         (WebCore::SVGFEMorphologyElement::isSupportedAttribute):
1096         * svg/SVGFEOffsetElement.cpp:
1097         (WebCore::SVGFEOffsetElement::isSupportedAttribute):
1098         * svg/SVGFESpecularLightingElement.cpp:
1099         (WebCore::SVGFESpecularLightingElement::isSupportedAttribute):
1100         * svg/SVGFETileElement.cpp:
1101         (WebCore::SVGFETileElement::isSupportedAttribute):
1102         * svg/SVGFETurbulenceElement.cpp:
1103         (WebCore::SVGFETurbulenceElement::isSupportedAttribute):
1104         * svg/SVGFilterElement.cpp:
1105         (WebCore::SVGFilterElement::isSupportedAttribute):
1106         (WebCore::SVGFilterElement::childShouldCreateRenderer):
1107         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
1108         (WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute):
1109         * svg/SVGForeignObjectElement.cpp:
1110         (WebCore::SVGForeignObjectElement::isSupportedAttribute):
1111         * svg/SVGGElement.cpp:
1112         (WebCore::SVGGElement::isSupportedAttribute):
1113         * svg/SVGGradientElement.cpp:
1114         (WebCore::SVGGradientElement::isSupportedAttribute):
1115         * svg/SVGGraphicsElement.cpp:
1116         (WebCore::SVGGraphicsElement::isSupportedAttribute):
1117         * svg/SVGImageElement.cpp:
1118         (WebCore::SVGImageElement::isSupportedAttribute):
1119         * svg/SVGLength.cpp:
1120         (WebCore::SVGLength::lengthModeForAnimatedLengthAttribute):
1121         * svg/SVGLineElement.cpp:
1122         (WebCore::SVGLineElement::isSupportedAttribute):
1123         * svg/SVGLinearGradientElement.cpp:
1124         (WebCore::SVGLinearGradientElement::isSupportedAttribute):
1125         * svg/SVGMPathElement.cpp:
1126         (WebCore::SVGMPathElement::isSupportedAttribute):
1127         * svg/SVGMarkerElement.cpp:
1128         (WebCore::SVGMarkerElement::isSupportedAttribute):
1129         * svg/SVGMaskElement.cpp:
1130         (WebCore::SVGMaskElement::isSupportedAttribute):
1131         * svg/SVGPathElement.cpp:
1132         (WebCore::SVGPathElement::isSupportedAttribute):
1133         * svg/SVGPatternElement.cpp:
1134         (WebCore::SVGPatternElement::isSupportedAttribute):
1135         * svg/SVGPolyElement.cpp:
1136         (WebCore::SVGPolyElement::isSupportedAttribute):
1137         * svg/SVGRadialGradientElement.cpp:
1138         (WebCore::SVGRadialGradientElement::isSupportedAttribute):
1139         * svg/SVGRectElement.cpp:
1140         (WebCore::SVGRectElement::isSupportedAttribute):
1141         * svg/SVGScriptElement.cpp:
1142         (WebCore::SVGScriptElement::isSupportedAttribute):
1143         * svg/SVGStopElement.cpp:
1144         (WebCore::SVGStopElement::isSupportedAttribute):
1145         * svg/SVGStyleElement.cpp:
1146         (WebCore::SVGStyleElement::isSupportedAttribute):
1147         * svg/SVGSymbolElement.cpp:
1148         (WebCore::SVGSymbolElement::isSupportedAttribute):
1149         * svg/SVGTRefElement.cpp:
1150         (WebCore::SVGTRefElement::isSupportedAttribute):
1151         * svg/SVGTests.cpp:
1152         (WebCore::SVGTests::attributeToPropertyMap):
1153         * svg/SVGTextContentElement.cpp:
1154         (WebCore::SVGTextContentElement::textLengthAnimated):
1155         (WebCore::SVGTextContentElement::isSupportedAttribute):
1156         * svg/SVGTextPathElement.cpp:
1157         (WebCore::SVGTextPathElement::isSupportedAttribute):
1158         * svg/SVGTextPositioningElement.cpp:
1159         (WebCore::SVGTextPositioningElement::isSupportedAttribute):
1160         * svg/SVGUseElement.cpp:
1161         (WebCore::SVGUseElement::isSupportedAttribute):
1162         (WebCore::isDisallowedElement):
1163         * svg/SVGViewElement.cpp:
1164         (WebCore::SVGViewElement::isSupportedAttribute):
1165
1166 2014-05-08  Ion Rosca  <rosca@adobe.com>
1167
1168         [CSS Blending] Replacing Unisolated with NotIsolated in variables and methods names
1169         https://bugs.webkit.org/show_bug.cgi?id=132677
1170
1171         Reviewed by Dirk Schulze.
1172
1173         No new tests required.
1174
1175         * rendering/RenderLayer.cpp:
1176         (WebCore::RenderLayer::RenderLayer):
1177         (WebCore::RenderLayer::updateAncestorChainHasBlendingDescendants):
1178         (WebCore::RenderLayer::dirtyAncestorChainHasBlendingDescendants):
1179         (WebCore::RenderLayer::updateDescendantDependentFlags):
1180         hasUnisolatedBlendingDescendants -> hasNotIsolatedBlendingDescendants
1181         (WebCore::RenderLayer::addChild):
1182         (WebCore::RenderLayer::removeChild):
1183         (WebCore::RenderLayer::updateStackingContextsAfterStyleChange):
1184         * rendering/RenderLayer.h:
1185         m_hasUnisolatedBlendingDescendants -> m_hasNotIsolatedBlendingDescendants
1186         m_hasUnisolatedBlendingDescendantsStatusDirty -> m_hasNotIsolatedBlendingDescendantsStatusDirty
1187         hasUnisolatedBlendingDescendants() -> hasNotIsolatedBlendingDescendants()
1188         hasUnisolatedBlendingDescendantsStatusDirty() -> hasNotIsolatedBlendingDescendantsStatusDirty()
1189         m_hasUnisolatedCompositedBlendingDescendants -> m_hasNotIsolatedCompositedBlendingDescendants
1190         hasUnisolatedCompositedBlendingDescendants() -> hasNotIsolatedCompositedBlendingDescendants()
1191         setHasUnisolatedCompositedBlendingDescendants() -> setHasNotIsolatedCompositedBlendingDescendants
1192         * rendering/RenderLayerCompositor.cpp:
1193         (WebCore::CompositingState::CompositingState):
1194         m_hasUnisolatedCompositedBlendingDescendants -> m_hasNotIsolatedCompositedBlendingDescendants
1195         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1196
1197 2014-05-08  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1198
1199         [GTK] Enable skipped http/tests/media/hls/video-controls-live-stream.html
1200         https://bugs.webkit.org/show_bug.cgi?id=132329
1201
1202         Reviewed by Eric Carlson.
1203
1204         GTK port needed to define what happened with live stream media
1205         controls. Now we disable and dim the timeline and tweak the
1206         timers.
1207
1208         Test: http/tests/media/hls/video-controls-live-stream.html.
1209
1210         * Modules/mediacontrols/mediaControlsGtk.js:
1211         (ControllerGtk.prototype.configureControls): Moved logic from
1212         setControlsType and changed to use an early return.
1213         (ControllerGtk.prototype.reconnectControls): Redefined to just
1214         configure the controls.
1215         (ControllerGtk.prototype.handlePlay): If stream is live we don't
1216         activate the current time just in case.
1217         (ControllerGtk.prototype.updateDuration): Calls the superclass and
1218         sets timeline.max to 0.
1219         (ControllerGtk.prototype.setControlsType): Deleted.
1220         (ControllerGtk.prototype.setIsLive): Configures controls and
1221         disables the timeline if stream is live.
1222         * css/mediaControlsGtk.css:
1223         (audio::-webkit-media-controls-timeline[disabled])
1224         (video::-webkit-media-controls-timeline[disabled]): Dimmed the
1225         timeline by setting opacity to 0.3.
1226
1227 2014-05-08  Ion Rosca  <rosca@adobe.com>
1228
1229         [CSS Blending] Changing isolation CSS property should not trigger repaint in RenderStyle::changeRequiresLayerRepaint
1230         https://bugs.webkit.org/show_bug.cgi?id=131436
1231
1232         Reviewed by Dirk Schulze.
1233
1234         The isolation:isolate property will create a stacking context. This is done in
1235         StyleResolver::adjustRenderStyle where z-index is forced to 0.
1236         If the element is already a stacking context for any other reason,
1237         changing the isolation flag should not have any effect.
1238
1239         Tests: css3/blending/repaint/blend-mode-turn-off-isolation-no-effect.html
1240                css3/blending/repaint/blend-mode-turn-off-isolation.html
1241
1242         * rendering/style/RenderStyle.cpp:
1243         (WebCore::RenderStyle::changeRequiresLayerRepaint):
1244         do not request repaint if isolation has changed.
1245
1246 2014-05-08  Manuel Rego Casasnovas  <rego@igalia.com>
1247
1248         REGRESSION (r167652): SelectionState is not set properly for non leaf objects in pages with regions
1249         https://bugs.webkit.org/show_bug.cgi?id=132493
1250
1251         Reviewed by David Hyatt.
1252
1253         Non selection leaf elements were not included in the selection ranges,
1254         that was causing that their selection state was not set properly and
1255         when one of the element was removed as it was marked as SelectionNone
1256         current selection was not removed.
1257
1258         Due to this fix, the regression detected in bug #131982 arose again.
1259         Reverted changes from r167675 and reopened bug as previous fix was not
1260         right. Updated TestExpectations accordingly.
1261
1262         Test: fast/regions/selection/crash-select-all.html
1263
1264         * rendering/RenderView.cpp:
1265         (WebCore::RenderView::splitSelectionBetweenSubtrees): We need to include
1266         non selection leafs in the range, otherwise we won't be marking
1267         selection state of some elements properly.
1268
1269 2014-05-08  Zoltan Horvath  <zoltan@webkit.org>
1270
1271         [CSS Shapes] Can't select content within the area of the floating box when clip-path is applied
1272         https://bugs.webkit.org/show_bug.cgi?id=131375
1273
1274         Reviewed by Dirk Schulze.
1275
1276         According to http://www.w3.org/TR/css-masking-1/, the clipped part of the element should
1277         not have pointer event dispatching. So add this logic to RenderBlock::nodeAtPoint. This
1278         fixes the bug as it disallows selection on any clipped parts.
1279
1280         I implemented the proper selection for the various CSS box types and added testing
1281         for them. Also, I made and run performance tests for exposing mouse events over the
1282         clipped/non-clipped area, which results can be seen in bugzilla.
1283
1284         Based on the patch made by Rob Buis <rob.buis@samsung.com>
1285         Blink revision: http://src.chromium.org/viewvc/blink?view=revision&revision=172619
1286
1287         Tests: fast/masking/clip-path-selection.html
1288                fast/shapes/shape-outside-floats/shape-outside-clip-path-selection.html
1289
1290         * rendering/RenderBlock.cpp:
1291         (WebCore::RenderBlock::nodeAtPoint):
1292
1293 2014-05-07  Ion Rosca  <rosca@adobe.com>
1294
1295         [CSS Blending] Blending doesn't work if the parent stacking context is not a self painting layer
1296         https://bugs.webkit.org/show_bug.cgi?id=130891
1297
1298         Reviewed by Dean Jackson.
1299
1300         The stacking context layers having unisolated blending descendants should be able
1301         to create transparency layers or to become composited in order to restrict blending 
1302         content to accessing the information outside the current stacking context.
1303         Some layers are not self painting layers and these layers cannot crate transparency
1304         layers and cannot be composited, thus they are not able to isolate blending descendants
1305         when it's required.
1306         
1307         The solution in this patch is to make a layer isSelfPaintingLayer when
1308         it needs to isolate blending descendants (hasUnisolatedBlendingDescendants).
1309
1310         Tests: css3/blending/blend-mode-isolation-accelerated-overflow-hidden.html
1311                css3/blending/blend-mode-isolation-overflow-hidden.html
1312                css3/blending/blend-mode-isolation-turn-off-self-painting-layer.html
1313                css3/blending/blend-mode-isolation-turn-off-self-painting-layer1.html
1314                css3/blending/blend-mode-isolation-turn-off-self-painting-layer2.html
1315                css3/blending/blend-mode-isolation-turn-on-self-painting-layer.html
1316
1317         * rendering/RenderLayer.cpp:
1318         (WebCore::RenderLayer::updateAncestorChainHasBlendingDescendants):
1319         When hasUnisolatedBlendingDescendants is set we make sure that isSelfPaintingLayer flag is set too.
1320         (WebCore::RenderLayer::updateDescendantDependentFlags):
1321         The flags might be read or changed while walking the descendants, so we don't want to reset
1322         them before traversing the tree.
1323         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
1324         Adding isolatesBlending() condition for a layer to be self painting.
1325         * rendering/RenderLayer.h:
1326         Removing ASSERT from hasUnisolatedBlendingDescendants(). It crashes in minibrowser
1327         and in layout tests when painting contents. Similar bugs on other flags: #71044, #71277.
1328         * rendering/RenderLayerModelObject.cpp:
1329         (WebCore::RenderLayerModelObject::styleDidChange):
1330         Telling ancestors that blend mode property has been removed from CSS when the layer for
1331         this element is going to be removed; styleChanged will not be called anymore.
1332
1333 2014-05-06  Myles C. Maxfield  <mmaxfield@apple.com>
1334
1335         Dragging text from one paragraph to another does not render as expected
1336         https://bugs.webkit.org/show_bug.cgi?id=132633
1337
1338         Reviewed by Darin Adler and Ryosuke Niwa.
1339
1340         When we are dragging and dropping into a content editable field, we detect
1341         if we are trying to put a <p> into an existing <p>, and if so, split the
1342         outer <p> and insert the new <p> as its sibling. However, the outer <p>
1343         might not be editable, so we don't want to do any splitting and inserting
1344         at that location.
1345
1346         Test: editing/pasteboard/drag-drop-paragraph-crasher.html
1347
1348         * editing/ReplaceSelectionCommand.cpp:
1349         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
1350
1351 2014-05-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1352
1353         [CoordinatedGraphics][WK2] Scale factor and scroll position is not being restored properly in a back/forward load
1354         https://bugs.webkit.org/show_bug.cgi?id=126022
1355
1356         Reviewed by Benjamin Poulain.
1357
1358         Original author : Thiago de Barros Lacerda, and finished by Gyuyoung Kim.
1359
1360         When user is navigating back/forward to a page that has been scrolled and/or scaled, that page must be shown
1361         with its last scroll position and scale factor. However, when fixed layout was enabled with CoordinatedGraphics
1362         and TILED_BACKING_STORE, Page::setPageScaleFactor() doesn't send previous scroll position since r165652 and r165913.
1363
1364         This patch allows the Page::setPageScaleFactor() send stored position to WK2 implementation by calling delegatedScrollRequested()
1365         directly when delegatesScrolling() is on.
1366
1367         * page/Page.cpp:
1368         (WebCore::Page::setPageScaleFactor): TILED_BACKING_STORE and delegateScrolling are enabled, we pass new scroll position to WK2 though
1369         delegateScrolling is disabled.
1370         * platform/ScrollView.cpp: delegatedScrollRequested() call is moved from ScrollView::setScrollPosition() to Page::setPageScaleFactor().
1371         (WebCore::ScrollView::setScrollPosition): 
1372
1373 2014-05-07  Dean Jackson  <dino@apple.com>
1374
1375         Using a fill pattern much larger than actual canvas reliably segfaults browser
1376         https://bugs.webkit.org/show_bug.cgi?id=132635
1377
1378         Reviewed by Simon Fraser.
1379
1380         Make sure that createPattern checks that the canvas it is about to use
1381         as a source is valid.
1382
1383         Test: fast/canvas/pattern-too-large-to-create.html
1384
1385         * html/canvas/CanvasRenderingContext2D.cpp:
1386         (WebCore::CanvasRenderingContext2D::createPattern): Check that the source canvas has
1387         an ok ImageBuffer.
1388
1389 2014-05-07  Pratik Solanki  <psolanki@apple.com>
1390
1391         Use system defaults for hardware jpeg decoding
1392         https://bugs.webkit.org/show_bug.cgi?id=132661
1393         <rdar://problem/11348201>
1394
1395         Reviewed by Tim Horton.
1396
1397         Remove code that explicitly disabled hardware image decoding. Let the system decide what to do.
1398
1399         * WebCore.exp.in:
1400         * platform/graphics/ImageSource.h:
1401         (WebCore::ImageSource::acceleratedImageDecodingEnabled): Deleted.
1402         (WebCore::ImageSource::setAcceleratedImageDecodingEnabled): Deleted.
1403         * platform/graphics/cg/ImageSourceCG.cpp:
1404         (WebCore::ImageSource::imageSourceOptions):
1405
1406 2014-05-07  Radu Stavila  <stavila@adobe.com>
1407
1408         Use after free in WebCore::RenderObject::nextSibling / WebCore::RenderBoxModelObject::moveChildrenTo
1409         https://bugs.webkit.org/show_bug.cgi?id=132625
1410
1411         Reviewed by David Hyatt.
1412
1413         Fixed problem with dynamically inserting first letter elements.
1414
1415         Test: fast/multicol/newmulticol/first-letter-create.html
1416
1417         * rendering/RenderBlock.cpp:
1418         (WebCore::RenderBlock::getFirstLetter):
1419         (WebCore::RenderBlock::updateFirstLetter):
1420         * rendering/RenderBlock.h:
1421         * rendering/RenderBoxModelObject.cpp:
1422         (WebCore::RenderBoxModelObject::moveChildrenTo):
1423
1424 2014-05-07  Enrica Casucci  <enrica@apple.com>
1425
1426         WK2: Programatic scroll requests during scroll or zoom animation to reveal focused element are ignored.
1427         https://bugs.webkit.org/show_bug.cgi?id=132657
1428         <rdar://problem/16468462>
1429
1430         Reviewed by Benjamin Poulain.
1431
1432         With the scrolling model we use on iOS, a programatic scroll
1433         request can be received while we are still animating to reveal
1434         the focused input element. The WebProcess is unaware that the
1435         scroll position is being changed in the UIProcess, and does not
1436         honor the scroll request from JavaScript.
1437         This is patch changes the behavior for clients using scroll delegates
1438         to always send the scroll request to the UIProcess without checking
1439         the current scroll position.
1440
1441         * page/FrameView.h:
1442         * platform/ScrollView.cpp:
1443         (WebCore::ScrollView::setScrollPosition):
1444         * platform/ScrollView.h:
1445         (WebCore::ScrollView::inProgrammaticScroll):
1446
1447 2014-05-07  Brent Fulgham  <bfulgham@apple.com>
1448
1449         [Mac, iOS] REGRESSION: WK2 YouTube support
1450         https://bugs.webkit.org/show_bug.cgi?id=132568
1451         <rdar://problem/11464344>
1452
1453         Reviewed by Darin Adler.
1454
1455         Move the custom YouTube loader code out of the WebFrameLoaderClient into a
1456         PluginReplacement-based class.
1457
1458         * Modules/plugins/PluginReplacement.h:
1459         (WebCore::PluginReplacement::supportsURL): New predicate so we can restrict
1460         use of a plugin to a particular category of URLs.
1461         * Modules/plugins/QuickTimePluginReplacement.mm:
1462         (WebCore::QuickTimePluginReplacement): Updated for new registrar signature.
1463         * Modules/plugins/YouTubePluginReplacement.h: Added.
1464         (WebCore::YouTubePluginReplacement::parentElement):
1465         * Modules/plugins/YouTubePluginReplacement.cpp: Added.
1466         (WebCore::YouTubePluginReplacement::registerPluginReplacement):
1467         (WebCore::YouTubePluginReplacement::create):
1468         (WebCore::YouTubePluginReplacement::supportsMimeType):
1469         (WebCore::YouTubePluginReplacement::supportsFileExtension):
1470         (WebCore::kit):
1471         (WebCore::YouTubePluginReplacement::YouTubePluginReplacement):
1472         (WebCore::YouTubePluginReplacement::createElementRenderer):
1473         (WebCore::objectForKey):
1474         (WebCore::YouTubePluginReplacement::installReplacement):
1475         (WebCore::createYouTubeURL):
1476         (WebCore::processAndCreateYouTubeURL):
1477         (WebCore::YouTubePluginReplacement::youTubeURL):
1478         * WebCore.exp.in: Add new export from WebCore.
1479         * WebCore.xcodeproj/project.pbxproj:
1480         * html/HTMLPlugInElement.cpp:
1481         (WebCore::pluginReplacementForType): Update to also check that the URL is supported
1482         by the plugin.
1483         (WebCore::registeredPluginReplacements): Add new YouTubePluginReplacement to registry.
1484         * html/HTMLPlugInImageElement.cpp:
1485         (WebCore::HTMLPlugInImageElement::createElementRenderer): Remove custom YouTube code
1486         now that this logic is handled in the plugin replacement class.
1487         (WebCore::HTMLPlugInImageElement::createShadowIFrameSubtree): Deleted.
1488         * html/HTMLPlugInImageElement.h:
1489         * html/shadow/YouTubeEmbedShadowElement.cpp:
1490         (WebCore::YouTubeEmbedShadowElement::YouTubeEmbedShadowElement):
1491         (WebCore::YouTubeEmbedShadowElement::shadowPseudoId): Use correct pseudoID for the
1492         plugin replacement architecture.
1493         * html/shadow/YouTubeEmbedShadowElement.h:
1494         * platform/mac/WebCoreNSURLExtras.h:
1495         * platform/mac/WebCoreNSURLExtras.mm:
1496         (WebCore::unescapedQueryValue): Moved from WebKit/Misc/WebNSURLExtras.
1497         (WebCore::queryKeysAndValues): Ditto.
1498
1499 2014-05-07  Simon Fraser  <simon.fraser@apple.com>
1500
1501         [iOS] Acclerated overflow-scrolling broken in WK1
1502         https://bugs.webkit.org/show_bug.cgi?id=132665
1503         <rdar://problem/16842909>
1504
1505         Reviewed by Tim Horton.
1506
1507         r168301 added a CALayer delegate to disable implicit animations,
1508         but for some layers we wrap them in UIViews (which are themselves
1509         layer delegates), so bad things happened.
1510         
1511         Fix by falling back to setting the null actions dictionary for
1512         layers with custom scrolling behavior.
1513
1514         * platform/graphics/GraphicsLayer.h:
1515         * platform/graphics/ca/mac/PlatformCALayerMac.h:
1516         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1517         (PlatformCALayerMac::updateCustomBehavior):
1518         * rendering/RenderLayerBacking.cpp:
1519         (WebCore::RenderLayerBacking::updateScrollingLayers):
1520
1521 2014-05-07  Jeremy Jones  <jeremyj@apple.com>
1522
1523         HTMLMediaElement should exitFullscreen when view is removed from the window.
1524         https://bugs.webkit.org/show_bug.cgi?id=132506
1525
1526         Reviewed by Tim Horton.
1527
1528         * platform/ios/WebVideoFullscreenControllerAVKit.h:
1529         Add -requestExitFullscreen.
1530
1531         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1532         (-[WebVideoFullscreenController requestExitFullscreen]):
1533         Forward request onto WebVideoFullscreenModelMediaElement.
1534
1535         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
1536         (WebVideoFullscreenModelMediaElement::requestExitFullscreen):
1537         Add some protection here since this may be called when not in fullscreen.
1538
1539 2014-05-07  Dean Jackson  <dino@apple.com>
1540
1541         Clean up the difference between painting focus rings and adding PDF annotations
1542         https://bugs.webkit.org/show_bug.cgi?id=132638
1543
1544         Follow-up comments from Darin Adler.
1545
1546         * rendering/RenderInline.cpp:
1547         (WebCore::RenderInline::paintOutline): Move "else if" to a separate "if" for clarity.
1548         * rendering/RenderObject.cpp:
1549         (WebCore::RenderObject::paintFocusRing): Don't guard against outlineIsAuto(). ASSERT instead.
1550         (WebCore::RenderObject::addPDFURLRect): Give "rect" variable a better name.
1551         (WebCore::RenderObject::paintOutline): Move "else if" to a separate "if" for clarity.
1552
1553 2014-05-07  Alexey Proskuryakov  <ap@apple.com>
1554
1555         Make blob size computation lazy
1556         https://bugs.webkit.org/show_bug.cgi?id=132653
1557
1558         Reviewed by Anders Carlsson.
1559
1560         * fileapi/Blob.cpp:
1561         (WebCore::Blob::Blob):
1562         (WebCore::Blob::size):
1563         * fileapi/Blob.h:
1564         (WebCore::Blob::size): Deleted.
1565         * fileapi/File.cpp:
1566         (WebCore::File::size): Deleted.
1567         * fileapi/File.h:
1568         * fileapi/ThreadableBlobRegistry.cpp:
1569         (WebCore::ThreadableBlobRegistry::registerFileBlobURL):
1570         (WebCore::ThreadableBlobRegistry::registerBlobURL):
1571         (WebCore::ThreadableBlobRegistry::registerBlobURLForSlice):
1572         (WebCore::ThreadableBlobRegistry::blobSize):
1573         (WebCore::ThreadableBlobRegistry::unregisterBlobURL):
1574         (WebCore::unregisterBlobURLTask): Deleted.
1575         * fileapi/ThreadableBlobRegistry.h:
1576         * platform/network/BlobData.cpp:
1577         (WebCore::BlobData::appendData):
1578         * platform/network/BlobRegistry.h:
1579         * platform/network/BlobRegistryImpl.cpp:
1580         (WebCore::BlobRegistryImpl::registerBlobURL):
1581         (WebCore::BlobRegistryImpl::registerBlobURLForSlice):
1582         * platform/network/BlobRegistryImpl.h:
1583
1584 2014-05-06  Simon Fraser  <simon.fraser@apple.com>
1585
1586         Add scrolling tree logging to RemoteLayerTree output
1587         https://bugs.webkit.org/show_bug.cgi?id=132640
1588
1589         Reviewed by Beth Dakin.
1590
1591         Support scrolling tree logging in the RemoteLayerTree log channel
1592         output.
1593         
1594         ScrollingStateTree::commit() unconditionally set treeStateClone->m_hasChangedProperties
1595         to true, but we should set it based on original scrolling state tree's 
1596         m_hasChangedProperties.
1597         
1598         We have to encode all of the scrolling state nodes anyway (they only encode
1599         changed properties), but we can use this for future optimizations, and to
1600         avoid spurious logging.
1601         
1602         * WebCore.exp.in: Export a couple of things we need.
1603         * page/scrolling/ScrollingStateTree.cpp:
1604         (WebCore::ScrollingStateTree::commit):
1605
1606 2014-05-07  Chris Fleizach  <cfleizach@apple.com>
1607
1608         AX: aria-expanded changes are not communicated to clients
1609         https://bugs.webkit.org/show_bug.cgi?id=132642
1610
1611         Reviewed by Mario Sanchez Prada.
1612
1613         When aria-expanded changes on non list/tree items, send out a generic
1614         AXExpandedChange notification.
1615
1616         Test: platform/mac/accessibility/expanded-notification.html
1617
1618         * accessibility/AXObjectCache.h:
1619         * accessibility/AccessibilityRenderObject.cpp:
1620         (WebCore::AccessibilityRenderObject::handleAriaExpandedChanged):
1621         * accessibility/mac/AXObjectCacheMac.mm:
1622         (WebCore::AXObjectCache::postPlatformNotification):
1623
1624 2014-05-07  Alexey Proskuryakov  <ap@apple.com>
1625
1626         Release build fix.
1627
1628         * platform/MIMETypeRegistry.cpp: (WebCore::initializeSupportedImageMIMETypes):
1629         Removed unused globals.
1630
1631 2014-05-07  Alexey Proskuryakov  <ap@apple.com>
1632
1633         Eliminate "well known MIME type" support
1634         https://bugs.webkit.org/show_bug.cgi?id=132654
1635
1636         Reviewed by Anders Carlsson.
1637
1638         Vestiges of FileSystem API.
1639
1640         * dom/DataTransfer.cpp:
1641         (WebCore::DataTransfer::files):
1642         (WebCore::DataTransfer::hasFileOfType):
1643         * fileapi/File.cpp:
1644         (WebCore::File::File):
1645         (WebCore::File::contentTypeFromFilePathOrName):
1646         * fileapi/File.h:
1647         * html/FileInputType.cpp:
1648         (WebCore::FileInputType::createFileList):
1649         * platform/MIMETypeRegistry.cpp:
1650         (WebCore::initializeSupportedImageMIMETypes):
1651         (WebCore::findMimeType): Deleted.
1652         (WebCore::MIMETypeRegistry::getWellKnownMIMETypeForExtension): Deleted.
1653         * platform/MIMETypeRegistry.h:
1654
1655 2014-05-07  Christophe Dumez  <ch.dumez@samsung.com>
1656
1657         [HTML] Default argument to HTMLTableElement.insertRow() should be -1
1658         https://bugs.webkit.org/show_bug.cgi?id=132651
1659
1660         Reviewed by Alexey Proskuryakov.
1661
1662         HTMLTableElement.insertRow()'s argument default value should be -1, not 0,
1663         as per the specification:
1664         http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.html#htmltableelement
1665
1666         The new behavior matches the one of Firefox 29 and IE11, and soon Blink:
1667         https://codereview.chromium.org/270213007/
1668
1669         Test: fast/dom/HTMLTableElement/insertRow-default-argument.html
1670
1671         * html/HTMLTableElement.h:
1672         * html/HTMLTableElement.idl:
1673
1674 2014-05-07  Chris Fleizach  <cfleizach@apple.com>
1675
1676         AX: AXSelectTextWithCriteria should support capitalize/lowercase/uppercase
1677         https://bugs.webkit.org/show_bug.cgi?id=132622
1678
1679         Reviewed by Mario Sanchez Prada.
1680
1681         The select text with criteria mechanism used through accessibility needs to support
1682         a few more parameters to be complete (including capitalize, lowercase and uppercase).
1683
1684         Updated: accessibility/select-text.html
1685
1686         * accessibility/AccessibilityObject.cpp:
1687         (WebCore::AccessibilityObject::selectText):
1688         * accessibility/AccessibilityObject.h:
1689         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1690         (accessibilitySelectTextCriteriaForCriteriaParameterizedAttribute):
1691         * rendering/RenderText.cpp:
1692         (WebCore::makeCapitalized):
1693         * rendering/RenderText.h:
1694
1695 2014-05-07  peavo@outlook.com  <peavo@outlook.com>
1696
1697         DocumentLoader::dataReceived assertion failed
1698         https://bugs.webkit.org/show_bug.cgi?id=132017
1699
1700         Reviewed by Brent Fulgham.
1701
1702         We need to call didReceiveResponse client method before the didReceiveData client method, otherwise we get a lot of asserts.
1703         This patch also fixes frequent crashes in downloadTimerCallback method on page loading.
1704
1705         * platform/network/curl/ResourceHandleManager.cpp:
1706         (WebCore::calculateWebTimingInformations): Initialize local variables.
1707         (WebCore::headerCallback): Call didReceiveResponse client method here instead of in downloadTimerCallback.
1708         (WebCore::ResourceHandleManager::downloadTimerCallback): Remove call to didReceiveResponse method.
1709         (WebCore::ResourceHandleManager::dispatchSynchronousJob): Removed empty line.
1710
1711 2014-05-06  Antti Koivisto  <antti@apple.com>
1712
1713         REGRESSION: Animated GIF inside compositing layer never resumes animation when scrolled back into view
1714         https://bugs.webkit.org/show_bug.cgi?id=132608
1715
1716         Reviewed by Simon Fraser.
1717
1718         Test: fast/repaint/animation-after-layer-scroll.html
1719
1720         * rendering/RenderLayer.cpp:
1721         (WebCore::RenderLayer::scrollTo):
1722         
1723             Check if any animations need to be restarted after layer scroll.
1724
1725 2014-05-07  Hyowon Kim  <hw1008.kim@samsung.com>
1726
1727         GraphicsLayer::client() should return a reference.
1728         https://bugs.webkit.org/show_bug.cgi?id=126372
1729
1730         Reviewed by Simon Fraser.
1731
1732         GraphicsLayers always have a GraphicsLayerClient attached,
1733         so make client() a reference and remove some unnecessary branches.
1734         The author of the changes in the mac port is Andreas Kling <akling@apple.com>.
1735
1736         * WebCore.exp.in:
1737         * platform/graphics/GraphicsLayer.cpp:
1738         (WebCore::GraphicsLayer::GraphicsLayer):
1739         (WebCore::GraphicsLayer::willBeDestroyed):
1740         (WebCore::GraphicsLayer::paintGraphicsLayerContents):
1741         (WebCore::GraphicsLayer::addRepaintRect):
1742         (WebCore::dumpChildren):
1743         (WebCore::GraphicsLayer::dumpProperties):
1744         * platform/graphics/GraphicsLayer.h:
1745         (WebCore::GraphicsLayer::client):
1746         (WebCore::GraphicsLayer::pageScaleFactor):
1747         (WebCore::GraphicsLayer::deviceScaleFactor):
1748         * platform/graphics/GraphicsLayerFactory.h:
1749         * platform/graphics/ca/GraphicsLayerCA.cpp:
1750         (WebCore::GraphicsLayer::create):
1751         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
1752         (WebCore::GraphicsLayerCA::initialize):
1753         (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
1754         (WebCore::GraphicsLayerCA::computePositionRelativeToBase):
1755         (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
1756         (WebCore::GraphicsLayerCA::computeVisibleRect):
1757         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
1758         (WebCore::GraphicsLayerCA::platformCALayerContentsScaleMultiplierForNewTiles):
1759         (WebCore::GraphicsLayerCA::platformCALayerShouldAggressivelyRetainTiles):
1760         (WebCore::GraphicsLayerCA::platformCALayerShouldTemporarilyRetainTileCohorts):
1761         (WebCore::GraphicsLayerCA::updateContentsOpaque):
1762         (WebCore::GraphicsLayerCA::updateContentsScale):
1763         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
1764         (WebCore::GraphicsLayerCA::noteLayerPropertyChanged):
1765         * platform/graphics/ca/GraphicsLayerCA.h:
1766         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1767         (WebCore::GraphicsLayer::create):
1768         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
1769         (WebCore::GraphicsLayerTextureMapper::notifyChange):
1770         (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
1771         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1772         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
1773         (WebCore::CompositingCoordinator::createRootLayer):
1774         (WebCore::CompositingCoordinator::createGraphicsLayer):
1775         * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
1776         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1777         (WebCore::CoordinatedGraphicsLayer::notifyFlushRequired):
1778         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
1779         (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
1780         (WebCore::CoordinatedGraphicsLayer::animationStartedTimerFired):
1781         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1782         * rendering/RenderLayerBacking.cpp:
1783         (WebCore::RenderLayerBacking::createGraphicsLayer):
1784         * rendering/RenderLayerCompositor.cpp:
1785         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
1786         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
1787         (WebCore::RenderLayerCompositor::updateLayerForHeader):
1788         (WebCore::RenderLayerCompositor::updateLayerForFooter):
1789         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
1790         (WebCore::RenderLayerCompositor::ensureRootLayer):
1791
1792 2014-05-07  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1793
1794         [GStreamer] Corrected typo
1795         https://bugs.webkit.org/show_bug.cgi?id=132609
1796
1797         Reviewed by Martin Robinson.
1798
1799         Corrected m_canFallBackToLastFinishedSeekPositon typo and
1800         initialized in the constructor to prevent problems in the future.
1801
1802         No test needed.
1803
1804         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1805         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1806         Initialized m_canFallBackToLastFinishedSeekPosition as false.
1807         (WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
1808         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1809         (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
1810         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1811         m_canFallBackToLastFinishedSeekPositon ->
1812         m_canFallBackToLastFinishedSeekPosition
1813
1814 2014-05-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1815
1816         Convert PassOwnPtr to unique_ptr in CrossThreadTask.h
1817         https://bugs.webkit.org/show_bug.cgi?id=132605
1818
1819         Reviewed by Dirk Schulze.
1820
1821         * dom/CrossThreadTask.h: Converted.
1822
1823 2014-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>
1824
1825         [SOUP] TLSErrors do not cause page load to fail when not ignored
1826         https://bugs.webkit.org/show_bug.cgi?id=121548
1827
1828         Reviewed by Sergio Villar Senin.
1829
1830         This only happens in case of redirection, when the initial URL is
1831         an HTTPS site with an invalid certificate, that redirects to
1832         another location. We are starting the redirection without checking
1833         the TLS errors.
1834
1835         * platform/network/soup/ResourceHandleSoup.cpp:
1836         (WebCore::sendRequestCallback): Check TLS errors before starting a
1837         possible redirection.
1838
1839 2014-05-07  Manuel Rego Casasnovas  <rego@igalia.com>
1840
1841         [CSS Grid Layout] Remove runtime feature
1842         https://bugs.webkit.org/show_bug.cgi?id=132382
1843
1844         Reviewed by Benjamin Poulain.
1845
1846         Remove cssGridLayoutEnabled setting. Update methods using it accordingly.
1847
1848         * WebCore.order:
1849         * css/CSSParser.cpp:
1850         (WebCore::CSSParserContext::CSSParserContext):
1851         (WebCore::operator==):
1852         (WebCore::isValidKeywordPropertyAndValue):
1853         (WebCore::CSSParser::parseValue):
1854         (WebCore::CSSParser::parseGridTemplateShorthand):
1855         (WebCore::CSSParser::parseGridAreaShorthand):
1856         (WebCore::CSSParser::cssGridLayoutEnabled): Deleted.
1857         * css/CSSParser.h:
1858         * css/CSSParserMode.h:
1859         * dom/Document.cpp:
1860         (WebCore::Document::cssGridLayoutEnabled): Deleted.
1861         * dom/Document.h:
1862         * page/Settings.in:
1863
1864 2014-05-07  Praveen R Jadhav  <praveen.j@samsung.com>
1865
1866         Fix build errors for BlobDataItem after r168391.
1867         https://bugs.webkit.org/show_bug.cgi?id=132643
1868
1869         Reviewed by Carlos Garcia Campos.
1870
1871         Patch updates BlobDataItem params usage in ResourceHandleSoup.cpp
1872         to be inline with r168391.
1873
1874         * platform/network/soup/ResourceHandleSoup.cpp:
1875         (WebCore::blobIsOutOfDate): BlobDataItem class is updated in r168391.
1876         Corresponding parameter changes are done to resolve build error.
1877         (WebCore::addEncodedBlobItemToSoupMessageBody): BlobDataItem class is updated
1878         in r168391. Corresponding parameter changes are done to resolve build error.
1879
1880 2014-05-06  Dean Jackson  <dino@apple.com>
1881
1882         Clean up the difference between painting focus rings and adding PDF annotations
1883         https://bugs.webkit.org/show_bug.cgi?id=132638
1884
1885         Reviewed by Simon Fraser.
1886
1887         The code to add a PDF annotation when printing was called from
1888         drawFocusRing, which is quite confusing. With just little movement
1889         of code, we can detect an annotation and call addPDFURLRect in the
1890         paint phase, and drawFocusRing becomes something that only
1891         draws focus rings.
1892
1893         * rendering/RenderInline.cpp:
1894         (WebCore::RenderInline::paintOutline): Split calls to drawFocusRing
1895         and addPDFURLRect.
1896         * rendering/RenderObject.cpp:
1897         (WebCore::RenderObject::paintFocusRing): Get rid of call to PDF.
1898         (WebCore::RenderObject::addPDFURLRect): Change the signature so it
1899         can be called externally, and calculates the rectangle itself.
1900         (WebCore::RenderObject::paintOutline): Split the calls.
1901         * rendering/RenderObject.h:
1902
1903 2014-05-06  Rik Cabanier  <cabanier@adobe.com>
1904
1905         Calling createPattern with a broken image must throw an invalidstate error
1906         https://bugs.webkit.org/show_bug.cgi?id=132407
1907
1908         Reviewed by Darin Adler.
1909
1910         Updated createPattern so it throws an invalidState exception
1911         if you pass it an image that is in the broken state.
1912
1913         Tests:
1914         * canvas/philip/tests/2d.pattern.image.broken.html:
1915         * canvas/philip/tests/2d.pattern.image.incomplete.empty.html:
1916         * fast/canvas/canvas-empty-image-pattern.html:
1917
1918         * html/canvas/CanvasRenderingContext2D.cpp:
1919         (WebCore::CanvasRenderingContext2D::createPattern):
1920
1921 2014-05-06  Jer Noble  <jer.noble@apple.com>
1922
1923         [iOS][Mac] Display sleeps while playing <video> content.
1924         https://bugs.webkit.org/show_bug.cgi?id=132624
1925
1926         Reviewed by Darin Adler.
1927
1928         On iOS and Mac, create a DisplaySleepDisablerCocoa rather than an (no-op) DisplaySleepDisabler.
1929
1930         * platform/cocoa/DisplaySleepDisablerCocoa.cpp:
1931         (WebCore::DisplaySleepDisabler::create):
1932         * platform/cocoa/DisplaySleepDisablerCocoa.h:
1933
1934 2014-05-06  Dean Jackson  <dino@apple.com>
1935
1936         [Mac] Allow focus rings to redraw themselves if necessary
1937         https://bugs.webkit.org/show_bug.cgi?id=132593
1938
1939         Fix iOS build.
1940
1941         * platform/graphics/mac/GraphicsContextMac.mm:
1942         (WebCore::GraphicsContext::drawFocusRing): We no longer use the color parameter.
1943
1944 2014-05-06  Dean Jackson  <dino@apple.com>
1945
1946         [Mac] Allow focus rings to redraw themselves if necessary
1947         https://bugs.webkit.org/show_bug.cgi?id=132593
1948
1949         Reviewed by Simon Fraser.
1950
1951         Mac allows focus rings to change rendering over time. Expose this
1952         functionality to WebKit by having the rendering code detect that
1953         a focused element has asked to repaint itself, and also have
1954         the FocusController object remember how long it has been since
1955         an element was focused.
1956
1957         This patch removes WebCoreNSCellExtras, since a better version is
1958         available in WebKitSystemInterface, and it was going to be cumbersome
1959         to port the code from there into WebKit.
1960
1961         * WebCore.exp.in: Export _wkDrawFocusRingAtTime and _wkDrawCellFocusRingWithFrameAtTime.
1962         * WebCore.xcodeproj/project.pbxproj: Remove WebCoreNSCellExtras.
1963         * page/FocusController.cpp:
1964         (WebCore::FocusController::FocusController): Initialize the repaint timer.
1965         (WebCore::FocusController::~FocusController): Stop the repaint timer on deletion.
1966         (WebCore::FocusController::setFocusedElement): Keep track of the current time when focused.
1967         (WebCore::FocusController::focusedElementNeedsRepaint): Start the repaint timer.
1968         (WebCore::FocusController::focusRepaintTimerFired): Ask the focused element to repaint itself.
1969         (WebCore::FocusController::timeSinceFocusWasSet):
1970         * page/FocusController.h: Expose timeSinceFocusWasSet() and focusedElementNeedsRepaint(), as
1971         well as add the timer for repainting.
1972
1973         * platform/ControlStates.h: Add timeSinceControlWasFocused member variable, allowing the platform
1974         code such as Theme to obtain the value from FocusController.
1975         (WebCore::ControlStates::ControlStates):
1976         (WebCore::ControlStates::timeSinceControlWasFocused):
1977         (WebCore::ControlStates::setTimeSinceControlWasFocused):
1978
1979         * platform/graphics/GraphicsContext.h:
1980         (WebCore::GraphicsContext::drawFocusRing): New Mac-only method that uses timeOffset.
1981
1982         * platform/graphics/mac/GraphicsContextMac.mm:
1983         (WebCore::drawFocusRingToContext): No need to pass in color and radius - these are now
1984         ignored in WKDrawFocusRing. However, I didn't want to change the signature of the
1985         WKSI function.
1986         (WebCore::drawFocusRingToContextAtTime): Call into the new method WKDrawFocusRingAtTime.
1987         (WebCore::GraphicsContext::drawFocusRing): Color and radius no longer used.
1988
1989         * platform/mac/ThemeMac.mm:
1990         (WebCore::checkboxMargins): Update the margins since our focus ring can be a lot bigger.
1991         (WebCore::radioMargins): Ditto.
1992         (WebCore::paintToggleButton): Drawing a focus ring might trigger a repaint too.
1993         (WebCore::buttonMargins): Increase the margins.
1994         (WebCore::paintButton): If our focus ring wants to be drawn again, set the ControlStates flag.
1995
1996         * platform/mac/WebCoreNSCellExtras.h: Removed.
1997         * platform/mac/WebCoreNSCellExtras.m: Removed.
1998
1999         * platform/mac/WebCoreSystemInterface.h: Declare the new methods.
2000         * platform/mac/WebCoreSystemInterface.mm:
2001
2002         * rendering/RenderElement.cpp:
2003         (WebCore::RenderElement::initializeStyle): Expand the overflow rects by the maximum
2004         focus ring width. This might be different from the current outline size.
2005         (WebCore::RenderElement::setStyle): Ditto.
2006
2007         * rendering/RenderObject.cpp:
2008         (WebCore::RenderObject::paintFocusRing): If we're on Mac, use the new drawFocusRing method,
2009         which sets a parameter to true if the focused element needs a repaint.
2010
2011         * rendering/RenderTheme.cpp:
2012         (WebCore::RenderTheme::updateControlStatesForRenderer): Copy the value from FocusController
2013         so that the platform Theme code can use it.
2014
2015         * rendering/RenderTheme.h:
2016         (WebCore::RenderTheme::platformFocusRingMaxWidth): Add a way to get the maximum width
2017         of a focus ring for the platform. This is used to extend the overflow rects.
2018         * rendering/RenderThemeMac.h: Override the focus ring width.
2019         * rendering/RenderThemeMac.mm: On newer versions of OS X, we have a larger focus ring.
2020         (WebCore::RenderThemeMac::platformFocusRingMaxWidth):
2021         (WebCore::RenderThemeMac::paintMenuList): If a menu is focused, and needs a repaint, mark
2022         it as such.
2023
2024 2014-05-06  Jer Noble  <jer.noble@apple.com>
2025
2026         [iOS] Animate AVPlayerLayer into and out of full screen
2027         https://bugs.webkit.org/show_bug.cgi?id=132603
2028
2029         Reviewed by Simon Fraser.
2030
2031         Rather than synchronize animations across the WebProcess / UIProcess boundary, animate
2032         the AVPlayerLayer into place by first resizing the full screen layer to occupy the
2033         entire screen in the WebProcess, and use a sublayerTransform animation in the UIProcess
2034         to scale the AVPlayer from its initial screen location, as well as back to its final screen
2035         location.
2036
2037         * platform/graphics/GeometryUtilities.cpp:
2038         (WebCore::largestRectWithAspectRatioInsideRect): Added utility method.
2039         * platform/graphics/GeometryUtilities.h:
2040         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2041         (-[WebAVVideoLayer init]): Added, initialize video gravity and enable child layer masking.
2042         (-[WebAVVideoLayer setBounds:]): Create a transform to scale the video area.
2043         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): Block implicit animations during setup.
2044         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Reset the gravity to ResizeAspect
2045             if necessary.
2046
2047 2014-05-06  Alexey Proskuryakov  <ap@apple.com>
2048
2049         Make BlobDataItem use a refcounted object for files
2050         https://bugs.webkit.org/show_bug.cgi?id=132628
2051
2052         Reviewed by Anders Carlsson.
2053
2054         * CMakeLists.txt:
2055         * WebCore.vcxproj/WebCore.vcxproj:
2056         * WebCore.vcxproj/WebCore.vcxproj.filters:
2057         * WebCore.xcodeproj/project.pbxproj:
2058         Added BlobDataFileReference.{h|cpp}
2059
2060         * WebCore.exp.in: Removed unused exports.
2061
2062         * platform/network/BlobData.h:
2063         (WebCore::BlobDataItem::offset):
2064         (WebCore::BlobDataItem::BlobDataItem):
2065         Use a wrapper class for files, not a path. Changed to be more class-like accordingly.
2066
2067         * platform/network/BlobData.cpp:
2068         (WebCore::BlobData::appendData):
2069         (WebCore::BlobData::appendFile):
2070         (WebCore::BlobData::appendBlob): Deleted.
2071         (WebCore::BlobData::BlobData): Deleted.
2072         We never add blobs to BlobData, they are always resolved to data of file references.
2073         Lots of very confusing code to delete.
2074
2075         * platform/network/BlobDataFileReference.h: Added.
2076         * platform/network/BlobDataFileReference.cpp: Added.
2077         (WebCore::BlobDataFileReference::size):
2078         (WebCore::BlobDataFileReference::expectedModificationTime):
2079         (WebCore::BlobDataFileReference::computeFileSystemData):
2080         A unique reference to a file referenced by blob, to be preserved when you slice
2081         or combine blobs.
2082
2083         * platform/network/BlobRegistryImpl.cpp:
2084         (WebCore::BlobRegistryImpl::appendStorageItems):
2085         (WebCore::BlobRegistryImpl::registerFileBlobURL):
2086         (WebCore::BlobRegistryImpl::registerBlobURL):
2087         (WebCore::BlobRegistryImpl::blobSize):
2088         * platform/network/BlobResourceHandle.cpp:
2089         (WebCore::BlobResourceHandle::getSizeForNext):
2090         (WebCore::BlobResourceHandle::didGetSize):
2091         (WebCore::BlobResourceHandle::readDataSync):
2092         (WebCore::BlobResourceHandle::readFileSync):
2093         (WebCore::BlobResourceHandle::readDataAsync):
2094         (WebCore::BlobResourceHandle::readFileAsync):
2095         * platform/network/BlobResourceHandle.h:
2096         * platform/network/FormData.cpp:
2097         (WebCore::appendBlobResolved):
2098         Updated for BlobDataItem interface changes.
2099
2100 2014-05-06  Christophe Dumez  <ch.dumez@samsung.com>
2101
2102         [HTML] Default argument to HTMLTableRowElement.insertCell() should be -1
2103         https://bugs.webkit.org/show_bug.cgi?id=132615
2104
2105         Reviewed by Darin Adler.
2106
2107         HTMLTableRowElement.insertCell()'s argument default value should be -1, not
2108         0, as per the specification:
2109         http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.html#the-tr-element
2110
2111         The new behavior matches the one of Firefox 29 and IE11, and soon Blink:
2112         https://codereview.chromium.org/263323004/
2113
2114         Test: fast/dom/HTMLTableRowElement/insertCell-default-argument.html
2115
2116         * html/HTMLTableRowElement.h:
2117         * html/HTMLTableRowElement.idl:
2118
2119 2014-05-06  Oliver Hunt  <oliver@apple.com>
2120
2121         Fix build.
2122
2123         * WebCore.exp.in:
2124
2125 2014-05-06  Andreas Kling  <akling@apple.com>
2126
2127         Add missing line from r168384.
2128
2129         * dom/ContainerNode.h:
2130         (WebCore::ChildNodesLazySnapshot::~ChildNodesLazySnapshot):
2131
2132 2014-05-06  Oliver Hunt  <oliver@apple.com>
2133
2134         Can't make a booking at virginamerica.com
2135         https://bugs.webkit.org/show_bug.cgi?id=132626
2136
2137         Reviewed by Geoffrey Garen.
2138
2139         Test: fast/dom/assign-to-prototype-accessor-on-prototype-should-be-silent.html
2140
2141         We can't throw an exception when a site incorrectly attempts
2142         to use a dom property setter directly on the prototype as
2143         there are sites that do this as compatibility workarounds
2144         for old browsers. Instead we treat use of the setter on
2145         the prototype object in the same way we do getters, and just
2146         log a warning to the console.
2147
2148         * bindings/js/JSDOMBinding.cpp:
2149         (WebCore::reportDeprecatedSetterError):
2150         * bindings/js/JSDOMBinding.h:
2151         * bindings/scripts/CodeGeneratorJS.pm:
2152         (GenerateImplementation):
2153         * bindings/scripts/test/JS/JSTestInterface.cpp:
2154         (WebCore::setJSTestInterfaceImplementsStr2):
2155         (WebCore::setJSTestInterfaceImplementsStr3):
2156         (WebCore::setJSTestInterfaceImplementsNode):
2157         (WebCore::setJSTestInterfaceSupplementalStr2):
2158         (WebCore::setJSTestInterfaceSupplementalStr3):
2159         (WebCore::setJSTestInterfaceSupplementalNode):
2160         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2161         (WebCore::setJSTestNondeterministicNondeterministicWriteableAttr):
2162         (WebCore::setJSTestNondeterministicNondeterministicExceptionAttr):
2163         (WebCore::setJSTestNondeterministicNondeterministicGetterExceptionAttr):
2164         (WebCore::setJSTestNondeterministicNondeterministicSetterExceptionAttr):
2165         * bindings/scripts/test/JS/JSTestObj.cpp:
2166         (WebCore::setJSTestObjTestSubObjEnabledBySettingConstructor):
2167         (WebCore::setJSTestObjEnumAttr):
2168         (WebCore::setJSTestObjByteAttr):
2169         (WebCore::setJSTestObjOctetAttr):
2170         (WebCore::setJSTestObjShortAttr):
2171         (WebCore::setJSTestObjUnsignedShortAttr):
2172         (WebCore::setJSTestObjLongAttr):
2173         (WebCore::setJSTestObjLongLongAttr):
2174         (WebCore::setJSTestObjUnsignedLongLongAttr):
2175         (WebCore::setJSTestObjStringAttr):
2176         (WebCore::setJSTestObjTestObjAttr):
2177         (WebCore::setJSTestObjXMLObjAttr):
2178         (WebCore::setJSTestObjCreate):
2179         (WebCore::setJSTestObjReflectedStringAttr):
2180         (WebCore::setJSTestObjReflectedIntegralAttr):
2181         (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
2182         (WebCore::setJSTestObjReflectedBooleanAttr):
2183         (WebCore::setJSTestObjReflectedURLAttr):
2184         (WebCore::setJSTestObjReflectedCustomIntegralAttr):
2185         (WebCore::setJSTestObjReflectedCustomBooleanAttr):
2186         (WebCore::setJSTestObjReflectedCustomURLAttr):
2187         (WebCore::setJSTestObjTypedArrayAttr):
2188         (WebCore::setJSTestObjAttrWithGetterException):
2189         (WebCore::setJSTestObjAttrWithSetterException):
2190         (WebCore::setJSTestObjStringAttrWithGetterException):
2191         (WebCore::setJSTestObjStringAttrWithSetterException):
2192         (WebCore::setJSTestObjCustomAttr):
2193         (WebCore::setJSTestObjWithScriptStateAttribute):
2194         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
2195         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
2196         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
2197         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
2198         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
2199         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
2200         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
2201         (WebCore::setJSTestObjConditionalAttr1):
2202         (WebCore::setJSTestObjConditionalAttr2):
2203         (WebCore::setJSTestObjConditionalAttr3):
2204         (WebCore::setJSTestObjConditionalAttr4Constructor):
2205         (WebCore::setJSTestObjConditionalAttr5Constructor):
2206         (WebCore::setJSTestObjConditionalAttr6Constructor):
2207         (WebCore::setJSTestObjAnyAttribute):
2208         (WebCore::setJSTestObjMutablePoint):
2209         (WebCore::setJSTestObjImmutablePoint):
2210         (WebCore::setJSTestObjStrawberry):
2211         (WebCore::setJSTestObjStrictFloat):
2212         (WebCore::setJSTestObjId):
2213         (WebCore::setJSTestObjReplaceableAttribute):
2214         (WebCore::setJSTestObjNullableLongSettableAttribute):
2215         (WebCore::setJSTestObjNullableStringValue):
2216         (WebCore::setJSTestObjAttributeWithReservedEnumType):
2217         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2218         (WebCore::setJSTestSerializedScriptValueInterfaceValue):
2219         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
2220         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2221         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
2222         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
2223         (WebCore::setJSTestTypedefsAttrWithGetterException):
2224         (WebCore::setJSTestTypedefsAttrWithSetterException):
2225         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
2226         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
2227
2228 2014-05-06  Andreas Kling  <akling@apple.com>
2229
2230         ChildNodesLazySnapshot::m_childNodes needs two heap allocations.
2231         <https://webkit.org/b/132616>
2232
2233         This seems a bit silly, since ChildNodesLazySnapshot is always
2234         allocated on the stack.
2235
2236         Change it to be a bool + a Vector instead of using the nullity
2237         as a presence indicator. This way we also don't end up with an
2238         out-of-line ~OwnPtr for the Vector.
2239
2240         Reviewed by Geoff Garen.
2241
2242         * dom/ContainerNode.h:
2243         (WebCore::ChildNodesLazySnapshot::ChildNodesLazySnapshot):
2244         (WebCore::ChildNodesLazySnapshot::nextNode):
2245         (WebCore::ChildNodesLazySnapshot::takeSnapshot):
2246         (WebCore::ChildNodesLazySnapshot::hasSnapshot):
2247
2248 2014-05-06  Alexey Proskuryakov  <ap@apple.com>
2249
2250         Eliminate BlobStorageData
2251         https://bugs.webkit.org/show_bug.cgi?id=132617
2252
2253         Reviewed by Anders Carlsson.
2254
2255         * WebCore.vcxproj/WebCore.vcxproj:
2256         * WebCore.vcxproj/WebCore.vcxproj.filters:
2257         * WebCore.xcodeproj/project.pbxproj:
2258         * platform/network/BlobData.h:
2259         (WebCore::BlobData::create):
2260         (WebCore::BlobData::BlobData):
2261         * platform/network/BlobRegistryImpl.cpp:
2262         (WebCore::loadResourceSynchronously):
2263         (WebCore::BlobRegistryImpl::appendStorageItems):
2264         (WebCore::BlobRegistryImpl::registerFileBlobURL):
2265         (WebCore::BlobRegistryImpl::registerBlobURL):
2266         (WebCore::BlobRegistryImpl::registerBlobURLForSlice):
2267         (WebCore::BlobRegistryImpl::getBlobDataFromURL):
2268         (WebCore::BlobRegistryImpl::blobSize):
2269         * platform/network/BlobRegistryImpl.h:
2270         * platform/network/BlobResourceHandle.cpp:
2271         (WebCore::BlobResourceHandle::createAsync):
2272         (WebCore::BlobResourceHandle::loadResourceSynchronously):
2273         (WebCore::BlobResourceHandle::BlobResourceHandle):
2274         (WebCore::BlobResourceHandle::doStart):
2275         (WebCore::BlobResourceHandle::getSizeForNext):
2276         (WebCore::BlobResourceHandle::didGetSize):
2277         (WebCore::BlobResourceHandle::seek):
2278         (WebCore::BlobResourceHandle::readSync):
2279         (WebCore::BlobResourceHandle::readDataSync):
2280         (WebCore::BlobResourceHandle::readFileSync):
2281         (WebCore::BlobResourceHandle::readAsync):
2282         (WebCore::BlobResourceHandle::readDataAsync):
2283         (WebCore::BlobResourceHandle::readFileAsync):
2284         (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
2285         * platform/network/BlobResourceHandle.h:
2286         * platform/network/BlobStorageData.h: Removed.
2287         * platform/network/FormData.cpp:
2288         (WebCore::appendBlobResolved):
2289         * platform/network/soup/ResourceHandleSoup.cpp:
2290         (WebCore::addEncodedBlobToSoupMessageBody):
2291
2292 2014-05-06  Simon Fraser  <simon.fraser@apple.com>
2293
2294         Fix the iOS build.
2295
2296         WebCore::Editor::replaceNodeFromPasteboard(WebCore::Node*, WTF::String const&) is Mac-only.
2297         Also sort the export file.
2298
2299         * WebCore.exp.in:
2300
2301 2014-05-06  David Hyatt  <hyatt@apple.com>
2302
2303         Begin Removal of Old Multi-Column Code.
2304         https://bugs.webkit.org/show_bug.cgi?id=132480
2305
2306         Reviewed by Andreas Kling.
2307
2308         * dom/Document.cpp:
2309         (WebCore::Document::regionBasedColumnsEnabled): Deleted.
2310         * dom/Document.h:
2311         * page/FrameView.cpp:
2312         (WebCore::updateLayerPositionFlags):
2313         * page/Settings.in:
2314         * rendering/LayoutState.cpp:
2315         (WebCore::LayoutState::LayoutState):
2316         (WebCore::LayoutState::clearPaginationInformation):
2317         (WebCore::LayoutState::addForcedColumnBreak): Deleted.
2318         * rendering/LayoutState.h:
2319         (WebCore::LayoutState::LayoutState):
2320         (WebCore::LayoutState::isPaginatingColumns): Deleted.
2321         * rendering/RenderBlock.cpp:
2322         (WebCore::RenderBlock::~RenderBlock):
2323         (WebCore::RenderBlock::addChildToContinuation):
2324         (WebCore::RenderBlock::addChild):
2325         (WebCore::RenderBlock::addChildIgnoringContinuation):
2326         (WebCore::RenderBlock::removeLeftoverAnonymousBlock):
2327         (WebCore::canMergeContiguousAnonymousBlocks):
2328         (WebCore::RenderBlock::removeChild):
2329         (WebCore::RenderBlock::recomputeLogicalWidth):
2330         (WebCore::RenderBlock::addOverflowFromChildren):
2331         (WebCore::RenderBlock::expandsToEncloseOverhangingFloats):
2332         (WebCore::RenderBlock::simplifiedLayout):
2333         (WebCore::RenderBlock::layoutPositionedObjects):
2334         (WebCore::RenderBlock::paintObject):
2335         (WebCore::RenderBlock::selectionGaps):
2336         (WebCore::RenderBlock::nodeAtPoint):
2337         (WebCore::RenderBlock::offsetForContents):
2338         (WebCore::RenderBlock::computeIntrinsicLogicalWidths):
2339         (WebCore::RenderBlock::createAnonymousBoxWithSameTypeAs):
2340         (WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation):
2341         (WebCore::RenderBlock::renderName):
2342         (WebCore::RenderBlock::addChildToAnonymousColumnBlocks): Deleted.
2343         (WebCore::RenderBlock::containingColumnsBlock): Deleted.
2344         (WebCore::RenderBlock::splitFlow): Deleted.
2345         (WebCore::RenderBlock::makeChildrenAnonymousColumnBlocks): Deleted.
2346         (WebCore::RenderBlock::columnsBlockForSpanningElement): Deleted.
2347         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): Deleted.
2348         (WebCore::RenderBlock::updateLogicalWidthAndColumnWidth): Deleted.
2349         (WebCore::RenderBlock::isTopLayoutOverflowAllowed): Deleted.
2350         (WebCore::RenderBlock::isLeftLayoutOverflowAllowed): Deleted.
2351         (WebCore::RenderBlock::paintColumnRules): Deleted.
2352         (WebCore::RenderBlock::initialBlockOffsetForPainting): Deleted.
2353         (WebCore::RenderBlock::blockDeltaForPaintingNextColumn): Deleted.
2354         (WebCore::RenderBlock::paintColumnContents): Deleted.
2355         (WebCore::ColumnRectIterator::ColumnRectIterator): Deleted.
2356         (WebCore::ColumnRectIterator::advance): Deleted.
2357         (WebCore::ColumnRectIterator::columnRect): Deleted.
2358         (WebCore::ColumnRectIterator::hasMore): Deleted.
2359         (WebCore::ColumnRectIterator::adjust): Deleted.
2360         (WebCore::ColumnRectIterator::update): Deleted.
2361         (WebCore::RenderBlock::hitTestColumns): Deleted.
2362         (WebCore::RenderBlock::adjustForColumnRect): Deleted.
2363         (WebCore::RenderBlock::availableLogicalWidth): Deleted.
2364         (WebCore::RenderBlock::columnGap): Deleted.
2365         (WebCore::RenderBlock::computeColumnCountAndWidth): Deleted.
2366         (WebCore::RenderBlock::requiresColumns): Deleted.
2367         (WebCore::RenderBlock::setComputedColumnCountAndWidth): Deleted.
2368         (WebCore::RenderBlock::updateColumnProgressionFromStyle): Deleted.
2369         (WebCore::RenderBlock::computedColumnWidth): Deleted.
2370         (WebCore::RenderBlock::computedColumnCount): Deleted.
2371         (WebCore::RenderBlock::columnInfo): Deleted.
2372         (WebCore::RenderBlock::columnCount): Deleted.
2373         (WebCore::RenderBlock::columnRectAt): Deleted.
2374         (WebCore::RenderBlock::adjustPointToColumnContents): Deleted.
2375         (WebCore::RenderBlock::adjustRectForColumns): Deleted.
2376         (WebCore::RenderBlock::flipForWritingModeIncludingColumns): Deleted.
2377         (WebCore::RenderBlock::adjustStartEdgeForWritingModeIncludingColumns): Deleted.
2378         (WebCore::RenderBlock::adjustForColumns): Deleted.
2379         (WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns): Deleted.
2380         (WebCore::RenderBlock::paginationUnit): Deleted.
2381         (WebCore::RenderBlock::createAnonymousColumnsWithParentRenderer): Deleted.
2382         (WebCore::RenderBlock::createAnonymousColumnSpanWithParentRenderer): Deleted.
2383         (WebCore::RenderBlock::computeLineGridPaginationOrigin): Deleted.
2384         * rendering/RenderBlock.h:
2385         (WebCore::RenderBlock::pixelSnappedLogicalRightOffsetForLine):
2386         (WebCore::RenderBlock::createAnonymousBlock):
2387         (WebCore::RenderBlock::paintColumnRules):
2388         (WebCore::RenderBlock::createAnonymousColumnsBlock): Deleted.
2389         (WebCore::RenderBlock::createAnonymousColumnSpanBlock): Deleted.
2390         * rendering/RenderBlockFlow.cpp:
2391         (WebCore::RenderBlockFlow::adjustIntrinsicLogicalWidthsForColumns):
2392         (WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths):
2393         (WebCore::RenderBlockFlow::recomputeLogicalWidthAndColumnWidth):
2394         (WebCore::RenderBlockFlow::columnGap):
2395         (WebCore::RenderBlockFlow::computeColumnCountAndWidth):
2396         (WebCore::RenderBlockFlow::layoutBlock):
2397         (WebCore::inNormalFlow):
2398         (WebCore::RenderBlockFlow::applyBeforeBreak):
2399         (WebCore::RenderBlockFlow::applyAfterBreak):
2400         (WebCore::RenderBlockFlow::updateMinimumPageHeight):
2401         (WebCore::RenderBlockFlow::computeOverflow):
2402         (WebCore::RenderBlockFlow::addOverhangingFloats):
2403         (WebCore::RenderBlockFlow::hasOverhangingFloat):
2404         (WebCore::RenderBlockFlow::relayoutForPagination):
2405         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
2406         (WebCore::RenderBlockFlow::requiresColumns):
2407         (WebCore::RenderBlockFlow::setComputedColumnCountAndWidth):
2408         (WebCore::RenderBlockFlow::updateColumnProgressionFromStyle):
2409         (WebCore::RenderBlockFlow::computedColumnWidth):
2410         (WebCore::RenderBlockFlow::computedColumnCount):
2411         * rendering/RenderBlockFlow.h:
2412         (WebCore::RenderBlockFlow::hasOverhangingFloats):
2413         * rendering/RenderBox.cpp:
2414         (WebCore::RenderBox::styleDidChange):
2415         (WebCore::RenderBox::offsetFromContainer):
2416         (WebCore::RenderBox::computeRectForRepaint):
2417         (WebCore::RenderBox::layoutOverflowRectForPropagation):
2418         * rendering/RenderBox.h:
2419         * rendering/RenderBoxModelObject.cpp:
2420         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
2421         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
2422         * rendering/RenderBoxModelObject.h:
2423         (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
2424         * rendering/RenderFlexibleBox.cpp:
2425         (WebCore::RenderFlexibleBox::layoutBlock):
2426         * rendering/RenderFlowThread.h:
2427         * rendering/RenderGeometryMap.cpp:
2428         (WebCore::canMapBetweenRenderers):
2429         * rendering/RenderInline.cpp:
2430         (WebCore::RenderInline::clippedOverflowRectForRepaint):
2431         (WebCore::RenderInline::computeRectForRepaint):
2432         (WebCore::RenderInline::offsetFromContainer):
2433         (WebCore::RenderInline::mapLocalToContainer):
2434         * rendering/RenderLayer.cpp:
2435         (WebCore::RenderLayer::RenderLayer):
2436         (WebCore::RenderLayer::updateLayerPositions):
2437         (WebCore::RenderLayer::updatePagination):
2438         (WebCore::accumulateOffsetTowardsAncestor):
2439         (WebCore::RenderLayer::paintList):
2440         (WebCore::RenderLayer::hitTestList):
2441         (WebCore::checkContainingBlockChainForPagination): Deleted.
2442         (WebCore::RenderLayer::useRegionBasedColumns): Deleted.
2443         (WebCore::RenderLayer::paintPaginatedChildLayer): Deleted.
2444         (WebCore::RenderLayer::paintChildLayerIntoColumns): Deleted.
2445         (WebCore::RenderLayer::hitTestPaginatedChildLayer): Deleted.
2446         (WebCore::RenderLayer::hitTestChildLayerColumns): Deleted.
2447         * rendering/RenderLayer.h:
2448         * rendering/RenderMultiColumnFlowThread.cpp:
2449         (WebCore::RenderMultiColumnFlowThread::shouldCheckColumnBreaks):
2450         * rendering/RenderMultiColumnFlowThread.h:
2451         * rendering/RenderObject.cpp:
2452         (WebCore::RenderObject::computeRectForRepaint):
2453         (WebCore::RenderObject::mapLocalToContainer):
2454         (WebCore::RenderObject::pushMappingToContainer):
2455         (WebCore::RenderObject::offsetFromContainer):
2456         * rendering/RenderObject.h:
2457         (WebCore::RenderObject::isAnonymousBlock):
2458         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
2459         (WebCore::RenderObject::hasColumns): Deleted.
2460         (WebCore::RenderObject::setHasColumns): Deleted.
2461         (WebCore::RenderObject::isAnonymousColumnsBlock): Deleted.
2462         (WebCore::RenderObject::isAnonymousColumnSpanBlock): Deleted.
2463         (WebCore::RenderObject::adjustForColumns): Deleted.
2464         (WebCore::RenderObject::offsetForColumns): Deleted.
2465         * rendering/RenderText.cpp:
2466         (WebCore::RenderText::selectionRectForRepaint):
2467         * rendering/RenderView.cpp:
2468         (WebCore::RenderView::availableLogicalHeight):
2469         (WebCore::RenderView::pageOrViewLogicalHeight):
2470         (WebCore::RenderView::unextendedBackgroundRect):
2471         (WebCore::RenderView::backgroundRect):
2472         (WebCore::RenderView::shouldDisableLayoutStateForSubtree):
2473         (WebCore::RenderView::pageNumberForBlockProgressionOffset):
2474         (WebCore::RenderView::pageCount):
2475         (WebCore::RenderView::paginationUnit): Deleted.
2476         * rendering/RenderView.h:
2477         (WebCore::LayoutStateMaintainer::LayoutStateMaintainer):
2478         (WebCore::LayoutStateMaintainer::push):
2479         * rendering/SimpleLineLayout.cpp:
2480         (WebCore::SimpleLineLayout::canUseFor):
2481         * rendering/svg/RenderSVGText.cpp:
2482         (WebCore::RenderSVGText::layout):
2483         * style/StyleResolveForDocument.cpp:
2484         (WebCore::Style::resolveForDocument):
2485
2486 2014-05-06  Brady Eidson  <beidson@apple.com>
2487
2488         Don't select an image that is about to have its menu shown.
2489         <rdar://problem/16807845> and https://bugs.webkit.org/show_bug.cgi?id=132579
2490
2491         Reviewed by Tim Horton.
2492
2493         * WebCore.exp.in:
2494
2495         * editing/Editor.h:
2496         * editing/mac/EditorMac.mm:
2497         (WebCore::Editor::replaceNodeFromPasteboard): New method that first selects
2498           the Node and then immediately pastes over it. Since it’s synchronous the 
2499           selection never has a chance to paint.
2500
2501         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
2502         (WebCore::ImageControlsButtonElementMac::defaultEventHandler): Don’t select the image.
2503
2504 2014-05-06  Eric Carlson  <eric.carlson@apple.com>
2505
2506         [Mac] make metadata cue attributes consistent
2507         https://bugs.webkit.org/show_bug.cgi?id=132610
2508
2509         Reviewed by Jer Noble.
2510
2511         No new tests, updated http/tests/media/track-in-band-hls-metadata.html.
2512
2513         * platform/mac/SerializedPlatformRepresentationMac.mm:
2514         (WebCore::jsValueWithAVMetadataItemInContext): Don't include keys @dataTypeNamespace
2515             or @pictureType, @dataType -> @type.
2516
2517 2014-05-06  Brady Eidson  <beidson@apple.com>
2518
2519         "Flash of content without image" when pasting a raw image from the pasteboard
2520         <rdar://problem/16826199> and https://bugs.webkit.org/show_bug.cgi?id=132612
2521
2522         Reviewed by Tim Horton.
2523
2524         Let an ArchiveResource be flagged as "should load immediately":
2525         * loader/archive/ArchiveResource.cpp:
2526         (WebCore::ArchiveResource::ArchiveResource):
2527         * loader/archive/ArchiveResource.h:
2528         (WebCore::ArchiveResource::setShouldLoadImmediately):
2529         (WebCore::ArchiveResource::shouldLoadImmediately):
2530
2531         Set that flag on the ArchiveResource for the image.
2532         Note we quite explicitly do this only in the "read a single image" from the pasteboard
2533         case, because we don't want to do this synchronous step for multiple images at once
2534         such as when pasting a WebArchive:
2535         * editing/mac/EditorMac.mm:
2536         (WebCore::Editor::WebContentReader::readImage):
2537
2538         When creating a new CachedResource, if there is an ArchiveResource that is set to
2539         load immediately, populate the CachedResource immediately instead of scheduling a load:
2540         * loader/cache/CachedResourceLoader.cpp:
2541         (WebCore::CachedResourceLoader::requestResource):
2542
2543 2014-05-06  Alex Christensen  <achristensen@webkit.org>
2544
2545         Unreviewed build fix for debug after r168367.
2546
2547         * platform/NotImplemented.cpp:
2548         Added include NotImplemented.h.
2549
2550 2014-05-06  Alex Christensen  <achristensen@webkit.org>
2551
2552         Removed unnecessary notImplemented.h includes.
2553         https://bugs.webkit.org/show_bug.cgi?id=132587
2554
2555         Reviewed by Anders Carlsson.
2556
2557         * Modules/webdatabase/Database.cpp:
2558         * accessibility/AccessibilityObject.cpp:
2559         * bindings/js/Dictionary.h:
2560         * bindings/js/SerializedScriptValue.cpp:
2561         * html/HTMLMediaSession.cpp:
2562         * html/ImageDocument.cpp:
2563         * html/parser/HTMLFormattingElementList.cpp:
2564         * loader/appcache/ApplicationCacheStorage.cpp:
2565         * page/mac/EventHandlerMac.mm:
2566         * platform/NotImplemented.cpp:
2567         * platform/audio/ios/MediaSessionManagerIOS.mm:
2568         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
2569         * platform/graphics/mac/GraphicsContext3DMac.mm:
2570         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2571         * platform/ios/PlatformScreenIOS.mm:
2572         * platform/mac/PlatformScreenMac.mm:
2573         * platform/mac/WidgetMac.mm:
2574         * platform/mediastream/MediaStreamTrackPrivate.cpp:
2575         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
2576         * platform/mediastream/mac/AVMediaCaptureSource.mm:
2577         * rendering/RenderGrid.cpp:
2578         * workers/SharedWorkerGlobalScope.cpp:
2579         * workers/WorkerGlobalScope.cpp:
2580         * workers/WorkerMessagingProxy.cpp:
2581         Removed notImplemented from list of includes.
2582
2583 2014-05-06  Enrica Casucci  <enrica@apple.com>
2584
2585         Unreviewed build fix after http://trac.webkit.org/changeset/168364
2586
2587         * rendering/RenderLineBreak.cpp:
2588
2589 2014-05-06  Christophe Dumez  <ch.dumez@samsung.com>
2590
2591         [HTML] Default argument to HTMLTableSectionElement.insertRow() should be -1
2592         https://bugs.webkit.org/show_bug.cgi?id=132570
2593
2594         Reviewed by Darin Adler.
2595
2596         HTMLTableSectionElement.insertRow()'s argument default value should be -1, not
2597         0, as per the specification:
2598         http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.html#the-tbody-element
2599
2600         The new behavior matches the one of Firefox 29 and IE11, and soon Blink:
2601         https://code.google.com/p/chromium/issues/detail?id=369803
2602
2603         Test: fast/dom/HTMLTableSectionElement/insertRow-default-argument.html
2604
2605         * html/HTMLTableSectionElement.h:
2606         * html/HTMLTableSectionElement.idl:
2607
2608 2014-05-05  Enrica Casucci  <enrica@apple.com>
2609
2610         REGRESSION(r155957): Selection rects are incorrect when the selection contains BR elements.
2611         https://bugs.webkit.org/show_bug.cgi?id=132596
2612         <rdar://problem/16692206>
2613
2614         Reviewed by Antti Koivisto.
2615
2616         This patch adds an implementation of collectSelectionRects to RenderLineBreak.
2617         It uses the same logic used by RenderText to compute and annotate the returned rect
2618         which is computed, like the caret rect, using information from the rootline box.
2619
2620         * rendering/RenderLineBreak.cpp:
2621         (WebCore::RenderLineBreak::collectSelectionRects):
2622         * rendering/RenderLineBreak.h:
2623
2624 2014-05-06  Andrei Bucur  <abucur@adobe.com>
2625
2626         [CSS Regions] Optimize the number of regions invalidations
2627         https://bugs.webkit.org/show_bug.cgi?id=132611
2628
2629         Reviewed by David Hyatt.
2630
2631         It is possible to invalidate the region chain of a flow thread
2632         during the layout of the region when its height is not final.
2633
2634         This patch places the check after the height of the region
2635         is determined, reducing the number of invalidations.
2636
2637         Tests: Less invalidations and repaints in the repaint tests for
2638         the flow threads.
2639
2640         * rendering/RenderBlockFlow.cpp:
2641         (WebCore::RenderBlockFlow::updateLogicalHeight):
2642         * rendering/RenderNamedFlowFragment.cpp:
2643         (WebCore::RenderNamedFlowFragment::layoutBlock):
2644         (WebCore::RenderNamedFlowFragment::invalidateRegionIfNeeded):
2645         * rendering/RenderNamedFlowFragment.h:
2646
2647 2014-05-03  Sam Weinig  <sam@webkit.org>
2648
2649         [Extended Background] Respect repeat-x/repeat-y when creating margin tiles
2650         https://bugs.webkit.org/show_bug.cgi?id=132534
2651
2652         Reviewed by Beth Dakin.
2653
2654         If the background image that is causing margin tiles only repeats in dimension only create
2655         the tiles in that dimension.
2656
2657         * page/FrameView.cpp:
2658         (WebCore::FrameView::updateExtendBackgroundIfNecessary):
2659         (WebCore::FrameView::calculateExtendedBackgroundMode):
2660         (WebCore::FrameView::updateTilesForExtendedBackgroundMode):
2661         (WebCore::FrameView::setBackgroundExtendsBeyondPage): Deleted.
2662         (WebCore::FrameView::needsExtendedBackgroundRectForPainting): Deleted.
2663         (WebCore::FrameView::setHasExtendedBackgroundRectForPainting): Deleted.
2664         * page/FrameView.h:
2665         * page/Settings.cpp:
2666         (WebCore::Settings::setBackgroundShouldExtendBeyondPage):
2667         * platform/graphics/TiledBacking.h:
2668         * platform/graphics/ca/mac/TileController.h:
2669         * platform/graphics/ca/mac/TileController.mm:
2670         (WebCore::TileController::hasHorizontalMargins):
2671         (WebCore::TileController::hasVerticalMargins):
2672         * rendering/RenderElement.cpp:
2673         (WebCore::RenderElement::styleWillChange):
2674         * rendering/RenderLayerBacking.cpp:
2675         (WebCore::RenderLayerBacking::setTiledBackingHasMargins):
2676         * rendering/RenderLayerBacking.h:
2677
2678 2014-05-06  Chris Fleizach  <cfleizach@apple.com>
2679
2680         AX: VoiceOver does not announce text changes for content editable regions in Safari
2681         https://bugs.webkit.org/show_bug.cgi?id=132577
2682
2683         Reviewed by Mario Sanchez Prada.
2684
2685         When text or children are changed inside of a contenteditable region, we need to 
2686         convert those actions into AXValueChange notifications.
2687
2688         Test: accessibility/content-editable-set-inner-text-generates-axvalue-notification.html
2689
2690         * accessibility/AccessibilityNodeObject.cpp:
2691         (WebCore::AccessibilityNodeObject::childrenChanged):
2692         (WebCore::AccessibilityNodeObject::hasContentEditableAttributeSet): Deleted.
2693         * accessibility/AccessibilityNodeObject.h:
2694         * accessibility/AccessibilityObject.cpp:
2695         (WebCore::AccessibilityObject::hasContentEditableAttributeSet):
2696         * accessibility/AccessibilityObject.h:
2697         * accessibility/AccessibilityRenderObject.cpp:
2698         (WebCore::AccessibilityRenderObject::textChanged):
2699
2700 2014-05-06  Dirk Schulze  <krit@webkit.org>
2701
2702         [SVG2] Share "on"- event attributes with HTMLElement
2703         https://bugs.webkit.org/show_bug.cgi?id=132604
2704
2705         Reviewed by Mihnea Ovidenie.
2706
2707         Share "on" event attribute parsing between SVGElement and HTMLElement.
2708
2709         Tests: fast/dom/script-tests/event-attribute-availability.js:
2710
2711         * html/HTMLElement.cpp:
2712         (WebCore::HTMLElement::populateEventNameForAttributeLocalNameMap):
2713         (WebCore::populateEventNameForAttributeLocalNameMap): Deleted.
2714         * html/HTMLElement.h: Make populateEventNameForAttributeLocalNameMap
2715             public for use in SVGElement.
2716         * svg/SVGElement.cpp: Use HTMLElement code to parse "on" event
2717             attributes.
2718         (WebCore::SVGElement::parseAttribute):
2719
2720 2014-05-05  Zan Dobersek  <zdobersek@igalia.com>
2721
2722         [Soup] Use std::unique_ptr<char[]> for the read buffer in SocketStreamHandle
2723         https://bugs.webkit.org/show_bug.cgi?id=132559
2724
2725         Reviewed by Carlos Garcia Campos.
2726
2727         Manage the read buffer array through a std::unique_ptr<char[]> object.
2728         This avoids handling with the raw pointer and also ensures that the memory
2729         allocated with the new[] operator is deleted with the delete[] operator,
2730         a problem exposed by the AddressSanitizer in WebSocket tests.
2731
2732         * platform/network/soup/SocketStreamHandle.h:
2733         * platform/network/soup/SocketStreamHandleSoup.cpp:
2734         (WebCore::SocketStreamHandle::SocketStreamHandle):
2735         (WebCore::SocketStreamHandle::connected):
2736         (WebCore::SocketStreamHandle::readBytes):
2737         (WebCore::SocketStreamHandle::platformClose):
2738
2739 2014-05-05  Dirk Schulze  <krit@webkit.org>
2740
2741         Adapt inline SVG sizing behavior to Firefox and Blink
2742         https://bugs.webkit.org/show_bug.cgi?id=132569
2743
2744         Reviewed by Dean Jackson.
2745
2746         This patch is ported from Blink CR 308992. Thanks to David Vest for helping
2747         with back porting his Blink patch. From the commit message:
2748
2749         "The basis of this change is to map explicit width and height
2750         attributes to CSS properties, essentially promoting them to
2751         presentation attributes. Note that implicit "100%" width and height
2752         are not mapped.
2753         
2754         This enables us to remove the concept of "percentage intrinsic size"
2755         and rely on normal CSS rules to resolve percentage values.
2756         
2757         The change has been approved by the SVG WG and the spec is being
2758         updated. Minutes here:
2759         
2760         http://www.w3.org/2014/04/07-svg-minutes.html#item03"
2761
2762         The new model was indeed approved by the SVG WG and is basically following
2763         the CSS 2.1 model for replaced elements.
2764
2765         With this patch WebKit, Firefox and Blink have the same behavior for inline SVG.
2766         This is the first successful approach to unify the sizing behavior of SVG
2767         across UAs.
2768
2769         Tests: svg/as-object/sizing/svg-in-object-placeholder-height-auto.html
2770                svg/as-object/sizing/svg-in-object-placeholder-height-fixed.html
2771                svg/as-object/sizing/svg-in-object-placeholder-height-percentage.html
2772                svg/in-html/sizing/svg-inline.html
2773
2774         * css/svg.css: Root SVG elements still need to be sized with height: 100% and
2775             width: 100%. This is necessary since width and height are presentation
2776             attributes now.
2777         (svg:root):
2778         * rendering/RenderBox.h:
2779         (WebCore::RenderBox::computeIntrinsicRatioInformation): Remove all special
2780             behavior for intrinsic and percentage based sizes in SVG. This simplifies and
2781             unifies the code a lot. Most of the logic that is used is in RenderBox and
2782             RenderReplaced now. RenderSVGRoot was cleaned up a lot and is much lighter. 
2783             And so it SVGSVGElement.
2784         * rendering/RenderBoxModelObject.cpp:
2785         (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
2786         (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
2787         * rendering/RenderImage.cpp:
2788         (WebCore::RenderImage::computeIntrinsicRatioInformation):
2789         * rendering/RenderImage.h:
2790         * rendering/RenderReplaced.cpp:
2791         (WebCore::RenderReplaced::computeAspectRatioInformationForRenderBox):
2792         (WebCore::RenderReplaced::computeIntrinsicRatioInformation):
2793         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
2794         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
2795         (WebCore::RenderReplaced::computePreferredLogicalWidths):
2796         * rendering/RenderReplaced.h:
2797         * rendering/svg/RenderSVGRoot.cpp:
2798         (WebCore::RenderSVGRoot::computeIntrinsicRatioInformation):
2799         (WebCore::RenderSVGRoot::computeReplacedLogicalWidth):
2800         (WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
2801         (WebCore::RenderSVGRoot::hasRelativeDimensions):
2802         (WebCore::RenderSVGRoot::hasRelativeIntrinsicLogicalWidth): Deleted.
2803         (WebCore::RenderSVGRoot::hasRelativeLogicalHeight): Deleted.
2804         * rendering/svg/RenderSVGRoot.h:
2805         * svg/SVGElement.h:
2806         (WebCore::SVGElement::invalidateSVGPresentationAttributeStyle):
2807         * svg/SVGSVGElement.cpp:
2808         (WebCore::SVGSVGElement::isPresentationAttribute):
2809         (WebCore::SVGSVGElement::collectStyleForPresentationAttribute):
2810         (WebCore::SVGSVGElement::svgAttributeChanged):
2811         (WebCore::SVGSVGElement::currentViewportSize):
2812         (WebCore::SVGSVGElement::hasIntrinsicWidth):
2813         (WebCore::SVGSVGElement::hasIntrinsicHeight):
2814         (WebCore::SVGSVGElement::intrinsicWidth):
2815         (WebCore::SVGSVGElement::intrinsicHeight):
2816         (WebCore::SVGSVGElement::widthAttributeEstablishesViewport): Deleted.
2817         (WebCore::SVGSVGElement::heightAttributeEstablishesViewport): Deleted.
2818         * svg/SVGSVGElement.h:
2819         * svg/graphics/SVGImage.cpp:
2820         (WebCore::SVGImage::containerSize):
2821         * xml/XMLErrors.cpp: If an error occurs in a stand alone SVG file, we create
2822             an XHTML document with the error message and append the SVG file.
2823             This SVG file now follows the CSS sizing behavior as inline SVG.
2824             Therefore, we need to set width and height to 100% explicitly.
2825         (WebCore::XMLErrors::insertErrorMessageBlock):
2826
2827 2014-05-05  Ryuan Choi  <ryuan.choi@samsung.com>
2828
2829         [EFL] REGRESSION(167145): JavaScript media controls are broken
2830         https://bugs.webkit.org/show_bug.cgi?id=131573
2831
2832         Reviewed by Brent Fulgham.
2833
2834         * PlatformEfl.cmake: Add the localized strings file to the list of user agent scripts.
2835         * platform/efl/RenderThemeEfl.cpp:
2836         (WebCore::RenderThemeEfl::mediaControlsScript): Include the localized strings file in the script body.
2837
2838 2014-05-05  Jeremy Jones  <jeremyj@apple.com>
2839
2840         Implement scan backward and forward in video fullscreen.
2841         https://bugs.webkit.org/show_bug.cgi?id=132517
2842
2843         Reviewed by Simon Fraser.
2844
2845         Implement scanning forward and backward. This implements methods in 
2846         WebAVPlayerController and forwards them through WebVideoFullscreenModelMediaElement
2847         and on to HTMLMediaElement.
2848
2849         * WebCore.exp.in: necessary exports.
2850         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2851         (-[WebAVPlayerController seekToTime:]):
2852         Use fastSeek in this case.
2853         (-[WebAVPlayerController canScanForward]): If you can play, you can scan.
2854         (+[WebAVPlayerController keyPathsForValuesAffectingCanScanForward]): ditto
2855         (-[WebAVPlayerController beginScanningForward:]): ditto
2856         (-[WebAVPlayerController endScanningForward:]): ditto
2857         (-[WebAVPlayerController canScanBackward]): If you can play, you can scan.
2858         (+[WebAVPlayerController keyPathsForValuesAffectingCanScanBackward]): ditto
2859         (-[WebAVPlayerController beginScanningBackward:]): ditto
2860         (-[WebAVPlayerController endScanningBackward:]): ditto
2861         (-[WebAVPlayerController canSeekToBeginning]):
2862         This looks at seekableRanges to determine if any seeking is possible.
2863         (+[WebAVPlayerController keyPathsForValuesAffectingCanSeekToBeginning]):
2864         depends on seekableRanges.
2865         (-[WebAVPlayerController seekToBeginning:]): seek to -ininity
2866         (-[WebAVPlayerController canSeekToEnd]):
2867         This looks at seekableRanges to determine if any seeking is possible.
2868         (+[WebAVPlayerController keyPathsForValuesAffectingCanSeekToEnd]):
2869         depends on seekableRanges.
2870         (-[WebAVPlayerController seekToEnd:]): seek to INFINITY.
2871         * platform/ios/WebVideoFullscreenModel.h:
2872         Add 4 new functions.
2873         * platform/ios/WebVideoFullscreenModelMediaElement.h:
2874         ditto
2875         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
2876         (WebVideoFullscreenModelMediaElement::fastSeek): forwards to HTMLMediaEelement
2877         (WebVideoFullscreenModelMediaElement::beginScanningForward): forwards to HTMLMediaEelement
2878         (WebVideoFullscreenModelMediaElement::beginScanningBackward): forwards to HTMLMediaEelement
2879         (WebVideoFullscreenModelMediaElement::endScanning): forwards to HTMLMediaEelement
2880
2881 2014-05-05  Benjamin Poulain  <bpoulain@apple.com>
2882
2883         [iOS][WK2] Prefetch DNS hostnames on tap highlight
2884         https://bugs.webkit.org/show_bug.cgi?id=132509
2885
2886         Reviewed by Alexey Proskuryakov.
2887
2888         * WebCore.exp.in:
2889         * dom/Element.cpp:
2890         * dom/Element.h:
2891         (WebCore::Element::absoluteLinkURL()):
2892
2893 2014-05-05  Simon Fraser  <simon.fraser@apple.com>
2894
2895         [iOS WK2] Flickery scrolling inside overflow-scrolling: touch
2896         https://bugs.webkit.org/show_bug.cgi?id=132591
2897         <rdar://problem/16760466>
2898
2899         Reviewed by Tim Horton.
2900
2901         Avoid triggering layer tree commits that touch the layer's boundsOrigin
2902         while the user is scrolling in the UI process.
2903         
2904         Fix the WKOverflowScrollViewDelegate to pass along an "inUserInteration"
2905         flag to the ScrollingTree to say that we're in the middle of a user interaction
2906         (and also to send a final non-interactive update). That gets passed along
2907         to the web process, and turned into "SyncScrollingLayerPosition" update.
2908         AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll() consults
2909         this, and uses it to set a flag on the ScrollableArea to say that the scroll
2910         is a user scroll.
2911         
2912         RenderLayerBacking then makes use of this (in existing code, shared with WK1)
2913         to avoid triggering layer bounds setting. Instead, it now just calls syncBoundsOrigin(),
2914         which updates the GraphicsLayer without touching platform layers. This is necessary
2915         so that GraphicsLayer geometry is up-to-date (used for tiled layer visibility
2916         computations).
2917         
2918         Finally, a hack in GraphicsLayerCA::computeVisibleRect() is conditionalized
2919         for WebKit1 by checking the type of platform layer.
2920
2921         * WebCore.exp.in:
2922         * page/scrolling/AsyncScrollingCoordinator.cpp:
2923         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
2924         * page/scrolling/ScrollingTree.cpp:
2925         (WebCore::ScrollingTree::scrollPositionChangedViaDelegatedScrolling):
2926         * page/scrolling/ScrollingTree.h:
2927         * platform/graphics/GraphicsLayer.h:
2928         (WebCore::GraphicsLayer::syncBoundsOrigin):
2929         * platform/graphics/ca/GraphicsLayerCA.cpp:
2930         (WebCore::GraphicsLayerCA::computeVisibleRect):
2931         * rendering/RenderLayerBacking.cpp:
2932         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2933
2934 2014-05-05  Alexey Proskuryakov  <ap@apple.com>
2935
2936         Stop using BlobData on client side
2937         https://bugs.webkit.org/show_bug.cgi?id=132582
2938
2939         Reviewed by Sam Weinig.
2940
2941         Blob registration now uses either a single file path, or a vector of much simpler
2942         BlobPart objects, not an array with arbitrarily sliced blobs or files, which can't happen.
2943
2944         * Modules/websockets/WebSocket.cpp:(WebCore::WebSocket::didReceiveBinaryData):
2945         Use a new simpler Blob constructor.
2946
2947         * WebCore.xcodeproj/project.pbxproj: Added BlobPart, removed BlobRegistrationData.
2948
2949         * bindings/js/JSBlobCustom.cpp: (WebCore::JSBlobConstructor::constructJSBlob):
2950         Use Vector<BlobPart> instead of BlobData (1 line of code instead of 5).
2951
2952         * dom/DataTransfer.cpp: (WebCore::DataTransfer::hasFileOfType): Updated for
2953         File::contentTypeFromFilePathOrName rename.
2954
2955         * fileapi/Blob.cpp: (WebCore::Blob::Blob):
2956         * fileapi/Blob.h:
2957         (WebCore::Blob::create):
2958         (WebCore::Blob::deserialize):
2959         * fileapi/File.cpp:
2960         (WebCore::File::File):
2961         (WebCore::File::contentTypeFromFilePathOrName):
2962         (WebCore::createBlobDataForFileWithType): Deleted.
2963         (WebCore::createBlobDataForFile): Deleted.
2964         (WebCore::createBlobDataForFileWithName): Deleted.
2965         (WebCore::File::contentTypeFromFilePath): Deleted.
2966         * fileapi/File.h: (WebCore::File::deserialize): Deleted.
2967         Added and updated constructors to not use BlobData. Changed special case constructors
2968         to use name tags instead of non-enforced comments.
2969
2970         * fileapi/ThreadableBlobRegistry.h:
2971         * fileapi/ThreadableBlobRegistry.cpp:
2972         (WebCore::BlobRegistryContext::BlobRegistryContext): Updated with new data members
2973         that were split out of BlobData.
2974         (WebCore::ThreadableBlobRegistry::registerFileBlobURL): Added.
2975         (WebCore::ThreadableBlobRegistry::registerBlobURL): Updated to pass Content-Type
2976         explicitly, as it's no longer hidden in BlobData.
2977
2978         * fileapi/WebKitBlobBuilder.h:
2979         * fileapi/WebKitBlobBuilder.cpp:
2980         (WebCore::BlobBuilder::append):
2981         (WebCore::BlobBuilder::finalize):
2982         (WebCore::BlobBuilder::appendBytesData): Deleted.
2983         Updated to use BlobPart. There is no longer any need to special case Files,
2984         the registry takes care of that.
2985
2986         * platform/network/BlobData.h:
2987         * platform/network/BlobData.cpp:
2988         (WebCore::BlobDataItem::detachFromCurrentThread): Deleted.
2989         (WebCore::BlobData::detachFromCurrentThread): Deleted.
2990         BlobData will only be used on main thread by the registry.
2991
2992         * platform/network/BlobPart.h: Added. A new class to encapsulate a list of blobs
2993         that are combined into a new blob, as exposed to JS via Blob constructor.
2994
2995         * platform/network/BlobRegistry.h:
2996         * platform/network/BlobRegistryImpl.cpp:
2997         (WebCore::BlobRegistryImpl::registerFileBlobURL):
2998         (WebCore::BlobRegistryImpl::registerBlobURL):
2999         * platform/network/BlobRegistryImpl.h:
3000         Updated for the new registration methods. We no longer have arbitrary BlobDatas
3001         coming in.
3002
3003         * platform/network/FormData.cpp: Don't include BlobData for now (but really,
3004         BlobStorageData is the same thing, and they will be merged soon).
3005         Unfortunately, FormData is used by both client and registry side, and there is
3006         no clear delimitation at the time.
3007  
3008         * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseBlob): Use the new simpler
3009         way to create a Blob.
3010
3011 2014-05-05  Benjamin Poulain  <benjamin@webkit.org>
3012
3013         Clean up Image Document and tweak the layout and viewport
3014         https://bugs.webkit.org/show_bug.cgi?id=132552
3015
3016         Reviewed by Sam Weinig.
3017
3018         The #ifdef in every function was making quite a mess. A lot of that code does
3019         not make sense on iOS.
3020
3021         This patch make a clean split between mouse related stuff and iOS.
3022
3023         Also:
3024         -Change the viewport to be only width based, and avoid scaling in portrait.
3025         -Center the image horizontally in the view.
3026
3027         * html/ImageDocument.cpp:
3028         (WebCore::ImageDocument::ImageDocument):
3029         (WebCore::ImageDocument::createDocumentStructure):
3030         (WebCore::ImageDocument::imageUpdated):
3031         (WebCore::ImageDocument::scale):
3032         (WebCore::ImageDocument::resizeImageToFit):
3033         (WebCore::ImageDocument::imageFitsInWindow):
3034         (WebCore::ImageDocument::windowSizeChanged):
3035         (WebCore::ImageDocument::imageClicked):
3036         * html/ImageDocument.h:
3037
3038 2014-05-05  Beth Dakin  <bdakin@apple.com>
3039
3040         Need a delegate that informs the UI process when the page's pin state changes
3041         https://bugs.webkit.org/show_bug.cgi?id=132583
3042         -and corresponding-
3043         <rdar://problem/16806231>
3044
3045         Reviewed by Anders Carlsson.
3046
3047         We should default all of these pin-state value to true.
3048         * page/scrolling/ScrollingTree.cpp:
3049         (WebCore::ScrollingTree::ScrollingTree):
3050
3051 2014-05-05  Christophe Dumez  <ch.dumez@samsung.com>
3052
3053         Named element cache can become invalid during HTMLCollection::updateNamedElementCache()
3054         https://bugs.webkit.org/show_bug.cgi?id=132575
3055
3056         Reviewed by Ryosuke Niwa.
3057
3058         Make sure the named element cache object stays valid in
3059         HTMLCollection::updateNamedElementCache() while it is populating it.
3060
3061         The method was previously creating and setting the cache first, and then start
3062         traversing the DOM tree to populate it. As a consequence, hasNamedElementCache()
3063         would start returning true before the cache is actually populated.
3064         The issue is that finding matches in the DOM tree can cause
3065         HTMLCollection::invalidateCache() to be called under certain circumstances and
3066         thus the named element cache object can become invalid while
3067         updateNamedElementCache() is populating it.
3068
3069         To avoid the issue, this patch updates updateNamedElementCache() so that the
3070         named element cache map is set *after* traversing the DOM tree. This way,
3071         hasNamedElementCache() returns false while the cache is being populated and
3072         there is no chance of it being invalidated too early.
3073
3074         Test: fast/dom/htmlcollection-selectedOptions-namedItem-crash.html
3075
3076         * html/HTMLCollection.cpp:
3077         (WebCore::HTMLCollection::updateNamedElementCache):
3078         * html/HTMLCollection.h:
3079         (WebCore::HTMLCollection::setNameItemCache):
3080         (WebCore::HTMLCollection::createNameItemCache): Deleted.
3081         * html/HTMLFormControlsCollection.cpp:
3082         (WebCore::HTMLFormControlsCollection::updateNamedElementCache):
3083
3084 2014-05-05  Benjamin Poulain  <benjamin@webkit.org>
3085
3086         [iOS][WK2] Special case ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture() for image documents
3087         https://bugs.webkit.org/show_bug.cgi?id=132553
3088
3089         Reviewed by Tim Horton.
3090
3091         * WebCore.exp.in:
3092         * WebCore.xcodeproj/project.pbxproj:
3093         * html/ImageDocument.cpp:
3094         (WebCore::ImageDocument::imageElement):
3095         * html/ImageDocument.h:
3096
3097 2014-05-05  Ion Rosca  <rosca@adobe.com>
3098
3099         [CSS Blending] Webkit-blend-mode fails for accelerated parent with overflow:hidden
3100         https://bugs.webkit.org/show_bug.cgi?id=126160
3101
3102         When the isolating layer has overflow:hidden, it will create a descendant clipping layer
3103         (m_childContainmentLayer), which will restrict the bleding layer to reading the backdrop
3104         from the isolating layer.
3105         The solution in this patch is to forbid the isolating layer to create a descendant clipping
3106         layer and make all the children to get their own ancestor clipping layers instead.
3107
3108         Reviewed by Dean Jackson.
3109
3110         Tests: css3/compositing/blend-mode-accelerated-parent-overflow-hidden.html
3111                css3/compositing/blend-mode-clip-accelerated-blending-canvas.html
3112                css3/compositing/blend-mode-clip-accelerated-blending-child.html
3113                css3/compositing/blend-mode-clip-accelerated-blending-double.html
3114                css3/compositing/blend-mode-clip-accelerated-blending-with-siblings.html
3115                css3/compositing/blend-mode-clip-accelerated-transformed-blending.html
3116                css3/compositing/blend-mode-clip-rect-accelerated-blending.html
3117
3118         * rendering/RenderLayerBacking.cpp:
3119         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3120         when the compositing ancestor isolates blending we take it into account for computing
3121         the clipping rect for this layer, because it was not allowed to create the descendant
3122         clipping layer. 
3123         * rendering/RenderLayerCompositor.cpp:
3124         (WebCore::RenderLayerCompositor::clippedByAncestor):
3125         when the compositing ancestor isolates blending we decide if a layer is clipped by ancestor
3126         by computing the clipping rect taking into account all the ancestors up to and including
3127         the compositing ancestor.
3128         (WebCore::RenderLayerCompositor::clipsCompositingDescendants):
3129         if a layer isolates blending, it is not allowed to create a descendant clipping layer.
3130
3131 2014-05-05  Dirk Schulze  <krit@webkit.org>
3132
3133         AX: tabindex support in SVG2
3134         https://bugs.webkit.org/show_bug.cgi?id=130212
3135
3136         Reviewed by Chris Fleizach.
3137
3138         The patch is mainly based on a patch for Blink by Erik Dahlström.
3139         https://src.chromium.org/viewvc/blink?revision=172964&view=revision
3140
3141         It adds support for tabindex to SVG by reusing the HTML code.
3142
3143         Spec: https://svgwg.org/svg2-draft/interact.html#sequential-focus-navigation-and-the-tabindex-attribute
3144         IDL attribute: https://svgwg.org/svg2-draft/types.html#__svg__SVGElement__tabIndex
3145
3146         Test: svg/custom/tabindex-order.html
3147
3148         * dom/Element.cpp:
3149         (WebCore::Element::setTabIndex): Moved from HTMLElement and shared with all elements.
3150         * dom/Element.h:
3151         * html/HTMLAnchorElement.cpp: Remove outdated comment.
3152         (WebCore::HTMLAnchorElement::canStartSelection):
3153         * html/HTMLElement.cpp:
3154         (WebCore::HTMLElement::setTabIndex): Deleted.
3155         * html/HTMLElement.h:
3156         * svg/SVGAElement.cpp: Uses the same logic as HTMLAnchorElement now.
3157         (WebCore::SVGAElement::tabIndex):
3158         (WebCore::SVGAElement::supportsFocus):
3159         (WebCore::SVGAElement::isMouseFocusable):
3160         (WebCore::SVGAElement::isKeyboardFocusable):
3161         (WebCore::SVGAElement::canStartSelection):
3162         * svg/SVGAElement.h:
3163         * svg/SVGCircleElement.h:
3164         * svg/SVGClipPathElement.h:
3165         * svg/SVGDefsElement.h:
3166         * svg/SVGElement.cpp:
3167         (WebCore::SVGElement::tabIndex): Return -1 if element can not be focused.
3168         (WebCore::SVGElement::parseAttribute):
3169         (WebCore::SVGElement::isMouseFocusable):
3170         (WebCore::SVGElement::isKeyboardFocusable): Deleted. Use function on Element.
3171         * svg/SVGElement.h:
3172         * svg/SVGElement.idl:
3173         * svg/SVGEllipseElement.h:
3174         * svg/SVGGElement.h:
3175         * svg/SVGGraphicsElement.h: Remove supportsFocus() from inheriting functions.
3176             Don't just return true. SVG elements should not be focusable by default.
3177             Instead check if tabindex was set explicitly.
3178         * svg/SVGImageElement.h:
3179         * svg/SVGLineElement.h:
3180         * svg/SVGPathElement.h:
3181         * svg/SVGPolyElement.h:
3182         * svg/SVGRectElement.h:
3183         * svg/SVGSVGElement.h:
3184         * svg/SVGSwitchElement.h:
3185         * svg/SVGSymbolElement.h:
3186         * svg/SVGTextElement.h:
3187
3188 2014-05-05  Jeremy Jones  <jeremyj@apple.com>
3189
3190         Implement beginScrubbing and endScrubbing for video fullscreen.
3191         https://bugs.webkit.org/show_bug.cgi?id=132520
3192
3193         Reviewed by Eric Carlson.
3194
3195         Plumb through beginScrubbing and endScrubbing from AVKit down to HTMLMediaElement.
3196         This keeps the playback state consistent while scrubbing and allows playback state
3197         to return to the original state when scrubbing is complete.
3198
3199         * WebCore.exp.in:
3200         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3201         (-[WebAVPlayerController beginScrubbing:]):
3202         (-[WebAVPlayerController endScrubbing:]):
3203         * platform/ios/WebVideoFullscreenModel.h:
3204         * platform/ios/WebVideoFullscreenModelMediaElement.h:
3205         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
3206         (WebVideoFullscreenModelMediaElement::beginScrubbing):
3207         (WebVideoFullscreenModelMediaElement::endScrubbing):
3208
3209 2014-05-05  Tim Horton  <timothy_horton@apple.com>
3210
3211         More long hangs under IOSurfacePool::evict
3212         https://bugs.webkit.org/show_bug.cgi?id=132576
3213         <rdar://problem/16769469>
3214
3215         Reviewed by Simon Fraser.
3216
3217         * platform/graphics/cg/IOSurfacePool.cpp:
3218         (WebCore::IOSurfacePool::evict):
3219         If the pool is too full, we should be evicting in-use surfaces
3220         even if the size of the in-use surfaces has dropped below maximumInUseBytes,
3221         otherwise we can get stuck in an infinite loop with 0 cached surfaces
3222         and 1+ in-use surfaces.
3223
3224 2014-05-05  Radu Stavila  <stavila@adobe.com>
3225
3226         [CSS Regions] Remove regionLayoutUpdate event
3227         https://bugs.webkit.org/show_bug.cgi?id=132564
3228
3229         Reviewed by Simon Fraser.
3230
3231         The regionLayoutUpdate event was removed from the regions spec and was replaced by two other events: 
3232         regionOversetChange and regionFragmentChange.
3233
3234         No new tests needed, this patch removes a feature.
3235
3236         * dom/EventNames.h:
3237         * dom/WebKitNamedFlow.cpp:
3238         (WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent): Deleted.
3239         * dom/WebKitNamedFlow.h:
3240         * inspector/InspectorCSSAgent.cpp:
3241         (WebCore::InspectorCSSAgent::resetNonPersistentData):
3242         (WebCore::InspectorCSSAgent::willRemoveNamedFlow):
3243         (WebCore::UpdateRegionLayoutTask::UpdateRegionLayoutTask): Deleted.
3244         (WebCore::UpdateRegionLayoutTask::scheduleFor): Deleted.
3245         (WebCore::UpdateRegionLayoutTask::unschedule): Deleted.
3246         (WebCore::UpdateRegionLayoutTask::reset): Deleted.
3247         (WebCore::UpdateRegionLayoutTask::timerFired): Deleted.
3248         (WebCore::InspectorCSSAgent::didUpdateRegionLayout): Deleted.
3249         (WebCore::InspectorCSSAgent::regionLayoutUpdated): Deleted.
3250         * inspector/InspectorCSSAgent.h:
3251         * inspector/InspectorInstrumentation.cpp:
3252         (WebCore::InspectorInstrumentation::didUpdateRegionLayoutImpl): Deleted.
3253         * inspector/InspectorInstrumentation.h:
3254         (WebCore::InspectorInstrumentation::didUpdateRegionLayout): Deleted.
3255         * inspector/protocol/CSS.json:
3256         * rendering/RenderNamedFlowFragment.cpp:
3257         (WebCore::RenderNamedFlowFragment::updateOversetState):
3258         * rendering/RenderNamedFlowThread.cpp:
3259         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
3260         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
3261         (WebCore::RenderNamedFlowThread::layout):
3262         (WebCore::RenderNamedFlowThread::dispatchRegionLayoutUpdateEventIfNeeded): Deleted.
3263         (WebCore::RenderNamedFlowThread::regionLayoutUpdateEventTimerFired): Deleted.
3264         * rendering/RenderNamedFlowThread.h:
3265
3266 2014-05-05  Rik Cabanier  <cabanier@adobe.com>
3267
3268         Enhance IDL compiler so it supports unrestricted float and double
3269         https://bugs.webkit.org/show_bug.cgi?id=132460
3270
3271         Reviewed by Dirk Schulze.
3272
3273         Updated IDL compiler so it supports unrestricted types.
3274         Also updated the IDL files so they use unrestricted float and
3275         double.
3276
3277         Tests:
3278         * canvas/philip/tests/2d.gradient.linear.nonfinite.html:
3279         * canvas/philip/tests/2d.gradient.object.invalidoffset.html:
3280         * canvas/philip/tests/2d.gradient.radial.nonfinite.html:
3281         * canvas/philip/tests/2d.imageData.get.nonfinite.html:
3282         * canvas/philip/tests/2d.imageData.put.nonfinite.html:
3283         * canvas/philip/tests/2d.missingargs.html:
3284         * fast/canvas/canvas-getImageData-invalid-expected.txt:
3285         * fast/canvas/canvas-putImageData-expected.txt:
3286         * fast/canvas/canvas-putImageData.js:
3287
3288         * Modules/battery/BatteryManager.idl:
3289         * Modules/gamepad/Gamepad.idl:
3290         * Modules/geolocation/Coordinates.idl:
3291         * Modules/mediasource/MediaSource.idl:
3292         * Modules/mediasource/SourceBuffer.idl:
3293         * Modules/mediasource/VideoPlaybackQuality.idl:
3294         * Modules/mediastream/MediaSourceStates.idl:
3295         * Modules/proximity/DeviceProximityEvent.idl:
3296         * Modules/speech/SpeechGrammar.idl:
3297         * Modules/speech/SpeechGrammarList.idl:
3298         * Modules/speech/SpeechRecognitionAlternative.idl:
3299         * Modules/speech/SpeechSynthesisEvent.idl:
3300         * Modules/speech/SpeechSynthesisUtterance.idl:
3301         * Modules/webaudio/AnalyserNode.idl:
3302         * Modules/webaudio/AudioBuffer.idl:
3303         * Modules/webaudio/AudioBufferSourceNode.idl:
3304         * Modules/webaudio/AudioContext.idl:
3305         * Modules/webaudio/AudioListener.idl:
3306         * Modules/webaudio/AudioParam.idl:
3307         * Modules/webaudio/AudioProcessingEvent.idl:
3308         * Modules/webaudio/OfflineAudioContext.idl:
3309         * Modules/webaudio/OscillatorNode.idl:
3310         * Modules/webaudio/PannerNode.idl:
3311         * bindings/scripts/CodeGenerator.pm:
3312         * bindings/scripts/CodeGeneratorGObject.pm:
3313         (GetGValueTypeName):
3314         (GetGlibTypeName):
3315         * bindings/scripts/CodeGeneratorJS.pm:
3316         (GenerateImplementation):
3317         (GenerateParametersCheck):
3318         (JSValueToNative):
3319         * bindings/scripts/CodeGeneratorObjC.pm:
3320         (GetObjCType):
3321         (GenerateHeader):
3322         * bindings/scripts/test/TestObj.idl:
3323         * bindings/scripts/test/TestTypedefs.idl:
3324         * css/CSSPrimitiveValue.idl:
3325         * css/WebKitCSSMatrix.idl:
3326         * dom/ClientRect.idl:
3327         * dom/DeviceMotionEvent.idl:
3328         * dom/DeviceOrientationEvent.idl:
3329         * dom/Document.idl:
3330         * dom/RequestAnimationFrameCallback.idl:
3331         * dom/Touch.idl:
3332         * dom/TransitionEvent.idl:
3333         * dom/WebKitAnimationEvent.idl:
3334         * dom/WebKitTransitionEvent.idl:
3335         * dom/WheelEvent.idl:
3336         * html/HTMLInputElement.idl:
3337         * html/HTMLMediaElement.idl:
3338         * html/HTMLMeterElement.idl:
3339         * html/HTMLProgressElement.idl:
3340         * html/MediaController.idl:
3341         * html/TextMetrics.idl:
3342         * html/TimeRanges.idl:
3343         * html/canvas/CanvasRenderingContext2D.idl:
3344         * html/canvas/WebGLRenderingContext.idl:
3345         * html/track/DataCue.idl:
3346         * html/track/TextTrackCue.idl:
3347         * html/track/VTTCue.idl:
3348         * html/track/VTTRegion.idl:
3349         * inspector/InspectorFrontendHost.idl:
3350         * inspector/ScriptProfile.idl:
3351         * inspector/ScriptProfileNode.idl:
3352         * page/DOMWindow.idl:
3353         * page/Performance.idl:
3354         * page/PerformanceEntry.idl:
3355         * page/PerformanceResourceTiming.idl:
3356         * page/SpeechInputResult.idl:
3357         * page/WebKitPoint.idl:
3358         * svg/SVGAngle.idl:
3359         * svg/SVGAnimatedNumber.idl:
3360         * svg/SVGAnimationElement.idl:
3361         * svg/SVGFEDropShadowElement.idl:
3362         * svg/SVGFEGaussianBlurElement.idl:
3363         * svg/SVGFEMorphologyElement.idl:
3364         * svg/SVGGlyphRefElement.idl:
3365         * svg/SVGLength.idl:
3366         * svg/SVGMatrix.idl:
3367         * svg/SVGNumber.idl:
3368         * svg/SVGPathElement.idl:
3369         * svg/SVGPathSegArcAbs.idl:
3370         * svg/SVGPathSegArcRel.idl:
3371         * svg/SVGPathSegCurvetoCubicAbs.idl:
3372         * svg/SVGPathSegCurvetoCubicRel.idl:
3373         * svg/SVGPathSegCurvetoCubicSmoothAbs.idl:
3374         * svg/SVGPathSegCurvetoCubicSmoothRel.idl:
3375         * svg/SVGPathSegCurvetoQuadraticAbs.idl:
3376         * svg/SVGPathSegCurvetoQuadraticRel.idl:
3377         * svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl:
3378         * svg/SVGPathSegCurvetoQuadraticSmoothRel.idl:
3379         * svg/SVGPathSegLinetoAbs.idl:
3380         * svg/SVGPathSegLinetoHorizontalAbs.idl:
3381         * svg/SVGPathSegLinetoHorizontalRel.idl:
3382         * svg/SVGPathSegLinetoRel.idl:
3383         * svg/SVGPathSegLinetoVerticalAbs.idl:
3384         * svg/SVGPathSegLinetoVerticalRel.idl:
3385         * svg/SVGPathSegMovetoAbs.idl:
3386         * svg/SVGPathSegMovetoRel.idl:
3387         * svg/SVGPoint.idl:
3388         * svg/SVGRect.idl:
3389         * svg/SVGSVGElement.idl:
3390         * svg/SVGTextContentElement.idl:
3391         * svg/SVGTransform.idl:
3392         * svg/SVGZoomEvent.idl:
3393         * testing/InternalSettings.idl:
3394         * testing/Internals.idl:
3395         * xml/XPathResult.idl:
3396
3397 2014-05-05  Tim Horton  <timothy_horton@apple.com>
3398
3399         Use a layer delegate instead of web_disableAllActions wherever possible
3400         https://bugs.webkit.org/show_bug.cgi?id=132560
3401         <rdar://problem/16459284>
3402
3403         Reviewed by Simon Fraser.
3404
3405         * WebCore.exp.in:
3406         * WebCore.xcodeproj/project.pbxproj:
3407         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3408         (PlatformCALayerMac::commonInit):
3409         If we own the platform layer, set its delegate to the action-disabling WebActionDisablingCALayerDelegate.
3410         If we don't, its actual owner might want to control the delegate, so continue using web_disableAllActions.
3411
3412         * platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h: Added.
3413         * platform/graphics/cocoa/WebActionDisablingCALayerDelegate.mm: Added.
3414         (+[WebActionDisablingCALayerDelegate shared]):
3415         (-[WebActionDisablingCALayerDelegate actionForLayer:forKey:]):
3416         Add a class that can act as the delegate of a CALayer, and disables all actions.
3417
3418         * platform/graphics/cocoa/WebCoreCALayerExtras.h: Renamed from Source/WebCore/platform/graphics/mac/WebCoreCALayerExtras.h.
3419         * platform/graphics/cocoa/WebCoreCALayerExtras.mm: Renamed from Source/WebCore/platform/graphics/mac/WebCoreCALayerExtras.mm.
3420         (-[CALayer web_disableAllActions]):
3421         Move WebCoreCALayerExtras from mac/ to cocoa/.
3422
3423 2014-05-05  Martin Hock  <mhock@apple.com>
3424
3425         Session-aware plugin autostart data
3426         https://bugs.webkit.org/show_bug.cgi?id=131758
3427         <rdar://problem/15906540>
3428
3429         Reviewed by Alexey Proskuryakov.
3430
3431         * html/HTMLPlugInImageElement.cpp:
3432         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
3433         * page/PlugInClient.h:
3434
3435 2014-05-05  Radu Stavila  <stavila@adobe.com>
3436
3437         [CSS Regions] Elements with overflow:auto are not painted inside regions when following a float
3438         https://bugs.webkit.org/show_bug.cgi?id=131161
3439
3440         Reviewed by David Hyatt.
3441
3442         When a float-avoiding element (such as overflow:auto) is flowed into a flow thread after a float, its 
3443         logical left is not set on its frameRect or its layer's topLeft, but is instead kept in its RenderBoxRegionInfo
3444         structure. In some situation, this causes paint rejection to kick-in because intersecting the layer's rect
3445         (which DOESN'T contain the logical left from the region info object) with the computed background rect 
3446         (which contains the logical left from the region info object) results in an empty rect.
3447
3448         Test: fast/regions/overflow-auto-after-float.html
3449
3450         * rendering/RenderLayer.cpp:
3451         (WebCore::RenderLayer::calculateClipRects):
3452
3453 2014-05-05  Andrei Bucur  <abucur@adobe.com>
3454
3455         [CSSRegions] Slider displayed wrong in regions
3456         https://bugs.webkit.org/show_bug.cgi?id=132243
3457
3458         Reviewed by Mihnea Ovidenie.
3459
3460         In case a box didn't have a range, getRegionRangeForBox was searching for
3461         the top-most unplittable ancestor. This is not correct in every case. It's
3462         possible to have a box with range that has children without ranges (e.g. an
3463         absolutely positioned inline box with shadow descendants).
3464
3465         I've modified getRegionRangeForBox to search for the first ancestor that
3466         has a cached range and use that instead of looking for an unsplittable box.
3467         The range of the box is the region at the top of the box, clamped by the
3468         range of the ancestor. This will be correct all the time once all the layout
3469         systems are region range aware and are able to cache it.
3470
3471         Test: fast/regions/positioned-slider-in-regions.html
3472
3473         * rendering/RenderFlowThread.cpp:
3474         (WebCore::RenderFlowThread::hasRegionRangeForBox):
3475         (WebCore::RenderFlowThread::getRegionRangeForBox):
3476         * rendering/RenderFlowThread.h:
3477
3478 2014-05-05  Andrei Bucur  <abucur@adobe.com>
3479
3480         [CSS Regions] ASSERT when hovering over region
3481         https://bugs.webkit.org/show_bug.cgi?id=128809
3482
3483         Reviewed by Mihnea Ovidenie.
3484
3485         There's no point in hit-testing a box for a region if it's not contained inside
3486         that region.
3487
3488         Test: fast/regions/hit-test-box-non-containing-region.html
3489
3490         * rendering/RenderBox.cpp:
3491         (WebCore::RenderBox::nodeAtPoint):
3492
3493 2014-05-04  Andreas Kling  <akling@apple.com>
3494
3495         Optimize JSRopeString for resolving directly to AtomicString.
3496         <https://webkit.org/b/132548>
3497
3498         Add two bindings generator attributes for parameters to influence
3499         the way that JS rope strings are resolved:
3500
3501         - AtomicString
3502
3503             Generates code that avoids allocating a new StringImpl if there
3504             is already an existing AtomicString we can reuse.
3505
3506         - RequiresExistingAtomicString
3507
3508             Generates code that fails immediately if the provided string
3509             is not found in the AtomicString table. This is now used for
3510             document.getElementById(), and works because any existing ID
3511             is guaranteed to be in the table.
3512
3513         Reviewed by Filip Pizlo.
3514
3515         * bindings/scripts/CodeGeneratorJS.pm:
3516         (GenerateParametersCheck):
3517         (JSValueToNative):
3518         * bindings/scripts/IDLAttributes.txt:
3519         * dom/Document.idl:
3520
3521 2014-05-04  Simon Fraser  <simon.fraser@apple.com>
3522
3523         [iOS WK2] Compositing layers in iframes are misplaced
3524         https://bugs.webkit.org/show_bug.cgi?id=132554
3525         <rdar://problem/16203027>
3526
3527         Reviewed by Benjamin Poulain.
3528
3529         Have requiresScrollLayer() only consider frameView.delegatesScrolling()
3530         for the main frame, so that iframes get scroll layers (even though they
3531         will never scroll), so that the rest of geometry code works as on other
3532         platforms.
3533
3534         * rendering/RenderLayerCompositor.cpp:
3535         (WebCore::RenderLayerCompositor::requiresScrollLayer):
3536
3537 2014-05-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3538
3539         Use std::unique_ptr in m_taskTimer of Notification class
3540         https://bugs.webkit.org/show_bug.cgi?id=132544
3541
3542         Reviewed by Andreas Kling.
3543
3544         No new tests, no behavior change.
3545
3546         * Modules/notifications/Notification.cpp:
3547         (WebCore::Notification::Notification):
3548         * Modules/notifications/Notification.h: Use std::unique_ptr instead of OwnPtr.
3549
3550 2014-05-04  Tim Horton  <timothy_horton@apple.com>
3551
3552         Long hangs under IOSurfacePool::evict
3553         https://bugs.webkit.org/show_bug.cgi?id=132549
3554         <rdar://problem/16769469>
3555
3556         Reviewed by Simon Fraser.
3557
3558         * platform/graphics/cg/IOSurfacePool.cpp:
3559         (WebCore::IOSurfacePool::willAddSurface):
3560         Run eviction before adding the new surface to m_bytesCached/m_inUseBytesCached.
3561         We use the additionalSize parameter to make space for the new surface.
3562
3563         (WebCore::IOSurfacePool::evict):
3564         If we want to free up the entire pool, we can do so by throwing away everything.
3565         This also avoids an underflow if additionalSize is larger than the maximum pool size.
3566
3567 2014-05-04  Pratik Solanki  <psolanki@apple.com>
3568
3569         Shortcircuit shouldUseCredentialStorage callback
3570         https://bugs.webkit.org/show_bug.cgi?id=132308
3571         <rdar://problem/16806708>
3572
3573         Reviewed by Alexey Proskuryakov.
3574
3575         If we are going to return true from the shouldUseCredentialStorage callback then we don't
3576         really need to have CFNetwork/Foundation call us. We can just disable the callback and
3577         CFNetwork will assume true. Add a separate subclass that implements this callback when we
3578         need to return false. We can also eliminate the corresponding async callbacks. This avoids
3579         pingponging between dispatch queue and main thread in the common case.
3580
3581         No new tests because no change in functionality.
3582
3583         * WebCore.exp.in:
3584         * platform/network/ResourceHandle.cpp:
3585         * platform/network/ResourceHandle.h:
3586         * platform/network/ResourceHandleClient.cpp:
3587         * platform/network/ResourceHandleClient.h:
3588         * platform/network/cf/ResourceHandleCFNet.cpp:
3589         (WebCore::ResourceHandle::createCFURLConnection):
3590         (WebCore::ResourceHandle::shouldUseCredentialStorage):
3591         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
3592         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
3593         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::shouldUseCredentialStorage):
3594         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
3595         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
3596         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
3597         * platform/network/mac/ResourceHandleMac.mm:
3598         (WebCore::ResourceHandle::start):
3599         (WebCore::ResourceHandle::makeDelegate):
3600         (WebCore::ResourceHandle::delegate):
3601         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
3602         (WebCore::ResourceHandle::shouldUseCredentialStorage):
3603         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
3604         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
3605         (-[WebCoreResourceHandleWithCredentialStorageAsOperationQueueDelegate connectionShouldUseCredentialStorage:]):
3606         * platform/network/soup/ResourceHandleSoup.cpp:
3607
3608 2014-05-04  Brent Fulgham  <bfulgham@apple.com>
3609
3610         [iOS] deviceScaleFactor is being double-applied when rendering captions in full screen mode 
3611         https://bugs.webkit.org/show_bug.cgi?id=132481
3612         <rdar://problem/16507482>
3613
3614         Reviewed by Jer Noble.
3615
3616         Add a new 'syncTextTrackBounds' method (and relaying functions) to keep the text track container in sync
3617         with changes to the video player's display layer.
3618
3619         * html/HTMLMediaElement.cpp:
3620         (WebCore::HTMLMediaElement::syncTextTrackBounds: Added.
3621         * html/HTMLMediaElement.h:
3622         * html/shadow/MediaControlElements.cpp:
3623         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Don't set the platform scale factor here. It is already
3624         being accounted for in the createTextTrackRepresentationImage method.
3625         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Synchronize the text track representation
3626         with any new video layer changes.
3627         * platform/graphics/MediaPlayer.cpp:
3628         (WebCore::MediaPlayer::syncTextTrackBounds): Added.
3629         * platform/graphics/MediaPlayer.h:
3630         * platform/graphics/MediaPlayerPrivate.h:
3631         (WebCore::MediaPlayerPrivateInterface::syncTextTrackBounds): Added.
3632         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3633         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3634         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): Use new sync function.
3635         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame): Ditto.
3636         (WebCore::MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds): Added. Keep the text track layer size in sync with
3637         the current video layer size. This may change during animations, rotations, etc.
3638         (WebCore::MediaPlayerPrivateAVFoundationObjC::setTextTrackRepresentation): Use new sync function.
3639
3640 2014-05-04  Beth Dakin  <bdakin@apple.com>
3641
3642         Top content inset: Margin tiles should not display in the inset area when pinned 
3643         to the top of the page
3644         https://bugs.webkit.org/show_bug.cgi?id=132535
3645         -and corresponding-
3646         <rdar://problem/16613039>
3647
3648         Reviewed by Simon Fraser.
3649
3650         Prior to this change, topContentInset was implemented by positioning 
3651         RenderLayerCompositor’s m_rootContentLayer based on the inset value. In order to 
3652         ensure that no content is displayed in the inset area when we are pinned to the 
3653         top of the page, we’ll have to take a different approach. In this patch, when you 
3654         are pinned to the top of the page, the m_rootContentLayer is positioned at (0,0), 
3655         much like it would be without an inset, but the m_clip layer IS positioned at (0, 
3656         topContentInset). Then for all y-scroll values between 0 and topContentInset, the 
3657         positions of the clip layer and the contents layer are adjusted so that the clip 
3658         layer approaches a position of (0,0), and the root layer approaches a position of 
3659         (0, topContentInset). This makes sure that any content above the top the document 
3660         is aways clipped out of the inset area.
3661
3662         In order to achieve this, the scrolling thread needs to know about the 
3663         topContentInset, the clip layer, and the root contents layer.
3664
3665         AsyncScrollingCoordinator::updateScrollingNode() now takes an additional parameter 
3666         for the clip layer. Also export the topContentInset symbol for UI-side 
3667         compositing.
3668         * WebCore.exp.in:
3669
3670         Here is the new computation. Implemented in one spot that can be called from the 
3671         scrolling thread, AsyncScrollingCoordinator and RenderLayerCompositor.
3672         * page/FrameView.cpp:
3673         (WebCore::FrameView::yPositionForInsetClipLayer):
3674         (WebCore::FrameView::yPositionForRootContentLayer):
3675         * page/FrameView.h:
3676
3677         Set the topContentInset, the insetClipLayer, and the scrolledContentsLayer when 
3678         appropriate.
3679         * page/scrolling/AsyncScrollingCoordinator.cpp:
3680         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
3681         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
3682
3683         Set or sync the positions for the inset layer and the contents layer.
3684         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
3685         (WebCore::AsyncScrollingCoordinator::updateScrollingNode):
3686         * page/scrolling/AsyncScrollingCoordinator.h:
3687
3688         Convenience functions for getting the clipLayer() and the rootContentLayer() from 
3689         the RenderLayerCompositor.
3690         * page/scrolling/ScrollingCoordinator.cpp:
3691         (WebCore::ScrollingCoordinator::insetClipLayerForFrameView):
3692         (WebCore::ScrollingCoordinator::rootContentLayerForFrameView):
3693         * page/scrolling/ScrollingCoordinator.h:
3694         (WebCore::ScrollingCoordinator::updateScrollingNode):
3695
3696         ScrollingStateScrolling nodes have two new members now. m_insetClipLayer and 
3697         m_topContentInset. We can use m_scrolledContentsLayer for the rootContentsLayer 
3698         since previously that member was not used for FrameViews; it was only used for 
3699         accelerated overflow:scroll nodes.
3700         * page/scrolling/ScrollingStateScrollingNode.cpp:
3701         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
3702         (WebCore::ScrollingStateScrollingNode::setTopContentInset):
3703         (WebCore::ScrollingStateScrollingNode::setInsetClipLayer):
3704         * page/scrolling/ScrollingStateScrollingNode.h:
3705
3706         Similarly, ScrollingTreeScrollingNode has two new members for m_topContentInset 
3707         and m_clipLayer.
3708         * page/scrolling/ScrollingTreeScrollingNode.cpp:
3709         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
3710         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
3711         * page/scrolling/ScrollingTreeScrollingNode.h:
3712         (WebCore::ScrollingTreeScrollingNode::topContentInset):
3713         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
3714         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
3715         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
3716
3717         Compute positions for the two new layers.
3718         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
3719
3720         Now use the static FrameView functions to compute the positions for these layers.
3721         * rendering/RenderLayerCompositor.cpp:
3722         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
3723         (WebCore::RenderLayerCompositor::positionForClipLayer):
3724         (WebCore::RenderLayerCompositor::clipLayer):
3725         (WebCore::RenderLayerCompositor::rootContentLayer):
3726         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
3727         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
3728         (WebCore::RenderLayerCompositor::ensureRootLayer):
3729         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
3730         * rendering/RenderLayerCompositor.h:
3731
3732 2014-05-04  Benjamin Poulain  <benjamin@webkit.org>
3733
3734         Clear the Selector Query caches on memory pressure
3735         https://bugs.webkit.org/show_bug.cgi?id=132545
3736
3737         Reviewed by Andreas Kling.
3738
3739         The Selector Query Cache can use quite a bit of memory if many
3740         complex selectors are compiled. This patch makes sure the cache gets
3741         cleared on memory pressure.
3742
3743         * dom/Document.cpp:
3744         (WebCore::Document::clearSelectorQueryCache):
3745         (WebCore::Document::setCompatibilityMode):
3746         (WebCore::Document::updateBaseURL):
3747         * dom/Document.h:
3748         * dom/SelectorQuery.cpp:
3749         (WebCore::SelectorQueryCache::invalidate): Deleted.
3750         * dom/SelectorQuery.h:
3751         * platform/MemoryPressureHandler.cpp:
3752         (WebCore::MemoryPressureHandler::releaseMemory):
3753
3754 2014-05-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3755
3756         Convert OwnPtr to std::unique_ptr in CDM
3757         https://bugs.webkit.org/show_bug.cgi?id=132467
3758
3759         Reviewed by Andreas Kling.
3760
3761         Use std::unique_ptr in CDM class.
3762
3763         No new tests, no behavior change.
3764
3765         * Modules/encryptedmedia/CDM.cpp:
3766         (WebCore::CDM::create):
3767         (WebCore::CDM::CDM):
3768         * Modules/encryptedmedia/CDM.h:
3769         * Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
3770         (WebCore::CDMPrivateMediaPlayer::CDMPrivateMediaPlayer):
3771         (WebCore::CDMPrivateMediaPlayer::create):
3772         * Modules/encryptedmedia/MediaKeys.cpp:
3773         (WebCore::MediaKeys::create):
3774         (WebCore::MediaKeys::MediaKeys):
3775         * Modules/encryptedmedia/MediaKeys.h:
3776         * WebCore.exp.in:
3777
3778 2014-05-03  Commit Queue  <commit-queue@webkit.org>
3779
3780         Unreviewed, rolling out r168232.
3781         https://bugs.webkit.org/show_bug.cgi?id=132543
3782
3783         broke ~15 tests on WK2 debug (Requested by kling on #webkit).
3784
3785         Reverted changeset:
3786
3787         "Shortcircuit shouldUseCredentialStorage callback"
3788         https://bugs.webkit.org/show_bug.cgi?id=132308
3789         http://trac.webkit.org/changeset/168232
3790
3791 2014-05-03  Andreas Kling  <akling@apple.com>
3792
3793         RenderSVGResourcePattern should deal in RenderElement&.
3794         <https://webkit.org/b/132536>
3795
3796         Tweak buildPattern() and buildTileImageTransform() to take RenderElement&
3797         instead of RenderObject* since we know that these functions will always
3798         be called with non-null RenderElement subclasses.
3799
3800         Reviewed by Sam Weinig.
3801
3802         * rendering/svg/RenderSVGResourceContainer.cpp:
3803         (WebCore::RenderSVGResourceContainer::shouldTransformOnTextPainting):
3804         * rendering/svg/RenderSVGResourceContainer.h:
3805         * rendering/svg/RenderSVGResourceGradient.cpp:
3806         (WebCore::RenderSVGResourceGradient::applyResource):
3807         * rendering/svg/RenderSVGResourcePattern.cpp:
3808         (WebCore::RenderSVGResourcePattern::buildPattern):
3809         (WebCore::RenderSVGResourcePattern::applyResource):
3810         (WebCore::RenderSVGResourcePattern::buildTileImageTransform):
3811         * rendering/svg/RenderSVGResourcePattern.h:
3812
3813 2014-05-03  Yusuke Suzuki  <utatane.tea@gmail.com>
3814
3815         CSS JIT: optimize direct / indirect adjacent's traversal backtracking
3816         https://bugs.webkit.org/show_bug.cgi?id=132319
3817
3818         Reviewed by Benjamin Poulain.
3819
3820         Since adjacent backtracking stack reference is pre-allocated
3821         in prologue in http://trac.webkit.org/changeset/166834,
3822         clearing stack phase is not needed. So we can drop
3823         JumpToClearAdjacentTail from backtracking action and simplify
3824         backtracking handling.
3825         And optimize direct / indirect adjacent's traversal backtracking by
3826         using appropriate backtracking height.
3827
3828         When solving adjacent traversal backtracking action,
3829         1) When there's no descendant relation on the right, traversal
3830         failure becomes global failure.
3831         2) When `tagNameMatchedBacktrackingStartHeightFromDescendant` ==
3832         `heightFromDescendant` + 1, the descendant backtracking starts with
3833         the parent of the current element. So we can use the current element
3834         and the backtracking action is JumpToDescendantTreeWalkerEntryPoint.
3835         3) Otherwise, currently we take the conservative approach,
3836         JumpToDescendantTail.
3837
3838         NOTE:
3839         And if `hasDescendantRelationOnTheRight` is true and there's no child
3840         fragment on the right, the backtracking element register is not
3841         effective. So we should ensure that fragment doesn't use the
3842         backtracking element register. Such a fragment fulfills the following
3843         conditions. 1. tagNameMatchedBacktrackingStartHeightFromDescendant is
3844         always 1 (tagNames.size(), that contains only descendant fragment) 2.
3845         heightFromDescendant is always 0 (-- See
3846         computeBacktrackingHeightFromDescendant implementation) Therefore such
3847         a fragment's action always becomes
3848         JumpToDescendantTreeWalkerEntryPoint. So we can ensure that the
3849         backtracking element register is not used.
3850
3851         Test: fast/selectors/backtracking-adjacent.html
3852
3853         * cssjit/SelectorCompiler.cpp:
3854         (WebCore::SelectorCompiler::solveDescendantBacktrackingActionForChild):
3855         (WebCore::SelectorCompiler::solveAdjacentTraversalBacktrackingAction):
3856         (WebCore::SelectorCompiler::solveBacktrackingAction):
3857         (WebCore::SelectorCompiler::SelectorCodeGenerator::computeBacktrackingInformation):
3858         (WebCore::SelectorCompiler::SelectorCodeGenerator::linkFailures):
3859         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateAdjacentBacktrackingTail):
3860         (WebCore::SelectorCompiler::isAfterChildRelation): Deleted.
3861
3862 2014-05-03  Andreas Kling  <akling@apple.com>
3863
3864         Clear the JSString cache when under memory pressure.
3865         <https://webkit.org/b/132539>
3866
3867         The WeakGCMap used for fast mapping from StringImpl* to JSString*
3868         can actually get pretty big, and if we find ourselves under memory
3869         pressure, it's entirely inessential.
3870
3871         1.1 MB progression on Membuster3.
3872
3873         Reviewed by Sam Weinig.
3874
3875         * platform/MemoryPressureHandler.cpp:
3876         (WebCore::MemoryPressureHandler::releaseMemory):
3877
3878 2014-05-03  Benjamin Poulain  <benjamin@webkit.org>
3879
3880         [iOS][WK2] Support disabling speculative tiling
3881         https://bugs.webkit.org/show_bug.cgi?id=132512
3882
3883         Reviewed by Tim Horton.
3884
3885         Move ScrollView::setScrollVelocity() and ScrollView::computeCoverageRect() to FrameView.
3886         When speculative tiling is disabled, return an unmodified exposed rect.
3887
3888         Time/velocity adjusments are completely unnecessary at the moment since speculative tiling
3889         is enabled as soon as the view scrolls.
3890
3891         * WebCore.exp.in:
3892         * page/FrameView.cpp:
3893         (WebCore::FrameView::setScrollVelocity):
3894         (WebCore::FrameView::computeCoverageRect):
3895         * page/FrameView.h:
3896         * platform/ScrollView.h:
3897         * platform/ios/ScrollViewIOS.mm:
3898         (WebCore::ScrollView::setScrollVelocity): Deleted.
3899         (WebCore::ScrollView::computeCoverageRect): Deleted.
3900
3901 2014-05-02  Pratik Solanki  <psolanki@apple.com>
3902
3903         Shortcircuit shouldUseCredentialStorage callback
3904         https://bugs.webkit.org/show_bug.cgi?id=132308
3905         <rdar://problem/16806708>
3906
3907         Reviewed by Alexey Proskuryakov.
3908
3909         If we are going to return true from the shouldUseCredentialStorage callback then we don't
3910         really need to have CFNetwork/Foundation call us. We can just disable the callback and
3911         CFNetwork will assume true. Add a separate subclass that implements this callback when we
3912         need to return false. We can also eliminate the corresponding async callbacks. This avoids
3913         pingponging between dispatch queue and main thread in the common case.
3914
3915         No new tests because no change in functionality.
3916
3917         * WebCore.exp.in:
3918         * platform/network/ResourceHandle.cpp:
3919         * platform/network/ResourceHandle.h:
3920         * platform/network/ResourceHandleClient.cpp:
3921         * platform/network/ResourceHandleClient.h:
3922         * platform/network/cf/ResourceHandleCFNet.cpp:
3923         (WebCore::ResourceHandle::createCFURLConnection):
3924         (WebCore::ResourceHandle::shouldUseCredentialStorage):
3925         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.h:
3926         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:
3927         (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::shouldUseCredentialStorage):
3928         * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h:
3929         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
3930         * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h:
3931         * platform/network/mac/ResourceHandleMac.mm:
3932         (WebCore::ResourceHandle::start):
3933         (WebCore::ResourceHandle::makeDelegate):
3934         (WebCore::ResourceHandle::delegate):
3935         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
3936         (WebCore::ResourceHandle::shouldUseCredentialStorage):
3937         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
3938         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
3939         (-[WebCoreResourceHandleWithCredentialStorageAsOperationQueueDelegate connectionShouldUseCredentialStorage:]):
3940         * platform/network/soup/ResourceHandleSoup.cpp:
3941
3942 2014-05-03  Andreas Kling  <akling@apple.com>
3943
3944         Invalidate scrollbars when custom scrollbar style changes dynamically.
3945         <https://webkit.org/b/132529>
3946
3947         Add a ScrollView::styleDidChange() and call that from RenderView::styleDidChange()
3948         so that the scrollbars are sure to get repainted with potentially different style.
3949
3950         Reviewed by Antti Koivisto.
3951
3952         Test: fast/css/scrollbar-dynamic-style-change.html
3953
3954         * platform/ScrollView.cpp:
3955         (WebCore::ScrollView::styleDidChange):
3956         * platform/ScrollView.h:
3957         * rendering/RenderView.cpp:
3958         (WebCore::RenderView::styleDidChange):
3959
3960 2014-05-03  Simon Fraser  <simon.fraser@apple.com>
3961
3962         Very fuzzy layers under non-decompasable matrices
3963         https://bugs.webkit.org/show_bug.cgi?id=132516
3964         <rdar://problem/16717478>
3965
3966         Reviewed by Sam Weinig.
3967         
3968         r155977 added code to modify layer contentsScale based on a root-relative
3969         scale, so that scaled-up layers remained sharp. It does this by decomposing
3970         an accumulated matrix, but failed to test whether the decomposition
3971         succeeded. This would result in contentsScale of 0, which is clamped to 0.1,
3972         resulting in very fuzzy layers.
3973         
3974         Fix by testing for success of decomposition.
3975
3976         Test: compositing/contents-scale/non-decomposable-matrix.html
3977
3978         * platform/graphics/ca/GraphicsLayerCA.cpp:
3979         (WebCore::maxScaleFromTransform):
3980         * platform/graphics/transforms/TransformationMatrix.cpp:
3981         (WebCore::TransformationMatrix::decompose2): Return early for identity matrices,
3982         with fix for m11 and m22.
3983         (WebCore::TransformationMatrix::decompose4): Return early for identity matrices.
3984         * platform/graphics/transforms/TransformationMatrix.h:
3985         Make Decomposed2Type and Decomposed4Type into C++ structs.
3986         (WebCore::TransformationMatrix::Decomposed2Type::operator==): Added to make it easier
3987         to write code that asserts that decomposition is correct.
3988         (WebCore::TransformationMatrix::Decomposed4Type::operator==): Ditto.
3989
3990 2014-05-03  Simon Fraser  <simon.fraser@apple.com>
3991
3992         Fix crash in WebKit client app when zooming
3993         https://bugs.webkit.org/show_bug.cgi?id=132475
3994         <rdar://problem/16703405>
3995
3996         Reviewed by Tim Horton.
3997
3998         It's possible for a WebTiledBackingLayer CALayer to remain in the CALayer
3999         hierarchy after we've called -invalidate on it, which clears the _tileController.
4000         Project the getters against null derefs to handle this.
4001
4002         * platform/graphics/ca/mac/WebTiledBackingLayer.mm:
4003         (-[WebTiledBackingLayer isOpaque]):
4004         (-[WebTiledBackingLayer acceleratesDrawing]):
4005         (-[WebTiledBackingLayer contentsScale]):
4006
4007 2014-05-03  Carlos Garcia Campos &nbs