Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Unified Diff: sky/engine/core/css/CSSPrimitiveValueMappings.h

Issue 878303002: Remove more scrolling code from Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/css/CSSComputedStyleDeclaration.cpp ('k') | sky/engine/core/css/CSSProperties.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/CSSPrimitiveValueMappings.h
diff --git a/sky/engine/core/css/CSSPrimitiveValueMappings.h b/sky/engine/core/css/CSSPrimitiveValueMappings.h
index c6960ad0b7306cb5f8b85b46ad29ea43c06a54a3..ab1bde7c254d2367a00370e1dcfedecb16d77cbc 100644
--- a/sky/engine/core/css/CSSPrimitiveValueMappings.h
+++ b/sky/engine/core/css/CSSPrimitiveValueMappings.h
@@ -42,7 +42,6 @@
#include "sky/engine/platform/fonts/TextRenderingMode.h"
#include "sky/engine/platform/graphics/GraphicsTypes.h"
#include "sky/engine/platform/graphics/Path.h"
-#include "sky/engine/platform/scroll/ScrollTypes.h"
#include "sky/engine/platform/text/TextDirection.h"
#include "sky/engine/platform/text/UnicodeBidi.h"
#include "sky/engine/wtf/MathExtras.h"
@@ -304,9 +303,6 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFillAttachment e)
{
m_primitiveUnitType = CSS_VALUE_ID;
switch (e) {
- case ScrollBackgroundAttachment:
- m_value.valueID = CSSValueScroll;
- break;
case LocalBackgroundAttachment:
m_value.valueID = CSSValueLocal;
break;
@@ -320,8 +316,6 @@ template<> inline CSSPrimitiveValue::operator EFillAttachment() const
{
ASSERT(isValueID());
switch (m_value.valueID) {
- case CSSValueScroll:
- return ScrollBackgroundAttachment;
case CSSValueLocal:
return LocalBackgroundAttachment;
case CSSValueFixed:
@@ -331,7 +325,7 @@ template<> inline CSSPrimitiveValue::operator EFillAttachment() const
}
ASSERT_NOT_REACHED();
- return ScrollBackgroundAttachment;
+ return LocalBackgroundAttachment;
}
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFillBox e)
@@ -1450,9 +1444,6 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EOverflow e)
case OHIDDEN:
m_value.valueID = CSSValueHidden;
break;
- case OSCROLL:
- m_value.valueID = CSSValueScroll;
- break;
case OAUTO:
m_value.valueID = CSSValueAuto;
break;
@@ -1476,8 +1467,6 @@ template<> inline CSSPrimitiveValue::operator EOverflow() const
return OVISIBLE;
case CSSValueHidden:
return OHIDDEN;
- case CSSValueScroll:
- return OSCROLL;
case CSSValueAuto:
return OAUTO;
case CSSValueOverlay:
@@ -3442,38 +3431,6 @@ template<> inline CSSPrimitiveValue::operator OverflowAlignment() const
return OverflowAlignmentTrue;
}
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ScrollBehavior behavior)
- : CSSValue(PrimitiveClass)
-{
- m_primitiveUnitType = CSS_VALUE_ID;
- switch (behavior) {
- case ScrollBehaviorInstant:
- m_value.valueID = CSSValueInstant;
- break;
- case ScrollBehaviorSmooth:
- m_value.valueID = CSSValueSmooth;
- break;
- case ScrollBehaviorAuto:
- // Behavior 'auto' is only allowed in ScrollOptions arguments passed to
- // CSSOM scroll APIs.
- ASSERT_NOT_REACHED();
- }
-}
-
-template<> inline CSSPrimitiveValue::operator ScrollBehavior() const
-{
- switch (getValueID()) {
- case CSSValueInstant:
- return ScrollBehaviorInstant;
- case CSSValueSmooth:
- return ScrollBehaviorSmooth;
- default:
- break;
- }
- ASSERT_NOT_REACHED();
- return ScrollBehaviorInstant;
-}
-
}
#endif // SKY_ENGINE_CORE_CSS_CSSPRIMITIVEVALUEMAPPINGS_H_
« no previous file with comments | « sky/engine/core/css/CSSComputedStyleDeclaration.cpp ('k') | sky/engine/core/css/CSSProperties.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698