summaryrefslogtreecommitdiffstats
path: root/khtml/css/cssstyleselector.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-03 17:11:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-03 17:11:27 +0000
commitd0abc1a165ce7130e802d892e1417617a99a3ba0 (patch)
tree7dc885cf1d4bca7a30bfa8877164008c4966f6b3 /khtml/css/cssstyleselector.cpp
parentc5415f69834f13834179331af41329980fe8a3e8 (diff)
downloadtdelibs-d0abc1a165ce7130e802d892e1417617a99a3ba0.tar.gz
tdelibs-d0abc1a165ce7130e802d892e1417617a99a3ba0.zip
Merge commit 1170303 from the Enterprise branch
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1171389 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khtml/css/cssstyleselector.cpp')
-rw-r--r--khtml/css/cssstyleselector.cpp27
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;
}