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

Unified Diff: third_party/WebKit/Source/core/style/SVGComputedStyle.cpp

Issue 2753013004: Apply SVG styles paint-order, stroke-linejoin, and stroke-linecap on DOM text
Patch Set: Apply SVG styles paint-order, stroke-linejoin, and stroke-linecap on DOM text 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/style/SVGComputedStyle.cpp
diff --git a/third_party/WebKit/Source/core/style/SVGComputedStyle.cpp b/third_party/WebKit/Source/core/style/SVGComputedStyle.cpp
index fb074ed65d7841d263c31ab8cc7fbb0b0be36aaf..64beda4ed3d475784fb65d60bcb919e8ef2edf65 100644
--- a/third_party/WebKit/Source/core/style/SVGComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/SVGComputedStyle.cpp
@@ -29,8 +29,6 @@
namespace blink {
-static const int kPaintOrderBitwidth = 2;
-
SVGComputedStyle::SVGComputedStyle() {
static SVGComputedStyle* initialStyle = new SVGComputedStyle(CreateInitial);
@@ -153,11 +151,6 @@ bool SVGComputedStyle::diffNeedsLayoutAndPaintInvalidation(
if (misc->baselineShiftValue != other->misc->baselineShiftValue)
return true;
- // These properties affect the cached stroke bounding box rects.
- if (svg_inherited_flags.capStyle != other->svg_inherited_flags.capStyle ||
- svg_inherited_flags.joinStyle != other->svg_inherited_flags.joinStyle)
- return true;
-
// vector-effect changes require a re-layout.
if (svg_noninherited_flags.f.vectorEffect !=
other->svg_noninherited_flags.f.vectorEffect)
@@ -166,8 +159,7 @@ bool SVGComputedStyle::diffNeedsLayoutAndPaintInvalidation(
// Some stroke properties, requires relayouts, as the cached stroke boundaries
// need to be recalculated.
if (stroke.get() != other->stroke.get()) {
- if (stroke->width != other->stroke->width ||
- stroke->paintType != other->stroke->paintType ||
+ if (stroke->paintType != other->stroke->paintType ||
stroke->paintColor != other->stroke->paintColor ||
stroke->paintUri != other->stroke->paintUri ||
stroke->miterLimit != other->stroke->miterLimit ||
@@ -224,8 +216,7 @@ bool SVGComputedStyle::diffNeedsPaintInvalidation(
svg_inherited_flags.colorInterpolation !=
other->svg_inherited_flags.colorInterpolation ||
svg_inherited_flags.colorInterpolationFilters !=
- other->svg_inherited_flags.colorInterpolationFilters ||
- svg_inherited_flags.paintOrder != other->svg_inherited_flags.paintOrder)
+ other->svg_inherited_flags.colorInterpolationFilters)
return true;
if (svg_noninherited_flags.f.bufferedRendering !=
@@ -239,41 +230,4 @@ bool SVGComputedStyle::diffNeedsPaintInvalidation(
return false;
}
-unsigned paintOrderSequence(EPaintOrderType first,
- EPaintOrderType second,
- EPaintOrderType third) {
- return (((third << kPaintOrderBitwidth) | second) << kPaintOrderBitwidth) |
- first;
-}
-
-EPaintOrderType SVGComputedStyle::paintOrderType(unsigned index) const {
- unsigned pt = 0;
- ASSERT(index < ((1 << kPaintOrderBitwidth) - 1));
- switch (this->paintOrder()) {
- case PaintOrderNormal:
- case PaintOrderFillStrokeMarkers:
- pt = paintOrderSequence(PT_FILL, PT_STROKE, PT_MARKERS);
- break;
- case PaintOrderFillMarkersStroke:
- pt = paintOrderSequence(PT_FILL, PT_MARKERS, PT_STROKE);
- break;
- case PaintOrderStrokeFillMarkers:
- pt = paintOrderSequence(PT_STROKE, PT_FILL, PT_MARKERS);
- break;
- case PaintOrderStrokeMarkersFill:
- pt = paintOrderSequence(PT_STROKE, PT_MARKERS, PT_FILL);
- break;
- case PaintOrderMarkersFillStroke:
- pt = paintOrderSequence(PT_MARKERS, PT_FILL, PT_STROKE);
- break;
- case PaintOrderMarkersStrokeFill:
- pt = paintOrderSequence(PT_MARKERS, PT_STROKE, PT_FILL);
- break;
- }
-
- pt =
- (pt >> (kPaintOrderBitwidth * index)) & ((1u << kPaintOrderBitwidth) - 1);
- return (EPaintOrderType)pt;
-}
-
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/style/SVGComputedStyle.h ('k') | third_party/WebKit/Source/core/style/SVGComputedStyleDefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698