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

Side by Side Diff: sky/engine/core/css/MediaList.cpp

Issue 723253004: Remove tons of OILPAN. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/css/MediaList.h ('k') | sky/engine/core/css/MediaQuery.h » ('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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2006, 2010, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2006, 2010, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 for (size_t i = 0; i < m_queries.size(); ++i) { 162 for (size_t i = 0; i < m_queries.size(); ++i) {
163 if (!first) 163 if (!first)
164 text.appendLiteral(", "); 164 text.appendLiteral(", ");
165 else 165 else
166 first = false; 166 first = false;
167 text.append(m_queries[i]->cssText()); 167 text.append(m_queries[i]->cssText());
168 } 168 }
169 return text.toString(); 169 return text.toString();
170 } 170 }
171 171
172 void MediaQuerySet::trace(Visitor* visitor)
173 {
174 }
175
176 MediaList::MediaList(MediaQuerySet* mediaQueries, CSSStyleSheet* parentSheet) 172 MediaList::MediaList(MediaQuerySet* mediaQueries, CSSStyleSheet* parentSheet)
177 : m_mediaQueries(mediaQueries) 173 : m_mediaQueries(mediaQueries)
178 , m_parentStyleSheet(parentSheet) 174 , m_parentStyleSheet(parentSheet)
179 , m_parentRule(nullptr) 175 , m_parentRule(nullptr)
180 { 176 {
181 } 177 }
182 178
183 MediaList::MediaList(MediaQuerySet* mediaQueries, CSSRule* parentRule) 179 MediaList::MediaList(MediaQuerySet* mediaQueries, CSSRule* parentRule)
184 : m_mediaQueries(mediaQueries) 180 : m_mediaQueries(mediaQueries)
185 , m_parentStyleSheet(nullptr) 181 , m_parentStyleSheet(nullptr)
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 if (m_parentStyleSheet) 231 if (m_parentStyleSheet)
236 m_parentStyleSheet->didMutate(); 232 m_parentStyleSheet->didMutate();
237 } 233 }
238 234
239 void MediaList::reattach(MediaQuerySet* mediaQueries) 235 void MediaList::reattach(MediaQuerySet* mediaQueries)
240 { 236 {
241 ASSERT(mediaQueries); 237 ASSERT(mediaQueries);
242 m_mediaQueries = mediaQueries; 238 m_mediaQueries = mediaQueries;
243 } 239 }
244 240
245 void MediaList::trace(Visitor* visitor)
246 {
247 visitor->trace(m_mediaQueries);
248 visitor->trace(m_parentStyleSheet);
249 visitor->trace(m_parentRule);
250 }
251
252 static void addResolutionWarningMessageToConsole(Document* document, const Strin g& serializedExpression, CSSPrimitiveValue::UnitType type) 241 static void addResolutionWarningMessageToConsole(Document* document, const Strin g& serializedExpression, CSSPrimitiveValue::UnitType type)
253 { 242 {
254 ASSERT(document); 243 ASSERT(document);
255 244
256 DEFINE_STATIC_LOCAL(String, mediaQueryMessage, ("Consider using 'dppx' units , as in CSS '%replacementUnits%' means dots-per-CSS-%lengthUnit%, not dots-per-p hysical-%lengthUnit%, so does not correspond to the actual '%replacementUnits%' of a screen. In media query expression: ")); 245 DEFINE_STATIC_LOCAL(String, mediaQueryMessage, ("Consider using 'dppx' units , as in CSS '%replacementUnits%' means dots-per-CSS-%lengthUnit%, not dots-per-p hysical-%lengthUnit%, so does not correspond to the actual '%replacementUnits%' of a screen. In media query expression: "));
257 DEFINE_STATIC_LOCAL(String, mediaValueDPI, ("dpi")); 246 DEFINE_STATIC_LOCAL(String, mediaValueDPI, ("dpi"));
258 DEFINE_STATIC_LOCAL(String, mediaValueDPCM, ("dpcm")); 247 DEFINE_STATIC_LOCAL(String, mediaValueDPCM, ("dpcm"));
259 DEFINE_STATIC_LOCAL(String, lengthUnitInch, ("inch")); 248 DEFINE_STATIC_LOCAL(String, lengthUnitInch, ("inch"));
260 DEFINE_STATIC_LOCAL(String, lengthUnitCentimeter, ("centimeter")); 249 DEFINE_STATIC_LOCAL(String, lengthUnitCentimeter, ("centimeter"));
261 250
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 } 299 }
311 } 300 }
312 } 301 }
313 } 302 }
314 303
315 if (suspiciousType && !dotsPerPixelUsed) 304 if (suspiciousType && !dotsPerPixelUsed)
316 addResolutionWarningMessageToConsole(document, mediaQuerySet->mediaText( ), suspiciousType); 305 addResolutionWarningMessageToConsole(document, mediaQuerySet->mediaText( ), suspiciousType);
317 } 306 }
318 307
319 } 308 }
OLDNEW
« no previous file with comments | « sky/engine/core/css/MediaList.h ('k') | sky/engine/core/css/MediaQuery.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698