Get rid of ScrollView.

We only allow overflow scrolling. The frame isn't special.
This is a first step in making that happen. There's a lot of
code to remove after this patch, but this gets rid of
ScrollView and a bunch of frame-level scrolling code.

Had to add in a FrameWidget class so that Scrollbar.cpp had
a way of getting to FrameView::removeChild without pulling
a core class into platform. This might go away when we rip
out the Widget tree if we made it so that FrameView didn't
keep a list of Scrollbar instances.

Modified scrollbar.html to use overflow scrolling instead of
frame level scrolling. Once we get rid of the split between
Document and documentElement, we'll be able to make the root
element in the page scrollable as well (i.e. any child of the
Document).

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/646273006
This commit is contained in:
Ojan Vafai 2014-10-23 20:20:25 -07:00
parent b0ea9ac245
commit 52e4bc9c93
2 changed files with 28 additions and 24 deletions

View File

@ -1,7 +1,9 @@
layer at (0,0) size 800x1500
layer at (0,0) size 800x600
RenderView {#document} at (0,0) size 800x600
layer at (0,0) size 800x1500
RenderBlock {html} at (0,0) size 800x1500 [bgcolor=#FFC0CB]
layer at (0,0) size 800x400
RenderBlock {sky} at (0,0) size 800x400
layer at (0,0) size 800x400 scrollHeight 1500
RenderBlock {scroller} at (0,0) size 800x400
RenderBlock {div} at (0,0) size 800x100
RenderText {#text} at (0,0) size 10x19
text run at (0,0) width 10: "a"

View File

@ -1,21 +1,23 @@
<html style="background-color: pink">
<link rel="import" href="../resources/dump-as-render-tree.html" />
<style>
div { height: 100px; }
</style>
<div>a</div>
<div>b</div>
<div>c</div>
<div>d</div>
<div>e</div>
<div>f</div>
<div>g</div>
<div>h</div>
<div>i</div>
<div>j</div>
<div>k</div>
<div>l</div>
<div>m</div>
<div>n</div>
<div>o</div>
</html>
<sky>
<scroller style="overflow: scroll; height: 400px;">
<link rel="import" href="../resources/dump-as-render-tree.html" />
<style>
div { height: 100px; }
</style>
<div>a</div>
<div>b</div>
<div>c</div>
<div>d</div>
<div>e</div>
<div>f</div>
<div>g</div>
<div>h</div>
<div>i</div>
<div>j</div>
<div>k</div>
<div>l</div>
<div>m</div>
<div>n</div>
<div>o</div>
</scroller>
</sky>