| 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, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
| 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. | 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. |
| 5 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 5 * Copyright (C) 2013 Intel Corporation. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 bool StylePropertySet::isPropertyImplicit(CSSPropertyID propertyID) const | 283 bool StylePropertySet::isPropertyImplicit(CSSPropertyID propertyID) const |
| 284 { | 284 { |
| 285 int foundPropertyIndex = findPropertyIndex(propertyID); | 285 int foundPropertyIndex = findPropertyIndex(propertyID); |
| 286 if (foundPropertyIndex == -1) | 286 if (foundPropertyIndex == -1) |
| 287 return false; | 287 return false; |
| 288 return propertyAt(foundPropertyIndex).isImplicit(); | 288 return propertyAt(foundPropertyIndex).isImplicit(); |
| 289 } | 289 } |
| 290 | 290 |
| 291 bool MutableStylePropertySet::setProperty(CSSPropertyID unresolvedProperty, cons
t String& value, bool important, StyleSheetContents* contextStyleSheet) | 291 bool MutableStylePropertySet::setProperty(CSSPropertyID unresolvedProperty, cons
t String& value, bool important, StyleSheetContents* contextStyleSheet) |
| 292 { | 292 { |
| 293 DCHECK_GE(unresolvedProperty, firstCSSProperty); |
| 294 |
| 293 // Setting the value to an empty string just removes the property in both IE
and Gecko. | 295 // Setting the value to an empty string just removes the property in both IE
and Gecko. |
| 294 // Setting it to null seems to produce less consistent results, but we treat
it just the same. | 296 // Setting it to null seems to produce less consistent results, but we treat
it just the same. |
| 295 if (value.isEmpty()) | 297 if (value.isEmpty()) |
| 296 return removeProperty(resolveCSSPropertyID(unresolvedProperty)); | 298 return removeProperty(resolveCSSPropertyID(unresolvedProperty)); |
| 297 | 299 |
| 298 // When replacing an existing property value, this moves the property to the
end of the list. | 300 // When replacing an existing property value, this moves the property to the
end of the list. |
| 299 // Firefox preserves the position, and MSIE moves the property to the beginn
ing. | 301 // Firefox preserves the position, and MSIE moves the property to the beginn
ing. |
| 300 return CSSParser::parseValue(this, unresolvedProperty, value, important, con
textStyleSheet); | 302 return CSSParser::parseValue(this, unresolvedProperty, value, important, con
textStyleSheet); |
| 301 } | 303 } |
| 302 | 304 |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 { | 570 { |
| 569 return new MutableStylePropertySet(cssParserMode); | 571 return new MutableStylePropertySet(cssParserMode); |
| 570 } | 572 } |
| 571 | 573 |
| 572 MutableStylePropertySet* MutableStylePropertySet::create(const CSSProperty* prop
erties, unsigned count) | 574 MutableStylePropertySet* MutableStylePropertySet::create(const CSSProperty* prop
erties, unsigned count) |
| 573 { | 575 { |
| 574 return new MutableStylePropertySet(properties, count); | 576 return new MutableStylePropertySet(properties, count); |
| 575 } | 577 } |
| 576 | 578 |
| 577 } // namespace blink | 579 } // namespace blink |
| OLD | NEW |