Title: [139054] trunk/Source/WebCore
- Revision
- 139054
- Author
- [email protected]
- Date
- 2013-01-08 06:06:37 -0800 (Tue, 08 Jan 2013)
Log Message
Make RenderLayer::updateNeedsCompositedScrolling scrollbars agnostic
https://bugs.webkit.org/show_bug.cgi?id=95494
Reviewed by James Robinson.
Patch by Antonio Gomes <[email protected]>
Some ports (including Qt-wk1 and BlackBerry) allow disabling
scrollbars at FrameView creation level. That said, cheking for the
scrollbars presence in order to determine if we should promote a
RenderLayer to use composited scrolling is not ideal, as done in
RenderLayerCompositor::updateNeedsCompositedScrolling()
Instead, this patch makes the RenderLayer class to query its FrameView
if it has been cached as scrollable by the later.
Least, patch also takes this opportunity to remove RenderLayer::allowsScrolling,
which became unused.
No new tests added, since there is no *practical* behavior change: ports
like Chromium and others who currently check for the scrollbars presence
in order to determine either to promote or not layers to benefit of composited
scrolling should not be affected.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateNeedsCompositedScrolling):
* rendering/RenderLayer.h:
(RenderLayer):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (139053 => 139054)
--- trunk/Source/WebCore/ChangeLog 2013-01-08 14:05:37 UTC (rev 139053)
+++ trunk/Source/WebCore/ChangeLog 2013-01-08 14:06:37 UTC (rev 139054)
@@ -1,3 +1,32 @@
+2012-12-12 Antonio Gomes <[email protected]>
+
+ Make RenderLayer::updateNeedsCompositedScrolling scrollbars agnostic
+ https://bugs.webkit.org/show_bug.cgi?id=95494
+
+ Reviewed by James Robinson.
+
+ Some ports (including Qt-wk1 and BlackBerry) allow disabling
+ scrollbars at FrameView creation level. That said, cheking for the
+ scrollbars presence in order to determine if we should promote a
+ RenderLayer to use composited scrolling is not ideal, as done in
+ RenderLayerCompositor::updateNeedsCompositedScrolling()
+
+ Instead, this patch makes the RenderLayer class to query its FrameView
+ if it has been cached as scrollable by the later.
+
+ Least, patch also takes this opportunity to remove RenderLayer::allowsScrolling,
+ which became unused.
+
+ No new tests added, since there is no *practical* behavior change: ports
+ like Chromium and others who currently check for the scrollbars presence
+ in order to determine either to promote or not layers to benefit of composited
+ scrolling should not be affected.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::updateNeedsCompositedScrolling):
+ * rendering/RenderLayer.h:
+ (RenderLayer):
+
2012-12-20 Antonio Gomes <[email protected]>
Introduce a compositing trigger for scrollable frames
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (139053 => 139054)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2013-01-08 14:05:37 UTC (rev 139053)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2013-01-08 14:06:37 UTC (rev 139054)
@@ -1896,7 +1896,8 @@
{
bool oldNeedsCompositedScrolling = m_needsCompositedScrolling;
- if (!scrollsOverflow() || !allowsScrolling())
+ FrameView* frameView = renderer()->view()->frameView();
+ if (!frameView || !frameView->containsScrollableArea(this))
m_needsCompositedScrolling = false;
else {
bool forceUseCompositedScrolling = acceleratedCompositingForOverflowScrollEnabled()
@@ -2731,11 +2732,6 @@
return toRenderBox(renderer())->scrollsOverflow();
}
-bool RenderLayer::allowsScrolling() const
-{
- return (m_hBar && m_hBar->enabled()) || (m_vBar && m_vBar->enabled());
-}
-
void RenderLayer::setHasHorizontalScrollbar(bool hasScrollbar)
{
if (hasScrollbar == hasHorizontalScrollbar())
Modified: trunk/Source/WebCore/rendering/RenderLayer.h (139053 => 139054)
--- trunk/Source/WebCore/rendering/RenderLayer.h 2013-01-08 14:05:37 UTC (rev 139053)
+++ trunk/Source/WebCore/rendering/RenderLayer.h 2013-01-08 14:06:37 UTC (rev 139054)
@@ -343,7 +343,6 @@
LayoutRect getRectToExpose(const LayoutRect& visibleRect, const LayoutRect& exposeRect, const ScrollAlignment& alignX, const ScrollAlignment& alignY);
bool scrollsOverflow() const;
- bool allowsScrolling() const; // Returns true if at least one scrollbar is visible and enabled.
bool hasScrollbars() const { return m_hBar || m_vBar; }
void setHasHorizontalScrollbar(bool);
void setHasVerticalScrollbar(bool);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes