Title: [161316] trunk/Source/WebCore
Revision
161316
Author
wei...@apple.com
Date
2014-01-04 16:28:39 -0800 (Sat, 04 Jan 2014)

Log Message

Move a few more functions from RenderBlock to RenderBlockFlow
https://bugs.webkit.org/show_bug.cgi?id=126494

Reviewed by Andreas Kling.

* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::adjustInlineDirectionLineBounds):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::textAlignmentForLine):
(WebCore::RenderBlockFlow::updateLogicalWidthForAlignment):
(WebCore::RenderBlockFlow::startAlignedOffsetForLine):
These are only used by RenderBlockFlow, so move them there.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (161315 => 161316)


--- trunk/Source/WebCore/ChangeLog	2014-01-04 21:48:03 UTC (rev 161315)
+++ trunk/Source/WebCore/ChangeLog	2014-01-05 00:28:39 UTC (rev 161316)
@@ -1,3 +1,19 @@
+2014-01-04  Sam Weinig  <s...@webkit.org>
+
+        Move a few more functions from RenderBlock to RenderBlockFlow
+        https://bugs.webkit.org/show_bug.cgi?id=126494
+
+        Reviewed by Andreas Kling.
+
+        * rendering/RenderBlock.h:
+        * rendering/RenderBlockFlow.h:
+        (WebCore::RenderBlockFlow::adjustInlineDirectionLineBounds):
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::RenderBlockFlow::textAlignmentForLine):
+        (WebCore::RenderBlockFlow::updateLogicalWidthForAlignment):
+        (WebCore::RenderBlockFlow::startAlignedOffsetForLine):
+        These are only used by RenderBlockFlow, so move them there.
+
 2014-01-04  Simon Fraser  <simon.fra...@apple.com>
 
         Prepare the ScrollingTree for remote use

Modified: trunk/Source/WebCore/rendering/RenderBlock.h (161315 => 161316)


--- trunk/Source/WebCore/rendering/RenderBlock.h	2014-01-04 21:48:03 UTC (rev 161315)
+++ trunk/Source/WebCore/rendering/RenderBlock.h	2014-01-05 00:28:39 UTC (rev 161316)
@@ -190,7 +190,6 @@
             : logicalWidth() - logicalRightOffsetForLine(position, shouldIndentText, logicalHeight);
     }
 
-    LayoutUnit startAlignedOffsetForLine(LayoutUnit position, bool shouldIndentText);
     LayoutUnit textIndentOffset() const;
 
     virtual VisiblePosition positionForPoint(const LayoutPoint&) OVERRIDE;
@@ -299,8 +298,6 @@
     LayoutUnit collapsedMarginBeforeForChild(const RenderBox& child) const;
     LayoutUnit collapsedMarginAfterForChild(const RenderBox& child) const;
 
-    void updateLogicalWidthForAlignment(const ETextAlign&, BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float& availableLogicalWidth, int expansionOpportunityCount);
-
     virtual void updateFirstLetter();
 
     virtual void scrollbarsChanged(bool /*horizontalScrollbarChanged*/, bool /*verticalScrollbarChanged*/) { }
@@ -407,9 +404,6 @@
         return adjustLogicalLeftOffsetForLine(logicalLeftFloatOffsetForLine(logicalTop, fixedOffset, logicalHeight), applyTextIndent);
     }
 
-    virtual ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const;
-    virtual void adjustInlineDirectionLineBounds(int /* expansionOpportunityCount */, float& /* logicalLeft */, float& /* logicalWidth */) const { }
-
     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE;
 
     virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const OVERRIDE;

Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.h (161315 => 161316)


--- trunk/Source/WebCore/rendering/RenderBlockFlow.h	2014-01-04 21:48:03 UTC (rev 161315)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.h	2014-01-05 00:28:39 UTC (rev 161316)
@@ -475,6 +475,10 @@
     static void appendRunsForObject(BidiRunList<BidiRun>&, int start, int end, RenderObject*, InlineBidiResolver&);
     RootInlineBox* createAndAppendRootInlineBox();
 
+    LayoutUnit startAlignedOffsetForLine(LayoutUnit position, bool shouldIndentText);
+    virtual ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const;
+    virtual void adjustInlineDirectionLineBounds(int /* expansionOpportunityCount */, float& /* logicalLeft */, float& /* logicalWidth */) const { }
+
 private:
     void layoutLineBoxes(bool relayoutChildren, LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom);
     void layoutSimpleLines(LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom);
@@ -515,6 +519,7 @@
     // region/page/column that has a different available line width than the old one. Used to know when you have to dirty a
     // line, i.e., that it can't be re-used.
     bool lineWidthForPaginatedLineChanged(RootInlineBox*, LayoutUnit lineDelta, RenderFlowThread*) const;
+    void updateLogicalWidthForAlignment(const ETextAlign&, BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float& availableLogicalWidth, int expansionOpportunityCount);
 
 // END METHODS DEFINED IN RenderBlockLineLayout
 

Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (161315 => 161316)


--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2014-01-04 21:48:03 UTC (rev 161315)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2014-01-05 00:28:39 UTC (rev 161316)
@@ -352,7 +352,7 @@
     return lastRootBox();
 }
 
-ETextAlign RenderBlock::textAlignmentForLine(bool endsWithSoftBreak) const
+ETextAlign RenderBlockFlow::textAlignmentForLine(bool endsWithSoftBreak) const
 {
     ETextAlign alignment = style().textAlign();
     if (!endsWithSoftBreak && alignment == JUSTIFY)
@@ -548,7 +548,7 @@
     }
 }
 
-void RenderBlock::updateLogicalWidthForAlignment(const ETextAlign& textAlign, BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float& availableLogicalWidth, int expansionOpportunityCount)
+void RenderBlockFlow::updateLogicalWidthForAlignment(const ETextAlign& textAlign, BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float& availableLogicalWidth, int expansionOpportunityCount)
 {
     // Armed with the total width of the line (without justification),
     // we now examine our text-align property in order to determine where to position the
@@ -2128,7 +2128,7 @@
     return true;
 }
 
-LayoutUnit RenderBlock::startAlignedOffsetForLine(LayoutUnit position, bool firstLine)
+LayoutUnit RenderBlockFlow::startAlignedOffsetForLine(LayoutUnit position, bool firstLine)
 {
     ETextAlign textAlign = style().textAlign();
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to