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

Side by Side Diff: Source/core/layout/LayoutImage.cpp

Issue 1177123003: Revert "Implement a Hit Test Cache for same point hits." (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « Source/core/layout/HitTestResult.cpp ('k') | Source/core/layout/LayoutPart.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2006 Allan Sandfeld Jensen (kde@carewolf.com)
6 * (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 6 * (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. 9 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved.
10 * 10 *
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 267
268 HTMLMapElement* LayoutImage::imageMap() const 268 HTMLMapElement* LayoutImage::imageMap() const
269 { 269 {
270 HTMLImageElement* i = isHTMLImageElement(node()) ? toHTMLImageElement(node() ) : 0; 270 HTMLImageElement* i = isHTMLImageElement(node()) ? toHTMLImageElement(node() ) : 0;
271 return i ? i->treeScope().getImageMap(i->fastGetAttribute(usemapAttr)) : 0; 271 return i ? i->treeScope().getImageMap(i->fastGetAttribute(usemapAttr)) : 0;
272 } 272 }
273 273
274 bool LayoutImage::nodeAtPoint(HitTestResult& result, const HitTestLocation& loca tionInContainer, const LayoutPoint& accumulatedOffset, HitTestAction hitTestActi on) 274 bool LayoutImage::nodeAtPoint(HitTestResult& result, const HitTestLocation& loca tionInContainer, const LayoutPoint& accumulatedOffset, HitTestAction hitTestActi on)
275 { 275 {
276 HitTestResult tempResult(result.hitTestRequest(), result.hitTestLocation()); 276 HitTestResult tempResult(result.hitTestRequest(), result.hitTestLocation());
277 tempResult.setValidityRect(result.validityRect());
278 bool inside = LayoutReplaced::nodeAtPoint(tempResult, locationInContainer, a ccumulatedOffset, hitTestAction); 277 bool inside = LayoutReplaced::nodeAtPoint(tempResult, locationInContainer, a ccumulatedOffset, hitTestAction);
279 278
280 if (!inside && result.hitTestRequest().listBased()) 279 if (!inside && result.hitTestRequest().listBased())
281 result.append(tempResult); 280 result.append(tempResult);
282 if (inside) 281 if (inside)
283 result = tempResult; 282 result = tempResult;
284 return inside; 283 return inside;
285 } 284 }
286 285
287 void LayoutImage::layout() 286 void LayoutImage::layout()
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 return nullptr; 353 return nullptr;
355 354
356 ImageResource* cachedImage = m_imageResource->cachedImage(); 355 ImageResource* cachedImage = m_imageResource->cachedImage();
357 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage( )) 356 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage( ))
358 return toSVGImage(cachedImage->image())->embeddedContentBox(); 357 return toSVGImage(cachedImage->image())->embeddedContentBox();
359 358
360 return nullptr; 359 return nullptr;
361 } 360 }
362 361
363 } // namespace blink 362 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/HitTestResult.cpp ('k') | Source/core/layout/LayoutPart.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698