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

Side by Side Diff: third_party/WebKit/WebCore/rendering/RenderSVGViewportContainer.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 Rob Buis <buis@kde.org> 3 2004, 2005, 2007 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 { 152 {
153 if (!viewport().isEmpty() 153 if (!viewport().isEmpty()
154 && style()->overflowX() == OHIDDEN 154 && style()->overflowX() == OHIDDEN
155 && style()->overflowY() == OHIDDEN) { 155 && style()->overflowY() == OHIDDEN) {
156 // Check if we need to do anything at all. 156 // Check if we need to do anything at all.
157 IntRect overflowBox = IntRect(0, 0, width(), height()); 157 IntRect overflowBox = IntRect(0, 0, width(), height());
158 overflowBox.move(_tx, _ty); 158 overflowBox.move(_tx, _ty);
159 TransformationMatrix ctm = RenderObject::absoluteTransform(); 159 TransformationMatrix ctm = RenderObject::absoluteTransform();
160 ctm.translate(viewport().x(), viewport().y()); 160 ctm.translate(viewport().x(), viewport().y());
161 double localX, localY; 161 double localX, localY;
162 ctm.inverse().map(_x - _tx, _y - _ty, &localX, &localY); 162 ctm.inverse().map(_x - _tx, _y - _ty, localX, localY);
163 if (!overflowBox.contains((int)localX, (int)localY)) 163 if (!overflowBox.contains((int)localX, (int)localY))
164 return false; 164 return false;
165 } 165 }
166 166
167 int sx = 0; 167 int sx = 0;
168 int sy = 0; 168 int sy = 0;
169 169
170 // Respect parent translation offset for non-outermost <svg> elements. 170 // Respect parent translation offset for non-outermost <svg> elements.
171 // Outermost <svg> element is handled by RenderSVGRoot. 171 // Outermost <svg> element is handled by RenderSVGRoot.
172 if (element()->hasTagName(SVGNames::svgTag)) { 172 if (element()->hasTagName(SVGNames::svgTag)) {
(...skipping 11 matching lines...) Expand all
184 // Spec: Only graphical elements can be targeted by the mouse, period. 184 // Spec: Only graphical elements can be targeted by the mouse, period.
185 // 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." 185 // 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."
186 return false; 186 return false;
187 } 187 }
188 188
189 } 189 }
190 190
191 #endif // ENABLE(SVG) 191 #endif // ENABLE(SVG)
192 192
193 // vim:ts=4:noet 193 // vim:ts=4:noet
OLDNEW
« no previous file with comments | « third_party/WebKit/WebCore/rendering/RenderSVGTextPath.cpp ('k') | third_party/WebKit/WebCore/rendering/RenderText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698