Changeset 223633 in webkit


Ignore:
Timestamp:
Oct 18, 2017 3:27:55 PM (7 years ago)
Author:
Alan Bujtas
Message:

[FrameView::layout cleanup] Use SetForScope to protect m_needsFullRepaint's value on reentrancy
https://bugs.webkit.org/show_bug.cgi?id=178479
<rdar://problem/35056950>

Reviewed by Simon Fraser.

No change in functionality.

  • page/FrameView.cpp:

(WebCore::FrameView::layout):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r223631 r223633  
     12017-10-18  Zalan Bujtas  <zalan@apple.com>
     2
     3        [FrameView::layout cleanup] Use SetForScope to protect m_needsFullRepaint's value on reentrancy
     4        https://bugs.webkit.org/show_bug.cgi?id=178479
     5        <rdar://problem/35056950>
     6
     7        Reviewed by Simon Fraser.
     8
     9        No change in functionality.
     10
     11        * page/FrameView.cpp:
     12        (WebCore::FrameView::layout):
     13
    1142017-10-18  Zalan Bujtas  <zalan@apple.com>
    215
  • trunk/Source/WebCore/page/FrameView.cpp

    r223631 r223633  
    15181518        // Close block here to end the scope of changeSchedulingEnabled and SubtreeLayoutStateMaintainer.
    15191519    }
    1520 
    1521     m_layoutPhase = InViewSizeAdjust;
    1522 
    1523     bool neededFullRepaint = m_needsFullRepaint;
    1524 
    15251520    if (!isSubtreeLayout && !downcast<RenderView>(*layoutRoot).printing()) {
     1521        // This is to protect m_needsFullRepaint's value when layout() is getting re-entered through adjustViewSize().
     1522        SetForScope<bool> needsFullRepaint(m_needsFullRepaint);
     1523        m_layoutPhase = InViewSizeAdjust;
    15261524        adjustViewSize();
    15271525        // FIXME: Firing media query callbacks synchronously on nested frames could produced a detached FrameView here by
     
    15301528            return;
    15311529    }
    1532 
    15331530    m_layoutPhase = InPostLayout;
    1534 
    1535     m_needsFullRepaint = neededFullRepaint;
    1536 
    15371531    // Now update the positions of all layers.
    15381532    if (m_needsFullRepaint)
Note: See TracChangeset for help on using the changeset viewer.