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 * |
(...skipping 15 matching lines...) Expand all Loading... |
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/Widget.h" |
29 | 29 |
30 namespace blink { | 30 namespace blink { |
31 | 31 |
32 // LayoutObject for frames via LayoutFrame and LayoutIFrame, and plugins via Lay
outEmbeddedObject. | 32 // LayoutObject for frames via LayoutFrame and LayoutIFrame, and plugins via Lay
outEmbeddedObject. |
33 class CORE_EXPORT LayoutPart : public LayoutReplaced { | 33 class CORE_EXPORT LayoutPart : public LayoutReplaced { |
34 public: | 34 public: |
35 explicit LayoutPart(Element*); | 35 explicit LayoutPart(Element*); |
36 virtual ~LayoutPart(); | 36 ~LayoutPart() override; |
37 | 37 |
38 bool requiresAcceleratedCompositing() const; | 38 bool requiresAcceleratedCompositing() const; |
39 | 39 |
40 virtual bool needsPreferredWidthsRecalculation() const override final; | 40 bool needsPreferredWidthsRecalculation() const final; |
41 | 41 |
42 virtual bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInCo
ntainer, const LayoutPoint& accumulatedOffset, HitTestAction) override; | 42 bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer,
const LayoutPoint& accumulatedOffset, HitTestAction) override; |
43 | 43 |
44 void ref() { ++m_refCount; } | 44 void ref() { ++m_refCount; } |
45 void deref(); | 45 void deref(); |
46 | 46 |
47 Widget* widget() const; | 47 Widget* widget() const; |
48 | 48 |
49 void updateOnWidgetChange(); | 49 void updateOnWidgetChange(); |
50 void updateWidgetPosition(); | 50 void updateWidgetPosition(); |
51 void widgetPositionsUpdated(); | 51 void widgetPositionsUpdated(); |
52 bool updateWidgetGeometry(); | 52 bool updateWidgetGeometry(); |
53 | 53 |
54 virtual bool isLayoutPart() const override final { return true; } | 54 bool isLayoutPart() const final { return true; } |
55 virtual void paintContents(const PaintInfo&, const LayoutPoint&); | 55 virtual void paintContents(const PaintInfo&, const LayoutPoint&); |
56 | 56 |
57 protected: | 57 protected: |
58 virtual DeprecatedPaintLayerType layerTypeRequired() const override; | 58 DeprecatedPaintLayerType layerTypeRequired() const override; |
59 | 59 |
60 virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle)
override final; | 60 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) final; |
61 virtual void layout() override; | 61 void layout() override; |
62 virtual void paint(const PaintInfo&, const LayoutPoint&) override; | 62 void paint(const PaintInfo&, const LayoutPoint&) override; |
63 virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const overrid
e final; | 63 CursorDirective getCursor(const LayoutPoint&, Cursor&) const final; |
64 | 64 |
65 // Overridden to invalidate the child frame if any. | 65 // Overridden to invalidate the child frame if any. |
66 virtual void invalidatePaintOfSubtreesIfNeeded(PaintInvalidationState&) over
ride; | 66 void invalidatePaintOfSubtreesIfNeeded(PaintInvalidationState&) override; |
67 | 67 |
68 private: | 68 private: |
69 virtual CompositingReasons additionalCompositingReasons() const override; | 69 CompositingReasons additionalCompositingReasons() const override; |
70 | 70 |
71 virtual void willBeDestroyed() override final; | 71 void willBeDestroyed() final; |
72 virtual void destroy() override final; | 72 void destroy() final; |
73 | 73 |
74 bool setWidgetGeometry(const LayoutRect&); | 74 bool setWidgetGeometry(const LayoutRect&); |
75 | 75 |
76 bool nodeAtPointOverWidget(HitTestResult&, const HitTestLocation& locationIn
Container, const LayoutPoint& accumulatedOffset, HitTestAction); | 76 bool nodeAtPointOverWidget(HitTestResult&, const HitTestLocation& locationIn
Container, const LayoutPoint& accumulatedOffset, HitTestAction); |
77 | 77 |
78 int m_refCount; | 78 int m_refCount; |
79 }; | 79 }; |
80 | 80 |
81 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutPart, isLayoutPart()); | 81 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutPart, isLayoutPart()); |
82 | 82 |
83 } // namespace blink | 83 } // namespace blink |
84 | 84 |
85 #endif // LayoutPart_h | 85 #endif // LayoutPart_h |
OLD | NEW |