| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
| 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
| 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 static const Vector<CSSPropertyID>& computableProperties() | 348 static const Vector<CSSPropertyID>& computableProperties() |
| 349 { | 349 { |
| 350 DEFINE_STATIC_LOCAL(Vector<CSSPropertyID>, properties, ()); | 350 DEFINE_STATIC_LOCAL(Vector<CSSPropertyID>, properties, ()); |
| 351 if (properties.isEmpty()) | 351 if (properties.isEmpty()) |
| 352 CSSPropertyMetadata::filterEnabledCSSPropertiesIntoVector(staticComputab
leProperties, WTF_ARRAY_LENGTH(staticComputableProperties), properties); | 352 CSSPropertyMetadata::filterEnabledCSSPropertiesIntoVector(staticComputab
leProperties, WTF_ARRAY_LENGTH(staticComputableProperties), properties); |
| 353 return properties; | 353 return properties; |
| 354 } | 354 } |
| 355 | 355 |
| 356 CSSComputedStyleDeclaration::CSSComputedStyleDeclaration(Node* n, bool allowVisi
tedStyle, const String& pseudoElementName) | 356 CSSComputedStyleDeclaration::CSSComputedStyleDeclaration(Node* n, bool allowVisi
tedStyle, const String& pseudoElementName) |
| 357 : m_node(n) | 357 : m_node(n) |
| 358 , m_pseudoElementSpecifier(CSSSelector::parsePseudoId(pseudoElementName)) |
| 358 , m_allowVisitedStyle(allowVisitedStyle) | 359 , m_allowVisitedStyle(allowVisitedStyle) |
| 359 { | 360 { |
| 360 unsigned nameWithoutColonsStart = pseudoElementName[0] == ':' ? (pseudoEleme
ntName[1] == ':' ? 2 : 1) : 0; | |
| 361 m_pseudoElementSpecifier = CSSSelector::pseudoId(CSSSelector::parsePseudoTyp
e( | |
| 362 AtomicString(pseudoElementName.substring(nameWithoutColonsStart)), false
)); | |
| 363 } | 361 } |
| 364 | 362 |
| 365 CSSComputedStyleDeclaration::~CSSComputedStyleDeclaration() | 363 CSSComputedStyleDeclaration::~CSSComputedStyleDeclaration() |
| 366 { | 364 { |
| 367 } | 365 } |
| 368 | 366 |
| 369 String CSSComputedStyleDeclaration::cssText() const | 367 String CSSComputedStyleDeclaration::cssText() const |
| 370 { | 368 { |
| 371 StringBuilder result; | 369 StringBuilder result; |
| 372 const Vector<CSSPropertyID>& properties = computableProperties(); | 370 const Vector<CSSPropertyID>& properties = computableProperties(); |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a
re computed, and therefore the '" + getPropertyNameString(id) + "' property is r
ead-only."); | 696 exceptionState.throwDOMException(NoModificationAllowedError, "These styles a
re computed, and therefore the '" + getPropertyNameString(id) + "' property is r
ead-only."); |
| 699 } | 697 } |
| 700 | 698 |
| 701 DEFINE_TRACE(CSSComputedStyleDeclaration) | 699 DEFINE_TRACE(CSSComputedStyleDeclaration) |
| 702 { | 700 { |
| 703 visitor->trace(m_node); | 701 visitor->trace(m_node); |
| 704 CSSStyleDeclaration::trace(visitor); | 702 CSSStyleDeclaration::trace(visitor); |
| 705 } | 703 } |
| 706 | 704 |
| 707 } // namespace blink | 705 } // namespace blink |
| OLD | NEW |