Commit 4241f184 authored by eric@webkit.org's avatar eric@webkit.org

2009-10-02 Laszlo Gombos <laszlo.1.gombos@nokia.com>

        Reviewed by Darin Adler.

        Build fix when SVG is not enabled
        https://bugs.webkit.org/show_bug.cgi?id=30011

        Move TextRenderingMode related functions out from
        the ENABLE(SVG) guard.

        * css/CSSPrimitiveValueMappings.h:
        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
        (WebCore::CSSPrimitiveValue::operator TextRenderingMode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 5fd42e65
2009-10-02 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Darin Adler.
Build fix when SVG is not enabled
https://bugs.webkit.org/show_bug.cgi?id=30011
Move TextRenderingMode related functions out from
the ENABLE(SVG) guard.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator TextRenderingMode):
2009-10-02 Kenneth Russell <kbr@google.com>
Reviewed by Oliver Hunt.
......@@ -1839,6 +1839,42 @@ template<> inline CSSPrimitiveValue::operator FontSmoothingMode() const
return AutoSmoothing;
}
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextRenderingMode e)
: m_type(CSS_IDENT)
{
switch (e) {
case AutoTextRendering:
m_value.ident = CSSValueAuto;
break;
case OptimizeSpeed:
m_value.ident = CSSValueOptimizespeed;
break;
case OptimizeLegibility:
m_value.ident = CSSValueOptimizelegibility;
break;
case GeometricPrecision:
m_value.ident = CSSValueGeometricprecision;
break;
}
}
template<> inline CSSPrimitiveValue::operator TextRenderingMode() const
{
switch (m_value.ident) {
case CSSValueAuto:
return AutoTextRendering;
case CSSValueOptimizespeed:
return OptimizeSpeed;
case CSSValueOptimizelegibility:
return OptimizeLegibility;
case CSSValueGeometricprecision:
return GeometricPrecision;
default:
ASSERT_NOT_REACHED();
return AutoTextRendering;
}
}
#if ENABLE(SVG)
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineCap e)
......@@ -2242,42 +2278,6 @@ template<> inline CSSPrimitiveValue::operator ETextAnchor() const
}
}
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextRenderingMode e)
: m_type(CSS_IDENT)
{
switch (e) {
case AutoTextRendering:
m_value.ident = CSSValueAuto;
break;
case OptimizeSpeed:
m_value.ident = CSSValueOptimizespeed;
break;
case OptimizeLegibility:
m_value.ident = CSSValueOptimizelegibility;
break;
case GeometricPrecision:
m_value.ident = CSSValueGeometricprecision;
break;
}
}
template<> inline CSSPrimitiveValue::operator TextRenderingMode() const
{
switch (m_value.ident) {
case CSSValueAuto:
return AutoTextRendering;
case CSSValueOptimizespeed:
return OptimizeSpeed;
case CSSValueOptimizelegibility:
return OptimizeLegibility;
case CSSValueGeometricprecision:
return GeometricPrecision;
default:
ASSERT_NOT_REACHED();
return AutoTextRendering;
}
}
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EWritingMode e)
: m_type(CSS_IDENT)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment