Changeset 21778 in webkit


Ignore:
Timestamp:
May 25, 2007 2:44:44 PM (17 years ago)
Author:
bdakin
Message:

Reviewed by Oliver and Hyatt.

Fix for <rdar://problem/5228363> REGRESSION: In Mail, attempting to
create a To Do results in a crash

This regressed with r21635. Now that -boundingBox updates layout if
it is needed, we infinitely recurse when Mail draws a custom
highlight. The fix is to put a guard around laying out the render
tree.

  • page/FrameView.cpp: (WebCore::FrameViewPrivate::reset): (WebCore::FrameView::layout):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r21777 r21778  
     12007-05-25  dethbakin  <bdakin@apple.com>
     2
     3        Reviewed by Oliver and Hyatt.
     4
     5        Fix for <rdar://problem/5228363> REGRESSION: In Mail, attempting to
     6        create a To Do results in a crash
     7
     8        This regressed with r21635. Now that -boundingBox updates layout if
     9        it is needed, we infinitely recurse when Mail draws a custom
     10        highlight. The fix is to put a guard around laying out the render
     11        tree.
     12
     13        * page/FrameView.cpp:
     14        (WebCore::FrameViewPrivate::reset):
     15        (WebCore::FrameView::layout):
     16
    1172007-05-25  Patti Hoa <patti@apple.com>
    218
  • trunk/WebCore/page/FrameView.cpp

    r21555 r21778  
    8080        doFullRepaint = true;
    8181        layoutSchedulingEnabled = true;
     82        midLayout = false;
    8283        layoutCount = 0;
    8384        firstLayout = true;
     
    100101   
    101102    bool layoutSchedulingEnabled;
     103    bool midLayout;
    102104    int layoutCount;
    103105
     
    286288void FrameView::layout(bool allowSubtree)
    287289{
     290    if (d->midLayout)
     291        return;
     292
    288293    d->layoutTimer.stop();
    289294    d->delayedLayout = false;
     
    416421    if (subtree)
    417422        root->view()->pushLayoutState(root);
     423    d->midLayout = true;
    418424    root->layout();
     425    d->midLayout = false;
    419426    if (subtree)
    420427        root->view()->popLayoutState();
Note: See TracChangeset for help on using the changeset viewer.