Changeset 151934 in webkit


Ignore:
Timestamp:
Jun 24, 2013 4:27:02 PM (11 years ago)
Author:
Simon Fraser
Message:

Fix various crashes on sites with fixed backgrounds
https://bugs.webkit.org/show_bug.cgi?id=117959

Source/WebCore:

Reviewed by Andy Estes.

FrameView::removeSlowRepaintObject() would assume that addSlowRepaintObject()
had been called before it, but this isn't always the case. For example, if
a page has a fixed background on the body, this falls into the accelerated
path in WK2 tiled mode, so addSlowRepaintObject() is never called. However,
we still call removeSlowRepaintObject() if the body is removed.

So null-check m_slowRepaintObjects to avoid crashing.

Test: platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-removal.html

  • page/FrameView.cpp:

(WebCore::FrameView::removeSlowRepaintObject):

LayoutTests:

Reviewed by Andy Estes.

Test that does a document.write on a page with a fixed background on the body.

  • platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-removal-expected.txt: Added.
  • platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-removal.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r151931 r151934  
     12013-06-24  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix various crashes on sites with fixed backgrounds
     4        https://bugs.webkit.org/show_bug.cgi?id=117959
     5
     6        Reviewed by Andy Estes.
     7       
     8        Test that does a document.write on a page with a fixed background on the body.
     9
     10        * platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-removal-expected.txt: Added.
     11        * platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-removal.html: Added.
     12
    1132013-06-24  Hans Muller  <hmuller@adobe.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r151929 r151934  
     12013-06-24  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix various crashes on sites with fixed backgrounds
     4        https://bugs.webkit.org/show_bug.cgi?id=117959
     5
     6        Reviewed by Andy Estes.
     7       
     8        FrameView::removeSlowRepaintObject() would assume that addSlowRepaintObject()
     9        had been called before it, but this isn't always the case. For example, if
     10        a page has a fixed background on the body, this falls into the accelerated
     11        path in WK2 tiled mode, so addSlowRepaintObject() is never called. However,
     12        we still call removeSlowRepaintObject() if the body is removed.
     13       
     14        So null-check m_slowRepaintObjects to avoid crashing.
     15
     16        Test: platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-removal.html
     17
     18        * page/FrameView.cpp:
     19        (WebCore::FrameView::removeSlowRepaintObject):
     20
    1212013-06-24  Ruth Fong  <ruth_fong@apple.com>
    222
  • trunk/Source/WebCore/page/FrameView.cpp

    r151926 r151934  
    15631563void FrameView::removeSlowRepaintObject(RenderObject* o)
    15641564{
    1565     ASSERT(m_slowRepaintObjects);
    1566     ASSERT(m_slowRepaintObjects->contains(o));
     1565    if (!m_slowRepaintObjects)
     1566        return;
    15671567
    15681568    m_slowRepaintObjects->remove(o);
Note: See TracChangeset for help on using the changeset viewer.