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

Side by Side Diff: Source/core/css/resolver/ViewportStyleResolver.cpp

Issue 180003002: Consistently use on-heap collections for StyleRuleBase descendants. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed reviewers comments Created 6 years, 10 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) 2012-2013 Intel Corporation. All rights reserved. 2 * Copyright (C) 2012-2013 Intel Corporation. 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 ViewportStyleResolver::~ViewportStyleResolver() 52 ViewportStyleResolver::~ViewportStyleResolver()
53 { 53 {
54 } 54 }
55 55
56 void ViewportStyleResolver::collectViewportRules(RuleSet* rules, Origin origin) 56 void ViewportStyleResolver::collectViewportRules(RuleSet* rules, Origin origin)
57 { 57 {
58 rules->compactRulesIfNeeded(); 58 rules->compactRulesIfNeeded();
59 59
60 const Vector<StyleRuleViewport*>& viewportRules = rules->viewportRules(); 60 const WillBeHeapVector<RawPtrWillBeMember<StyleRuleViewport> >& viewportRule s = rules->viewportRules();
61 for (size_t i = 0; i < viewportRules.size(); ++i) 61 for (size_t i = 0; i < viewportRules.size(); ++i)
62 addViewportRule(viewportRules[i], origin); 62 addViewportRule(viewportRules[i], origin);
63 } 63 }
64 64
65 void ViewportStyleResolver::addViewportRule(StyleRuleViewport* viewportRule, Ori gin origin) 65 void ViewportStyleResolver::addViewportRule(StyleRuleViewport* viewportRule, Ori gin origin)
66 { 66 {
67 StylePropertySet* propertySet = viewportRule->mutableProperties(); 67 StylePropertySet* propertySet = viewportRule->mutableProperties();
68 68
69 unsigned propertyCount = propertySet->propertyCount(); 69 unsigned propertyCount = propertySet->propertyCount();
70 if (!propertyCount) 70 if (!propertyCount)
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 Length result = primitiveValue->convertToLength<AnyConversion>(CSSToLengthCo nversionData(documentStyle, documentStyle, width, height, 1.0f)); 201 Length result = primitiveValue->convertToLength<AnyConversion>(CSSToLengthCo nversionData(documentStyle, documentStyle, width, height, 1.0f));
202 if (documentStyle->hasViewportUnits()) 202 if (documentStyle->hasViewportUnits())
203 m_document->setHasViewportUnits(); 203 m_document->setHasViewportUnits();
204 documentStyle->setHasViewportUnits(documentStyleHasViewportUnits); 204 documentStyle->setHasViewportUnits(documentStyleHasViewportUnits);
205 205
206 return result; 206 return result;
207 } 207 }
208 208
209 } // namespace WebCore 209 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698