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

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

Issue 14065029: Improved parse error handling for CSSMQ. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 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 | « Source/core/css/MediaList.h ('k') | no next file » | 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 } 197 }
198 return false; 198 return false;
199 } 199 }
200 200
201 void MediaQuerySet::addMediaQuery(PassOwnPtr<MediaQuery> mediaQuery) 201 void MediaQuerySet::addMediaQuery(PassOwnPtr<MediaQuery> mediaQuery)
202 { 202 {
203 m_queries.append(mediaQuery); 203 m_queries.append(mediaQuery);
204 } 204 }
205 205
206 void MediaQuerySet::replaceLastMediaQuery(PassOwnPtr<MediaQuery> mediaQuery)
207 {
208 m_queries.removeLast();
209 m_queries.append(mediaQuery);
210 }
211
206 String MediaQuerySet::mediaText() const 212 String MediaQuerySet::mediaText() const
207 { 213 {
208 StringBuilder text; 214 StringBuilder text;
209 215
210 bool first = true; 216 bool first = true;
211 for (size_t i = 0; i < m_queries.size(); ++i) { 217 for (size_t i = 0; i < m_queries.size(); ++i) {
212 if (!first) 218 if (!first)
213 text.appendLiteral(", "); 219 text.appendLiteral(", ");
214 else 220 else
215 first = false; 221 first = false;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 addResolutionWarningMessageToConsole(document, media QuerySet->mediaText(), primitiveValue); 361 addResolutionWarningMessageToConsole(document, media QuerySet->mediaText(), primitiveValue);
356 } 362 }
357 } 363 }
358 } 364 }
359 } 365 }
360 } 366 }
361 } 367 }
362 #endif 368 #endif
363 369
364 } 370 }
OLDNEW
« no previous file with comments | « Source/core/css/MediaList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698