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

Unified Diff: Source/core/layout/LayoutImage.cpp

Issue 1094133004: Image maps should work for images with alt content (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 5 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
« no previous file with comments | « Source/core/layout/LayoutBlock.cpp ('k') | Source/core/layout/LayoutInline.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutImage.cpp
diff --git a/Source/core/layout/LayoutImage.cpp b/Source/core/layout/LayoutImage.cpp
index 3a3c78870c52ef30f1d5e702a555d0beee5b1501..e05c0c1477343c532f557144b45260cfbe754f40 100644
--- a/Source/core/layout/LayoutImage.cpp
+++ b/Source/core/layout/LayoutImage.cpp
@@ -296,20 +296,6 @@ bool LayoutImage::nodeAtPoint(HitTestResult& result, const HitTestLocation& loca
HitTestResult tempResult(result.hitTestRequest(), result.hitTestLocation());
bool inside = LayoutReplaced::nodeAtPoint(tempResult, locationInContainer, accumulatedOffset, hitTestAction);
- if (tempResult.innerNode() && node()) {
- if (HTMLMapElement* map = imageMap()) {
- LayoutRect contentBox = contentBoxRect();
- float scaleFactor = 1 / style()->effectiveZoom();
- LayoutPoint location = locationInContainer.point() - toLayoutSize(accumulatedOffset) - locationOffset() - toLayoutSize(contentBox.location());
- location.scale(scaleFactor, scaleFactor);
-
- if (HTMLAreaElement* area = map->areaForPoint(location, contentBox.size())) {
- tempResult.setInnerNode(area);
- tempResult.setURLElement(area);
- }
- }
- }
-
if (!inside && result.hitTestRequest().listBased())
result.append(tempResult);
if (inside)
« no previous file with comments | « Source/core/layout/LayoutBlock.cpp ('k') | Source/core/layout/LayoutInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698