Title: [134197] trunk/Source/WebCore
- Revision
- 134197
- Author
- [email protected]
- Date
- 2012-11-12 01:30:17 -0800 (Mon, 12 Nov 2012)
Log Message
Build fix after r134191. Turns out that FrameView::performPostLayoutTasks calls FrameSelection::updateAppearance
in the middle of a layout. So we can't have assertions in recomputeCaretRect and updateAppearance.
Furthermore, we can't update layout in updateAppearance. So do that in its call sites.
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setSelection):
(WebCore::FrameSelection::recomputeCaretRect):
(WebCore::FrameSelection::updateAppearance):
(WebCore::FrameSelection::setCaretVisibility):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (134196 => 134197)
--- trunk/Source/WebCore/ChangeLog 2012-11-12 09:15:13 UTC (rev 134196)
+++ trunk/Source/WebCore/ChangeLog 2012-11-12 09:30:17 UTC (rev 134197)
@@ -1,3 +1,16 @@
+2012-11-12 Ryosuke Niwa <[email protected]>
+
+ Build fix after r134191. Turns out that FrameView::performPostLayoutTasks calls FrameSelection::updateAppearance
+ in the middle of a layout. So we can't have assertions in recomputeCaretRect and updateAppearance.
+
+ Furthermore, we can't update layout in updateAppearance. So do that in its call sites.
+
+ * editing/FrameSelection.cpp:
+ (WebCore::FrameSelection::setSelection):
+ (WebCore::FrameSelection::recomputeCaretRect):
+ (WebCore::FrameSelection::updateAppearance):
+ (WebCore::FrameSelection::setCaretVisibility):
+
2012-11-12 Shinya Kawanaka <[email protected]>
Don't update style when attaching in HTMLMeterElement
Modified: trunk/Source/WebCore/editing/FrameSelection.cpp (134196 => 134197)
--- trunk/Source/WebCore/editing/FrameSelection.cpp 2012-11-12 09:15:13 UTC (rev 134196)
+++ trunk/Source/WebCore/editing/FrameSelection.cpp 2012-11-12 09:30:17 UTC (rev 134197)
@@ -295,8 +295,14 @@
if (!s.isNone() && !(options & DoNotSetFocus))
setFocusedNodeIfNeeded();
- if (!(options & DoNotUpdateAppearance))
+ if (!(options & DoNotUpdateAppearance)) {
+#if ENABLE(TEXT_CARET)
+ m_frame->document()->updateLayoutIgnorePendingStylesheets();
+#else
+ m_frame->document()->updateStyleIfNeeded();
+#endif
updateAppearance();
+ }
// Always clear the x position used for vertical arrow navigation.
// It will be restored by the vertical arrow navigation code if necessary.
@@ -1341,7 +1347,6 @@
FrameView* v = m_frame->document()->view();
if (!v)
return false;
- ASSERT(!v->needsLayout());
LayoutRect oldRect = localCaretRectWithoutUpdate();
LayoutRect newRect = localCaretRect();
@@ -1743,7 +1748,6 @@
void FrameSelection::updateAppearance()
{
#if ENABLE(TEXT_CARET)
- m_frame->document()->updateLayout();
bool caretRectChangedOrCleared = recomputeCaretRect();
bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled();
@@ -1765,9 +1769,6 @@
invalidateCaretRect();
}
}
-#else
- // We need to update style in case the node containing the selection is made display:none.
- m_frame->document()->updateStyleIfNeeded();
#endif
RenderView* view = m_frame->contentRenderer();
@@ -1817,6 +1818,8 @@
invalidateCaretRect();
}
CaretBase::setCaretVisibility(visibility);
+#else
+ m_frame->document()->updateStyleIfNeeded();
#endif
updateAppearance();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes