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

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

Issue 1778743003: Make <custom-ident> not insert quotes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also fix FontFace.cpp Created 4 years, 9 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/CSSCustomIdentValue.h" 5 #include "core/css/CSSCustomIdentValue.h"
6 6
7 #include "core/css/CSSMarkup.h" 7 #include "core/css/CSSMarkup.h"
8 #include "core/css/DOMWindowCSS.h"
8 #include "wtf/text/WTFString.h" 9 #include "wtf/text/WTFString.h"
9 10
10 namespace blink { 11 namespace blink {
11 12
12 CSSCustomIdentValue::CSSCustomIdentValue(const String& str) 13 CSSCustomIdentValue::CSSCustomIdentValue(const String& str)
13 : CSSValue(CustomIdentClass) 14 : CSSValue(CustomIdentClass)
14 , m_string(str) 15 , m_string(str)
15 , m_propertyId(CSSPropertyInvalid) { } 16 , m_propertyId(CSSPropertyInvalid) { }
16 17
17 CSSCustomIdentValue::CSSCustomIdentValue(CSSPropertyID id) 18 CSSCustomIdentValue::CSSCustomIdentValue(CSSPropertyID id)
18 : CSSValue(CustomIdentClass) 19 : CSSValue(CustomIdentClass)
19 , m_string() 20 , m_string()
20 , m_propertyId(id) 21 , m_propertyId(id)
21 { 22 {
22 ASSERT(isKnownPropertyID()); 23 ASSERT(isKnownPropertyID());
23 } 24 }
24 25
25 26
26 String CSSCustomIdentValue::customCSSText() const 27 String CSSCustomIdentValue::customCSSText() const
27 { 28 {
28 if (isKnownPropertyID()) 29 if (isKnownPropertyID())
29 return getPropertyNameAtomicString(m_propertyId); 30 return getPropertyNameAtomicString(m_propertyId);
30 return quoteCSSStringIfNeeded(m_string); 31 return DOMWindowCSS::escape(m_string);
Timothy Loh 2016/03/14 23:25:11 IMO we should call the underlying conversion funct
rwlbuis 2016/03/15 18:34:15 Done.
31 } 32 }
32 33
33 DEFINE_TRACE_AFTER_DISPATCH(CSSCustomIdentValue) 34 DEFINE_TRACE_AFTER_DISPATCH(CSSCustomIdentValue)
34 { 35 {
35 CSSValue::traceAfterDispatch(visitor); 36 CSSValue::traceAfterDispatch(visitor);
36 } 37 }
37 38
38 } // namespace blink 39 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698