| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009 Apple Computer, Inc. | 2 * Copyright (C) 2007, 2008, 2009 Apple Computer, Inc. |
| 3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 AllEditingProperties | 97 AllEditingProperties |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 static const Vector<CSSPropertyID>& allEditingProperties() { | 100 static const Vector<CSSPropertyID>& allEditingProperties() { |
| 101 DEFINE_STATIC_LOCAL(Vector<CSSPropertyID>, properties, ()); | 101 DEFINE_STATIC_LOCAL(Vector<CSSPropertyID>, properties, ()); |
| 102 if (properties.isEmpty()) { | 102 if (properties.isEmpty()) { |
| 103 CSSPropertyMetadata::filterEnabledCSSPropertiesIntoVector( | 103 CSSPropertyMetadata::filterEnabledCSSPropertiesIntoVector( |
| 104 staticEditingProperties, WTF_ARRAY_LENGTH(staticEditingProperties), | 104 staticEditingProperties, WTF_ARRAY_LENGTH(staticEditingProperties), |
| 105 properties); | 105 properties); |
| 106 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()) | 106 if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()) |
| 107 properties.remove(properties.find(CSSPropertyTextDecoration)); | 107 properties.erase(properties.find(CSSPropertyTextDecoration)); |
| 108 } | 108 } |
| 109 return properties; | 109 return properties; |
| 110 } | 110 } |
| 111 | 111 |
| 112 static const Vector<CSSPropertyID>& inheritableEditingProperties() { | 112 static const Vector<CSSPropertyID>& inheritableEditingProperties() { |
| 113 DEFINE_STATIC_LOCAL(Vector<CSSPropertyID>, properties, ()); | 113 DEFINE_STATIC_LOCAL(Vector<CSSPropertyID>, properties, ()); |
| 114 if (properties.isEmpty()) { | 114 if (properties.isEmpty()) { |
| 115 CSSPropertyMetadata::filterEnabledCSSPropertiesIntoVector( | 115 CSSPropertyMetadata::filterEnabledCSSPropertiesIntoVector( |
| 116 staticEditingProperties, WTF_ARRAY_LENGTH(staticEditingProperties), | 116 staticEditingProperties, WTF_ARRAY_LENGTH(staticEditingProperties), |
| 117 properties); | 117 properties); |
| 118 for (size_t index = 0; index < properties.size();) { | 118 for (size_t index = 0; index < properties.size();) { |
| 119 if (!CSSPropertyMetadata::isInheritedProperty(properties[index])) { | 119 if (!CSSPropertyMetadata::isInheritedProperty(properties[index])) { |
| 120 properties.remove(index); | 120 properties.erase(index); |
| 121 continue; | 121 continue; |
| 122 } | 122 } |
| 123 ++index; | 123 ++index; |
| 124 } | 124 } |
| 125 } | 125 } |
| 126 return properties; | 126 return properties; |
| 127 } | 127 } |
| 128 | 128 |
| 129 template <class StyleDeclarationType> | 129 template <class StyleDeclarationType> |
| 130 static MutableStylePropertySet* copyEditingProperties( | 130 static MutableStylePropertySet* copyEditingProperties( |
| (...skipping 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1768 const CSSIdentifierValue& identifierValue = toCSSIdentifierValue(*value); | 1768 const CSSIdentifierValue& identifierValue = toCSSIdentifierValue(*value); |
| 1769 if (CSSValueXSmall <= identifierValue.getValueID() && | 1769 if (CSSValueXSmall <= identifierValue.getValueID() && |
| 1770 identifierValue.getValueID() <= CSSValueWebkitXxxLarge) | 1770 identifierValue.getValueID() <= CSSValueWebkitXxxLarge) |
| 1771 return identifierValue.getValueID() - CSSValueXSmall + 1; | 1771 return identifierValue.getValueID() - CSSValueXSmall + 1; |
| 1772 } | 1772 } |
| 1773 | 1773 |
| 1774 return 0; | 1774 return 0; |
| 1775 } | 1775 } |
| 1776 | 1776 |
| 1777 } // namespace blink | 1777 } // namespace blink |
| OLD | NEW |