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

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

Issue 24253004: Cleanup: Start using toFoo methods as part of newly adopted coding guideline. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
« no previous file with comments | « Source/core/inspector/InspectorCSSAgent.cpp ('k') | Source/core/rendering/RenderMenuList.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) 2006, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 return String(); 254 return String();
255 } 255 }
256 256
257 Image* HitTestResult::image() const 257 Image* HitTestResult::image() const
258 { 258 {
259 if (!m_innerNonSharedNode) 259 if (!m_innerNonSharedNode)
260 return 0; 260 return 0;
261 261
262 RenderObject* renderer = m_innerNonSharedNode->renderer(); 262 RenderObject* renderer = m_innerNonSharedNode->renderer();
263 if (renderer && renderer->isImage()) { 263 if (renderer && renderer->isImage()) {
264 RenderImage* image = static_cast<WebCore::RenderImage*>(renderer); 264 RenderImage* image = toRenderImage(renderer);
265 if (image->cachedImage() && !image->cachedImage()->errorOccurred()) 265 if (image->cachedImage() && !image->cachedImage()->errorOccurred())
266 return image->cachedImage()->imageForRenderer(image); 266 return image->cachedImage()->imageForRenderer(image);
267 } 267 }
268 268
269 return 0; 269 return 0;
270 } 270 }
271 271
272 IntRect HitTestResult::imageRect() const 272 IntRect HitTestResult::imageRect() const
273 { 273 {
274 if (!image()) 274 if (!image())
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 Element* HitTestResult::innerElement() const 486 Element* HitTestResult::innerElement() const
487 { 487 {
488 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa rent(node)) 488 for (Node* node = m_innerNode.get(); node; node = NodeRenderingTraversal::pa rent(node))
489 if (node->isElementNode()) 489 if (node->isElementNode())
490 return toElement(node); 490 return toElement(node);
491 491
492 return 0; 492 return 0;
493 } 493 }
494 494
495 } // namespace WebCore 495 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorCSSAgent.cpp ('k') | Source/core/rendering/RenderMenuList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698