Use WebKit implementation of accessible scrolling methods.
All of the tricky logic needed to implement accessible scrolling
is now implemented in WebKit and extensively tested there. This change
deletes the Chromium implementation of these methods and replaces
it with pretty straightforward calls to the WebKit methods.
BUG=104468
TEST=Manual testing with accProbe
Review URL: https://chromiumcodereview.appspot.com/9226038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118939 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/accessibility/browser_accessibility.h b/content/browser/accessibility/browser_accessibility.h
index 26763ca..d0317f37d 100644
--- a/content/browser/accessibility/browser_accessibility.h
+++ b/content/browser/accessibility/browser_accessibility.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -103,53 +103,6 @@
// (in global screen coordinates).
BrowserAccessibility* BrowserAccessibilityForPoint(const gfx::Point& point);
- // Scrolls this element so that the |focus| rect (in local coordinates
- // relative to this element) is scrolled to fit within the given
- // |viewport| (which is clipped to the actual bounds of this
- // object if you specify something larger). If the whole focus area
- // doesn't fit, you can specify |subfocus|, which will prioritize
- // a smaller area within |focus|.
- //
- // Note that "focus" doesn't necessarily mean the rectangle must correspond
- // to a focused element on the page; assistive technology might request
- // that any object be made visible.
- void ScrollToMakeVisible(const gfx::Rect& subfocus,
- const gfx::Rect& focus,
- const gfx::Rect& viewport);
-
- // This is a 1-dimensional scroll offset helper function that's applied
- // separately in the horizontal and vertical directions, because the
- // logic is the same. The goal is to compute the best scroll offset
- // in order to make a focused item visible within a viewport.
- //
- // In case the whole focused item cannot fit, you can specify a
- // subfocus - a smaller region within the focus that should
- // be prioritized. If the whole focused item can fit, the subfocus is
- // ignored.
- //
- // Example: the viewport is scrolled to the right just enough
- // that the focus is in view.
- // Before:
- // +----------Viewport---------+
- // +----Focus---+
- // +--SubFocus--+
- //
- // After:
- // +----------Viewport---------+
- // +----Focus---+
- // +--SubFocus--+
- //
- // When constraints cannot be fully satisfied, the min
- // (left/top) position takes precedence over the max (right/bottom).
- //
- // Note that the return value represents the ideal new scroll offset.
- // This may be out of range - the calling function should clip this
- // to the available range.
- static int ComputeBestScrollOffset(int current_scroll_offset,
- int subfocus_min, int subfocus_max,
- int focus_min, int focus_max,
- int viewport_min, int viewport_max);
-
//
// Reference counting
//