Changeset 24973 in webkit


Ignore:
Timestamp:
Aug 9, 2007 8:52:11 PM (17 years ago)
Author:
bdash
Message:

2007-08-09 Mitz Pettel <mitz@webkit.org>

Reviewed by Dave Hyatt.

updateStyleSelector() is normally called when something changes that factors
into the style selector. However, updateLayoutIgnorePendingStylesheets() calls it for
a different reason, namely to account for all the preceding changes that were ignored
because of the early return in updateStyleSelector(). After that, the early return
can no longer occur, so changes are accounted for as they happen, and
updateLayoutIgnorePendingStylesheets() does not need to call updateStyleSelector()
again.

  • dom/Document.cpp: (WebCore::Document::updateLayoutIgnorePendingStylesheets): Call updateStyleSelector() only before the first layout.
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r24972 r24973  
     12007-08-09  Mitz Pettel  <mitz@webkit.org>
     2
     3        Reviewed by Dave Hyatt.
     4
     5        - fix http://bugs.webkit.org/show_bug.cgi?id=14742
     6          Document::recalcStyle(Force) called for every updateStyleIgnorePendingStylesheets while waiting for stylesheets
     7          <rdar://problem/5376306>
     8
     9        updateStyleSelector() is normally called when something changes that factors
     10        into the style selector. However, updateLayoutIgnorePendingStylesheets() calls it for
     11        a different reason, namely to account for all the preceding changes that were ignored
     12        because of the early return in updateStyleSelector(). After that, the early return
     13        can no longer occur, so changes are accounted for as they happen, and
     14        updateLayoutIgnorePendingStylesheets() does not need to call updateStyleSelector()
     15        again.
     16
     17        * dom/Document.cpp:
     18        (WebCore::Document::updateLayoutIgnorePendingStylesheets): Call updateStyleSelector()
     19        only before the first layout.
     20
    1212007-08-09  Mitz Pettel  <mitz@webkit.org>
    222
  • trunk/WebCore/dom/Document.cpp

    r24946 r24973  
    10991099        // It's worth noting though that this entire method is a hack, since what we really want to do is
    11001100        // suspend JS instead of doing a layout with inaccurate information.
    1101         if (body() && !body()->renderer() && m_pendingSheetLayout == NoLayoutWithPendingSheets)
     1101        if (body() && !body()->renderer() && m_pendingSheetLayout == NoLayoutWithPendingSheets) {
    11021102            m_pendingSheetLayout = DidLayoutWithPendingSheets;
    1103         updateStyleSelector();   
     1103            updateStyleSelector();
     1104        }
    11041105    }
    11051106
Note: See TracChangeset for help on using the changeset viewer.