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

Changeset 207683 in webkit


Ignore:
Timestamp:
Oct 21, 2016, 10:39:17 AM (10 years ago)
Author:
Alan Bujtas
Message:

Do not mutate the render tree while collecting selection repaint rects.
​https://bugs.webkit.org/show_bug.cgi?id=163800
<rdar://problem/28806886>

Reviewed by David Hyatt.

Source/WebCore:

RenderListItem not only mutates the tree while in layout but it also uses
the old descendant context to find the insertion point.
This patch strictly ensures that we only do it while in layout and never
in other cases such as collecting repaint rects.
This gets redundant when webkit.org/b/163789 is fixed.

Test: fast/lists/crash-when-list-marker-is-moved-during-selection.html

  • rendering/RenderListItem.cpp:

(WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):

LayoutTests:

  • fast/lists/crash-when-list-marker-is-moved-during-selection-expected.txt: Added.
  • fast/lists/crash-when-list-marker-is-moved-during-selection.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r207675 r207683  
     12016-10-21  Zalan Bujtas  <zalan@apple.com>
     2
     3        Do not mutate the render tree while collecting selection repaint rects.
     4        https://bugs.webkit.org/show_bug.cgi?id=163800
     5        <rdar://problem/28806886>
     6
     7        Reviewed by David Hyatt.
     8
     9        * fast/lists/crash-when-list-marker-is-moved-during-selection-expected.txt: Added.
     10        * fast/lists/crash-when-list-marker-is-moved-during-selection.html: Added.
     11
    1122016-10-21  Miguel Gomez  <magomez@igalia.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r207682 r207683  
     12016-10-21  Zalan Bujtas  <zalan@apple.com>
     2
     3        Do not mutate the render tree while collecting selection repaint rects.
     4        https://bugs.webkit.org/show_bug.cgi?id=163800
     5        <rdar://problem/28806886>
     6
     7        Reviewed by David Hyatt.
     8
     9        RenderListItem not only mutates the tree while in layout but it also uses
     10        the old descendant context to find the insertion point.
     11        This patch strictly ensures that we only do it while in layout and never
     12        in other cases such as collecting repaint rects.
     13        This gets redundant when webkit.org/b/163789 is fixed.
     14
     15        Test: fast/lists/crash-when-list-marker-is-moved-during-selection.html
     16
     17        * rendering/RenderListItem.cpp:
     18        (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
     19
    1202016-10-21  Dave Hyatt  <hyatt@apple.com>
    221
  • trunk/Source/WebCore/rendering/RenderListItem.cpp

    r206765 r207683  
    267267    // Sanity check the location of our marker.
    268268    if (!m_marker)
     269        return;
     270
     271    // FIXME: Do not even try reposition the marker when we are not in layout
     272    // until after we fixed webkit.org/b/163789.
     273    if (!view().frameView().isInRenderTreeLayout())
    269274        return;
    270275
Note: See TracChangeset for help on using the changeset viewer.