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

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

Issue 1885453002: Rename Node::treeScope() to Node::treeScopeOrDocument() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased 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 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 } 262 }
263 263
264 LayoutUnit LayoutImage::minimumReplacedHeight() const 264 LayoutUnit LayoutImage::minimumReplacedHeight() const
265 { 265 {
266 return m_imageResource->errorOccurred() ? intrinsicSize().height() : LayoutU nit(); 266 return m_imageResource->errorOccurred() ? intrinsicSize().height() : LayoutU nit();
267 } 267 }
268 268
269 HTMLMapElement* LayoutImage::imageMap() const 269 HTMLMapElement* LayoutImage::imageMap() const
270 { 270 {
271 HTMLImageElement* i = isHTMLImageElement(node()) ? toHTMLImageElement(node() ) : 0; 271 HTMLImageElement* i = isHTMLImageElement(node()) ? toHTMLImageElement(node() ) : 0;
272 return i ? i->treeScope().getImageMap(i->fastGetAttribute(usemapAttr)) : 0; 272 return i ? i->treeScopeOrDocument().getImageMap(i->fastGetAttribute(usemapAt tr)) : 0;
273 } 273 }
274 274
275 bool LayoutImage::nodeAtPoint(HitTestResult& result, const HitTestLocation& loca tionInContainer, const LayoutPoint& accumulatedOffset, HitTestAction hitTestActi on) 275 bool LayoutImage::nodeAtPoint(HitTestResult& result, const HitTestLocation& loca tionInContainer, const LayoutPoint& accumulatedOffset, HitTestAction hitTestActi on)
276 { 276 {
277 HitTestResult tempResult(result.hitTestRequest(), result.hitTestLocation()); 277 HitTestResult tempResult(result.hitTestRequest(), result.hitTestLocation());
278 bool inside = LayoutReplaced::nodeAtPoint(tempResult, locationInContainer, a ccumulatedOffset, hitTestAction); 278 bool inside = LayoutReplaced::nodeAtPoint(tempResult, locationInContainer, a ccumulatedOffset, hitTestAction);
279 279
280 if (!inside && result.hitTestRequest().listBased()) 280 if (!inside && result.hitTestRequest().listBased())
281 result.append(tempResult); 281 result.append(tempResult);
282 if (inside) 282 if (inside)
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 return nullptr; 318 return nullptr;
319 319
320 ImageResource* cachedImage = m_imageResource->cachedImage(); 320 ImageResource* cachedImage = m_imageResource->cachedImage();
321 if (cachedImage && cachedImage->getImage() && cachedImage->getImage()->isSVG Image()) 321 if (cachedImage && cachedImage->getImage() && cachedImage->getImage()->isSVG Image())
322 return toSVGImage(cachedImage->getImage())->embeddedReplacedContent(); 322 return toSVGImage(cachedImage->getImage())->embeddedReplacedContent();
323 323
324 return nullptr; 324 return nullptr;
325 } 325 }
326 326
327 } // namespace blink 327 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698