| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Andreas Kling (kling@webkit.org) | 2 * Copyright (C) 2011 Andreas Kling (kling@webkit.org) |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 #include "core/css/CSSPrimitiveValue.h" | 47 #include "core/css/CSSPrimitiveValue.h" |
| 48 #include "core/css/CSSShadowValue.h" | 48 #include "core/css/CSSShadowValue.h" |
| 49 #include "core/css/CSSTimingFunctionValue.h" | 49 #include "core/css/CSSTimingFunctionValue.h" |
| 50 #include "core/css/CSSTransformValue.h" | 50 #include "core/css/CSSTransformValue.h" |
| 51 #include "core/css/CSSUnicodeRangeValue.h" | 51 #include "core/css/CSSUnicodeRangeValue.h" |
| 52 #include "core/css/CSSValueList.h" | 52 #include "core/css/CSSValueList.h" |
| 53 | 53 |
| 54 namespace blink { | 54 namespace blink { |
| 55 | 55 |
| 56 struct SameSizeAsCSSValue : public RefCounted<SameSizeAsCSSValue> | 56 struct SameSizeAsCSSValue : public RefCounted<SameSizeAsCSSValue> |
| 57 // VC++ 2013 doesn't support EBCO (Empty Base Class Optimization), and having | |
| 58 // multiple empty base classes makes the size of CSSValue bloat (Note that both | |
| 59 // of GarbageCollectedFinalized and ScriptWrappableBase are empty classes). | |
| 60 // See the following article for details. | |
| 61 // http://social.msdn.microsoft.com/forums/vstudio/en-US/504c6598-6076-4acf-96b6
-e6acb475d302/vc-multiple-inheritance-empty-base-classes-bloats-object-size | |
| 62 // | |
| 63 // FIXME: Remove this #if directive once VC++'s issue gets fixed. | |
| 64 // Note that we're going to split CSSValue class into two classes; CSSOMValue | |
| 65 // (assumed name) which derives ScriptWrappable and CSSValue (new one) which | |
| 66 // doesn't derive ScriptWrappable or ScriptWrappableBase. Then, we can safely | |
| 67 // remove this #if directive. | |
| 68 #if ENABLE(OILPAN) && COMPILER(MSVC) | |
| 69 , public ScriptWrappableBase | |
| 70 #endif | |
| 71 { | 57 { |
| 72 uint32_t bitfields; | 58 uint32_t bitfields; |
| 73 }; | 59 }; |
| 74 | 60 |
| 75 COMPILE_ASSERT(sizeof(CSSValue) <= sizeof(SameSizeAsCSSValue), CSS_value_should_
stay_small); | 61 COMPILE_ASSERT(sizeof(CSSValue) <= sizeof(SameSizeAsCSSValue), CSS_value_should_
stay_small); |
| 76 | 62 |
| 77 class TextCloneCSSValue : public CSSValue { | 63 class TextCloneCSSValue : public CSSValue { |
| 78 public: | 64 public: |
| 79 static PassRefPtr<TextCloneCSSValue> create(ClassType classType, const Strin
g& text) | 65 static PassRefPtr<TextCloneCSSValue> create(ClassType classType, const Strin
g& text) |
| 80 { | 66 { |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 return toCSSTransformValue(this)->cloneForCSSOM(); | 544 return toCSSTransformValue(this)->cloneForCSSOM(); |
| 559 case ImageSetClass: | 545 case ImageSetClass: |
| 560 return toCSSImageSetValue(this)->cloneForCSSOM(); | 546 return toCSSImageSetValue(this)->cloneForCSSOM(); |
| 561 default: | 547 default: |
| 562 ASSERT(!isSubtypeExposedToCSSOM()); | 548 ASSERT(!isSubtypeExposedToCSSOM()); |
| 563 return TextCloneCSSValue::create(classType(), cssText()); | 549 return TextCloneCSSValue::create(classType(), cssText()); |
| 564 } | 550 } |
| 565 } | 551 } |
| 566 | 552 |
| 567 } | 553 } |
| OLD | NEW |