Chromium Code Reviews| OLD | NEW |
|---|---|
| 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, 2010 Rob Buis <buis@kde.org> | 3 2004, 2005, 2010 Rob Buis <buis@kde.org> |
| 4 Copyright (C) Research In Motion Limited 2010. All rights reserved. | 4 Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 5 | 5 |
| 6 Based on khtml code by: | 6 Based on khtml code by: |
| 7 Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 7 Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 8 Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) | 8 Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) |
| 9 Copyright (C) 2002-2003 Dirk Mueller (mueller@kde.org) | 9 Copyright (C) 2002-2003 Dirk Mueller (mueller@kde.org) |
| 10 Copyright (C) 2002 Apple Computer, Inc. | 10 Copyright (C) 2002 Apple Computer, Inc. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 svg_inherited_flags = other.svg_inherited_flags; | 73 svg_inherited_flags = other.svg_inherited_flags; |
| 74 svg_noninherited_flags = other.svg_noninherited_flags; | 74 svg_noninherited_flags = other.svg_noninherited_flags; |
| 75 } | 75 } |
| 76 | 76 |
| 77 SVGComputedStyle::~SVGComputedStyle() | 77 SVGComputedStyle::~SVGComputedStyle() |
| 78 { | 78 { |
| 79 } | 79 } |
| 80 | 80 |
| 81 bool SVGComputedStyle::operator==(const SVGComputedStyle& other) const | 81 bool SVGComputedStyle::operator==(const SVGComputedStyle& other) const |
| 82 { | 82 { |
| 83 return inheritedEqual(other) | |
|
sashab
2016/07/01 06:59:51
This is identical to the comparisons before, I jus
| |
| 84 && nonInheritedEqual(other); | |
| 85 } | |
| 86 | |
| 87 bool SVGComputedStyle::inheritedEqual(const SVGComputedStyle& other) const | |
| 88 { | |
| 83 return fill == other.fill | 89 return fill == other.fill |
| 84 && stroke == other.stroke | 90 && stroke == other.stroke |
| 85 && stops == other.stops | 91 && inheritedResources == other.inheritedResources |
| 92 && svg_inherited_flags == other.svg_inherited_flags; | |
| 93 } | |
| 94 | |
| 95 bool SVGComputedStyle::nonInheritedEqual(const SVGComputedStyle& other) const | |
| 96 { | |
| 97 return stops == other.stops | |
| 86 && misc == other.misc | 98 && misc == other.misc |
| 87 && inheritedResources == other.inheritedResources | |
| 88 && geometry == other.geometry | 99 && geometry == other.geometry |
| 89 && resources == other.resources | 100 && resources == other.resources |
| 90 && svg_inherited_flags == other.svg_inherited_flags | |
| 91 && svg_noninherited_flags == other.svg_noninherited_flags; | 101 && svg_noninherited_flags == other.svg_noninherited_flags; |
| 92 } | 102 } |
| 93 | 103 |
| 94 bool SVGComputedStyle::inheritedNotEqual(const SVGComputedStyle* other) const | |
| 95 { | |
| 96 return fill != other->fill | |
| 97 || stroke != other->stroke | |
| 98 || inheritedResources != other->inheritedResources | |
| 99 || svg_inherited_flags != other->svg_inherited_flags; | |
| 100 } | |
| 101 | |
| 102 void SVGComputedStyle::inheritFrom(const SVGComputedStyle* svgInheritParent) | 104 void SVGComputedStyle::inheritFrom(const SVGComputedStyle* svgInheritParent) |
| 103 { | 105 { |
| 104 if (!svgInheritParent) | 106 if (!svgInheritParent) |
| 105 return; | 107 return; |
| 106 | 108 |
| 107 fill = svgInheritParent->fill; | 109 fill = svgInheritParent->fill; |
| 108 stroke = svgInheritParent->stroke; | 110 stroke = svgInheritParent->stroke; |
| 109 inheritedResources = svgInheritParent->inheritedResources; | 111 inheritedResources = svgInheritParent->inheritedResources; |
| 110 | 112 |
| 111 svg_inherited_flags = svgInheritParent->svg_inherited_flags; | 113 svg_inherited_flags = svgInheritParent->svg_inherited_flags; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 266 case PaintOrderMarkersStrokeFill: | 268 case PaintOrderMarkersStrokeFill: |
| 267 pt = paintOrderSequence(PT_MARKERS, PT_STROKE, PT_FILL); | 269 pt = paintOrderSequence(PT_MARKERS, PT_STROKE, PT_FILL); |
| 268 break; | 270 break; |
| 269 } | 271 } |
| 270 | 272 |
| 271 pt = (pt >> (kPaintOrderBitwidth*index)) & ((1u << kPaintOrderBitwidth) - 1) ; | 273 pt = (pt >> (kPaintOrderBitwidth*index)) & ((1u << kPaintOrderBitwidth) - 1) ; |
| 272 return (EPaintOrderType)pt; | 274 return (EPaintOrderType)pt; |
| 273 } | 275 } |
| 274 | 276 |
| 275 } // namespace blink | 277 } // namespace blink |
| OLD | NEW |