| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2011 Adobe Systems Incorporated. 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 { | 64 { |
| 65 if ((toCSSPrimitiveValue(offset.first()).getValueID() == CSSValueLeft && toC
SSPrimitiveValue(other.first()).getValueID() == CSSValueTop) | 65 if ((toCSSPrimitiveValue(offset.first()).getValueID() == CSSValueLeft && toC
SSPrimitiveValue(other.first()).getValueID() == CSSValueTop) |
| 66 || (toCSSPrimitiveValue(offset.first()).getValueID() == CSSValueTop && t
oCSSPrimitiveValue(other.first()).getValueID() == CSSValueLeft)) | 66 || (toCSSPrimitiveValue(offset.first()).getValueID() == CSSValueTop && t
oCSSPrimitiveValue(other.first()).getValueID() == CSSValueLeft)) |
| 67 return offset.second().cssText(); | 67 return offset.second().cssText(); |
| 68 return offset.cssText(); | 68 return offset.cssText(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 static CSSValuePair* buildSerializablePositionOffset(CSSValue* offset, CSSValueI
D defaultSide) | 71 static CSSValuePair* buildSerializablePositionOffset(CSSValue* offset, CSSValueI
D defaultSide) |
| 72 { | 72 { |
| 73 CSSValueID side = defaultSide; | 73 CSSValueID side = defaultSide; |
| 74 CSSPrimitiveValue* amount = nullptr; | 74 const CSSPrimitiveValue* amount = nullptr; |
| 75 | 75 |
| 76 if (!offset) { | 76 if (!offset) { |
| 77 side = CSSValueCenter; | 77 side = CSSValueCenter; |
| 78 } else if (offset->isPrimitiveValue() && toCSSPrimitiveValue(offset)->isValu
eID()) { | 78 } else if (offset->isPrimitiveValue() && toCSSPrimitiveValue(offset)->isValu
eID()) { |
| 79 side = toCSSPrimitiveValue(offset)->getValueID(); | 79 side = toCSSPrimitiveValue(offset)->getValueID(); |
| 80 } else if (offset->isValuePair()) { | 80 } else if (offset->isValuePair()) { |
| 81 side = toCSSPrimitiveValue(toCSSValuePair(*offset).first()).getValueID()
; | 81 side = toCSSPrimitiveValue(toCSSValuePair(*offset).first()).getValueID()
; |
| 82 amount = &toCSSPrimitiveValue(toCSSValuePair(*offset).second()); | 82 amount = &toCSSPrimitiveValue(toCSSValuePair(*offset).second()); |
| 83 if ((side == CSSValueRight || side == CSSValueBottom) && amount->isPerce
ntage()) { | 83 if ((side == CSSValueRight || side == CSSValueBottom) && amount->isPerce
ntage()) { |
| 84 side = defaultSide; | 84 side = defaultSide; |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 visitor->trace(m_left); | 398 visitor->trace(m_left); |
| 399 visitor->trace(m_topLeftRadius); | 399 visitor->trace(m_topLeftRadius); |
| 400 visitor->trace(m_topRightRadius); | 400 visitor->trace(m_topRightRadius); |
| 401 visitor->trace(m_bottomRightRadius); | 401 visitor->trace(m_bottomRightRadius); |
| 402 visitor->trace(m_bottomLeftRadius); | 402 visitor->trace(m_bottomLeftRadius); |
| 403 CSSValue::traceAfterDispatch(visitor); | 403 CSSValue::traceAfterDispatch(visitor); |
| 404 } | 404 } |
| 405 | 405 |
| 406 } // namespace blink | 406 } // namespace blink |
| 407 | 407 |
| OLD | NEW |