| 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 25 matching lines...) Expand all Loading... |
| 36 class ComputedStyle; | 36 class ComputedStyle; |
| 37 class LayoutBox; | 37 class LayoutBox; |
| 38 class LayoutBoxModelObject; | 38 class LayoutBoxModelObject; |
| 39 class LayoutScrollbarPart; | 39 class LayoutScrollbarPart; |
| 40 class LocalFrame; | 40 class LocalFrame; |
| 41 class Node; | 41 class Node; |
| 42 class PaintInvalidationState; | 42 class PaintInvalidationState; |
| 43 | 43 |
| 44 class LayoutScrollbar final : public Scrollbar { | 44 class LayoutScrollbar final : public Scrollbar { |
| 45 public: | 45 public: |
| 46 static PassRefPtrWillBeRawPtr<Scrollbar> createCustomScrollbar(ScrollableAre
a*, ScrollbarOrientation, Node*, LocalFrame* owningFrame = nullptr); | 46 static RawPtr<Scrollbar> createCustomScrollbar(ScrollableArea*, ScrollbarOri
entation, Node*, LocalFrame* owningFrame = nullptr); |
| 47 ~LayoutScrollbar() override; | 47 ~LayoutScrollbar() override; |
| 48 | 48 |
| 49 LayoutBox* owningLayoutObject() const; | 49 LayoutBox* owningLayoutObject() const; |
| 50 LayoutBox* owningLayoutObjectWithinFrame() const; | 50 LayoutBox* owningLayoutObjectWithinFrame() const; |
| 51 | 51 |
| 52 IntRect buttonRect(ScrollbarPart) const; | 52 IntRect buttonRect(ScrollbarPart) const; |
| 53 IntRect trackRect(int startLength, int endLength) const; | 53 IntRect trackRect(int startLength, int endLength) const; |
| 54 IntRect trackPieceRectWithMargins(ScrollbarPart, const IntRect&) const; | 54 IntRect trackPieceRectWithMargins(ScrollbarPart, const IntRect&) const; |
| 55 | 55 |
| 56 int minimumThumbLength() const; | 56 int minimumThumbLength() const; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 82 | 82 |
| 83 void updateScrollbarParts(bool destroy = false); | 83 void updateScrollbarParts(bool destroy = false); |
| 84 | 84 |
| 85 PassRefPtr<ComputedStyle> getScrollbarPseudoStyle(ScrollbarPart, PseudoId); | 85 PassRefPtr<ComputedStyle> getScrollbarPseudoStyle(ScrollbarPart, PseudoId); |
| 86 void updateScrollbarPart(ScrollbarPart, bool destroy = false); | 86 void updateScrollbarPart(ScrollbarPart, bool destroy = false); |
| 87 | 87 |
| 88 // This Scrollbar(Widget) may outlive the DOM which created it (during tear
down), | 88 // This Scrollbar(Widget) may outlive the DOM which created it (during tear
down), |
| 89 // so we keep a reference to the Node which caused this custom scrollbar cre
ation. | 89 // so we keep a reference to the Node which caused this custom scrollbar cre
ation. |
| 90 // This will not create a reference cycle as the Widget tree is owned by our
containing | 90 // This will not create a reference cycle as the Widget tree is owned by our
containing |
| 91 // FrameView which this Node pointer can in no way keep alive. See webkit bu
g 80610. | 91 // FrameView which this Node pointer can in no way keep alive. See webkit bu
g 80610. |
| 92 RefPtrWillBeMember<Node> m_owner; | 92 Member<Node> m_owner; |
| 93 | 93 |
| 94 RawPtrWillBeMember<LocalFrame> m_owningFrame; | 94 Member<LocalFrame> m_owningFrame; |
| 95 | 95 |
| 96 HashMap<unsigned, LayoutScrollbarPart*> m_parts; | 96 HashMap<unsigned, LayoutScrollbarPart*> m_parts; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 DEFINE_TYPE_CASTS(LayoutScrollbar, ScrollbarThemeClient, scrollbar, scrollbar->i
sCustomScrollbar(), scrollbar.isCustomScrollbar()); | 99 DEFINE_TYPE_CASTS(LayoutScrollbar, ScrollbarThemeClient, scrollbar, scrollbar->i
sCustomScrollbar(), scrollbar.isCustomScrollbar()); |
| 100 | 100 |
| 101 } // namespace blink | 101 } // namespace blink |
| 102 | 102 |
| 103 #endif // LayoutScrollbar_h | 103 #endif // LayoutScrollbar_h |
| OLD | NEW |