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

Side by Side Diff: Source/core/rendering/RenderImage.cpp

Issue 869813003: Implement elementsFromPoint (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix typeo Created 5 years, 11 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) 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 LayoutRect contentBox = contentBoxRect(); 304 LayoutRect contentBox = contentBoxRect();
305 float scaleFactor = 1 / style()->effectiveZoom(); 305 float scaleFactor = 1 / style()->effectiveZoom();
306 LayoutPoint mapLocation = locationInContainer.point() - toLayoutSize (accumulatedOffset) - locationOffset() - toLayoutSize(contentBox.location()); 306 LayoutPoint mapLocation = locationInContainer.point() - toLayoutSize (accumulatedOffset) - locationOffset() - toLayoutSize(contentBox.location());
307 mapLocation.scale(scaleFactor, scaleFactor); 307 mapLocation.scale(scaleFactor, scaleFactor);
308 308
309 if (map->mapMouseEvent(mapLocation, contentBox.size(), tempResult)) 309 if (map->mapMouseEvent(mapLocation, contentBox.size(), tempResult))
310 tempResult.setInnerNonSharedNode(node()); 310 tempResult.setInnerNonSharedNode(node());
311 } 311 }
312 } 312 }
313 313
314 if (!inside && result.isRectBasedTest()) 314 ASSERT(!result.isRectBasedTest() || request.listBased());
315 if (!inside && request.listBased())
315 result.append(tempResult); 316 result.append(tempResult);
316 if (inside) 317 if (inside)
317 result = tempResult; 318 result = tempResult;
318 return inside; 319 return inside;
319 } 320 }
320 321
321 void RenderImage::layout() 322 void RenderImage::layout()
322 { 323 {
323 RenderReplaced::layout(); 324 RenderReplaced::layout();
324 updateInnerContentRect(); 325 updateInnerContentRect();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 return 0; 389 return 0;
389 390
390 ImageResource* cachedImage = m_imageResource->cachedImage(); 391 ImageResource* cachedImage = m_imageResource->cachedImage();
391 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage( )) 392 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage( ))
392 return toSVGImage(cachedImage->image())->embeddedContentBox(); 393 return toSVGImage(cachedImage->image())->embeddedContentBox();
393 394
394 return 0; 395 return 0;
395 } 396 }
396 397
397 } // namespace blink 398 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698