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

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

Issue 23890025: WIP (Introduce WTF::NonNullPtr<T>.) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/Frame.cpp ('k') | Source/core/rendering/RenderLayerCompositor.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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 } 533 }
534 534
535 LayoutUnit RenderImage::minimumReplacedHeight() const 535 LayoutUnit RenderImage::minimumReplacedHeight() const
536 { 536 {
537 return m_imageResource->errorOccurred() ? intrinsicSize().height() : LayoutU nit(); 537 return m_imageResource->errorOccurred() ? intrinsicSize().height() : LayoutU nit();
538 } 538 }
539 539
540 HTMLMapElement* RenderImage::imageMap() const 540 HTMLMapElement* RenderImage::imageMap() const
541 { 541 {
542 HTMLImageElement* i = node() && node()->hasTagName(imgTag) ? toHTMLImageElem ent(node()) : 0; 542 HTMLImageElement* i = node() && node()->hasTagName(imgTag) ? toHTMLImageElem ent(node()) : 0;
543 return i ? i->treeScope().getImageMap(i->fastGetAttribute(usemapAttr)) : 0; 543 return i ? i->treeScope()->getImageMap(i->fastGetAttribute(usemapAttr)) : 0;
544 } 544 }
545 545
546 bool RenderImage::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu lt, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOf fset, HitTestAction hitTestAction) 546 bool RenderImage::nodeAtPoint(const HitTestRequest& request, HitTestResult& resu lt, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOf fset, HitTestAction hitTestAction)
547 { 547 {
548 HitTestResult tempResult(result.hitTestLocation()); 548 HitTestResult tempResult(result.hitTestLocation());
549 bool inside = RenderReplaced::nodeAtPoint(request, tempResult, locationInCon tainer, accumulatedOffset, hitTestAction); 549 bool inside = RenderReplaced::nodeAtPoint(request, tempResult, locationInCon tainer, accumulatedOffset, hitTestAction);
550 550
551 if (tempResult.innerNode() && node()) { 551 if (tempResult.innerNode() && node()) {
552 if (HTMLMapElement* map = imageMap()) { 552 if (HTMLMapElement* map = imageMap()) {
553 LayoutRect contentBox = contentBoxRect(); 553 LayoutRect contentBox = contentBoxRect();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 return 0; 617 return 0;
618 618
619 ImageResource* cachedImage = m_imageResource->cachedImage(); 619 ImageResource* cachedImage = m_imageResource->cachedImage();
620 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage( )) 620 if (cachedImage && cachedImage->image() && cachedImage->image()->isSVGImage( ))
621 return toSVGImage(cachedImage->image())->embeddedContentBox(); 621 return toSVGImage(cachedImage->image())->embeddedContentBox();
622 622
623 return 0; 623 return 0;
624 } 624 }
625 625
626 } // namespace WebCore 626 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/Frame.cpp ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698