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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 | 501 |
502 CSSStyleDeclaration* MutableStylePropertySet::ensureCSSStyleDeclaration() | 502 CSSStyleDeclaration* MutableStylePropertySet::ensureCSSStyleDeclaration() |
503 { | 503 { |
504 // FIXME: get rid of this weirdness of a CSSStyleDeclaration inside of a | 504 // FIXME: get rid of this weirdness of a CSSStyleDeclaration inside of a |
505 // style property set. | 505 // style property set. |
506 if (m_cssomWrapper) { | 506 if (m_cssomWrapper) { |
507 ASSERT(!static_cast<CSSStyleDeclaration*>(m_cssomWrapper.get())->parentR
ule()); | 507 ASSERT(!static_cast<CSSStyleDeclaration*>(m_cssomWrapper.get())->parentR
ule()); |
508 ASSERT(!m_cssomWrapper->parentElement()); | 508 ASSERT(!m_cssomWrapper->parentElement()); |
509 return m_cssomWrapper.get(); | 509 return m_cssomWrapper.get(); |
510 } | 510 } |
511 m_cssomWrapper = adoptPtr(new PropertySetCSSStyleDeclaration(this)); | 511 m_cssomWrapper = adoptPtr(new PropertySetCSSStyleDeclaration(*this)); |
512 return m_cssomWrapper.get(); | 512 return m_cssomWrapper.get(); |
513 } | 513 } |
514 | 514 |
515 int MutableStylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const | 515 int MutableStylePropertySet::findPropertyIndex(CSSPropertyID propertyID) const |
516 { | 516 { |
517 // Convert here propertyID into an uint16_t to compare it with the metadata'
s m_propertyID to avoid | 517 // Convert here propertyID into an uint16_t to compare it with the metadata'
s m_propertyID to avoid |
518 // the compiler converting it to an int multiple times in the loop. | 518 // the compiler converting it to an int multiple times in the loop. |
519 uint16_t id = static_cast<uint16_t>(propertyID); | 519 uint16_t id = static_cast<uint16_t>(propertyID); |
520 for (int n = m_propertyVector.size() - 1 ; n >= 0; --n) { | 520 for (int n = m_propertyVector.size() - 1 ; n >= 0; --n) { |
521 if (m_propertyVector.at(n).metadata().m_propertyID == id) { | 521 if (m_propertyVector.at(n).metadata().m_propertyID == id) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 result.appendLiteral(": "); | 569 result.appendLiteral(": "); |
570 result.append(propertyValue()->cssText()); | 570 result.append(propertyValue()->cssText()); |
571 if (isImportant()) | 571 if (isImportant()) |
572 result.appendLiteral(" !important"); | 572 result.appendLiteral(" !important"); |
573 result.append(';'); | 573 result.append(';'); |
574 return result.toString(); | 574 return result.toString(); |
575 } | 575 } |
576 | 576 |
577 | 577 |
578 } // namespace WebCore | 578 } // namespace WebCore |
OLD | NEW |