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

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 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after
3649 case CSSPropertyAll: 3649 case CSSPropertyAll:
3650 return nullptr; 3650 return nullptr;
3651 default: 3651 default:
3652 break; 3652 break;
3653 } 3653 }
3654 ASSERT_NOT_REACHED(); 3654 ASSERT_NOT_REACHED();
3655 return nullptr; 3655 return nullptr;
3656 } 3656 }
3657 3657
3658 } // namespace blink 3658 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSProperty.cpp ('k') | third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698