[webkit-reviews] review requested: [Bug 33150] Do not render the full frame when there is some elements with fixed positioning : [Attachment 47270] Repaint only the invalidated area after scrolling
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Jan 23 04:42:25 PST 2010
Benjamin Poulain <benjamin.poulain at nokia.com> has asked for review:
Bug 33150: Do not render the full frame when there is some elements with fixed
positioning
https://bugs.webkit.org/show_bug.cgi?id=33150
Attachment 47270: Repaint only the invalidated area after scrolling
https://bugs.webkit.org/attachment.cgi?id=47270&action=review
------- Additional Comments from Benjamin Poulain <benjamin.poulain at nokia.com>
The same patch with minor modification for Mac.
As Darin Adler pointed out, there is a different path for scrolling when the
view is a platformWidget():
bool ScrollView::scroll(ScrollDirection direction, ScrollGranularity
granularity)
{
if (platformWidget())
return platformScroll(direction, granularity);
In this case, ScrollView::scrollContents() is never used.
So, if platformWidget() we need the same behavior as before. I have change the
object registration function to check for platformWidget():
void FrameView::registerFixedPositionedObject(RenderObject* object)
{
if (platformWidget() && m_fixedPositionedObjects.isEmpty())
setCanBlitOnScroll(false);
m_fixedPositionedObjects.add(object);
}
void FrameView::unregisterFixedPositionedObject(RenderObject* object)
{
bool wasEmpty = m_fixedPositionedObjects.isEmpty();
m_fixedPositionedObjects.remove(object);
if (platformWidget() && !wasEmpty && m_fixedPositionedObjects.isEmpty())
setCanBlitOnScroll(!useSlowRepaints());
}
And the same for FrameView::useSlowRepaints:
bool FrameView::useSlowRepaints() const
{
return m_useSlowRepaints || m_slowRepaintObjectCount > 0 ||
(platformWidget() && !m_fixedPositionedObjects.isEmpty()) || m_isOverlapped ||
!m_contentIsOpaque;
}
bool FrameView::useSlowRepaintsIfNotOverlapped() const
{
return m_useSlowRepaints || m_slowRepaintObjectCount > 0 ||
(platformWidget() && !m_fixedPositionedObjects.isEmpty()) ||
!m_contentIsOpaque;
}
More information about the webkit-reviews
mailing list