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

Side by Side Diff: third_party/WebKit/Source/core/style/SVGComputedStyle.h

Issue 2312713002: Unprefix -webkit-clip-path (Closed)
Patch Set: Baselines Created 4 years, 3 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) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 2004, 2005 Rob Buis <buis@kde.org> 3 2004, 2005 Rob Buis <buis@kde.org>
4 Copyright (C) 2005, 2006 Apple Computer, Inc. 4 Copyright (C) 2005, 2006 Apple Computer, Inc.
5 Copyright (C) Research In Motion Limited 2010. All rights reserved. 5 Copyright (C) Research In Motion Limited 2010. All rights reserved.
6 6
7 This library is free software; you can redistribute it and/or 7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public 8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either 9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version. 10 version 2 of the License, or (at your option) any later version.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 static String initialStrokePaintUri() { return String(); } 80 static String initialStrokePaintUri() { return String(); }
81 static PassRefPtr<SVGDashArray> initialStrokeDashArray(); 81 static PassRefPtr<SVGDashArray> initialStrokeDashArray();
82 static Length initialStrokeDashOffset() { return Length(Fixed); } 82 static Length initialStrokeDashOffset() { return Length(Fixed); }
83 static float initialStrokeMiterLimit() { return 4; } 83 static float initialStrokeMiterLimit() { return 4; }
84 static UnzoomedLength initialStrokeWidth() { return UnzoomedLength(Length(1, Fixed)); } 84 static UnzoomedLength initialStrokeWidth() { return UnzoomedLength(Length(1, Fixed)); }
85 static float initialStopOpacity() { return 1; } 85 static float initialStopOpacity() { return 1; }
86 static Color initialStopColor() { return Color(0, 0, 0); } 86 static Color initialStopColor() { return Color(0, 0, 0); }
87 static float initialFloodOpacity() { return 1; } 87 static float initialFloodOpacity() { return 1; }
88 static Color initialFloodColor() { return Color(0, 0, 0); } 88 static Color initialFloodColor() { return Color(0, 0, 0); }
89 static Color initialLightingColor() { return Color(255, 255, 255); } 89 static Color initialLightingColor() { return Color(255, 255, 255); }
90 static const AtomicString& initialClipperResource() { return nullAtom; }
91 static const AtomicString& initialMaskerResource() { return nullAtom; } 90 static const AtomicString& initialMaskerResource() { return nullAtom; }
92 static const AtomicString& initialMarkerStartResource() { return nullAtom; } 91 static const AtomicString& initialMarkerStartResource() { return nullAtom; }
93 static const AtomicString& initialMarkerMidResource() { return nullAtom; } 92 static const AtomicString& initialMarkerMidResource() { return nullAtom; }
94 static const AtomicString& initialMarkerEndResource() { return nullAtom; } 93 static const AtomicString& initialMarkerEndResource() { return nullAtom; }
95 static EMaskType initialMaskType() { return MT_LUMINANCE; } 94 static EMaskType initialMaskType() { return MT_LUMINANCE; }
96 static EPaintOrder initialPaintOrder() { return PaintOrderNormal; } 95 static EPaintOrder initialPaintOrder() { return PaintOrderNormal; }
97 static StylePath* initialD() { return nullptr; } 96 static StylePath* initialD() { return nullptr; }
98 static Length initialCx() { return Length(Fixed); } 97 static Length initialCx() { return Length(Fixed); }
99 static Length initialCy() { return Length(Fixed); } 98 static Length initialCy() { return Length(Fixed); }
100 static Length initialX() { return Length(Fixed); } 99 static Length initialX() { return Length(Fixed); }
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 misc.access()->lightingColor = obj; 265 misc.access()->lightingColor = obj;
267 } 266 }
268 267
269 void setBaselineShiftValue(const Length& baselineShiftValue) 268 void setBaselineShiftValue(const Length& baselineShiftValue)
270 { 269 {
271 if (!(misc->baselineShiftValue == baselineShiftValue)) 270 if (!(misc->baselineShiftValue == baselineShiftValue))
272 misc.access()->baselineShiftValue = baselineShiftValue; 271 misc.access()->baselineShiftValue = baselineShiftValue;
273 } 272 }
274 273
275 // Setters for non-inherited resources 274 // Setters for non-inherited resources
276 void setClipperResource(const AtomicString& obj)
277 {
278 if (!(resources->clipper == obj))
279 resources.access()->clipper = obj;
280 }
281
282 void setMaskerResource(const AtomicString& obj) 275 void setMaskerResource(const AtomicString& obj)
283 { 276 {
284 if (!(resources->masker == obj)) 277 if (!(resources->masker == obj))
285 resources.access()->masker = obj; 278 resources.access()->masker = obj;
286 } 279 }
287 280
288 // Setters for inherited resources 281 // Setters for inherited resources
289 void setMarkerStartResource(const AtomicString& obj) 282 void setMarkerStartResource(const AtomicString& obj)
290 { 283 {
291 if (!(inheritedResources->markerStart == obj)) 284 if (!(inheritedResources->markerStart == obj))
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 const Color& lightingColor() const { return misc->lightingColor; } 331 const Color& lightingColor() const { return misc->lightingColor; }
339 const Length& baselineShiftValue() const { return misc->baselineShiftValue; } 332 const Length& baselineShiftValue() const { return misc->baselineShiftValue; }
340 StylePath* d() const { return geometry->d.get(); } 333 StylePath* d() const { return geometry->d.get(); }
341 const Length& cx() const { return geometry->cx; } 334 const Length& cx() const { return geometry->cx; }
342 const Length& cy() const { return geometry->cy; } 335 const Length& cy() const { return geometry->cy; }
343 const Length& x() const { return geometry->x; } 336 const Length& x() const { return geometry->x; }
344 const Length& y() const { return geometry->y; } 337 const Length& y() const { return geometry->y; }
345 const Length& r() const { return geometry->r; } 338 const Length& r() const { return geometry->r; }
346 const Length& rx() const { return geometry->rx; } 339 const Length& rx() const { return geometry->rx; }
347 const Length& ry() const { return geometry->ry; } 340 const Length& ry() const { return geometry->ry; }
348 const AtomicString& clipperResource() const { return resources->clipper; }
349 const AtomicString& maskerResource() const { return resources->masker; } 341 const AtomicString& maskerResource() const { return resources->masker; }
350 const AtomicString& markerStartResource() const { return inheritedResources- >markerStart; } 342 const AtomicString& markerStartResource() const { return inheritedResources- >markerStart; }
351 const AtomicString& markerMidResource() const { return inheritedResources->m arkerMid; } 343 const AtomicString& markerMidResource() const { return inheritedResources->m arkerMid; }
352 const AtomicString& markerEndResource() const { return inheritedResources->m arkerEnd; } 344 const AtomicString& markerEndResource() const { return inheritedResources->m arkerEnd; }
353 EMaskType maskType() const { return (EMaskType) svg_noninherited_flags.f.mas kType; } 345 EMaskType maskType() const { return (EMaskType) svg_noninherited_flags.f.mas kType; }
354 EPaintOrder paintOrder() const { return (EPaintOrder) svg_inherited_flags.pa intOrder; } 346 EPaintOrder paintOrder() const { return (EPaintOrder) svg_inherited_flags.pa intOrder; }
355 EPaintOrderType paintOrderType(unsigned index) const; 347 EPaintOrderType paintOrderType(unsigned index) const;
356 348
357 const SVGPaintType& visitedLinkFillPaintType() const { return fill->visitedL inkPaintType; } 349 const SVGPaintType& visitedLinkFillPaintType() const { return fill->visitedL inkPaintType; }
358 const Color& visitedLinkFillPaintColor() const { return fill->visitedLinkPai ntColor; } 350 const Color& visitedLinkFillPaintColor() const { return fill->visitedLinkPai ntColor; }
(...skipping 12 matching lines...) Expand all
371 363
372 bool isStrokeColorCurrentColor() const 364 bool isStrokeColorCurrentColor() const
373 { 365 {
374 return strokePaintType() == SVG_PAINTTYPE_CURRENTCOLOR 366 return strokePaintType() == SVG_PAINTTYPE_CURRENTCOLOR
375 || visitedLinkStrokePaintType() == SVG_PAINTTYPE_CURRENTCOLOR 367 || visitedLinkStrokePaintType() == SVG_PAINTTYPE_CURRENTCOLOR
376 || strokePaintType() == SVG_PAINTTYPE_URI_CURRENTCOLOR 368 || strokePaintType() == SVG_PAINTTYPE_URI_CURRENTCOLOR
377 || visitedLinkStrokePaintType() == SVG_PAINTTYPE_URI_CURRENTCOLOR; 369 || visitedLinkStrokePaintType() == SVG_PAINTTYPE_URI_CURRENTCOLOR;
378 } 370 }
379 371
380 // convenience 372 // convenience
381 bool hasClipper() const { return !clipperResource().isEmpty(); }
382 bool hasMasker() const { return !maskerResource().isEmpty(); } 373 bool hasMasker() const { return !maskerResource().isEmpty(); }
383 bool hasMarkers() const { return !markerStartResource().isEmpty() || !marker MidResource().isEmpty() || !markerEndResource().isEmpty(); } 374 bool hasMarkers() const { return !markerStartResource().isEmpty() || !marker MidResource().isEmpty() || !markerEndResource().isEmpty(); }
384 bool hasStroke() const { return strokePaintType() != SVG_PAINTTYPE_NONE; } 375 bool hasStroke() const { return strokePaintType() != SVG_PAINTTYPE_NONE; }
385 bool hasVisibleStroke() const { return hasStroke() && !strokeWidth().isZero( ); } 376 bool hasVisibleStroke() const { return hasStroke() && !strokeWidth().isZero( ); }
386 bool hasSquareCapStyle() const { return capStyle() == SquareCap; } 377 bool hasSquareCapStyle() const { return capStyle() == SquareCap; }
387 bool hasMiterJoinStyle() const { return joinStyle() == MiterJoin; } 378 bool hasMiterJoinStyle() const { return joinStyle() == MiterJoin; }
388 bool hasFill() const { return fillPaintType() != SVG_PAINTTYPE_NONE; } 379 bool hasFill() const { return fillPaintType() != SVG_PAINTTYPE_NONE; }
389 380
390 protected: 381 protected:
391 // inherit 382 // inherit
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 svg_noninherited_flags.f.baselineShift = initialBaselineShift(); 473 svg_noninherited_flags.f.baselineShift = initialBaselineShift();
483 svg_noninherited_flags.f.vectorEffect = initialVectorEffect(); 474 svg_noninherited_flags.f.vectorEffect = initialVectorEffect();
484 svg_noninherited_flags.f.bufferedRendering = initialBufferedRendering(); 475 svg_noninherited_flags.f.bufferedRendering = initialBufferedRendering();
485 svg_noninherited_flags.f.maskType = initialMaskType(); 476 svg_noninherited_flags.f.maskType = initialMaskType();
486 } 477 }
487 }; 478 };
488 479
489 } // namespace blink 480 } // namespace blink
490 481
491 #endif // SVGComputedStyle_h 482 #endif // SVGComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698