| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple Inc. 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #include "config.h" | 26 #include "config.h" |
| 27 #include "core/css/CSSBorderImageSliceValue.h" | 27 #include "core/css/CSSBorderImageSliceValue.h" |
| 28 | 28 |
| 29 #include "wtf/text/WTFString.h" | 29 #include "wtf/text/WTFString.h" |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 CSSBorderImageSliceValue::CSSBorderImageSliceValue(PassRefPtrWillBeRawPtr<CSSPri
mitiveValue> slices, bool fill) | 33 CSSBorderImageSliceValue::CSSBorderImageSliceValue(PassRefPtrWillBeRawPtr<CSSPri
mitiveValue> slices, bool fill) |
| 34 : CSSValue(BorderImageSliceClass) | 34 : CSSValueObject(BorderImageSliceClass) |
| 35 , m_slices(slices) | 35 , m_slices(slices) |
| 36 , m_fill(fill) | 36 , m_fill(fill) |
| 37 { | 37 { |
| 38 } | 38 } |
| 39 | 39 |
| 40 String CSSBorderImageSliceValue::customCSSText() const | 40 String CSSBorderImageSliceValue::customCSSText() const |
| 41 { | 41 { |
| 42 // Dump the slices first. | 42 // Dump the slices first. |
| 43 String text = m_slices->cssText(); | 43 String text = m_slices->cssText(); |
| 44 | 44 |
| 45 // Now the fill keywords if it is present. | 45 // Now the fill keywords if it is present. |
| 46 if (m_fill) | 46 if (m_fill) |
| 47 return text + " fill"; | 47 return text + " fill"; |
| 48 return text; | 48 return text; |
| 49 } | 49 } |
| 50 | 50 |
| 51 bool CSSBorderImageSliceValue::equals(const CSSBorderImageSliceValue& other) con
st | 51 bool CSSBorderImageSliceValue::equals(const CSSBorderImageSliceValue& other) con
st |
| 52 { | 52 { |
| 53 return m_fill == other.m_fill && compareCSSValuePtr(m_slices, other.m_slices
); | 53 return m_fill == other.m_fill && compareCSSValuePtr(m_slices, other.m_slices
); |
| 54 } | 54 } |
| 55 | 55 |
| 56 DEFINE_TRACE_AFTER_DISPATCH(CSSBorderImageSliceValue) | 56 DEFINE_TRACE_AFTER_DISPATCH(CSSBorderImageSliceValue) |
| 57 { | 57 { |
| 58 visitor->trace(m_slices); | 58 visitor->trace(m_slices); |
| 59 CSSValue::traceAfterDispatch(visitor); | 59 CSSValueObject::traceAfterDispatch(visitor); |
| 60 } | 60 } |
| 61 | 61 |
| 62 } // namespace blink | 62 } // namespace blink |
| OLD | NEW |