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

Unified Diff: third_party/WebKit/Source/core/svg/SVGSVGElement.cpp

Issue 2390773004: reflow comments in core/svg/ (Closed)
Patch Set: comments (heh!) Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
index 2a8e2ec7a8b1d9c7161297ba78168b6f12b5f16d..64dbddea416c0fa93e3dcc8862438c7954618fe5 100644
--- a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
@@ -306,7 +306,8 @@ void SVGSVGElement::svgAttributeChanged(const QualifiedName& attrName) {
SVGGraphicsElement::svgAttributeChanged(attrName);
}
-// FloatRect::intersects does not consider horizontal or vertical lines (because of isEmpty()).
+// FloatRect::intersects does not consider horizontal or vertical lines (because
+// of isEmpty()).
static bool intersectsAllowingEmpty(const FloatRect& r1, const FloatRect& r2) {
if (r1.width() < 0 || r1.height() < 0 || r2.width() < 0 || r2.height() < 0)
return false;
@@ -315,8 +316,9 @@ static bool intersectsAllowingEmpty(const FloatRect& r1, const FloatRect& r2) {
r2.y() < r1.maxY();
}
-// One of the element types that can cause graphics to be drawn onto the target canvas.
-// Specifically: circle, ellipse, image, line, path, polygon, polyline, rect, text and use.
+// One of the element types that can cause graphics to be drawn onto the target
+// canvas. Specifically: circle, ellipse, image, line, path, polygon, polyline,
+// rect, text and use.
static bool isIntersectionOrEnclosureTarget(LayoutObject* layoutObject) {
return layoutObject->isSVGShape() || layoutObject->isSVGText() ||
layoutObject->isSVGImage() || isSVGUseElement(*layoutObject->node());
@@ -475,10 +477,11 @@ AffineTransform SVGSVGElement::localCoordinateSpaceTransform(
FloatPoint location;
float zoomFactor = 1;
- // At the SVG/HTML boundary (aka LayoutSVGRoot), we apply the localToBorderBoxTransform
- // to map an element from SVG viewport coordinates to CSS box coordinates.
- // LayoutSVGRoot's localToAbsolute method expects CSS box coordinates.
- // We also need to adjust for the zoom level factored into CSS coordinates (bug #96361).
+ // At the SVG/HTML boundary (aka LayoutSVGRoot), we apply the
+ // localToBorderBoxTransform to map an element from SVG viewport
+ // coordinates to CSS box coordinates. LayoutSVGRoot's localToAbsolute
+ // method expects CSS box coordinates. We also need to adjust for the
+ // zoom level factored into CSS coordinates (bug #96361).
if (layoutObject->isSVGRoot()) {
location = toLayoutSVGRoot(layoutObject)
->localToBorderBoxTransform()
@@ -491,8 +494,9 @@ AffineTransform SVGSVGElement::localCoordinateSpaceTransform(
location = layoutObject->localToAbsolute(location, UseTransforms);
location.scale(zoomFactor, zoomFactor);
- // Be careful here! localToBorderBoxTransform() included the x/y offset coming from the viewBoxToViewTransform(),
- // so we have to subtract it here (original cause of bug #27183)
+ // Be careful here! localToBorderBoxTransform() included the x/y offset
+ // coming from the viewBoxToViewTransform(), so we have to subtract it
+ // here (original cause of bug #27183)
transform.translate(location.x() - viewBoxTransform.e(),
location.y() - viewBoxTransform.f());
@@ -535,9 +539,10 @@ Node::InsertionNotificationRequest SVGSVGElement::insertedInto(
if (RuntimeEnabledFeatures::smilEnabled()) {
document().accessSVGExtensions().addTimeContainer(this);
- // Animations are started at the end of document parsing and after firing the load event,
- // but if we miss that train (deferred programmatic element insertion for example) we need
- // to initialize the time container here.
+ // Animations are started at the end of document parsing and after firing
+ // the load event, but if we miss that train (deferred programmatic
+ // element insertion for example) we need to initialize the time container
+ // here.
if (!document().parsing() && !document().processingLoadEvent() &&
document().loadEventFinished() && !timeContainer()->isStarted())
timeContainer()->start();
@@ -775,8 +780,9 @@ void SVGSVGElement::finishParsingChildren() {
if (isOutermostSVGSVGElement())
return;
- // finishParsingChildren() is called when the close tag is reached for an element (e.g. </svg>)
- // we send SVGLoad events here if we can, otherwise they'll be sent when any required loads finish
+ // finishParsingChildren() is called when the close tag is reached for an
+ // element (e.g. </svg>) we send SVGLoad events here if we can, otherwise
+ // they'll be sent when any required loads finish
sendSVGLoadEventIfPossible();
}
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGRect.cpp ('k') | third_party/WebKit/Source/core/svg/SVGStaticStringList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698