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