| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |