Title: [167727] trunk/Source/WebCore
Revision
167727
Author
hy...@apple.com
Date
2014-04-23 15:19:19 -0700 (Wed, 23 Apr 2014)

Log Message

[New Multicolumn] fast/multicol/fixed-column-percent-logical-height-orthogonal-writing-mode.html fails
https://bugs.webkit.org/show_bug.cgi?id=132078

Reviewed by Anders Carlsson.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation):
Add a parameter to test for orthogonal writing modes. If we're perpendicular,
then we should not skip the flow thread, since we resolve relative to the column width,
and that is always set.

(WebCore::RenderBox::computePercentageLogicalHeight):
Patched to pass in whether or not the box and the ancestor block are perpendicular.

* rendering/RenderBox.h:
Patched the signature of skipContainingBlockForPercentHeightCalculation

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (167726 => 167727)


--- trunk/Source/WebCore/ChangeLog	2014-04-23 21:55:50 UTC (rev 167726)
+++ trunk/Source/WebCore/ChangeLog	2014-04-23 22:19:19 UTC (rev 167727)
@@ -1,3 +1,22 @@
+2014-04-23  David Hyatt  <hy...@apple.com>
+
+        [New Multicolumn] fast/multicol/fixed-column-percent-logical-height-orthogonal-writing-mode.html fails
+        https://bugs.webkit.org/show_bug.cgi?id=132078
+
+        Reviewed by Anders Carlsson.
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation):
+        Add a parameter to test for orthogonal writing modes. If we're perpendicular,
+        then we should not skip the flow thread, since we resolve relative to the column width,
+        and that is always set.
+
+        (WebCore::RenderBox::computePercentageLogicalHeight):
+        Patched to pass in whether or not the box and the ancestor block are perpendicular.
+
+        * rendering/RenderBox.h:
+        Patched the signature of skipContainingBlockForPercentHeightCalculation
+
 2014-04-23  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         [OS X] Make checking if a font is the system font more robust

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (167726 => 167727)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2014-04-23 21:55:50 UTC (rev 167726)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2014-04-23 22:19:19 UTC (rev 167727)
@@ -2712,11 +2712,11 @@
     return -1;
 }
 
-bool RenderBox::skipContainingBlockForPercentHeightCalculation(const RenderBox* containingBlock) const
+bool RenderBox::skipContainingBlockForPercentHeightCalculation(const RenderBox* containingBlock, bool isPerpendicularWritingMode) const
 {
     // Flow threads for multicol or paged overflow should be skipped. They are invisible to the DOM,
     // and percent heights of children should be resolved against the multicol or paged container.
-    if (containingBlock->isInFlowRenderFlowThread())
+    if (containingBlock->isInFlowRenderFlowThread() && !isPerpendicularWritingMode)
         return true;
 
     // For quirks mode and anonymous blocks, we skip auto-height containingBlocks when computing percentages.
@@ -2734,7 +2734,8 @@
     RenderBlock* cb = containingBlock();
     const RenderBox* containingBlockChild = this;
     LayoutUnit rootMarginBorderPaddingHeight = 0;
-    while (!cb->isRenderView() && skipContainingBlockForPercentHeightCalculation(cb)) {
+    bool isHorizontal = isHorizontalWritingMode();
+    while (!cb->isRenderView() && skipContainingBlockForPercentHeightCalculation(cb, isHorizontal != cb->isHorizontalWritingMode())) {
         if (cb->isBody() || cb->isRoot())
             rootMarginBorderPaddingHeight += cb->marginBefore() + cb->marginAfter() + cb->borderAndPaddingLogicalHeight();
         skippedAutoHeightContainingBlock = true;
@@ -2751,7 +2752,7 @@
 
     bool includeBorderPadding = isTable();
 
-    if (isHorizontalWritingMode() != cb->isHorizontalWritingMode())
+    if (isHorizontal != cb->isHorizontalWritingMode())
         availableHeight = containingBlockChild->containingBlockLogicalWidthForContent();
     else if (hasOverrideContainingBlockLogicalHeight())
         availableHeight = overrideContainingBlockContentLogicalHeight();

Modified: trunk/Source/WebCore/rendering/RenderBox.h (167726 => 167727)


--- trunk/Source/WebCore/rendering/RenderBox.h	2014-04-23 21:55:50 UTC (rev 167726)
+++ trunk/Source/WebCore/rendering/RenderBox.h	2014-04-23 22:19:19 UTC (rev 167727)
@@ -669,7 +669,7 @@
     // Returns true if we did a full repaint
     bool repaintLayerRectsForImage(WrappedImagePtr image, const FillLayer* layers, bool drawingBackground);
 
-    bool skipContainingBlockForPercentHeightCalculation(const RenderBox* containingBlock) const;
+    bool skipContainingBlockForPercentHeightCalculation(const RenderBox* containingBlock, bool isPerpendicularWritingMode) const;
    
     LayoutUnit containingBlockLogicalWidthForPositioned(const RenderBoxModelObject* containingBlock, RenderRegion* = 0, bool checkForPerpendicularWritingMode = true) const;
     LayoutUnit containingBlockLogicalHeightForPositioned(const RenderBoxModelObject* containingBlock, bool checkForPerpendicularWritingMode = true) const;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to