Changeset 77988 in webkit
- Timestamp:
- Feb 8, 2011 4:25:53 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r77986 r77988 1 2011-02-08 Yael Aharon <yael.aharon@nokia.com> 2 3 Reviewed by Antti Koivisto. 4 5 Crash when logging into gmail.com with frame flattening turned on. 6 https://bugs.webkit.org/show_bug.cgi?id=52449 7 8 * fast/frames/flattening/iframe-flattening-crash-expected.txt: Added. 9 * fast/frames/flattening/iframe-flattening-crash.html: Added. 10 * fast/frames/flattening/iframe-flattening-selection-crash-expected.txt: Added. 11 * fast/frames/flattening/iframe-flattening-selection-crash.html: Added. 12 * fast/frames/flattening/resources/iframe-flattening-crash.html: Added. 13 1 14 2011-02-08 Andy Estes <aestes@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r77986 r77988 1 2011-02-08 Yael Aharon <yael.aharon@nokia.com> 2 3 Reviewed by Antti Koivisto. 4 5 Crash when logging into gmail.com with frame flattening turned on. 6 https://bugs.webkit.org/show_bug.cgi?id=52449 7 8 Frame flattening algorithm requires that layout always starts from the main frame, since layout of 9 subframes impacts the layout of their parents. 10 There are places in the code that call view->layout() not on the main frame. 11 Instead of changing all the callsites, I changed FrameView::layout() 12 to force layout from the main frame if frame flattening is enabled. 13 In addition, postLayoutTasks can trigger relayout, so make it use the timer even more. 14 Move the call to SelectionController::updateAppearance() to performPostLayoutTasks(), 15 because calling the from layout() leads to a crash in pages that have a selection in an iframe. 16 17 Tests: fast/frames/flattening/iframe-flattening-crash.html 18 fast/frames/flattening/iframe-flattening-selection-crash.html 19 20 * page/FrameView.cpp: 21 (WebCore::FrameView::layout): 22 (WebCore::FrameView::performPostLayoutTasks): 23 1 24 2011-02-08 Andy Estes <aestes@apple.com> 2 25 -
trunk/Source/WebCore/page/FrameView.cpp
r77706 r77988 726 726 return; 727 727 728 bool inSubframeLayoutWithFrameFlattening = parent() && m_frame->settings() && m_frame->settings()->frameFlatteningEnabled(); 729 730 if (inSubframeLayoutWithFrameFlattening) { 731 if (parent()->isFrameView()) { 732 FrameView* parentView = static_cast<FrameView*>(parent()); 733 if (!parentView->m_nestedLayoutCount) { 734 while (parentView->parent() && parentView->parent()->isFrameView()) 735 parentView = static_cast<FrameView*>(parentView->parent()); 736 parentView->layout(allowSubtree); 737 return; 738 } 739 } 740 } 741 728 742 m_layoutTimer.stop(); 729 743 m_delayedLayout = false; … … 758 772 m_layoutSchedulingEnabled = false; 759 773 760 if (!m_nestedLayoutCount && !m_inSynchronousPostLayout && m_hasPendingPostLayoutTasks ) {774 if (!m_nestedLayoutCount && !m_inSynchronousPostLayout && m_hasPendingPostLayoutTasks && !inSubframeLayoutWithFrameFlattening) { 761 775 // This is a new top-level layout. If there are any remaining tasks from the previous 762 776 // layout, finish them now. … … 896 910 m_layoutRoot = 0; 897 911 898 m_frame->selection()->setCaretRectNeedsUpdate();899 m_frame->selection()->updateAppearance();900 901 912 m_layoutSchedulingEnabled = true; 902 913 … … 937 948 938 949 if (!m_hasPendingPostLayoutTasks) { 939 if (!m_inSynchronousPostLayout ) {950 if (!m_inSynchronousPostLayout && !inSubframeLayoutWithFrameFlattening) { 940 951 m_inSynchronousPostLayout = true; 941 952 // Calls resumeScheduledEvents() … … 944 955 } 945 956 946 if (!m_hasPendingPostLayoutTasks && (needsLayout() || m_inSynchronousPostLayout )) {957 if (!m_hasPendingPostLayoutTasks && (needsLayout() || m_inSynchronousPostLayout || inSubframeLayoutWithFrameFlattening)) { 947 958 // If we need layout or are already in a synchronous call to postLayoutTasks(), 948 959 // defer widget updates and event dispatch until after we return. postLayoutTasks() … … 1849 1860 { 1850 1861 m_hasPendingPostLayoutTasks = false; 1862 1863 m_frame->selection()->setCaretRectNeedsUpdate(); 1864 m_frame->selection()->updateAppearance(); 1851 1865 1852 1866 if (m_firstLayoutCallbackPending) {
Note: See TracChangeset
for help on using the changeset viewer.