Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1006)

Unified Diff: Source/core/rendering/RenderBlock.cpp

Issue 686173006: Ignore ::first-letter from ancestors in grids and flexboxes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/css-grid-layout/grid-container-ignore-first-letter-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlock.cpp
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index 2604be6e70be9b2c8f0059ad47f3d9cd4ea90254..25500b89c9af5f79d9ff395c3aea7762424ecd10 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -3745,6 +3745,8 @@ void RenderBlock::updateFirstLetter()
currChild = currChild->nextSibling();
} else if (currChild->isReplaced() || currChild->isRenderButton() || currChild->isMenuList()) {
break;
+ } else if (currChild->isFlexibleBoxIncludingDeprecated() || currChild->isRenderGrid()) {
+ return;
} else if (currChild->style()->hasPseudoStyle(FIRST_LETTER) && currChild->canHaveGeneratedChildren()) {
// We found a lower-level node with first-letter, which supersedes the higher-level style
firstLetterBlock = currChild;
@@ -3754,7 +3756,7 @@ void RenderBlock::updateFirstLetter()
}
}
- if (!currChild || !isRenderBlockFlowOrRenderButton(firstLetterBlock))
+ if (!currChild)
return;
// If the child already has style, then it has already been created, so we just want
« no previous file with comments | « LayoutTests/fast/css-grid-layout/grid-container-ignore-first-letter-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698