Remove unused variable movedSectionLogicalTop from table layout code.
[chromium-blink-merge.git] / third_party / WebKit / Source / core / layout / LayoutEmbeddedObject.h
blob89713530965a8f305ba16a34428aa7dd112295a0
1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Simon Hausmann <hausmann@kde.org>
4 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010, 2012 Apple Inc. All rights reserved.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
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
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
23 #ifndef LayoutEmbeddedObject_h
24 #define LayoutEmbeddedObject_h
26 #include "core/layout/LayoutPart.h"
28 namespace blink {
30 class TextRun;
32 // LayoutObject for embeds and objects, often, but not always, rendered via plugins.
33 // For example, <embed src="foo.html"> does not invoke a plugin.
34 class LayoutEmbeddedObject : public LayoutPart {
35 public:
36 LayoutEmbeddedObject(Element*);
37 ~LayoutEmbeddedObject() override;
39 enum PluginUnavailabilityReason {
40 PluginMissing,
41 PluginBlockedByContentSecurityPolicy,
43 void setPluginUnavailabilityReason(PluginUnavailabilityReason);
44 bool showsUnavailablePluginIndicator() const;
46 const char* name() const override { return "LayoutEmbeddedObject"; }
48 const String& unavailablePluginReplacementText() const { return m_unavailablePluginReplacementText; }
50 private:
51 void paintContents(const PaintInfo&, const LayoutPoint&) final;
52 void paintReplaced(const PaintInfo&, const LayoutPoint&) final;
53 void paint(const PaintInfo&, const LayoutPoint&) final;
55 void layout() final;
56 PaintInvalidationReason invalidatePaintIfNeeded(PaintInvalidationState&, const LayoutBoxModelObject&) final;
58 bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectEmbeddedObject || LayoutPart::isOfType(type); }
59 LayoutBox* embeddedContentBox() const final;
61 DeprecatedPaintLayerType layerTypeRequired() const final;
63 ScrollResultOneDimensional scroll(ScrollDirectionPhysical, ScrollGranularity, float multiplier) final;
65 CompositingReasons additionalCompositingReasons() const override;
67 bool m_showsUnavailablePluginIndicator;
68 PluginUnavailabilityReason m_pluginUnavailabilityReason;
69 String m_unavailablePluginReplacementText;
72 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutEmbeddedObject, isEmbeddedObject());
74 } // namespace blink
76 #endif // LayoutEmbeddedObject_h