| 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() |
| 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 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1874 if (!shadowList) | 1886 if (!shadowList) |
| 1875 return false; | 1887 return false; |
| 1876 for (size_t i = shadowList->shadows().size(); i--; ) { | 1888 for (size_t i = shadowList->shadows().size(); i--; ) { |
| 1877 if (shadowList->shadows()[i].color().isCurrentColor()) | 1889 if (shadowList->shadows()[i].color().isCurrentColor()) |
| 1878 return true; | 1890 return true; |
| 1879 } | 1891 } |
| 1880 return false; | 1892 return false; |
| 1881 } | 1893 } |
| 1882 | 1894 |
| 1883 } // namespace blink | 1895 } // namespace blink |
| OLD | NEW |