Diff
Modified: branches/safari-601.1.32-branch/Source/WebCore/ChangeLog (184247 => 184248)
--- branches/safari-601.1.32-branch/Source/WebCore/ChangeLog 2015-05-13 04:08:49 UTC (rev 184247)
+++ branches/safari-601.1.32-branch/Source/WebCore/ChangeLog 2015-05-13 04:08:53 UTC (rev 184248)
@@ -2,257 +2,270 @@
Dana Burkart <[email protected]
[email protected]>
- Merge r183965. rdar://problem/20866590
+ Merge r183970. rdar://problem/20769741
- 2015-05-07 Dean Jackson <[email protected]>
+ 2015-05-07 Simon Fraser <[email protected]>
- [iOS] While scrubbing and holding down, video continues to play
- https://bugs.webkit.org/show_bug.cgi?id=144776
- <rdar://problem/20863757>
+ REGRESSION (r183300): Fixed elements flash when scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=144778
+ rdar://problem/20769741
- Reviewed by Simon Fraser.
+ Reviewed by Dean Jackson.
- When we are scrubbing a video, we should pause playback. As we
- let go of the scrubber playback can resume (but only if it was
- playing originally).
+ After r183300 we can detached layer backing store when outside the coverage region.
+ However, position:fixed layers are moved around by the ScrollingCoordinator behind
+ GraphicsLayer's back, so we can do layer flushes with stale information about layer
+ geometry.
- * Modules/mediacontrols/mediaControlsiOS.js:
- (ControllerIOS.prototype.createControls): Listen for touchstart on the scrubber.
- (ControllerIOS.prototype.handleTimelineInput): Call the prototype, but pause if necessary.
- (ControllerIOS.prototype.handleTimelineChange): Just moved this to be with the other timeline functions.
- (ControllerIOS.prototype.handleTimelineTouchStart): Add the listeners for end and cancel. Remember that we are
- potentially about to scrub.
- (ControllerIOS.prototype.handleTimelineTouchEnd): Remove the listeners.
+ To avoid dropping backing store for layers in this situation, prevent backing
+ store detachment on layers registered with the ScrollingCoordinator as viewport-constrained
+ layers. Preventing detachment on a layer also prevents detachment on all descendant
+ layers.
+ * platform/graphics/GraphicsLayer.h:
+ (WebCore::GraphicsLayer::setAllowsBackingStoreDetachment):
+ (WebCore::GraphicsLayer::allowsBackingStoreDetachment):
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::GraphicsLayerCA):
+ (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): Set m_intersectsCoverageRect to true
+ if backing store detachment is prevented.
+ (WebCore::GraphicsLayerCA::recursiveCommitChanges): Set a bit in the CommitState to
+ communicate to descendants that detachment is prevented.
+ * platform/graphics/ca/GraphicsLayerCA.h:
+ (WebCore::GraphicsLayerCA::CommitState::CommitState): Deleted.
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::setIsScrollCoordinatedWithViewportConstrainedRole):
+ * rendering/RenderLayerBacking.h:
+ (WebCore::RenderLayerBacking::setScrollingNodeIDForRole): If registering with a non-zero
+ nodeID for the ViewportConstrained role, turn off backing store detachment.
+
2015-05-12 Dana Burkart
Dana Burkart <[email protected]
[email protected]>
- Merge r183954. rdar://problem/20281886
+ Merge r183965. rdar://problem/20866590
- 2015-05-07 Beth Dakin <[email protected]>
+ 2015-05-07 Dean Jackson <[email protected]>
- New force-related DOM events should fire in WK1 views
- https://bugs.webkit.org/show_bug.cgi?id=144663
- -and corresponding-
- rdar://problem/20281886
+ [iOS] While scrubbing and holding down, video continues to play
+ https://bugs.webkit.org/show_bug.cgi?id=144776
+ <rdar://problem/20863757>
- Reviewed by Sam Weinig.
+ Reviewed by Simon Fraser.
- All of the WK1 mouse events need to take the correspondingPressureEvent.
- * page/EventHandler.h:
+ When we are scrubbing a video, we should pause playback. As we
+ let go of the scrubber playback can resume (but only if it was
+ playing originally).
- Make correspondingPressureEvent a part of CurrentEventScope. This is needed to
- have accurate pressure information for all of the mouse events in subframes.
- * page/mac/EventHandlerMac.mm:
- (WebCore::correspondingPressureEventSlot):
- (WebCore::EventHandler::correspondingPressureEvent):
- (WebCore::CurrentEventScope::CurrentEventScope):
- (WebCore::CurrentEventScope::~CurrentEventScope):
+ * Modules/mediacontrols/mediaControlsiOS.js:
+ (ControllerIOS.prototype.createControls): Listen for touchstart on the scrubber.
+ (ControllerIOS.prototype.handleTimelineInput): Call the prototype, but pause if necessary.
+ (ControllerIOS.prototype.handleTimelineChange): Just moved this to be with the other timeline functions.
+ (ControllerIOS.prototype.handleTimelineTouchStart): Add the listeners for end and cancel. Remember that we are
+ potentially about to scrub.
+ (ControllerIOS.prototype.handleTimelineTouchEnd): Remove the listeners.
- These events don’t have an associated pressure, so send nil for the
- correspondingPressureEvent.
- (WebCore::EventHandler::wheelEvent):
- (WebCore::EventHandler::keyEvent):
+ 2015-05-12 Dana Burkart
+ Dana Burkart <[email protected]
+ [email protected]>
- Pipe through correspondingPressureEvent.
- (WebCore::EventHandler::mouseDown):
- (WebCore::EventHandler::mouseDragged):
- (WebCore::EventHandler::mouseUp):
- (WebCore::EventHandler::mouseMoved):
+ Merge r183954. rdar://problem/20281886
- New function to handle pressure change events.
- (WebCore::EventHandler::pressureChange):
+ 2015-05-07 Beth Dakin <[email protected]>
- Pipe through correspondingPressureEvent.
- (WebCore::EventHandler::passMouseMovedEventToScrollbars):
- (WebCore::EventHandler::currentPlatformMouseEvent):
+ New force-related DOM events should fire in WK1 views
+ https://bugs.webkit.org/show_bug.cgi?id=144663
+ -and corresponding-
+ rdar://problem/20281886
- Take the correspondingPressureEvent in order to build a PlatformMouseEvent with
- the correct pressure information.
- * platform/mac/PlatformEventFactoryMac.h:
- * platform/mac/PlatformEventFactoryMac.mm:
- (WebCore::globalPointForEvent):
- (WebCore::pointForEvent):
- (WebCore::mouseButtonForEvent):
- (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
- (WebCore::PlatformEventFactory::createPlatformMouseEvent):
+ Reviewed by Sam Weinig.
- 2015-05-12 Dana Burkart
- Dana Burkart <[email protected]
- [email protected]>
+ All of the WK1 mouse events need to take the correspondingPressureEvent.
+ * page/EventHandler.h:
- Merge r183953. rdar://problem/19997548
+ Make correspondingPressureEvent a part of CurrentEventScope. This is needed to
+ have accurate pressure information for all of the mouse events in subframes.
+ * page/mac/EventHandlerMac.mm:
+ (WebCore::correspondingPressureEventSlot):
+ (WebCore::EventHandler::correspondingPressureEvent):
+ (WebCore::CurrentEventScope::CurrentEventScope):
+ (WebCore::CurrentEventScope::~CurrentEventScope):
- 2015-05-06 Roger Fong <[email protected]>
+ These events don’t have an associated pressure, so send nil for the
+ correspondingPressureEvent.
+ (WebCore::EventHandler::wheelEvent):
+ (WebCore::EventHandler::keyEvent):
- Media Controls: Scrubber should be independent of actual video time, causes scrubber to be jumpy.
- https://bugs.webkit.org/show_bug.cgi?id=144700.
- <rdar://problem/19997548>
+ Pipe through correspondingPressureEvent.
+ (WebCore::EventHandler::mouseDown):
+ (WebCore::EventHandler::mouseDragged):
+ (WebCore::EventHandler::mouseUp):
+ (WebCore::EventHandler::mouseMoved):
- Reviewed by Jer Noble.
+ New function to handle pressure change events.
+ (WebCore::EventHandler::pressureChange):
- Update time and timeline during the timeline input event instead of the wrapper's mousemove.
- (Controller.prototype.handleWrapperMouseMove):
- (Controller.prototype.handleTimelineMouseMove):
- (Controller.prototype.drawTimelineBackground):
+ Pipe through correspondingPressureEvent.
+ (WebCore::EventHandler::passMouseMovedEventToScrollbars):
+ (WebCore::EventHandler::currentPlatformMouseEvent):
- (Controller.prototype.updateControlsWhileScrubbing):
- Updates time and scrubber to reflect timeline user input.
+ Take the correspondingPressureEvent in order to build a PlatformMouseEvent with
+ the correct pressure information.
+ * platform/mac/PlatformEventFactoryMac.h:
+ * platform/mac/PlatformEventFactoryMac.mm:
+ (WebCore::globalPointForEvent):
+ (WebCore::pointForEvent):
+ (WebCore::mouseButtonForEvent):
+ (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
+ (WebCore::PlatformEventFactory::createPlatformMouseEvent):
2015-05-12 Dana Burkart
Dana Burkart <[email protected]
[email protected]>
- Merge r183943. rdar://problem/19913748
+ Merge r183953. rdar://problem/19997548
- 2015-05-07 Simon Fraser <[email protected]>
+ 2015-05-06 Roger Fong <[email protected]>
- Remove the WK1-only code path for independently composited iframes
- https://bugs.webkit.org/show_bug.cgi?id=144722
+ Media Controls: Scrubber should be independent of actual video time, causes scrubber to be jumpy.
+ https://bugs.webkit.org/show_bug.cgi?id=144700.
+ <rdar://problem/19997548>
- Reviewed by Dean Jackson.
+ Reviewed by Jer Noble.
- In WebKit1 on Mac, we allowed iframes to be composited independently of their
- parent document, relying on the fact that the frame's platform view can host
- a layer-backed view. However, this ran into bugs (rdar://problem/18862298),
- and triggers the assertion at the end of FrameView::updateLayoutAndStyleIfNeededRecursive(),
- because the compositing update after a layout can dirty style in notifyIFramesOfCompositingChange().
+ Update time and timeline during the timeline input event instead of the wrapper's mousemove.
+ (Controller.prototype.handleWrapperMouseMove):
+ (Controller.prototype.handleTimelineMouseMove):
+ (Controller.prototype.drawTimelineBackground):
- Removing the WK1-only code path solves these problems. It also eliminates the need
- to do compositing-specific frame overlap testing.
+ (Controller.prototype.updateControlsWhileScrubbing):
+ Updates time and scrubber to reflect timeline user input.
- * page/FrameView.cpp:
- (WebCore::FrameView::setIsOverlapped): No need to do compositing-related things here.
- Any iframe that gets composited will participate in the normal compositing overlap
- testing in its parent frame.
- (WebCore::FrameView::hasCompositedContentIncludingDescendants): Deleted.
- (WebCore::FrameView::hasCompositingAncestor): Deleted.
- * page/FrameView.h:
- * rendering/RenderLayerCompositor.cpp: Replace ownerElement() checks in this file
- with an isMainFrameCompositor() for readability. Some 0->nullptr.
- (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
- (WebCore::RenderLayerCompositor::chromeClient):
- (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
- (WebCore::RenderLayerCompositor::updateCompositingLayers):
- (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
- (WebCore::RenderLayerCompositor::updateBacking):
- (WebCore::RenderLayerCompositor::layerTreeAsText):
- (WebCore::RenderLayerCompositor::frameContentsCompositor):
- (WebCore::RenderLayerCompositor::setIsInWindow):
- (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame):
- (WebCore::RenderLayerCompositor::requiresCompositingForFrame): frameRenderer.requiresAcceleratedCompositing()
- already bails on no content RenderView, so the shouldPropagateCompositingToEnclosingFrame() check does
- nothing and is removed.
- (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer):
- (WebCore::RenderLayerCompositor::requiresScrollLayer):
- (WebCore::RenderLayerCompositor::documentUsesTiledBacking):
- (WebCore::RenderLayerCompositor::isMainFrameCompositor):
- (WebCore::RenderLayerCompositor::shouldCompositeOverflowControls):
- (WebCore::RenderLayerCompositor::requiresOverhangAreasLayer):
- (WebCore::RenderLayerCompositor::requiresContentShadowLayer):
- (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
- (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
- (WebCore::RenderLayerCompositor::updateLayerForHeader):
- (WebCore::RenderLayerCompositor::updateLayerForFooter):
- (WebCore::RenderLayerCompositor::ensureRootLayer): Main frame attaches via ChromeClient,
- all other frames attach via parent frame.
- (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): This call to
- scheduleSetNeedsStyleRecalc(SyntheticStyleChange) was the source of dirtying style after
- layout, but is no longer needed so remove it.
- (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
- (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers):
- (WebCore::RenderLayerCompositor::scrollingCoordinator):
- (WebCore::RenderLayerCompositor::graphicsLayerFactory):
- (WebCore::RenderLayerCompositor::allowsIndependentlyCompositedFrames): Deleted.
- (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame): Deleted.
- (WebCore::RenderLayerCompositor::mainFrameBackingIsTiled): Deleted. This was mis-named;
- it really asks whether the document uses tiled backing, but does not check for main frame.
- * rendering/RenderLayerCompositor.h:
- * rendering/RenderWidget.cpp:
- (WebCore::RenderWidget::paintContents): No need to do frame overlap testing for
- compositing now.
-
2015-05-12 Dana Burkart
Dana Burkart <[email protected]
[email protected]>
- Merge r183927. rdar://problem/20854785
+ Merge r183943. rdar://problem/19913748
- 2015-05-07 Eric Carlson <[email protected]>
+ 2015-05-07 Simon Fraser <[email protected]>
- [Mac] Playback target isn't set on new element
- https://bugs.webkit.org/show_bug.cgi?id=144724
+ Remove the WK1-only code path for independently composited iframes
+ https://bugs.webkit.org/show_bug.cgi?id=144722
- Reviewed by Jer Noble.
+ Reviewed by Dean Jackson.
- * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
- * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
- (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Call setShouldPlayToPlaybackTarget
- if necessary.
- (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Remember
- the setting in case we don't have an AVPlayer yet.
+ In WebKit1 on Mac, we allowed iframes to be composited independently of their
+ parent document, relying on the fact that the frame's platform view can host
+ a layer-backed view. However, this ran into bugs (rdar://problem/18862298),
+ and triggers the assertion at the end of FrameView::updateLayoutAndStyleIfNeededRecursive(),
+ because the compositing update after a layout can dirty style in notifyIFramesOfCompositingChange().
+ Removing the WK1-only code path solves these problems. It also eliminates the need
+ to do compositing-specific frame overlap testing.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::setIsOverlapped): No need to do compositing-related things here.
+ Any iframe that gets composited will participate in the normal compositing overlap
+ testing in its parent frame.
+ (WebCore::FrameView::hasCompositedContentIncludingDescendants): Deleted.
+ (WebCore::FrameView::hasCompositingAncestor): Deleted.
+ * page/FrameView.h:
+ * rendering/RenderLayerCompositor.cpp: Replace ownerElement() checks in this file
+ with an isMainFrameCompositor() for readability. Some 0->nullptr.
+ (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
+ (WebCore::RenderLayerCompositor::chromeClient):
+ (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
+ (WebCore::RenderLayerCompositor::updateCompositingLayers):
+ (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
+ (WebCore::RenderLayerCompositor::updateBacking):
+ (WebCore::RenderLayerCompositor::layerTreeAsText):
+ (WebCore::RenderLayerCompositor::frameContentsCompositor):
+ (WebCore::RenderLayerCompositor::setIsInWindow):
+ (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame):
+ (WebCore::RenderLayerCompositor::requiresCompositingForFrame): frameRenderer.requiresAcceleratedCompositing()
+ already bails on no content RenderView, so the shouldPropagateCompositingToEnclosingFrame() check does
+ nothing and is removed.
+ (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer):
+ (WebCore::RenderLayerCompositor::requiresScrollLayer):
+ (WebCore::RenderLayerCompositor::documentUsesTiledBacking):
+ (WebCore::RenderLayerCompositor::isMainFrameCompositor):
+ (WebCore::RenderLayerCompositor::shouldCompositeOverflowControls):
+ (WebCore::RenderLayerCompositor::requiresOverhangAreasLayer):
+ (WebCore::RenderLayerCompositor::requiresContentShadowLayer):
+ (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
+ (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
+ (WebCore::RenderLayerCompositor::updateLayerForHeader):
+ (WebCore::RenderLayerCompositor::updateLayerForFooter):
+ (WebCore::RenderLayerCompositor::ensureRootLayer): Main frame attaches via ChromeClient,
+ all other frames attach via parent frame.
+ (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): This call to
+ scheduleSetNeedsStyleRecalc(SyntheticStyleChange) was the source of dirtying style after
+ layout, but is no longer needed so remove it.
+ (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
+ (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers):
+ (WebCore::RenderLayerCompositor::scrollingCoordinator):
+ (WebCore::RenderLayerCompositor::graphicsLayerFactory):
+ (WebCore::RenderLayerCompositor::allowsIndependentlyCompositedFrames): Deleted.
+ (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame): Deleted.
+ (WebCore::RenderLayerCompositor::mainFrameBackingIsTiled): Deleted. This was mis-named;
+ it really asks whether the document uses tiled backing, but does not check for main frame.
+ * rendering/RenderLayerCompositor.h:
+ * rendering/RenderWidget.cpp:
+ (WebCore::RenderWidget::paintContents): No need to do frame overlap testing for
+ compositing now.
+
2015-05-12 Dana Burkart
Dana Burkart <[email protected]
[email protected]>
- Merge r183909. rdar://problem/18894598
+ Merge r183927. rdar://problem/20854785
- 2015-05-06 Daniel Bates <[email protected]>
+ 2015-05-07 Eric Carlson <[email protected]>
- [iOS][WK2] Pause/resume database thread when UIProcess enters/leaves the background
- https://bugs.webkit.org/show_bug.cgi?id=144657
- <rdar://problem/18894598>
+ [Mac] Playback target isn't set on new element
+ https://bugs.webkit.org/show_bug.cgi?id=144724
- Reviewed by Andy Estes.
+ Reviewed by Jer Noble.
- Export WebCore functionality to pause and resume the database thread so that we can
- make use of this functionality from WebKit2.
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Call setShouldPlayToPlaybackTarget
+ if necessary.
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Remember
+ the setting in case we don't have an AVPlayer yet.
- * Modules/webdatabase/AbstractDatabaseServer.h:
- * Modules/webdatabase/DatabaseManager.cpp:
- (WebCore::DatabaseManager::setPauseAllDatabases): Added; turns around and calls DatabaseServer::setPauseAllDatabases().
- * Modules/webdatabase/DatabaseManager.h:
- * Modules/webdatabase/DatabaseServer.cpp:
- (WebCore::DatabaseServer::setPauseAllDatabases): Added; turns around and calls
- DatabaseTracker::tracker().setDatabasesPaused() to pause or resume the database thread.
- For now, we guard this call with PLATFORM(IOS). We'll look to remove this guard once
- we fix <https://bugs.webkit.org/show_bug.cgi?id=144660>.
- * Modules/webdatabase/DatabaseServer.h:
-
2015-05-12 Dana Burkart
- Dana Burkart <[email protected]>
+ Dana Burkart <[email protected]
+ [email protected]>
- Merge r183942. rdar://problem/20049088
+ Merge r183909. rdar://problem/18894598
- 2015-05-06 Dean Jackson <[email protected]>
+ 2015-05-06 Daniel Bates <[email protected]>
- Handle backdrop views that have to tile
- https://bugs.webkit.org/show_bug.cgi?id=142317
- <rdar://problem/20049088>
+ [iOS][WK2] Pause/resume database thread when UIProcess enters/leaves the background
+ https://bugs.webkit.org/show_bug.cgi?id=144657
+ <rdar://problem/18894598>
- Reviewed by Simon Fraser.
+ Reviewed by Andy Estes.
- Take 2 - this was rolled out because Mavericks was crashing.
+ Export WebCore functionality to pause and resume the database thread so that we can
+ make use of this functionality from WebKit2.
- Make sure backdrop layers don't tile. If they are big
- enough, we'll leave it to the platform compositor to handle.
+ * Modules/webdatabase/AbstractDatabaseServer.h:
+ * Modules/webdatabase/DatabaseManager.cpp:
+ (WebCore::DatabaseManager::setPauseAllDatabases): Added; turns around and calls DatabaseServer::setPauseAllDatabases().
+ * Modules/webdatabase/DatabaseManager.h:
+ * Modules/webdatabase/DatabaseServer.cpp:
+ (WebCore::DatabaseServer::setPauseAllDatabases): Added; turns around and calls
+ DatabaseTracker::tracker().setDatabasesPaused() to pause or resume the database thread.
+ For now, we guard this call with PLATFORM(IOS). We'll look to remove this guard once
+ we fix <https://bugs.webkit.org/show_bug.cgi?id=144660>.
+ * Modules/webdatabase/DatabaseServer.h:
- This also fixes a bug where if a layer changed from a backdrop
- type to a tiled type, it would still retain its custom appearance
- and we'd try to add children to the wrong layer.
-
- Test: compositing/media-controls-bar-appearance-big.html
-
- * platform/graphics/ca/GraphicsLayerCA.cpp:
- (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
- a layer needs a backdrop before checking if it needs to tile.
-
2015-05-12 Dana Burkart
Dana Burkart <[email protected]>
- Merge r183894. rdar://problem/20049088
+ Merge r183942. rdar://problem/20049088
2015-05-06 Dean Jackson <[email protected]>
@@ -262,6 +275,8 @@
Reviewed by Simon Fraser.
+ Take 2 - this was rolled out because Mavericks was crashing.
+
Make sure backdrop layers don't tile. If they are big
enough, we'll leave it to the platform compositor to handle.
@@ -275,6 +290,32 @@
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
a layer needs a backdrop before checking if it needs to tile.
+ 2015-05-12 Dana Burkart
+ Dana Burkart <[email protected]>
+
+ Merge r183894. rdar://problem/20049088
+
+ 2015-05-06 Dean Jackson <[email protected]>
+
+ Handle backdrop views that have to tile
+ https://bugs.webkit.org/show_bug.cgi?id=142317
+ <rdar://problem/20049088>
+
+ Reviewed by Simon Fraser.
+
+ Make sure backdrop layers don't tile. If they are big
+ enough, we'll leave it to the platform compositor to handle.
+
+ This also fixes a bug where if a layer changed from a backdrop
+ type to a tiled type, it would still retain its custom appearance
+ and we'd try to add children to the wrong layer.
+
+ Test: compositing/media-controls-bar-appearance-big.html
+
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
+ a layer needs a backdrop before checking if it needs to tile.
+
2015-05-06 Brent Fulgham <[email protected]>
Scroll-snap points do not handle margins and padding propertly
Modified: branches/safari-601.1.32-branch/Source/WebCore/platform/graphics/GraphicsLayer.h (184247 => 184248)
--- branches/safari-601.1.32-branch/Source/WebCore/platform/graphics/GraphicsLayer.h 2015-05-13 04:08:49 UTC (rev 184247)
+++ branches/safari-601.1.32-branch/Source/WebCore/platform/graphics/GraphicsLayer.h 2015-05-13 04:08:53 UTC (rev 184248)
@@ -490,6 +490,10 @@
float pageScaleFactor() const { return m_client.pageScaleFactor(); }
float deviceScaleFactor() const { return m_client.deviceScaleFactor(); }
+
+ // Whether this layer (and descendants) can detach backing store when outside the coverage area.
+ virtual void setAllowsBackingStoreDetachment(bool) { }
+ virtual bool allowsBackingStoreDetachment() const { return true; }
virtual void deviceOrPageScaleFactorChanged() { }
WEBCORE_EXPORT void noteDeviceOrPageScaleFactorChangedIncludingDescendants();
Modified: branches/safari-601.1.32-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (184247 => 184248)
--- branches/safari-601.1.32-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2015-05-13 04:08:49 UTC (rev 184247)
+++ branches/safari-601.1.32-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2015-05-13 04:08:53 UTC (rev 184248)
@@ -353,6 +353,7 @@
: GraphicsLayer(layerType, client)
, m_needsFullRepaint(false)
, m_usingBackdropLayerType(false)
+ , m_allowsBackingStoreDetachment(true)
, m_intersectsCoverageRect(true)
{
}
@@ -1252,7 +1253,7 @@
return true;
}
-void GraphicsLayerCA::setVisibleAndCoverageRects(const VisibleAndCoverageRects& rects)
+void GraphicsLayerCA::setVisibleAndCoverageRects(const VisibleAndCoverageRects& rects, bool allowBackingStoreDetachment)
{
bool visibleRectChanged = rects.visibleRect != m_visibleRect;
bool coverageRectChanged = rects.coverageRect != m_coverageRect;
@@ -1275,7 +1276,7 @@
m_coverageRect = rects.coverageRect;
// FIXME: we need to take reflections into account when determining whether this layer intersects the coverage rect.
- m_intersectsCoverageRect = m_coverageRect.intersects(FloatRect(m_boundsOrigin, size()));
+ m_intersectsCoverageRect = !allowBackingStoreDetachment || m_coverageRect.intersects(FloatRect(m_boundsOrigin, size()));
if (GraphicsLayerCA* maskLayer = downcast<GraphicsLayerCA>(m_maskLayer)) {
maskLayer->m_uncommittedChanges |= CoverageRectChanged;
@@ -1300,7 +1301,7 @@
localState.setLastPlanarSecondaryQuad(&secondaryQuad);
}
}
- setVisibleAndCoverageRects(rects);
+ setVisibleAndCoverageRects(rects, m_allowsBackingStoreDetachment && commitState.ancestorsAllowBackingStoreDetachment);
#ifdef VISIBLE_TILE_WASH
// Use having a transform as a key to making the tile wash layer. If every layer gets a wash,
@@ -1343,6 +1344,8 @@
childCommitState.ancestorHasTransformAnimation = true;
affectedByTransformAnimation = true;
}
+
+ childCommitState.ancestorsAllowBackingStoreDetachment &= m_allowsBackingStoreDetachment;
if (GraphicsLayerCA* maskLayer = downcast<GraphicsLayerCA>(m_maskLayer))
maskLayer->commitLayerChangesBeforeSublayers(childCommitState, pageScaleFactor, baseRelativePosition);
@@ -3625,6 +3628,15 @@
}
}
+void GraphicsLayerCA::setAllowsBackingStoreDetachment(bool allowDetachment)
+{
+ if (allowDetachment == m_allowsBackingStoreDetachment)
+ return;
+
+ m_allowsBackingStoreDetachment = allowDetachment;
+ noteLayerPropertyChanged(CoverageRectChanged);
+}
+
void GraphicsLayerCA::deviceOrPageScaleFactorChanged()
{
noteChangesForScaleSensitiveProperties();
Modified: branches/safari-601.1.32-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (184247 => 184248)
--- branches/safari-601.1.32-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h 2015-05-13 04:08:49 UTC (rev 184247)
+++ branches/safari-601.1.32-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h 2015-05-13 04:08:53 UTC (rev 184248)
@@ -148,12 +148,9 @@
virtual FloatSize pixelAlignmentOffset() const override { return m_pixelAlignmentOffset; }
struct CommitState {
- bool ancestorHasTransformAnimation;
- int treeDepth;
- CommitState()
- : ancestorHasTransformAnimation(false)
- , treeDepth(0)
- { }
+ int treeDepth { 0 };
+ bool ancestorHasTransformAnimation { false };
+ bool ancestorsAllowBackingStoreDetachment { true };
};
void recursiveCommitChanges(const CommitState&, const TransformState&, float pageScaleFactor = 1, const FloatPoint& positionRelativeToBase = FloatPoint(), bool affectedByPageScale = false);
@@ -197,6 +194,9 @@
virtual bool isCommittingChanges() const override { return m_isCommittingChanges; }
+ WEBCORE_EXPORT virtual void setAllowsBackingStoreDetachment(bool) override;
+ WEBCORE_EXPORT virtual bool allowsBackingStoreDetachment() const override { return m_allowsBackingStoreDetachment; }
+
WEBCORE_EXPORT virtual double backingStoreMemoryEstimate() const override;
WEBCORE_EXPORT virtual bool shouldRepaintOnSizeChange() const override;
@@ -293,7 +293,7 @@
const FloatRect& visibleRect() const { return m_visibleRect; }
const FloatRect& coverageRect() const { return m_coverageRect; }
- void setVisibleAndCoverageRects(const VisibleAndCoverageRects&);
+ void setVisibleAndCoverageRects(const VisibleAndCoverageRects&, bool allowBackingStoreDetachment);
static FloatRect adjustTiledLayerVisibleRect(TiledBacking*, const FloatRect& oldVisibleRect, const FloatRect& newVisibleRect, const FloatSize& oldSize, const FloatSize& newSize);
@@ -510,6 +510,7 @@
ContentsLayerPurpose m_contentsLayerPurpose { NoContentsLayer };
bool m_needsFullRepaint : 1;
bool m_usingBackdropLayerType : 1;
+ bool m_allowsBackingStoreDetachment : 1;
bool m_intersectsCoverageRect : 1;
Color m_contentsSolidColor;
Modified: branches/safari-601.1.32-branch/Source/WebCore/rendering/RenderLayerBacking.cpp (184247 => 184248)
--- branches/safari-601.1.32-branch/Source/WebCore/rendering/RenderLayerBacking.cpp 2015-05-13 04:08:49 UTC (rev 184247)
+++ branches/safari-601.1.32-branch/Source/WebCore/rendering/RenderLayerBacking.cpp 2015-05-13 04:08:53 UTC (rev 184248)
@@ -1571,6 +1571,11 @@
}
}
+void RenderLayerBacking::setIsScrollCoordinatedWithViewportConstrainedRole(bool viewportCoordinated)
+{
+ m_graphicsLayer->setAllowsBackingStoreDetachment(!viewportCoordinated);
+}
+
GraphicsLayerPaintingPhase RenderLayerBacking::paintingPhaseForPrimaryLayer() const
{
unsigned phase = 0;
Modified: branches/safari-601.1.32-branch/Source/WebCore/rendering/RenderLayerBacking.h (184247 => 184248)
--- branches/safari-601.1.32-branch/Source/WebCore/rendering/RenderLayerBacking.h 2015-05-13 04:08:49 UTC (rev 184247)
+++ branches/safari-601.1.32-branch/Source/WebCore/rendering/RenderLayerBacking.h 2015-05-13 04:08:53 UTC (rev 184248)
@@ -126,12 +126,15 @@
break;
case ViewportConstrained:
m_viewportConstrainedNodeID = nodeID;
+ setIsScrollCoordinatedWithViewportConstrainedRole(nodeID);
break;
}
}
ScrollingNodeID scrollingNodeIDForChildren() const { return m_scrollingNodeID ? m_scrollingNodeID : m_viewportConstrainedNodeID; }
+ void setIsScrollCoordinatedWithViewportConstrainedRole(bool);
+
bool hasMaskLayer() const { return m_maskLayer != 0; }
bool hasChildClippingMaskLayer() const { return m_childClippingMaskLayer != nullptr; }