| Index: third_party/WebKit/Source/web/RotationViewportAnchor.cpp
|
| diff --git a/third_party/WebKit/Source/web/RotationViewportAnchor.cpp b/third_party/WebKit/Source/web/RotationViewportAnchor.cpp
|
| index 8449f57ef22bbad0da6908cd81ad64ea14423531..36c7d14e18c5c86ff625c92d543b6629ce189911 100644
|
| --- a/third_party/WebKit/Source/web/RotationViewportAnchor.cpp
|
| +++ b/third_party/WebKit/Source/web/RotationViewportAnchor.cpp
|
| @@ -21,12 +21,6 @@ namespace {
|
| static const float viewportAnchorRelativeEpsilon = 0.1f;
|
| static const int viewportToNodeMaxRelativeArea = 2;
|
|
|
| -template <typename RectType>
|
| -int area(const RectType& rect)
|
| -{
|
| - return rect.width() * rect.height();
|
| -}
|
| -
|
| Node* findNonEmptyAnchorNode(const IntPoint& point, const IntRect& viewRect, EventHandler& eventHandler)
|
| {
|
| Node* node = eventHandler.hitTestResultAtPoint(point, HitTestRequest::ReadOnly | HitTestRequest::Active).innerNode();
|
| @@ -34,8 +28,8 @@ Node* findNonEmptyAnchorNode(const IntPoint& point, const IntRect& viewRect, Eve
|
| // If the node bounding box is sufficiently large, make a single attempt to
|
| // find a smaller node; the larger the node bounds, the greater the
|
| // variability under resize.
|
| - const int maxNodeArea = area(viewRect) * viewportToNodeMaxRelativeArea;
|
| - if (node && area(node->boundingBox()) > maxNodeArea) {
|
| + const int maxNodeArea = viewRect.width() * viewRect.height() * viewportToNodeMaxRelativeArea;
|
| + if (node && node->boundingBox().width() * node->boundingBox().height() > maxNodeArea) {
|
| IntSize pointOffset = viewRect.size();
|
| pointOffset.scale(viewportAnchorRelativeEpsilon);
|
| node = eventHandler.hitTestResultAtPoint(point + pointOffset, HitTestRequest::ReadOnly | HitTestRequest::Active).innerNode();
|
|
|