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

Unified Diff: Source/core/dom/FirstLetterPseudoElement.cpp

Issue 1079583002: Skip inlines when looking for first-letter layoutObjects. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 months 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/first-letter-ignore-inline-style-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/FirstLetterPseudoElement.cpp
diff --git a/Source/core/dom/FirstLetterPseudoElement.cpp b/Source/core/dom/FirstLetterPseudoElement.cpp
index e0db41d3f7a270ba075ca5294835836316aef04a..b61d173425f0f0813512f0ec98cea06a36942827 100644
--- a/Source/core/dom/FirstLetterPseudoElement.cpp
+++ b/Source/core/dom/FirstLetterPseudoElement.cpp
@@ -142,7 +142,8 @@ LayoutObject* FirstLetterPseudoElement::firstLetterTextRenderer(const Element& e
return nullptr;
} else if (firstLetterTextRenderer->isFlexibleBoxIncludingDeprecated() || firstLetterTextRenderer->isLayoutGrid()) {
firstLetterTextRenderer = firstLetterTextRenderer->nextSibling();
- } else if (firstLetterTextRenderer->style()->hasPseudoStyle(FIRST_LETTER)
+ } else if (!firstLetterTextRenderer->isInline()
+ && firstLetterTextRenderer->style()->hasPseudoStyle(FIRST_LETTER)
&& canHaveGeneratedChildren(*firstLetterTextRenderer)) {
// There is a renderer further down the tree which has FIRST_LETTER set. When that node
// is attached we will handle setting up the first letter then.
« no previous file with comments | « LayoutTests/fast/css/first-letter-ignore-inline-style-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698