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

Side by Side Diff: Source/core/css/DOMWindowCSS.cpp

Issue 1312843008: Remove CSSParserMode argument on CSSParser::parseValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Motorola Mobility Inc. All rights reserved. 2 * Copyright (C) 2012 Motorola Mobility Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above 10 * 2. Redistributions in binary form must reproduce the above
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 namespace blink { 42 namespace blink {
43 43
44 bool DOMWindowCSS::supports(const String& property, const String& value) 44 bool DOMWindowCSS::supports(const String& property, const String& value)
45 { 45 {
46 CSSPropertyID unresolvedProperty = unresolvedCSSPropertyID(property); 46 CSSPropertyID unresolvedProperty = unresolvedCSSPropertyID(property);
47 if (unresolvedProperty == CSSPropertyInvalid) 47 if (unresolvedProperty == CSSPropertyInvalid)
48 return false; 48 return false;
49 ASSERT(CSSPropertyMetadata::isEnabledProperty(unresolvedProperty)); 49 ASSERT(CSSPropertyMetadata::isEnabledProperty(unresolvedProperty));
50 50
51 // This will return false when !important is present 51 // This will return false when !important is present
52 RefPtrWillBeRawPtr<MutableStylePropertySet> dummyStyle = MutableStylePropert ySet::create(HTMLQuirksMode); 52 RefPtrWillBeRawPtr<MutableStylePropertySet> dummyStyle = MutableStylePropert ySet::create(HTMLStandardMode);
53 return CSSParser::parseValue(dummyStyle.get(), unresolvedProperty, value, fa lse, HTMLStandardMode, 0); 53 return CSSParser::parseValue(dummyStyle.get(), unresolvedProperty, value, fa lse, 0);
54 } 54 }
55 55
56 bool DOMWindowCSS::supports(const String& conditionText) 56 bool DOMWindowCSS::supports(const String& conditionText)
57 { 57 {
58 return CSSParser::parseSupportsCondition(conditionText); 58 return CSSParser::parseSupportsCondition(conditionText);
59 } 59 }
60 60
61 String DOMWindowCSS::escape(const String& ident, ExceptionState& exceptionState) 61 String DOMWindowCSS::escape(const String& ident, ExceptionState& exceptionState)
62 { 62 {
63 StringBuilder builder; 63 StringBuilder builder;
64 if (!serializeIdentifier(ident, builder)) { 64 if (!serializeIdentifier(ident, builder)) {
65 exceptionState.throwDOMException(InvalidCharacterError, "The string cont ains an invalid character."); 65 exceptionState.throwDOMException(InvalidCharacterError, "The string cont ains an invalid character.");
66 return String(); 66 return String();
67 } 67 }
68 return builder.toString(); 68 return builder.toString();
69 } 69 }
70 70
71 } 71 }
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698