Skip to content

layout: Implement basic overflow: scroll functionality. - #7090

Merged
bors-servo merged 6 commits into
servo:masterfrom
pcwalton:overflow-scroll
Aug 11, 2015
Merged

bors-servo merged 6 commits into
servo:masterfrom
pcwalton:overflow-scroll

Conversation

@pcwalton

@pcwalton pcwalton commented Aug 8, 2015

Copy link
Copy Markdown
Contributor

Known issues:

  • Display list optimization can sometimes optimize out elements that
    should be shown. This affects the Enyo demo.
  • The overflow: scroll container doesn't clip the inner layer properly
    when borders, border radius, etc. are present.
  • overflow-x: scroll and overflow-y: scroll don't work individually;
    elements are scrolled all at once.

Note that multiple layers per stacking context aren't needed for the Enyo demo; rather the issue is that the height of the main area is being calculated incorrectly. (It looks like JS is measuring the height and poking in an explicit value that is too tall.)

r? @glennw

Review on Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 8, 2015
@glennw

glennw commented Aug 8, 2015

Copy link
Copy Markdown
Member

Reviewed 3 of 3 files at r1, 1 of 1 files at r2, 7 of 7 files at r3, 3 of 3 files at r4, 3 of 3 files at r5, 1 of 1 files at r6.
Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from the review on Reviewable.io

@glennw

glennw commented Aug 8, 2015

Copy link
Copy Markdown
Member

@pcwalton Thanks very much for looking into this! The code in general looks good to me, though there are still a few artifacts in enyojs as you mentioned above.

The display list optimization should be fairly easy to fix (I'll look into that shortly). However, the bottom bar does seem to get drawn over by the scrolling layer, did you notice this? Is this a draw order limitation of having a single layer still, or something else? (I'll look into it anyway, just pasting here in case you already know what the cause is).

@glennw

glennw commented Aug 8, 2015

Copy link
Copy Markdown
Member

The scrolling also seems to be extremely laggy, although that may be related to something unrelated on my laptop. I'll look into it.

@pcwalton

pcwalton commented Aug 8, 2015

Copy link
Copy Markdown
Contributor Author

However, the bottom bar does seem to get drawn over by the scrolling layer, did you notice this? Is this a draw order limitation of having a single layer still, or something else?

Yeah, the problem here is that the height of the div with overflow: scroll set is too high. I tried manually changing the height to include the bottom bar using Firefox' development tools and observed that, in that case, Gecko paints the div over the bottom bar as well. So this is a straightforward layout or script bug of some kind.

It may be the case that script is manually measuring the height of the content area, subtracting the height of the bottom bar, and writing an absolute height in—i.e. that script is trying to do layout manually. If that's indeed true, then the bug could be in the way script is measuring the height of the bottom bar; we might be mistakenly returning 0 for the layout query that script is doing.

@glennw

glennw commented Aug 9, 2015

Copy link
Copy Markdown
Member

This PR also breaks the rounded corners on items in the data grid list sample. I'll look into that - I suspect a draw order issue, as I've seen that before when I was testing some other changes to display list generation for this sample.

@glennw

glennw commented Aug 10, 2015

Copy link
Copy Markdown
Member

OK, I think I can see the issue with the bottom border - it's unrelated, so it should be fine to land this. I can't reproduce the laggy scrolling any more.

There are a number of wpt/css tests that change from fail -> pass with this, which will need to be updated. r=me after that.

@metajack metajack mentioned this pull request Aug 10, 2015
28 of 40 tasks
@pcwalton
pcwalton force-pushed the overflow-scroll branch 3 times, most recently from c36d64d to d520b37 Compare August 10, 2015 23:48
@pcwalton

Copy link
Copy Markdown
Contributor Author

@bors-servo: r=glennw

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit d520b37 has been approved by glennw

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit d520b37 with merge a015a07...

bors-servo pushed a commit that referenced this pull request Aug 10, 2015
layout: Implement basic `overflow: scroll` functionality.

Known issues:

* Display list optimization can sometimes optimize out elements that
  should be shown. This affects the Enyo demo.

* The `overflow: scroll` container doesn't clip the inner layer properly
  when borders, border radius, etc. are present.

* `overflow-x: scroll` and `overflow-y: scroll` don't work individually;
  elements are scrolled all at once.

Note that multiple layers per stacking context aren't needed for the Enyo demo; rather the issue is that the height of the main area is being calculated incorrectly. (It looks like JS is measuring the height and poking in an explicit value that is too tall.)

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7090)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Aug 10, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux1

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Aug 10, 2015
@metajack

Copy link
Copy Markdown
Collaborator

@bors-servo retry

  • infra issues

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit d520b37 with merge 5a86b69...

bors-servo pushed a commit that referenced this pull request Aug 10, 2015
layout: Implement basic `overflow: scroll` functionality.

Known issues:

* Display list optimization can sometimes optimize out elements that
  should be shown. This affects the Enyo demo.

* The `overflow: scroll` container doesn't clip the inner layer properly
  when borders, border radius, etc. are present.

* `overflow-x: scroll` and `overflow-y: scroll` don't work individually;
  elements are scrolled all at once.

Note that multiple layers per stacking context aren't needed for the Enyo demo; rather the issue is that the height of the main area is being calculated incorrectly. (It looks like JS is measuring the height and poking in an explicit value that is too tall.)

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7090)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux2

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. S-tests-failed The changes caused existing tests to fail. and removed S-tests-failed The changes caused existing tests to fail. S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Aug 10, 2015
@pcwalton

Copy link
Copy Markdown
Contributor Author

@bors-servo: retry

I don't understand the log failure but it looks like an intermittent something-or-other

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit d520b37 with merge 3d789ad...

bors-servo pushed a commit that referenced this pull request Aug 11, 2015
layout: Implement basic `overflow: scroll` functionality.

Known issues:

* Display list optimization can sometimes optimize out elements that
  should be shown. This affects the Enyo demo.

* The `overflow: scroll` container doesn't clip the inner layer properly
  when borders, border radius, etc. are present.

* `overflow-x: scroll` and `overflow-y: scroll` don't work individually;
  elements are scrolled all at once.

Note that multiple layers per stacking context aren't needed for the Enyo demo; rather the issue is that the height of the main area is being calculated incorrectly. (It looks like JS is measuring the height and poking in an explicit value that is too tall.)

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7090)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Aug 11, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - mac2

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Aug 11, 2015
@jdm

jdm commented Aug 11, 2015

Copy link
Copy Markdown
Member
failures:
    overflow_auto.html == overflow_simple_b.html
    overflow_scroll.html == overflow_simple_b.html

At this point the only thing it does is to try to avoid adding display
items that are outside the root scrollable area, which is both wrong
(since it's incompatible with having scrollable areas outside the root)
and is useless (because we have displayports now).
Known issues:

* Display list optimization can sometimes optimize out elements that
  should be shown. This affects the Enyo demo.

* The `overflow: scroll` container doesn't clip the inner layer properly
  when borders, border radius, etc. are present.

* `overflow-x: scroll` and `overflow-y: scroll` don't work individually;
  elements are scrolled all at once.

* Scrolling only works on absolutely-positioned elements.
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Aug 11, 2015
@pcwalton

Copy link
Copy Markdown
Contributor Author

@bors-servo: r=glennw

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit dd7345a has been approved by glennw

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit dd7345a with merge b05b02e...

bors-servo pushed a commit that referenced this pull request Aug 11, 2015
layout: Implement basic `overflow: scroll` functionality.

Known issues:

* Display list optimization can sometimes optimize out elements that
  should be shown. This affects the Enyo demo.

* The `overflow: scroll` container doesn't clip the inner layer properly
  when borders, border radius, etc. are present.

* `overflow-x: scroll` and `overflow-y: scroll` don't work individually;
  elements are scrolled all at once.

Note that multiple layers per stacking context aren't needed for the Enyo demo; rather the issue is that the height of the main area is being calculated incorrectly. (It looks like JS is measuring the height and poking in an explicit value that is too tall.)

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7090)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Aug 11, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, gonk, linux1, linux2, mac1, mac2, mac3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants