OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved. |
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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 void styleChanged() override; | 86 void styleChanged() override; |
87 | 87 |
88 bool isCustomScrollbar() const override { return true; } | 88 bool isCustomScrollbar() const override { return true; } |
89 | 89 |
90 void updateScrollbarParts(bool destroy = false); | 90 void updateScrollbarParts(bool destroy = false); |
91 | 91 |
92 PassRefPtr<ComputedStyle> getScrollbarPseudoStyle(ScrollbarPart, PseudoId); | 92 PassRefPtr<ComputedStyle> getScrollbarPseudoStyle(ScrollbarPart, PseudoId); |
93 void updateScrollbarPart(ScrollbarPart, bool destroy = false); | 93 void updateScrollbarPart(ScrollbarPart, bool destroy = false); |
94 | 94 |
95 // This Scrollbar(Widget) may outlive the DOM which created it (during tear do
wn), | 95 // This Scrollbar(Widget) may outlive the DOM which created it (during tear |
96 // so we keep a reference to the Node which caused this custom scrollbar creat
ion. | 96 // down), so we keep a reference to the Node which caused this custom |
97 // This will not create a reference cycle as the Widget tree is owned by our c
ontaining | 97 // scrollbar creation. |
98 // FrameView which this Node pointer can in no way keep alive. See webkit bug
80610. | 98 // This will not create a reference cycle as the Widget tree is owned by our |
| 99 // containing FrameView which this Node pointer can in no way keep alive. |
| 100 // See webkit bug 80610. |
99 Member<Node> m_owner; | 101 Member<Node> m_owner; |
100 | 102 |
101 Member<LocalFrame> m_owningFrame; | 103 Member<LocalFrame> m_owningFrame; |
102 | 104 |
103 HashMap<unsigned, LayoutScrollbarPart*> m_parts; | 105 HashMap<unsigned, LayoutScrollbarPart*> m_parts; |
104 }; | 106 }; |
105 | 107 |
106 DEFINE_TYPE_CASTS(LayoutScrollbar, | 108 DEFINE_TYPE_CASTS(LayoutScrollbar, |
107 ScrollbarThemeClient, | 109 ScrollbarThemeClient, |
108 scrollbar, | 110 scrollbar, |
109 scrollbar->isCustomScrollbar(), | 111 scrollbar->isCustomScrollbar(), |
110 scrollbar.isCustomScrollbar()); | 112 scrollbar.isCustomScrollbar()); |
111 | 113 |
112 } // namespace blink | 114 } // namespace blink |
113 | 115 |
114 #endif // LayoutScrollbar_h | 116 #endif // LayoutScrollbar_h |
OLD | NEW |