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

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

Issue 807703003: Remove @media rules. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/StyleRule.h ('k') | sky/engine/core/css/StyleSheetContents.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 * (C) 2002-2003 Dirk Mueller (mueller@kde.org) 3 * (C) 2002-2003 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2002, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. 4 * Copyright (C) 2002, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 24 matching lines...) Expand all
35 35
36 void StyleRuleBase::destroy() 36 void StyleRuleBase::destroy()
37 { 37 {
38 switch (type()) { 38 switch (type()) {
39 case Style: 39 case Style:
40 delete toStyleRule(this); 40 delete toStyleRule(this);
41 return; 41 return;
42 case FontFace: 42 case FontFace:
43 delete toStyleRuleFontFace(this); 43 delete toStyleRuleFontFace(this);
44 return; 44 return;
45 case Media:
46 delete toStyleRuleMedia(this);
47 return;
48 case Supports: 45 case Supports:
49 delete toStyleRuleSupports(this); 46 delete toStyleRuleSupports(this);
50 return; 47 return;
51 case Keyframes: 48 case Keyframes:
52 delete toStyleRuleKeyframes(this); 49 delete toStyleRuleKeyframes(this);
53 return; 50 return;
54 case Unknown: 51 case Unknown:
55 case Keyframe:
56 ASSERT_NOT_REACHED(); 52 ASSERT_NOT_REACHED();
57 return; 53 return;
58 } 54 }
59 ASSERT_NOT_REACHED(); 55 ASSERT_NOT_REACHED();
60 } 56 }
61 57
62 unsigned StyleRule::averageSizeInBytes() 58 unsigned StyleRule::averageSizeInBytes()
63 { 59 {
64 return sizeof(StyleRule) + sizeof(CSSSelector) + StylePropertySet::averageSi zeInBytes(); 60 return sizeof(StyleRule) + sizeof(CSSSelector) + StylePropertySet::averageSi zeInBytes();
65 } 61 }
(...skipping 25 matching lines...) Expand all
91 { 87 {
92 m_properties = properties; 88 m_properties = properties;
93 } 89 }
94 90
95 StyleRuleGroup::StyleRuleGroup(Type type, Vector<RefPtr<StyleRuleBase> >& adoptR ule) 91 StyleRuleGroup::StyleRuleGroup(Type type, Vector<RefPtr<StyleRuleBase> >& adoptR ule)
96 : StyleRuleBase(type) 92 : StyleRuleBase(type)
97 { 93 {
98 m_childRules.swap(adoptRule); 94 m_childRules.swap(adoptRule);
99 } 95 }
100 96
101 StyleRuleMedia::StyleRuleMedia(PassRefPtr<MediaQuerySet> media, Vector<RefPtr<St yleRuleBase> >& adoptRules)
102 : StyleRuleGroup(Media, adoptRules)
103 , m_mediaQueries(media)
104 {
105 }
106
107 StyleRuleSupports::StyleRuleSupports(const String& conditionText, bool condition IsSupported, Vector<RefPtr<StyleRuleBase> >& adoptRules) 97 StyleRuleSupports::StyleRuleSupports(const String& conditionText, bool condition IsSupported, Vector<RefPtr<StyleRuleBase> >& adoptRules)
108 : StyleRuleGroup(Supports, adoptRules) 98 : StyleRuleGroup(Supports, adoptRules)
109 , m_conditionText(conditionText) 99 , m_conditionText(conditionText)
110 , m_conditionIsSupported(conditionIsSupported) 100 , m_conditionIsSupported(conditionIsSupported)
111 { 101 {
112 } 102 }
113 103
114 } // namespace blink 104 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/css/StyleRule.h ('k') | sky/engine/core/css/StyleSheetContents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698