OLD | NEW |
---|---|
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2012 Apple Inc. All rights reserv ed. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2012 Apple Inc. All rights reserv ed. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
396 | 396 |
397 void CSSPrimitiveValue::init(PassRefPtrWillBeRawPtr<Counter> c) | 397 void CSSPrimitiveValue::init(PassRefPtrWillBeRawPtr<Counter> c) |
398 { | 398 { |
399 m_primitiveUnitType = CSS_COUNTER; | 399 m_primitiveUnitType = CSS_COUNTER; |
400 m_hasCachedCSSText = false; | 400 m_hasCachedCSSText = false; |
401 m_value.counter = c.leakRef(); | 401 m_value.counter = c.leakRef(); |
402 } | 402 } |
403 | 403 |
404 void CSSPrimitiveValue::init(PassRefPtrWillBeRawPtr<Rect> r) | 404 void CSSPrimitiveValue::init(PassRefPtrWillBeRawPtr<Rect> r) |
405 { | 405 { |
406 | |
haraken
2014/03/24 13:52:54
Unnecessary edit.
Mads Ager (chromium)
2014/03/24 14:27:30
Removed.
| |
406 m_primitiveUnitType = CSS_RECT; | 407 m_primitiveUnitType = CSS_RECT; |
407 m_hasCachedCSSText = false; | 408 m_hasCachedCSSText = false; |
408 m_value.rect = r.leakRef(); | 409 m_value.rect = r.leakRef(); |
409 } | 410 } |
410 | 411 |
411 void CSSPrimitiveValue::init(PassRefPtrWillBeRawPtr<Quad> quad) | 412 void CSSPrimitiveValue::init(PassRefPtrWillBeRawPtr<Quad> quad) |
412 { | 413 { |
413 m_primitiveUnitType = CSS_QUAD; | 414 m_primitiveUnitType = CSS_QUAD; |
414 m_hasCachedCSSText = false; | 415 m_hasCachedCSSText = false; |
415 m_value.quad = quad.leakRef(); | 416 m_value.quad = quad.leakRef(); |
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1134 } | 1135 } |
1135 | 1136 |
1136 ASSERT(!cssTextCache().contains(this)); | 1137 ASSERT(!cssTextCache().contains(this)); |
1137 cssTextCache().set(this, text); | 1138 cssTextCache().set(this, text); |
1138 m_hasCachedCSSText = true; | 1139 m_hasCachedCSSText = true; |
1139 return text; | 1140 return text; |
1140 } | 1141 } |
1141 | 1142 |
1142 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPrimitiveValue::cloneForCSSOM() con st | 1143 PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPrimitiveValue::cloneForCSSOM() con st |
1143 { | 1144 { |
1144 RefPtrWillBeRawPtr<CSSPrimitiveValue> result; | 1145 RefPtrWillBeRawPtr<CSSPrimitiveValue> result = nullptr; |
1145 | 1146 |
1146 switch (m_primitiveUnitType) { | 1147 switch (m_primitiveUnitType) { |
1147 case CSS_STRING: | 1148 case CSS_STRING: |
1148 case CSS_URI: | 1149 case CSS_URI: |
1149 case CSS_ATTR: | 1150 case CSS_ATTR: |
1150 case CSS_COUNTER_NAME: | 1151 case CSS_COUNTER_NAME: |
1151 result = CSSPrimitiveValue::create(m_value.string, static_cast<UnitTypes >(m_primitiveUnitType)); | 1152 result = CSSPrimitiveValue::create(m_value.string, static_cast<UnitTypes >(m_primitiveUnitType)); |
1152 break; | 1153 break; |
1153 case CSS_COUNTER: | 1154 case CSS_COUNTER: |
1154 result = CSSPrimitiveValue::create(m_value.counter->cloneForCSSOM()); | 1155 result = CSSPrimitiveValue::create(m_value.counter->cloneForCSSOM()); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1315 case CSS_SHAPE: | 1316 case CSS_SHAPE: |
1316 visitor->trace(m_value.shape); | 1317 visitor->trace(m_value.shape); |
1317 break; | 1318 break; |
1318 default: | 1319 default: |
1319 break; | 1320 break; |
1320 } | 1321 } |
1321 CSSValue::traceAfterDispatch(visitor); | 1322 CSSValue::traceAfterDispatch(visitor); |
1322 } | 1323 } |
1323 | 1324 |
1324 } // namespace WebCore | 1325 } // namespace WebCore |
OLD | NEW |