Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: sky/engine/core/editing/FrameSelection.cpp

Issue 865383003: Consolidate callers to scheduleVisualUpdate. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/editing/FrameSelection.h ('k') | sky/engine/core/editing/InputMethodController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/editing/FrameSelection.cpp
diff --git a/sky/engine/core/editing/FrameSelection.cpp b/sky/engine/core/editing/FrameSelection.cpp
index 46634369bb0b774a17f72afc46a3506af587c3f1..33dc6de3b588a44c31d2816bdb3638fa84a47503 100644
--- a/sky/engine/core/editing/FrameSelection.cpp
+++ b/sky/engine/core/editing/FrameSelection.cpp
@@ -273,7 +273,7 @@ void FrameSelection::setSelection(const VisibleSelection& newSelection, SetSelec
}
notifyAccessibilityForSelectionChange();
- notifyCompositorForSelectionChange();
+
m_frame->domWindow()->enqueueDocumentEvent(Event::create(EventTypeNames::selectionchange));
}
@@ -1317,14 +1317,6 @@ void FrameSelection::notifyAccessibilityForSelectionChange()
{
}
-void FrameSelection::notifyCompositorForSelectionChange()
-{
- if (!RuntimeEnabledFeatures::compositedSelectionUpdatesEnabled())
- return;
-
- scheduleVisualUpdate();
-}
-
void FrameSelection::focusedOrActiveStateChanged()
{
bool activeAndFocused = isFocusedAndActive();
@@ -1635,15 +1627,8 @@ void FrameSelection::showTreeForThis() const
void FrameSelection::setCaretRectNeedsUpdate()
{
- scheduleVisualUpdate();
-}
-
-void FrameSelection::scheduleVisualUpdate() const
-{
- if (!m_frame)
- return;
- if (Page* page = m_frame->page())
- page->animator().scheduleVisualUpdate();
+ if (m_frame)
+ m_frame->document()->scheduleVisualUpdate();
}
}
« no previous file with comments | « sky/engine/core/editing/FrameSelection.h ('k') | sky/engine/core/editing/InputMethodController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698