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

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

Issue 1455153003: Fix animation of 'color' w/ currentColor for SVG 'fill' and 'stroke' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 EPaintOrder paintOrder() const { return (EPaintOrder) svg_inherited_flags.pa intOrder; } 356 EPaintOrder paintOrder() const { return (EPaintOrder) svg_inherited_flags.pa intOrder; }
357 EPaintOrderType paintOrderType(unsigned index) const; 357 EPaintOrderType paintOrderType(unsigned index) const;
358 358
359 const SVGPaintType& visitedLinkFillPaintType() const { return fill->visitedL inkPaintType; } 359 const SVGPaintType& visitedLinkFillPaintType() const { return fill->visitedL inkPaintType; }
360 const Color& visitedLinkFillPaintColor() const { return fill->visitedLinkPai ntColor; } 360 const Color& visitedLinkFillPaintColor() const { return fill->visitedLinkPai ntColor; }
361 const String& visitedLinkFillPaintUri() const { return fill->visitedLinkPain tUri; } 361 const String& visitedLinkFillPaintUri() const { return fill->visitedLinkPain tUri; }
362 const SVGPaintType& visitedLinkStrokePaintType() const { return stroke->visi tedLinkPaintType; } 362 const SVGPaintType& visitedLinkStrokePaintType() const { return stroke->visi tedLinkPaintType; }
363 const Color& visitedLinkStrokePaintColor() const { return stroke->visitedLin kPaintColor; } 363 const Color& visitedLinkStrokePaintColor() const { return stroke->visitedLin kPaintColor; }
364 const String& visitedLinkStrokePaintUri() const { return stroke->visitedLink PaintUri; } 364 const String& visitedLinkStrokePaintUri() const { return stroke->visitedLink PaintUri; }
365 365
366 bool isFillColorCurrentColor() const
367 {
368 return fillPaintType() == SVG_PAINTTYPE_CURRENTCOLOR
369 || visitedLinkFillPaintType() == SVG_PAINTTYPE_CURRENTCOLOR
370 || fillPaintType() == SVG_PAINTTYPE_URI_CURRENTCOLOR
371 || visitedLinkFillPaintType() == SVG_PAINTTYPE_URI_CURRENTCOLOR;
372 }
373
374 bool isStrokeColorCurrentColor() const
375 {
376 return strokePaintType() == SVG_PAINTTYPE_CURRENTCOLOR
377 || visitedLinkStrokePaintType() == SVG_PAINTTYPE_CURRENTCOLOR
378 || strokePaintType() == SVG_PAINTTYPE_URI_CURRENTCOLOR
379 || visitedLinkStrokePaintType() == SVG_PAINTTYPE_URI_CURRENTCOLOR;
380 }
381
366 // convenience 382 // convenience
367 bool hasClipper() const { return !clipperResource().isEmpty(); } 383 bool hasClipper() const { return !clipperResource().isEmpty(); }
368 bool hasMasker() const { return !maskerResource().isEmpty(); } 384 bool hasMasker() const { return !maskerResource().isEmpty(); }
369 bool hasFilter() const { return !filterResource().isEmpty(); } 385 bool hasFilter() const { return !filterResource().isEmpty(); }
370 bool hasMarkers() const { return !markerStartResource().isEmpty() || !marker MidResource().isEmpty() || !markerEndResource().isEmpty(); } 386 bool hasMarkers() const { return !markerStartResource().isEmpty() || !marker MidResource().isEmpty() || !markerEndResource().isEmpty(); }
371 bool hasStroke() const { return strokePaintType() != SVG_PAINTTYPE_NONE; } 387 bool hasStroke() const { return strokePaintType() != SVG_PAINTTYPE_NONE; }
372 bool hasVisibleStroke() const { return hasStroke() && !strokeWidth().isZero( ); } 388 bool hasVisibleStroke() const { return hasStroke() && !strokeWidth().isZero( ); }
373 bool hasSquareCapStyle() const { return capStyle() == SquareCap; } 389 bool hasSquareCapStyle() const { return capStyle() == SquareCap; }
374 bool hasMiterJoinStyle() const { return joinStyle() == MiterJoin; } 390 bool hasMiterJoinStyle() const { return joinStyle() == MiterJoin; }
375 bool hasFill() const { return fillPaintType() != SVG_PAINTTYPE_NONE; } 391 bool hasFill() const { return fillPaintType() != SVG_PAINTTYPE_NONE; }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 svg_noninherited_flags.f.baselineShift = initialBaselineShift(); 485 svg_noninherited_flags.f.baselineShift = initialBaselineShift();
470 svg_noninherited_flags.f.vectorEffect = initialVectorEffect(); 486 svg_noninherited_flags.f.vectorEffect = initialVectorEffect();
471 svg_noninherited_flags.f.bufferedRendering = initialBufferedRendering(); 487 svg_noninherited_flags.f.bufferedRendering = initialBufferedRendering();
472 svg_noninherited_flags.f.maskType = initialMaskType(); 488 svg_noninherited_flags.f.maskType = initialMaskType();
473 } 489 }
474 }; 490 };
475 491
476 } // namespace blink 492 } // namespace blink
477 493
478 #endif // SVGComputedStyle_h 494 #endif // SVGComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698