Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 PassRefPtr<ComputedStyle> ComputedStyle::create() | 76 PassRefPtr<ComputedStyle> ComputedStyle::create() |
| 77 { | 77 { |
| 78 return adoptRef(new ComputedStyle()); | 78 return adoptRef(new ComputedStyle()); |
| 79 } | 79 } |
| 80 | 80 |
| 81 PassRefPtr<ComputedStyle> ComputedStyle::createInitialStyle() | 81 PassRefPtr<ComputedStyle> ComputedStyle::createInitialStyle() |
| 82 { | 82 { |
| 83 return adoptRef(new ComputedStyle(InitialStyle)); | 83 return adoptRef(new ComputedStyle(InitialStyle)); |
| 84 } | 84 } |
| 85 | 85 |
| 86 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
| |
| 87 { | |
| 88 ComputedStyle** pointer = initialStylePointer(); | |
| 89 if (!*pointer) | |
| 90 return; | |
| 91 RefPtr<ComputedStyle> holder = adoptRef(*pointer); | |
| 92 { | |
| 93 LEAK_SANITIZER_DISABLED_SCOPE; | |
| 94 *pointer = createInitialStyle().leakRef(); | |
| 95 } | |
| 96 } | |
| 97 | |
| 86 PassRefPtr<ComputedStyle> ComputedStyle::createAnonymousStyleWithDisplay(const C omputedStyle& parentStyle, EDisplay display) | 98 PassRefPtr<ComputedStyle> ComputedStyle::createAnonymousStyleWithDisplay(const C omputedStyle& parentStyle, EDisplay display) |
| 87 { | 99 { |
| 88 RefPtr<ComputedStyle> newStyle = ComputedStyle::create(); | 100 RefPtr<ComputedStyle> newStyle = ComputedStyle::create(); |
| 89 newStyle->inheritFrom(parentStyle); | 101 newStyle->inheritFrom(parentStyle); |
| 90 newStyle->inheritUnicodeBidiFrom(parentStyle); | 102 newStyle->inheritUnicodeBidiFrom(parentStyle); |
| 91 newStyle->setDisplay(display); | 103 newStyle->setDisplay(display); |
| 92 return newStyle; | 104 return newStyle; |
| 93 } | 105 } |
| 94 | 106 |
| 95 PassRefPtr<ComputedStyle> ComputedStyle::clone(const ComputedStyle& other) | 107 PassRefPtr<ComputedStyle> ComputedStyle::clone(const ComputedStyle& other) |
| (...skipping 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1844 if (!shadowList) | 1856 if (!shadowList) |
| 1845 return false; | 1857 return false; |
| 1846 for (size_t i = shadowList->shadows().size(); i--; ) { | 1858 for (size_t i = shadowList->shadows().size(); i--; ) { |
| 1847 if (shadowList->shadows()[i].color().isCurrentColor()) | 1859 if (shadowList->shadows()[i].color().isCurrentColor()) |
| 1848 return true; | 1860 return true; |
| 1849 } | 1861 } |
| 1850 return false; | 1862 return false; |
| 1851 } | 1863 } |
| 1852 | 1864 |
| 1853 } // namespace blink | 1865 } // namespace blink |
| OLD | NEW |