Skip to content

Comments

layout: Make the stacking context take into account the children transform when calculating overflow areas.#12843

Merged
bors-servo merged 2 commits intoservo:masterfrom
emilio:transforms
Aug 17, 2016
Merged

layout: Make the stacking context take into account the children transform when calculating overflow areas.#12843
bors-servo merged 2 commits intoservo:masterfrom
emilio:transforms

Conversation

@emilio
Copy link
Member

@emilio emilio commented Aug 13, 2016

This is a potential fix for #12842. I have done only the math to handle simple transforms because it's three AM, but I'd like @pcwalton to verify my approach, or suggest an alternative.


  • There are tests for these changes.

This change is Reviewable

@highfive highfive assigned ghost Aug 13, 2016
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Aug 13, 2016
@emilio
Copy link
Member Author

emilio commented Aug 13, 2016

r? @pcwalton

Doesn't deal with every possible transform, so I'll add that before landing this, but I'd like to verify the approach looks good to you.

Also...
@bors-servo: try

@highfive highfive assigned pcwalton and unassigned ghost Aug 13, 2016
@bors-servo
Copy link
Contributor

⌛ Trying commit b576864 with merge a143c8e...

bors-servo pushed a commit that referenced this pull request Aug 13, 2016
 	layout: Make the stacking context take into account the children transform when calculating overflow areas.

<!-- Please describe your changes on the following line: -->

This is a potential fix for #12842. I have done only the math to handle simple transforms because it's three AM, but I'd like @pcwalton to verify my approach, or suggest an alternative.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes partially fix #12842 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12843)
<!-- Reviewable:end -->
@emilio emilio force-pushed the transforms branch 3 times, most recently from bf0b4bc to 3458ad8 Compare August 13, 2016 16:49
@emilio
Copy link
Member Author

emilio commented Aug 13, 2016

@bors-servo: try

@bors-servo
Copy link
Contributor

⌛ Trying commit 3458ad8 with merge b0a0a86...

bors-servo pushed a commit that referenced this pull request Aug 13, 2016
 	layout: Make the stacking context take into account the children transform when calculating overflow areas.

<!-- Please describe your changes on the following line: -->

This is a potential fix for #12842. I have done only the math to handle simple transforms because it's three AM, but I'd like @pcwalton to verify my approach, or suggest an alternative.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes partially fix #12842 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12843)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - linux-dev

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Aug 13, 2016
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Aug 13, 2016
@emilio
Copy link
Member Author

emilio commented Aug 13, 2016

I forgot to update the manifest, the rest of tests seem to be passing, but I'll double-check.

@bors-servo: try

@bors-servo
Copy link
Contributor

⌛ Trying commit f40dabf with merge 6504326...

bors-servo pushed a commit that referenced this pull request Aug 13, 2016
 	layout: Make the stacking context take into account the children transform when calculating overflow areas.

<!-- Please describe your changes on the following line: -->

This is a potential fix for #12842. I have done only the math to handle simple transforms because it's three AM, but I'd like @pcwalton to verify my approach, or suggest an alternative.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes partially fix #12842 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12843)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - linux-rel

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Aug 13, 2016
@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Aug 13, 2016
@emilio
Copy link
Member Author

emilio commented Aug 13, 2016

@bors-servo: try

@bors-servo
Copy link
Contributor

⌛ Trying commit 6f1fd46 with merge 934977d...

bors-servo pushed a commit that referenced this pull request Aug 13, 2016
 	layout: Make the stacking context take into account the children transform when calculating overflow areas.

<!-- Please describe your changes on the following line: -->

This is a potential fix for #12842. I have done only the math to handle simple transforms because it's three AM, but I'd like @pcwalton to verify my approach, or suggest an alternative.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes partially fix #12842 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12843)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows-dev

@glennw
Copy link
Member

glennw commented Aug 16, 2016

Reviewed 4 of 5 files at r1, 5 of 5 files at r2.
Review status: 9 of 10 files reviewed at latest revision, 3 unresolved discussions.


components/gfx/display_list/mod.rs, line 703 [r2] (raw file):

                                                       0.0)
                                           .mul(&self.transform);
        let transform_2d = Matrix2D::new(transform.m11, transform.m12,

This doesn't look like it will work with perspective transforms?

I think it's fine to merge without that, since it seems like a net improvement, but perhaps add a TODO comment.

In particular, browser.html uses a perspective transform with a translateZ to zoom the content in and out. Does this handle that case?


tests/wpt/mozilla/meta/MANIFEST.json, line 3963 [r2] (raw file):

          }
        ],
        "css/overflow_transformed_sc_rotate_ref.html": [

This seems like an extra entry?


tests/wpt/mozilla/meta/MANIFEST.json, line 13207 [r2] (raw file):

        }
      ],
      "css/overflow_transformed_sc_rotate_ref.html": [

Same here


Comments from Reviewable

@glennw
Copy link
Member

glennw commented Aug 16, 2016

Reviewed 1 of 5 files at r1.
Review status: all files reviewed at latest revision, 3 unresolved discussions.


Comments from Reviewable

emilio added 2 commits August 16, 2016 15:34
…sform when calculating overflow areas.

This only works for simple translations and similar, but I want Patrick to
validate my approach.
@emilio
Copy link
Member Author

emilio commented Aug 16, 2016

Review status: 4 of 10 files reviewed at latest revision, 3 unresolved discussions.


components/gfx/display_list/mod.rs, line 703 [r2] (raw file):

Previously, glennw (Glenn Watson) wrote…

This doesn't look like it will work with perspective transforms?

I think it's fine to merge without that, since it seems like a net improvement, but perhaps add a TODO comment.

In particular, browser.html uses a perspective transform with a translateZ to zoom the content in and out. Does this handle that case?

Yep, you're right. Added a TODO comment.

It handles at least as many transformations as before, since we're only increasing the overflow area. Just in case, just checked and it works fine with this patch applied.


tests/wpt/mozilla/meta/MANIFEST.json, line 3963 [r2] (raw file):

Previously, glennw (Glenn Watson) wrote…

This seems like an extra entry?

Yep, forgot to remove the `` from the reference.

Comments from Reviewable

@glennw
Copy link
Member

glennw commented Aug 17, 2016

@emilio r=me with those fixes

@emilio
Copy link
Member Author

emilio commented Aug 17, 2016

@bors-servo: r=glennw (they were already fixed).

@bors-servo
Copy link
Contributor

📌 Commit babb5d4 has been approved by glennw

@highfive highfive assigned glennw and unassigned pcwalton Aug 17, 2016
@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 17, 2016
@bors-servo
Copy link
Contributor

⌛ Testing commit babb5d4 with merge d85ed17...

bors-servo pushed a commit that referenced this pull request Aug 17, 2016
 	layout: Make the stacking context take into account the children transform when calculating overflow areas.

<!-- Please describe your changes on the following line: -->

This is a potential fix for #12842. I have done only the math to handle simple transforms because it's three AM, but I'd like @pcwalton to verify my approach, or suggest an alternative.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes partially fix #12842 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12843)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - linux-rel

@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 17, 2016
@highfive
Copy link

  ▶ FAIL [expected PASS] /css-transforms-1_dev/html/perspective-origin-004.htm
  └   → /css-transforms-1_dev/html/perspective-origin-004.htm 68d5e8d6d5edcd2bef5ecaaf62cbbbac863dee22
/css-transforms-1_dev/html/reference/ref-filled-green-100px-square.htm d4aa213e3e31e41d0d8e84aec79e94f860f27178
Testing 68d5e8d6d5edcd2bef5ecaaf62cbbbac863dee22 == d4aa213e3e31e41d0d8e84aec79e94f860f27178

@emilio
Copy link
Member Author

emilio commented Aug 17, 2016

@bors-servo: retry #9087

@bors-servo
Copy link
Contributor

⌛ Testing commit babb5d4 with merge 5f16958...

bors-servo pushed a commit that referenced this pull request Aug 17, 2016
 	layout: Make the stacking context take into account the children transform when calculating overflow areas.

<!-- Please describe your changes on the following line: -->

This is a potential fix for #12842. I have done only the math to handle simple transforms because it's three AM, but I'd like @pcwalton to verify my approach, or suggest an alternative.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes partially fix #12842 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12843)
<!-- 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 17, 2016
@bors-servo
Copy link
Contributor

☀️ Test successful - arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows-dev

@bors-servo bors-servo merged commit babb5d4 into servo:master Aug 17, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Aug 17, 2016
@emilio emilio deleted the transforms branch August 17, 2016 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect clipping of nested stacking contexts.

5 participants