| 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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 return true; | 474 return true; |
| 475 } | 475 } |
| 476 return false; | 476 return false; |
| 477 }; | 477 }; |
| 478 | 478 |
| 479 const CSSProperty* it = std::find_if(begin, end, compare); | 479 const CSSProperty* it = std::find_if(begin, end, compare); |
| 480 | 480 |
| 481 return (it == end) ? -1 : it - begin; | 481 return (it == end) ? -1 : it - begin; |
| 482 } | 482 } |
| 483 | 483 |
| 484 unsigned StylePropertySet::variableCount() const |
| 485 { |
| 486 ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); |
| 487 unsigned count = 0; |
| 488 for (unsigned i = 0; i < propertyCount(); ++i) { |
| 489 if (propertyAt(i).id() == CSSPropertyVariable) |
| 490 count++; |
| 491 } |
| 492 return count; |
| 493 } |
| 494 |
| 484 DEFINE_TRACE_AFTER_DISPATCH(MutableStylePropertySet) | 495 DEFINE_TRACE_AFTER_DISPATCH(MutableStylePropertySet) |
| 485 { | 496 { |
| 486 #if ENABLE(OILPAN) | 497 #if ENABLE(OILPAN) |
| 487 visitor->trace(m_cssomWrapper); | 498 visitor->trace(m_cssomWrapper); |
| 488 visitor->trace(m_propertyVector); | 499 visitor->trace(m_propertyVector); |
| 489 #endif | 500 #endif |
| 490 StylePropertySet::traceAfterDispatch(visitor); | 501 StylePropertySet::traceAfterDispatch(visitor); |
| 491 } | 502 } |
| 492 | 503 |
| 493 unsigned StylePropertySet::averageSizeInBytes() | 504 unsigned StylePropertySet::averageSizeInBytes() |
| (...skipping 19 matching lines...) Expand all Loading... |
| 513 { | 524 { |
| 514 return adoptRefWillBeNoop(new MutableStylePropertySet(cssParserMode)); | 525 return adoptRefWillBeNoop(new MutableStylePropertySet(cssParserMode)); |
| 515 } | 526 } |
| 516 | 527 |
| 517 PassRefPtrWillBeRawPtr<MutableStylePropertySet> MutableStylePropertySet::create(
const CSSProperty* properties, unsigned count) | 528 PassRefPtrWillBeRawPtr<MutableStylePropertySet> MutableStylePropertySet::create(
const CSSProperty* properties, unsigned count) |
| 518 { | 529 { |
| 519 return adoptRefWillBeNoop(new MutableStylePropertySet(properties, count)); | 530 return adoptRefWillBeNoop(new MutableStylePropertySet(properties, count)); |
| 520 } | 531 } |
| 521 | 532 |
| 522 } // namespace blink | 533 } // namespace blink |
| OLD | NEW |