| 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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 unsigned StylePropertySet::averageSizeInBytes() | 566 unsigned StylePropertySet::averageSizeInBytes() |
| 567 { | 567 { |
| 568 // Please update this if the storage scheme changes so that this longer refl
ects the actual size. | 568 // Please update this if the storage scheme changes so that this longer refl
ects the actual size. |
| 569 return sizeForImmutableStylePropertySetWithPropertyCount(4); | 569 return sizeForImmutableStylePropertySetWithPropertyCount(4); |
| 570 } | 570 } |
| 571 | 571 |
| 572 // See the function above if you need to update this. | 572 // See the function above if you need to update this. |
| 573 struct SameSizeAsStylePropertySet : public RefCountedWillBeGarbageCollectedFinal
ized<SameSizeAsStylePropertySet> { | 573 struct SameSizeAsStylePropertySet : public RefCountedWillBeGarbageCollectedFinal
ized<SameSizeAsStylePropertySet> { |
| 574 unsigned bitfield; | 574 unsigned bitfield; |
| 575 }; | 575 }; |
| 576 COMPILE_ASSERT(sizeof(StylePropertySet) == sizeof(SameSizeAsStylePropertySet), s
tyle_property_set_should_stay_small); | 576 static_assert(sizeof(StylePropertySet) == sizeof(SameSizeAsStylePropertySet), "S
tylePropertySet should stay small"); |
| 577 | 577 |
| 578 #ifndef NDEBUG | 578 #ifndef NDEBUG |
| 579 void StylePropertySet::showStyle() | 579 void StylePropertySet::showStyle() |
| 580 { | 580 { |
| 581 fprintf(stderr, "%s\n", asText().ascii().data()); | 581 fprintf(stderr, "%s\n", asText().ascii().data()); |
| 582 } | 582 } |
| 583 #endif | 583 #endif |
| 584 | 584 |
| 585 PassRefPtrWillBeRawPtr<MutableStylePropertySet> MutableStylePropertySet::create(
CSSParserMode cssParserMode) | 585 PassRefPtrWillBeRawPtr<MutableStylePropertySet> MutableStylePropertySet::create(
CSSParserMode cssParserMode) |
| 586 { | 586 { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 604 result.appendLiteral(": "); | 604 result.appendLiteral(": "); |
| 605 result.append(propertyValue()->cssText()); | 605 result.append(propertyValue()->cssText()); |
| 606 if (isImportant()) | 606 if (isImportant()) |
| 607 result.appendLiteral(" !important"); | 607 result.appendLiteral(" !important"); |
| 608 result.append(';'); | 608 result.append(';'); |
| 609 return result.toString(); | 609 return result.toString(); |
| 610 } | 610 } |
| 611 | 611 |
| 612 | 612 |
| 613 } // namespace blink | 613 } // namespace blink |
| OLD | NEW |