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

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

Issue 2176633002: [css-grid] Avoid the HashMap for the override containing block size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 3b8d7d7531e7ed02ccd4b6d555f64b960ae7cd43..650314c54d4fb2cdec190cf1fe753ff3cb7d5356 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1099,26 +1099,26 @@ LayoutUnit LayoutBox::overrideContainingBlockContentLogicalWidth() const
return gOverrideContainingBlockLogicalWidthMap->get(this);
}
-// TODO (lajava) Now that we have implemented these functions based on physical direction, we'd rather remove the logical ones.
+// TODO (lajava) Shouldn't we implement these functions based on physical direction ?.
LayoutUnit LayoutBox::overrideContainingBlockContentLogicalHeight() const
{
ASSERT(hasOverrideContainingBlockLogicalHeight());
return gOverrideContainingBlockLogicalHeightMap->get(this);
}
-// TODO (lajava) Now that we have implemented these functions based on physical direction, we'd rather remove the logical ones.
+// TODO (lajava) Shouldn't we implement these functions based on physical direction ?.
bool LayoutBox::hasOverrideContainingBlockLogicalWidth() const
{
return gOverrideContainingBlockLogicalWidthMap && gOverrideContainingBlockLogicalWidthMap->contains(this);
}
-// TODO (lajava) Now that we have implemented these functions based on physical direction, we'd rather remove the logical ones.
+// TODO (lajava) Shouldn't we implement these functions based on physical direction ?.
bool LayoutBox::hasOverrideContainingBlockLogicalHeight() const
{
return gOverrideContainingBlockLogicalHeightMap && gOverrideContainingBlockLogicalHeightMap->contains(this);
}
-// TODO (lajava) Now that we have implemented these functions based on physical direction, we'd rather remove the logical ones.
+// TODO (lajava) Shouldn't we implement these functions based on physical direction ?.
void LayoutBox::setOverrideContainingBlockContentLogicalWidth(LayoutUnit logicalWidth)
{
if (!gOverrideContainingBlockLogicalWidthMap)
@@ -1126,7 +1126,7 @@ void LayoutBox::setOverrideContainingBlockContentLogicalWidth(LayoutUnit logical
gOverrideContainingBlockLogicalWidthMap->set(this, logicalWidth);
}
-// TODO (lajava) Now that we have implemented these functions based on physical direction, we'd rather remove the logical ones.
+// TODO (lajava) Shouldn't we implement these functions based on physical direction ?.
void LayoutBox::setOverrideContainingBlockContentLogicalHeight(LayoutUnit logicalHeight)
{
if (!gOverrideContainingBlockLogicalHeightMap)
@@ -1134,7 +1134,7 @@ void LayoutBox::setOverrideContainingBlockContentLogicalHeight(LayoutUnit logica
gOverrideContainingBlockLogicalHeightMap->set(this, logicalHeight);
}
-// TODO (lajava) Now that we have implemented these functions based on physical direction, we'd rather remove the logical ones.
+// TODO (lajava) Shouldn't we implement these functions based on physical direction ?.
void LayoutBox::clearContainingBlockOverrideSize()
{
if (gOverrideContainingBlockLogicalWidthMap)
@@ -1142,33 +1142,13 @@ void LayoutBox::clearContainingBlockOverrideSize()
clearOverrideContainingBlockContentLogicalHeight();
}
-// TODO (lajava) Now that we have implemented these functions based on physical direction, we'd rather remove the logical ones.
+// TODO (lajava) Shouldn't we implement these functions based on physical direction ?.
void LayoutBox::clearOverrideContainingBlockContentLogicalHeight()
{
if (gOverrideContainingBlockLogicalHeightMap)
gOverrideContainingBlockLogicalHeightMap->remove(this);
}
-LayoutUnit LayoutBox::overrideContainingBlockContentWidth() const
-{
- return containingBlock()->isHorizontalWritingMode() ? overrideContainingBlockContentLogicalWidth() : overrideContainingBlockContentLogicalHeight();
-}
-
-LayoutUnit LayoutBox::overrideContainingBlockContentHeight() const
-{
- return containingBlock()->isHorizontalWritingMode() ? overrideContainingBlockContentLogicalHeight() : overrideContainingBlockContentLogicalWidth();
-}
-
-bool LayoutBox::hasOverrideContainingBlockWidth() const
-{
- return containingBlock()->isHorizontalWritingMode() ? hasOverrideContainingBlockLogicalWidth() : hasOverrideContainingBlockLogicalHeight();
-}
-
-bool LayoutBox::hasOverrideContainingBlockHeight() const
-{
- return containingBlock()->isHorizontalWritingMode() ? hasOverrideContainingBlockLogicalHeight() : hasOverrideContainingBlockLogicalWidth();
-}
-
LayoutUnit LayoutBox::extraInlineOffset() const
{
return gExtraInlineOffsetMap ? gExtraInlineOffsetMap->get(this) : LayoutUnit();
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.h ('k') | third_party/WebKit/Source/core/layout/LayoutGrid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698