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

Unified Diff: Source/core/dom/Element.cpp

Issue 416403013: Remove Element.scrollByLines() and Element.scrollByPages() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | « Source/core/dom/Element.h ('k') | Source/core/dom/Element.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index e8a1a598f7eb8bfb67a847de39e337722029ec65..a4f560a5369b90761fc6be7ba6586dfab6dd73b8 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -470,34 +470,6 @@ void Element::scrollIntoViewIfNeeded(bool centerIfNeeded)
renderer()->scrollRectToVisible(bounds, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignToEdgeIfNeeded);
}
-void Element::scrollByUnits(int units, ScrollGranularity granularity)
-{
- document().updateLayoutIgnorePendingStylesheets();
-
- if (!renderer())
- return;
-
- if (!renderer()->hasOverflowClip())
- return;
-
- ScrollDirection direction = ScrollDown;
- if (units < 0) {
- direction = ScrollUp;
- units = -units;
- }
- toRenderBox(renderer())->scroll(direction, granularity, units);
-}
-
-void Element::scrollByLines(int lines)
-{
- scrollByUnits(lines, ScrollByLine);
-}
-
-void Element::scrollByPages(int pages)
-{
- scrollByUnits(pages, ScrollByPage);
-}
-
static float localZoomForRenderer(RenderObject& renderer)
{
// FIXME: This does the wrong thing if two opposing zooms are in effect and canceled each
« no previous file with comments | « Source/core/dom/Element.h ('k') | Source/core/dom/Element.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698