Title: [158015] trunk/Source/WebCore
Revision
158015
Author
[email protected]
Date
2013-10-25 10:26:35 -0700 (Fri, 25 Oct 2013)

Log Message

[CSS Regions][CSS Shapes] Update updateShapeAndSegmentsForCurrentLineInFlowThread to deal better with the first lines
<https://bugs.webkit.org/show_bug.cgi?id=123275>

Reviewed by David Hyatt.

We have a complex condition in updateShapeAndSegmentsForCurrentLineInFlowThread, which is
adjusting the first line to the shape's top. This patch adds two boolean to make that clear.

No new tests, no behavior change.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (158014 => 158015)


--- trunk/Source/WebCore/ChangeLog	2013-10-25 17:13:16 UTC (rev 158014)
+++ trunk/Source/WebCore/ChangeLog	2013-10-25 17:26:35 UTC (rev 158015)
@@ -1,3 +1,18 @@
+2013-10-25  Zoltan Horvath  <[email protected]>
+
+        [CSS Regions][CSS Shapes] Update updateShapeAndSegmentsForCurrentLineInFlowThread to deal better with the first lines
+        <https://bugs.webkit.org/show_bug.cgi?id=123275>
+
+        Reviewed by David Hyatt.
+
+        We have a complex condition in updateShapeAndSegmentsForCurrentLineInFlowThread, which is
+        adjusting the first line to the shape's top. This patch adds two boolean to make that clear.
+
+        No new tests, no behavior change.
+
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread):
+
 2013-10-25  Antti Koivisto  <[email protected]>
 
         Faster way for simple line layout to check if text has fallback fonts

Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (158014 => 158015)


--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2013-10-25 17:13:16 UTC (rev 158014)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2013-10-25 17:26:35 UTC (rev 158015)
@@ -1436,8 +1436,10 @@
     if (!shapeInsideInfo)
         return;
 
+    bool isFirstLineInRegion = logicalLineBottomInFlowThread <= (logicalRegionTopInFlowThread + lineHeight);
+    bool isFirstLineAdjusted = (logicalLineTopInFlowThread - logicalRegionTopInFlowThread) < (layoutState.adjustedLogicalLineTop() - currentRegion->borderAndPaddingBefore());
     // We position the first line to the top of the shape in the region or to the previously adjusted position in the shape
-    if (logicalLineBottomInFlowThread <= (logicalRegionTopInFlowThread + lineHeight) || (logicalLineTopInFlowThread - logicalRegionTopInFlowThread) < (layoutState.adjustedLogicalLineTop() - currentRegion->borderAndPaddingBefore())) {
+    if (isFirstLineInRegion || isFirstLineAdjusted) {
         LayoutUnit shapeTopOffset = layoutState.adjustedLogicalLineTop();
         if (!shapeTopOffset)
             shapeTopOffset = shapeInsideInfo->shapeLogicalTop();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to