Chromium Code Reviews| 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 Apple Computer, Inc. | 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. |
| 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 22 matching lines...) Expand all Loading... | |
| 33 static_assert(sizeof(CSSProperty) == sizeof(SameSizeAsCSSProperty), | 33 static_assert(sizeof(CSSProperty) == sizeof(SameSizeAsCSSProperty), |
| 34 "CSSProperty should stay small"); | 34 "CSSProperty should stay small"); |
| 35 | 35 |
| 36 CSSPropertyID StylePropertyMetadata::shorthandID() const { | 36 CSSPropertyID StylePropertyMetadata::shorthandID() const { |
| 37 if (!m_isSetFromShorthand) | 37 if (!m_isSetFromShorthand) |
| 38 return CSSPropertyInvalid; | 38 return CSSPropertyInvalid; |
| 39 | 39 |
| 40 Vector<StylePropertyShorthand, 4> shorthands; | 40 Vector<StylePropertyShorthand, 4> shorthands; |
| 41 getMatchingShorthandsForLonghand(static_cast<CSSPropertyID>(m_propertyID), | 41 getMatchingShorthandsForLonghand(static_cast<CSSPropertyID>(m_propertyID), |
| 42 &shorthands); | 42 &shorthands); |
| 43 ASSERT(shorthands.size() && m_indexInShorthandsVector >= 0 && | 43 DCHECK(shorthands.size()); |
| 44 m_indexInShorthandsVector < shorthands.size()); | 44 DCHECK_GE(m_indexInShorthandsVector, static_cast<unsigned>(0)); |
|
tkent
2017/03/28 14:44:55
static_cast<unsigned>(0) -> 0u
nikhil.sahni
2017/03/30 12:17:57
Done.
| |
| 45 DCHECK_LT(m_indexInShorthandsVector, shorthands.size()); | |
| 45 return shorthands.at(m_indexInShorthandsVector).id(); | 46 return shorthands.at(m_indexInShorthandsVector).id(); |
| 46 } | 47 } |
| 47 | 48 |
| 48 enum LogicalBoxSide { BeforeSide, EndSide, AfterSide, StartSide }; | 49 enum LogicalBoxSide { BeforeSide, EndSide, AfterSide, StartSide }; |
| 49 enum PhysicalBoxSide { TopSide, RightSide, BottomSide, LeftSide }; | 50 enum PhysicalBoxSide { TopSide, RightSide, BottomSide, LeftSide }; |
| 50 | 51 |
| 51 static CSSPropertyID resolveToPhysicalProperty( | 52 static CSSPropertyID resolveToPhysicalProperty( |
| 52 TextDirection direction, | 53 TextDirection direction, |
| 53 WritingMode writingMode, | 54 WritingMode writingMode, |
| 54 LogicalBoxSide logicalSide, | 55 LogicalBoxSide logicalSide, |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 287 return propertyID != CSSPropertyUnicodeBidi && | 288 return propertyID != CSSPropertyUnicodeBidi && |
| 288 propertyID != CSSPropertyDirection; | 289 propertyID != CSSPropertyDirection; |
| 289 } | 290 } |
| 290 | 291 |
| 291 bool CSSProperty::operator==(const CSSProperty& other) const { | 292 bool CSSProperty::operator==(const CSSProperty& other) const { |
| 292 return dataEquivalent(m_value, other.m_value) && | 293 return dataEquivalent(m_value, other.m_value) && |
| 293 isImportant() == other.isImportant(); | 294 isImportant() == other.isImportant(); |
| 294 } | 295 } |
| 295 | 296 |
| 296 } // namespace blink | 297 } // namespace blink |
| OLD | NEW |