Commit 10b5fba1 authored by Fredrik Söderquist's avatar Fredrik Söderquist Committed by Commit Bot

Use LayoutRect for frame rect in HitTestResultInFrame

This is consistent with how the frame rect is treated in other cases of
hit-testing (such as LayoutView::HitTestNoLifecycleUpdate). It also
eliminates the need for HitTestLocation::Intersects(const FloatRect&).
(The other "use" of this method is removed since it isn't used.)

Bug: 823796
Change-Id: I7532f0e685e9960d8afd16f9b41d699ae27bfd11
Reviewed-on: https://chromium-review.googlesource.com/1249142
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594795}
parent e83fe916
...@@ -25,8 +25,8 @@ HitTestResult HitTestResultInFrame( ...@@ -25,8 +25,8 @@ HitTestResult HitTestResultInFrame(
if (!frame || !frame->ContentLayoutObject()) if (!frame || !frame->ContentLayoutObject())
return result; return result;
if (frame->View()) { if (LocalFrameView* frame_view = frame->View()) {
FloatRect rect(FloatPoint(), FloatSize(frame->View()->Size())); LayoutRect rect(LayoutPoint(), LayoutSize(frame_view->Size()));
if (!location.Intersects(rect)) if (!location.Intersects(rect))
return result; return result;
} }
......
...@@ -955,12 +955,6 @@ class HitTestCulledInlinesGeneratorContext { ...@@ -955,12 +955,6 @@ class HitTestCulledInlinesGeneratorContext {
HitTestCulledInlinesGeneratorContext(Region& region, HitTestCulledInlinesGeneratorContext(Region& region,
const HitTestLocation& location) const HitTestLocation& location)
: intersected_(false), region_(region), location_(location) {} : intersected_(false), region_(region), location_(location) {}
void operator()(const FloatRect& rect) {
if (location_.Intersects(rect)) {
intersected_ = true;
region_.Unite(EnclosingIntRect(rect));
}
}
void operator()(const LayoutRect& rect) { void operator()(const LayoutRect& rect) {
if (location_.Intersects(rect)) { if (location_.Intersects(rect)) {
intersected_ = true; intersected_ = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment