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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 1658643002: LayoutBox cannot be non-atomic inline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | 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/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index b92a53a9225c12c13f1826426a96cc250128cba6..5c23976528ff117d967ad9b0100afc83c7974b98 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -273,6 +273,8 @@ void LayoutBox::styleDidChange(StyleDifference diff, const ComputedStyle* oldSty
if (flowThread && flowThread != this)
flowThread->flowThreadDescendantStyleDidChange(this, diff, *oldStyle);
}
+
+ ASSERT(!isInline() || isAtomicInlineLevel()); // Non-atomic inlines should be LayoutInline or LayoutText, not LayoutBox.
}
void LayoutBox::updateBackgroundAttachmentFixedStatusAfterStyleChange()
@@ -1730,17 +1732,15 @@ LayoutSize LayoutBox::offsetFromContainer(const LayoutObject* o, const LayoutPoi
if (isInFlowPositioned())
offset += offsetForInFlowPosition();
- if (!isInline() || isAtomicInlineLevel()) {
- offset += topLeftLocationOffset();
- if (o->isLayoutFlowThread()) {
- // So far the point has been in flow thread coordinates (i.e. as if everything in
- // the fragmentation context lived in one tall single column). Convert it to a
- // visual point now.
- LayoutPoint pointInContainer = point + offset;
- offset += o->columnOffset(pointInContainer);
- if (offsetDependsOnPoint)
- *offsetDependsOnPoint = true;
- }
+ offset += topLeftLocationOffset();
+ if (o->isLayoutFlowThread()) {
+ // So far the point has been in flow thread coordinates (i.e. as if everything in
+ // the fragmentation context lived in one tall single column). Convert it to a
+ // visual point now.
+ LayoutPoint pointInContainer = point + offset;
+ offset += o->columnOffset(pointInContainer);
+ if (offsetDependsOnPoint)
+ *offsetDependsOnPoint = true;
}
if (o->hasOverflowClip())
@@ -2392,8 +2392,8 @@ void LayoutBox::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logica
computedValues.m_extent = logicalHeight;
computedValues.m_position = logicalTop;
- // Cell height is managed by the table and non-atomic inline-level elements do not support a height property.
- if (isTableCell() || (isInline() && !isAtomicInlineLevel()))
+ // Cell height is managed by the table.
+ if (isTableCell())
return;
Length h;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698