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

Side by Side Diff: Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 100463004: Make calls to AtomicString(const String&) explicit in css/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make MediaQuery::mediaType() return an AtomicString Created 7 years 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org>
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved.
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 return; 784 return;
785 } 785 }
786 786
787 if (!value->isPrimitiveValue()) 787 if (!value->isPrimitiveValue())
788 return; 788 return;
789 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 789 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
790 790
791 if (primitiveValue->isString()) { 791 if (primitiveValue->isString()) {
792 state.style()->setTextEmphasisFill(TextEmphasisFillFilled); 792 state.style()->setTextEmphasisFill(TextEmphasisFillFilled);
793 state.style()->setTextEmphasisMark(TextEmphasisMarkCustom); 793 state.style()->setTextEmphasisMark(TextEmphasisMarkCustom);
794 state.style()->setTextEmphasisCustomMark(primitiveValue->getStringValue( )); 794 state.style()->setTextEmphasisCustomMark(AtomicString(primitiveValue->ge tStringValue()));
795 return; 795 return;
796 } 796 }
797 797
798 state.style()->setTextEmphasisCustomMark(nullAtom); 798 state.style()->setTextEmphasisCustomMark(nullAtom);
799 799
800 if (primitiveValue->getValueID() == CSSValueFilled || primitiveValue->getVal ueID() == CSSValueOpen) { 800 if (primitiveValue->getValueID() == CSSValueFilled || primitiveValue->getVal ueID() == CSSValueOpen) {
801 state.style()->setTextEmphasisFill(*primitiveValue); 801 state.style()->setTextEmphasisFill(*primitiveValue);
802 state.style()->setTextEmphasisMark(TextEmphasisMarkAuto); 802 state.style()->setTextEmphasisMark(TextEmphasisMarkAuto);
803 } else { 803 } else {
804 state.style()->setTextEmphasisFill(TextEmphasisFillFilled); 804 state.style()->setTextEmphasisFill(TextEmphasisFillFilled);
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1251 state.style()->setContent(value.isNull() ? emptyString() : v alue.string(), didSet); 1251 state.style()->setContent(value.isNull() ? emptyString() : v alue.string(), didSet);
1252 didSet = true; 1252 didSet = true;
1253 // register the fact that the attribute value affects the st yle 1253 // register the fact that the attribute value affects the st yle
1254 state.contentAttrValues().append(attr.localName()); 1254 state.contentAttrValues().append(attr.localName());
1255 } else if (contentValue->isCounter()) { 1255 } else if (contentValue->isCounter()) {
1256 Counter* counterValue = contentValue->getCounterValue(); 1256 Counter* counterValue = contentValue->getCounterValue();
1257 EListStyleType listStyleType = NoneListStyle; 1257 EListStyleType listStyleType = NoneListStyle;
1258 CSSValueID listStyleIdent = counterValue->listStyleIdent(); 1258 CSSValueID listStyleIdent = counterValue->listStyleIdent();
1259 if (listStyleIdent != CSSValueNone) 1259 if (listStyleIdent != CSSValueNone)
1260 listStyleType = static_cast<EListStyleType>(listStyleIde nt - CSSValueDisc); 1260 listStyleType = static_cast<EListStyleType>(listStyleIde nt - CSSValueDisc);
1261 OwnPtr<CounterContent> counter = adoptPtr(new CounterContent (counterValue->identifier(), listStyleType, counterValue->separator())); 1261 OwnPtr<CounterContent> counter = adoptPtr(new CounterContent (AtomicString(counterValue->identifier()), listStyleType, AtomicString(counterVa lue->separator())));
1262 state.style()->setContent(counter.release(), didSet); 1262 state.style()->setContent(counter.release(), didSet);
1263 didSet = true; 1263 didSet = true;
1264 } else { 1264 } else {
1265 switch (contentValue->getValueID()) { 1265 switch (contentValue->getValueID()) {
1266 case CSSValueOpenQuote: 1266 case CSSValueOpenQuote:
1267 state.style()->setContent(OPEN_QUOTE, didSet); 1267 state.style()->setContent(OPEN_QUOTE, didSet);
1268 didSet = true; 1268 didSet = true;
1269 break; 1269 break;
1270 case CSSValueCloseQuote: 1270 case CSSValueCloseQuote:
1271 state.style()->setContent(CLOSE_QUOTE, didSet); 1271 state.style()->setContent(CLOSE_QUOTE, didSet);
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 return; 1401 return;
1402 case CSSPropertyUnicodeRange: // Only used in @font-face rules. 1402 case CSSPropertyUnicodeRange: // Only used in @font-face rules.
1403 return; 1403 return;
1404 case CSSPropertyWebkitLocale: { 1404 case CSSPropertyWebkitLocale: {
1405 HANDLE_INHERIT_AND_INITIAL(locale, Locale); 1405 HANDLE_INHERIT_AND_INITIAL(locale, Locale);
1406 if (!primitiveValue) 1406 if (!primitiveValue)
1407 return; 1407 return;
1408 if (primitiveValue->getValueID() == CSSValueAuto) 1408 if (primitiveValue->getValueID() == CSSValueAuto)
1409 state.style()->setLocale(nullAtom); 1409 state.style()->setLocale(nullAtom);
1410 else 1410 else
1411 state.style()->setLocale(primitiveValue->getStringValue()); 1411 state.style()->setLocale(AtomicString(primitiveValue->getStringValue ()));
1412 state.fontBuilder().setScript(state.style()->locale()); 1412 state.fontBuilder().setScript(state.style()->locale());
1413 return; 1413 return;
1414 } 1414 }
1415 case CSSPropertyWebkitAppRegion: { 1415 case CSSPropertyWebkitAppRegion: {
1416 if (!primitiveValue || !primitiveValue->getValueID()) 1416 if (!primitiveValue || !primitiveValue->getValueID())
1417 return; 1417 return;
1418 state.style()->setDraggableRegionMode(primitiveValue->getValueID() == CS SValueDrag ? DraggableRegionDrag : DraggableRegionNoDrag); 1418 state.style()->setDraggableRegionMode(primitiveValue->getValueID() == CS SValueDrag ? DraggableRegionDrag : DraggableRegionNoDrag);
1419 state.document().setHasAnnotatedRegions(true); 1419 state.document().setHasAnnotatedRegions(true);
1420 return; 1420 return;
1421 } 1421 }
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
2170 break; 2170 break;
2171 } 2171 }
2172 case CSSPropertyEnableBackground: 2172 case CSSPropertyEnableBackground:
2173 // Silently ignoring this property for now 2173 // Silently ignoring this property for now
2174 // http://bugs.webkit.org/show_bug.cgi?id=6022 2174 // http://bugs.webkit.org/show_bug.cgi?id=6022
2175 break; 2175 break;
2176 } 2176 }
2177 } 2177 }
2178 2178
2179 } // namespace WebCore 2179 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698