Title: [134505] trunk/Source/WebCore
Revision
134505
Author
commit-qu...@webkit.org
Date
2012-11-13 16:16:11 -0800 (Tue, 13 Nov 2012)

Log Message

Unreviewed, rolling out r134482.
http://trac.webkit.org/changeset/134482
https://bugs.webkit.org/show_bug.cgi?id=102140

The patch causes fast/regions/moved-content-node-crash.html to
crash in Debug mode due to ASSERTION. (Requested by abucur on
#webkit).

Patch by Sheriff Bot <webkit.review....@gmail.com> on 2012-11-13

* rendering/InlineFlowBox.cpp:
(SameSizeAsInlineFlowBox):
* rendering/InlineFlowBox.h:
(WebCore::InlineFlowBox::InlineFlowBox):
(InlineFlowBox):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::lineWidthForPaginatedLineChanged):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::linkToEndLineIfNeeded):
(WebCore::RenderBlock::determineStartPosition):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::RootInlineBox):
* rendering/RootInlineBox.h:
(WebCore):
(WebCore::RootInlineBox::paginationStrut):
(WebCore::RootInlineBox::setPaginationStrut):
(WebCore::RootInlineBox::isFirstAfterPageBreak):
(WebCore::RootInlineBox::setIsFirstAfterPageBreak):
(WebCore::RootInlineBox::paginatedLineWidth):
(WebCore::RootInlineBox::setPaginatedLineWidth):
(RootInlineBox):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (134504 => 134505)


--- trunk/Source/WebCore/ChangeLog	2012-11-14 00:02:51 UTC (rev 134504)
+++ trunk/Source/WebCore/ChangeLog	2012-11-14 00:16:11 UTC (rev 134505)
@@ -1,3 +1,36 @@
+2012-11-13  Sheriff Bot  <webkit.review....@gmail.com>
+
+        Unreviewed, rolling out r134482.
+        http://trac.webkit.org/changeset/134482
+        https://bugs.webkit.org/show_bug.cgi?id=102140
+
+        The patch causes fast/regions/moved-content-node-crash.html to
+        crash in Debug mode due to ASSERTION. (Requested by abucur on
+        #webkit).
+
+        * rendering/InlineFlowBox.cpp:
+        (SameSizeAsInlineFlowBox):
+        * rendering/InlineFlowBox.h:
+        (WebCore::InlineFlowBox::InlineFlowBox):
+        (InlineFlowBox):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::lineWidthForPaginatedLineChanged):
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
+        (WebCore::RenderBlock::linkToEndLineIfNeeded):
+        (WebCore::RenderBlock::determineStartPosition):
+        * rendering/RootInlineBox.cpp:
+        (WebCore::RootInlineBox::RootInlineBox):
+        * rendering/RootInlineBox.h:
+        (WebCore):
+        (WebCore::RootInlineBox::paginationStrut):
+        (WebCore::RootInlineBox::setPaginationStrut):
+        (WebCore::RootInlineBox::isFirstAfterPageBreak):
+        (WebCore::RootInlineBox::setIsFirstAfterPageBreak):
+        (WebCore::RootInlineBox::paginatedLineWidth):
+        (WebCore::RootInlineBox::setPaginatedLineWidth):
+        (RootInlineBox):
+
 2012-11-13  Xianzhu Wang  <wangxian...@chromium.org>
 
         Missing NodeRenderStyle.h include in WebCore/html/TextFieldInputType.cpp

Modified: trunk/Source/WebCore/rendering/InlineFlowBox.cpp (134504 => 134505)


--- trunk/Source/WebCore/rendering/InlineFlowBox.cpp	2012-11-14 00:02:51 UTC (rev 134504)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.cpp	2012-11-14 00:16:11 UTC (rev 134505)
@@ -48,7 +48,7 @@
 
 struct SameSizeAsInlineFlowBox : public InlineBox {
     void* pointers[5];
-    uint32_t bitfields : 23;
+    uint32_t bitfields : 24;
 };
 
 COMPILE_ASSERT(sizeof(InlineFlowBox) == sizeof(SameSizeAsInlineFlowBox), InlineFlowBox_should_stay_small);

Modified: trunk/Source/WebCore/rendering/InlineFlowBox.h (134504 => 134505)


--- trunk/Source/WebCore/rendering/InlineFlowBox.h	2012-11-14 00:02:51 UTC (rev 134504)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.h	2012-11-14 00:16:11 UTC (rev 134505)
@@ -52,6 +52,7 @@
         , m_baselineType(AlphabeticBaseline)
         , m_hasAnnotationsBefore(false)
         , m_hasAnnotationsAfter(false)
+        , m_isFirstAfterPageBreak(false)
 #ifndef NDEBUG
         , m_hasBadChildList(false)
 #endif
@@ -324,6 +325,7 @@
     // If the line contains any ruby runs, then this will be true.
     unsigned m_hasAnnotationsBefore : 1;
     unsigned m_hasAnnotationsAfter : 1;
+    unsigned m_isFirstAfterPageBreak : 1;
 
     unsigned m_lineBreakBidiStatusEor : 5; // WTF::Unicode::Direction
     unsigned m_lineBreakBidiStatusLastStrong : 5; // WTF::Unicode::Direction

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (134504 => 134505)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2012-11-14 00:02:51 UTC (rev 134504)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2012-11-14 00:16:11 UTC (rev 134505)
@@ -7245,12 +7245,7 @@
     if (!inRenderFlowThread())
         return false;
 
-    ASSERT(rootBox->containingRegion());
-    RenderRegion* currentRegion = regionAtBlockOffset(rootBox->lineTopWithLeading() + lineDelta);
-    // Just bail if the region didn't change.
-    if (rootBox->containingRegion() == currentRegion)
-        return false;
-    return rootBox->paginatedLineWidth() != availableLogicalWidthForContent(currentRegion, offsetFromLogicalTopOfFirstPage());
+    return rootBox->paginatedLineWidth() != availableLogicalWidthForContent(rootBox->lineTopWithLeading() + lineDelta);
 }
 
 LayoutUnit RenderBlock::offsetFromLogicalTopOfFirstPage() const

Modified: trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp (134504 => 134505)


--- trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2012-11-14 00:02:51 UTC (rev 134504)
+++ trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp	2012-11-14 00:16:11 UTC (rev 134505)
@@ -1508,9 +1508,6 @@
 
                         setLogicalHeight(lineBox->lineBottomWithLeading());
                     }
-
-                    if (inRenderFlowThread())
-                        lineBox->setContainingRegion(regionAtBlockOffset(lineBox->lineTopWithLeading()));
                 }
             }
 
@@ -1565,8 +1562,6 @@
                     layoutState.updateRepaintRangeFromBox(line, delta);
                     line->adjustBlockDirectionPosition(delta);
                 }
-                if (inRenderFlowThread())
-                    line->setContainingRegion(regionAtBlockOffset(line->lineTopWithLeading()));
                 if (Vector<RenderBox*>* cleanLineFloats = line->floatsPtr()) {
                     Vector<RenderBox*>::iterator end = cleanLineFloats->end();
                     for (Vector<RenderBox*>::iterator f = cleanLineFloats->begin(); f != end; ++f) {
@@ -1604,8 +1599,6 @@
             LayoutRect logicalLayoutOverflow(0, blockLogicalHeight, 1, bottomLayoutOverflow - blockLogicalHeight);
             LayoutRect logicalVisualOverflow(0, blockLogicalHeight, 1, bottomVisualOverflow - blockLogicalHeight);
             trailingFloatsLineBox->setOverflowFromLogicalRects(logicalLayoutOverflow, logicalVisualOverflow, trailingFloatsLineBox->lineTop(), trailingFloatsLineBox->lineBottom());
-            if (inRenderFlowThread())
-                trailingFloatsLineBox->setContainingRegion(regionAtBlockOffset(trailingFloatsLineBox->lineTopWithLeading()));
         }
 
         const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
@@ -1800,8 +1793,6 @@
                     layoutState.updateRepaintRangeFromBox(curr, paginationDelta);
                     curr->adjustBlockDirectionPosition(paginationDelta);
                 }
-                if (inRenderFlowThread())
-                    curr->setContainingRegion(regionAtBlockOffset(curr->lineTopWithLeading()));
             }
 
             // If a new float has been inserted before this line or before its last known float, just do a full layout.

Modified: trunk/Source/WebCore/rendering/RootInlineBox.cpp (134504 => 134505)


--- trunk/Source/WebCore/rendering/RootInlineBox.cpp	2012-11-14 00:02:51 UTC (rev 134504)
+++ trunk/Source/WebCore/rendering/RootInlineBox.cpp	2012-11-14 00:16:11 UTC (rev 134505)
@@ -52,6 +52,8 @@
     , m_lineBottom(0)
     , m_lineTopWithLeading(0)
     , m_lineBottomWithLeading(0)
+    , m_paginationStrut(0)
+    , m_paginatedLineWidth(0)
 {
     setIsHorizontal(block->isHorizontalWritingMode());
 }
@@ -249,13 +251,6 @@
     }
 }
 
-void RootInlineBox::setContainingRegion(RenderRegion* region)
-{
-    ASSERT(!isDirty());
-    ASSERT(block()->inRenderFlowThread());
-    ensureLineFragmentationData()->m_containingRegion = region;
-}
-
 LayoutUnit RootInlineBox::alignBoxesInBlockDirection(LayoutUnit heightOfBlock, GlyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache& verticalPositionCache)
 {
 #if ENABLE(SVG)

Modified: trunk/Source/WebCore/rendering/RootInlineBox.h (134504 => 134505)


--- trunk/Source/WebCore/rendering/RootInlineBox.h	2012-11-14 00:02:51 UTC (rev 134504)
+++ trunk/Source/WebCore/rendering/RootInlineBox.h	2012-11-14 00:16:11 UTC (rev 134505)
@@ -28,7 +28,6 @@
 
 class EllipsisBox;
 class HitTestResult;
-class RenderRegion;
 
 struct BidiStatus;
 struct GapRects;
@@ -54,18 +53,15 @@
     LayoutUnit lineTopWithLeading() const { return m_lineTopWithLeading; }
     LayoutUnit lineBottomWithLeading() const { return m_lineBottomWithLeading; }
     
-    LayoutUnit paginationStrut() const { return m_fragmentationData ? m_fragmentationData->m_paginationStrut : LayoutUnit(0); }
-    void setPaginationStrut(LayoutUnit strut) { ensureLineFragmentationData()->m_paginationStrut = strut; }
+    LayoutUnit paginationStrut() const { return m_paginationStrut; }
+    void setPaginationStrut(LayoutUnit s) { m_paginationStrut = s; }
 
-    bool isFirstAfterPageBreak() const { return m_fragmentationData ? m_fragmentationData->m_isFirstAfterPageBreak : false; }
-    void setIsFirstAfterPageBreak(bool isFirstAfterPageBreak) { ensureLineFragmentationData()->m_isFirstAfterPageBreak = isFirstAfterPageBreak; }
+    bool isFirstAfterPageBreak() const { return m_isFirstAfterPageBreak; }
+    void setIsFirstAfterPageBreak(bool isFirstAfterPageBreak) { m_isFirstAfterPageBreak = isFirstAfterPageBreak; }
 
-    LayoutUnit paginatedLineWidth() const { return m_fragmentationData ? m_fragmentationData->m_paginatedLineWidth : LayoutUnit(0); }
-    void setPaginatedLineWidth(LayoutUnit width) { ensureLineFragmentationData()->m_paginatedLineWidth = width; }
+    LayoutUnit paginatedLineWidth() const { return m_paginatedLineWidth; }
+    void setPaginatedLineWidth(LayoutUnit width) { m_paginatedLineWidth = width; }
 
-    RenderRegion* containingRegion() const { return m_fragmentationData ? m_fragmentationData->m_containingRegion : 0; }
-    void setContainingRegion(RenderRegion*);
-
     LayoutUnit selectionTop() const;
     LayoutUnit selectionBottom() const;
     LayoutUnit selectionHeight() const { return max<LayoutUnit>(0, selectionBottom() - selectionTop()); }
@@ -197,15 +193,6 @@
 
     LayoutUnit beforeAnnotationsAdjustment() const;
 
-    struct LineFragmentationData;
-    LineFragmentationData* ensureLineFragmentationData()
-    {
-        if (!m_fragmentationData)
-            m_fragmentationData = adoptPtr(new LineFragmentationData());
-
-        return m_fragmentationData.get();
-    }
-
     // This folds into the padding at the end of InlineFlowBox on 64-bit.
     unsigned m_lineBreakPos;
 
@@ -220,26 +207,9 @@
     LayoutUnit m_lineTopWithLeading;
     LayoutUnit m_lineBottomWithLeading;
 
-    struct LineFragmentationData {
-        WTF_MAKE_NONCOPYABLE(LineFragmentationData); WTF_MAKE_FAST_ALLOCATED;
-    public:
-        LineFragmentationData()
-            : m_containingRegion(0)
-            , m_paginationStrut(0)
-            , m_paginatedLineWidth(0)
-            , m_isFirstAfterPageBreak(false)
-        {
+    LayoutUnit m_paginationStrut;
+    LayoutUnit m_paginatedLineWidth;
 
-        }
-
-        RenderRegion* m_containingRegion;
-        LayoutUnit m_paginationStrut;
-        LayoutUnit m_paginatedLineWidth;
-        bool m_isFirstAfterPageBreak;
-    };
-
-    OwnPtr<LineFragmentationData> m_fragmentationData;
-
     // Floats hanging off the line are pushed into this vector during layout. It is only
     // good for as long as the line has not been marked dirty.
     OwnPtr<Vector<RenderBox*> > m_floats;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to