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

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

Issue 2361373002: [css-grid] Clearing override sizes before running grid's layout logic. (Closed)
Patch Set: A new approach, just facing orthogonal flow issues. Created 4 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
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 2f0c98f78df8b94055def04cbc67dc3db7bdd15f..71d94368ea8f97cde0ada89859d41b335a0c227f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1175,6 +1175,11 @@ void LayoutBox::clearOverrideLogicalContentWidth()
m_rareData->m_overrideLogicalContentWidth = LayoutUnit(-1);
}
+bool LayoutBox::hasOverrideSize()
+{
+ return hasOverrideLogicalContentWidth() || hasOverrideLogicalContentHeight();
+}
+
void LayoutBox::clearOverrideSize()
{
clearOverrideLogicalContentHeight();
@@ -1236,6 +1241,14 @@ void LayoutBox::setOverrideContainingBlockContentLogicalHeight(LayoutUnit logica
}
// TODO (lajava) Shouldn't we implement these functions based on physical direction ?.
cbiesinger 2016/09/26 11:48:33 I don't think this new function needs that comment
jfernandez 2016/09/26 13:38:02 Acknowledged.
+bool LayoutBox::hasContainingBlockOverrideSize()
+{
+ if (!m_rareData)
+ return false;
+ return ensureRareData().m_hasOverrideContainingBlockContentLogicalWidth || ensureRareData().m_hasOverrideContainingBlockContentLogicalHeight;
+}
+
+// TODO (lajava) Shouldn't we implement these functions based on physical direction ?.
void LayoutBox::clearContainingBlockOverrideSize()
{
if (!m_rareData)

Powered by Google App Engine
This is Rietveld 408576698