Repository navigation
script: More carefully handle dirty root and descendant damage marking - #46906
Conversation
|
🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#61656) with upstreamable changes. |
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#61656). |
|
✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#61656) title and body. |
|
🔨 Triggering try run (#30622224415) for Linux (WPT) |
|
Test results for linux-wpt from try job (#30622224415): Flaky unexpected result (40)
Stable unexpected results that are known to be intermittent (13)
Stable unexpected results (1)
|
|
|
|
I've filed #46912 for the failure which is almost certainly unrelated. |
|
🔨 Triggering try run (#30645618583) for Linux (WPT) |
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#61656). |
|
✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#61656) title and body. |
|
Test results for linux-wpt from try job (#30645618583): Flaky unexpected result (30)
Stable unexpected results that are known to be intermittent (22)
|
|
✨ Try run (#30645618583) succeeded. |
Script passes a dirty root to layout along with setting the HAS_DIRTY_DESCENDANTS flag on elements at or below that root indicating that children need to be traversed. There was an undocumented invariant that no nodes above that dirty root were marked with HAS_DIRTY_DESCENDANTS, as the flag itself was used to determine when the dirty root is raised to some common ancestor of the old dirty root and a damaged node. There were some problems with the old implementation and this change fixes them by hewing closer to Gecko (from which we took this design). Notably: - In the complex situation where we cannot trivially calculate the dirty root, we now calculate it by walking up from the old dirty root and finding the first element which already has the flag set. - When removing nodes from the flat tree, if they were the previous dirty root, the dirty root is cleared. - Ensure that all marking traversals for HAS_DIRTY_DESCENDANTS flag marking happen in the flat tree. - When slotting nodes into `<slot>` elements, the style and layout data of fallback content is cleared, and the dirty root is potentially reset. - Comments are added everywhere in this tricky algorithm explaining what the heck is going on. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#61656). |
servo#46906) Script passes a dirty root to layout along with setting the HAS_DIRTY_DESCENDANTS flag on elements at or below that root indicating that children need to be traversed. There was an undocumented invariant that no nodes above that dirty root were marked with HAS_DIRTY_DESCENDANTS, as the flag itself was used to determine when the dirty root is raised to some common ancestor of the old dirty root and a damaged node. There were some problems with the old implementation and this change fixes them by hewing closer to Gecko (from which we took this design). Notably: - In the complex situation where we cannot trivially calculate the dirty root, we now calculate it by walking up from the old dirty root and finding the first element which already has the flag set. - When removing nodes from the flat tree, if they were the previous dirty root, the dirty root is cleared. - Ensure that all marking traversals for the HAS_DIRTY_DESCENDANTS flag marking happen in the flat tree. - When slotting nodes into `<slot>` elements, the style and layout data of fallback content is cleared, and the dirty root is potentially reset. - Comments are added everywhere in this tricky algorithm explaining what the heck is going on. - The new debug assertion for the invariant found a case where we were triggering restyles too late before a relayout -- when setting selection flags. This is moved earlier in the method. Testing: This change adds a new WPT crash test. Fixes: servo#46024. Fixes: servo#46883. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
servo#46906) Script passes a dirty root to layout along with setting the HAS_DIRTY_DESCENDANTS flag on elements at or below that root indicating that children need to be traversed. There was an undocumented invariant that no nodes above that dirty root were marked with HAS_DIRTY_DESCENDANTS, as the flag itself was used to determine when the dirty root is raised to some common ancestor of the old dirty root and a damaged node. There were some problems with the old implementation and this change fixes them by hewing closer to Gecko (from which we took this design). Notably: - In the complex situation where we cannot trivially calculate the dirty root, we now calculate it by walking up from the old dirty root and finding the first element which already has the flag set. - When removing nodes from the flat tree, if they were the previous dirty root, the dirty root is cleared. - Ensure that all marking traversals for the HAS_DIRTY_DESCENDANTS flag marking happen in the flat tree. - When slotting nodes into `<slot>` elements, the style and layout data of fallback content is cleared, and the dirty root is potentially reset. - Comments are added everywhere in this tricky algorithm explaining what the heck is going on. - The new debug assertion for the invariant found a case where we were triggering restyles too late before a relayout -- when setting selection flags. This is moved earlier in the method. Testing: This change adds a new WPT crash test. Fixes: servo#46024. Fixes: servo#46883. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Script passes a dirty root to layout along with setting the
HAS_DIRTY_DESCENDANTS flag on elements at or below that root indicating
that children need to be traversed. There was an undocumented invariant
that no nodes above that dirty root were marked with
HAS_DIRTY_DESCENDANTS, as the flag itself was used to determine
when the dirty root is raised to some common ancestor of the old dirty
root and a damaged node.
There were some problems with the old implementation and this change
fixes them by hewing closer to Gecko (from which we took this design).
Notably:
root, we now calculate it by walking up from the old dirty root and
finding the first element which already has the flag set.
dirty root, the dirty root is cleared.
marking happen in the flat tree.
<slot>elements, the style and layout dataof fallback content is cleared, and the dirty root is potentially reset.
the heck is going on.
triggering restyles too late before a relayout -- when setting selection flags.
This is moved earlier in the method.
Testing: This change adds a new WPT crash test.
Fixes: #46024.
Fixes: #46883.