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 650314c54d4fb2cdec190cf1fe753ff3cb7d5356..3b8d7d7531e7ed02ccd4b6d555f64b960ae7cd43 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
@@ -1099,26 +1099,26 @@ |
return gOverrideContainingBlockLogicalWidthMap->get(this); |
} |
-// TODO (lajava) Shouldn't we implement these functions based on physical direction ?. |
+// TODO (lajava) Now that we have implemented these functions based on physical direction, we'd rather remove the logical ones. |
LayoutUnit LayoutBox::overrideContainingBlockContentLogicalHeight() const |
{ |
ASSERT(hasOverrideContainingBlockLogicalHeight()); |
return gOverrideContainingBlockLogicalHeightMap->get(this); |
} |
-// TODO (lajava) Shouldn't we implement these functions based on physical direction ?. |
+// TODO (lajava) Now that we have implemented these functions based on physical direction, we'd rather remove the logical ones. |
bool LayoutBox::hasOverrideContainingBlockLogicalWidth() const |
{ |
return gOverrideContainingBlockLogicalWidthMap && gOverrideContainingBlockLogicalWidthMap->contains(this); |
} |
-// TODO (lajava) Shouldn't we implement these functions based on physical direction ?. |
+// TODO (lajava) Now that we have implemented these functions based on physical direction, we'd rather remove the logical ones. |
bool LayoutBox::hasOverrideContainingBlockLogicalHeight() const |
{ |
return gOverrideContainingBlockLogicalHeightMap && gOverrideContainingBlockLogicalHeightMap->contains(this); |
} |
-// TODO (lajava) Shouldn't we implement these functions based on physical direction ?. |
+// TODO (lajava) Now that we have implemented these functions based on physical direction, we'd rather remove the logical ones. |
void LayoutBox::setOverrideContainingBlockContentLogicalWidth(LayoutUnit logicalWidth) |
{ |
if (!gOverrideContainingBlockLogicalWidthMap) |
@@ -1126,7 +1126,7 @@ |
gOverrideContainingBlockLogicalWidthMap->set(this, logicalWidth); |
} |
-// TODO (lajava) Shouldn't we implement these functions based on physical direction ?. |
+// TODO (lajava) Now that we have implemented these functions based on physical direction, we'd rather remove the logical ones. |
void LayoutBox::setOverrideContainingBlockContentLogicalHeight(LayoutUnit logicalHeight) |
{ |
if (!gOverrideContainingBlockLogicalHeightMap) |
@@ -1134,7 +1134,7 @@ |
gOverrideContainingBlockLogicalHeightMap->set(this, logicalHeight); |
} |
-// TODO (lajava) Shouldn't we implement these functions based on physical direction ?. |
+// TODO (lajava) Now that we have implemented these functions based on physical direction, we'd rather remove the logical ones. |
void LayoutBox::clearContainingBlockOverrideSize() |
{ |
if (gOverrideContainingBlockLogicalWidthMap) |
@@ -1142,11 +1142,31 @@ |
clearOverrideContainingBlockContentLogicalHeight(); |
} |
-// TODO (lajava) Shouldn't we implement these functions based on physical direction ?. |
+// TODO (lajava) Now that we have implemented these functions based on physical direction, we'd rather remove the logical ones. |
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 |