+2012-01-16 Andreas Kling <awesomekling@apple.com>
+
+ CSSStyleSelector: Dodge parser when creating default LTR/RTL declarations.
+ <http://webkit.org/b/76374>
+
+ Reviewed by Antti Koivisto.
+
+ Pass CSSValueLtr/CSSValueRtl directly to setProperty() instead of parsing "ltr"/"rtl".
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::leftToRightDeclaration):
+ (WebCore::rightToLeftDeclaration):
+
2012-01-16 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix make distcheck.
static CSSMutableStyleDeclaration* leftToRightDeclaration()
{
DEFINE_STATIC_LOCAL(RefPtr<CSSMutableStyleDeclaration>, leftToRightDecl, (CSSMutableStyleDeclaration::create()));
- if (!leftToRightDecl->length()) {
- leftToRightDecl->setProperty(CSSPropertyDirection, "ltr", false);
- leftToRightDecl->setStrictParsing(false);
- }
+ if (!leftToRightDecl->length())
+ leftToRightDecl->setProperty(CSSPropertyDirection, CSSValueLtr);
return leftToRightDecl.get();
}
static CSSMutableStyleDeclaration* rightToLeftDeclaration()
{
DEFINE_STATIC_LOCAL(RefPtr<CSSMutableStyleDeclaration>, rightToLeftDecl, (CSSMutableStyleDeclaration::create()));
- if (!rightToLeftDecl->length()) {
- rightToLeftDecl->setProperty(CSSPropertyDirection, "rtl", false);
- rightToLeftDecl->setStrictParsing(false);
- }
+ if (!rightToLeftDecl->length())
+ rightToLeftDecl->setProperty(CSSPropertyDirection, CSSValueRtl);
return rightToLeftDecl.get();
}