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

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

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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 * CSS Media Query 2 * CSS Media Query
3 * 3 *
4 * Copyright (C) 2005, 2006 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>. 4 * Copyright (C) 2005, 2006 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>.
5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 15 matching lines...) Expand all
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #include "core/css/MediaQuery.h" 29 #include "core/css/MediaQuery.h"
30 30
31 #include "core/MediaTypeNames.h" 31 #include "core/MediaTypeNames.h"
32 #include "core/css/MediaQueryExp.h" 32 #include "core/css/MediaQueryExp.h"
33 #include "core/html/parser/HTMLParserIdioms.h" 33 #include "core/html/parser/HTMLParserIdioms.h"
34 #include "wtf/NonCopyingSort.h" 34 #include "wtf/NonCopyingSort.h"
35 #include "wtf/text/StringBuilder.h" 35 #include "wtf/text/StringBuilder.h"
36 #include <memory>
36 37
37 namespace blink { 38 namespace blink {
38 39
39 // http://dev.w3.org/csswg/cssom/#serialize-a-media-query 40 // http://dev.w3.org/csswg/cssom/#serialize-a-media-query
40 String MediaQuery::serialize() const 41 String MediaQuery::serialize() const
41 { 42 {
42 StringBuilder result; 43 StringBuilder result;
43 switch (m_restrictor) { 44 switch (m_restrictor) {
44 case MediaQuery::Only: 45 case MediaQuery::Only:
45 result.append("only "); 46 result.append("only ");
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 String MediaQuery::cssText() const 128 String MediaQuery::cssText() const
128 { 129 {
129 if (m_serializationCache.isNull()) 130 if (m_serializationCache.isNull())
130 const_cast<MediaQuery*>(this)->m_serializationCache = serialize(); 131 const_cast<MediaQuery*>(this)->m_serializationCache = serialize();
131 132
132 return m_serializationCache; 133 return m_serializationCache;
133 } 134 }
134 135
135 DEFINE_TRACE(MediaQuery) 136 DEFINE_TRACE(MediaQuery)
136 { 137 {
137 // We don't support tracing of vectors of OwnPtrs (ie. OwnPtr<Vector<OwnPtr< MediaQuery>>>). 138 // We don't support tracing of vectors of OwnPtrs (ie. std::unique_ptr<Vecto r<std::unique_ptr<MediaQuery>>>).
138 // Since this is a transitional object we are just ifdef'ing it out when oil pan is not enabled. 139 // Since this is a transitional object we are just ifdef'ing it out when oil pan is not enabled.
139 visitor->trace(m_expressions); 140 visitor->trace(m_expressions);
140 } 141 }
141 142
142 } // namespace blink 143 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaQuery.h ('k') | third_party/WebKit/Source/core/css/MediaQueryEvaluatorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698