| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
All rights reserved. |
| 4 * Copyright (C) 2012 Google Inc. All rights reserved. | 4 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #define CSSToStyleMap_h | 23 #define CSSToStyleMap_h |
| 24 | 24 |
| 25 #include "CSSPropertyNames.h" | 25 #include "CSSPropertyNames.h" |
| 26 #include "core/platform/LengthBox.h" | 26 #include "core/platform/LengthBox.h" |
| 27 #include <wtf/Noncopyable.h> | 27 #include <wtf/Noncopyable.h> |
| 28 | 28 |
| 29 namespace WebCore { | 29 namespace WebCore { |
| 30 | 30 |
| 31 class FillLayer; | 31 class FillLayer; |
| 32 class CSSValue; | 32 class CSSValue; |
| 33 class CSSAnimationData; | 33 class StyleAnimationData; |
| 34 class RenderStyle; | 34 class RenderStyle; |
| 35 class StyleImage; | 35 class StyleImage; |
| 36 class StyleResolver; | 36 class StyleResolver; |
| 37 class NinePieceImage; | 37 class NinePieceImage; |
| 38 | 38 |
| 39 class CSSToStyleMap { | 39 class CSSToStyleMap { |
| 40 WTF_MAKE_NONCOPYABLE(CSSToStyleMap); | 40 WTF_MAKE_NONCOPYABLE(CSSToStyleMap); |
| 41 WTF_MAKE_FAST_ALLOCATED; | 41 WTF_MAKE_FAST_ALLOCATED; |
| 42 | 42 |
| 43 public: | 43 public: |
| 44 CSSToStyleMap(StyleResolver* resolver) : m_resolver(resolver) { } | 44 CSSToStyleMap(StyleResolver* resolver) : m_resolver(resolver) { } |
| 45 | 45 |
| 46 void mapFillAttachment(CSSPropertyID, FillLayer*, CSSValue*); | 46 void mapFillAttachment(CSSPropertyID, FillLayer*, CSSValue*); |
| 47 void mapFillClip(CSSPropertyID, FillLayer*, CSSValue*); | 47 void mapFillClip(CSSPropertyID, FillLayer*, CSSValue*); |
| 48 void mapFillComposite(CSSPropertyID, FillLayer*, CSSValue*); | 48 void mapFillComposite(CSSPropertyID, FillLayer*, CSSValue*); |
| 49 void mapFillBlendMode(CSSPropertyID, FillLayer*, CSSValue*); | 49 void mapFillBlendMode(CSSPropertyID, FillLayer*, CSSValue*); |
| 50 void mapFillOrigin(CSSPropertyID, FillLayer*, CSSValue*); | 50 void mapFillOrigin(CSSPropertyID, FillLayer*, CSSValue*); |
| 51 void mapFillImage(CSSPropertyID, FillLayer*, CSSValue*); | 51 void mapFillImage(CSSPropertyID, FillLayer*, CSSValue*); |
| 52 void mapFillRepeatX(CSSPropertyID, FillLayer*, CSSValue*); | 52 void mapFillRepeatX(CSSPropertyID, FillLayer*, CSSValue*); |
| 53 void mapFillRepeatY(CSSPropertyID, FillLayer*, CSSValue*); | 53 void mapFillRepeatY(CSSPropertyID, FillLayer*, CSSValue*); |
| 54 void mapFillSize(CSSPropertyID, FillLayer*, CSSValue*); | 54 void mapFillSize(CSSPropertyID, FillLayer*, CSSValue*); |
| 55 void mapFillXPosition(CSSPropertyID, FillLayer*, CSSValue*); | 55 void mapFillXPosition(CSSPropertyID, FillLayer*, CSSValue*); |
| 56 void mapFillYPosition(CSSPropertyID, FillLayer*, CSSValue*); | 56 void mapFillYPosition(CSSPropertyID, FillLayer*, CSSValue*); |
| 57 | 57 |
| 58 void mapAnimationDelay(CSSAnimationData*, CSSValue*); | 58 void mapAnimationDelay(StyleAnimationData*, CSSValue*); |
| 59 void mapAnimationDirection(CSSAnimationData*, CSSValue*); | 59 void mapAnimationDirection(StyleAnimationData*, CSSValue*); |
| 60 void mapAnimationDuration(CSSAnimationData*, CSSValue*); | 60 void mapAnimationDuration(StyleAnimationData*, CSSValue*); |
| 61 void mapAnimationFillMode(CSSAnimationData*, CSSValue*); | 61 void mapAnimationFillMode(StyleAnimationData*, CSSValue*); |
| 62 void mapAnimationIterationCount(CSSAnimationData*, CSSValue*); | 62 void mapAnimationIterationCount(StyleAnimationData*, CSSValue*); |
| 63 void mapAnimationName(CSSAnimationData*, CSSValue*); | 63 void mapAnimationName(StyleAnimationData*, CSSValue*); |
| 64 void mapAnimationPlayState(CSSAnimationData*, CSSValue*); | 64 void mapAnimationPlayState(StyleAnimationData*, CSSValue*); |
| 65 void mapAnimationProperty(CSSAnimationData*, CSSValue*); | 65 void mapAnimationProperty(StyleAnimationData*, CSSValue*); |
| 66 void mapAnimationTimingFunction(CSSAnimationData*, CSSValue*); | 66 void mapAnimationTimingFunction(StyleAnimationData*, CSSValue*); |
| 67 | 67 |
| 68 void mapNinePieceImage(CSSPropertyID, CSSValue*, NinePieceImage&); | 68 void mapNinePieceImage(CSSPropertyID, CSSValue*, NinePieceImage&); |
| 69 void mapNinePieceImageSlice(CSSValue*, NinePieceImage&); | 69 void mapNinePieceImageSlice(CSSValue*, NinePieceImage&); |
| 70 LengthBox mapNinePieceImageQuad(CSSValue*); | 70 LengthBox mapNinePieceImageQuad(CSSValue*); |
| 71 void mapNinePieceImageRepeat(CSSValue*, NinePieceImage&); | 71 void mapNinePieceImageRepeat(CSSValue*, NinePieceImage&); |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 // FIXME: These accessors should be replaced by a ResolveState object | 74 // FIXME: These accessors should be replaced by a ResolveState object |
| 75 // similar to how PaintInfo/LayoutState cache values needed for | 75 // similar to how PaintInfo/LayoutState cache values needed for |
| 76 // the current paint/layout. | 76 // the current paint/layout. |
| 77 RenderStyle* style() const; | 77 RenderStyle* style() const; |
| 78 RenderStyle* rootElementStyle() const; | 78 RenderStyle* rootElementStyle() const; |
| 79 bool useSVGZoomRules() const; | 79 bool useSVGZoomRules() const; |
| 80 | 80 |
| 81 // FIXME: This should be part of some sort of StyleImageCache object which | 81 // FIXME: This should be part of some sort of StyleImageCache object which |
| 82 // is held by the StyleResolver, and likely provided to this object | 82 // is held by the StyleResolver, and likely provided to this object |
| 83 // during the resolve. | 83 // during the resolve. |
| 84 PassRefPtr<StyleImage> styleImage(CSSPropertyID, CSSValue*); | 84 PassRefPtr<StyleImage> styleImage(CSSPropertyID, CSSValue*); |
| 85 | 85 |
| 86 StyleResolver* m_resolver; | 86 StyleResolver* m_resolver; |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 } | 89 } |
| 90 | 90 |
| 91 #endif | 91 #endif |
| OLD | NEW |