diff options
Diffstat (limited to 'khtml/css/cssstyleselector.cpp')
-rw-r--r-- | khtml/css/cssstyleselector.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/khtml/css/cssstyleselector.cpp b/khtml/css/cssstyleselector.cpp index 8f6cc09a6..15432dcd6 100644 --- a/khtml/css/cssstyleselector.cpp +++ b/khtml/css/cssstyleselector.cpp @@ -175,6 +175,26 @@ if (id == propID) \ return;\ } +#define HANDLE_INHERIT_ON_INHERITED_PROPERTY(prop, Prop) \ +if (isInherit) \ +{\ + style->set##Prop(parentStyle->prop());\ + return;\ +} + +#define HANDLE_INITIAL(prop, Prop) \ +if (isInitial) \ +{\ + style->set##Prop(RenderStyle::initial##Prop());\ + return;\ +} + +#define HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(prop, Prop) \ +HANDLE_INITIAL(prop, Prop) \ +else \ +HANDLE_INHERIT_ON_INHERITED_PROPERTY(prop, Prop) + + namespace khtml { CSSStyleSelectorList *CSSStyleSelector::s_defaultStyle; @@ -3953,6 +3973,13 @@ void CSSStyleSelector::applyRule( int id, DOM::CSSValueImpl *value ) break; } } + case CSS_PROP_WORD_WRAP: { + HANDLE_INITIAL_AND_INHERIT_ON_INHERITED_PROPERTY(wordWrap, WordWrap) + if (!primitiveValue) + return; + style->setWordWrap(primitiveValue->getIdent() == CSS_VAL_NORMAL ? WWNORMAL : WWBREAKWORD); + break; + } default: return; } |