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

Unified Diff: third_party/WebKit/Source/core/layout/HitTestResult.cpp

Issue 1912863002: Fix image map focus ring painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: third_party/WebKit/Source/core/layout/HitTestResult.cpp
diff --git a/third_party/WebKit/Source/core/layout/HitTestResult.cpp b/third_party/WebKit/Source/core/layout/HitTestResult.cpp
index 55fe073747c4225a0a486479843f51e6bec7f6aa..77e8e0ccdd8853347f90626fd84710d35e26b56b 100644
--- a/third_party/WebKit/Source/core/layout/HitTestResult.cpp
+++ b/third_party/WebKit/Source/core/layout/HitTestResult.cpp
@@ -202,13 +202,7 @@ HTMLAreaElement* HitTestResult::imageAreaForImage() const
if (!map)
return nullptr;
- LayoutBox* box = toLayoutBox(imageElement->layoutObject());
- LayoutRect contentBox = box->contentBoxRect();
- float scaleFactor = 1 / box->style()->effectiveZoom();
- LayoutPoint location = localPoint();
- location.scale(scaleFactor, scaleFactor);
-
- return map->areaForPoint(location, contentBox.size());
+ return map->areaForPoint(localPoint(), imageElement->layoutObject());
}
void HitTestResult::setInnerNode(Node* n)
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMapElement.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698