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

Side by Side Diff: Source/core/dom/DOMImplementation.cpp

Issue 16325005: Remove the Media Query "forward compatibly syntax" support in alignment with HTML5 spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org) 6 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org)
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 doc->appendChild(documentElement.release()); 286 doc->appendChild(documentElement.release());
287 287
288 return doc.release(); 288 return doc.release();
289 } 289 }
290 290
291 PassRefPtr<CSSStyleSheet> DOMImplementation::createCSSStyleSheet(const String&, const String& media) 291 PassRefPtr<CSSStyleSheet> DOMImplementation::createCSSStyleSheet(const String&, const String& media)
292 { 292 {
293 // FIXME: Title should be set. 293 // FIXME: Title should be set.
294 // FIXME: Media could have wrong syntax, in which case we should generate an exception. 294 // FIXME: Media could have wrong syntax, in which case we should generate an exception.
295 RefPtr<CSSStyleSheet> sheet = CSSStyleSheet::create(StyleSheetContents::crea te()); 295 RefPtr<CSSStyleSheet> sheet = CSSStyleSheet::create(StyleSheetContents::crea te());
296 sheet->setMediaQueries(MediaQuerySet::createAllowingDescriptionSyntax(media) ); 296 sheet->setMediaQueries(MediaQuerySet::create(media));
297 return sheet; 297 return sheet;
298 } 298 }
299 299
300 bool DOMImplementation::isXMLMIMEType(const String& mimeType) 300 bool DOMImplementation::isXMLMIMEType(const String& mimeType)
301 { 301 {
302 if (mimeType == "text/xml" || mimeType == "application/xml" || mimeType == " text/xsl") 302 if (mimeType == "text/xml" || mimeType == "application/xml" || mimeType == " text/xsl")
303 return true; 303 return true;
304 304
305 // Per RFCs 3023 and 2045 a mime type is of the form: 305 // Per RFCs 3023 and 2045 a mime type is of the form:
306 // ^[0-9a-zA-Z_\\-+~!$\\^{}|.%'`#&*]+/[0-9a-zA-Z_\\-+~!$\\^{}|.%'`#&*]+\+xml $ 306 // ^[0-9a-zA-Z_\\-+~!$\\^{}|.%'`#&*]+/[0-9a-zA-Z_\\-+~!$\\^{}|.%'`#&*]+\+xml $
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 return TextDocument::create(frame, url); 417 return TextDocument::create(frame, url);
418 if (type == "image/svg+xml") 418 if (type == "image/svg+xml")
419 return SVGDocument::create(frame, url); 419 return SVGDocument::create(frame, url);
420 if (isXMLMIMEType(type)) 420 if (isXMLMIMEType(type))
421 return Document::create(frame, url); 421 return Document::create(frame, url);
422 422
423 return HTMLDocument::create(frame, url); 423 return HTMLDocument::create(frame, url);
424 } 424 }
425 425
426 } 426 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698