Title: [92378] trunk/Source/WebCore
- Revision
- 92378
- Author
- [email protected]
- Date
- 2011-08-04 09:10:06 -0700 (Thu, 04 Aug 2011)
Log Message
Support cast between CSSPrimitiveValue and EborderFit, use in CSSStyleSelector.
https://bugs.webkit.org/show_bug.cgi?id=65665
Reviewed by Simon Fraser.
No new tests / refactoring only.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
Support cast from EBorderFit.
(WebCore::CSSPrimitiveValue::operator EBorderFit):
Support cast to EBorderFit.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):
Use new cast to allow use of appropriate macro.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (92377 => 92378)
--- trunk/Source/WebCore/ChangeLog 2011-08-04 16:09:00 UTC (rev 92377)
+++ trunk/Source/WebCore/ChangeLog 2011-08-04 16:10:06 UTC (rev 92378)
@@ -1,3 +1,21 @@
+2011-08-04 Luke Macpherson <[email protected]>
+
+ Support cast between CSSPrimitiveValue and EborderFit, use in CSSStyleSelector.
+ https://bugs.webkit.org/show_bug.cgi?id=65665
+
+ Reviewed by Simon Fraser.
+
+ No new tests / refactoring only.
+
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ Support cast from EBorderFit.
+ (WebCore::CSSPrimitiveValue::operator EBorderFit):
+ Support cast to EBorderFit.
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::applyProperty):
+ Use new cast to allow use of appropriate macro.
+
2011-08-04 Pavel Feldman <[email protected]>
Web Inspector: rename sendResultByValue to returnByValue in Runtime agent.
Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (92377 => 92378)
--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2011-08-04 16:09:00 UTC (rev 92377)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2011-08-04 16:10:06 UTC (rev 92378)
@@ -3030,6 +3030,33 @@
}
}
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBorderFit e)
+ : m_type(CSS_IDENT)
+ , m_hasCachedCSSText(false)
+{
+ switch (e) {
+ case BorderFitBorder:
+ m_value.ident = CSSValueBorder;
+ break;
+ case BorderFitLines:
+ m_value.ident = CSSValueLines;
+ break;
+ }
+}
+
+template<> inline CSSPrimitiveValue::operator EBorderFit() const
+{
+ switch (m_value.ident) {
+ case CSSValueBorder:
+ return BorderFitBorder;
+ case CSSValueLines:
+ return BorderFitLines;
+ default:
+ ASSERT_NOT_REACHED();
+ return BorderFitLines;
+ }
+}
+
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EImageRendering e)
: m_type(CSS_IDENT)
, m_hasCachedCSSText(false)
Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (92377 => 92378)
--- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-08-04 16:09:00 UTC (rev 92377)
+++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-08-04 16:10:06 UTC (rev 92378)
@@ -4787,14 +4787,9 @@
m_fontDirty = true;
return;
}
- case CSSPropertyWebkitBorderFit: {
- HANDLE_INHERIT_AND_INITIAL(borderFit, BorderFit);
- if (primitiveValue->getIdent() == CSSValueBorder)
- m_style->setBorderFit(BorderFitBorder);
- else
- m_style->setBorderFit(BorderFitLines);
+ case CSSPropertyWebkitBorderFit:
+ HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(borderFit, BorderFit);
return;
- }
case CSSPropertyWebkitTextSizeAdjust: {
HANDLE_INHERIT_AND_INITIAL(textSizeAdjust, TextSizeAdjust)
if (!primitiveValue || !primitiveValue->getIdent()) return;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes