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

Side by Side Diff: Source/core/layout/style/SVGComputedStyle.h

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/style/OutlineValue.h ('k') | Source/core/layout/style/SVGComputedStyle.cpp » ('j') | 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.
11 11
12 This library is distributed in the hope that it will be useful, 12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details. 15 Library General Public License for more details.
16 16
17 You should have received a copy of the GNU Library General Public License 17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to 18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA. 20 Boston, MA 02110-1301, USA.
21 */ 21 */
22 22
23 #ifndef SVGLayoutStyle_h 23 #ifndef SVGComputedStyle_h
24 #define SVGLayoutStyle_h 24 #define SVGComputedStyle_h
25 25
26 #include "core/layout/style/DataRef.h" 26 #include "core/layout/style/DataRef.h"
27 #include "core/layout/style/LayoutStyleConstants.h" 27 #include "core/layout/style/ComputedStyleConstants.h"
28 #include "core/layout/style/SVGLayoutStyleDefs.h" 28 #include "core/layout/style/SVGComputedStyleDefs.h"
29 #include "core/layout/style/StyleDifference.h" 29 #include "core/layout/style/StyleDifference.h"
30 #include "platform/Length.h" 30 #include "platform/Length.h"
31 #include "platform/graphics/GraphicsTypes.h" 31 #include "platform/graphics/GraphicsTypes.h"
32 #include "platform/graphics/Path.h" 32 #include "platform/graphics/Path.h"
33 33
34 namespace blink { 34 namespace blink {
35 35
36 class SVGLayoutStyle : public RefCounted<SVGLayoutStyle> { 36 class SVGComputedStyle : public RefCounted<SVGComputedStyle> {
37 public: 37 public:
38 static PassRefPtr<SVGLayoutStyle> create() { return adoptRef(new SVGLayoutSt yle); } 38 static PassRefPtr<SVGComputedStyle> create() { return adoptRef(new SVGComput edStyle); }
39 PassRefPtr<SVGLayoutStyle> copy() const { return adoptRef(new SVGLayoutStyle (*this));} 39 PassRefPtr<SVGComputedStyle> copy() const { return adoptRef(new SVGComputedS tyle(*this));}
40 ~SVGLayoutStyle(); 40 ~SVGComputedStyle();
41 41
42 bool inheritedNotEqual(const SVGLayoutStyle*) const; 42 bool inheritedNotEqual(const SVGComputedStyle*) const;
43 void inheritFrom(const SVGLayoutStyle*); 43 void inheritFrom(const SVGComputedStyle*);
44 void copyNonInheritedFromCached(const SVGLayoutStyle*); 44 void copyNonInheritedFromCached(const SVGComputedStyle*);
45 45
46 StyleDifference diff(const SVGLayoutStyle*) const; 46 StyleDifference diff(const SVGComputedStyle*) const;
47 47
48 bool operator==(const SVGLayoutStyle&) const; 48 bool operator==(const SVGComputedStyle&) const;
49 bool operator!=(const SVGLayoutStyle& o) const { return !(*this == o); } 49 bool operator!=(const SVGComputedStyle& o) const { return !(*this == o); }
50 50
51 // Initial values for all the properties 51 // Initial values for all the properties
52 static EAlignmentBaseline initialAlignmentBaseline() { return AB_AUTO; } 52 static EAlignmentBaseline initialAlignmentBaseline() { return AB_AUTO; }
53 static EDominantBaseline initialDominantBaseline() { return DB_AUTO; } 53 static EDominantBaseline initialDominantBaseline() { return DB_AUTO; }
54 static EBaselineShift initialBaselineShift() { return BS_LENGTH; } 54 static EBaselineShift initialBaselineShift() { return BS_LENGTH; }
55 static Length initialBaselineShiftValue() { return Length(Fixed); } 55 static Length initialBaselineShiftValue() { return Length(Fixed); }
56 static EVectorEffect initialVectorEffect() { return VE_NONE; } 56 static EVectorEffect initialVectorEffect() { return VE_NONE; }
57 static EBufferedRendering initialBufferedRendering() { return BR_AUTO; } 57 static EBufferedRendering initialBufferedRendering() { return BR_AUTO; }
58 static LineCap initialCapStyle() { return ButtCap; } 58 static LineCap initialCapStyle() { return ButtCap; }
59 static WindRule initialClipRule() { return RULE_NONZERO; } 59 static WindRule initialClipRule() { return RULE_NONZERO; }
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 442
443 // non-inherited attributes 443 // non-inherited attributes
444 DataRef<StyleStopData> stops; 444 DataRef<StyleStopData> stops;
445 DataRef<StyleMiscData> misc; 445 DataRef<StyleMiscData> misc;
446 DataRef<StyleLayoutData> layout; 446 DataRef<StyleLayoutData> layout;
447 DataRef<StyleResourceData> resources; 447 DataRef<StyleResourceData> resources;
448 448
449 private: 449 private:
450 enum CreateInitialType { CreateInitial }; 450 enum CreateInitialType { CreateInitial };
451 451
452 SVGLayoutStyle(); 452 SVGComputedStyle();
453 SVGLayoutStyle(const SVGLayoutStyle&); 453 SVGComputedStyle(const SVGComputedStyle&);
454 SVGLayoutStyle(CreateInitialType); // Used to create the initial style singl eton. 454 SVGComputedStyle(CreateInitialType); // Used to create the initial style sin gleton.
455 455
456 bool diffNeedsLayoutAndPaintInvalidation(const SVGLayoutStyle* other) const; 456 bool diffNeedsLayoutAndPaintInvalidation(const SVGComputedStyle* other) cons t;
457 bool diffNeedsPaintInvalidation(const SVGLayoutStyle* other) const; 457 bool diffNeedsPaintInvalidation(const SVGComputedStyle* other) const;
458 458
459 void setBitDefaults() 459 void setBitDefaults()
460 { 460 {
461 svg_inherited_flags._clipRule = initialClipRule(); 461 svg_inherited_flags._clipRule = initialClipRule();
462 svg_inherited_flags._colorRendering = initialColorRendering(); 462 svg_inherited_flags._colorRendering = initialColorRendering();
463 svg_inherited_flags._fillRule = initialFillRule(); 463 svg_inherited_flags._fillRule = initialFillRule();
464 svg_inherited_flags._shapeRendering = initialShapeRendering(); 464 svg_inherited_flags._shapeRendering = initialShapeRendering();
465 svg_inherited_flags._textAnchor = initialTextAnchor(); 465 svg_inherited_flags._textAnchor = initialTextAnchor();
466 svg_inherited_flags._capStyle = initialCapStyle(); 466 svg_inherited_flags._capStyle = initialCapStyle();
467 svg_inherited_flags._joinStyle = initialJoinStyle(); 467 svg_inherited_flags._joinStyle = initialJoinStyle();
468 svg_inherited_flags._colorInterpolation = initialColorInterpolation(); 468 svg_inherited_flags._colorInterpolation = initialColorInterpolation();
469 svg_inherited_flags._colorInterpolationFilters = initialColorInterpolati onFilters(); 469 svg_inherited_flags._colorInterpolationFilters = initialColorInterpolati onFilters();
470 svg_inherited_flags._writingMode = initialWritingMode(); 470 svg_inherited_flags._writingMode = initialWritingMode();
471 svg_inherited_flags._glyphOrientationHorizontal = initialGlyphOrientatio nHorizontal(); 471 svg_inherited_flags._glyphOrientationHorizontal = initialGlyphOrientatio nHorizontal();
472 svg_inherited_flags._glyphOrientationVertical = initialGlyphOrientationV ertical(); 472 svg_inherited_flags._glyphOrientationVertical = initialGlyphOrientationV ertical();
473 svg_inherited_flags._paintOrder = initialPaintOrder(); 473 svg_inherited_flags._paintOrder = initialPaintOrder();
474 474
475 svg_noninherited_flags._niflags = 0; 475 svg_noninherited_flags._niflags = 0;
476 svg_noninherited_flags.f._alignmentBaseline = initialAlignmentBaseline() ; 476 svg_noninherited_flags.f._alignmentBaseline = initialAlignmentBaseline() ;
477 svg_noninherited_flags.f._dominantBaseline = initialDominantBaseline(); 477 svg_noninherited_flags.f._dominantBaseline = initialDominantBaseline();
478 svg_noninherited_flags.f._baselineShift = initialBaselineShift(); 478 svg_noninherited_flags.f._baselineShift = initialBaselineShift();
479 svg_noninherited_flags.f._vectorEffect = initialVectorEffect(); 479 svg_noninherited_flags.f._vectorEffect = initialVectorEffect();
480 svg_noninherited_flags.f.bufferedRendering = initialBufferedRendering(); 480 svg_noninherited_flags.f.bufferedRendering = initialBufferedRendering();
481 svg_noninherited_flags.f.maskType = initialMaskType(); 481 svg_noninherited_flags.f.maskType = initialMaskType();
482 } 482 }
483 }; 483 };
484 484
485 } // namespace blink 485 } // namespace blink
486 486
487 #endif // SVGLayoutStyle_h 487 #endif // SVGComputedStyle_h
OLDNEW
« no previous file with comments | « Source/core/layout/style/OutlineValue.h ('k') | Source/core/layout/style/SVGComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698