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

Changeset 179706 in webkit


Ignore:
Timestamp:
Feb 5, 2015, 1:55:45 PM (12 years ago)
Author:
mjs@apple.com
Message:

Crash due to failing to dirty a removed text node's line box
https://bugs.webkit.org/show_bug.cgi?id=136544

Reviewed by David Hyatt.
Source/WebCore:


Test: fast/text/remove-text-node-linebox-not-dirty-crash.html

  • rendering/RenderLineBoxList.cpp:

(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): Make the check for dirtying the next
line box a bit more inclusive to avoid a case of a line box for a destroyed render object not
being dirtied. In particular, when the text node's parent has no line boxes but contains BRs.

LayoutTests:

  • fast/text/remove-text-node-linebox-not-dirty-crash-expected.txt: Added.
  • fast/text/remove-text-node-linebox-not-dirty-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r179700 r179706  
     12015-02-05  Maciej Stachowiak  <mjs@apple.com>
     2
     3        Crash due to failing to dirty a removed text node's line box
     4        https://bugs.webkit.org/show_bug.cgi?id=136544
     5
     6        Reviewed by David Hyatt.
     7
     8        * fast/text/remove-text-node-linebox-not-dirty-crash-expected.txt: Added.
     9        * fast/text/remove-text-node-linebox-not-dirty-crash.html: Added.
     10
    1112015-02-05  Brent Fulgham  <bfulgham@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r179702 r179706  
     12015-02-05  Maciej Stachowiak  <mjs@apple.com>
     2
     3        Crash due to failing to dirty a removed text node's line box
     4        https://bugs.webkit.org/show_bug.cgi?id=136544
     5
     6        Reviewed by David Hyatt.
     7       
     8        Test: fast/text/remove-text-node-linebox-not-dirty-crash.html
     9
     10        * rendering/RenderLineBoxList.cpp:
     11        (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild): Make the check for dirtying the next
     12        line box a bit more inclusive to avoid a case of a line box for a destroyed render object not
     13        being dirtied. In particular, when the text node's parent has no line boxes but contains BRs.
     14
    1152015-02-05  Chris Dumez  <cdumez@apple.com>
    216
  • trunk/Source/WebCore/rendering/RenderLineBoxList.cpp

    r174840 r179706  
    397397        // one as |box|. If we hit that situation here, dirty the |box| actually containing the child too.
    398398        bool insertedAfterLeadingSpace = box->lineBreakObj() == child.previousSibling();
    399         if (adjacentBox && (adjacentBox->lineBreakObj() == &child || child.isBR() || (current && current->isBR())
     399        if (adjacentBox && (adjacentBox->lineBreakObj()->isDescendantOf(&child) || child.isBR() || (current && current->isBR())
    400400            || insertedAfterLeadingSpace || isIsolated(container.style().unicodeBidi())))
    401401            adjacentBox->markDirty();
Note: See TracChangeset for help on using the changeset viewer.