Skip to content

layout: Make overflow calculation take relative percentages into account. - #7313

Merged
bors-servo merged 4 commits into
servo:masterfrom
pcwalton:position-relative-percentage-overflow
Sep 1, 2015
Merged

bors-servo merged 4 commits into
servo:masterfrom
pcwalton:position-relative-percentage-overflow

Conversation

@pcwalton

Copy link
Copy Markdown
Contributor

This necessitated changing overflow to be calculated by the parent flow
if relatively positioned children are present. That is because the
overflow regions cannot be calculated without knowing relative offsets,
which themselves cannot be calculated without knowing the parent size
(because of percentages). To accomplish this without sacrificing
parallelism in the non-relative case, this patch splits overflow into
"early" and "late" computation. Late overflow computation cannot be
parallelized across children, while early overflow computation can.

Makes the "Apple Music" text show up over the full-bleed promotional
background on apple.com.

r? @SimonSapin -- would appreciate a look over the iframe test case that was changed.

Review on Reviewable

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

Copy link
Copy Markdown
Contributor Author

r? @mbrubeck for everything except that iframe test case

@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #7237) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added S-needs-rebase There are merge conflict errors. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Aug 21, 2015
@mbrubeck mbrubeck added the S-fails-tidy `./mach test-tidy` reported errors. label Aug 21, 2015
@mbrubeck

Copy link
Copy Markdown
Contributor

Reviewed 13 of 13 files at r1, 1 of 1 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from the review on Reviewable.io

@mbrubeck

Copy link
Copy Markdown
Contributor

r=mbrubeck with tidy errors fixed

@mbrubeck mbrubeck removed the S-awaiting-review There is new code that needs to be reviewed. label Aug 24, 2015
@SimonSapin

Copy link
Copy Markdown
Member

tests/ref/iframe/size_attributes_vertical_writing_mode.html is messed up in many interesting ways. #7355 makes it more reasonable. I recommend reverting the change in this PR to that file, rebasing on top of #7355, and adding another test for relative positioning in vertical-lr mode that goes something like:

<!DOCTYPE html>
<style>
html { height: 250px }
body { writing-mode: vertical-lr }
div { width: 100px; height: 100px }
</style>
<div style="background: blue"></div>
<div style="background: green; position: relative; top: 10px; left: 20px"></div>

@SimonSapin

Copy link
Copy Markdown
Member

The reference should use position: relative; top: 10px; left: 20px but not writing-mode the translation caused by relpos should be the same regardless of writing mode.

bors-servo pushed a commit that referenced this pull request Aug 25, 2015
…ode, r=pcwalton

Refactor tests/ref/iframe/size_attributes_vertical_writing_mode.html

… to not use an arbitrary 104px offset that just happens to match the reference and relies on incorrect behavior.

See discussion in #7313.

r? @pcwalton

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

This necessitated changing overflow to be calculated by the parent flow
if relatively positioned children are present. That is because the
overflow regions cannot be calculated without knowing relative offsets,
which themselves cannot be calculated without knowing the parent size
(because of percentages). To accomplish this without sacrificing
parallelism in the non-relative case, this patch splits overflow into
"early" and "late" computation. Late overflow computation cannot be
parallelized across children, while early overflow computation can.

Makes the "Apple Music" text show up over the full-bleed promotional
background on apple.com.
@pcwalton
pcwalton force-pushed the position-relative-percentage-overflow branch from 06f6d48 to e835fb6 Compare August 31, 2015 23:51
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 31, 2015
@pcwalton

Copy link
Copy Markdown
Contributor Author

@bors-servo: r=mbrubeck

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit e835fb6 has been approved by mbrubeck

@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. S-needs-rebase There are merge conflict errors. labels Aug 31, 2015
@pcwalton

Copy link
Copy Markdown
Contributor Author

Removed the changes to that iframe test case.

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit e835fb6 with merge c0216a4...

bors-servo pushed a commit that referenced this pull request Sep 1, 2015
… r=mbrubeck

layout: Make overflow calculation take relative percentages into account.

This necessitated changing overflow to be calculated by the parent flow
if relatively positioned children are present. That is because the
overflow regions cannot be calculated without knowing relative offsets,
which themselves cannot be calculated without knowing the parent size
(because of percentages). To accomplish this without sacrificing
parallelism in the non-relative case, this patch splits overflow into
"early" and "late" computation. Late overflow computation cannot be
parallelized across children, while early overflow computation can.

Makes the "Apple Music" text show up over the full-bleed promotional
background on apple.com.

r? @SimonSapin -- would appreciate a look over the iframe test case that was changed.

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

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-dev

@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 Sep 1, 2015
@jdm jdm removed the S-tests-failed The changes caused existing tests to fail. label Sep 1, 2015
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Sep 1, 2015
@pcwalton

pcwalton commented Sep 1, 2015

Copy link
Copy Markdown
Contributor Author

@bors-servo: r=glennw

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 475d358 has been approved by glennw

@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 Sep 1, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 475d358 with merge eefb859...

bors-servo pushed a commit that referenced this pull request Sep 1, 2015
… r=glennw

layout: Make overflow calculation take relative percentages into account.

This necessitated changing overflow to be calculated by the parent flow
if relatively positioned children are present. That is because the
overflow regions cannot be calculated without knowing relative offsets,
which themselves cannot be calculated without knowing the parent size
(because of percentages). To accomplish this without sacrificing
parallelism in the non-relative case, this patch splits overflow into
"early" and "late" computation. Late overflow computation cannot be
parallelized across children, while early overflow computation can.

Makes the "Apple Music" text show up over the full-bleed promotional
background on apple.com.

r? @SimonSapin -- would appreciate a look over the iframe test case that was changed.

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

Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-css

@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 Sep 1, 2015
@mbrubeck

mbrubeck commented Sep 1, 2015

Copy link
Copy Markdown
Contributor
/css21_dev/html4/abs-pos-non-replaced-vlr-069.htm
-------------------------------------------------
PASS expected FAIL [Parent]
/css21_dev/html4/abs-pos-non-replaced-vlr-177.htm
-------------------------------------------------
PASS expected FAIL [Parent]
/css21_dev/html4/abs-pos-non-replaced-vlr-193.htm
-------------------------------------------------
PASS expected FAIL [Parent]
/css21_dev/html4/abs-pos-non-replaced-vrl-176.htm
-------------------------------------------------
PASS expected FAIL [Parent]
/css21_dev/html4/abs-pos-non-replaced-vrl-192.htm
-------------------------------------------------
PASS expected FAIL [Parent]
/css21_dev/html4/absolute-replaced-width-015.htm
------------------------------------------------
PASS expected FAIL [Parent]

@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 Sep 1, 2015
@pcwalton

pcwalton commented Sep 1, 2015

Copy link
Copy Markdown
Contributor Author

@bors-servo: r=mbrubeck

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit ce327b8 has been approved by mbrubeck

@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 Sep 1, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit ce327b8 with merge dcaf663...

bors-servo pushed a commit that referenced this pull request Sep 1, 2015
… r=mbrubeck

layout: Make overflow calculation take relative percentages into account.

This necessitated changing overflow to be calculated by the parent flow
if relatively positioned children are present. That is because the
overflow regions cannot be calculated without knowing relative offsets,
which themselves cannot be calculated without knowing the parent size
(because of percentages). To accomplish this without sacrificing
parallelism in the non-relative case, this patch splits overflow into
"early" and "late" computation. Late overflow computation cannot be
parallelized across children, while early overflow computation can.

Makes the "Apple Music" text show up over the full-bleed promotional
background on apple.com.

r? @SimonSapin -- would appreciate a look over the iframe test case that was changed.

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

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt

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. S-fails-tidy `./mach test-tidy` reported errors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants