Reduce constructor copypasta in RenderText and RenderElement.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-05-18  Andreas Kling  <akling@apple.com>
2
3         Reduce constructor copypasta in RenderText and RenderElement.
4         <https://webkit.org/b/133056>
5
6         Use delegating constructors to remove duplicated initializer lists
7         from the constructors of RenderText and RenderElement.
8
9         Reviewed by Anders Carlsson.
10
11         * rendering/RenderElement.cpp:
12         (WebCore::RenderElement::RenderElement):
13         * rendering/RenderElement.h:
14         * rendering/RenderText.cpp:
15         (WebCore::RenderText::RenderText):
16         * rendering/RenderText.h:
17
18 2014-05-18  Brent Fulgham  <bfulgham@apple.com>
19
20         Crash during scroll when latched
21         https://bugs.webkit.org/show_bug.cgi?id=133064
22
23         Reviewed by Simon Fraser.
24
25         * page/mac/EventHandlerMac.mm:
26         (WebCore::EventHandler::platformPrepareForWheelEvents): Prevent dereference of NULL
27         wheelEventTarget argument.
28
29 2014-05-18  Svetlana Redchenko  <redchenko@yandex-team.ru>
30
31         Input ::selection pseudo class does not work leading to hidden selection
32         https://bugs.webkit.org/show_bug.cgi?id=38943
33
34         Reviewed by Darin Adler.
35
36         Test: fast/selectors/input-with-selection-pseudo-element.html
37
38         When text is selected inside input element, it should change the
39         color and background color according to the ::selection pseudo element.
40
41         * rendering/RenderObject.cpp:
42         (WebCore::RenderObject::selectionBackgroundColor):
43         (WebCore::RenderObject::selectionColor):
44         (WebCore::RenderObject::selectionPseudoStyle):
45         * rendering/RenderObject.h:
46
47 2014-05-18  Sam Weinig  <sam@webkit.org>
48
49         [WebKit2] Implement ScriptMessageHandlers
50         https://bugs.webkit.org/show_bug.cgi?id=133053
51
52         Reviewed by Anders Carlsson.
53
54         * DerivedSources.make:
55         * WebCore.exp.in:
56         * WebCore.xcodeproj/project.pbxproj:
57         * bindings/js/JSDOMWindowBase.cpp:
58         (WebCore::JSDOMWindowBase::finishCreation):
59         * bindings/js/JSUserMessageHandlersNamespaceCustom.cpp: Added.
60         (WebCore::JSUserMessageHandlersNamespace::getOwnPropertySlotDelegate):
61         * page/DOMWindow.cpp:
62         (WebCore::DOMWindow::shouldHaveWebKitNamespaceForWorld):
63         (WebCore::DOMWindow::webkitNamespace):
64         * page/DOMWindow.h:
65         * page/UserContentController.cpp:
66         (WebCore::UserContentController::addUserMessageHandlerDescriptor):
67         (WebCore::UserContentController::removeUserMessageHandlerDescriptor):
68         * page/UserContentController.h:
69         (WebCore::UserContentController::userMessageHandlerDescriptors):
70         * page/UserMessageHandler.cpp: Added.
71         (WebCore::UserMessageHandler::UserMessageHandler):
72         (WebCore::UserMessageHandler::~UserMessageHandler):
73         (WebCore::UserMessageHandler::postMessage):
74         (WebCore::UserMessageHandler::name):
75         (WebCore::UserMessageHandler::world):
76         * page/UserMessageHandler.h: Added.
77         (WebCore::UserMessageHandler::create):
78         * page/UserMessageHandler.idl: Added.
79         * page/UserMessageHandlerDescriptor.cpp: Added.
80         (WebCore::UserMessageHandlerDescriptor::UserMessageHandlerDescriptor):
81         (WebCore::UserMessageHandlerDescriptor::~UserMessageHandlerDescriptor):
82         (WebCore::UserMessageHandlerDescriptor::name):
83         (WebCore::UserMessageHandlerDescriptor::world):
84         * page/UserMessageHandlerDescriptor.h: Added.
85         (WebCore::UserMessageHandlerDescriptor::Client::~Client):
86         (WebCore::UserMessageHandlerDescriptor::create):
87         (WebCore::UserMessageHandlerDescriptor::client):
88         * page/UserMessageHandlerDescriptorTypes.h: Added.
89         * page/UserMessageHandlersNamespace.cpp: Added.
90         (WebCore::UserMessageHandlersNamespace::UserMessageHandlersNamespace):
91         (WebCore::UserMessageHandlersNamespace::~UserMessageHandlersNamespace):
92         (WebCore::UserMessageHandlersNamespace::handler):
93         * page/UserMessageHandlersNamespace.h: Added.
94         (WebCore::UserMessageHandlersNamespace::create):
95         * page/UserMessageHandlersNamespace.idl: Added.
96         * page/WebKitNamespace.cpp: Added.
97         (WebCore::WebKitNamespace::WebKitNamespace):
98         (WebCore::WebKitNamespace::~WebKitNamespace):
99         (WebCore::WebKitNamespace::messageHandlers):
100         * page/WebKitNamespace.h: Added.
101         (WebCore::WebKitNamespace::create):
102         * page/WebKitNamespace.idl: Added.
103
104 2014-05-18  Maciej Stachowiak  <mjs@apple.com>
105
106         REGRESSION (r156546): Default media controls are laid out incorrectly when media element is styled with direction:rtl
107         https://bugs.webkit.org/show_bug.cgi?id=132531
108         <rdar://problem/16806267>
109         
110         Reviewed by Mark Rowe.
111
112         This was already tested by the media/video-rtl.htm reftest, now unskipped.
113
114         * Modules/mediacontrols/mediaControlsApple.css:
115         (audio::-webkit-media-controls-panel): Add missing direction: ltr
116
117 2014-05-18  Rik Cabanier  <cabanier@adobe.com>
118
119         support for navigator.hardwareConcurrency
120         https://bugs.webkit.org/show_bug.cgi?id=132588
121
122         Reviewed by Filip Pizlo.
123
124         Added a new API that returns the number of CPU cores up to 8.
125
126         Test: fast/dom/navigator-hardwareConcurrency.html
127
128         * Configurations/FeatureDefines.xcconfig:
129         * page/Navigator.cpp:
130         (WebCore::Navigator::hardwareConcurrency):
131         * page/Navigator.h:
132         * page/Navigator.idl:
133
134 2014-05-18  Anders Carlsson  <andersca@apple.com>
135
136         Fix iOS build.
137
138         * WebCore.exp.in:
139         Move UserContentController symbols to the right place.
140
141 2014-05-18  Jon Lee  <jonlee@apple.com>
142
143         Build fix for r169006.
144
145         Unreviewed.
146
147         * loader/ResourceLoader.h: Return didCreateQuickLookHandle() to public.
148
149 2014-05-18  Antti Koivisto  <antti@apple.com>
150
151         REGRESSION (r160259): text-combine glyphs are not rendered
152         https://bugs.webkit.org/show_bug.cgi?id=127324
153
154         Reviewed by Andreas Kling.
155         
156         The original text gets overwritten by a change that is supposed to affect rendered text only.
157         Fixed by giving the text update functions well-defined purposes.
158
159         Test: fast/text/text-combine-rendering.html
160
161         * rendering/RenderCombineText.cpp:
162         (WebCore::RenderCombineText::styleDidChange):
163         (WebCore::RenderCombineText::setRenderedText):
164         (WebCore::RenderCombineText::combineText):
165         (WebCore::RenderCombineText::setTextInternal): Deleted.
166         * rendering/RenderCombineText.h:
167         * rendering/RenderCounter.cpp:
168         (WebCore::RenderCounter::computePreferredLogicalWidths):
169         * rendering/RenderText.cpp:
170         (WebCore::RenderText::setRenderedText):
171         
172             This function now updates the rendered text but does not change the original.
173             Get the original text by calling originalText().
174
175         (WebCore::RenderText::setText):
176         
177             This the only place original text now changes.
178
179         (WebCore::RenderText::setTextInternal): Deleted.
180         
181             Renamed to setRenderedText.
182
183         * rendering/RenderText.h:
184         * rendering/svg/RenderSVGInlineText.cpp:
185         (WebCore::RenderSVGInlineText::setRenderedText):
186         (WebCore::RenderSVGInlineText::setTextInternal): Deleted.
187         * rendering/svg/RenderSVGInlineText.h:
188
189 2014-05-17  Maciej Stachowiak  <mjs@apple.com>
190
191         Don't attempt to update id or name for nodes that are already removed
192         https://bugs.webkit.org/show_bug.cgi?id=133041
193
194         Reviewed by Sam Weinig.
195
196         Tests: fast/dom/remove-element-with-id-that-was-inserted-on-DOMNodeRemoved.html
197                fast/dom/remove-element-with-name-that-was-inserted-on-DOMNodeRemoved.html
198
199         * dom/Element.cpp:
200         (WebCore::Element::removedFrom): Skip updating ids and names for an element not
201         in a treescope, as we already do for elements not in a document.
202
203 2014-05-17  Alexey Proskuryakov  <ap@apple.com>
204
205         REGRESSION (NetworkProcess): Trying to use appcache fallback crashes in ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache
206         https://bugs.webkit.org/show_bug.cgi?id=133007
207         <rdar://problem/13702706>
208
209         appcache tests often fail on the Mac WebKit2 bot
210         https://bugs.webkit.org/show_bug.cgi?id=82061
211
212         Reviewed by Maciej Stachowiak.
213
214         Covered by existing tests, which this patch enables.
215
216         * WebCore.exp.in: Export ResourceLoader::cancel(const ResourceError&). It used
217         to be virtual, but marking subclasses final has resulted in the compiler calling
218         it directly from WebKitLegacy framework. Seeing that no subclass overrides it,
219         I then made it non-virtual.
220         Also export ApplicationCacheHost functions that are now used from WebKit2.
221
222         * loader/ResourceLoader.h: Made the class abstract (as I didn't realize at first
223         that it's always either a SubresourceLoader or a NetscapePlugInStreamLoader).
224         Made ResourceHandleClient functions private, as they should never be called other
225         than via a ResourceHandleClient pointer.
226
227         * loader/NetscapePlugInStreamLoader.h:
228         * loader/SubresourceLoader.h:
229         Marked these final.
230
231         * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSwitchToSubstituteResource):
232         Added a function to be called when switching to a substitute resource. We still
233         need a ResourceLoader at this point, as substitute resource will be delivered through
234         it, but we don't want it to continue its current load.
235
236         * loader/appcache/ApplicationCacheHost.cpp:
237         (WebCore::ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache):
238         Call the ResourceLoader function instead of using handle, which is null when
239         using out of process networking.
240
241 2014-05-17  Andreas Kling  <akling@apple.com>
242
243         We shouldn't make a ScrollingThread on iOS.
244         <https://webkit.org/b/133038>
245         <rdar://problem/16947589>
246
247         Don't call ScrollingThred::dispatch() from the pressure relief
248         code on iOS since that will end up instantiating a scrolling thread
249         which we'd otherwise never have.
250
251         Reviewed by Sam Weinig.
252
253         * platform/MemoryPressureHandler.cpp:
254         (WebCore::MemoryPressureHandler::releaseMemory):
255
256 2014-05-17  Piotr Grad  <p.grad@samsung.com>
257
258         Setting playback rate on video with media controller is not ignored.
259         https://bugs.webkit.org/show_bug.cgi?id=129048
260
261         Reviewed by Jer Noble.
262
263         Replaced queries for m_playbackRate with effectivePlaybackRate()
264         which includes media controller playback rate.
265
266         Test: media/video-controller-child-rate.html
267
268         * html/HTMLMediaElement.cpp:
269         (WebCore::HTMLMediaElement::parseAttribute):
270         * html/HTMLMediaElement.h:
271
272 2014-05-16  Anders Carlsson  <andersca@apple.com>
273
274         Expose WKUserScript as API
275         https://bugs.webkit.org/show_bug.cgi?id=133017
276         <rdar://problem/16948059>
277
278         Reviewed by Sam Weinig.
279
280         * WebCore.exp.in:
281         Export symbols.
282
283         * WebCore.xcodeproj/project.pbxproj:
284         Change UserContentController.h to be a private header.
285
286         * page/Page.cpp:
287         (WebCore::Page::Page):
288         Set m_userContentController from the page configuration and add it if it's not null.
289
290         * page/Page.h:
291         Add UserContentController to PageClients.
292
293         * page/PageGroup.cpp:
294         (WebCore::PageGroup::addPage):
295         Only try to add a user content controller if the page doesn't already have one.
296
297         (WebCore::PageGroup::removePage):
298         Only try to remove the user content controller if it's the group one.
299
300 2014-05-17  Andreas Kling  <akling@apple.com>
301
302         REGRESSION (r166422): All RenderBox objects grew 104 bytes from adding repaint timers.
303         <https://webkit.org/b/133027>
304         <rdar://problem/16867410>
305
306         Instead of storing a rarely-used repaint timer on every RenderBox, store one
307         on the RenderView, and keep a hash set of renderers needing repaint.
308
309         Renderers get a flag tracking whether they have a pending lazy repaint.
310         This way we can avoid hash lookups in the common case.
311
312         Also added a static assertion to catch RenderBox growing in the future.
313
314         Reviewed by Antti Koivisto.
315
316         * rendering/RenderBox.cpp:
317         (WebCore::SameSizeAsRenderBox::~SameSizeAsRenderBox):
318         (WebCore::RenderBox::RenderBox):
319         (WebCore::RenderBox::~RenderBox):
320         (WebCore::RenderBox::paintBoxDecorations):
321         (WebCore::RenderBox::layoutOverflowRectForPropagation):
322         * rendering/RenderBox.h:
323         * rendering/RenderElement.cpp:
324         (WebCore::RenderElement::RenderElement):
325         * rendering/RenderElement.h:
326         (WebCore::RenderElement::setRenderBoxNeedsLazyRepaint):
327         (WebCore::RenderElement::renderBoxNeedsLazyRepaint):
328         * rendering/RenderView.cpp:
329         (WebCore::RenderView::RenderView):
330         (WebCore::RenderView::scheduleLazyRepaint):
331         (WebCore::RenderView::unscheduleLazyRepaint):
332         (WebCore::RenderView::lazyRepaintTimerFired):
333         * rendering/RenderView.h:
334
335 2014-05-16  Jer Noble  <jer.noble@apple.com>
336
337         [Mac][MSE] setCurrentTime() goes down fastSeek path in MediaPlayerPrivateMediaSourceAVFObjC.
338         https://bugs.webkit.org/show_bug.cgi?id=133023
339
340         Reviewed by Eric Carlson.
341
342         When seeking a MSE video, do not go down the fastSeekForMediaTime() path if the
343         seek resulted from a setCurrentTime() call. The logic can lead to attempted seeks
344         before buffered ranges.
345
346         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
347         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
348         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
349         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
350         (WebCore::MediaSourcePrivateAVFObjC::seekToTime):
351
352 2014-05-16  Benjamin Poulain  <bpoulain@apple.com>
353
354         [iOS] ScrollView::visibleContentRectInternal is bypassing the iOS code for unobscuredContentRect
355         https://bugs.webkit.org/show_bug.cgi?id=133008
356
357         Reviewed by Simon Fraser.
358
359         * platform/ScrollView.cpp:
360         (WebCore::ScrollView::visibleContentRectInternal):
361         ScrollView::visibleContentRectInternal() was calling the internal implementation of visibleContentRect().
362         That was skipping the iOS implementation and getting the framerect directly. That size is invalid on iOS
363         when the exposed rect and unobscured rect are not the same.
364
365 2014-05-16  Jer Noble  <jer.noble@apple.com>
366
367         [Mac] naturalSize not updated when preload=metadata
368         https://bugs.webkit.org/show_bug.cgi?id=132994
369
370         Reviewed by Eric Carlson.
371
372         Test: media/video-load-preload-metadata-naturalsize.html
373
374         When preload=metadata, we never create an AVPlayerItem, and therefore never receive a
375         presentationSize KVO. When an AVAsset informs us that its tracks have changed, and there
376         is no AVPlayerItem, recalculate presentation size based on the first video track's natural
377         size.
378
379         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
380         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
381         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
382         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
383
384 2014-05-16  Simon Fraser  <simon.fraser@apple.com>
385
386         Remove "region-based columns" prefs
387         https://bugs.webkit.org/show_bug.cgi?id=133006
388         <rdar://problem/16945824>
389
390         Reviewed by Dave Hyatt.
391
392         Remove "region-based columns" prefs and related code, since this is only
393         way to render columns now.
394
395         * page/Settings.in:
396
397 2014-05-16  Antti Koivisto  <antti@apple.com>
398
399         Link search area for touch events is too large in some cases
400         https://bugs.webkit.org/show_bug.cgi?id=132988
401         <rdar://problem/16917843>
402
403         Reviewed by Simon Fraser.
404
405         * page/ios/FrameIOS.mm:
406         (WebCore::Frame::qualifyingNodeAtViewportLocation):
407         
408             - Adjust the search area to screen ppi.
409             - Remove cut-off at scale 1. This made us pick physically far-away elements when zoomed in.
410             
411         * platform/PlatformScreen.h:
412         * platform/ios/PlatformScreenIOS.mm:
413         (WebCore::mobileGestaltFloatValue):
414         (WebCore::screenPPIFactor):
415
416             Figure out screens physical PPI relative to a base.
417
418 2014-05-16  Jer Noble  <jer.noble@apple.com>
419
420         [MSE] Crash at  WebCore::SourceBuffer::~SourceBuffer + 110
421         https://bugs.webkit.org/show_bug.cgi?id=132973
422
423         Reviewed by Eric Carlson.
424
425         Change SourceBuffer::m_private into a Ref<>, and add an assertion to
426         SourceBufferPrivateAVFObjC's destructor if its client has not been cleared.
427
428         Eliminate unnecessary churn in MediaSourcePrivateAVFObjC by having the predicate
429         functor take bare pointers, rather than a PassRefPtr.
430
431         The underlying problem seems to be in WebAVStreamDataParserListener. RefPtrs were
432         being created off the main thread to a non-thread safe ref counted class. In some
433         situations, this would result in double decrementing the ref, which would cause an
434         early destruction of the underlying object. Instead replace these RefPtr strong
435         pointers with explicit weak ones. Ensure the parser and its delegate are not freed
436         before the append operation completes by passing strong pointers into the async
437         append operation lambda.
438
439         There were a few places where we weren't null checking m_mediaSource before using it,
440         and at least one place where we weren't clearing m_mediaSource.
441
442         * Modules/mediasource/SourceBuffer.cpp:
443         (WebCore::SourceBuffer::SourceBuffer): Use Ref instead of RefPtr.
444         (WebCore::SourceBuffer::appendBufferTimerFired): Ditto.
445         * Modules/mediasource/SourceBuffer.h:
446         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
447         (WebCore::MediaSourcePrivateAVFObjCHasAudio): Take a bare pointer, instead of a PassRefPtr.
448         (WebCore::MediaSourcePrivateAVFObjCHasVideo): Ditto.
449         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
450         (WebCore::MediaSourcePrivateAVFObjC::removeSourceBuffer): Clear the back pointer when removing a buffer.
451         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
452         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
453         (-[WebAVStreamDataParserListener initWithParser:parent:WebCore::]): Use WeakPtr instead of RefPtr.
454         (-[WebAVStreamDataParserListener invalidate]): Ditto.
455         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:]): Ditto.
456         (-[WebAVStreamDataParserListener streamDataParser:didParseStreamDataAsAsset:withDiscontinuity:]): Ditto.
457         (-[WebAVStreamDataParserListener streamDataParser:didFailToParseStreamDataWithError:]): Ditto.
458         (-[WebAVStreamDataParserListener streamDataParser:didProvideMediaData:forTrackID:mediaType:flags:]): Ditto.
459         (-[WebAVStreamDataParserListener streamDataParser:didReachEndOfTrackWithTrackID:mediaType:]): Ditto.
460         (-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]): Ditto.
461         (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
462         (WebCore::SourceBufferPrivateAVFObjC::append): Ditto.
463
464 2014-05-16  Zalan Bujtas  <zalan@apple.com>
465
466         Subpixel rendering: Push named flows in region to device pixel when painting.
467         https://bugs.webkit.org/show_bug.cgi?id=132986
468
469         Reviewed by Simon Fraser.
470
471         Remove integral rounding when named flow sets the painting offset on the graphics context.
472         Use device pixel snapping instead to ensure that we can paint on odd device pixel positions on retina displays. 
473
474         Test: fast/regions/hidpi-region-with-auto-margin-on-subpixel-position.html
475
476         * rendering/RenderLayer.cpp:
477         (WebCore::RenderLayer::calculateClipRects):
478
479 2014-05-16  Radu Stavila  <stavila@adobe.com>
480
481         [CSS Regions] Add ASSERT to make sure using the flowThread cache does not return incorrect results
482         https://bugs.webkit.org/show_bug.cgi?id=132906
483
484         Reviewed by Simon Fraser.
485
486         If flowThreadContainingBlock() is called on an object which is in a different
487         flow thread than the one currently being laid out, this method will return an incorrect
488         result. I added an assertion for that to make sure we catch and treat any such scenarios.
489         For the moment, this assertion is only validated for regions, as multicol still has some issues.
490
491         No new tests required.
492
493         * rendering/RenderObject.cpp:
494         (WebCore::RenderObject::locateFlowThreadContainingBlockNoCache):
495         (WebCore::RenderObject::locateFlowThreadContainingBlock):
496         * rendering/RenderObject.h:
497
498 2014-05-16  Martin Hock  <mhock@apple.com>
499
500         MemoryCache::addImageToCache should return the result of add().
501         https://bugs.webkit.org/show_bug.cgi?id=132928
502         <rdar://problem/16651547>
503
504         Reviewed by Alexey Proskuryakov.
505
506         API test: WebKit1.MemoryCacheADdImageToCache (MemoryCacheAddImageToCacheIOS.mm)
507
508         * loader/cache/MemoryCache.cpp:
509         (WebCore::MemoryCache::addImageToCache):
510
511 2014-05-16  Andrei Bucur  <abucur@adobe.com>
512
513         [CSS Regions] Reduce the RenderRegion invasiveness in rendering code
514         https://bugs.webkit.org/show_bug.cgi?id=132121
515
516         Reviewed by Antti Koivisto.
517
518         Remove the RenderRegion / RenderNamedFlowFragment parameters and fields from
519         the painting / hit testing data structures and use a stateful approach to
520         correctly handle regions.
521
522         When painting or hit testing, the current flow thread is saved along the current
523         region. They are accessed through the |currentRenderNamedFlowFragment| helper
524         method on RenderObject or RenderLayer.
525
526         The patch also changes a bunch of 0s to nullptrs.
527
528         Tests: No new tests, no functional change.
529
530         * html/shadow/MediaControlElements.cpp:
531         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
532         * rendering/HitTestLocation.cpp:
533         (WebCore::HitTestLocation::HitTestLocation):
534         (WebCore::HitTestLocation::operator=):
535         * rendering/HitTestLocation.h:
536         (WebCore::HitTestLocation::region): Deleted.
537         * rendering/HitTestResult.h:
538         * rendering/PaintInfo.h:
539         (WebCore::PaintInfo::PaintInfo):
540         * rendering/RenderBlock.cpp:
541         (WebCore::RenderBlock::paint):
542         (WebCore::RenderBlock::paintObject):
543         (WebCore::RenderBlock::selectionGaps):
544         (WebCore::RenderBlock::nodeAtPoint):
545         * rendering/RenderBox.cpp:
546         (WebCore::RenderBox::nodeAtPoint):
547         (WebCore::RenderBox::paintBoxDecorations):
548         (WebCore::RenderBox::pushContentsClip):
549         * rendering/RenderBoxModelObject.cpp:
550         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
551         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
552         * rendering/RenderBoxModelObject.h:
553         * rendering/RenderLayer.cpp:
554         (WebCore::RenderLayer::paint):
555         (WebCore::RenderLayer::paintLayer):
556         (WebCore::RenderLayer::paintLayerContents):
557         (WebCore::RenderLayer::paintLayerByApplyingTransform):
558         (WebCore::RenderLayer::collectFragments):
559         (WebCore::RenderLayer::updatePaintingInfoForFragments):
560         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
561         (WebCore::RenderLayer::paintBackgroundForFragments):
562         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
563         (WebCore::RenderLayer::paintOutlineForFragments):
564         (WebCore::RenderLayer::paintMaskForFragments):
565         (WebCore::RenderLayer::hitTest):
566         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
567         (WebCore::RenderLayer::hitTestLayer):
568         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
569         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
570         (WebCore::RenderLayer::calculateClipRects):
571         * rendering/RenderLayer.h:
572         * rendering/RenderLayerBacking.cpp:
573         (WebCore::RenderLayerBacking::updateCompositedBounds):
574         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
575         * rendering/RenderLayerCompositor.cpp:
576         (WebCore::RenderLayerCompositor::addToOverlapMap):
577         (WebCore::RenderLayerCompositor::clippedByAncestor):
578         * rendering/RenderObject.cpp:
579         (WebCore::RenderObject::currentRenderNamedFlowFragment):
580         * rendering/RenderObject.h:
581         * rendering/RenderReplaced.cpp:
582         (WebCore::RenderReplaced::shouldPaint):
583         * rendering/RenderReplica.cpp:
584         (WebCore::RenderReplica::paint):
585         * rendering/RenderTable.cpp:
586         (WebCore::RenderTable::nodeAtPoint):
587         * rendering/RenderTableSection.cpp:
588         (WebCore::RenderTableSection::nodeAtPoint):
589         * rendering/RenderTreeAsText.cpp:
590         (WebCore::writeLayers):
591         * rendering/RootInlineBox.cpp:
592         (WebCore::RootInlineBox::paint):
593         * rendering/svg/RenderSVGRoot.cpp:
594         (WebCore::RenderSVGRoot::paintReplaced):
595
596 2014-05-16  Kiran  <kiran.guduru@samsung.com>
597
598         RTCDtmfSender default values need to be updated.
599         https://bugs.webkit.org/show_bug.cgi?id=132952
600
601         Reviewed by Eric Carlson.
602
603         The default ToneDuration and ToneGap values are modified in the updated spec.
604         So these values need to be updated.
605
606         Test: fast/mediastream/RTCPeerConnection-dtmf.html.
607
608         * Modules/mediastream/RTCDTMFSender.cpp:
609
610 2014-05-15  Daniel Bates  <dabates@apple.com>
611
612         Attempt to fix the Apple Mavericks Release, Apple MountainLion Release,
613         Apple MountainLion Release (32-bit Build), EFL, and GTK builds following
614         <http://trac.webkit.org/changeset/168921> (https://bugs.webkit.org/show_bug.cgi?id=132669)
615
616         * dom/ContainerNode.cpp: Include SVGElement.h for the definition of Node::hasTagName(const SVGQualifiedName&).
617
618 2014-05-15  Daniel Bates  <dabates@apple.com>
619
620         ASSERT_NOT_REACHED() in DocumentOrderedMap::get() when removing SVG subtree
621         https://bugs.webkit.org/show_bug.cgi?id=132669
622         <rdar://problem/14931432>
623
624         Reviewed by Brent Fulgham and Ryosuke Niwa.
625
626         Fixes an assertion failure when removing an SVG element with a duplicate id.
627
628         When removing an SVG element with id A we synchronously instruct each element that references A
629         to find the first element with id A, call this N, from the document root and register itself to
630         either receive subsequent notifications from N (say, there is another element with id A) or as
631         waiting for an element with id A (say, N = nullptr; => we removed the last element with id A from
632         the document). Because the elements that reference A perform this operation synchronously when
633         removing an element they consult an transient state of the DocumentOrderedMap when querying for the
634         element with id A.
635     
636         Without loss of generality, let E, E_1, E_2, and E_3 be elements, where E_1, E_2, E_3 are children
637         of E in that order and E_1.id = E_2.id = A and E_3.href = #A (that is, it references an element
638         with id A). Suppose we remove E then we remove E_1, update DocumentOrderedMap to decrement its count
639         for id A, and notify E_3 to look for an element with id A. This leads to an assertion failure since
640         DocumentOrderedMap expects to find an element with id A, E_2, but cannot find such an element when
641         traversing from the document root because E was unlinked from the document root (i.e. E_2 is in a
642         disjoint subtree).
643
644         Tests: svg/custom/change-id-of-use-during-removal.html
645                svg/custom/remove-subtree-including-path-with-duplicate-id-referenced-by-later-textpath.html
646                svg/custom/remove-subtree-including-text-with-duplicate-id-referenced-by-later-tref.html
647                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-earlier-use.html
648                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-animate.html
649                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-feimage.html
650                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-mpath.html
651                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use.html
652                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-later-use2.html
653                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-in-different-subtree.html
654                svg/custom/remove-subtree-including-use-with-duplicate-id-referenced-by-use-with-duplicate-id-in-different-subtree.html
655                svg/custom/remove-use-with-duplicate-id-referenced-by-later-use.html
656
657         * dom/ContainerNode.cpp:
658         (WebCore::ContainerNode::removeChild): Call SVGDocumentExtensions::rebuildElements() after we remove
659         a DOM subtree so that applicable SVG elements can update their referenced element when the DocumentOrderedMap
660         is in a stable-state.
661         (WebCore::ContainerNode::removeChildren): Ditto.
662         * svg/SVGDocumentExtensions.cpp:
663         (WebCore::SVGDocumentExtensions::rebuildElements): Added; notifies SVG elements that their href attribute
664         changed so that they query the DocumentOrderedMap for the element they reference by id in their href attribute.
665         (WebCore::SVGDocumentExtensions::clearTargetDependencies): Added; Called from removing
666         an SVG element S from the DOM. Appends all elements that reference the id of S to the end of a Vector of
667         elements to be rebuilt (when SVGDocumentExtensions::rebuildElements() is called) and notifies these elements
668         that have been marked to be rebuilt so that they can invalidate their state (e.g. stop animating).
669         (WebCore::SVGDocumentExtensions::rebuildAllElementReferencesForTarget): Changed to take its argument by reference
670         (since it's always non-null) and simplified logic to synchronously notify SVG updates that their referenced element
671         may have changed. Calling SVGElement::svgAttributeChanged() on an element E should at most remove the dependencies
672         of E.
673         * svg/SVGDocumentExtensions.h:
674         * svg/SVGElement.cpp:
675         (WebCore::SVGElement::~SVGElement): Substitute "*this" for "this" as SVGDocumentExtensions::rebuildAllElementReferencesForTarget()
676         now takes a reference instead of a pointer.
677         (WebCore::SVGElement::removedFrom): Modified to call SVGDocumentExtensions::clearTargetDependencies().
678         (WebCore::SVGElement::attributeChanged): Substitute "*this" for "this" as SVGDocumentExtensions::rebuildAllElementReferencesForTarget()
679         now takes a reference instead of a pointer.
680         * svg/SVGElement.h:
681         (WebCore::SVGElement::callClearTarget): Added; calls through to private virtual SVGElement::clearTarget().
682         (WebCore::SVGElement::clearTarget): Added.
683         * svg/SVGTRefElement.cpp:
684         (WebCore::SVGTRefElement::clearTarget): Added.
685         * svg/SVGTRefElement.h:
686         * svg/animation/SVGSMILElement.cpp:
687         (WebCore::SVGSMILElement::clearTarget): Added.
688         * svg/animation/SVGSMILElement.h:
689
690 2014-05-15  Simon Fraser  <simon.fraser@apple.com>
691
692         [iOS WK2] When zoomed, fixed elements jump at the start of a scroll, and jump back at the end.
693         https://bugs.webkit.org/show_bug.cgi?id=132978
694         <rdar://problem/16894428>
695
696         Reviewed by Benjamin Poulain.
697
698         This was the actual cause of the bug; r168560 changed the rect passed in here
699         to be the customFixedPositionRect rather than the unobscured rect, but we
700         used it to call FrameView::rectForViewportConstrainedObjects() which gave back
701         another bogus rect. So just use the rect passed in.
702
703         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
704         (WebCore::ScrollingTreeScrollingNodeIOS::updateLayersAfterViewportChange):
705
706 2014-05-15  Daniel Bates  <dabates@apple.com>
707
708         SVG element may reference arbitrary DOM element before running its insertion logic
709         https://bugs.webkit.org/show_bug.cgi?id=132757
710         <rdar://problem/15703817>
711
712         Reviewed by Ryosuke Niwa.
713
714         Fixes an issue where an SVG element may reference an arbitrary DOM element e before e finished being
715         inserted in the tree.
716
717         Currently when an SVG element A is inserted into a document we use document.getElementById() to find the
718         element B it references (if any). If A is inserted before B and B has the same id as a later element in
719         the document then A can find B before B is notified that its been inserted into the document (i.e. before
720         Element::insertedFrom() is called on B). Instead, A should call document.getElementById() only after
721         cessation of the insertion operation that inserted it to ensure that all inserted nodes (including B)
722         processed their insertion-specific logic.
723
724         Tests: svg/custom/reparent-animate-element.html
725                svg/custom/reparent-feimage-element.html
726                svg/custom/reparent-mpath-element.html
727                svg/custom/reparent-textpath-element.html
728                svg/custom/reparent-tref-element.html
729                svg/custom/reparent-use-element.html
730
731         * svg/SVGFEImageElement.cpp:
732         (WebCore::SVGFEImageElement::insertedInto): Return InsertionShouldCallDidNotifySubtreeInsertions so that
733         we are called back to resolve our target element (i.e. call SVGFEImageElement::buildPendingResources())
734         after the subtree we're in is inserted.
735         (WebCore::SVGFEImageElement::didNotifySubtreeInsertions): Added; turns around and calls SVGFEImageElement::buildPendingResources().
736         * svg/SVGFEImageElement.h:
737         * svg/SVGMPathElement.cpp:
738         (WebCore::SVGMPathElement::insertedInto): Return InsertionShouldCallDidNotifySubtreeInsertions so that
739         we are called back to resolve our target element (i.e. call SVGMPathElement::buildPendingResources())
740         after the subtree we're in is inserted.
741         (WebCore::SVGMPathElement::didNotifySubtreeInsertions): Added; turns around and calls SVGMPathElement::buildPendingResources().
742         * svg/SVGMPathElement.h:
743         * svg/SVGTRefElement.cpp:
744         (WebCore::SVGTRefElement::insertedInto): Return InsertionShouldCallDidNotifySubtreeInsertions so that
745         we are called back to resolve our target element (i.e. call SVGTRefElement::buildPendingResources())
746         after the subtree we're in is inserted.
747         (WebCore::SVGTRefElement::didNotifySubtreeInsertions): Added; turns around and calls SVGTRefElement::buildPendingResources().
748         * svg/SVGTRefElement.h:
749         * svg/SVGTextPathElement.cpp:
750         (WebCore::SVGTextPathElement::insertedInto): Return InsertionShouldCallDidNotifySubtreeInsertions so that
751         we are called back to resolve our target element (i.e. call SVGTextPathElement::buildPendingResources())
752         after the subtree we're in is inserted.
753         (WebCore::SVGTextPathElement::didNotifySubtreeInsertions): Added; turns around and calls SVGTextPathElement::buildPendingResources().
754         * svg/SVGTextPathElement.h:
755         * svg/SVGUseElement.cpp:
756         (WebCore::SVGUseElement::insertedInto): Return InsertionShouldCallDidNotifySubtreeInsertions so that
757         we are called back to resolve our target element (i.e. call SVGUseElement::buildPendingResources()) after its subtree is
758         inserted.
759         (WebCore::SVGUseElement::didNotifySubtreeInsertions): Added; turns around and calls SVGUseElement::buildPendingResources().
760         * svg/SVGUseElement.h:
761         * svg/animation/SVGSMILElement.cpp:
762         (WebCore::SVGSMILElement::insertedInto): Return InsertionShouldCallDidNotifySubtreeInsertions so that
763         we are called back to resolve our target element (i.e. call SVGSMILElement::buildPendingResources())
764         after the subtree we're in is inserted.
765         (WebCore::SVGSMILElement::didNotifySubtreeInsertions): Added; turns around and calls SVGSMILElement::buildPendingResources().
766         * svg/animation/SVGSMILElement.h:
767
768 2014-05-15  Mark Hahnenberg  <mhahnenberg@apple.com>
769
770         JSDOMWindow should not claim HasImpureGetOwnPropertySlot
771         https://bugs.webkit.org/show_bug.cgi?id=132918
772
773         Reviewed by Geoffrey Garen.
774
775         Tests: js/cached-window-properties.html
776                js/cached-window-prototype-properties.html
777
778         We now correctly handle the impurity of JSDOMWindow's custom getOwnPropertySlot without needing the 
779         blanket HasImpureGetOwnPropertySlot. We do this through the use of watchpoints and by explicitly forbidding
780         any caching beyond a certain point using PropertySlot::disableCaching. Getting rid of this flag will allow 
781         us to cache many properties/methods on both the JSDOMWindow and its prototype, which are very commonly used 
782         across the web.
783
784         * bindings/js/JSDOMWindowCustom.cpp:
785         (WebCore::JSDOMWindow::getOwnPropertySlot):
786         * bindings/scripts/CodeGeneratorJS.pm:
787         (HasComplexGetOwnProperty):
788         (InterfaceRequiresAttributesOnInstance):
789         (InstanceOverridesGetOwnPropertySlot):
790         (GenerateHeader):
791
792 2014-05-15  Alexey Proskuryakov  <ap@apple.com>
793
794         NetworkProcess crashes at ResourceHandle::continueDidReceiveResponse
795         https://bugs.webkit.org/show_bug.cgi?id=132966
796         <rdar://problem/16373694>
797
798         Reviewed by Brady Eidson.
799
800         Covered by many fast/files tests.
801
802         * platform/network/BlobResourceHandle.cpp: (WebCore::BlobResourceHandle::continueDidReceiveResponse):
803         * platform/network/BlobResourceHandle.h:
804         * platform/network/ResourceHandle.h:
805         Don't call delegate's continueDidReceiveResponse when loading a blob:// URL,
806         the delegate is null. On the Mac, we used to lazily create it, which was also wrong,
807         but at least not observable.
808
809 2014-05-15  Commit Queue  <commit-queue@webkit.org>
810
811         Unreviewed, rolling out r168899.
812         https://bugs.webkit.org/show_bug.cgi?id=132965
813
814         Broke some compositing regions tests on Mavericks (Requested
815         by mihnea___ on #webkit).
816
817         Reverted changeset:
818
819         "[CSS Regions] Reduce the RenderRegion invasiveness in
820         rendering code"
821         https://bugs.webkit.org/show_bug.cgi?id=132121
822         http://trac.webkit.org/changeset/168899
823
824 2014-05-15  Alex Christensen  <achristensen@webkit.org>
825
826         Add pointer lock to features without enabling it.
827         https://bugs.webkit.org/show_bug.cgi?id=132961
828
829         Reviewed by Sam Weinig.
830
831         * Configurations/FeatureDefines.xcconfig:
832         Added ENABLE_POINTER_LOCK to list of features.
833         * WebCore.exp.in:
834         Added linker symbols which differ with pointer lock enabled.
835         * WebCore.xcodeproj/project.pbxproj:
836         Added PointerLockController.cpp to build.
837
838 2014-05-15  Mark Hahnenberg  <mhahnenberg@apple.com>
839
840         Move subframe name getter lookup later in JSDOMWindow::getOwnPropertySlot
841         https://bugs.webkit.org/show_bug.cgi?id=132922
842
843         Reviewed by Geoffrey Garen.
844
845         No new tests.
846
847         In JSDOMWindow::getOwnPropertySlot, we currently look for the property on the JSDOMWindow, 
848         then we search the window's subframes for name getters, then we look in the window's prototype 
849         chain. Apparently we were doing the lookup in this order to be compatible with Mozilla, but 
850         Mozilla no longer implements this behavior. Instead, they do the lookup on the prototype before 
851         looking for subframe name getters. We should change this to match Mozilla. This has the convenient 
852         side effect of allowing us to cache lookups in the window's prototype chain.
853
854         * bindings/js/JSDOMWindowCustom.cpp:
855         (WebCore::JSDOMWindow::getOwnPropertySlot):
856
857 2014-05-15  Simon Fraser  <simon.fraser@apple.com>
858
859         [UI-side compositing] Fix copying animations between layers, and pausing them
860         https://bugs.webkit.org/show_bug.cgi?id=132943
861         <rdar://problem/16906369&16906541>
862
863         Reviewed by Tim Horton.
864
865         Pass the animation key back to animationStarted(), though this isn't used
866         when animations are running in-process.
867
868         * platform/graphics/ca/PlatformCALayer.h:
869         * platform/graphics/ca/mac/PlatformCALayerMac.h:
870         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
871         (-[WebAnimationDelegate animationDidStart:]):
872         (PlatformCALayerMac::animationStarted):
873         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
874         (PlatformCALayerWin::animationStarted):
875         * platform/graphics/ca/win/PlatformCALayerWin.h:
876
877 2014-05-15  Andrei Bucur  <abucur@adobe.com>
878
879         [CSS Regions] Reduce the RenderRegion invasiveness in rendering code
880         https://bugs.webkit.org/show_bug.cgi?id=132121
881
882         Reviewed by Antti Koivisto.
883
884         Remove the RenderRegion / RenderNamedFlowFragment parameters and fields from
885         the painting / hit testing data structures and use a stateful approach to
886         correctly handle regions.
887
888         When painting or hit testing, the current flow thread is saved along the current
889         region. They are accessed through the |currentRenderNamedFlowFragment| helper
890         method on RenderObject or RenderLayer.
891
892         The patch also changes a bunch of 0s to nullptrs.
893
894         Tests: No new tests, no functional change.
895
896         * html/shadow/MediaControlElements.cpp:
897         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
898         * rendering/HitTestLocation.cpp:
899         (WebCore::HitTestLocation::HitTestLocation):
900         (WebCore::HitTestLocation::operator=):
901         * rendering/HitTestLocation.h:
902         (WebCore::HitTestLocation::region): Deleted.
903         * rendering/HitTestResult.h:
904         * rendering/PaintInfo.h:
905         (WebCore::PaintInfo::PaintInfo):
906         * rendering/RenderBlock.cpp:
907         (WebCore::RenderBlock::paint):
908         (WebCore::RenderBlock::paintObject):
909         (WebCore::RenderBlock::selectionGaps):
910         (WebCore::RenderBlock::nodeAtPoint):
911         * rendering/RenderBox.cpp:
912         (WebCore::RenderBox::nodeAtPoint):
913         (WebCore::RenderBox::paintBoxDecorations):
914         (WebCore::RenderBox::pushContentsClip):
915         * rendering/RenderBoxModelObject.cpp:
916         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
917         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
918         * rendering/RenderBoxModelObject.h:
919         * rendering/RenderLayer.cpp:
920         (WebCore::RenderLayer::paint):
921         (WebCore::RenderLayer::paintLayer):
922         (WebCore::RenderLayer::paintLayerContents):
923         (WebCore::RenderLayer::paintLayerByApplyingTransform):
924         (WebCore::RenderLayer::collectFragments):
925         (WebCore::RenderLayer::updatePaintingInfoForFragments):
926         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
927         (WebCore::RenderLayer::paintBackgroundForFragments):
928         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
929         (WebCore::RenderLayer::paintOutlineForFragments):
930         (WebCore::RenderLayer::paintMaskForFragments):
931         (WebCore::RenderLayer::hitTest):
932         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
933         (WebCore::RenderLayer::hitTestLayer):
934         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
935         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
936         (WebCore::RenderLayer::calculateClipRects):
937         * rendering/RenderLayer.h:
938         * rendering/RenderLayerBacking.cpp:
939         (WebCore::RenderLayerBacking::updateCompositedBounds):
940         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
941         * rendering/RenderLayerCompositor.cpp:
942         (WebCore::RenderLayerCompositor::addToOverlapMap):
943         (WebCore::RenderLayerCompositor::clippedByAncestor):
944         * rendering/RenderObject.cpp:
945         (WebCore::RenderObject::currentRenderNamedFlowFragment):
946         * rendering/RenderObject.h:
947         * rendering/RenderReplaced.cpp:
948         (WebCore::RenderReplaced::shouldPaint):
949         * rendering/RenderReplica.cpp:
950         (WebCore::RenderReplica::paint):
951         * rendering/RenderTable.cpp:
952         (WebCore::RenderTable::nodeAtPoint):
953         * rendering/RenderTableSection.cpp:
954         (WebCore::RenderTableSection::nodeAtPoint):
955         * rendering/RenderTreeAsText.cpp:
956         (WebCore::writeLayers):
957         * rendering/RootInlineBox.cpp:
958         (WebCore::RootInlineBox::paint):
959         * rendering/svg/RenderSVGRoot.cpp:
960         (WebCore::RenderSVGRoot::paintReplaced):
961
962 2014-05-14  Simon Fraser  <simon.fraser@apple.com>
963
964         Clean up "has non-zero begin time" terminology in animations
965         https://bugs.webkit.org/show_bug.cgi?id=132942
966
967         Reviewed by Tim Horton.
968
969         Change the "non-zero beginTime" terminology in the platform CA animations
970         code to "explicit beginTime": this flag really means that we explicitly set
971         the beginTime of the animation, rather than let CA set the beginTime when
972         committing the animation. This flag is used for animations with negative
973         delay, and when pausing.
974         
975         The WKNonZeroBeginTimeFlag key was spread across PlatformCALayerMac and PlatformCAAnimationMac,
976         so hide it behind getter/setter functions.
977         
978         Remove lots of m_layer.get() in PlatformCAAnimationMac.
979
980         * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
981         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
982         (WebCore::hasExplicitBeginTime):
983         (WebCore::setHasExplicitBeginTime):
984         (PlatformCAAnimationMac::copy):
985         (PlatformCAAnimationMac::keyPath):
986         (PlatformCAAnimationMac::beginTime):
987         (PlatformCAAnimationMac::setBeginTime):
988         (PlatformCAAnimationMac::duration):
989         (PlatformCAAnimationMac::setDuration):
990         (PlatformCAAnimationMac::speed):
991         (PlatformCAAnimationMac::setSpeed):
992         (PlatformCAAnimationMac::timeOffset):
993         (PlatformCAAnimationMac::setTimeOffset):
994         (PlatformCAAnimationMac::repeatCount):
995         (PlatformCAAnimationMac::setRepeatCount):
996         (PlatformCAAnimationMac::autoreverses):
997         (PlatformCAAnimationMac::setAutoreverses):
998         (PlatformCAAnimationMac::fillMode):
999         (PlatformCAAnimationMac::setFillMode):
1000         (PlatformCAAnimationMac::setTimingFunction):
1001         (PlatformCAAnimationMac::copyTimingFunctionFrom):
1002         (PlatformCAAnimationMac::isRemovedOnCompletion):
1003         (PlatformCAAnimationMac::setRemovedOnCompletion):
1004         (PlatformCAAnimationMac::isAdditive):
1005         (PlatformCAAnimationMac::setAdditive):
1006         (PlatformCAAnimationMac::valueFunction):
1007         (PlatformCAAnimationMac::setValueFunction):
1008         (hasNonZeroBeginTimeFlag): Deleted.
1009         (setNonZeroBeginTimeFlag): Deleted.
1010         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1011         (-[WebAnimationDelegate animationDidStart:]):
1012
1013 2014-05-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1014
1015         [GTK] Compile all installed resources as GResources
1016         https://bugs.webkit.org/show_bug.cgi?id=131099
1017
1018         Reviewed by Philippe Normand.
1019
1020         * PlatformGTK.cmake: Do not install the resources.
1021         * platform/audio/gtk/AudioBusGtk.cpp:
1022         (WebCore::AudioBus::loadPlatformResource): Load the audio resource
1023         from GResources and use createBusFromInMemoryAudioFile().
1024         * platform/graphics/Image.h: Remove unsued function loadPlatformThemeIcon.
1025         * platform/graphics/gtk/ImageGtk.cpp:
1026         (WebCore::loadImageFromGResource): Load the given icon name from GResources.
1027         (WebCore::loadResourceSharedBuffer): Use char* instead of CString.
1028         (WebCore::loadMissingImageIconFromTheme): Try to load the missing
1029         icon from the current GTK icon theme.
1030         (WebCore::Image::loadPlatformResource): Call
1031         loadMissingImageIconFromTheme for missing icon or
1032         loadImageFromGResource for any other icon name.
1033         (WebCore::getPathToImageResource): Deleted.
1034         (WebCore::getThemeIconFileName): Deleted.
1035         (WebCore::loadImageFromFile): Deleted.
1036         (WebCore::Image::loadPlatformThemeIcon): Deleted.
1037
1038 2014-05-14  Beth Dakin  <bdakin@apple.com>
1039
1040         Tiled scrolling indicator needs to take topContentInset into account
1041         https://bugs.webkit.org/show_bug.cgi?id=132940
1042
1043         Reviewed by Simon Fraser.
1044
1045         The tiled scrolling indicator needs to move down by the value of the 
1046         topContentInset. This patch makes that happen by caching the topContentInset in 
1047         the TileController. This does feel a little silly since there is already a 
1048         function called setTiledScrollingIndicatorPosition() on TiledBacking. However, it 
1049         was often the case that calling that function had no effect because m_coverageMap 
1050         had not yet been created, and then the information was lost. So instead, we cache 
1051         the value.
1052
1053         Set TiledBacking’s copy of topContentInset whenever it changes for the FrameView.
1054         * page/FrameView.cpp:
1055         (WebCore::FrameView::topContentInsetDidChange):
1056
1057         New function to set the inset. Use the inset to position the coverage map.
1058         * platform/graphics/TiledBacking.h:
1059         * platform/graphics/ca/mac/TileController.h:
1060         * platform/graphics/ca/mac/TileController.mm:
1061         (WebCore::TileController::TileController):
1062         (WebCore::TileController::setTopContentInset):
1063
1064         When the coverage map is created, consult the value of the inset.
1065         * platform/graphics/ca/mac/TileCoverageMap.mm:
1066         (WebCore::TileCoverageMap::TileCoverageMap):
1067
1068         Once the backing has been ensured, set the inset.
1069         * rendering/RenderLayerCompositor.cpp:
1070         (WebCore::RenderLayerCompositor::updateBacking):
1071
1072 2014-05-14  Brent Fulgham  <bfulgham@apple.com>
1073
1074         Merge r1267628 from branch.
1075         <rdar://problem/15751219>
1076
1077             Pratik Solanki  <psolanki@apple.com>
1078
1079             Reviewed by Simon Fraser.",
1080
1081             TileController relied on the tiling mode in TileCache to determine if it should use low-res
1082             tiles when zooming. Unfortunately, sometimes the tiling mode gets set to Zooming even though
1083             it's actually a pan. Thus we can end up with blurry tiles. Fix this by adding a new flag on
1084             TileCache that controls this behavior and have UIKit set it only when we have an actual zoom
1085             operation.
1086  
1087         * platform/ios/LegacyTileCache.h:
1088         (WebCore::LegacyTileCache::tileControllerShouldUseLowScaleTiles):
1089         (WebCore::LegacyTileCache::setTileControllerShouldUseLowScaleTiles):
1090         * platform/ios/LegacyTileCache.mm:
1091         (WebCore::LegacyTileCache::LegacyTileCache):
1092         * platform/ios/wak/WAKWindow.h:
1093         * platform/ios/wak/WAKWindow.mm:
1094         (-[WAKWindow setTileControllerShouldUseLowScaleTiles:]):
1095         * rendering/RenderLayerCompositor.cpp:
1096         (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles):
1097
1098 2014-05-14  Commit Queue  <commit-queue@webkit.org>
1099
1100         Unreviewed, rolling out r168750.
1101         https://bugs.webkit.org/show_bug.cgi?id=132935
1102
1103         Caused repaint bugs (Requested by weinig on #webkit).
1104
1105         Reverted changeset:
1106
1107         "Text decorations do not contribute to visual overflow"
1108         https://bugs.webkit.org/show_bug.cgi?id=132773
1109         http://trac.webkit.org/changeset/168750
1110
1111 2014-05-14  Simon Fraser  <simon.fraser@apple.com>
1112
1113         [New multicolumn] Spin in RenderMultiColumnSet::repaintFlowThreadContent()
1114         https://bugs.webkit.org/show_bug.cgi?id=132884
1115
1116         Reviewed by Beth Dakin.
1117
1118         On iOS, wikipedia pages can hang under RenderMultiColumnSet::repaintFlowThreadContent().
1119         It appears that computedColumnHeight is set to 0 in prepareForLayout, but layout never happens
1120         on the RenderMultiColumnSet in some cases, leaving the column height set to zero.
1121         This caused columnIndexAtOffset() to return bad values, which resulted in very long loops
1122         in repaintFlowThreadContent().
1123         
1124         This fix is a stop-gap.
1125
1126         * rendering/RenderMultiColumnSet.cpp:
1127         (WebCore::RenderMultiColumnSet::columnIndexAtOffset):
1128
1129 2014-05-14  Benjamin Poulain  <bpoulain@apple.com>
1130
1131         Remove FrameView::viewportConstrainedExtentRect, it is unused
1132         https://bugs.webkit.org/show_bug.cgi?id=132927
1133
1134         Reviewed by Simon Fraser.
1135
1136         * page/FrameView.cpp:
1137         (WebCore::FrameView::viewportConstrainedExtentRect): Deleted.
1138         * page/FrameView.h:
1139         Simon replaced this by viewportConstrainedVisibleContentRect, remove the old code.
1140
1141 2014-05-14  Matthew Hanson  <matthew_hanson@apple.com>
1142
1143         Only define MAX_GRID_TRACK_REPETITIONS if CSS_GRID_LAYOUT is enabled.
1144
1145         Reviewed by Dean Jackson.
1146
1147         This was causing -Wunused-const-variable errors.
1148
1149         * css/CSSParser.cpp: Add include guard.
1150
1151 2014-05-14  Beth Dakin  <bdakin@apple.com>
1152
1153         Tile cache has way too many tiles when pinch-zoomed in
1154         https://bugs.webkit.org/show_bug.cgi?id=132929
1155         -and corresponding-
1156         <rdar://problem/16527172>
1157
1158         Reviewed by Benjamin Poulain.
1159
1160         This patch makes the margin sizing functions return the set margin size scaled by 
1161         the TileGrid's scale. We also need to get rid of the old notion we used to have
1162         that margin tiles might be allowed to have a different size than the other tiles. 
1163         We don't want that. They should have the normal margin size, but they should
1164         affect the overall coverage area.
1165
1166         Scale by the TileGrid's scale.
1167         * platform/graphics/ca/mac/TileController.mm:
1168         (WebCore::TileController::topMarginHeight):
1169         (WebCore::TileController::bottomMarginHeight):
1170         (WebCore::TileController::leftMarginWidth):
1171         (WebCore::TileController::rightMarginWidth):
1172
1173         Get rid of adjustRectAtTileIndexForMargin() since we do not want to ever do this 
1174         adjustment. Use tileSize instead of margin size for all sizing computations.
1175         * platform/graphics/ca/mac/TileGrid.h:
1176         * platform/graphics/ca/mac/TileGrid.mm:
1177         (WebCore::TileGrid::rectForTileIndex):
1178         (WebCore::TileGrid::getTileIndexRangeForRect):
1179         (WebCore::TileGrid::adjustRectAtTileIndexForMargin): Deleted.
1180
1181 2014-05-14  Dean Jackson  <dino@apple.com>
1182
1183         [Mac] Search fields should not use centered look
1184         https://bugs.webkit.org/show_bug.cgi?id=132930
1185         <rdar://problem/16825842>
1186
1187         Reviewed by Beth Dakin.
1188
1189         We need to explicitly set the centeredLook property
1190         to NO on modern releases of Mac.
1191
1192         * rendering/RenderThemeMac.mm: Declare a new private property and set it to NO.
1193         (WebCore::RenderThemeMac::search):
1194
1195 2014-05-14  Zalan Bujtas  <zalan@apple.com>
1196
1197         Subpixel layout: Change Element.offset* client* scroll* return type to double.
1198         https://bugs.webkit.org/show_bug.cgi?id=132895
1199
1200         Reviewed by Simon Fraser.
1201
1202         This patch changes Element.offset*, Element.client* and Element.scroll* APIs return
1203         type from long to double to match the latest CSSOM View Module spec[1].
1204         Element.offset* and Element.client* do return subpixel values from now on.
1205         Element.scroll* still return integral values as the scrolling code hasn't adopted to subpixel rendering yet.
1206
1207         subpixelCSSOMElementMetricsEnabled setting is added to be able to turn this feature on/off
1208         from WK2 preferences. It toggles the return value from subpixel to floored integral.
1209         It does not change layout/rendering behavior.
1210
1211         Reference list of what other browsers do:
1212         IE: http://blogs.msdn.com/b/ie/archive/2012/02/17/sub-pixel-rendering-and-the-css-object-model.aspx
1213         Blink: http://www.chromestatus.com/features/5497402177880064
1214         Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=825607
1215
1216         [1] http://www.w3.org/TR/2013/WD-cssom-view-20131217/
1217
1218         Test: cssom/subpixel-offsetleft-top-width-height-values.html
1219
1220         * dom/Element.cpp:
1221         (WebCore::localZoomForRenderer):
1222         (WebCore::adjustForLocalZoom):
1223         (WebCore::convertToNonSubpixelValueIfNeeded):
1224         (WebCore::Element::offsetLeft):
1225         (WebCore::Element::offsetTop):
1226         (WebCore::Element::offsetWidth):
1227         (WebCore::Element::offsetHeight):
1228         (WebCore::Element::clientLeft):
1229         (WebCore::Element::clientTop):
1230         (WebCore::Element::clientWidth):
1231         (WebCore::Element::clientHeight):
1232         (WebCore::Element::scrollLeft):
1233         (WebCore::Element::scrollTop):
1234         (WebCore::Element::setScrollLeft):
1235         (WebCore::Element::setScrollTop):
1236         (WebCore::Element::scrollWidth):
1237         (WebCore::Element::scrollHeight):
1238         * dom/Element.h:
1239         * dom/Element.idl:
1240         * html/HTMLBodyElement.cpp:
1241         (WebCore::adjustForZoom):
1242         (WebCore::HTMLBodyElement::scrollLeft):
1243         (WebCore::HTMLBodyElement::setScrollLeft):
1244         (WebCore::HTMLBodyElement::scrollTop):
1245         (WebCore::HTMLBodyElement::setScrollTop):
1246         (WebCore::HTMLBodyElement::scrollHeight):
1247         (WebCore::HTMLBodyElement::scrollWidth):
1248         * html/HTMLBodyElement.h:
1249         * page/Settings.in:
1250
1251 2014-05-14  Brady Eidson  <beidson@apple.com>
1252
1253         Implement NSSharingServiceDelegate method "transitionImageForShareItem"
1254         <rdar://problem/16878020> and https://bugs.webkit.org/show_bug.cgi?id=132911
1255
1256         Reviewed by Tim Horton.
1257
1258         * WebCore.exp.in:
1259         * WebCore.xcodeproj/project.pbxproj:
1260
1261 2014-05-14  Alex Christensen  <achristensen@webkit.org>
1262
1263         Another unreviewed build fix.
1264
1265         * platform/network/mac/ResourceHandleMac.mm:
1266         (WebCore::ResourceHandle::getTimingData):
1267         Added necessary UNUSED_PARAMs.
1268
1269 2014-05-14  Alex Christensen  <achristensen@webkit.org>
1270
1271         Unreviewed build fix after r168849.
1272
1273         * platform/network/mac/ResourceHandleMac.mm:
1274         (WebCore::ResourceHandle::getTimingData):
1275         Protect use of timing data with ENABLE(WEB_TIMING).
1276
1277 2014-05-14  Alex Christensen  <achristensen@webkit.org>
1278
1279         Refactor duplicate code in web timing.
1280         https://bugs.webkit.org/show_bug.cgi?id=132917
1281
1282         Reviewed by Alexey Proskuryakov.
1283
1284         * platform/network/ResourceHandle.h:
1285         Added getTimingData declaration.
1286         * platform/network/mac/ResourceHandleMac.mm:
1287         (WebCore::ResourceHandle::getTimingData):
1288         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
1289         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
1290         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
1291         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
1292         Moved duplicate code to ResourceHandle.
1293
1294 2014-05-14  Alex Christensen  <achristensen@webkit.org>
1295
1296         Use references instead of pointers with ResourceLoadTiming.
1297         https://bugs.webkit.org/show_bug.cgi?id=132846
1298
1299         Reviewed by Alexey Proskuryakov.
1300
1301         * WebCore.exp.in:
1302         Removed ResourceResponseBase::setResourceLoadTiming linker symbol.
1303         * inspector/InspectorResourceAgent.cpp:
1304         (WebCore::buildObjectForResourceResponse):
1305         * page/PerformanceResourceTiming.cpp:
1306         (WebCore::PerformanceResourceTiming::domainLookupStart):
1307         (WebCore::PerformanceResourceTiming::domainLookupEnd):
1308         (WebCore::PerformanceResourceTiming::connectStart):
1309         (WebCore::PerformanceResourceTiming::connectEnd):
1310         (WebCore::PerformanceResourceTiming::secureConnectionStart):
1311         (WebCore::PerformanceResourceTiming::requestStart):
1312         Use references instead of pointers.
1313         * page/PerformanceResourceTiming.h:
1314         Make an instance instead of a RefPtr.
1315         * page/PerformanceTiming.cpp:
1316         (WebCore::PerformanceTiming::domainLookupStart):
1317         (WebCore::PerformanceTiming::domainLookupEnd):
1318         (WebCore::PerformanceTiming::connectStart):
1319         (WebCore::PerformanceTiming::connectEnd):
1320         (WebCore::PerformanceTiming::secureConnectionStart):
1321         (WebCore::PerformanceTiming::requestStart):
1322         (WebCore::PerformanceTiming::responseStart):
1323         Check to see if the loader exists, then use ResourceLoadTiming reference.
1324         (WebCore::PerformanceTiming::resourceLoadTiming): Deleted.
1325         * page/PerformanceTiming.h:
1326         Removed resourceLoadTiming declaration.
1327         * platform/network/ResourceLoadTiming.h:
1328         (WebCore::ResourceLoadTiming::ResourceLoadTiming):
1329         (WebCore::ResourceLoadTiming::operator=):
1330         Replaced reference counting with copy constructors.
1331         (WebCore::ResourceLoadTiming::create): Deleted.
1332         (WebCore::ResourceLoadTiming::deepCopy): Deleted.
1333         * platform/network/ResourceResponseBase.cpp:
1334         (WebCore::ResourceResponseBase::adopt):
1335         (WebCore::ResourceResponseBase::copyData):
1336         (WebCore::ResourceResponseBase::resourceLoadTiming):
1337         (WebCore::ResourceResponseBase::setResourceLoadTiming):
1338         (WebCore::ResourceResponseBase::compare):
1339         * platform/network/ResourceResponseBase.h:
1340         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
1341         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
1342         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
1343         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
1344         * platform/network/soup/ResourceHandleSoup.cpp:
1345         (WebCore::ResourceHandle::didStartRequest):
1346         (WebCore::networkEventCallback):
1347         Use references instead of pointers.
1348
1349 2014-05-14  Commit Queue  <commit-queue@webkit.org>
1350
1351         Unreviewed, rolling out r168837.
1352         https://bugs.webkit.org/show_bug.cgi?id=132913
1353
1354         The patch added an assertion which fires on 6 tests (Requested
1355         by ap on #webkit).
1356
1357         Reverted changeset:
1358
1359         "[CSS Regions] Add ASSERT to make sure using the flowThread
1360         cache does not return incorrect results"
1361         https://bugs.webkit.org/show_bug.cgi?id=132906
1362         http://trac.webkit.org/changeset/168837
1363
1364 2014-05-13  Jon Honeycutt  <jhoneycutt@apple.com>
1365
1366         Revert "Don't dispatch 'beforeload' event inside FrameView::layout()",
1367         commit 84fe8cf6fbe8b5de9a06300ca3ef6d0ffc96948c, and associated
1368         follow-up fixes:
1369
1370             "platform/mac/plugins/testplugin-onnew-onpaint.html failing after
1371                 r168668", commit c17be3bf5127baf94310af4b4b9bf5a57d29aaf4
1372             "[Win] Unreviewed build fix after r168668.", commit
1373                 4fa470ad12c38ee7d4c114541b6dd321181a8bc9
1374
1375         The original merged patch appears to have caused a regression in
1376         fast/dom/HTMLObjectElement/object-as-frame.html.
1377
1378         <https://bugs.webkit.org/show_bug.cgi?id=132886>
1379
1380         Reviewed by Alexey Proskuryakov.
1381
1382         * WebCore.exp.in:
1383         * dom/Document.cpp:
1384         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
1385         * dom/Document.h:
1386         * html/HTMLAppletElement.cpp:
1387         (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
1388         * html/HTMLEmbedElement.cpp:
1389         (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
1390         * html/HTMLObjectElement.cpp:
1391         (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
1392         * page/FrameView.cpp:
1393         (WebCore::FrameView::FrameView):
1394         (WebCore::FrameView::reset):
1395         (WebCore::FrameView::flushAnyPendingPostLayoutTasks):
1396         (WebCore::FrameView::performPostLayoutTasks):
1397         (WebCore::FrameView::updateEmbeddedObjectsTimerFired): Deleted.
1398         * page/FrameView.h:
1399         * testing/Internals.cpp:
1400         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks): Deleted.
1401         * testing/Internals.h:
1402         * testing/Internals.idl:
1403
1404 2014-05-14  Kiran  <kiran.guduru@samsung.com>
1405
1406         alidation for getUserMedia() errorCallback is missing.
1407         https://bugs.webkit.org/show_bug.cgi?id=132901
1408
1409         Reviewed by Darin Adler.
1410
1411         The patch adds the validation for getUserMedia errorCallBack
1412         and throws TypeMismatchError.
1413
1414         Test: fast/mediastream/getusermedia.html 
1415
1416         * Modules/mediastream/NavigatorUserMedia.cpp:
1417         (WebCore::NavigatorUserMedia::webkitGetUserMedia):
1418
1419 2014-05-14  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
1420
1421         Remove CSS_STICKY_POSITION guards
1422         https://bugs.webkit.org/show_bug.cgi?id=132676
1423
1424         Reviewed by Simon Fraser.
1425
1426         * Configurations/FeatureDefines.xcconfig:
1427         * css/CSSParser.cpp:
1428         (WebCore::isValidKeywordPropertyAndValue):
1429         * css/CSSPrimitiveValueMappings.h:
1430         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1431         (WebCore::CSSPrimitiveValue::operator EPosition):
1432         * css/CSSValueKeywords.in:
1433         * editing/EditingStyle.cpp:
1434         (WebCore::EditingStyle::convertPositionStyle):
1435
1436 2014-05-14  Radu Stavila  <stavila@adobe.com>
1437
1438         [CSS Regions] Add ASSERT to make sure using the flowThread cache does not return incorrect results
1439         https://bugs.webkit.org/show_bug.cgi?id=132906
1440
1441         Reviewed by Andrei Bucur.
1442
1443         If flowThreadContainingBlock() is called on an object which is in a different
1444         flow thread than the one currently being laid out, this method will return an incorrect
1445         result. I added an assertion for that to make sure we catch and treat any such scenarios.
1446
1447         No new tests required.
1448
1449         * rendering/RenderObject.cpp:
1450         (WebCore::RenderObject::locateFlowThreadContainingBlockNoCache):
1451         (WebCore::RenderObject::locateFlowThreadContainingBlock):
1452         * rendering/RenderObject.h:
1453
1454 2014-05-14  Andrei Bucur  <abucur@adobe.com>
1455
1456         [CSS Regions] Don't relayout when updating the region range unless necessary
1457         https://bugs.webkit.org/show_bug.cgi?id=132120
1458
1459         Reviewed by Antti Koivisto.
1460
1461         The patch reduces the cases when a relayout is made for boxes that change the region range.
1462         This lowers the amount of nested layouts in most cases and produces big layout speedups for trees
1463         without overhanging floats.
1464
1465         Tests: Major performance improvement with speedups of 50-60% on:
1466         Layout/RegionsAuto.html, Layout/RegionsAutoMaxHeight.html and Layout/RegionsFixed.html
1467
1468         * rendering/RenderBlock.cpp:
1469         (WebCore::RenderBlock::updateRegionRangeForBoxChild): Ask the child box if it needs a relayout
1470         in case its region range changes.
1471         * rendering/RenderBlockFlow.cpp:
1472         (WebCore::RenderBlockFlow::layoutBlockChild): It's not necessary to do two layouts here because
1473         there's no block direction position change between them for the child.
1474         (WebCore::RenderBlockFlow::needsLayoutAfterRegionRangeChange): If the block doesn't have floats
1475         or if it expands to enclose the floats it doesn't need to relayout after a region range chage.
1476         It's not possible for it to have a float inside overflow that must be repositioned using the new
1477         range.
1478         * rendering/RenderBlockFlow.h:
1479         * rendering/RenderBox.h:
1480         (WebCore::RenderBox::needsLayoutAfterRegionRangeChange): By default don't relayout after a region
1481         range change.
1482
1483 2014-05-14  Antti Koivisto  <antti@apple.com>
1484
1485         RuleData should ref the StyleRule
1486         https://bugs.webkit.org/show_bug.cgi?id=132865
1487
1488         Reviewed by Andreas Kling.
1489
1490         As a defensive move make RuleData ref the StyleRule. 
1491         This adds some ref churn but the overall performance impact should be minimal.
1492
1493         * css/RuleSet.h:
1494         (WebCore::RuleData::rule):
1495
1496 2014-05-14  Antti Koivisto  <antti@apple.com>
1497
1498         GIF animations don't restart after scrolling on iOS WebKit1
1499         https://bugs.webkit.org/show_bug.cgi?id=132900
1500
1501         Reviewed by Andreas Kling.
1502
1503         * WebCore.exp.in:
1504
1505 2014-05-13  Andrei Bucur  <abucur@adobe.com>
1506
1507         [CSS Regions] Assertion failure in some cases with inline blocks
1508         https://bugs.webkit.org/show_bug.cgi?id=132859
1509
1510         Reviewed by Mihnea Ovidenie.
1511
1512         The patch hardens the conditions when the region range caches are
1513         populated to avoid desynchronizations when objects move during layout.
1514         This is true especially in the case of the boxes found inside
1515         inline blocks, that get their range from the containing line.
1516
1517         There is a new function |computedRegionRangeForBox| that will always
1518         return a region range for a box using a best effort algorithm. This should
1519         be used only when there's no need to cache region information.
1520
1521         This change also allows better control over the lifecycle of the
1522         |RenderBoxRegionInfo| objects stored on the regions. We can now iterate
1523         over the full range of the box when cleaning up the region box info. The
1524         same applies for the width change detection function.
1525
1526         Test: fast/regions/inline-block-shifted-region.html
1527
1528         * rendering/RenderBlockLineLayout.cpp:
1529         (WebCore::RenderBlockFlow::updateRegionForLine): Don't set the containing
1530         region if the block doesn't have a range. The returned value would not
1531         be correctly clamped.
1532         * rendering/RenderBox.cpp:
1533         (WebCore::RenderBlock::hasRegionRangeInFlowThread):
1534         * rendering/RenderBox.h:
1535         * rendering/RenderFlowThread.cpp:
1536         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo): Iterate only over
1537         the range of the box, not from the start of the region chain.
1538         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock): Same as
1539         above.
1540         (WebCore::RenderFlowThread::hasCachedRegionRangeForBox):
1541         (WebCore::RenderFlowThread::getRegionRangeForBoxFromCachedInfo):
1542         (WebCore::RenderFlowThread::getRegionRangeForBox):
1543         (WebCore::RenderFlowThread::computedRegionRangeForBox): Best effort function
1544         to determine the range of a box. It will always return something as long
1545         as the flow thread has regions.
1546         (WebCore::RenderFlowThread::objectShouldFragmentInFlowRegion): Use the new function
1547         to determine the range.
1548         * rendering/RenderFlowThread.h:
1549         * rendering/RenderNamedFlowThread.cpp:
1550         (WebCore::RenderNamedFlowThread::absoluteQuadsForBox): Use the new function to determine
1551         the range.
1552
1553 2014-05-13  Simon Fraser  <simon.fraser@apple.com>
1554
1555         Fix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side compositing
1556         https://bugs.webkit.org/show_bug.cgi?id=132899
1557
1558         Reviewed by Beth Dakin.
1559
1560         Export some things
1561
1562         * WebCore.exp.in:
1563
1564 2014-05-13  Hans Muller  <hmuller@adobe.com>
1565
1566         [CSS Shapes] line height grows around polygon and incorrectly causes text to wrap to next line
1567         https://bugs.webkit.org/show_bug.cgi?id=131622
1568
1569         Reviewed by Bem Jones-Bey.
1570
1571         Corrected an earlier PolygonShape fix https://bugs.webkit.org/show_bug.cgi?id=132132
1572         When the top or bottom of a layout line is coincident with a polygon edge vertex, we
1573         only consider it an intersection if the edge extends into the line.
1574
1575         Test: fast/shapes/shape-outside-floats/shape-outside-edge-case.html
1576
1577         * rendering/shapes/PolygonShape.cpp:
1578         (WebCore::OffsetPolygonEdge::clippedEdgeXRange):
1579
1580 2014-05-13  Beth Dakin  <bdakin@apple.com>
1581
1582         m_layerForOverhangAreas is sometimes not positioned correctly when topContentInset 
1583         has changed
1584         https://bugs.webkit.org/show_bug.cgi?id=132898
1585         -and corresponding-
1586         <rdar://problem/16644710>
1587
1588         Reviewed by Anders Carlsson.
1589
1590         This function is called whenever the topContentInset changes, so use it as an 
1591         opportunity to ensure that m_layerForOverhangAreas has been positioned correctly.
1592         * rendering/RenderLayerCompositor.cpp:
1593         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
1594
1595         Everyone gets an anchor point!
1596         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
1597
1598 2014-05-13  Dean Jackson  <dino@apple.com>
1599
1600         Attempted build fix after https://bugs.webkit.org/show_bug.cgi?id=132891
1601
1602         * page/PageDebuggable.cpp:
1603
1604 2014-05-13  Timothy Hatcher  <timothy@apple.com>
1605
1606         Force developerExtrasEnabled when a remote Inspector client connects.
1607
1608         https://bugs.webkit.org/show_bug.cgi?id=132891
1609
1610         Reviewed by Joseph Pecoraro.
1611
1612         * page/PageDebuggable.cpp:
1613         (WebCore::PageDebuggable::PageDebuggable): Initialize m_forcedDeveloperExtrasEnabled to false.
1614         (WebCore::PageDebuggable::connect): Set m_forcedDeveloperExtrasEnabled if the setting is changed.
1615         (WebCore::PageDebuggable::disconnect): Switch developerExtrasEnabled back to false
1616         if m_forcedDeveloperExtrasEnabled is true.
1617         * page/PageDebuggable.h: Added m_forcedDeveloperExtrasEnabled.
1618
1619 2014-05-13  Beth Dakin  <bdakin@apple.com>
1620
1621         REGRESSION (topContentInset): Searching through Facebook Messenger's chat causes 
1622         scrolling in News Feed
1623         https://bugs.webkit.org/show_bug.cgi?id=132889
1624         -and corresponding-
1625         <rdar://problem/16715716>
1626
1627         Reviewed by Simon Fraser.
1628
1629         First of all, scrollOffsetRelativeToDocument() was very poorly named. This patch 
1630         re-names it to the much more accurate documentScrollOffsetRelativeToViewOrigin(). 
1631         Re-naming it makes it clear that ONE call site was not getting the right offset. 
1632         That call site does not want to know the document’s position relative to the view 
1633         origin, but rather it wants to know the Document’s position relative to the 
1634         scrolling origin.
1635
1636         Export new name.
1637         * WebCore.exp.in:
1638
1639         Use newly re-named documentScrollPositionRelativeToViewOrigin().
1640         * page/FrameView.cpp:
1641         (WebCore::FrameView::convertToRenderer):
1642         * platform/ScrollView.cpp:
1643         (WebCore::ScrollView::documentScrollOffsetRelativeToViewOrigin):
1644         (WebCore::ScrollView::documentScrollPositionRelativeToViewOrigin):
1645         (WebCore::ScrollView::documentScrollOffsetRelativeToScrollableAreaOrigin):
1646         (WebCore::ScrollView::rootViewToContents):
1647         (WebCore::ScrollView::windowToContents):
1648         (WebCore::ScrollView::scrollOffsetRelativeToDocument): Deleted.
1649         (WebCore::ScrollView::scrollPositionRelativeToDocument): Deleted.
1650         * platform/ScrollView.h:
1651
1652         THIS is the spot that needs the new function, 
1653         documentScrollOffsetRelativeToScrollableAreaOrigin()()
1654         * rendering/RenderLayer.cpp:
1655         (WebCore::RenderLayer::scrollRectToVisible):
1656
1657 2014-05-13  Dean Jackson  <dino@apple.com>
1658
1659         [iOS] Page scale update messages for media controls should only fire at the end of zooming
1660         https://bugs.webkit.org/show_bug.cgi?id=132857
1661         <rdar://problem/16631009>
1662
1663         Reviewed by Simon Fraser.
1664
1665         As the user was zooming, the media controls that responded
1666         to the page scale (and resized themselves) would do so
1667         slightly out of sync with the screen refreshes, and it looked
1668         terrible. They really only need to get told at the end
1669         of the zoom that they need to relayout.
1670
1671         Allow setPageScaleFactor to accept another parameter
1672         that indicates if the change is stable. That way, changes
1673         during a user triggers zoom gesture can be ignored for
1674         media controls.
1675
1676         * WebCore.exp.in: Page::setPageScaleFactor takes a new parameter.
1677         * dom/Document.cpp:
1678         (WebCore::Document::pageScaleFactorChangedAndStable): Renamed from pageScaleFactorChanged.
1679         (WebCore::Document::pageScaleFactorChanged): Deleted.
1680         * dom/Document.h:
1681         * page/Page.cpp:
1682         (WebCore::Page::setPageScaleFactor): Accepts a new inStableState parameter,
1683         and tells the main frame that the scale factor has changed if it's stable.
1684         * page/Page.h:
1685
1686 2014-05-13  Eric Carlson  <eric.carlson@apple.com>
1687
1688         Unreviewed build fix after r168755.
1689
1690         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1691         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
1692
1693 2014-05-13  Eric Carlson  <eric.carlson@apple.com>
1694
1695         [Mac] hasVideo should return true when video is ready to display
1696         https://bugs.webkit.org/show_bug.cgi?id=132885
1697
1698         Reviewed by Jer Noble.
1699
1700         * html/HTMLMediaElement.cpp:
1701         (WebCore::HTMLMediaElement::parseAttribute):
1702
1703         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
1704         (WebCore::AudioTrackPrivateAVFObjC::resetPropertiesFromTrack): Don't change the
1705             enabled state of the AVPlayerItemTrack during setup.
1706
1707         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1708         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1709         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize
1710             m_cachedIsReadyForDisplay.
1711         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Remove "enabled" KVO observers.
1712         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Observe "readyForDisplay"
1713             change notifications.
1714         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): Remove for "readyForDisplay"
1715             observer.
1716         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasAvailableVideoFrame): Return cached readyForDisplay
1717             state instead of polling every time.
1718         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Call setHasVideo(true) if the
1719             player layer is ready for display.
1720         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateAudioTracks): Update logging.
1721         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoTracks): Ditto.
1722         (WebCore::MediaPlayerPrivateAVFoundationObjC::firstFrameAvailableDidChange): Cache readyForDisplay
1723             state, call tracksChanged() if we haven't seen a video track yet.
1724         (WebCore::MediaPlayerPrivateAVFoundationObjC::trackEnabledDidChange): New.
1725         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive): Correct logging.
1726         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange): Remove old "enabled" listeners
1727             before release tracks, add new ones to new tracks.
1728         (WebCore::assetTrackMetadataKeyNames): Add "enabled" to the list of properties we require to 
1729             be loaded before announcing that metadata has loaded.
1730         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Observe 
1731             "readyForDisplay" and "enabled".
1732
1733         * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
1734         (WebCore::VideoTrackPrivateAVFObjC::resetPropertiesFromTrack): Don't change the
1735             enabled state of the AVPlayerItemTrack during setup.
1736
1737 2014-05-13  Myles C. Maxfield  <litherum@gmail.com>
1738
1739         Text decorations do not contribute to visual overflow
1740         https://bugs.webkit.org/show_bug.cgi?id=132773
1741
1742         Reviewed by Darin Adler.
1743
1744         Tests: fast/css3-text/css3-text-decoration/repaint/underline-outside-of-layout-rect.html
1745
1746         * rendering/InlineTextBox.cpp:
1747         (WebCore::textDecorationStrokeThickness): Refactor into a common function
1748         (WebCore::wavyOffsetFromDecoration): Ditto
1749         (WebCore::InlineTextBox::extendVerticalVisualOverflowForDecorations): Given
1750         vertical overflow bounds, possibly extend those to include location of
1751         decorations.
1752         (WebCore::InlineTextBox::paintDecoration): Use refactored functions.
1753         * rendering/InlineTextBox.h: Function signature
1754         * rendering/RenderBlockLineLayout.cpp:
1755         (WebCore::setLogicalWidthForTextRun): Call extendVerticalVisualOverflowForDecorations()
1756         * rendering/style/RenderStyle.cpp:
1757         (WebCore::RenderStyle::changeAffectsVisualOverflow): Inspects shadows and text decorations
1758         (WebCore::RenderStyle::changeRequiresLayout): Calls changeAffectsVisualOverflow()
1759         (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline): Moved code from here
1760         to changeAffectsVisualOverflow().
1761         * rendering/style/RenderStyle.h: Function signature
1762
1763 2014-05-13  Enrica Casucci  <enrica@apple.com>
1764
1765         REGRESSION (WebKit2): Zooming to text field leaves it partially hidden by the form assistant.
1766         https://bugs.webkit.org/show_bug.cgi?id=132879
1767         <rdar://problem/16318049>
1768
1769         Reviewed by Benjamin Poulain.
1770
1771         Adding some exports. The fix to setScrollPosition is to avoid clamping the scroll
1772         position when using delegate scrolling.
1773
1774         * WebCore.exp.in:
1775         * platform/ScrollView.cpp:
1776         (WebCore::ScrollView::setScrollPosition):
1777
1778 2014-05-13  Brady Eidson  <beidson@apple.com>
1779
1780         Followup to: Update positioning/drawing of the image controls button.
1781         <rdar://problem/16885077> and https://bugs.webkit.org/show_bug.cgi?id=132883
1782
1783         Reviewed by Tim Horton.
1784
1785         Cleared up the actual intent behind review feedback on the original patch.
1786
1787         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
1788         (WebCore::ImageControlsButtonElementMac::maybeCreate):
1789
1790 2014-05-13  Brady Eidson  <beidson@apple.com>
1791
1792         Update positioning/drawing of the image controls button.
1793         <rdar://problem/16885077> and https://bugs.webkit.org/show_bug.cgi?id=132883
1794
1795         Reviewed by Tim Horton.
1796
1797         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
1798         (WebCore::ImageControlsButtonElementMac::maybeCreate): Add inline style for top/right
1799           positioning based on the metrics from the render theme.
1800
1801         * html/shadow/mac/imageControlsMac.css:
1802         (.x-webkit-image-controls-button): Can’t hard code any positioning.
1803
1804         * rendering/RenderTheme.h:
1805         (WebCore::RenderTheme::imageControlsButtonPositionOffset):
1806         * rendering/RenderThemeMac.h:
1807         * rendering/RenderThemeMac.mm:
1808         (WebCore::RenderThemeMac::servicesRolloverButtonCell):
1809         (WebCore::RenderThemeMac::imageControlsButtonPositionOffset):
1810
1811 2014-05-13  Simon Fraser  <simon.fraser@apple.com>
1812
1813         [iOS WK2] background-attachment:fixed behaves very poorly
1814         https://bugs.webkit.org/show_bug.cgi?id=132881
1815         <rdar://problem/16789526>
1816
1817         Reviewed by Beth Dakin.
1818
1819         Remove the old ENABLE_FAST_MOBILE_SCROLLING code, and add a setting that
1820         controls whether fixed backgrounds paint relative to the document, which
1821         is enabled for iOS (WK1 and WK2). This setting is consulted when we repaint
1822         fixed backgrounds on scrolling, when we paint them, and when we decide to make
1823         a layer for fixed backgrounds.
1824         
1825         * page/Settings.cpp:
1826         * page/Settings.in:
1827         * rendering/RenderBoxModelObject.cpp:
1828         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1829         * rendering/RenderElement.cpp:
1830         (WebCore::RenderElement::styleWillChange):
1831         (WebCore::RenderElement::willBeRemovedFromTree):
1832         (WebCore::shouldRepaintFixedBackgroundsOnScroll): Deleted.
1833         * rendering/RenderLayerCompositor.cpp:
1834         (WebCore::RenderLayerCompositor::needsFixedRootBackgroundLayer):
1835
1836 2014-05-13  Zalan Bujtas  <zalan@apple.com>
1837
1838         REGRESSSION(r168528) Subpixel rendering: Selection rect is not positioned properly when SVG text is selected.
1839         https://bugs.webkit.org/show_bug.cgi?id=132868
1840
1841         Reviewed by Dirk Schulze.
1842
1843         Scale the selection rect. r168528 missed applying this final transform on the selection/painting rect.
1844
1845         Test: svg/text/hidpi-text-selection-rect-position.html
1846
1847         * rendering/svg/SVGInlineTextBox.cpp:
1848         (WebCore::SVGInlineTextBox::selectionRectForTextFragment):
1849
1850 2014-05-13  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
1851
1852         ASSERTION FAILED: leftCategory != CalcOther && rightCategory != CalcOther
1853         in WebCore::CSSCalcBinaryOperation::createSimplified
1854         https://bugs.webkit.org/show_bug.cgi?id=132870
1855
1856         According to the standard, calc() should be able to handle angle, time
1857         and frequency values as well: http://www.w3.org/TR/css3-values/#calc
1858
1859         Reviewed by Darin Adler.
1860
1861         Test: fast/css/calc-with-angle-time-frequency.html
1862
1863         * css/CSSCalculationValue.cpp:
1864         (WebCore::unitCategory):
1865         (WebCore::CSSCalcPrimitiveValue::createCalcExpression):
1866         (WebCore::CSSCalcPrimitiveValue::computeLengthPx):
1867         (WebCore::CSSCalcPrimitiveValue::addSubtractResult):
1868         (WebCore::CSSCalcPrimitiveValue::determineCategory):
1869         (WebCore::CSSCalcBinaryOperation::primitiveType)
1870         * css/CSSCalculationValue.h: extending CalculationCategory
1871         * css/CSSParser.cpp:
1872         (WebCore::CSSParser::validCalculationUnit):
1873         * css/CSSPrimitiveValue.cpp:
1874         (WebCore::CSSPrimitiveValue::primitiveType):
1875
1876 2014-05-13  Darin Adler  <darin@apple.com>
1877
1878         Try to fix the !ENABLE(ICONDATABASE) build
1879
1880         * loader/icon/IconDatabase.h: Include WTFString.h.
1881
1882 2014-05-13  Carlos Garcia Campos  <cgarcia@igalia.com>
1883
1884         REGRESSION(r167771): [GTK] Text fields and areas are rendered unthemed
1885         https://bugs.webkit.org/show_bug.cgi?id=132864
1886
1887         Reviewed by Philippe Normand.
1888
1889         This is because the virtual methods changed the API in the parent,
1890         and since we don't have the methods marked as override we didn't
1891         noticed it. After using override keyword for all virtual methods
1892         in the derived class another problem showed up, the ActiveListBox
1893         selection methods were incorrectly named.
1894
1895         * platform/gtk/RenderThemeGtk.cpp:
1896         (WebCore::RenderThemeGtk::paintTextArea): Update to API changes in the
1897         parent class.
1898         * platform/gtk/RenderThemeGtk.h: Mark all virtual methods as
1899         override and the class as final.
1900         * platform/gtk/RenderThemeGtk2.cpp:
1901         (WebCore::RenderThemeGtk::paintTextField): Update to API changes
1902         in the parent class.
1903         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
1904         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
1905         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
1906         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):
1907         (WebCore::RenderThemeGtk::activeListBoxSelectionBackgroundColor): Deleted.
1908         (WebCore::RenderThemeGtk::inactiveListBoxSelectionBackgroundColor): Deleted.
1909         (WebCore::RenderThemeGtk::activeListBoxSelectionForegroundColor): Deleted.
1910         (WebCore::RenderThemeGtk::inactiveListBoxSelectionForegroundColor): Deleted.
1911         * platform/gtk/RenderThemeGtk3.cpp:
1912         (WebCore::RenderThemeGtk::paintTextField): Update to API changes
1913         in the parent class.
1914         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
1915         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
1916         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
1917         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):
1918         (WebCore::RenderThemeGtk::activeListBoxSelectionBackgroundColor): Deleted.
1919         (WebCore::RenderThemeGtk::inactiveListBoxSelectionBackgroundColor): Deleted.
1920         (WebCore::RenderThemeGtk::activeListBoxSelectionForegroundColor): Deleted.
1921         (WebCore::RenderThemeGtk::inactiveListBoxSelectionForegroundColor): Deleted.
1922
1923 2014-05-13  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1924
1925         [GStreamer] Move toGstClockTime to utilities
1926         https://bugs.webkit.org/show_bug.cgi?id=132702
1927
1928         Reviewed by Philippe Normand.
1929
1930         toGstClockTime should be in GStreamerUtilities and corrected typo
1931         in getGstPlayFlag.
1932
1933         No new tests needed.
1934
1935         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
1936         (WebCore::getGstPlayFlag): Renamed from getGstPlaysFlag.
1937         (WebCore::toGstClockTime): Moved from MediaPlayerPrivateGStreamer.
1938         (WebCore::getGstPlaysFlag): Deleted.
1939         * platform/graphics/gstreamer/GStreamerUtilities.h:
1940         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1941         (WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering):
1942         Corrected getGstPlayFlag typo.
1943         (WebCore::toGstClockTime): Deleted.
1944
1945 2014-05-12  Darin Adler  <darin@apple.com>
1946
1947         Make a few icon database improvements
1948         https://bugs.webkit.org/show_bug.cgi?id=132812
1949
1950         Reviewed by Brady Eidson.
1951
1952         * WebCore.exp.in: Export more IconDatabase functions, since they are now called
1953         by WebKit2 through pointers to a class marked final.
1954
1955         * loader/icon/IconDatabase.cpp: Removed unneeded includes. Use override for
1956         virtual functions.
1957
1958         * loader/icon/IconDatabase.h: Removed unneeded includes. Marked the class final.
1959         Use override for virtual functions. Use a public constructor instead of a create
1960         function.
1961
1962         * loader/icon/IconDatabaseBase.h: Removed unneeded includes.
1963
1964 2014-05-13  Kiran  <kiran.guduru@samsung.com>
1965
1966         [MediaStream] MediaStream.addTrack Should not check for active state.
1967         https://bugs.webkit.org/show_bug.cgi?id=132558
1968
1969         Reviewed by Eric Carlson.
1970
1971         MediaStream.addTrack method is checking for active state of a
1972         MediaStream, but it should not check for active state while adding a Track.
1973
1974         Test: fast/mediastream/MediaStream-add-tracks-to-inactive-stream.html
1975
1976         * Modules/mediastream/MediaStream.cpp:
1977         (WebCore::MediaStream::addTrack):
1978
1979 2014-05-12  Mark Lam  <mark.lam@apple.com>
1980
1981         WebKit2 on iOS needs to capture the main thread's floating point environment.
1982         <https://webkit.org/b/132755>
1983
1984         Reviewed by Geoffrey Garen.
1985
1986         For iOS, WorkerThread::workerThread() expects to be able to initialize the
1987         worker thread's floating point environment to be the same as the one in the
1988         main thread.  The FP env of the main thread is expected to have been captured
1989         in the mainThreadFEnv global.  On WebKit2 for iOS, we neglected to initialize
1990         mainThreadFEnv.
1991
1992         We now introduce a FloatingPointEnvironment class that will encapsulate the main
1993         thread (aka "UIThread") fenv, and we'll call FloatingPointEnv::saveMainThreadEnvironment()
1994         from ChildProcess::platformInitialize() to ensure that the FloatingPointEnvironment
1995         singleton instance is initialized properly for WebKit2.
1996
1997         In the ChildProcess::platformInitialize(), we also need to initialize the ARMv7
1998         FP env to support denormalized numbers.  We'll do this before calling
1999         saveMainThreadEnvironment().
2000
2001         Tests: fast/workers/worker-floating-point.html
2002                js/floating-point-denormalized.html
2003
2004         * WebCore.exp.in:
2005         * WebCore.xcodeproj/project.pbxproj:
2006         * platform/ios/wak/FloatingPointEnvironment.cpp: Added.
2007         (WebCore::FloatingPointEnvironment::env):
2008         (WebCore::FloatingPointEnvironment::FloatingPointEnvironment):
2009         (WebCore::FloatingPointEnvironment::enableDenormalSupport):
2010         (WebCore::FloatingPointEnvironment::saveMainThreadEnvironment):
2011         (WebCore::FloatingPointEnvironment::propagateMainThreadEnvironment):
2012         * platform/ios/wak/FloatingPointEnvironment.h: Added.
2013         * platform/ios/wak/WebCoreThread.h:
2014         * platform/ios/wak/WebCoreThread.mm:
2015         (RunWebThread):
2016         (StartWebThread):
2017         * workers/WorkerThread.cpp:
2018         (WebCore::WorkerThread::workerThread):
2019
2020 2014-05-12  Dirk Schulze  <krit@webkit.org>
2021
2022         SVG root element accepts background color but fails to repaint it
2023         https://bugs.webkit.org/show_bug.cgi?id=63153
2024
2025         Reviewed by Dean Jackson.
2026
2027         This is back ported from Blink. Don't know the exact commit though.
2028         The patch checks if the SVGSVGElement is an outermost root element.
2029         If it is, mark the whole element for repaint.
2030
2031         Test: svg/custom/svg-root-background.html
2032
2033         * rendering/RenderBoxModelObject.cpp:
2034         (WebCore::RenderBoxModelObject::calculateHasBoxDecorations):
2035         (WebCore::RenderBoxModelObject::updateFromStyle):
2036         * rendering/RenderBoxModelObject.h:
2037         * rendering/svg/RenderSVGRoot.cpp:
2038         (WebCore::RenderSVGRoot::RenderSVGRoot):
2039         (WebCore::RenderSVGRoot::layout):
2040         (WebCore::RenderSVGRoot::paintReplaced):
2041         (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint):
2042             This is a simple optimization by taking the necessary parts
2043             from RenderReplaced and SVGRenderSupport.
2044         * rendering/svg/RenderSVGRoot.h:
2045
2046 2014-05-12  Simon Fraser  <simon.fraser@apple.com>
2047
2048         [iOS] Fixed items are sometimes clipped after rubber-banding
2049         https://bugs.webkit.org/show_bug.cgi?id=132851
2050         <rdar://problem/16870790>
2051
2052         Reviewed by Benjamin Poulain.
2053
2054         On iOS fixed-position layers would get clipped to the document rect,
2055         but with rubber-banding, we can now have a custom fixed postion rect
2056         that extends outside the document rect.
2057         
2058         Another issue was that we would un-composite fixed elements sometimes
2059         when scrolling fast, again because they could fall outside of the document rect.
2060         
2061         A final issue was that pinching could reveal parts of fixed elements that should
2062         lie outside the viewport, rather than clipping the layers.
2063         
2064         Fix by converting both call points to use viewportConstrainedVisibleContentRect()
2065         rather than viewportConstrainedExtentRect(). On non-iOS platforms these are
2066         the same, but on iOS viewportConstrainedVisibleContentRect() uses the
2067         custom fixed position rect, which is the correct rect to intersect with.
2068
2069         * rendering/RenderLayerBacking.cpp:
2070         (WebCore::RenderLayerBacking::updateCompositedBounds):
2071         * rendering/RenderLayerCompositor.cpp:
2072         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2073
2074 2014-05-06  Jon Honeycutt  <jhoneycutt@apple.com>
2075
2076         Don't dispatch 'beforeload' event inside FrameView::layout()
2077
2078         https://bugs.webkit.org/show_bug.cgi?id=132621
2079         <rdar://problem/15661470>
2080
2081         This merges Blink revision 162073 with minor renaming and style
2082         changes. From that commit:
2083
2084         Executing JavaScript code inside FrameView::layout() is problematic.
2085         e.g. an assertion failure tested in fast/events/beforeload-assertion.html.
2086         We should avoid it.
2087
2088         This CL makes 'beforeload' event dispatching for plugins and iframes asynchronous,
2089         except plugin access from JavaScript code (HTMLPlugInElement::
2090         renderWidgetForJSBindings).
2091
2092         Reviewed by Brent Fulgham.
2093
2094         Tests: fast/events/beforeload-assertion.html
2095                fast/events/beforeload-iframe-crash.html
2096                fast/events/beforeload-input-time-crash.html
2097
2098         * WebCore.exp.in:
2099         * dom/Document.cpp:
2100         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
2101         * dom/Document.h:
2102         * html/HTMLAppletElement.cpp:
2103         (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
2104         * html/HTMLEmbedElement.cpp:
2105         (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
2106         * html/HTMLObjectElement.cpp:
2107         (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
2108         * page/FrameView.cpp:
2109         (WebCore::FrameView::FrameView):
2110         (WebCore::FrameView::reset):
2111         (WebCore::FrameView::updateEmbeddedObjectsTimerFired):
2112         (WebCore::FrameView::flushAnyPendingPostLayoutTasks):
2113         (WebCore::FrameView::performPostLayoutTasks):
2114         * page/FrameView.h:
2115         * testing/Internals.cpp:
2116         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
2117         * testing/Internals.h:
2118         * testing/Internals.idl:
2119
2120 2014-05-12  Roger Fong  <roger_fong@apple.com>
2121
2122         Limit number of active graphics contexts per web process.
2123         https://bugs.webkit.org/show_bug.cgi?id=132833.
2124         <rdar://problem/16888459>
2125
2126         Reviewed by Dean Jackson.
2127
2128         Test: webgl/many-contexts.html
2129
2130         * platform/graphics/GraphicsContext3D.h:
2131         * platform/graphics/mac/GraphicsContext3DMac.mm: Limit number of active contexts to 16.
2132         (WebCore::GraphicsContext3D::create):
2133         (WebCore::GraphicsContext3D::~GraphicsContext3D):
2134
2135 2014-05-12  Simon Fraser  <simon.fraser@apple.com>
2136
2137         Build fix fix.
2138
2139         * page/scrolling/ScrollingCoordinator.cpp:
2140         (WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
2141
2142 2014-05-12  Brent Fulgham  <bfulgham@apple.com>
2143
2144         DataDetectorUI doesn't update with resize
2145         https://bugs.webkit.org/show_bug.cgi?id=132830
2146         <rdar://problem/16871179>
2147
2148         Reviewed by Simon Fraser.
2149
2150         * editing/Editor.cpp:
2151         (WebCore::Editor::scanSelectionForTelephoneNumbers): Add public, no-argument
2152         version that can be called after layout changes.
2153         (WebCore::Editor::didLayout): Reprocess telephone number data
2154         since Ranges will have changed.
2155         * editing/Editor.h:
2156         * editing/FrameSelection.cpp:
2157         (WebCore::FrameSelection::updateDataDetectorsForSelection): Added.
2158         * editing/FrameSelection.h:
2159         * page/FrameView.cpp:
2160         (WebCore::FrameView::performPostLayoutTasks): Ask the FrameSelection to update the
2161         Range information for selected phone numbers.
2162
2163 2014-05-12  Simon Fraser  <simon.fraser@apple.com>
2164
2165         Fix the iOS build.
2166
2167         * page/scrolling/ScrollingCoordinator.cpp:
2168         (WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
2169
2170 2014-05-12  Simon Fraser  <simon.fraser@apple.com>
2171
2172         [iOS WK2] Fuzzy tiles on some sites on loading
2173         https://bugs.webkit.org/show_bug.cgi?id=132847
2174         <rdar://problem/16816178>
2175
2176         Reviewed by Benjamin Poulain.
2177
2178         Export WebCore::TileController::contentsScale() const
2179
2180         * WebCore.exp.in:
2181
2182 2014-05-12  Simon Fraser  <simon.fraser@apple.com>
2183
2184         Add debug dumping for ViewportConfiguration
2185         https://bugs.webkit.org/show_bug.cgi?id=132843
2186
2187         Reviewed by Benjamin Poulain.
2188
2189         Add some TextStream-based dumping for ViewportConfiguration.
2190
2191         * page/ViewportConfiguration.cpp:
2192         (WebCore::ViewportConfiguration::updateConfiguration):
2193         (WebCore::ViewportConfigurationTextStream::ViewportConfigurationTextStream):
2194         (WebCore::ViewportConfigurationTextStream::increaseIndent):
2195         (WebCore::ViewportConfigurationTextStream::decreaseIndent):
2196         (WebCore::dumpProperty):
2197         (WebCore::ViewportConfigurationTextStream::writeIndent):
2198         (WebCore::ViewportConfigurationTextStream::operator<<):
2199         (WebCore::ViewportConfiguration::description):
2200         (WebCore::ViewportConfiguration::dump):
2201         * page/ViewportConfiguration.h:
2202
2203 2014-05-12  Brady Eidson  <beidson@apple.com>
2204
2205         Followup to "Teach Editor to support more direct replacement of a Node"
2206         <rdar://problem/16817952> and https://bugs.webkit.org/show_bug.cgi?id=132834
2207
2208         Pair programmed and pair reviewed by Brady Eidson and Darin Adler.
2209
2210         * editing/mac/EditorMac.mm:
2211         (WebCore::maybeCopyNodeAttributesToFragment):
2212         (WebCore::Editor::replaceNodeFromPasteboard):
2213
2214 2014-05-12  Beth Dakin  <bdakin@apple.com>
2215
2216         Content shadow layer needs to move in sync with the content layer
2217         https://bugs.webkit.org/show_bug.cgi?id=132841
2218         -and corresponding-
2219         <rdar://problem/16641115>
2220
2221         Reviewed by Simon Fraser.
2222
2223         Now that the root content layer moves a little bit (for y scroll positions between 
2224         0 and topContentInset), the shadow layer needs to move along with it since the 
2225         shadow layer should always have the same position as the root content layer.
2226
2227         Set the root state node’s shadow layer, and update the position whenever the root 
2228         content layer’s position is updated.
2229         * page/scrolling/AsyncScrollingCoordinator.cpp:
2230         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
2231         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
2232
2233         Fetch the compositor’s layerForContentShadow().
2234         * page/scrolling/ScrollingCoordinator.cpp:
2235         (WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
2236         * page/scrolling/ScrollingCoordinator.h:
2237
2238         Hook up the contentShadowLayer in the state node.
2239         * page/scrolling/ScrollingStateScrollingNode.cpp:
2240         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
2241         (WebCore::ScrollingStateScrollingNode::setContentShadowLayer):
2242
2243         Hook it up in the ScrollingTreeNode as well. Move the layer whenever the m
2244         _scrolledContentsLayer is moved.
2245         * page/scrolling/ScrollingStateScrollingNode.h:
2246         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
2247         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2248         (WebCore::ScrollingTreeScrollingNodeMac::updateBeforeChildren):
2249         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
2250
2251         The shadow layer needs an anchor point now that we are moving it around.
2252         * rendering/RenderLayerCompositor.cpp:
2253         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
2254
2255 2014-05-12  Dirk Schulze  <krit@webkit.org>
2256
2257         <svg> with opacity and compositing double-applies its opacity
2258         https://bugs.webkit.org/show_bug.cgi?id=116856
2259
2260         Reviewed by Simon Fraser.
2261
2262         The opacity is applied by the compositor. However, all SVG elements
2263         create transparency layers on their own to apply opacity. So did
2264         SVGSVGElement.
2265
2266         Added a check if the current element has a compositing layer and skip
2267         creating transparency layer if it has.
2268
2269         Test: svg/custom/composited-svg-with-opacity.html
2270
2271         * rendering/svg/SVGRenderingContext.cpp:
2272         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2273
2274 2014-05-12  Brady Eidson  <beidson@apple.com>
2275
2276         Teach Editor to support more direct replacement of a Node
2277         <rdar://problem/16817952> and https://bugs.webkit.org/show_bug.cgi?id=132834
2278
2279         Reviewed by Enrica Casucci.
2280
2281         The new method "Editor::replaceNodeFromPasteboard" has the intent that the new DocumentFragment
2282         from the pasteboard is as similar to the old Node as possible.
2283
2284         In practice, the new DocumentFragment:
2285         1 - Can represent a single node that's missing various attributes the original Node had.
2286         2 - Can be an unwanted fragment of arbitrary depth when the replacement happens inside Mail.app
2287
2288         This fixes both of these issues.
2289
2290         Add a MailBlockquoteHandling enum class for various Editor operations to pass through to the
2291         ReplaceSelectionCommand:
2292         * editing/Editor.cpp:
2293         (WebCore::Editor::handleTextEvent):
2294         (WebCore::Editor::pasteAsFragment):
2295         (WebCore::Editor::pasteWithPasteboard):
2296         (WebCore::Editor::replaceSelectionWithFragment):
2297         * editing/Editor.h:
2298
2299         * dom/TextEvent.cpp:
2300         (WebCore::TextEvent::createForPlainTextPaste):
2301         (WebCore::TextEvent::createForFragmentPaste):
2302         (WebCore::TextEvent::TextEvent):
2303         * dom/TextEvent.h:
2304         (WebCore::TextEvent::mailBlockquoteHandling):
2305
2306         * editing/ReplaceSelectionCommand.cpp:
2307         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
2308         (WebCore::ReplaceSelectionCommand::doApply): Consider whether or not this particular Editor
2309           operation was meant to give special consideration to Mail's Blockquotes.
2310         * editing/ReplaceSelectionCommand.h:
2311
2312         * editing/efl/EditorEfl.cpp:
2313         (WebCore::Editor::pasteWithPasteboard):
2314         * editing/ios/EditorIOS.mm:
2315         (WebCore::Editor::pasteWithPasteboard):
2316
2317         * editing/mac/EditorMac.mm:
2318         (WebCore::Editor::pasteWithPasteboard):
2319         (WebCore::Editor::readSelectionFromPasteboard):
2320         (WebCore::maybeCopyNodeAttributesToFragment): If the new DocumentFragment represents a single HTML node
2321           with the same tag name is the original HTML node, copy over most attributes from the original node.
2322         (WebCore::Editor::replaceNodeFromPasteboard): Create the fragment, run it through maybeCopyNodeAttributesToFragment.
2323
2324         * WebCore.exp.in:
2325
2326 2014-05-12  Alex Christensen  <achristensen@webkit.org>
2327
2328         Progress on web timing.
2329         https://bugs.webkit.org/show_bug.cgi?id=132574
2330
2331         Reviewed by Alexey Proskuryakov.
2332
2333         * CMakeLists.txt:
2334         Removed ResourceLoadTiming.cpp.
2335         * WebCore.exp.in:
2336         Added linker symbols for ResourceLoadTiming.
2337         * WebCore.xcodeproj/project.pbxproj:
2338         * WebCore.vcxproj/WebCore.vcxproj:
2339         * WebCore.vcxproj/WebCore.vcxproj.filters:
2340         Removed ResourceLoadTiming.cpp.
2341         * inspector/InspectorResourceAgent.cpp:
2342         (WebCore::buildObjectForTiming):
2343         * inspector/protocol/Network.json:
2344         Updated ResourceTiming structure.
2345         * loader/DocumentLoadTiming.cpp:
2346         (WebCore::DocumentLoadTiming::setNavigationStart):
2347         * loader/DocumentLoadTiming.h:
2348          Deleted unused setNavigationStart function.
2349         * page/Performance.idl:
2350         Updated spec URL.
2351         * page/PerformanceResourceTiming.cpp:
2352         (WebCore::PerformanceResourceTiming::domainLookupStart):
2353         (WebCore::PerformanceResourceTiming::domainLookupEnd):
2354         (WebCore::PerformanceResourceTiming::connectStart):
2355         (WebCore::PerformanceResourceTiming::secureConnectionStart):
2356         (WebCore::PerformanceResourceTiming::responseEnd):
2357         Updated ResourceLoadTiming member variable names.
2358         (WebCore::PerformanceResourceTiming::responseStart):
2359         * page/PerformanceResourceTiming.h:
2360         * page/PerformanceResourceTiming.idl:
2361         Deleted responseStart because it is not in the spec.
2362         * page/PerformanceTiming.cpp:
2363         (WebCore::PerformanceTiming::domainLookupStart):
2364         (WebCore::PerformanceTiming::domainLookupEnd):
2365         (WebCore::PerformanceTiming::connectStart):
2366         (WebCore::PerformanceTiming::secureConnectionStart):
2367         (WebCore::PerformanceTiming::requestStart):
2368         (WebCore::PerformanceTiming::responseStart):
2369         Updated ResourceLoadTiming member variable names.
2370         (WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute):
2371         Use navigationStart as base for resource load times.
2372         * page/PerformanceTiming.idl:
2373         Updated spec URL.
2374         * platform/network/HTTPParsers.h:
2375         Removed unused class declarations.
2376         * platform/network/ResourceHandle.h:
2377         Moved soup request time from ResourceLoadTiming to ResourceHandle.
2378         * platform/network/ResourceLoadTiming.cpp: Removed.
2379         * platform/network/ResourceLoadTiming.h:
2380         (WebCore::ResourceLoadTiming::deepCopy):
2381         (WebCore::ResourceLoadTiming::operator==):
2382         (WebCore::ResourceLoadTiming::ResourceLoadTiming):
2383         Updated ResourceLoadTiming member variable names.
2384         * platform/network/mac/ResourceHandleMac.mm:
2385         (WebCore::ResourceHandle::createNSURLConnection):
2386         Collect timing data.
2387         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
2388         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
2389         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
2390         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
2391         Save timing data to a ResourceLoadTiming on the ResourceResponse.
2392         * platform/network/soup/ResourceHandleSoup.cpp:
2393         (WebCore::gotHeadersCallback):
2394         (WebCore::restartedCallback):
2395         (WebCore::milisecondsSinceRequest):
2396         (WebCore::ResourceHandle::didStartRequest):
2397         (WebCore::networkEventCallback):
2398         (WebCore::createSoupMessageForHandleAndRequest):
2399         (WebCore::ResourceHandle::sendPendingRequest):
2400         Updated ResourceLoadTiming member variable names.
2401         (WebCore::wroteBodyCallback): Deleted.
2402
2403 2014-05-12  Dirk Schulze  <krit@webkit.org>
2404
2405         SVG outline property is broken and inefficient
2406         https://bugs.webkit.org/show_bug.cgi?id=113666
2407
2408         Reviewed by Dean Jackson.
2409
2410         Patch by Erik Dahlström backported from Blink.
2411
2412         "[SVG2] css 'outline' property should apply to svg elements 
2413
2414         The 'outline' property was only partially working in SVG before
2415         this patch, this makes it work on text and text content child
2416         elements too. 
2417
2418         This makes SVG render the outlines as part of the foreground paint
2419         phase. 
2420
2421         Partly based on Florin Malita's webkit patch https://bugs.webkit.org/show_bug.cgi?id=113666#c12."
2422
2423         Tests: svg/custom/outline-stacking-expected.svg
2424                svg/custom/outline-stacking.svg
2425                svg/custom/rgba-color-outline.svg
2426                svg/text/text-outline-expected.svg
2427                svg/text/text-outline-rgba.html
2428                svg/text/text-outline.html
2429                svg/text/textpath-outline-expected.svg
2430                svg/text/textpath-outline.svg
2431                svg/text/tspan-multiple-outline.svg
2432                svg/text/tspan-outline-2-expected.svg
2433                svg/text/tspan-outline-2.svg
2434                svg/text/tspan-outline-expected.svg
2435                svg/text/tspan-outline.html
2436
2437         * rendering/svg/RenderSVGContainer.cpp:
2438         (WebCore::RenderSVGContainer::paint): Draw outline in forground
2439             paint phase.
2440         * rendering/svg/RenderSVGImage.cpp:
2441         (WebCore::RenderSVGImage::paint): Draw outline in forground
2442             paint phase.
2443         * rendering/svg/RenderSVGRoot.cpp:
2444         (WebCore::RenderSVGRoot::paintReplaced): Pass paint offset.
2445         * rendering/svg/RenderSVGShape.cpp:
2446         (WebCore::RenderSVGShape::paint): Draw outline in forground
2447             paint phase.
2448         * rendering/svg/RenderSVGText.cpp:
2449         (WebCore::RenderSVGText::paint): Draw outline in forground
2450             paint phase.
2451         * rendering/svg/SVGInlineFlowBox.cpp:
2452         (WebCore::SVGInlineFlowBox::paint): Pass paint offset.
2453         * rendering/svg/SVGInlineTextBox.cpp:
2454         (WebCore::SVGInlineTextBox::paint): Draw outline in forground
2455             paint phase.
2456         * rendering/svg/SVGRootInlineBox.cpp:
2457         (WebCore::SVGRootInlineBox::paint): Pass paint offset.
2458
2459 2014-05-12  Beth Dakin  <bdakin@apple.com>
2460
2461         Layer for bottom overhang area needs to be offset by the topContentInset
2462         https://bugs.webkit.org/show_bug.cgi?id=132835
2463         -and corresponding-
2464         <rdar://problem/16641115>
2465
2466         Reviewed by Simon Fraser.
2467
2468         Push this layer down by the topContentInset in addition to the root layer height, 
2469         footer height, and header height.
2470         * rendering/RenderLayerCompositor.cpp:
2471         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
2472
2473 2014-05-09  Jon Honeycutt  <jhoneycutt@apple.com>
2474
2475         REGRESSION (r167818): editing/inserting/typing-space-to-trigger-smart-link.html fails on WebKit1 bots
2476
2477         <https://bugs.webkit.org/show_bug.cgi?id=132207>
2478         <rdar://problem/16730393>
2479
2480         Reverts the previous workaround in favor of a more specific fix for the
2481         null dereference.
2482
2483         Reviewed by Darin Adler.
2484
2485         * editing/ApplyStyleCommand.cpp:
2486         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
2487         Check whether the run's start and end are still in the document, as
2488         removeConflictingInlineStyleFromRun() may have removed them.
2489
2490         * editing/CompositeEditCommand.cpp:
2491         (WebCore::CompositeEditCommand::apply):
2492         Reverted previous workaround.
2493         (WebCore::ApplyEditCommand::ReentrancyGuard::isRecursiveCall): Deleted.
2494         (WebCore::ApplyEditCommand::ReentrancyGuard::Scope::Scope): Deleted.
2495         (WebCore::ApplyEditCommand::ReentrancyGuard::Scope::~Scope): Deleted.
2496
2497 2014-05-12  Zan Dobersek  <zdobersek@igalia.com>
2498
2499         Clean up CrossThreadTask
2500         https://bugs.webkit.org/show_bug.cgi?id=132800
2501
2502         Reviewed by Darin Adler.
2503
2504         Remove the createCallbackTask overloads and the related CrossThreadTask helper classes.
2505
2506         Instead, have one simple CrossThreadTask class that derives from ScriptExecutionContext::Task.
2507         Its templated constructor takes in the method and the variadic pack of parameters. The cross-thread
2508         copies of the parameters are then bound to that method and the resulting bind expression is used to
2509         initialize the base class. The bind expression is constructed with a placeholder for the
2510         ScriptExecutionContext* parameter that's provided through ScriptExecutionContext::Task::performTask().
2511
2512         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
2513         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
2514         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
2515         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
2516         (WebCore::ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount):
2517         (WebCore::ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake):
2518         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
2519         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageError):
2520         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
2521         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2522         (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
2523         (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
2524         (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
2525         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
2526         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
2527         (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
2528         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
2529         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
2530         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
2531         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
2532         (WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize):
2533         (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
2534         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
2535         (WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
2536         (WebCore::WorkerThreadableWebSocketChannel::Bridge::close):
2537         (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
2538         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
2539         (WebCore::WorkerThreadableWebSocketChannel::Bridge::suspend):
2540         (WebCore::WorkerThreadableWebSocketChannel::Bridge::resume):
2541         * dom/CrossThreadTask.h:
2542         (WebCore::CrossThreadTask::CrossThreadTask):
2543         (WebCore::CrossThreadTask1::CrossThreadTask1): Deleted.
2544         (WebCore::CrossThreadTask1::performTask): Deleted.
2545         (WebCore::CrossThreadTask2::CrossThreadTask2): Deleted.
2546         (WebCore::CrossThreadTask2::performTask): Deleted.
2547         (WebCore::CrossThreadTask3::CrossThreadTask3): Deleted.
2548         (WebCore::CrossThreadTask3::performTask): Deleted.
2549         (WebCore::CrossThreadTask4::CrossThreadTask4): Deleted.
2550         (WebCore::CrossThreadTask4::performTask): Deleted.
2551         (WebCore::CrossThreadTask5::CrossThreadTask5): Deleted.
2552         (WebCore::CrossThreadTask5::performTask): Deleted.
2553         (WebCore::CrossThreadTask6::CrossThreadTask6): Deleted.
2554         (WebCore::CrossThreadTask6::performTask): Deleted.
2555         (WebCore::CrossThreadTask7::CrossThreadTask7): Deleted.
2556         (WebCore::CrossThreadTask7::performTask): Deleted.
2557         (WebCore::CrossThreadTask8::CrossThreadTask8): Deleted.
2558         (WebCore::CrossThreadTask8::performTask): Deleted.
2559         (WebCore::createCallbackTask): Deleted.
2560         * fileapi/FileReader.cpp:
2561         (WebCore::FileReader::abort):
2562         * loader/WorkerThreadableLoader.cpp:
2563         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
2564         (WebCore::WorkerThreadableLoader::MainThreadBridge::destroy):
2565         (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):
2566         (WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
2567         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
2568         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
2569         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
2570         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
2571         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
2572         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
2573         * loader/WorkerThreadableLoader.h:
2574         * loader/cache/MemoryCache.cpp:
2575         (WebCore::MemoryCache::removeRequestFromCache):
2576         (WebCore::MemoryCache::removeRequestFromSessionCaches):
2577         * workers/DefaultSharedWorkerRepository.cpp:
2578         (WebCore::SharedWorkerProxy::postExceptionToWorkerObject):
2579         (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
2580         * workers/WorkerMessagingProxy.cpp:
2581         (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
2582         (WebCore::WorkerMessagingProxy::workerObjectDestroyed):
2583         (WebCore::WorkerMessagingProxy::connectToInspector):
2584         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
2585         (WebCore::WorkerMessagingProxy::sendMessageToInspector):
2586
2587 2014-05-12  Alex Christensen  <achristensen@webkit.org>
2588
2589         Implement EXT_shader_texture_lod in WebGL.
2590         https://bugs.webkit.org/show_bug.cgi?id=128985
2591         <rdar://problem/16111396>
2592
2593         Based on Chromium patch by bajones@chromium.org.
2594         https://src.chromium.org/viewvc/blink?revision=171465&view=revision
2595
2596         Reviewed by Dean Jackson.
2597
2598         Test: webgl/conformance/extensions/ext-shader-texture-lod.html
2599         
2600         * CMakeLists.txt:
2601         * DerivedSources.cpp:
2602         * DerivedSources.make:
2603         * WebCore.vcxproj/WebCore.vcxproj:
2604         * WebCore.vcxproj/WebCore.vcxproj.filters:
2605         * WebCore.xcodeproj/project.pbxproj:
2606         Added new EXTShaderTextureLOD files.
2607         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2608         (WebCore::toJS):
2609         Added EXTShaderTextureLOD.
2610         * html/canvas/EXTShaderTextureLOD.cpp: Added.
2611         (WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):
2612         (WebCore::EXTShaderTextureLOD::~EXTShaderTextureLOD):
2613         (WebCore::EXTShaderTextureLOD::getName):
2614         * html/canvas/EXTShaderTextureLOD.h: Added.
2615         * html/canvas/EXTShaderTextureLOD.idl: Added.
2616         * html/canvas/WebGLExtension.h:
2617         Added EXTShaderTextureLODName.
2618         * html/canvas/WebGLObject.cpp:
2619         Removed unused inclusion of EXTTextureFilterAnisotropic.h.
2620         * html/canvas/WebGLRenderingContext.cpp:
2621         (WebCore::WebGLRenderingContext::getExtension):
2622         Added EXT_shader_texture_lod.
2623         * html/canvas/WebGLRenderingContext.h:
2624         Added a EXTShaderTextureLOD member variable.
2625
2626 2014-05-12  Martin Hock  <mhock@apple.com>
2627
2628         Disallow drag and drop of non-displayable resources.
2629         https://bugs.webkit.org/show_bug.cgi?id=132745
2630         <rdar://problem/10562662>
2631
2632         Reviewed by Alexey Proskuryakov.
2633
2634         Test: http/tests/security/drag-drop-local-file.html
2635
2636         * page/DragController.cpp:
2637         (WebCore::DragController::startDrag):
2638
2639 2014-05-12  Jozsef Berta  <jberta.u-szeged@partner.samsung.com>
2640
2641         WinCairo buildfix after r168611
2642         https://bugs.webkit.org/show_bug.cgi?id=132825
2643
2644         Reviewed by Darin Adler.
2645
2646         * platform/network/curl/CurlDownload.cpp:
2647         (WebCore::CurlDownloadManager::downloadThread):
2648         (WebCore::CurlDownload::didReceiveHeader):
2649         (WebCore::CurlDownload::didReceiveData):
2650
2651 2014-05-12  Antti Koivisto  <antti@apple.com>
2652
2653         REGRESSION (r159560): Text clips on tile border if line-height < font-size
2654         https://bugs.webkit.org/show_bug.cgi?id=132822
2655
2656         Reviewed by Andreas Kling.
2657         
2658         The first line of simple line layout run range was miscomputed.
2659
2660         Test: fast/text/simple-lines-range-low-line-height.html
2661
2662         * rendering/SimpleLineLayoutResolver.h:
2663         (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
2664         
2665             Lines may overlap if line-height < font-size. Apply different adjustment when searching for range begin
2666             so that overflowing earlier lines are taken into account.
2667
2668         (WebCore::SimpleLineLayout::RunResolver::rangeForRect):
2669
2670 2014-05-12  Radu Stavila  <stavila@adobe.com>
2671
2672         Invalid information remaining in lineToRegion map of RenderFlowThread.
2673         https://bugs.webkit.org/show_bug.cgi?id=132690
2674
2675         Reviewed by Antti Koivisto.
2676
2677         Test: fast/multicol/newmulticol/lines-region-map-crash.html
2678
2679         * rendering/RenderFlowThread.cpp:
2680         (WebCore::RenderFlowThread::deleteLines):
2681         * rendering/RenderFlowThread.h:
2682
2683 2014-05-12  Zan Dobersek  <zdobersek@igalia.com>
2684
2685         Clean up MainThreadTask
2686         https://bugs.webkit.org/show_bug.cgi?id=132799
2687
2688         Reviewed by Darin Adler.
2689
2690         Only have one simple MainThreadTask class that derives from std::function<void ()>.
2691         Its templated constructor takes in the method and a variadic pack of parameters.
2692         The cross-thread copies of the parameter are then bound to the given method through
2693         std::bind(), with the resulting bind expression used to initialize the base
2694         std::function<void ()> class.
2695
2696         The WebCore::callOnMainThread() functions and the helper classes are removed in favor
2697         of passing MainThreadTask rvalues directly to WTF::callOnMainThread().
2698
2699         * fileapi/AsyncFileStream.cpp:
2700         (WebCore::AsyncFileStream::startOnFileThread):
2701         (WebCore::AsyncFileStream::stopOnFileThread):
2702         (WebCore::AsyncFileStream::getSizeOnFileThread):
2703         (WebCore::AsyncFileStream::openForReadOnFileThread):
2704         (WebCore::AsyncFileStream::openForWriteOnFileThread):
2705         (WebCore::AsyncFileStream::readOnFileThread):
2706         (WebCore::AsyncFileStream::writeOnFileThread):
2707         (WebCore::AsyncFileStream::truncateOnFileThread):
2708         * platform/MainThreadTask.h:
2709         (WebCore::MainThreadTask::MainThreadTask):
2710         (WebCore::MainThreadTaskBase::MainThreadTaskBase): Deleted.
2711         (WebCore::MainThreadTaskBase::~MainThreadTaskBase): Deleted.
2712         (WebCore::MainThreadTask1::create): Deleted.
2713         (WebCore::MainThreadTask1::MainThreadTask1): Deleted.
2714         (WebCore::MainThreadTask2::create): Deleted.
2715         (WebCore::MainThreadTask2::MainThreadTask2): Deleted.
2716         (WebCore::MainThreadTask3::create): Deleted.
2717         (WebCore::MainThreadTask3::MainThreadTask3): Deleted.
2718         (WebCore::MainThreadTask4::create): Deleted.
2719         (WebCore::MainThreadTask4::MainThreadTask4): Deleted.
2720         (WebCore::MainThreadTask5::create): Deleted.
2721         (WebCore::MainThreadTask5::MainThreadTask5): Deleted.
2722         (WebCore::MainThreadTask6::create): Deleted.
2723         (WebCore::MainThreadTask6::MainThreadTask6): Deleted.
2724         (WebCore::MainThreadTask7::create): Deleted.
2725         (WebCore::MainThreadTask7::MainThreadTask7): Deleted.
2726         (WebCore::MainThreadTask8::create): Deleted.
2727         (WebCore::MainThreadTask8::MainThreadTask8): Deleted.
2728         (WebCore::executeMainThreadTask): Deleted.
2729         (WebCore::callOnMainThread): Deleted.
2730
2731 2014-05-11  Zan Dobersek  <zdobersek@igalia.com>
2732
2733         Simplify FileThread::Task usage
2734         https://bugs.webkit.org/show_bug.cgi?id=132798
2735
2736         Reviewed by Darin Adler.
2737
2738         Remove the createFileThreadTask functions and the related FileThreadTask helper classes.
2739
2740         Instead, the FileThread::Task class now has a templated constructor that takes in a pointer
2741         to the object instance, a method, and a variadic pack of parameters. The pointer and the
2742         cross-thread copies of all the parameters are then bound to the given method through std::bind().
2743
2744         Instead of createFileThreadTask, std::make_unique<>() should be used to construct unique pointers
2745         that wrap FileThread::Task objects.
2746
2747         * WebCore.vcxproj/WebCore.vcxproj:
2748         * WebCore.vcxproj/WebCore.vcxproj.filters:
2749         * WebCore.xcodeproj/project.pbxproj:
2750         * fileapi/AsyncFileStream.cpp:
2751         (WebCore::AsyncFileStream::create):
2752         (WebCore::AsyncFileStream::stop):
2753         (WebCore::AsyncFileStream::getSize):
2754         (WebCore::AsyncFileStream::openForRead):
2755         (WebCore::AsyncFileStream::openForWrite):
2756         (WebCore::AsyncFileStream::close):
2757         (WebCore::AsyncFileStream::read):
2758         (WebCore::AsyncFileStream::write):
2759         (WebCore::AsyncFileStream::truncate):
2760         * fileapi/FileThread.h:
2761         (WebCore::FileThread::Task::Task):
2762         (WebCore::FileThread::Task::performTask):
2763         (WebCore::FileThread::Task::~Task): Deleted.
2764         * fileapi/FileThreadTask.h: Removed.
2765
2766 2014-05-11  Benjamin Poulain  <benjamin@webkit.org>
2767
2768         Do not create a temporary string to append the SVGLength's unit
2769         https://bugs.webkit.org/show_bug.cgi?id=132807
2770
2771         Reviewed by Geoffrey Garen.
2772
2773         * svg/SVGLength.cpp:
2774         (WebCore::lengthTypeToString):
2775         The caller just append the string to a number string. The function
2776         lengthTypeToString() was creating a new WTF::String from scratch,
2777         copied the characters to make a new string, and destroyed the WTF::String.
2778
2779         Instead, just append the string literal.
2780
2781 2014-05-11  Yusuke Suzuki  <utatane.tea@gmail.com>
2782
2783         CSS JIT: reduce cost of computing backtracking height
2784         https://bugs.webkit.org/show_bug.cgi?id=132546
2785
2786         Reviewed by Benjamin Poulain.
2787
2788         Because compiler previously compute backtracking height for
2789         previous child fragment, by leveraging this, we can limit the
2790         `maxPrefixSize` for `computeBacktrackingHeightFromDescendant`.
2791
2792         For example, consider selector "c>a>b>d>a>b e"'s descendant chain,
2793         "c>a>b>d>a>b".
2794
2795         At the <a> position, we have matching pattern [b, a, d, b, a] and
2796         calculate the backtracking height by following method.
2797
2798         pattern:    [b, a, d, b, a]
2799         candidate0:    [b, a, d, b]  => Not matched.
2800         candidate1:       [b, a, d]  => Not matched.
2801         candidate2:          [b, a]  => Matched against the pattern.
2802
2803         At this time, first candidate0's pattern size is `pattern.size() - 1`.
2804         And get backtracking height from descendant 3, that is
2805         `pattern.size() - candidate.size()`, `5 - 2`.
2806
2807         And next, at the <c> position, we calcucate the backtracking height
2808         for this pattern.
2809
2810         pattern:    [b, a, d, b, a, c]
2811         candidate0:    [b, a, d, b, a]  => Not matched.
2812         candidate1:       [b, a, d, b]  => Not matched.
2813         candidate2:          [b, a, d]  => Not matched.
2814         candidate3:             [b, a]  => Not matched.
2815         candidate4:                [b]  => Not matched.
2816         candidate5:                 []  => Matched against the pattern.
2817
2818         Then, we get the backtracking height, which is 6 (6 - 0).
2819         However, in the above case, we already know that attempts from candidate0
2820         to candidate1 always fail, since parts of these are already tested at
2821         the <b> position trial and we know they don't match.
2822
2823         So in this case, we should start this computation from candidate2,
2824         such as,
2825
2826         pattern:    [b, a, d, b, a, c]
2827         candidate2:          [b, a, d]  => Not matched.
2828         candidate3:             [b, a]  => Not matched.
2829         candidate4:                [b]  => Not matched.
2830         candidate5:                 []  => Matched against the pattern.
2831
2832         We can start computation with candidate size
2833         `pattern.size() - previousChildFragmentBacktrackingHeight`.
2834         In this example, `pattern.size()` is 6 and
2835         `previousChildFragmentBacktrackingHeight` is 3, so candidate size is
2836         3, that is candidate2.
2837
2838         * cssjit/SelectorCompiler.cpp:
2839         (WebCore::SelectorCompiler::computeBacktrackingStartHeightFromDescendant):
2840         (WebCore::SelectorCompiler::computeBacktrackingHeightFromDescendant):
2841
2842 2014-05-11  Beth Dakin  <bdakin@apple.com>
2843
2844         Headers and footers are not positioned correctly with topContentInset
2845         https://bugs.webkit.org/show_bug.cgi?id=132787
2846         -and corresponding-
2847         <rdar://problem/16641115>
2848
2849         Reviewed by Tim Horton.
2850
2851         Headers and footers need to take the inset into account, and they also need to 
2852         factor in the fact that the root layer moves around now too.
2853
2854         The existing yPositionForRootContentLayer() is actually the right calculation for 
2855         the header layer. The root content layer wants that value, but pushed down by the 
2856         header height. Now there are static functions for both of them and the footer to 
2857         avoid duplicated code in the three spots where we need this information.
2858         * page/FrameView.cpp:
2859         (WebCore::FrameView::yPositionForHeaderLayer):
2860         (WebCore::FrameView::yPositionForRootContentLayer):
2861         (WebCore::FrameView::yPositionForFooterLayer):
2862         * page/FrameView.h:
2863
2864         Use the static functions to compute the layer positions.
2865         * page/scrolling/AsyncScrollingCoordinator.cpp:
2866         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
2867
2868         How did headers ever work with this bug?? I don’t know. We need to return that 
2869         layer.
2870         * page/scrolling/ScrollingCoordinator.cpp:
2871         (WebCore::ScrollingCoordinator::headerLayerForFrameView):
2872
2873         Use the static functions to compute the layer positions.
2874         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2875         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
2876         * rendering/RenderLayerCompositor.cpp:
2877         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
2878         (WebCore::RenderLayerCompositor::updateLayerForHeader):
2879         (WebCore::RenderLayerCompositor::updateLayerForFooter):
2880
2881 2014-05-11  Zalan Bujtas  <zalan@apple.com>
2882
2883         Subpixel rendering[iOS]: <select> decoration is misaligned when the renderer is on subpixel position.
2884         https://bugs.webkit.org/show_bug.cgi?id=132779
2885         <rdar://problem/16631071>
2886
2887         Reviewed by Simon Fraser.
2888
2889         Push <select> theme decoration's rect to device pixel position to ensure
2890         that the theme bounds are aligned with the renderer's bounds. (in painting terms)
2891         However, as the decoration code paints multiple items, they all need to use snapped 
2892         final coordinates for painting : tracked here https://bugs.webkit.org/show_bug.cgi?id=132780
2893         This patch also changes the padding values for <select> [iOS] to compensate for the integer
2894         truncation that happened before subpixel. 
2895
2896         Not testable.
2897
2898         * css/html.css:
2899         (select):
2900         * platform/efl/RenderThemeEfl.cpp:
2901         (WebCore::RenderThemeEfl::paintMenuListButtonDecorations):
2902         * platform/efl/RenderThemeEfl.h:
2903         * platform/gtk/RenderThemeGtk.cpp:
2904         (WebCore::RenderThemeGtk::paintMenuListButtonDecorations):
2905         * platform/gtk/RenderThemeGtk.h:
2906         * rendering/RenderTheme.cpp:
2907         (WebCore::RenderTheme::paintDecorations):
2908         * rendering/RenderTheme.h:
2909         (WebCore::RenderTheme::paintMenuListButtonDecorations):
2910         * rendering/RenderThemeIOS.h:
2911         * rendering/RenderThemeIOS.mm:
2912         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
2913         * rendering/RenderThemeMac.h:
2914         * rendering/RenderThemeMac.mm:
2915         (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
2916         * rendering/RenderThemeSafari.cpp:
2917         (WebCore::RenderThemeSafari::paintMenuListButtonDecorations):
2918         * rendering/RenderThemeSafari.h:
2919         * rendering/RenderThemeWin.cpp:
2920         (WebCore::RenderThemeWin::paintMenuList):
2921         (WebCore::RenderThemeWin::paintMenuListButtonDecorations):
2922         * rendering/RenderThemeWin.h:
2923
2924 2014-05-11  Zan Dobersek  <zdobersek@igalia.com>
2925
2926         Move Source/WebCore/workers/ code to std::unique_ptr
2927         https://bugs.webkit.org/show_bug.cgi?id=132401
2928
2929         Reviewed by Darin Adler.
2930
2931         Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/workers (and related places)
2932         with std::unique_ptr.
2933
2934         * bindings/js/JSDOMWindowCustom.cpp:
2935         (WebCore::JSDOMWindow::setTimeout):
2936         (WebCore::JSDOMWindow::setInterval):
2937         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
2938         (WebCore::JSWorkerGlobalScope::setTimeout):
2939         (WebCore::JSWorkerGlobalScope::setInterval):
2940         * bindings/js/ScheduledAction.cpp:
2941         (WebCore::ScheduledAction::create):
2942         * bindings/js/ScheduledAction.h:
2943         * page/DOMTimer.cpp:
2944         (WebCore::DOMTimer::DOMTimer):
2945         (WebCore::DOMTimer::install):
2946         (WebCore::DOMTimer::fired):
2947         (WebCore::DOMTimer::didStop):
2948         * page/DOMTimer.h:
2949         * page/DOMWindow.cpp:
2950         (WebCore::DOMWindow::setTimeout):
2951         (WebCore::DOMWindow::setInterval):
2952         * page/DOMWindow.h:
2953         * workers/WorkerEventQueue.h:
2954         * workers/WorkerGlobalScope.cpp:
2955         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
2956         (WebCore::WorkerGlobalScope::setTimeout):
2957         (WebCore::WorkerGlobalScope::setInterval):
2958         * workers/WorkerGlobalScope.h:
2959         (WebCore::WorkerGlobalScope::clearScript):
2960         * workers/WorkerLoaderProxy.h:
2961         * workers/WorkerMessagingProxy.h:
2962         * workers/WorkerRunLoop.cpp:
2963         (WebCore::WorkerRunLoop::WorkerRunLoop):
2964         * workers/WorkerRunLoop.h:
2965         * workers/WorkerScriptLoader.cpp:
2966         (WebCore::WorkerScriptLoader::loadSynchronously):
2967         (WebCore::WorkerScriptLoader::loadAsynchronously):
2968         (WebCore::WorkerScriptLoader::createResourceRequest):
2969         * workers/WorkerScriptLoader.h:
2970         * workers/WorkerThread.cpp:
2971         (WebCore::WorkerThread::WorkerThread):
2972         (WebCore::WorkerThread::workerThread):
2973         (WebCore::WorkerThreadStartupData::create): Deleted.
2974         * workers/WorkerThread.h:
2975
2976 2014-05-09  Myles C. Maxfield  <litherum@gmail.com>
2977
2978         [Mac] [iOS] Underlines are too low
2979         https://bugs.webkit.org/show_bug.cgi?id=132770
2980
2981         Reviewed by Darin Adler.
2982
2983         computeUnderlineOffset() inside InlineTextBox.cpp lowers underlines from text
2984         baseline by a value that is proportional to the font size. However, this
2985         lowering was done a second time in
2986         GraphicsContext::computeLineBoundsAndAntialiasingModeForText(). This patch
2987         removes this second, platform-dependent lowering.
2988
2989         This duplication was caused by merging iOS into open source, where iOS used
2990         the GraphicsContext approach and open source used the InlineTextBox approach.
2991
2992         Covered by fast/css3-text/css3-text-decoration/text-decoration-thickness.html.
2993
2994         * platform/graphics/GraphicsContext.cpp:
2995         (WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText): Remove
2996         redundant lowering code
2997         * rendering/InlineTextBox.cpp:
2998         (WebCore::InlineTextBox::paintDecoration): Clean up textDecorationThickness
2999         variable
3000
3001 2014-05-11  Antti Koivisto  <antti@apple.com>
3002
3003         Text with simple line layout not getting pushed below float when there is not enough space for it
3004         https://bugs.webkit.org/show_bug.cgi?id=126991
3005
3006         Reviewed by Andreas Kling.
3007
3008         Tests: fast/text/simple-lines-intruding-wide-float-dynamic.html
3009                fast/text/simple-lines-intruding-wide-float.html
3010
3011         * rendering/RenderBlockFlow.cpp:
3012         (WebCore::RenderBlockFlow::markLinesDirtyInBlockRange):
3013         
3014             Invalidate the line layout path when floats change. We need to check SimpleLineLayout::canUseFor again as
3015             intruding floats may make this flow ineligible to use the path.
3016
3017         * rendering/RenderBlockFlow.h:
3018         (WebCore::RenderBlockFlow::floatingObjectSet):
3019         * rendering/SimpleLineLayout.cpp:
3020         (WebCore::SimpleLineLayout::canUseFor):
3021         
3022             Test the top positions of all floats for case that would push text below the float instead of just testing 
3023             the first line. We may have floats in the middle of the paragraph too.
3024
3025 2014-05-11  peavo@outlook.com  <peavo@outlook.com>
3026
3027         WinCairo crashes on acid3 test
3028         https://bugs.webkit.org/show_bug.cgi?id=131364
3029
3030         Reviewed by Brent Fulgham.
3031
3032         When the 304 (Not-modified) response is received, the Curl backend should look up the cached response,
3033         and call the client method didReceiveResponse with the cached response, instead of the 304 response.
3034         Otherwise the response will contain an empty MIME type, which causes the request to be cancelled, and the client deleted.
3035         When the Curl cache manager then accesses the client afterwards, it is deleted, and we crash.
3036
3037         * platform/network/curl/CurlCacheManager.cpp:
3038         (WebCore::CurlCacheManager::didReceiveResponse): Return early if request is cancelled.
3039         (WebCore::CurlCacheManager::getCachedResponse): Added method to get cached response.
3040         * platform/network/curl/CurlCacheManager.h: Ditto.
3041         * platform/network/curl/ResourceHandleManager.cpp:
3042         (WebCore::headerCallback): When 304 response is received, look up cached response, and use it.
3043
3044 2014-05-10  Tim Horton  <timothy_horton@apple.com>
3045
3046         [WKWebView _updateScrollViewBackground] churns UI-and-CGColors while repainting
3047         https://bugs.webkit.org/show_bug.cgi?id=132793
3048         <rdar://problem/16877870>
3049
3050         Reviewed by Dan Bernstein.
3051
3052         * WebCore.exp.in:
3053         Export a Color convenience function.
3054
3055 2014-05-10  Commit Queue  <commit-queue@webkit.org>
3056
3057         Unreviewed, rolling out r168578.
3058         https://bugs.webkit.org/show_bug.cgi?id=132789
3059
3060         Speculative rollout since this appears to break PLT3.
3061         (Requested by kling on #webkit).
3062
3063         Reverted changeset:
3064
3065         "Move Source/WebCore/workers/ code to std::unique_ptr"
3066         https://bugs.webkit.org/show_bug.cgi?id=132401
3067         http://trac.webkit.org/changeset/168578
3068
3069 2014-05-10  Darin Adler  <darin@apple.com>
3070
3071         REGRESSION (r166853): fast/preloader/document-write.html is very flaky
3072         https://bugs.webkit.org/show_bug.cgi?id=130942
3073
3074         Reviewed by Anders Carlsson.
3075
3076         * style/StyleResolveTree.cpp:
3077         (WebCore::Style::suspendMemoryCacheClientCalls): Use a RefPtr to the main
3078         frame as a weak pointer to a Page that will work unless the page is destroyed.
3079         The old code tried to do it with a RefPtr to a document, but as the FIXME
3080         points out, that won't work if the document is disassociated with its frame.
3081
3082 2014-05-10  Anders Carlsson  <andersca@apple.com>
3083
3084         Block exceptions when trying to convert attributed strings to RTF and RTFD
3085         https://bugs.webkit.org/show_bug.cgi?id=132778
3086         <rdar://problem/16675805>
3087
3088         Reviewed by Darin Adler.
3089
3090         When the iOS WebHTMLConverter was upstreamed, converting some attributed strings to RTF and RTFD
3091         started throwing Objective-C exceptions (see <rdar://problem/16876920>).
3092         
3093         In WebKit2, we now crash on unhandled exceptions so work around that crash by adding exception blocking macros.
3094
3095         * editing/ios/EditorIOS.mm:
3096         (WebCore::dataInRTFDFormat):
3097         (WebCore::dataInRTFFormat):
3098         * editing/mac/EditorMac.mm:
3099         (WebCore::dataInRTFDFormat):
3100         (WebCore::dataInRTFFormat):
3101
3102 2014-05-10  Zan Dobersek  <zdobersek@igalia.com>
3103
3104         Move Source/WebCore/workers/ code to std::unique_ptr
3105         https://bugs.webkit.org/show_bug.cgi?id=132401
3106
3107         Reviewed by Andreas Kling.
3108
3109         Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/workers (and related places)
3110         with std::unique_ptr.
3111
3112         * bindings/js/JSDOMWindowCustom.cpp:
3113         (WebCore::JSDOMWindow::setTimeout):
3114         (WebCore::JSDOMWindow::setInterval):
3115         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
3116         (WebCore::JSWorkerGlobalScope::setTimeout):
3117         (WebCore::JSWorkerGlobalScope::setInterval):
3118         * bindings/js/ScheduledAction.cpp:
3119         (WebCore::ScheduledAction::create):
3120         * bindings/js/ScheduledAction.h:
3121         * page/DOMTimer.cpp:
3122         (WebCore::DOMTimer::DOMTimer):
3123         (WebCore::DOMTimer::install):
3124         (WebCore::DOMTimer::fired):
3125         (WebCore::DOMTimer::didStop):
3126         * page/DOMTimer.h:
3127         * page/DOMWindow.cpp:
3128         (WebCore::DOMWindow::setTimeout):
3129         (WebCore::DOMWindow::setInterval):
3130         * page/DOMWindow.h:
3131         * workers/WorkerEventQueue.h:
3132         * workers/WorkerGlobalScope.cpp:
3133         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
3134         (WebCore::WorkerGlobalScope::setTimeout):
3135         (WebCore::WorkerGlobalScope::setInterval):
3136         * workers/WorkerGlobalScope.h:
3137         (WebCore::WorkerGlobalScope::clearScript):
3138         * workers/WorkerLoaderProxy.h:
3139         * workers/WorkerMessagingProxy.h:
3140         * workers/WorkerRunLoop.cpp:
3141         (WebCore::WorkerRunLoop::WorkerRunLoop):
3142         * workers/WorkerRunLoop.h:
3143         * workers/WorkerScriptLoader.cpp:
3144         (WebCore::WorkerScriptLoader::loadSynchronously):
3145         (WebCore::WorkerScriptLoader::loadAsynchronously):
3146         (WebCore::WorkerScriptLoader::createResourceRequest):
3147         * workers/WorkerScriptLoader.h:
3148         * workers/WorkerThread.cpp:
3149         (WebCore::WorkerThread::WorkerThread):
3150         (WebCore::WorkerThread::workerThread):
3151         (WebCore::WorkerThreadStartupData::create): Deleted.
3152         * workers/WorkerThread.h:
3153
3154 2014-05-09  Dean Jackson  <dino@apple.com>
3155
3156         -webkit-filter prevents rendering at retina scale
3157         https://bugs.webkit.org/show_bug.cgi?id=93471
3158
3159         Reviewed by Dirk Schulze.
3160
3161         Implement 2x support for filters that go through
3162         the -webkit-filter property. This includes all
3163         shorthand filters, and any referenced SVG-style filters
3164         (as long as they use only the supported subset of
3165         operations - basically the same as is exposed for
3166         the shorthands).
3167
3168         Tests: fast/hidpi/filters-blur.html
3169                fast/hidpi/filters-hue-rotate.html
3170                fast/hidpi/filters-invert.html
3171                fast/hidpi/filters-multiple.html
3172                fast/hidpi/filters-reference.html
3173                fast/hidpi/filters-shadow.html
3174
3175         * platform/graphics/cg/ImageBufferCG.cpp:
3176         (WebCore::ImageBuffer::getUnmultipliedImageData): Scale the source rectangle if the method was
3177         called using LogicalCoordinates.
3178         (WebCore::ImageBuffer::getPremultipliedImageData): Ditto.
3179         (WebCore::ImageBuffer::putByteArray): Ditto.
3180
3181         * platform/graphics/filters/FEDropShadow.cpp:
3182         (WebCore::FEDropShadow::platformApplySoftware): Make sure to scale the blur radius by the filter
3183         resolution, and call the byte-array methods with the native coordinate system.
3184         * platform/graphics/filters/FEGaussianBlur.cpp:
3185         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize): Fix typo.
3186         (WebCore::FEGaussianBlur::platformApplySoftware): Scale the kernel and paint rectangles
3187         by the filter scale.
3188
3189         * platform/graphics/filters/Filter.h:
3190         (WebCore::Filter::Filter): Initialise the filter scale.
3191         (WebCore::Filter::filterScale): New property which reflects the mapping between logical pixels
3192         and device pixels.
3193         (WebCore::Filter::setFilterScale):
3194
3195         * platform/graphics/filters/FilterEffect.cpp:
3196         (WebCore::FilterEffect::asImageBuffer): Make sure buffer creation takes scale into account.
3197         (WebCore::FilterEffect::asUnmultipliedImage): Ditto.
3198         (WebCore::FilterEffect::asPremultipliedImage): Ditto.
3199         (WebCore::FilterEffect::copyImageBytes): Scale any incoming regions if they are talking about
3200         device pixels rather than logical pixels.
3201         (WebCore::FilterEffect::copyUnmultipliedImage): Ditto.
3202         (WebCore::FilterEffect::copyPremultipliedImage): Ditto.
3203         (WebCore::FilterEffect::createImageBufferResult): Take scale into account when creating byte array.
3204         (WebCore::FilterEffect::createUnmultipliedImageResult): Ditto.
3205         (WebCore::FilterEffect::createPremultipliedImageResult): Ditto.
3206
3207         * rendering/FilterEffectRenderer.cpp:
3208         (WebCore::FilterEffectRenderer::allocateBackingStoreIfNeeded): Pass filter scale into buffer creation.
3209
3210         * rendering/RenderLayer.cpp:
3211         (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer): Make sure to set the filter scale to
3212         the device scale factor, and notice if we ever change scales.
3213
3214 2014-05-10  Praveen R Jadhav  <praveen.j@samsung.com>
3215
3216         [MediaStream] Rename NavigatorMediaStream as NavigatorUserMedia.
3217         https://bugs.webkit.org/show_bug.cgi?id=132734
3218
3219         Reviewed by Eric Carlson.
3220
3221         Spec: http://www.w3.org/TR/mediacapture-streams/#navigatorusermedia
3222
3223         This patch replaces 'NavigatorMediaStream' with 'NavigatorUserMedia'
3224         throughout the code to be consistent with W3C specifications.
3225         Test cases remain the same as 'Navigator' implies 'NavigatorUserMedia'.
3226
3227         * CMakeLists.txt: Compiles NavigatorUserMedia.cpp
3228         * DerivedSources.make: Compiles NavigatorUserMedia.idl
3229         * Modules/mediastream/NavigatorMediaStream.cpp: Removed.
3230         * Modules/mediastream/NavigatorMediaStream.h: Removed.
3231         * Modules/mediastream/NavigatorMediaStream.idl: Removed.
3232         * Modules/mediastream/NavigatorUserMedia.cpp: Added.
3233         (WebCore::NavigatorUserMedia::NavigatorUserMedia):
3234         (WebCore::NavigatorUserMedia::~NavigatorUserMedia):
3235         (WebCore::NavigatorUserMedia::webkitGetUserMedia):
3236         * Modules/mediastream/NavigatorUserMedia.h: Added.
3237         * Modules/mediastream/NavigatorUserMedia.idl: Added.
3238         * WebCore.xcodeproj/project.pbxproj:
3239         * bindings/js/JSNavigatorCustom.cpp:
3240         (WebCore::JSNavigator::webkitGetUserMedia): NavigatorUserMedia
3241         class is used instead of NavigatorMediaStream.
3242
3243 2014-05-10  Zalan Bujtas  <zalan@apple.com>
3244
3245         Subpixel rendering: Empty rects should remain empty after integrally enclosing them.
3246         https://bugs.webkit.org/show_bug.cgi?id=132753
3247         <rdar://problem/16846801>
3248
3249         Reviewed by Simon Fraser.
3250
3251         This patch ensures that empty LayoutRects remain empty after converting to integral enclosing rect.
3252         LayoutRects with fractional position get expanded even if they are empty. This makes rectangle
3253         operations unreliable and can result in undesired side effects.
3254
3255         No testable/covered by existing tests.
3256
3257         * platform/graphics/LayoutRect.cpp:
3258         (WebCore::enclosingIntRect):
3259         * rendering/InlineTextBox.cpp:
3260         (WebCore::InlineTextBox::localSelectionRect):
3261         (WebCore::InlineTextBox::paintDocumentMarker):
3262         (WebCore::InlineTextBox::paintTextMatchMarker):
3263         (WebCore::InlineTextBox::computeRectForReplacementMarker):
3264         (WebCore::integralEnclosingRectForSelection): Deleted.
3265
3266 2014-05-09  Joseph Pecoraro  <pecoraro@apple.com>
3267
3268         Web Inspector: Allow Remote Inspector to entitlement check UIProcess through WebProcess
3269         https://bugs.webkit.org/show_bug.cgi?id=132409
3270
3271         Reviewed by Timothy Hatcher.
3272
3273         * inspector/InspectorClient.h:
3274         (WebCore::InspectorClient::parentProcessIdentifier): Deleted.
3275         * page/PageDebuggable.cpp:
3276         (WebCore::PageDebuggable::parentProcessIdentifier): Deleted.
3277         * page/PageDebuggable.h:
3278         pid per debuggable is no longer needed.
3279
3280 2014-05-09  Dean Jackson  <dino@apple.com>
3281
3282         [fullscreen] cursor should auto-hide when over video
3283         https://bugs.webkit.org/show_bug.cgi?id=132758
3284
3285         Unreviewed followup based on test failure.
3286
3287         * css/fullscreen.css: Append the previous rule - video children of fullscreen elements.
3288
3289 2014-05-09  Dean Jackson  <dino@apple.com>
3290
3291         [fullscreen] cursor should auto-hide when over video
3292         https://bugs.webkit.org/show_bug.cgi?id=132758
3293
3294         Reviewed by Brent Fulgham.
3295
3296         Cursors were not auto-hiding over fullscreen video. There was
3297         a small error in the CSS we load for fullscreen content.
3298
3299         * css/fullscreen.css: Don't hide when video is a child of the fullscreen element - hide when it *is* the fullscreen element.
3300         (video:-webkit-full-screen):
3301         (:-webkit-full-screen video:hover): Deleted.
3302
3303 2014-05-09  Zalan Bujtas  <zalan@apple.com>
3304
3305         Subpixel rendering[iOS]: Top bar on apple.com/support jiggles when the swoosh animates.
3306         https://bugs.webkit.org/show_bug.cgi?id=132750
3307         <rdar://problem/16803281>
3308
3309         Reviewed by Simon Fraser.
3310
3311         This patch ensures that GraphicsLayer and RemoteLayerBackingStore have the same dimensions.
3312         
3313         Remove integral enclosing when we set the size on RemoteLayerBackingStore. It makes the layer's size
3314         different from the backingstore when the passed value is fractional.
3315         We scale and integral round this value to size the shareable bitmap later. Rounding ensures that
3316         the final size value matches what we calculated at GraphicsLayerCA::updateGeometry()
3317
3318         Currently not testable.
3319
3320         * platform/graphics/ca/GraphicsLayerCA.cpp:
3321         (WebCore::GraphicsLayerCA::updateGeometry):
3322         (WebCore::GraphicsLayerCA::computePixelAlignment): include device scale factor to be able calculate the final content scale.
3323         * platform/graphics/ca/GraphicsLayerCA.h:
3324
3325 2014-05-09  Mark Hahnenberg  <mhahnenberg@apple.com>
3326
3327         JSDOMWindow should disable property caching after a certain point
3328         https://bugs.webkit.org/show_bug.cgi?id=132751
3329
3330         Reviewed by Filip Pizlo.
3331
3332         No new tests.
3333
3334         This is part of removing HasImpureGetOwnPropertySlot from JSDOMWindow. After the lookup in the static 
3335         hash table for JSDOMWindow fails we want to disable property caching even if the code that follows thinks 
3336         that it has provided a cacheable value.
3337
3338         * bindings/js/JSDOMWindowCustom.cpp:
3339         (WebCore::JSDOMWindow::getOwnPropertySlot):
3340
3341 2014-05-09  Benjamin Poulain  <bpoulain@apple.com>
3342
3343         Fix the export file after r168556
3344
3345         * WebCore.exp.in: I forgot to fix the export file before landing.
3346
3347 2014-05-09  Benjamin Poulain  <bpoulain@apple.com>
3348
3349         [iOS][WK2] Set up the resize events
3350         https://bugs.webkit.org/show_bug.cgi?id=132726
3351
3352         Reviewed by Darin Adler and Simon Fraser.
3353
3354         Let the WebKit2 layer override the size used for resize events.
3355
3356         * WebCore.exp.in:
3357         * page/FrameView.cpp:
3358         (WebCore::FrameView::layout):
3359         (WebCore::FrameView::sizeForResizeEvent):
3360         (WebCore::FrameView::sendResizeEventIfNeeded):
3361         (WebCore::FrameView::setCustomSizeForResizeEvent):
3362         * page/FrameView.h:
3363
3364 2014-05-09  Alexey Proskuryakov  <ap@apple.com>
3365
3366         REGRESSION (r168518): Multiple tests for workers in blobs assert
3367         https://bugs.webkit.org/show_bug.cgi?id=132728
3368
3369         Reviewed by Geoffrey Garen.
3370
3371         Change File serialization to include name, so that we don't have to regenerate anything
3372         on a secondary thread after deserialization.
3373
3374         Files and Blobs can't be stored persistently, because URLs are transient (IndexedDB
3375         has an explicit check, and fails if there were any blob URLs). API doesn't have the
3376         check, but given that anyone who tried to use these to serialize a File would fail,
3377         it seems OK to change the format.
3378
3379         * bindings/js/SerializedScriptValue.cpp:
3380         (WebCore::CloneSerializer::write):
3381         (WebCore::CloneDeserializer::readFile):
3382         * fileapi/File.cpp:
3383         (WebCore::File::File):
3384         * fileapi/File.h:
3385
3386 2014-05-08  Mark Hahnenberg  <mhahnenberg@apple.com>
3387
3388         JSDOMWindow should have a WatchpointSet to fire on window close
3389         https://bugs.webkit.org/show_bug.cgi?id=132721
3390
3391         Reviewed by Filip Pizlo.
3392
3393         No new tests.
3394
3395         This patch allows us to reset the inline caches that assumed they could skip 
3396         the first part of JSDOMWindow::getOwnPropertySlot that checks if the window has 
3397         been closed. This is part of getting rid of HasImpureGetOwnPropertySlot on JSDOMWindow.
3398
3399         JSDOMWindowBase now has a WatchpointSet that the underlying DOMWindow fires when its
3400         frame is cleared. In getOwnPropertySlot, we now pass this WatchpointSet to PropertySlot
3401         which will shepherd it back up to the code that generates the inline cache (and the 
3402         Watchpoint for clearing it).
3403
3404         * bindings/js/JSDOMWindowBase.cpp:
3405         (WebCore::JSDOMWindowBase::JSDOMWindowBase):
3406         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
3407         * bindings/js/JSDOMWindowBase.h:
3408         * bindings/js/JSDOMWindowCustom.cpp:
3409         (WebCore::JSDOMWindow::getOwnPropertySlot):
3410         * page/DOMWindow.cpp:
3411         (WebCore::DOMWindow::frameDestroyed):
3412
3413 2014-05-09  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
3414
3415         ASSERTION FAILED: object->style()->overflowX() == object->style()->overflowY()
3416         https://bugs.webkit.org/show_bug.cgi?id=121682
3417
3418         Reviewed by Dirk Schulze.
3419
3420         Add more overflow freedom to the SVG element:
3421         -overflow-x and overflow-y for controlling each scrollbar independently is now supported
3422         -overflow:scroll will display scrollbars regardless of the svg overflowing or not (as required by CSS)
3423         -overflow:hidden will cause overflow to be clipped away and scrollbars to be hidden
3424
3425         Merged from Blink r172126 by <ed@opera.com>
3426
3427         Tests: svg/W3C-SVG-1.1-SE/painting-marker-05-f.svg
3428                svg/W3C-SVG-1.1-SE/painting-marker-06-f.svg
3429                svg/animations/animate-viewport-overflow-2.html
3430          &n