summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/style/RenderStyle.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/rendering/style/RenderStyle.h')
-rw-r--r--WebCore/rendering/style/RenderStyle.h49
1 files changed, 30 insertions, 19 deletions
diff --git a/WebCore/rendering/style/RenderStyle.h b/WebCore/rendering/style/RenderStyle.h
index 970b26a..e8f4d2f 100644
--- a/WebCore/rendering/style/RenderStyle.h
+++ b/WebCore/rendering/style/RenderStyle.h
@@ -32,6 +32,7 @@
#include "CSSHelper.h"
#include "CSSImageGeneratorValue.h"
#include "CSSPrimitiveValue.h"
+#include "CSSPropertyNames.h"
#include "CSSReflectionDirection.h"
#include "CSSValueList.h"
#include "CachedImage.h"
@@ -113,7 +114,13 @@ class StyleImage;
typedef Vector<RefPtr<RenderStyle>, 4> PseudoStyleCache;
class RenderStyle: public RefCounted<RenderStyle> {
- friend class CSSStyleSelector;
+ friend class AnimationBase; // Used by CSS animations. We can't allow them to animate based off visited colors.
+ friend class ApplyStyleCommand; // Editing has to only reveal unvisited info.
+ friend class CSSStyleSelector; // Sets members directly.
+ friend class CSSComputedStyleDeclaration; // Ignores visited styles, so needs to be able to see unvisited info.
+ friend class PropertyWrapperMaybeInvalidColor; // Used by CSS animations. We can't allow them to animate based off visited colors.
+ friend class RenderSVGResource; // FIXME: Needs to alter the visited state by hand. Should clean the SVG code up and move it into RenderStyle perhaps.
+ friend class RenderTreeAsText; // FIXME: Only needed so the render tree can keep lying and dump the wrong colors. Rebaselining would allow this to be yanked.
protected:
// The following bitfield is 32-bits long, which optimizes padding with the
@@ -341,12 +348,6 @@ public:
bool hasPadding() const { return surround->padding.nonZero(); }
bool hasOffset() const { return surround->offset.nonZero(); }
- bool hasBackground() const
- {
- if (backgroundColor().isValid() && backgroundColor().alpha() > 0)
- return true;
- return m_background->background().hasImage();
- }
bool hasBackgroundImage() const { return m_background->background().hasImage(); }
bool hasFixedBackgroundImage() const { return m_background->background().hasFixedImage(); }
bool hasAppearance() const { return appearance() != NoControlPart; }
@@ -401,19 +402,15 @@ public:
unsigned short borderLeftWidth() const { return surround->border.borderLeftWidth(); }
EBorderStyle borderLeftStyle() const { return surround->border.left().style(); }
- const Color& borderLeftColor() const { return surround->border.left().color(); }
bool borderLeftIsTransparent() const { return surround->border.left().isTransparent(); }
unsigned short borderRightWidth() const { return surround->border.borderRightWidth(); }
EBorderStyle borderRightStyle() const { return surround->border.right().style(); }
- const Color& borderRightColor() const { return surround->border.right().color(); }
bool borderRightIsTransparent() const { return surround->border.right().isTransparent(); }
unsigned short borderTopWidth() const { return surround->border.borderTopWidth(); }
EBorderStyle borderTopStyle() const { return surround->border.top().style(); }
- const Color& borderTopColor() const { return surround->border.top().color(); }
bool borderTopIsTransparent() const { return surround->border.top().isTransparent(); }
unsigned short borderBottomWidth() const { return surround->border.borderBottomWidth(); }
EBorderStyle borderBottomStyle() const { return surround->border.bottom().style(); }
- const Color& borderBottomColor() const { return surround->border.bottom().color(); }
bool borderBottomIsTransparent() const { return surround->border.bottom().isTransparent(); }
unsigned short outlineSize() const { return max(0, outlineWidth() + outlineOffset()); }
@@ -426,8 +423,7 @@ public:
bool hasOutline() const { return outlineWidth() > 0 && outlineStyle() > BHIDDEN; }
EBorderStyle outlineStyle() const { return m_background->outline().style(); }
bool outlineStyleIsAuto() const { return m_background->outline().isAuto(); }
- const Color& outlineColor() const { return m_background->outline().color(); }
-
+
EOverflow overflowX() const { return static_cast<EOverflow>(noninherited_flags._overflowX); }
EOverflow overflowY() const { return static_cast<EOverflow>(noninherited_flags._overflowY); }
@@ -451,7 +447,6 @@ public:
const FontDescription& fontDescription() const { return inherited->font.fontDescription(); }
int fontSize() const { return inherited->font.pixelSize(); }
- const Color& color() const { return inherited->color; }
Length textIndent() const { return rareInheritedData->indent; }
ETextAlign textAlign() const { return static_cast<ETextAlign>(inherited_flags._text_align); }
ETextTransform textTransform() const { return static_cast<ETextTransform>(inherited_flags._text_transform); }
@@ -535,7 +530,6 @@ public:
return wordBreak() == BreakWordBreak || wordWrap() == BreakWordWrap;
}
- const Color& backgroundColor() const { return m_background->color(); }
StyleImage* backgroundImage() const { return m_background->background().image(); }
EFillRepeat backgroundRepeatX() const { return static_cast<EFillRepeat>(m_background->background().repeatX()); }
EFillRepeat backgroundRepeatY() const { return static_cast<EFillRepeat>(m_background->background().repeatY()); }
@@ -616,9 +610,7 @@ public:
}
const ShadowData* textShadow() const { return rareInheritedData->textShadow; }
- const Color& textStrokeColor() const { return rareInheritedData->textStrokeColor; }
float textStrokeWidth() const { return rareInheritedData->textStrokeWidth; }
- const Color& textFillColor() const { return rareInheritedData->textFillColor; }
ColorSpace colorSpace() const { return static_cast<ColorSpace>(rareInheritedData->colorSpace); }
float opacity() const { return rareNonInheritedData->opacity; }
ControlPart appearance() const { return static_cast<ControlPart>(rareNonInheritedData->m_appearance); }
@@ -664,10 +656,10 @@ public:
bool specifiesColumns() const { return !hasAutoColumnCount() || !hasAutoColumnWidth(); }
float columnGap() const { return rareNonInheritedData->m_multiCol->m_gap; }
bool hasNormalColumnGap() const { return rareNonInheritedData->m_multiCol->m_normalGap; }
- const Color& columnRuleColor() const { return rareNonInheritedData->m_multiCol->m_rule.color(); }
EBorderStyle columnRuleStyle() const { return rareNonInheritedData->m_multiCol->m_rule.style(); }
unsigned short columnRuleWidth() const { return rareNonInheritedData->m_multiCol->ruleWidth(); }
bool columnRuleIsTransparent() const { return rareNonInheritedData->m_multiCol->m_rule.isTransparent(); }
+ bool columnSpan() const { return rareNonInheritedData->m_multiCol->m_columnSpan; }
EPageBreak columnBreakBefore() const { return static_cast<EPageBreak>(rareNonInheritedData->m_multiCol->m_breakBefore); }
EPageBreak columnBreakInside() const { return static_cast<EPageBreak>(rareNonInheritedData->m_multiCol->m_breakInside); }
EPageBreak columnBreakAfter() const { return static_cast<EPageBreak>(rareNonInheritedData->m_multiCol->m_breakAfter); }
@@ -1002,6 +994,7 @@ public:
void setColumnRuleStyle(EBorderStyle b) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_rule.m_style, b); }
void setColumnRuleWidth(unsigned short w) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_rule.m_width, w); }
void resetColumnRule() { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_rule, BorderValue()) }
+ void setColumnSpan(bool b) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_columnSpan, b); }
void setColumnBreakBefore(EPageBreak p) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakBefore, p); }
void setColumnBreakInside(EPageBreak p) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakInside, p); }
void setColumnBreakAfter(EPageBreak p) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_breakAfter, p); }
@@ -1120,7 +1113,7 @@ public:
unsigned childIndex() const { return m_childIndex; }
void setChildIndex(unsigned index) { m_childIndex = index; }
- Color visitedDependentColor(int colorProperty) const;
+ const Color visitedDependentColor(int colorProperty) const;
// Initial values for all the properties
static bool initialBorderCollapse() { return false; }
@@ -1200,6 +1193,7 @@ public:
static bool initialVisuallyOrdered() { return false; }
static float initialTextStrokeWidth() { return 0; }
static unsigned short initialColumnCount() { return 1; }
+ static bool initialColumnSpan() { return false; }
static const TransformOperations& initialTransform() { DEFINE_STATIC_LOCAL(TransformOperations, ops, ()); return ops; }
static Length initialTransformOriginX() { return Length(50.0, Percent); }
static Length initialTransformOriginY() { return Length(50.0, Percent); }
@@ -1221,9 +1215,26 @@ public:
static const Vector<StyleDashboardRegion>& noneDashboardRegions();
#endif
+<<<<<<< HEAD
#ifdef ANDROID_CSS_TAP_HIGHLIGHT_COLOR
static Color initialTapHighlightColor() { return Color::tap; }
#endif
+=======
+private:
+ // Color accessors are all private to make sure callers use visitedDependentColor instead to access them.
+ const Color& borderLeftColor() const { return surround->border.left().color(); }
+ const Color& borderRightColor() const { return surround->border.right().color(); }
+ const Color& borderTopColor() const { return surround->border.top().color(); }
+ const Color& borderBottomColor() const { return surround->border.bottom().color(); }
+ const Color& backgroundColor() const { return m_background->color(); }
+ const Color& color() const { return inherited->color; }
+ const Color& columnRuleColor() const { return rareNonInheritedData->m_multiCol->m_rule.color(); }
+ const Color& outlineColor() const { return m_background->outline().color(); }
+ const Color& textFillColor() const { return rareInheritedData->textFillColor; }
+ const Color& textStrokeColor() const { return rareInheritedData->textStrokeColor; }
+
+ const Color colorIncludingFallback(int colorProperty, EBorderStyle borderStyle) const;
+>>>>>>> webkit.org at r60074
};
} // namespace WebCore