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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutPart.cpp

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: tweaks and docs Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Simon Hausmann <hausmann@kde.org> 3 * (C) 2000 Simon Hausmann <hausmann@kde.org>
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 if (action == HitTestForeground) { 172 if (action == HitTestForeground) {
173 FrameView* childFrameView = toFrameView(widget()); 173 FrameView* childFrameView = toFrameView(widget());
174 LayoutViewItem childRootItem = childFrameView->layoutViewItem(); 174 LayoutViewItem childRootItem = childFrameView->layoutViewItem();
175 175
176 if (visibleToHitTestRequest(result.hitTestRequest()) && 176 if (visibleToHitTestRequest(result.hitTestRequest()) &&
177 !childRootItem.isNull()) { 177 !childRootItem.isNull()) {
178 LayoutPoint adjustedLocation = accumulatedOffset + location(); 178 LayoutPoint adjustedLocation = accumulatedOffset + location();
179 LayoutPoint contentOffset = LayoutPoint(borderLeft() + paddingLeft(), 179 LayoutPoint contentOffset = LayoutPoint(borderLeft() + paddingLeft(),
180 borderTop() + paddingTop()) - 180 borderTop() + paddingTop()) -
181 LayoutSize(childFrameView->scrollOffset()); 181 LayoutSize(childFrameView->scrollOffsetInt());
182 HitTestLocation newHitTestLocation(locationInContainer, 182 HitTestLocation newHitTestLocation(locationInContainer,
183 -adjustedLocation - contentOffset); 183 -adjustedLocation - contentOffset);
184 HitTestRequest newHitTestRequest(result.hitTestRequest().type() | 184 HitTestRequest newHitTestRequest(result.hitTestRequest().type() |
185 HitTestRequest::ChildFrameHitTest); 185 HitTestRequest::ChildFrameHitTest);
186 HitTestResult childFrameResult(newHitTestRequest, newHitTestLocation); 186 HitTestResult childFrameResult(newHitTestRequest, newHitTestLocation);
187 187
188 // The frame's layout and style must be up to date if we reach here. 188 // The frame's layout and style must be up to date if we reach here.
189 bool isInsideChildFrame = 189 bool isInsideChildFrame =
190 childRootItem.hitTestNoLifecycleUpdate(childFrameResult); 190 childRootItem.hitTestNoLifecycleUpdate(childFrameResult);
191 191
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 } 383 }
384 384
385 bool LayoutPart::isThrottledFrameView() const { 385 bool LayoutPart::isThrottledFrameView() const {
386 if (!widget() || !widget()->isFrameView()) 386 if (!widget() || !widget()->isFrameView())
387 return false; 387 return false;
388 const FrameView* frameView = toFrameView(widget()); 388 const FrameView* frameView = toFrameView(widget());
389 return frameView->shouldThrottleRendering(); 389 return frameView->shouldThrottleRendering();
390 } 390 }
391 391
392 } // namespace blink 392 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698