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

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

Issue 16209003: Unprefix the @viewport rule of CSS Device Adaptation 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
« no previous file with comments | « Source/core/css/CSSViewportRule.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 * Copyright (C) 2012 Intel Corporation. All rights reserved. 2 * Copyright (C) 2012 Intel Corporation. All rights reserved.
3 * Copyright (C) 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above 9 * 1. Redistributions of source code must retain the above
10 * copyright notice, this list of conditions and the following 10 * copyright notice, this list of conditions and the following
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 { 55 {
56 if (!m_propertiesCSSOMWrapper) 56 if (!m_propertiesCSSOMWrapper)
57 m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_viewpo rtRule->mutableProperties(), const_cast<CSSViewportRule*>(this)); 57 m_propertiesCSSOMWrapper = StyleRuleCSSStyleDeclaration::create(m_viewpo rtRule->mutableProperties(), const_cast<CSSViewportRule*>(this));
58 58
59 return m_propertiesCSSOMWrapper.get(); 59 return m_propertiesCSSOMWrapper.get();
60 } 60 }
61 61
62 String CSSViewportRule::cssText() const 62 String CSSViewportRule::cssText() const
63 { 63 {
64 StringBuilder result; 64 StringBuilder result;
65 result.appendLiteral("@-webkit-viewport { "); 65 result.appendLiteral("@viewport { ");
66 66
67 String decls = m_viewportRule->properties()->asText(); 67 String decls = m_viewportRule->properties()->asText();
68 result.append(decls); 68 result.append(decls);
69 if (!decls.isEmpty()) 69 if (!decls.isEmpty())
70 result.append(' '); 70 result.append(' ');
71 71
72 result.append('}'); 72 result.append('}');
73 73
74 return result.toString(); 74 return result.toString();
75 } 75 }
(...skipping 10 matching lines...) Expand all
86 86
87 void CSSViewportRule::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) cons t 87 void CSSViewportRule::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) cons t
88 { 88 {
89 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS); 89 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
90 CSSRule::reportMemoryUsage(memoryObjectInfo); 90 CSSRule::reportMemoryUsage(memoryObjectInfo);
91 info.addMember(m_viewportRule, "viewportRule"); 91 info.addMember(m_viewportRule, "viewportRule");
92 info.addMember(m_propertiesCSSOMWrapper, "propertiesCSSOMWrapper"); 92 info.addMember(m_propertiesCSSOMWrapper, "propertiesCSSOMWrapper");
93 } 93 }
94 94
95 } // namespace WebCore 95 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/css/CSSViewportRule.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698