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

Side by Side Diff: Source/bindings/v8/custom/V8CSSRuleCustom.cpp

Issue 16646002: Move the CSS Device Adaptation @viewport rule support behind a runtime flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google 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 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 #include "V8CSSFontFaceRule.h" 36 #include "V8CSSFontFaceRule.h"
37 #include "V8CSSHostRule.h" 37 #include "V8CSSHostRule.h"
38 #include "V8CSSImportRule.h" 38 #include "V8CSSImportRule.h"
39 #include "V8CSSKeyframeRule.h" 39 #include "V8CSSKeyframeRule.h"
40 #include "V8CSSKeyframesRule.h" 40 #include "V8CSSKeyframesRule.h"
41 #include "V8CSSMediaRule.h" 41 #include "V8CSSMediaRule.h"
42 #include "V8CSSPageRule.h" 42 #include "V8CSSPageRule.h"
43 #include "V8CSSRegionRule.h" 43 #include "V8CSSRegionRule.h"
44 #include "V8CSSStyleRule.h" 44 #include "V8CSSStyleRule.h"
45 #include "V8CSSSupportsRule.h" 45 #include "V8CSSSupportsRule.h"
46
47 #if ENABLE(CSS_DEVICE_ADAPTATION)
48 #include "V8CSSViewportRule.h" 46 #include "V8CSSViewportRule.h"
49 #endif
50 47
51 namespace WebCore { 48 namespace WebCore {
52 49
53 v8::Handle<v8::Object> wrap(CSSRule* impl, v8::Handle<v8::Object> creationContex t, v8::Isolate* isolate) 50 v8::Handle<v8::Object> wrap(CSSRule* impl, v8::Handle<v8::Object> creationContex t, v8::Isolate* isolate)
54 { 51 {
55 ASSERT(impl); 52 ASSERT(impl);
56 switch (impl->type()) { 53 switch (impl->type()) {
57 case CSSRule::UNKNOWN_RULE: 54 case CSSRule::UNKNOWN_RULE:
58 // CSSUnknownRule.idl is explicitly excluded as it doesn't add anything 55 // CSSUnknownRule.idl is explicitly excluded as it doesn't add anything
59 // over CSSRule.idl (see bindings/derived_sources.gyp: 'idl_files'). 56 // over CSSRule.idl (see bindings/derived_sources.gyp: 'idl_files').
(...skipping 10 matching lines...) Expand all
70 case CSSRule::FONT_FACE_RULE: 67 case CSSRule::FONT_FACE_RULE:
71 return wrap(static_cast<CSSFontFaceRule*>(impl), creationContext, isolat e); 68 return wrap(static_cast<CSSFontFaceRule*>(impl), creationContext, isolat e);
72 case CSSRule::PAGE_RULE: 69 case CSSRule::PAGE_RULE:
73 return wrap(static_cast<CSSPageRule*>(impl), creationContext, isolate); 70 return wrap(static_cast<CSSPageRule*>(impl), creationContext, isolate);
74 case CSSRule::WEBKIT_KEYFRAME_RULE: 71 case CSSRule::WEBKIT_KEYFRAME_RULE:
75 return wrap(static_cast<CSSKeyframeRule*>(impl), creationContext, isolat e); 72 return wrap(static_cast<CSSKeyframeRule*>(impl), creationContext, isolat e);
76 case CSSRule::WEBKIT_KEYFRAMES_RULE: 73 case CSSRule::WEBKIT_KEYFRAMES_RULE:
77 return wrap(static_cast<CSSKeyframesRule*>(impl), creationContext, isola te); 74 return wrap(static_cast<CSSKeyframesRule*>(impl), creationContext, isola te);
78 case CSSRule::SUPPORTS_RULE: 75 case CSSRule::SUPPORTS_RULE:
79 return wrap(static_cast<CSSSupportsRule*>(impl), creationContext, isolat e); 76 return wrap(static_cast<CSSSupportsRule*>(impl), creationContext, isolat e);
80 #if ENABLE(CSS_DEVICE_ADAPTATION)
81 case CSSRule::WEBKIT_VIEWPORT_RULE: 77 case CSSRule::WEBKIT_VIEWPORT_RULE:
82 return wrap(static_cast<WebKitCSSViewportRule*>(impl), creationContext, isolate); 78 return wrap(static_cast<CSSViewportRule*>(impl), creationContext, isolat e);
83 #endif
84 case CSSRule::WEBKIT_REGION_RULE: 79 case CSSRule::WEBKIT_REGION_RULE:
85 return wrap(static_cast<CSSRegionRule*>(impl), creationContext, isolate) ; 80 return wrap(static_cast<CSSRegionRule*>(impl), creationContext, isolate) ;
86 case CSSRule::HOST_RULE: 81 case CSSRule::HOST_RULE:
87 return wrap(static_cast<CSSHostRule*>(impl), creationContext, isolate); 82 return wrap(static_cast<CSSHostRule*>(impl), creationContext, isolate);
88 case CSSRule::WEBKIT_FILTER_RULE: 83 case CSSRule::WEBKIT_FILTER_RULE:
89 return wrap(static_cast<CSSFilterRule*>(impl), creationContext, isolate) ; 84 return wrap(static_cast<CSSFilterRule*>(impl), creationContext, isolate) ;
90 } 85 }
91 return V8CSSRule::createWrapper(impl, creationContext, isolate); 86 return V8CSSRule::createWrapper(impl, creationContext, isolate);
92 } 87 }
93 88
94 } // namespace WebCore 89 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/webexposed/global-constructors-listing-expected.txt ('k') | Source/core/css/CSSComputedStyleDeclaration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698