Changeset 183969 in webkit
- Timestamp:
- May 7, 2015, 6:23:49 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
WebProcess/WebPage/WebPage.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r183961 r183969 1 2015-05-07 Chris Dumez <cdumez@apple.com> 2 3 ASSERTION when pasting text into the WebInspector console 4 https://bugs.webkit.org/show_bug.cgi?id=144774 5 6 Reviewed by Ryosuke Niwa. 7 8 Fix assertion in didChangeSelection() meant to check that calling 9 editorState() does not cause a synchronous layout. The assertion 10 was not correct as it was relying on FrameView::needsLayout() and 11 we would hit it if calling editorState() would schedule a layout. 12 Instead, the new assertion relies on FrameView::layoutCount(), 13 which is more accurate. 14 15 * WebProcess/WebPage/WebPage.cpp: 16 (WebKit::WebPage::didChangeSelection): 17 1 18 2015-05-07 Andreas Kling <akling@apple.com> 2 19 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r183841 r183969 4419 4419 Frame& frame = m_page->focusController().focusedOrMainFrame(); 4420 4420 FrameView* view = frame.view(); 4421 bool needsLayout = view && view->needsLayout(); 4421 #if PLATFORM(COCOA) && !defined(NDEBUG) 4422 int layoutCount = view ? view->layoutCount() : 0; 4423 #endif 4422 4424 4423 4425 // If there is a layout pending, we should avoid populating EditorState that require layout to be done or it will 4424 4426 // trigger a synchronous layout every time the selection changes. sendPostLayoutEditorStateIfNeeded() will be called 4425 4427 // to send the full editor state after layout is done if we send a partial editor state here. 4426 auto editorState = this->editorState(needsLayout ? IncludePostLayoutDataHint::No : IncludePostLayoutDataHint::Yes); 4427 #if PLATFORM(COCOA) 4428 ASSERT_WITH_MESSAGE(needsLayout == (view && view->needsLayout()), "Calling editorState() should not cause a synchronous layout."); 4428 auto editorState = this->editorState(view && view->needsLayout() ? IncludePostLayoutDataHint::No : IncludePostLayoutDataHint::Yes); 4429 #if PLATFORM(COCOA) && !defined(NDEBUG) 4430 if (view) 4431 ASSERT_WITH_MESSAGE(layoutCount == view->layoutCount(), "Calling editorState() should not cause a synchronous layout."); 4429 4432 #endif 4430 4433 m_isEditorStateMissingPostLayoutData = editorState.isMissingPostLayoutData;
Note:
See TracChangeset
for help on using the changeset viewer.