- Revision
- 167283
- Author
- [email protected]
- Date
- 2014-04-14 17:27:13 -0700 (Mon, 14 Apr 2014)
Log Message
[CSS Shapes] Remove some leftover shape-inside code
https://bugs.webkit.org/show_bug.cgi?id=131641
Reviewed by Dean Jackson.
I discovered that some code had been leftover from the shape-inside
removal. This removes that leftover code.
No new tests, no behavior change.
* platform/text/BidiResolver.h:
* rendering/BidiRun.cpp:
(WebCore::BidiRun::BidiRun):
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::createLineBoxes):
(WebCore::RenderBlockFlow::constructLine):
(WebCore::computeExpansionForJustifiedText):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (167282 => 167283)
--- trunk/Source/WebCore/ChangeLog 2014-04-15 00:14:59 UTC (rev 167282)
+++ trunk/Source/WebCore/ChangeLog 2014-04-15 00:27:13 UTC (rev 167283)
@@ -1,3 +1,25 @@
+2014-04-14 Bem Jones-Bey <[email protected]>
+
+ [CSS Shapes] Remove some leftover shape-inside code
+ https://bugs.webkit.org/show_bug.cgi?id=131641
+
+ Reviewed by Dean Jackson.
+
+ I discovered that some code had been leftover from the shape-inside
+ removal. This removes that leftover code.
+
+ No new tests, no behavior change.
+
+ * platform/text/BidiResolver.h:
+ * rendering/BidiRun.cpp:
+ (WebCore::BidiRun::BidiRun):
+ * rendering/RenderBlockFlow.h:
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlockFlow::createLineBoxes):
+ (WebCore::RenderBlockFlow::constructLine):
+ (WebCore::computeExpansionForJustifiedText):
+ (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
+
2014-04-14 Jer Noble <[email protected]>
[MSE][Mac] video.currentTime is sometimes negative.
Modified: trunk/Source/WebCore/platform/text/BidiResolver.h (167282 => 167283)
--- trunk/Source/WebCore/platform/text/BidiResolver.h 2014-04-15 00:14:59 UTC (rev 167282)
+++ trunk/Source/WebCore/platform/text/BidiResolver.h 2014-04-15 00:27:13 UTC (rev 167283)
@@ -190,9 +190,6 @@
// Do not add anything apart from bitfields until after m_next. See https://bugs.webkit.org/show_bug.cgi?id=100173
bool m_override : 1;
bool m_hasHyphen : 1; // Used by BidiRun subclass which is a layering violation but enables us to save 8 bytes per object on 64-bit.
-#if ENABLE(CSS_SHAPES)
- bool m_startsSegment : 1; // Same comment as m_hasHyphen.
-#endif
unsigned char m_level;
BidiCharacterRun* m_next;
int m_start;
Modified: trunk/Source/WebCore/rendering/BidiRun.cpp (167282 => 167283)
--- trunk/Source/WebCore/rendering/BidiRun.cpp 2014-04-15 00:14:59 UTC (rev 167282)
+++ trunk/Source/WebCore/rendering/BidiRun.cpp 2014-04-15 00:27:13 UTC (rev 167283)
@@ -44,9 +44,6 @@
ASSERT(!m_renderer.isText() || static_cast<unsigned>(stop) <= toRenderText(m_renderer).textLength());
// Stored in base class to save space.
m_hasHyphen = false;
-#if ENABLE(CSS_SHAPES)
- m_startsSegment = false;
-#endif
}
BidiRun::~BidiRun()
Modified: trunk/Source/WebCore/rendering/RenderBlockFlow.h (167282 => 167283)
--- trunk/Source/WebCore/rendering/RenderBlockFlow.h 2014-04-15 00:14:59 UTC (rev 167282)
+++ trunk/Source/WebCore/rendering/RenderBlockFlow.h 2014-04-15 00:27:13 UTC (rev 167283)
@@ -527,7 +527,7 @@
void layoutSimpleLines(LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom);
virtual std::unique_ptr<RootInlineBox> createRootInlineBox(); // Subclassed by RenderSVGText.
- InlineFlowBox* createLineBoxes(RenderObject*, const LineInfo&, InlineBox* childBox, bool startsNewSegment);
+ InlineFlowBox* createLineBoxes(RenderObject*, const LineInfo&, InlineBox* childBox);
RootInlineBox* constructLine(BidiRunList<BidiRun>&, const LineInfo&);
void setMarginsForRubyRun(BidiRun*, RenderRubyRun&, RenderObject*, const LineInfo&);
void computeInlineDirectionPositionsForLine(RootInlineBox*, const LineInfo&, BidiRun* firstRun, BidiRun* trailingSpaceRun, bool reachedEnd, GlyphOverflowAndFallbackFontsMap&, VerticalPositionCache&, WordMeasurements&);
Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (167282 => 167283)
--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2014-04-15 00:14:59 UTC (rev 167282)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp 2014-04-15 00:27:13 UTC (rev 167283)
@@ -182,7 +182,7 @@
return false;
}
-InlineFlowBox* RenderBlockFlow::createLineBoxes(RenderObject* obj, const LineInfo& lineInfo, InlineBox* childBox, bool startNewSegment)
+InlineFlowBox* RenderBlockFlow::createLineBoxes(RenderObject* obj, const LineInfo& lineInfo, InlineBox* childBox)
{
// See if we have an unconstructed line box for this object that is also
// the last item on the line.
@@ -205,8 +205,7 @@
// the same line (this can happen with very fancy language mixtures).
bool constructedNewBox = false;
bool allowedToConstructNewBox = !hasDefaultLineBoxContain || !inlineFlow || inlineFlow->alwaysCreateLineBoxes();
- bool mustCreateBoxesToRoot = startNewSegment && !(parentBox && parentBox->isRootInlineBox());
- bool canUseExistingParentBox = parentBox && !parentIsConstructedOrHaveNext(parentBox) && !mustCreateBoxesToRoot;
+ bool canUseExistingParentBox = parentBox && !parentIsConstructedOrHaveNext(parentBox);
if (allowedToConstructNewBox && !canUseExistingParentBox) {
// We need to make a new box for this render object. Once
// made, we need to place it at the end of the current line.
@@ -301,15 +300,10 @@
// then we need to construct inline boxes as necessary to properly enclose the
// run's inline box. Segments can only be siblings at the root level, as
// they are positioned separately.
-#if ENABLE(CSS_SHAPES)
- bool runStartsSegment = r->m_startsSegment;
-#else
- bool runStartsSegment = false;
-#endif
- if (!parentBox || &parentBox->renderer() != r->renderer().parent() || runStartsSegment)
+ if (!parentBox || &parentBox->renderer() != r->renderer().parent()) {
// Create new inline boxes all the way back to the appropriate insertion point.
- parentBox = createLineBoxes(r->renderer().parent(), lineInfo, box, runStartsSegment);
- else {
+ parentBox = createLineBoxes(r->renderer().parent(), lineInfo, box);
+ } else {
// Append the inline box to this line.
parentBox->addToLine(box);
}
@@ -545,11 +539,6 @@
size_t i = 0;
for (BidiRun* r = firstRun; r; r = r->next()) {
-#if ENABLE(CSS_SHAPES)
- // This method is called once per segment, do not move past the current segment.
- if (r->m_startsSegment)
- break;
-#endif
if (!r->box() || r == trailingSpaceRun)
continue;
@@ -672,12 +661,6 @@
BidiRun* r = firstRun;
for (; r; r = r->next()) {
-#if ENABLE(CSS_SHAPES)
- // Once we have reached the start of the next segment, we have finished
- // computing the positions for this segment's contents.
- if (r->m_startsSegment)
- break;
-#endif
if (!r->box() || r->renderer().isOutOfFlowPositioned() || r->box()->isLineBreak())
continue; // Positioned objects are only participating to figure out their
// correct static x position. They have no effect on the width.