Chromium Code Reviews| Index: third_party/WebKit/Source/core/style/ComputedStyle.cpp |
| diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
| index c3b28edacb650bac880d9eb4cb8ec91bafe68ee0..0e2e86a9cb578a52d4ede6ef93eb726be108b82f 100644 |
| --- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
| +++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
| @@ -83,6 +83,18 @@ PassRefPtr<ComputedStyle> ComputedStyle::createInitialStyle() |
| return adoptRef(new ComputedStyle(InitialStyle)); |
| } |
| +void ComputedStyle::clearInitialStyle() |
|
dgozman
2016/02/11 18:53:44
I need some kind of invalidation mechanism which r
pdr.
2016/02/12 06:36:14
Can you help me understand why this needs to be re
dgozman
2016/02/19 19:15:16
I'm only aware of tapHighlightColor, but perhaps s
|
| +{ |
| + ComputedStyle** pointer = initialStylePointer(); |
| + if (!*pointer) |
| + return; |
| + RefPtr<ComputedStyle> holder = adoptRef(*pointer); |
| + { |
| + LEAK_SANITIZER_DISABLED_SCOPE; |
| + *pointer = createInitialStyle().leakRef(); |
| + } |
| +} |
| + |
| PassRefPtr<ComputedStyle> ComputedStyle::createAnonymousStyleWithDisplay(const ComputedStyle& parentStyle, EDisplay display) |
| { |
| RefPtr<ComputedStyle> newStyle = ComputedStyle::create(); |