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

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

Issue 1176713003: Make the CSS interface members static (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updating as per review comments Created 5 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
« no previous file with comments | « Source/core/css/DOMWindowCSS.h ('k') | Source/core/frame/DOMWindow.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 * Copyright (C) 2012 Motorola Mobility Inc. All rights reserved. 2 * Copyright (C) 2012 Motorola Mobility Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above 10 * 2. Redistributions in binary form must reproduce the above
(...skipping 19 matching lines...) Expand all
30 #include "config.h" 30 #include "config.h"
31 #include "core/css/DOMWindowCSS.h" 31 #include "core/css/DOMWindowCSS.h"
32 32
33 #include "core/css/CSSPropertyMetadata.h" 33 #include "core/css/CSSPropertyMetadata.h"
34 #include "core/css/StylePropertySet.h" 34 #include "core/css/StylePropertySet.h"
35 #include "core/css/parser/CSSParser.h" 35 #include "core/css/parser/CSSParser.h"
36 #include "wtf/text/WTFString.h" 36 #include "wtf/text/WTFString.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 PassRefPtrWillBeRawPtr<DOMWindowCSS> DOMWindowCSS::create() 40 bool DOMWindowCSS::supports(const String& property, const String& value)
41 {
42 return adoptRefWillBeNoop(new DOMWindowCSS());
43 }
44
45 bool DOMWindowCSS::supports(const String& property, const String& value) const
46 { 41 {
47 CSSPropertyID unresolvedProperty = unresolvedCSSPropertyID(property); 42 CSSPropertyID unresolvedProperty = unresolvedCSSPropertyID(property);
48 if (unresolvedProperty == CSSPropertyInvalid) 43 if (unresolvedProperty == CSSPropertyInvalid)
49 return false; 44 return false;
50 ASSERT(CSSPropertyMetadata::isEnabledProperty(unresolvedProperty)); 45 ASSERT(CSSPropertyMetadata::isEnabledProperty(unresolvedProperty));
51 46
52 // This will return false when !important is present 47 // This will return false when !important is present
53 RefPtrWillBeRawPtr<MutableStylePropertySet> dummyStyle = MutableStylePropert ySet::create(); 48 RefPtrWillBeRawPtr<MutableStylePropertySet> dummyStyle = MutableStylePropert ySet::create();
54 return CSSParser::parseValue(dummyStyle.get(), unresolvedProperty, value, fa lse, HTMLStandardMode, 0); 49 return CSSParser::parseValue(dummyStyle.get(), unresolvedProperty, value, fa lse, HTMLStandardMode, 0);
55 } 50 }
56 51
57 bool DOMWindowCSS::supports(const String& conditionText) const 52 bool DOMWindowCSS::supports(const String& conditionText)
58 { 53 {
59 return CSSParser::parseSupportsCondition(conditionText); 54 return CSSParser::parseSupportsCondition(conditionText);
60 } 55 }
61 56
62 } 57 }
OLDNEW
« no previous file with comments | « Source/core/css/DOMWindowCSS.h ('k') | Source/core/frame/DOMWindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698