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

Side by Side Diff: third_party/WebKit/WebCore/rendering/RenderSVGImage.cpp

Issue 21184: WebKit merge 40722:40785 (part 1) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 10 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
OLDNEW
1 /* 1 /*
2 Copyright (C) 2006 Alexander Kellett <lypanov@kde.org> 2 Copyright (C) 2006 Alexander Kellett <lypanov@kde.org>
3 Copyright (C) 2006 Apple Computer, Inc. 3 Copyright (C) 2006 Apple Computer, Inc.
4 Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 4 Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
5 Copyright (C) 2007, 2008 Rob Buis <buis@kde.org> 5 Copyright (C) 2007, 2008 Rob Buis <buis@kde.org>
6 6
7 This file is part of the WebKit project 7 This file is part of the WebKit project
8 8
9 This library is free software; you can redistribute it and/or 9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public 10 modify it under the terms of the GNU Library General Public
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 { 191 {
192 // We only draw in the forground phase, so we only hit-test then. 192 // We only draw in the forground phase, so we only hit-test then.
193 if (hitTestAction != HitTestForeground) 193 if (hitTestAction != HitTestForeground)
194 return false; 194 return false;
195 195
196 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_IMAGE_HITTESTING, style()->pointerEvents()); 196 PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_IMAGE_HITTESTING, style()->pointerEvents());
197 197
198 bool isVisible = (style()->visibility() == VISIBLE); 198 bool isVisible = (style()->visibility() == VISIBLE);
199 if (isVisible || !hitRules.requireVisible) { 199 if (isVisible || !hitRules.requireVisible) {
200 double localX, localY; 200 double localX, localY;
201 absoluteTransform().inverse().map(_x, _y, &localX, &localY); 201 absoluteTransform().inverse().map(_x, _y, localX, localY);
202 202
203 if (hitRules.canHitFill) { 203 if (hitRules.canHitFill) {
204 if (m_localBounds.contains(narrowPrecisionToFloat(localX), narrowPre cisionToFloat(localY))) { 204 if (m_localBounds.contains(narrowPrecisionToFloat(localX), narrowPre cisionToFloat(localY))) {
205 updateHitTestResult(result, IntPoint(_x, _y)); 205 updateHitTestResult(result, IntPoint(_x, _y));
206 return true; 206 return true;
207 } 207 }
208 } 208 }
209 } 209 }
210 210
211 return false; 211 return false;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 } 261 }
262 262
263 void RenderSVGImage::absoluteQuads(Vector<FloatQuad>& quads, bool) 263 void RenderSVGImage::absoluteQuads(Vector<FloatQuad>& quads, bool)
264 { 264 {
265 quads.append(FloatRect(absoluteClippedOverflowRect())); 265 quads.append(FloatRect(absoluteClippedOverflowRect()));
266 } 266 }
267 267
268 } 268 }
269 269
270 #endif // ENABLE(SVG) 270 #endif // ENABLE(SVG)
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/rendering/RenderPath.cpp ('k') | third_party/WebKit/WebCore/rendering/RenderSVGRoot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698