| 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 * |
| 11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
| 15 * | 15 * |
| 16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
| 17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
| 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 #ifndef CSSToStyleMap_h | 22 #ifndef CSSToStyleMap_h |
| 23 #define CSSToStyleMap_h | 23 #define CSSToStyleMap_h |
| 24 | 24 |
| 25 #include "CSSPropertyNames.h" | 25 #include "CSSPropertyNames.h" |
| 26 #include "core/css/resolver/ElementStyleResources.h" | 26 #include "core/css/resolver/ElementStyleResources.h" |
| 27 #include "platform/LengthBox.h" | |
| 28 #include "wtf/Noncopyable.h" | 27 #include "wtf/Noncopyable.h" |
| 29 | 28 |
| 30 namespace WebCore { | 29 namespace WebCore { |
| 31 | 30 |
| 32 class FillLayer; | 31 class FillLayer; |
| 33 class CSSValue; | 32 class CSSValue; |
| 34 class CSSAnimationData; | 33 class CSSAnimationData; |
| 35 class RenderStyle; | 34 class RenderStyle; |
| 36 class StyleImage; | 35 class StyleImage; |
| 37 class StyleResolverState; | 36 class StyleResolverState; |
| 38 class NinePieceImage; | 37 class NinePieceImage; |
| 38 class BorderImageLengthBox; |
| 39 | 39 |
| 40 // CSSToStyleMap is a short-lived helper object which | 40 // CSSToStyleMap is a short-lived helper object which |
| 41 // given the current StyleResolverState can map | 41 // given the current StyleResolverState can map |
| 42 // CSSValue objects into their RenderStyle equivalents. | 42 // CSSValue objects into their RenderStyle equivalents. |
| 43 | 43 |
| 44 class CSSToStyleMap { | 44 class CSSToStyleMap { |
| 45 WTF_MAKE_NONCOPYABLE(CSSToStyleMap); | 45 WTF_MAKE_NONCOPYABLE(CSSToStyleMap); |
| 46 public: | 46 public: |
| 47 CSSToStyleMap(const StyleResolverState& state, ElementStyleResources& elemen
tStyleResources) : m_state(state), m_elementStyleResources(elementStyleResources
) { } | 47 CSSToStyleMap(const StyleResolverState& state, ElementStyleResources& elemen
tStyleResources) : m_state(state), m_elementStyleResources(elementStyleResources
) { } |
| 48 | 48 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 64 void mapAnimationDuration(CSSAnimationData*, CSSValue*) const; | 64 void mapAnimationDuration(CSSAnimationData*, CSSValue*) const; |
| 65 void mapAnimationFillMode(CSSAnimationData*, CSSValue*) const; | 65 void mapAnimationFillMode(CSSAnimationData*, CSSValue*) const; |
| 66 void mapAnimationIterationCount(CSSAnimationData*, CSSValue*) const; | 66 void mapAnimationIterationCount(CSSAnimationData*, CSSValue*) const; |
| 67 void mapAnimationName(CSSAnimationData*, CSSValue*) const; | 67 void mapAnimationName(CSSAnimationData*, CSSValue*) const; |
| 68 void mapAnimationPlayState(CSSAnimationData*, CSSValue*) const; | 68 void mapAnimationPlayState(CSSAnimationData*, CSSValue*) const; |
| 69 void mapAnimationProperty(CSSAnimationData*, CSSValue*) const; | 69 void mapAnimationProperty(CSSAnimationData*, CSSValue*) const; |
| 70 void mapAnimationTimingFunction(CSSAnimationData*, CSSValue*) const; | 70 void mapAnimationTimingFunction(CSSAnimationData*, CSSValue*) const; |
| 71 | 71 |
| 72 void mapNinePieceImage(RenderStyle* mutableStyle, CSSPropertyID, CSSValue*,
NinePieceImage&); | 72 void mapNinePieceImage(RenderStyle* mutableStyle, CSSPropertyID, CSSValue*,
NinePieceImage&); |
| 73 void mapNinePieceImageSlice(CSSValue*, NinePieceImage&) const; | 73 void mapNinePieceImageSlice(CSSValue*, NinePieceImage&) const; |
| 74 LengthBox mapNinePieceImageQuad(CSSValue*) const; | 74 BorderImageLengthBox mapNinePieceImageQuad(CSSValue*) const; |
| 75 void mapNinePieceImageRepeat(CSSValue*, NinePieceImage&) const; | 75 void mapNinePieceImageRepeat(CSSValue*, NinePieceImage&) const; |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 const RenderStyle* style() const; | 78 const RenderStyle* style() const; |
| 79 const RenderStyle* rootElementStyle() const; | 79 const RenderStyle* rootElementStyle() const; |
| 80 bool useSVGZoomRules() const; | 80 bool useSVGZoomRules() const; |
| 81 | 81 |
| 82 PassRefPtr<StyleImage> styleImage(CSSPropertyID, CSSValue*); | 82 PassRefPtr<StyleImage> styleImage(CSSPropertyID, CSSValue*); |
| 83 | 83 |
| 84 // FIXME: Consider passing a StyleResolverState (or ElementResolveState) | 84 // FIXME: Consider passing a StyleResolverState (or ElementResolveState) |
| 85 // as an argument instead of caching it on this object. | 85 // as an argument instead of caching it on this object. |
| 86 const StyleResolverState& m_state; | 86 const StyleResolverState& m_state; |
| 87 ElementStyleResources& m_elementStyleResources; | 87 ElementStyleResources& m_elementStyleResources; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } | 90 } |
| 91 | 91 |
| 92 #endif | 92 #endif |
| OLD | NEW |