Skip to content

Do not create stacking contexts for text fragments - #11035

Merged
bors-servo merged 1 commit into
servo:masterfrom
mrobinson:no-stacking-contexts-for-text-fragments
Jun 2, 2016
Merged

bors-servo merged 1 commit into
servo:masterfrom
mrobinson:no-stacking-contexts-for-text-fragments

Conversation

@mrobinson

@mrobinson mrobinson commented May 5, 2016 •

Copy link
Copy Markdown
Member

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

highfive commented May 5, 2016

Copy link
Copy Markdown

warning Warning warning

  • These commits modify layout code, but no tests are modified.Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label May 5, 2016
@mrobinson

Copy link
Copy Markdown
Member Author

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
Copy Markdown
Member Author

@pcwalton r?

@jdm jdm assigned pcwalton and unassigned jdm May 5, 2016
@pcwalton

pcwalton commented May 5, 2016

Copy link
Copy Markdown
Contributor

@bors-servo: r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit ea67804 has been approved by pcwalton

@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 May 5, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit ea67804 with merge b4ac2e7...

bors-servo pushed 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
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 May 6, 2016
@highfive

highfive commented May 6, 2016

Copy link
Copy Markdown
  ▶ 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
Copy Markdown
Member Author

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

pcwalton commented May 9, 2016

Copy link
Copy Markdown
Contributor

I agree with marking them both failing.

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

highfive commented May 9, 2016

Copy link
Copy Markdown

New code was committed to pull request.

@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 May 9, 2016
@pcwalton

pcwalton commented May 9, 2016

Copy link
Copy Markdown
Contributor

@bors-servo: r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit f7134ca has been approved by pcwalton

@highfive highfive removed the S-awaiting-review There is new code that needs to be reviewed. label May 9, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit f7134ca with merge 4473f91...

@highfive highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label May 9, 2016
bors-servo pushed 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
Copy Markdown
Contributor

💔 Test failed - mac-rel-css

@mrobinson

Copy link
Copy Markdown
Member Author

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

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

Copy link
Copy Markdown

New code was committed to pull request.

@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 May 27, 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.
@mrobinson
mrobinson force-pushed the no-stacking-contexts-for-text-fragments branch from ee4c8f1 to 7e4cf6a Compare June 1, 2016 22:40
@highfive

highfive commented Jun 1, 2016

Copy link
Copy Markdown

New code was committed to pull request.

@mrobinson

Copy link
Copy Markdown
Member Author

@bors-servo try

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Trying commit 7e4cf6a with merge a0fadf9...

bors-servo pushed 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
Copy Markdown
Contributor

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

@mrobinson

Copy link
Copy Markdown
Member Author

@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

pcwalton commented Jun 2, 2016

Copy link
Copy Markdown
Contributor

Sure, that's fine.

@mrobinson

mrobinson commented Jun 2, 2016 •

Copy link
Copy Markdown
Member Author

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

@mrobinson

Copy link
Copy Markdown
Member Author

@bors-servo r=pcwalton

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 7e4cf6a has been approved by pcwalton

@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 Jun 2, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 7e4cf6a with merge cc7953e...

bors-servo pushed 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
Copy Markdown
Contributor

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

@bors-servo
bors-servo merged commit 7e4cf6a into servo:master Jun 2, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jun 2, 2016
@mrobinson
mrobinson deleted the no-stacking-contexts-for-text-fragments branch June 2, 2016 02:02
@jdm

jdm commented Jun 3, 2016

Copy link
Copy Markdown
Member

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

mbrubeck commented Jun 3, 2016

Copy link
Copy Markdown
Contributor

Possible also #11574.

@mrobinson

Copy link
Copy Markdown
Member Author

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants