Hello Blinkers,
1. What is the intended purpose of FrameView and RenderView?
2. Why does FrameView deal with top-level scrolling instead of
RenderView (or the RenderView's corresponding RenderLayer)?
3. Would it make sense if we moved all rendering / scrolling logic
from FrameView into RenderView instead? Then FrameView seems to be
actually just a "LayoutEngine" and should be renamed?
4. Scrolling on a scrollable area should never affect layout, right?
Details about why I'm asking:
Fixed-position layers have incorrect repaint rects when the
repaintContainer is a descendant of the fixed-position containing
block. https://codereview.chromium.org/23523046/ . These layers need
to know the scroll offset in order to correctly compute their repaint
rect. However, this scroll offset is only known by the FrameView.
The patch I have proposed will fix the specific scenario by modifying
FrameView scrolling code, where scrollPosition() is known. But if any
other code uses the layer's repaint rects, they would still be using
incorrect repaint rects.
On Thu, Sep 12, 2013 at 4:33 PM, Shawn Singh <shawn...@chromium.org> wrote:Hello Blinkers,
1. What is the intended purpose of FrameView and RenderView?FrameView is the viewport, RenderView is the Initial Containing Block. When you scroll at the top level you move the FrameView up and down (or left and right). The RenderView never moves though, since the Document itself doesn't have a concept of scrolling, instead it remains stuck at the top of the page and is sized to the viewport.Specifically this part seems relevant:"""If the document is scrolled, then the initial containing block [RenderView] will be moved offscreen. It is always at the top of the document and sized to the viewport [FrameView]. One area of confusion that people often have with the initial containing block is that they expect it to somehow be outside the document and part of the viewport."""
2. Why does FrameView deal with top-level scrolling instead of
RenderView (or the RenderView's corresponding RenderLayer)?Because FrameView is the viewport and that's what's moving when you scroll at the top level. The RenderView doesn't move, and is (often) smaller than the Document itself.
3. Would it make sense if we moved all rendering / scrolling logic
from FrameView into RenderView instead? Then FrameView seems to be
actually just a "LayoutEngine" and should be renamed?Maybe; it might be kind of awkward since the top level scrolling behavior is different and there's special rules. For example we never reverse the scrollbar side based on writing mode which, according to Tony Chang, was because it was jarring to users to have the top level scrollbar jump from left to right based on the direction of pages in different tabs. The scrollbars inside the page (e.x overflow: scroll) do change sides though.
On Thu, Sep 12, 2013 at 4:33 PM, Shawn Singh <shawn...@chromium.org> wrote:Hello Blinkers,
1. What is the intended purpose of FrameView and RenderView?FrameView is the viewport, RenderView is the Initial Containing Block. When you scroll at the top level you move the FrameView up and down (or left and right). The RenderView never moves though, since the Document itself doesn't have a concept of scrolling, instead it remains stuck at the top of the page and is sized to the viewport.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.