Changeset 66552 in webkit
- Timestamp:
- Aug 31, 2010 4:21:57 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r66551 r66552 1 2010-08-31 Beth Dakin <bdakin@apple.com> 2 3 Reviewed by Dave Hyatt. 4 5 Fix for https://bugs.webkit.org/show_bug.cgi?id=44828 FrameView 6 should make more calls to postLayoutTasks() using the timer 7 -and corresponding- 8 <rdar://problem/8064938> 9 10 * fast/events/change-overflow-on-overflow-change-expected.txt: Added. 11 * fast/events/change-overflow-on-overflow-change.html: Added. 12 1 13 2010-08-31 Alexey Proskuryakov <ap@apple.com> 2 14 -
trunk/WebCore/ChangeLog
r66550 r66552 1 2010-08-31 Beth Dakin <bdakin@apple.com> 2 3 Reviewed by Dave Hyatt. 4 5 Fix for https://bugs.webkit.org/show_bug.cgi?id=44828 FrameView 6 should make more calls to postLayoutTasks() using the timer 7 -and corresponding- 8 <rdar://problem/8064938> 9 10 This change only allows synchronous calls to postLayoutTasks() if 11 we are not already in a synchronous call to postLayoutTasks(). 12 Furthermore, it de-couples the notion of "the post layout timer 13 should fire" from m_postLayoutTasksTimer.isActive(), instead using 14 a boolean to track the need to use the timer. 15 16 * page/FrameView.cpp: 17 (WebCore::FrameView::FrameView): 18 (WebCore::FrameView::~FrameView): 19 (WebCore::FrameView::reset): 20 (WebCore::FrameView::layout): 21 (WebCore::FrameView::unscheduleRelayout): 22 (WebCore::FrameView::performPostLayoutTasks): 23 * page/FrameView.h: 24 1 25 2010-08-30 Anders Carlsson <andersca@apple.com> 2 26 -
trunk/WebCore/page/FrameView.cpp
r66240 r66552 129 129 , m_layoutTimer(this, &FrameView::layoutTimerFired) 130 130 , m_layoutRoot(0) 131 , m_shouldFirePostLayoutTimer(false) 132 , m_inSynchronousPostLayout(false) 131 133 , m_postLayoutTasksTimer(this, &FrameView::postLayoutTimerFired) 132 134 , m_isTransparent(false) … … 165 167 FrameView::~FrameView() 166 168 { 167 if (m_ postLayoutTasksTimer.isActive()) {169 if (m_shouldFirePostLayoutTimer) { 168 170 m_postLayoutTasksTimer.stop(); 169 171 m_scheduledEvents.clear(); … … 205 207 m_layoutSchedulingEnabled = true; 206 208 m_inLayout = false; 209 m_inSynchronousPostLayout = false; 210 m_shouldFirePostLayoutTimer = false; 207 211 m_layoutCount = 0; 208 212 m_nestedLayoutCount = 0; … … 639 643 m_layoutSchedulingEnabled = false; 640 644 641 if (!m_nestedLayoutCount && m_postLayoutTasksTimer.isActive()) {645 if (!m_nestedLayoutCount && !m_inSynchronousPostLayout && m_shouldFirePostLayoutTimer) { 642 646 // This is a new top-level layout. If there are any remaining tasks from the previous 643 647 // layout, finish them now. 648 m_inSynchronousPostLayout = true; 644 649 m_postLayoutTasksTimer.stop(); 645 650 performPostLayoutTasks(); 651 m_inSynchronousPostLayout = false; 646 652 } 647 653 … … 822 828 layoutHeight() < contentsHeight()); 823 829 824 if (!m_postLayoutTasksTimer.isActive()) { 825 // Calls resumeScheduledEvents() 826 performPostLayoutTasks(); 827 828 if (!m_postLayoutTasksTimer.isActive() && needsLayout()) { 829 // Post-layout widget updates or an event handler made us need layout again. 830 // Lay out again, but this time defer widget updates and event dispatch until after 831 // we return. 830 if (!m_shouldFirePostLayoutTimer) { 831 if (!m_inSynchronousPostLayout) { 832 m_inSynchronousPostLayout = true; 833 // Calls resumeScheduledEvents() 834 performPostLayoutTasks(); 835 m_inSynchronousPostLayout = false; 836 } 837 838 if (!m_shouldFirePostLayoutTimer && (needsLayout() || m_inSynchronousPostLayout)) { 839 // If we need layout or are already in a synchronous call to postLayoutTasks(), 840 // defer widget updates and event dispatch until after we return. postLayoutTasks() 841 // can make us need to update again, and we can get stuck in a nasty cycle unless 842 // we call it through the timer here. 843 m_shouldFirePostLayoutTimer = true; 832 844 m_postLayoutTasksTimer.startOneShot(0); 833 pauseScheduledEvents(); 834 layout(); 845 if (needsLayout()) { 846 pauseScheduledEvents(); 847 layout(); 848 } 835 849 } 836 850 } else { … … 1453 1467 void FrameView::unscheduleRelayout() 1454 1468 { 1469 m_postLayoutTasksTimer.stop(); 1470 1455 1471 if (!m_layoutTimer.isActive()) 1456 1472 return; … … 1596 1612 void FrameView::performPostLayoutTasks() 1597 1613 { 1614 m_shouldFirePostLayoutTimer = false; 1615 1598 1616 if (m_firstLayoutCallbackPending) { 1599 1617 m_firstLayoutCallbackPending = false; -
trunk/WebCore/page/FrameView.h
r65681 r66552 320 320 bool m_layoutSchedulingEnabled; 321 321 bool m_inLayout; 322 bool m_shouldFirePostLayoutTimer; 323 bool m_inSynchronousPostLayout; 322 324 int m_layoutCount; 323 325 unsigned m_nestedLayoutCount;
Note: See TracChangeset
for help on using the changeset viewer.