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

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

Issue 878303002: Remove more scrolling code from Sky (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/Editor.cpp ('k') | sky/engine/core/editing/FrameSelection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/editing/EditorCommand.cpp
diff --git a/sky/engine/core/editing/EditorCommand.cpp b/sky/engine/core/editing/EditorCommand.cpp
index 0d1270c7445e7d5ffd84092ecd922966d827c889..c0194e1b4d291edee7b3d924a5c5f89f57355354 100644
--- a/sky/engine/core/editing/EditorCommand.cpp
+++ b/sky/engine/core/editing/EditorCommand.cpp
@@ -101,7 +101,7 @@ static unsigned verticalScrollDistance(LocalFrame& frame)
RenderStyle* style = renderBox.style();
if (!style)
return 0;
- if (!(style->overflowY() == OSCROLL || style->overflowY() == OAUTO || focusedElement->hasEditableStyle()))
+ if (!focusedElement->hasEditableStyle())
return 0;
int height = std::min<int>(renderBox.clientHeight(),
frame.view()->height());
@@ -556,13 +556,6 @@ bool Editor::executeCommand(const String& commandName)
bool Editor::executeCommand(const String& commandName, const String& value)
{
- // moveToBeginningOfDocument and moveToEndfDocument are only handled by WebKit for editable nodes.
- if (!canEdit() && commandName == "moveToBeginningOfDocument")
- return m_frame.eventHandler().bubblingScroll(ScrollUp, ScrollByDocument);
-
- if (!canEdit() && commandName == "moveToEndOfDocument")
- return m_frame.eventHandler().bubblingScroll(ScrollDown, ScrollByDocument);
-
if (commandName == "showGuessPanel") {
spellChecker().showSpellingGuessPanel();
return true;
« no previous file with comments | « sky/engine/core/editing/Editor.cpp ('k') | sky/engine/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698