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

Side by Side Diff: third_party/WebKit/WebCore/rendering/RenderSVGRoot.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) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org> 3 2004, 2005, 2007, 2008, 2009 Rob Buis <buis@kde.org>
4 2007 Eric Seidel <eric@webkit.org> 4 2007 Eric Seidel <eric@webkit.org>
5 5
6 This file is part of the KDE project 6 This file is part of the KDE project
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 && style()->overflowX() == OHIDDEN 305 && style()->overflowX() == OHIDDEN
306 && style()->overflowY() == OHIDDEN) { 306 && style()->overflowY() == OHIDDEN) {
307 int tx = x() - _tx + sx; 307 int tx = x() - _tx + sx;
308 int ty = y() - _ty + sy; 308 int ty = y() - _ty + sy;
309 309
310 // Check if we need to do anything at all. 310 // Check if we need to do anything at all.
311 IntRect overflowBox = overflowRect(false); 311 IntRect overflowBox = overflowRect(false);
312 overflowBox.move(tx, ty); 312 overflowBox.move(tx, ty);
313 ctm.translate(viewport().x(), viewport().y()); 313 ctm.translate(viewport().x(), viewport().y());
314 double localX, localY; 314 double localX, localY;
315 ctm.inverse().map(_x - _tx, _y - _ty, &localX, &localY); 315 ctm.inverse().map(_x - _tx, _y - _ty, localX, localY);
316 if (!overflowBox.contains((int)localX, (int)localY)) 316 if (!overflowBox.contains((int)localX, (int)localY))
317 return false; 317 return false;
318 } 318 }
319 319
320 for (RenderObject* child = lastChild(); child; child = child->previousSiblin g()) { 320 for (RenderObject* child = lastChild(); child; child = child->previousSiblin g()) {
321 if (child->nodeAtPoint(request, result, _x - sx, _y - sy, 0, 0, hitTestA ction)) { 321 if (child->nodeAtPoint(request, result, _x - sx, _y - sy, 0, 0, hitTestA ction)) {
322 updateHitTestResult(result, IntPoint(_x - _tx, _y - _ty)); 322 updateHitTestResult(result, IntPoint(_x - _tx, _y - _ty));
323 return true; 323 return true;
324 } 324 }
325 } 325 }
326 326
327 // Spec: Only graphical elements can be targeted by the mouse, period. 327 // Spec: Only graphical elements can be targeted by the mouse, period.
328 // 16.4: "If there are no graphics elements whose relevant graphics content is under the pointer (i.e., there is no target element), the event is not dispat ched." 328 // 16.4: "If there are no graphics elements whose relevant graphics content is under the pointer (i.e., there is no target element), the event is not dispat ched."
329 return false; 329 return false;
330 } 330 }
331 331
332 void RenderSVGRoot::position(InlineBox* box) 332 void RenderSVGRoot::position(InlineBox* box)
333 { 333 {
334 RenderBox::position(box); 334 RenderBox::position(box);
335 if (m_absoluteBounds.isEmpty()) 335 if (m_absoluteBounds.isEmpty())
336 setNeedsLayout(true, false); 336 setNeedsLayout(true, false);
337 } 337 }
338 338
339 } 339 }
340 340
341 #endif // ENABLE(SVG) 341 #endif // ENABLE(SVG)
342 342
343 // vim:ts=4:noet 343 // vim:ts=4:noet
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/rendering/RenderSVGImage.cpp ('k') | third_party/WebKit/WebCore/rendering/RenderSVGTSpan.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698