[CSS] Apply first line style even if there are out-of-flow blocks #26205
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.
This patch means the code change to apply first line style on the first
innermost in-flow block even if there are out-of-flow blocks.
Following the spec (https://drafts.csswg.org/css-pseudo-4/#first-line-pseudo),
The first formatted line of an element must occur inside a block-level
descendant in the same flow (that is not out-of-flow due to floating or
positioning). So, we should skip out-of-flow children in
LayoutBlock::EnclosingFirstLineStyleBlock().
Bug: 979253
Change-Id: I58836b223b58816f731096a7a9f93e612278d42f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2485667
Commit-Queue: Jaeyong Bae <jdragon.bae@gmail.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820337}