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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGGeometryElement.cpp

Issue 2738863002: Replace ASSERT with DCHECK in core/svg/ (Closed)
Patch Set: Split DCHECKS wherever possible Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Samsung Electronics. All rights reserved. 2 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 layoutObject()->style()->pointerEvents()); 104 layoutObject()->style()->pointerEvents());
105 hitRules.canHitFill = false; 105 hitRules.canHitFill = false;
106 return toLayoutSVGShape(layoutObject()) 106 return toLayoutSVGShape(layoutObject())
107 ->nodeAtFloatPointInternal(request, point->target()->value(), hitRules); 107 ->nodeAtFloatPointInternal(request, point->target()->value(), hitRules);
108 } 108 }
109 109
110 void SVGGeometryElement::toClipPath(Path& path) const { 110 void SVGGeometryElement::toClipPath(Path& path) const {
111 path = asPath(); 111 path = asPath();
112 path.transform(calculateTransform(SVGElement::IncludeMotionTransform)); 112 path.transform(calculateTransform(SVGElement::IncludeMotionTransform));
113 113
114 ASSERT(layoutObject()); 114 DCHECK(layoutObject());
115 ASSERT(layoutObject()->style()); 115 DCHECK(layoutObject()->style());
116 path.setWindRule(layoutObject()->style()->svgStyle().clipRule()); 116 path.setWindRule(layoutObject()->style()->svgStyle().clipRule());
117 } 117 }
118 118
119 float SVGGeometryElement::getTotalLength() { 119 float SVGGeometryElement::getTotalLength() {
120 document().updateStyleAndLayoutIgnorePendingStylesheets(); 120 document().updateStyleAndLayoutIgnorePendingStylesheets();
121 121
122 if (!layoutObject()) 122 if (!layoutObject())
123 return 0; 123 return 0;
124 return asPath().length(); 124 return asPath().length();
125 } 125 }
(...skipping 26 matching lines...) Expand all
152 return 1; 152 return 1;
153 return computedPathLength / authorPathLength; 153 return computedPathLength / authorPathLength;
154 } 154 }
155 155
156 LayoutObject* SVGGeometryElement::createLayoutObject(const ComputedStyle&) { 156 LayoutObject* SVGGeometryElement::createLayoutObject(const ComputedStyle&) {
157 // By default, any subclass is expected to do path-based drawing. 157 // By default, any subclass is expected to do path-based drawing.
158 return new LayoutSVGPath(this); 158 return new LayoutSVGPath(this);
159 } 159 }
160 160
161 } // namespace blink 161 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGFETileElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGInteger.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698