Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not create stacking contexts for text fragments #11035

Merged

Conversation

@mrobinson
Copy link
Member

mrobinson commented May 5, 2016

Without this change, each text fragment in a block that establishes a
stacking context will establish its own stacking context. This is
unnecessary and increases the amount of work done during display list
construction. This change should not change output, but should improve
performance.


This change is Reviewable

@highfive
Copy link

highfive commented May 5, 2016

warning Warning warning

  • These commits modify layout code, but no tests are modified.Please consider adding a test!
@mrobinson
Copy link
Member Author

mrobinson commented May 5, 2016

An example of this problem is that following HTML creates around 15 stacking contexts:

<body>
<div style="overflow:scroll;">
text<br/>
text<br/>
text<br/>
text<br/>
text<br/>
text<br/>
text<br/>
text<br/>
text<br/>
text<br/>
text<br/>
</div>
</body>
@mrobinson
Copy link
Member Author

mrobinson commented May 5, 2016

@jdm jdm assigned pcwalton and unassigned jdm May 5, 2016
@pcwalton
Copy link
Contributor

pcwalton commented May 5, 2016

@bors-servo
Copy link
Contributor

bors-servo commented May 5, 2016

📌 Commit ea67804 has been approved by pcwalton

@bors-servo
Copy link
Contributor

bors-servo commented May 6, 2016

Testing commit ea67804 with merge b4ac2e7...

bors-servo added a commit that referenced this pull request May 6, 2016
…nts, r=pcwalton

Do not create stacking contexts for text fragments

Without this change, each text fragment in a block that establishes a
stacking context will establish its own stacking context. This is
unnecessary and increases the amount of work done during display list
construction. This change should not change output, but should improve
performance.

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

bors-servo commented May 6, 2016

💔 Test failed - mac-rel-css

@highfive
Copy link

highfive commented May 6, 2016

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/css-transforms-3d-on-anonymous-block-001.htm

  ▶ FAIL [expected PASS] /css-transforms-1_dev/html/regions-transforms-019.htm
  └   → /css-transforms-1_dev/html/regions-transforms-019.htm a73900b921283f0b23e810c65b52dfae53733c12
/css-transforms-1_dev/html/reference/regions-transforms-019-ref.htm 7e9b5786c95bdb8b960667bdac0e68e834e8a162
Testing a73900b921283f0b23e810c65b52dfae53733c12 == 7e9b5786c95bdb8b960667bdac0e68e834e8a162

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-abspos-002.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-abspos-007.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-applies-to-002.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-input-001.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-input-003.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-input-004.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-input-006.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-input-005.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-input-007.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-input-008.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-input-009.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-input-010.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-input-011.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-input-012.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-input-013.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-input-014.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-input-015.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-input-016.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-origin-004.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-origin-003.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-origin-005.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-origin-006.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-propagate-inherit-boolean-001.htm

  ▶ FAIL [expected PASS] /css-transforms-1_dev/html/transform-transformable-inline-block.htm
  └   → /css-transforms-1_dev/html/transform-transformable-inline-block.htm 01362f021fc8dd139e5f4909ff0255082519ea11
/css-transforms-1_dev/html/reference/transform-transformable-inline-block-ref.htm d9d9e489bc5b4508c01b06c7ff92f19dcc2ece3c
Testing 01362f021fc8dd139e5f4909ff0255082519ea11 == d9d9e489bc5b4508c01b06c7ff92f19dcc2ece3c

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-translate-001.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-translate-002.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-translate-003.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-translate-004.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-translate-005.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-translatex-001.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-translatex-002.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-translatex-003.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-translatex-004.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-translatex-005.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-translatey-001.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-translatey-002.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-translatey-003.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-translatey-004.htm

  ▶ PASS [expected FAIL] /css-transforms-1_dev/html/transform-translatey-005.htm
@mrobinson
Copy link
Member Author

mrobinson commented May 9, 2016

I investigated both newly failing tests. for both tests, the test and reference match before my change, but both are rendered incorrectly (according to companion text and display in Firefox and Chromium).

For the first test, the reference has progressed slightly, but the test has not. For the second test, the test itself has progressed, but the reference has not. I think the right thing to do here is to mark these tests as failing. The failing reference reflects an improvement in proper layout, but not a sufficient one to keep the tests passing. Later I can investigate why these are failing.

@pcwalton
Copy link
Contributor

pcwalton commented May 9, 2016

I agree with marking them both failing.

@mrobinson mrobinson force-pushed the mrobinson:no-stacking-contexts-for-text-fragments branch from ea67804 to f7134ca May 9, 2016
@highfive
Copy link

highfive commented May 9, 2016

New code was committed to pull request.

@pcwalton
Copy link
Contributor

pcwalton commented May 9, 2016

@bors-servo
Copy link
Contributor

bors-servo commented May 9, 2016

📌 Commit f7134ca has been approved by pcwalton

@bors-servo
Copy link
Contributor

bors-servo commented May 9, 2016

Testing commit f7134ca with merge 4473f91...

bors-servo added a commit that referenced this pull request May 9, 2016
…nts, r=pcwalton

Do not create stacking contexts for text fragments

Without this change, each text fragment in a block that establishes a
stacking context will establish its own stacking context. This is
unnecessary and increases the amount of work done during display list
construction. This change should not change output, but should improve
performance.

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

bors-servo commented May 9, 2016

💔 Test failed - mac-rel-css

@highfive
Copy link

highfive commented May 11, 2016

  ▶ FAIL [expected PASS] /css-transforms-1_dev/html/css-transforms-3d-on-anonymous-block-001.htm
  └   → /css-transforms-1_dev/html/css-transforms-3d-on-anonymous-block-001.htm b0b9af54431bf5cb94d9c97797dd47c2e795f60d
/css-transforms-1_dev/html/reference/css-transforms-3d-anonymous-block-ref.htm eb80639ff23c155cc08ffbcf47490be3b2d32e2e
Testing b0b9af54431bf5cb94d9c97797dd47c2e795f60d == eb80639ff23c155cc08ffbcf47490be3b2d32e2e

  ▶ FAIL [expected PASS] /css-transforms-1_dev/html/transform-abspos-002.htm
  └   → /css-transforms-1_dev/html/transform-abspos-002.htm 71f0313eedfbfcce0b0fcc5ae55f34b1daa3b8d8
/css-transforms-1_dev/html/reference/transform-abspos-ref.htm 78d197606924062e8dd2a773c977afcecf8940f8
Testing 71f0313eedfbfcce0b0fcc5ae55f34b1daa3b8d8 == 78d197606924062e8dd2a773c977afcecf8940f8

  ▶ FAIL [expected PASS] /css-transforms-1_dev/html/transform-abspos-007.htm
  └   → /css-transforms-1_dev/html/transform-abspos-007.htm 71f0313eedfbfcce0b0fcc5ae55f34b1daa3b8d8
/css-transforms-1_dev/html/reference/transform-abspos-ref.htm 78d197606924062e8dd2a773c977afcecf8940f8
Testing 71f0313eedfbfcce0b0fcc5ae55f34b1daa3b8d8 == 78d197606924062e8dd2a773c977afcecf8940f8
@mrobinson
Copy link
Member Author

mrobinson commented May 11, 2016

So it seems like the results differ between mac and linux. Very curious.

@mrobinson mrobinson force-pushed the mrobinson:no-stacking-contexts-for-text-fragments branch from 41f5cc8 to ee4c8f1 May 27, 2016
@highfive
Copy link

highfive commented May 27, 2016

New code was committed to pull request.

Without this change, each text fragment in a block that establishes a
stacking context will establish its own stacking context. This is
unnecessary and increases the amount of work done during display list
construction.
@mrobinson mrobinson force-pushed the mrobinson:no-stacking-contexts-for-text-fragments branch from ee4c8f1 to 7e4cf6a Jun 1, 2016
@highfive
Copy link

highfive commented Jun 1, 2016

New code was committed to pull request.

@mrobinson
Copy link
Member Author

mrobinson commented Jun 1, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Jun 1, 2016

Trying commit 7e4cf6a with merge a0fadf9...

bors-servo added a commit that referenced this pull request Jun 1, 2016
…nts, r=<try>

Do not create stacking contexts for text fragments

Without this change, each text fragment in a block that establishes a
stacking context will establish its own stacking context. This is
unnecessary and increases the amount of work done during display list
construction. This change should not change output, but should improve
performance.

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

bors-servo commented Jun 1, 2016

@mrobinson
Copy link
Member Author

mrobinson commented Jun 1, 2016

@pcwalton So, I think that the failure in '/css-transforms-1_dev/html/css-transforms-3d-on-anonymous-block-001.htm' is platform specific due to font issues. I looked at the failing image and the text is shifted a few pixels up on Linux and not on Mac. I've posted a new patch which marks the test as failing only on Linux. Does this seem like a reasonable way forward?

@pcwalton
Copy link
Contributor

pcwalton commented Jun 2, 2016

Sure, that's fine.

@mrobinson
Copy link
Member Author

mrobinson commented Jun 2, 2016

@pcwalton Thanks! I'll hand it to bors again.

@mrobinson
Copy link
Member Author

mrobinson commented Jun 2, 2016

@bors-servo r=pcwalton

@bors-servo
Copy link
Contributor

bors-servo commented Jun 2, 2016

📌 Commit 7e4cf6a has been approved by pcwalton

@bors-servo
Copy link
Contributor

bors-servo commented Jun 2, 2016

Testing commit 7e4cf6a with merge cc7953e...

bors-servo added a commit that referenced this pull request Jun 2, 2016
…nts, r=pcwalton

Do not create stacking contexts for text fragments

Without this change, each text fragment in a block that establishes a
stacking context will establish its own stacking context. This is
unnecessary and increases the amount of work done during display list
construction. This change should not change output, but should improve
performance.

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

bors-servo commented Jun 2, 2016

@bors-servo bors-servo merged commit 7e4cf6a into servo:master Jun 2, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@mrobinson mrobinson deleted the mrobinson:no-stacking-contexts-for-text-fragments branch Jun 2, 2016
@jdm
Copy link
Member

jdm commented Jun 3, 2016

This PR made css-transforms-1_dev/html/transform-abspos-002.htm and css-transforms-1_dev/html/transform-abspos-007.htm very unstable.

@mbrubeck
Copy link
Contributor

mbrubeck commented Jun 3, 2016

Possible also #11574.

@mrobinson
Copy link
Member Author

mrobinson commented Jun 3, 2016

Uugh. Sorry for this breakage. I'm going to try to allocate some time to look at this today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants
You can’t perform that action at this time.