[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
Wed Feb 20 01:27:54 PST 2013


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





--- Comment #49 from Tien-Ren Chen <trchen at chromium.org>  2013-02-20 01:30:17 PST ---
(From update of attachment 189217)
View in context: https://bugs.webkit.org/attachment.cgi?id=189217&action=review

>>>>> Source/WebCore/page/Page.cpp:751
>>>>> +    view->visibleContentScaleFactorDidChange();
>>>> 
>>>> this line will only be reached if the page scale actually changed (see line 726), so why do another round of checks on the visible viewport size? when will that stay the same?
>>> 
>>> FrameView::visibleContentsResized() gets called a lot. Scrolling without changing scrollbar visibility? Still get called. Changing overlay scrollbar visibility? Still get called.
>>> 
>>> I would say we'd better apply the same guard on the whole function, but I don't know what are the possible side effects.
>> 
>> Still waiting for an answer to ^^
> 
> I don't really understand this comment.  It seems to be a general statement and not an answer to my question re page scale changes.

For example, when you scroll a page, although visible content size stays the same, but FrameView::visibleContentsResized() will still get called by ScrollView::updateScrollbars().
Check on the visible viewport size is not really a necessity, but an optimization. I can remove that if you want.

If your question is why not just call setViewportConstrainedObjectsNeedLayout() directly, I'd say it is better to avoid code duplication. If fixed-position elements need layout if and only if visible content size changes, then the only place we should do that is in FrameView::visibleContentsResized().

-- 
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