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

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

Issue 2614883007: Change computed style enums to be prefixed with 'k'. (Closed)
Patch Set: Rebase on ToT. Created 3 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 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 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after
1475 for (const ContentData* contentData = style.contentData(); contentData; 1475 for (const ContentData* contentData = style.contentData(); contentData;
1476 contentData = contentData->next()) { 1476 contentData = contentData->next()) {
1477 if (contentData->isCounter()) { 1477 if (contentData->isCounter()) {
1478 const CounterContent* counter = 1478 const CounterContent* counter =
1479 toCounterContentData(contentData)->counter(); 1479 toCounterContentData(contentData)->counter();
1480 ASSERT(counter); 1480 ASSERT(counter);
1481 CSSCustomIdentValue* identifier = 1481 CSSCustomIdentValue* identifier =
1482 CSSCustomIdentValue::create(counter->identifier()); 1482 CSSCustomIdentValue::create(counter->identifier());
1483 CSSStringValue* separator = CSSStringValue::create(counter->separator()); 1483 CSSStringValue* separator = CSSStringValue::create(counter->separator());
1484 CSSValueID listStyleIdent = CSSValueNone; 1484 CSSValueID listStyleIdent = CSSValueNone;
1485 if (counter->listStyle() != EListStyleType::None) { 1485 if (counter->listStyle() != EListStyleType::kNone) {
1486 // TODO(sashab): Change this to use a converter instead of 1486 // TODO(sashab): Change this to use a converter instead of
1487 // CSSPrimitiveValueMappings. 1487 // CSSPrimitiveValueMappings.
1488 listStyleIdent = 1488 listStyleIdent =
1489 CSSIdentifierValue::create(counter->listStyle())->getValueID(); 1489 CSSIdentifierValue::create(counter->listStyle())->getValueID();
1490 } 1490 }
1491 CSSIdentifierValue* listStyle = 1491 CSSIdentifierValue* listStyle =
1492 CSSIdentifierValue::create(listStyleIdent); 1492 CSSIdentifierValue::create(listStyleIdent);
1493 list->append(*CSSCounterValue::create(identifier, listStyle, separator)); 1493 list->append(*CSSCounterValue::create(identifier, listStyle, separator));
1494 } else if (contentData->isImage()) { 1494 } else if (contentData->isImage()) {
1495 const StyleImage* image = toImageContentData(contentData)->image(); 1495 const StyleImage* image = toImageContentData(contentData)->image();
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
2107 CSSValueList* list = CSSValueList::createCommaSeparated(); 2107 CSSValueList* list = CSSValueList::createCommaSeparated();
2108 const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskPositionY 2108 const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskPositionY
2109 ? &style.maskLayers() 2109 ? &style.maskLayers()
2110 : &style.backgroundLayers(); 2110 : &style.backgroundLayers();
2111 for (; currLayer; currLayer = currLayer->next()) 2111 for (; currLayer; currLayer = currLayer->next())
2112 list->append( 2112 list->append(
2113 *zoomAdjustedPixelValueForLength(currLayer->yPosition(), style)); 2113 *zoomAdjustedPixelValueForLength(currLayer->yPosition(), style));
2114 return list; 2114 return list;
2115 } 2115 }
2116 case CSSPropertyBorderCollapse: 2116 case CSSPropertyBorderCollapse:
2117 if (style.borderCollapse() == EBorderCollapse::Collapse) 2117 if (style.borderCollapse() == EBorderCollapse::kCollapse)
2118 return CSSIdentifierValue::create(CSSValueCollapse); 2118 return CSSIdentifierValue::create(CSSValueCollapse);
2119 return CSSIdentifierValue::create(CSSValueSeparate); 2119 return CSSIdentifierValue::create(CSSValueSeparate);
2120 case CSSPropertyBorderSpacing: { 2120 case CSSPropertyBorderSpacing: {
2121 CSSValueList* list = CSSValueList::createSpaceSeparated(); 2121 CSSValueList* list = CSSValueList::createSpaceSeparated();
2122 list->append( 2122 list->append(
2123 *zoomAdjustedPixelValue(style.horizontalBorderSpacing(), style)); 2123 *zoomAdjustedPixelValue(style.horizontalBorderSpacing(), style));
2124 list->append( 2124 list->append(
2125 *zoomAdjustedPixelValue(style.verticalBorderSpacing(), style)); 2125 *zoomAdjustedPixelValue(style.verticalBorderSpacing(), style));
2126 return list; 2126 return list;
2127 } 2127 }
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
3643 case CSSPropertyAll: 3643 case CSSPropertyAll:
3644 return nullptr; 3644 return nullptr;
3645 default: 3645 default:
3646 break; 3646 break;
3647 } 3647 }
3648 ASSERT_NOT_REACHED(); 3648 ASSERT_NOT_REACHED();
3649 return nullptr; 3649 return nullptr;
3650 } 3650 }
3651 3651
3652 } // namespace blink 3652 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698