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

Side by Side Diff: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 2367293002: Changed EListStyleType to an enum class and renamed its members to keywords (Closed)
Patch Set: Final patch + formatting Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 7 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
8 * Copyright (C) 2015 Google Inc. All rights reserved. 8 * Copyright (C) 2015 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1474 for (const ContentData* contentData = style.contentData(); contentData; 1474 for (const ContentData* contentData = style.contentData(); contentData;
1475 contentData = contentData->next()) { 1475 contentData = contentData->next()) {
1476 if (contentData->isCounter()) { 1476 if (contentData->isCounter()) {
1477 const CounterContent* counter = 1477 const CounterContent* counter =
1478 toCounterContentData(contentData)->counter(); 1478 toCounterContentData(contentData)->counter();
1479 ASSERT(counter); 1479 ASSERT(counter);
1480 CSSCustomIdentValue* identifier = 1480 CSSCustomIdentValue* identifier =
1481 CSSCustomIdentValue::create(counter->identifier()); 1481 CSSCustomIdentValue::create(counter->identifier());
1482 CSSStringValue* separator = CSSStringValue::create(counter->separator()); 1482 CSSStringValue* separator = CSSStringValue::create(counter->separator());
1483 CSSValueID listStyleIdent = CSSValueNone; 1483 CSSValueID listStyleIdent = CSSValueNone;
1484 if (counter->listStyle() != NoneListStyle) 1484 if (counter->listStyle() != EListStyleType::NoneListStyle) {
1485 // TODO(sashab): Change this to use a converter instead of
1486 // CSSPrimitiveValueMappings.
1485 listStyleIdent = 1487 listStyleIdent =
1486 static_cast<CSSValueID>(CSSValueDisc + counter->listStyle()); 1488 CSSIdentifierValue::create(counter->listStyle())->getValueID();
1489 }
1487 CSSIdentifierValue* listStyle = 1490 CSSIdentifierValue* listStyle =
1488 CSSIdentifierValue::create(listStyleIdent); 1491 CSSIdentifierValue::create(listStyleIdent);
1489 list->append(*CSSCounterValue::create(identifier, listStyle, separator)); 1492 list->append(*CSSCounterValue::create(identifier, listStyle, separator));
1490 } else if (contentData->isImage()) { 1493 } else if (contentData->isImage()) {
1491 const StyleImage* image = toImageContentData(contentData)->image(); 1494 const StyleImage* image = toImageContentData(contentData)->image();
1492 ASSERT(image); 1495 ASSERT(image);
1493 list->append(*image->computedCSSValue()); 1496 list->append(*image->computedCSSValue());
1494 } else if (contentData->isText()) { 1497 } else if (contentData->isText()) {
1495 list->append( 1498 list->append(
1496 *CSSStringValue::create(toTextContentData(contentData)->text())); 1499 *CSSStringValue::create(toTextContentData(contentData)->text()));
(...skipping 2120 matching lines...) Expand 10 before | Expand all | Expand 10 after
3617 case CSSPropertyAll: 3620 case CSSPropertyAll:
3618 return nullptr; 3621 return nullptr;
3619 default: 3622 default:
3620 break; 3623 break;
3621 } 3624 }
3622 ASSERT_NOT_REACHED(); 3625 ASSERT_NOT_REACHED();
3623 return nullptr; 3626 return nullptr;
3624 } 3627 }
3625 3628
3626 } // namespace blink 3629 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698