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

Unified Diff: third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc

Issue 2953403002: [LayoutNG] Add comments about "certain zero-height line boxes" (Closed)
Patch Set: Created 3 years, 6 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 | « third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc b/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc
index 739502db352f383b49857406ec378f5fe31193b3..6a04416468b1171f0de214bf450cdf85d4f5c0ce 100644
--- a/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc
+++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc
@@ -457,6 +457,10 @@ void NGLineBreaker::HandleOpenTag(const NGInlineItem& item,
borders.inline_start + paddings.inline_start;
position_ += item_result->inline_size;
+ // While the spec defines "non-zero margins, padding, or borders" prevents
+ // line boxes to be zero-height, tests indicate that only inline direction
+ // of them do so. See should_create_line_box_.
+ // Force to create a box, because such inline boxes affect line heights.
item_result->needs_box_when_empty =
item_result->inline_size || item_result->margins.inline_start;
if (item_result->needs_box_when_empty && !should_create_line_box_)
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698