OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |