⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 202931 in webkit


Ignore:
Timestamp:
Jul 7, 2016, 2:24:45 PM (10 years ago)
Author:
Antti Koivisto
Message:

REGRESSION (r199054): CrashTracer: [USER] parseWebKit at WebCore: WebCore::RenderBlockFlow::checkFloatsInCleanLine + 107
https://bugs.webkit.org/show_bug.cgi?id=159519

Reviewed by Zalan Bujtas.

Source/WebCore:

Test: fast/inline/trailing-floats-inline-crash.html

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::checkFloatsInCleanLine):

Use the existing deletionHasBegun bit in RenderStyle to assert against this reliably.

  • rendering/RenderLineBoxList.cpp:

(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):

In some cases a special TrailingFloatsRootInlineBox may be added as the last root linebox of a flow.
If it is combined with br the existing invalidation that invalidates the next and previous line may
not be sufficient. Test for this case and invalidate the TrailingFloatsRootInlineBox too if it exists.

  • rendering/RootInlineBox.h:

(WebCore::RootInlineBox::isTrailingFloatsRootInlineBox):

  • rendering/TrailingFloatsRootInlineBox.h:
  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::deletionHasBegun):

Expose the bit in debug.

LayoutTests:

  • fast/inline/trailing-floats-inline-crash-expected.txt: Added.
  • fast/inline/trailing-floats-inline-crash.html: Added.
Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r202929 r202931  
     12016-07-07  Antti Koivisto  <antti@apple.com>
     2
     3        REGRESSION (r199054): CrashTracer: [USER] parseWebKit at WebCore: WebCore::RenderBlockFlow::checkFloatsInCleanLine + 107
     4        https://bugs.webkit.org/show_bug.cgi?id=159519
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        * fast/inline/trailing-floats-inline-crash-expected.txt: Added.
     9        * fast/inline/trailing-floats-inline-crash.html: Added.
     10
    1112016-07-07  Commit Queue  <commit-queue@webkit.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r202930 r202931  
     12016-07-07  Antti Koivisto  <antti@apple.com>
     2
     3        REGRESSION (r199054): CrashTracer: [USER] parseWebKit at WebCore: WebCore::RenderBlockFlow::checkFloatsInCleanLine + 107
     4        https://bugs.webkit.org/show_bug.cgi?id=159519
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        Test: fast/inline/trailing-floats-inline-crash.html
     9
     10        * rendering/RenderBlockLineLayout.cpp:
     11        (WebCore::RenderBlockFlow::checkFloatsInCleanLine):
     12
     13            Use the existing deletionHasBegun bit in RenderStyle to assert against this reliably.
     14
     15        * rendering/RenderLineBoxList.cpp:
     16        (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
     17
     18            In some cases a special TrailingFloatsRootInlineBox may be added as the last root linebox of a flow.
     19            If it is combined with br the existing invalidation that invalidates the next and previous line may
     20            not be sufficient. Test for this case and invalidate the TrailingFloatsRootInlineBox too if it exists.
     21
     22        * rendering/RootInlineBox.h:
     23        (WebCore::RootInlineBox::isTrailingFloatsRootInlineBox):
     24        * rendering/TrailingFloatsRootInlineBox.h:
     25        * rendering/style/RenderStyle.h:
     26        (WebCore::RenderStyle::deletionHasBegun):
     27
     28            Expose the bit in debug.
     29
    1302016-07-07  Alex Christensen  <achristensen@webkit.org>
    231
  • trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp

    r202146 r202931  
    17891789    for (auto it = cleanLineFloats->begin(), end = cleanLineFloats->end(); it != end; ++it) {
    17901790        RenderBox* floatingBox = *it;
     1791        ASSERT_WITH_SECURITY_IMPLICATION(!floatingBox->style().deletionHasBegun());
    17911792        floatingBox->layoutIfNeeded();
    17921793        LayoutSize newSize(floatingBox->width() + floatingBox->horizontalMarginExtent(), floatingBox->height() + floatingBox->verticalMarginExtent());
  • trunk/Source/WebCore/rendering/RenderLineBoxList.cpp

    r196222 r202931  
    383383        // FIXME: We shouldn't need to always dirty the next line. This is only strictly
    384384        // necessary some of the time, in situations involving BRs.
    385         if (RootInlineBox* nextBox = box->nextRootBox())
     385        if (RootInlineBox* nextBox = box->nextRootBox()) {
    386386            nextBox->markDirty();
     387
     388            // Special root box for floats may be added at the end of the list. If this occurs with BRs we need to invalidate it explicitly.
     389            if (auto* nextNextBox = nextBox->nextRootBox()) {
     390                if (nextNextBox->isTrailingFloatsRootInlineBox())
     391                    nextNextBox->markDirty();
     392            }
     393        }
    387394    }
    388395}
  • trunk/Source/WebCore/rendering/RootInlineBox.h

    r197566 r202931  
    191191    Node* getLogicalEndBoxWithNode(InlineBox*&) const;
    192192
     193    virtual bool isTrailingFloatsRootInlineBox() const { return false; }
     194
    193195#if ENABLE(TREE_DEBUGGING)
    194196    const char* boxName() const final;
  • trunk/Source/WebCore/rendering/TrailingFloatsRootInlineBox.h

    r197563 r202931  
    4141private:
    4242    float virtualLogicalHeight() const override { return 0; }
     43    bool isTrailingFloatsRootInlineBox() const final { return true; }
    4344};
    4445
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r202167 r202931  
    498498    static RenderStyle createAnonymousStyleWithDisplay(const RenderStyle& parentStyle, EDisplay);
    499499    static RenderStyle createStyleInheritingFromPseudoStyle(const RenderStyle& pseudoStyle);
     500
     501#if !ASSERT_DISABLED
     502    bool deletionHasBegun() const { return m_deletionHasBegun; }
     503#endif
    500504
    501505    ContentPosition resolvedJustifyContentPosition(const StyleContentAlignmentData& normalValueBehavior) const;
Note: See TracChangeset for help on using the changeset viewer.