[Webkit-unassigned] [Bug 105486] Need to re-layout fixed position elements after scale when using settings()->fixedElementsLayoutRelativeToFrame()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 19 18:12:26 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=105486





--- Comment #41 from Tien-Ren Chen <trchen at chromium.org>  2013-02-19 18:14:48 PST ---
Changes from last patch:
* Added FrameView::visibleContentScaleFactorDidChange() notification to make sure FrameView::visibleContentsResized() is called during Page::setPageScaleFactor.
* Added guard against unnecessary re-layout

(In reply to comment #38)
> (From update of attachment 186688 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=186688&action=review
> 
> > Source/WebCore/page/FrameView.cpp:2026
> > +    if (fixedElementsLayoutRelativeToFrame())
> > +        setViewportConstrainedObjectsNeedLayout();
> 
> I don't think this is the right fix for the problem you are seeing.  visibleContentsResized() is called from ScrollView::updateScrollbars() so that the view can react to the changes in visible content size due to overflow controls being created/destroyed.  In your case, you have overlay scrollbars so the overflow controls do not change the amount of content space or visible content space.  Thus there's no reason to react to visibleContentsResized since they haven't actually resized.  I suspect you observe that this patch papers over the bug you have since it's called frequently and happens to trigger in the case where you actually do need additional layout.
> 
> You need to figure out what is actually changing and why that is not triggering the layout you need.

FrameView::visibleContentsResized() is currently called from this path as a side effect:
Page::setPageScaleFactor
  FrameView::setScrollPosition
    ScrollView::setScrollPosition
      ScrollView::updateScrollbars
        FrameView::visibleContentsResized

I agree although it works in current shape it is not necessarily correct. Adding another notification for visible content scale change would make the code more robust.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list