Repository navigation
layout: Implement basic overflow: scroll functionality. - #7090
Conversation
|
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. Comments from the review on Reviewable.io |
|
@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). |
|
The scrolling also seems to be extremely laggy, although that may be related to something unrelated on my laptop. I'll look into it. |
Yeah, the problem here is that the height of the div with 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. |
|
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. |
|
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. |
c36d64d to
d520b37
Compare
|
@bors-servo: r=glennw |
|
📌 Commit d520b37 has been approved by |
|
⌛ Testing commit d520b37 with merge a015a07... |
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 -->
|
💔 Test failed - linux1 |
|
@bors-servo retry
|
|
⌛ Testing commit d520b37 with merge 5a86b69... |
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 -->
|
💔 Test failed - linux2 |
|
@bors-servo: retry I don't understand the log failure but it looks like an intermittent something-or-other |
|
⌛ Testing commit d520b37 with merge 3d789ad... |
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 -->
|
💔 Test failed - mac2 |
|
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).
scrolled. Necessary for `overflow: scroll`.
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.
d520b37 to
dd7345a
Compare
|
@bors-servo: r=glennw |
|
📌 Commit dd7345a has been approved by |
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 -->
Known issues:
should be shown. This affects the Enyo demo.
overflow: scrollcontainer doesn't clip the inner layer properlywhen borders, border radius, etc. are present.
overflow-x: scrollandoverflow-y: scrolldon'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