OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Simon Hausmann <hausmann@kde.org> | 3 * (C) 2000 Simon Hausmann <hausmann@kde.org> |
4 * Copyright (C) 2006, 2009 Apple Inc. All rights reserved. | 4 * Copyright (C) 2006, 2009 Apple Inc. 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 * |
11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
15 * | 15 * |
16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
20 * | 20 * |
21 */ | 21 */ |
22 | 22 |
23 #ifndef LayoutPart_h | 23 #ifndef LayoutPart_h |
24 #define LayoutPart_h | 24 #define LayoutPart_h |
25 | 25 |
26 #include "core/CoreExport.h" | 26 #include "core/CoreExport.h" |
27 #include "core/layout/LayoutReplaced.h" | 27 #include "core/layout/LayoutReplaced.h" |
28 #include "platform/Widget.h" | 28 #include "platform/FrameViewBase.h" |
29 | 29 |
30 namespace blink { | 30 namespace blink { |
31 | 31 |
32 // LayoutObject for frames via LayoutFrame and LayoutIFrame, and plugins via | 32 // LayoutObject for frames via LayoutFrame and LayoutIFrame, and plugins via |
33 // LayoutEmbeddedObject. | 33 // LayoutEmbeddedObject. |
34 class CORE_EXPORT LayoutPart : public LayoutReplaced { | 34 class CORE_EXPORT LayoutPart : public LayoutReplaced { |
35 public: | 35 public: |
36 explicit LayoutPart(Element*); | 36 explicit LayoutPart(Element*); |
37 ~LayoutPart() override; | 37 ~LayoutPart() override; |
38 | 38 |
39 bool requiresAcceleratedCompositing() const; | 39 bool requiresAcceleratedCompositing() const; |
40 | 40 |
41 bool needsPreferredWidthsRecalculation() const final; | 41 bool needsPreferredWidthsRecalculation() const final; |
42 | 42 |
43 bool nodeAtPoint(HitTestResult&, | 43 bool nodeAtPoint(HitTestResult&, |
44 const HitTestLocation& locationInContainer, | 44 const HitTestLocation& locationInContainer, |
45 const LayoutPoint& accumulatedOffset, | 45 const LayoutPoint& accumulatedOffset, |
46 HitTestAction) override; | 46 HitTestAction) override; |
47 | 47 |
48 void ref() { ++m_refCount; } | 48 void ref() { ++m_refCount; } |
49 void deref(); | 49 void deref(); |
50 | 50 |
51 Widget* widget() const; | 51 FrameViewBase* widget() const; |
52 | 52 |
53 LayoutRect replacedContentRect() const final; | 53 LayoutRect replacedContentRect() const final; |
54 | 54 |
55 void updateOnWidgetChange(); | 55 void updateOnWidgetChange(); |
56 void updateWidgetGeometry(); | 56 void updateWidgetGeometry(); |
57 | 57 |
58 bool isLayoutPart() const final { return true; } | 58 bool isLayoutPart() const final { return true; } |
59 virtual void paintContents(const PaintInfo&, const LayoutPoint&) const; | 59 virtual void paintContents(const PaintInfo&, const LayoutPoint&) const; |
60 | 60 |
61 bool isThrottledFrameView() const; | 61 bool isThrottledFrameView() const; |
(...skipping 23 matching lines...) Expand all Loading... |
85 HitTestAction); | 85 HitTestAction); |
86 | 86 |
87 int m_refCount; | 87 int m_refCount; |
88 }; | 88 }; |
89 | 89 |
90 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutPart, isLayoutPart()); | 90 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutPart, isLayoutPart()); |
91 | 91 |
92 } // namespace blink | 92 } // namespace blink |
93 | 93 |
94 #endif // LayoutPart_h | 94 #endif // LayoutPart_h |
OLD | NEW |