Source/WebCore:
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Jan 2019 16:00:14 +0000 (16:00 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Jan 2019 16:00:14 +0000 (16:00 +0000)
[LFC][BFC] For height computation, the bottom edge of the last line box value should not include top border/padding
https://bugs.webkit.org/show_bug.cgi?id=193520

Reviewed by Antti Koivisto.

This is similar to the other "10.6.3" cases. The bottom edge of the last inline box is in the coordinate systyem
of the containing block's border box (and for content height computation it needs to be mapped to the containing block's content box instead).

* layout/blockformatting/BlockFormattingContextGeometry.cpp:
(WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):

Tools:
[LFC][BFC] For height computation, the bottom edge of the last line box value should include top border/padding
https://bugs.webkit.org/show_bug.cgi?id=193520

Reviewed by Antti Koivisto.

* LayoutReloaded/misc/LFC-passing-tests.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240108 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/layout/blockformatting/BlockFormattingContextGeometry.cpp
Tools/ChangeLog
Tools/LayoutReloaded/misc/LFC-passing-tests.txt

index e1656df..04fb64f 100644 (file)
@@ -1,3 +1,16 @@
+2019-01-17  Zalan Bujtas  <zalan@apple.com>
+
+        [LFC][BFC] For height computation, the bottom edge of the last line box value should not include top border/padding
+        https://bugs.webkit.org/show_bug.cgi?id=193520
+
+        Reviewed by Antti Koivisto.
+
+        This is similar to the other "10.6.3" cases. The bottom edge of the last inline box is in the coordinate systyem
+        of the containing block's border box (and for content height computation it needs to be mapped to the containing block's content box instead).
+
+        * layout/blockformatting/BlockFormattingContextGeometry.cpp:
+        (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
+
 2019-01-16  Simon Fraser  <simon.fraser@apple.com>
 
         Stub out scrolling tree classes for overflow scrolling nodes on macOS
index f9cc7d3..f68dda3 100644 (file)
@@ -77,7 +77,7 @@ HeightAndMargin BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMarg
             // This is temp and will be replaced by the correct display box once inline runs move over to the display tree.
             auto& inlineRuns = downcast<InlineFormattingState>(layoutState.establishedFormattingState(layoutBox)).inlineRuns();
             auto bottomEdge = inlineRuns.isEmpty() ? LayoutUnit() : inlineRuns.last().logicalBottom();
-            return { bottomEdge, nonCollapsedMargin };
+            return { bottomEdge - borderAndPaddingTop, nonCollapsedMargin };
         }
 
         // 2. the bottom edge of the bottom (possibly collapsed) margin of its last in-flow child, if the child's bottom margin...
index 019d3d5..4098a1c 100644 (file)
@@ -1,3 +1,12 @@
+2019-01-17  Zalan Bujtas  <zalan@apple.com>
+
+        [LFC][BFC] For height computation, the bottom edge of the last line box value should include top border/padding
+        https://bugs.webkit.org/show_bug.cgi?id=193520
+
+        Reviewed by Antti Koivisto.
+
+        * LayoutReloaded/misc/LFC-passing-tests.txt:
+
 2019-01-17  Aakash Jain  <aakash_jain@apple.com>
 
         [ews-build] unapply-patch step should not update source
index 4695f11..bfa0eff 100644 (file)
@@ -90,6 +90,7 @@ fast/block/basic/007.html
 fast/block/basic/008.html
 fast/block/basic/009.html
 fast/block/basic/012.html
+fast/block/basic/021.html
 fast/block/basic/child-block-level-box-with-height-percent.html
 fast/block/basic/height-percentage-simple.html
 fast/block/basic/inline-content-with-floating-image.html