Changeset 150547 in webkit


Ignore:
Timestamp:
May 22, 2013 3:19:18 PM (11 years ago)
Author:
Simon Fraser
Message:

Fix assertion in the getComputedStyle-background-shorthand.html test
https://bugs.webkit.org/show_bug.cgi?id=116639

Reviewed by Ryosuke Niwa.

getComputedStyle-background-shorthand.html was asserting under the newly added
code in willBeRemovedFromTree(). The assertion was caused by too many calls to
FrameView::removeSlowRepaintObject(), which happened because we called it for
RenderTexts, which share style with their parent renderer.

RenderText overrides styleWillChange() to do nothing, so we never
call add/removeSlowRepaintObject() for them. Thus we should also skip this
work in willBeRemovedFromTree() for RenderTexts.

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::willBeRemovedFromTree):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r150544 r150547  
     12013-05-22  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Fix assertion in the getComputedStyle-background-shorthand.html test
     4        https://bugs.webkit.org/show_bug.cgi?id=116639
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        getComputedStyle-background-shorthand.html was asserting under the newly added
     9        code in willBeRemovedFromTree(). The assertion was caused by too many calls to
     10        FrameView::removeSlowRepaintObject(), which happened because we called it for
     11        RenderTexts, which share style with their parent renderer.
     12       
     13        RenderText overrides styleWillChange() to do nothing, so we never
     14        call add/removeSlowRepaintObject() for them. Thus we should also skip this
     15        work in willBeRemovedFromTree() for RenderTexts.
     16
     17        * rendering/RenderObject.cpp:
     18        (WebCore::RenderObject::willBeRemovedFromTree):
     19
    1202013-05-22  Bem Jones-Bey  <bjonesbe@adobe.com>
    221
  • trunk/Source/WebCore/rendering/RenderObject.cpp

    r150529 r150547  
    25252525    // FIXME: We should ASSERT(isRooted()) but we have some out-of-order removals which would need to be fixed first.
    25262526
    2527     if (FrameView* frameView = view()->frameView()) {
    2528         bool repaintFixedBackgroundsOnScroll = shouldRepaintFixedBackgroundsOnScroll(frameView);
    2529         if (repaintFixedBackgroundsOnScroll && m_style && m_style->hasFixedBackgroundImage())
    2530             frameView->removeSlowRepaintObject();
     2527    if (!isText()) {
     2528        if (FrameView* frameView = view()->frameView()) {
     2529            bool repaintFixedBackgroundsOnScroll = shouldRepaintFixedBackgroundsOnScroll(frameView);
     2530            if (repaintFixedBackgroundsOnScroll && m_style && m_style->hasFixedBackgroundImage())
     2531                frameView->removeSlowRepaintObject();
     2532        }
    25312533    }
    25322534
Note: See TracChangeset for help on using the changeset viewer.