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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 2694333003: Remove enum ordering dependency in StyleBuilderCustom. (Closed)
Patch Set: Rebase Created 3 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
index a3a30d32fc9b66732991169e3afd08788d2e5818..03f56267d089ae1b4c8c6cc474c0afdd475f3803 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -38,6 +38,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <memory>
#include "core/CSSPropertyNames.h"
#include "core/CSSValueKeywords.h"
#include "core/StyleBuilderFunctions.h"
@@ -53,6 +54,7 @@
#include "core/css/CSSPendingSubstitutionValue.h"
#include "core/css/CSSPrimitiveValueMappings.h"
#include "core/css/CSSPropertyMetadata.h"
+#include "core/css/CSSValueIDMappings.h"
#include "core/css/CSSVariableReferenceValue.h"
#include "core/css/PropertyRegistration.h"
#include "core/css/PropertyRegistry.h"
@@ -79,7 +81,6 @@
#include "wtf/PtrUtil.h"
#include "wtf/StdLibExtras.h"
#include "wtf/Vector.h"
-#include <memory>
namespace blink {
@@ -758,11 +759,8 @@ void StyleBuilderFunctions::applyValueCSSPropertyContent(
ContentData::create(state.styleImage(CSSPropertyContent, *item));
} else if (item->isCounterValue()) {
const CSSCounterValue* counterValue = toCSSCounterValue(item.get());
- EListStyleType listStyleType = EListStyleType::kNone;
- CSSValueID listStyleIdent = counterValue->listStyle();
- if (listStyleIdent != CSSValueNone)
- listStyleType =
- static_cast<EListStyleType>(listStyleIdent - CSSValueDisc);
+ const auto listStyleType =
+ cssValueIDToPlatformEnum<EListStyleType>(counterValue->listStyle());
std::unique_ptr<CounterContent> counter =
WTF::wrapUnique(new CounterContent(
AtomicString(counterValue->identifier()), listStyleType,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698