-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Prevent selection repaint in the middle of multicolumn flow destruction #28678
Merged
+26
β0
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EWS run on previous version of this PR (hash 34a1a2c) |
webkit-ews-buildbot
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 16, 2024
robert-jenner
removed
the
merging-blocked
Applied to prevent a change from being merged
label
May 17, 2024
webkit-ews-buildbot
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 17, 2024
robert-jenner
removed
the
merging-blocked
Applied to prevent a change from being merged
label
May 17, 2024
robert-jenner
force-pushed
the
eng/128090627
branch
from
May 17, 2024 00:27
34a1a2c
to
4a4cd83
Compare
EWS run on current version of this PR (hash 4a4cd83) |
robert-jenner
added
the
unsafe-merge-queue
Applied to send a pull request to merge-queue, but skip building and testing
label
May 17, 2024
https://bugs.webkit.org/show_bug.cgi?id=263180 rdar://128090627 Reviewed by Alan Baradlay. During multicolumn fragmented flow destruction, spanners are moved back to their original DOM position in the tree. This is done through calls to RenderTreeBuilderBlock::Block::detach(RenderBlockFlow&), which also calls the more general RenderBlock ::detach() method for each spanner. The former method results in the destruction of the spanner placeholders and the merging of the necessary multicolumn sets, but this is not done immediately, so the tree is temporarily inconsistent, before the RenderBlock detach() method is called. RenderTreeBuilderBlock::Block::detach(RenderBlock&), however, might inadvertely end up triggering a repaint of the selection that the tree is not ready for. I assume that this is an oversight from the possibility that this method gets called during RenderBlockFlow detachment. This repaint happens because RenderTreeBuilder::detachFromRenderElement() clears the selection if the child being detached is to be destroyed. As WillBeDestroyed::Yes is the default value in the definition of detachFromRenderElement(), this is assumed to be the case, even when that's not what happens during fragmented flow destruction. The problem with this is that the selection repaint will eventually find itself needing a consistent tree, and the fact that multicolumn sets are not merged yet and there are spanners without a placehoder will break assumptions made in RenderObject::propagateRepaintToParentWithOutlineAutoIfNeeded(). Fix this by making it possible for both detach() methods to propagate WillBeDestroyed, with a default value of WillBeDestroyed::Yes to preserve current behavior everywhere, but explicitly passing WillBeDestroyed::No during fragmented flow destruction when detaching spanners, as this is what is actually happening. This prevents the selection repaint from happening before the tree is in a consistent state. * LayoutTests/fast/block/multicolumn-with-outline-auto-expected.txt: Added. * LayoutTests/fast/block/multicolumn-with-outline-auto.html: Added. Originally-landed-as: 274097.6@webkit-2024.2-embargoed (00414cb). rdar://128090627 Canonical link: https://commits.webkit.org/278918@main
webkit-commit-queue
force-pushed
the
eng/128090627
branch
from
May 17, 2024 18:35
4a4cd83
to
54cc63f
Compare
Committed 278918@main (54cc63f): https://commits.webkit.org/278918@main Reviewed commits have been landed. Closing PR #28678 and removing active labels. |
webkit-commit-queue
removed
the
unsafe-merge-queue
Applied to send a pull request to merge-queue, but skip building and testing
label
May 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
54cc63f
4a4cd83