Changeset 52494 in webkit
- Timestamp:
- Dec 22, 2009 11:26:29 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r52485 r52494 1 2009-12-21 Darin Adler <darin@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Reentrancy problem with selection in some edge cases. 6 https://bugs.webkit.org/show_bug.cgi?id=32842 7 rdar://problem/7449974 8 9 * fast/forms/selection-layout-reentry-strange-case-expected.txt: Added. 10 * fast/forms/selection-layout-reentry-strange-case.html: Added. 11 12 * platform/mac/accessibility/frame-with-title-expected.txt: Updated since 13 the number of layouts is now different. 14 1 15 2009-12-21 Csaba Osztrogonác <ossy@webkit.org> 2 16 -
trunk/LayoutTests/platform/mac/accessibility/frame-with-title-expected.txt
r42465 r52494 22 22 AXLinkUIElements: <array of size 0> 23 23 AXLoaded: 1 24 AXLayoutCount: 324 AXLayoutCount: 4 25 25 AXURL: about:blank 26 26 … … 49 49 AXLinkUIElements: <array of size 0> 50 50 AXLoaded: 1 51 AXLayoutCount: 451 AXLayoutCount: 5 52 52 AXURL: about:blank 53 53 -
trunk/WebCore/ChangeLog
r52492 r52494 1 2009-12-21 Darin Adler <darin@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Reentrancy problem with selection in some edge cases. 6 https://bugs.webkit.org/show_bug.cgi?id=32842 7 rdar://problem/7449974 8 9 Test: fast/forms/selection-layout-reentry-strange-case.html 10 11 Move the selection display update process done in the 12 selectionLayoutChanged function into the layout timer 13 instead of doing it immediately when selection changes occur. 14 15 * editing/SelectionController.cpp: 16 (WebCore::SelectionController::SelectionController): 17 Initialize m_needsDisplayUpdate to false. 18 (WebCore::SelectionController::setSelection): Call 19 the new setNeedsDisplayUpdate function instead of the old 20 badly named Frame::selectionLayoutChanged function. 21 (WebCore::SelectionController::setNeedsDisplayUpdate): 22 Set m_needsDisplayUpdate. If it is just becoming true, then 23 call FrameView::scheduleRelayout. 24 25 * editing/SelectionController.h: Added setNeedsDisplayUpdate, 26 needsDisplayUpdate, and m_needsDisplayUpdate. 27 28 * page/Frame.cpp: 29 (WebCore::Frame::setCaretVisible): Call setNeedsDisplayUpdate. 30 (WebCore::Frame::selectionLayoutChanged): Call 31 setNeedsDisplayUpdate to set it to false, since this is the 32 function that performs "selection display update". Later I want 33 to rename this function. 34 35 * page/FrameView.cpp: 36 (WebCore::FrameView::needsLayout): Add a new clause, since 37 we need a call to layout if needsDisplayUpdate is true. 38 1 39 2009-12-22 Kwang Yul Seo <skyul@company100.net> 2 40 -
trunk/WebCore/editing/SelectionController.cpp
r52451 r52494 1 1 /* 2 * Copyright (C) 2004, 2008 Apple Inc. All rights reserved.2 * Copyright (C) 2004, 2008, 2009 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 71 71 , m_isCaretBlinkingSuspended(false) 72 72 , m_focused(frame && frame->page() && frame->page()->focusController()->focusedFrame() == frame) 73 , m_needsDisplayUpdate(false) 73 74 { 74 75 } … … 146 147 m_frame->setFocusedNodeIfNeeded(); 147 148 148 m_frame->selectionLayoutChanged(); 149 setNeedsDisplayUpdate(); 150 149 151 // Always clear the x position used for vertical arrow navigation. 150 152 // It will be restored by the vertical arrow navigation code if necessary. … … 1302 1304 } 1303 1305 1306 void SelectionController::setNeedsDisplayUpdate(bool needsUpdate) 1307 { 1308 if (m_needsDisplayUpdate == needsUpdate) 1309 return; 1310 m_needsDisplayUpdate = needsUpdate; 1311 1312 if (!m_needsDisplayUpdate) 1313 return; 1314 FrameView* view = m_frame->view(); 1315 if (!view) 1316 return; 1317 view->scheduleRelayout(); 1318 } 1319 1304 1320 #ifndef NDEBUG 1305 1321 -
trunk/WebCore/editing/SelectionController.h
r52451 r52494 1 1 /* 2 * Copyright (C) 2004 Apple Computer, Inc.All rights reserved.2 * Copyright (C) 2004, 2009 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 125 125 void pageActivationChanged(); 126 126 127 // Selection display machinery 128 void setNeedsDisplayUpdate(bool = true); 129 bool needsDisplayUpdate() const { return m_needsDisplayUpdate; } 130 127 131 #ifndef NDEBUG 128 132 void formatForDebugger(char* buffer, unsigned length) const; … … 175 179 bool m_isCaretBlinkingSuspended : 1; 176 180 bool m_focused : 1; 177 181 bool m_needsDisplayUpdate : 1; 178 182 }; 179 183 -
trunk/WebCore/page/Frame.cpp
r52314 r52494 564 564 clearCaretRectIfNeeded(); 565 565 m_caretVisible = flag; 566 selection LayoutChanged();566 selection()->setNeedsDisplayUpdate(); 567 567 } 568 568 … … 631 631 void Frame::selectionLayoutChanged() 632 632 { 633 selection()->setNeedsDisplayUpdate(false); 634 633 635 bool caretRectChanged = selection()->recomputeCaretRect(); 634 636 -
trunk/WebCore/page/FrameView.cpp
r52314 r52494 1199 1199 || (document && document->childNeedsStyleRecalc()) // can occur when using WebKit ObjC interface 1200 1200 || m_frame->needsReapplyStyles() 1201 || (m_deferSetNeedsLayouts && m_setNeedsLayoutWasDeferred); 1201 || (m_deferSetNeedsLayouts && m_setNeedsLayoutWasDeferred) 1202 || m_frame->selection()->needsDisplayUpdate(); 1202 1203 } 1203 1204
Note: See TracChangeset
for help on using the changeset viewer.