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

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

Issue 23449034: text-overflow on flexbox should have no effect (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/css3/flexbox/text-overflow-on-flexbox-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/rendering/RenderBlockLineLayout.cpp
diff --git a/Source/core/rendering/RenderBlockLineLayout.cpp b/Source/core/rendering/RenderBlockLineLayout.cpp
index ce81bc9dde2ab711acd439ac3558ad18748bf8af..3d8372e2727af7a891b4a8ba80f075ad1e0afc0a 100644
--- a/Source/core/rendering/RenderBlockLineLayout.cpp
+++ b/Source/core/rendering/RenderBlockLineLayout.cpp
@@ -2143,12 +2143,15 @@ void RenderBlockFlow::layoutInlineChildren(bool relayoutChildren, LayoutUnit& re
// Text truncation kicks in in two cases:
// 1) If your overflow isn't visible and your text-overflow-mode isn't clip.
- // 2) If you're an anonymous block with a block parent that satisfies #1.
+ // 2) If you're an anonymous block with a block parent that satisfies #1 that was created
+ // to accomodate a block that has inline and block children. This excludes parents where
+ // canCollapseAnonymousBlockChild is false, notabley flex items and grid items.
// FIXME: CSS3 says that descendants that are clipped must also know how to truncate. This is insanely
// difficult to figure out in general (especially in the middle of doing layout), so we only handle the
// simple case of an anonymous block truncating when it's parent is clipped.
bool hasTextOverflow = (style()->textOverflow() && hasOverflowClip())
- || (isAnonymousBlock() && parent() && parent()->isRenderBlock() && parent()->style()->textOverflow() && parent()->hasOverflowClip());
+ || (isAnonymousBlock() && parent() && parent()->isRenderBlock() && toRenderBlock(parent())->canCollapseAnonymousBlockChild()
+ && parent()->style()->textOverflow() && parent()->hasOverflowClip());
// Walk all the lines and delete our ellipsis line boxes if they exist.
if (hasTextOverflow)
« no previous file with comments | « LayoutTests/css3/flexbox/text-overflow-on-flexbox-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698