| 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 if (properties[n].metadata().m_propertyID == id) { | 510 if (properties[n].metadata().m_propertyID == id) { |
| 511 // Only enabled properties should be part of the style. | 511 // Only enabled properties should be part of the style. |
| 512 ASSERT(CSSPropertyMetadata::isEnabledProperty(propertyID)); | 512 ASSERT(CSSPropertyMetadata::isEnabledProperty(propertyID)); |
| 513 return n; | 513 return n; |
| 514 } | 514 } |
| 515 } | 515 } |
| 516 | 516 |
| 517 return -1; | 517 return -1; |
| 518 } | 518 } |
| 519 | 519 |
| 520 unsigned StylePropertySet::variableCount() const |
| 521 { |
| 522 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); |
| 523 unsigned count = 0; |
| 524 for (unsigned i = 0; i < propertyCount(); ++i) { |
| 525 if (propertyAt(i).id() == CSSPropertyVariable) |
| 526 count++; |
| 527 } |
| 528 return count; |
| 529 } |
| 530 |
| 520 DEFINE_TRACE_AFTER_DISPATCH(MutableStylePropertySet) | 531 DEFINE_TRACE_AFTER_DISPATCH(MutableStylePropertySet) |
| 521 { | 532 { |
| 522 #if ENABLE(OILPAN) | 533 #if ENABLE(OILPAN) |
| 523 visitor->trace(m_cssomWrapper); | 534 visitor->trace(m_cssomWrapper); |
| 524 visitor->trace(m_propertyVector); | 535 visitor->trace(m_propertyVector); |
| 525 #endif | 536 #endif |
| 526 StylePropertySet::traceAfterDispatch(visitor); | 537 StylePropertySet::traceAfterDispatch(visitor); |
| 527 } | 538 } |
| 528 | 539 |
| 529 unsigned StylePropertySet::averageSizeInBytes() | 540 unsigned StylePropertySet::averageSizeInBytes() |
| (...skipping 19 matching lines...) Expand all Loading... |
| 549 { | 560 { |
| 550 return adoptRefWillBeNoop(new MutableStylePropertySet(cssParserMode)); | 561 return adoptRefWillBeNoop(new MutableStylePropertySet(cssParserMode)); |
| 551 } | 562 } |
| 552 | 563 |
| 553 PassRefPtrWillBeRawPtr<MutableStylePropertySet> MutableStylePropertySet::create(
const CSSProperty* properties, unsigned count) | 564 PassRefPtrWillBeRawPtr<MutableStylePropertySet> MutableStylePropertySet::create(
const CSSProperty* properties, unsigned count) |
| 554 { | 565 { |
| 555 return adoptRefWillBeNoop(new MutableStylePropertySet(properties, count)); | 566 return adoptRefWillBeNoop(new MutableStylePropertySet(properties, count)); |
| 556 } | 567 } |
| 557 | 568 |
| 558 } // namespace blink | 569 } // namespace blink |
| OLD | NEW |