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 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) | 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) |
5 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. |
| 6 * All rights reserved. |
6 * | 7 * |
7 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 11 * version 2 of the License, or (at your option) any later version. |
11 * | 12 * |
12 * This library is distributed in the hope that it will be useful, | 13 * This library is distributed in the hope that it will be useful, |
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 * Library General Public License for more details. | 16 * Library General Public License for more details. |
(...skipping 26 matching lines...) Expand all Loading... |
42 using namespace HTMLNames; | 43 using namespace HTMLNames; |
43 | 44 |
44 LayoutEmbeddedObject::LayoutEmbeddedObject(Element* element) | 45 LayoutEmbeddedObject::LayoutEmbeddedObject(Element* element) |
45 : LayoutPart(element) { | 46 : LayoutPart(element) { |
46 view()->frameView()->setIsVisuallyNonEmpty(); | 47 view()->frameView()->setIsVisuallyNonEmpty(); |
47 } | 48 } |
48 | 49 |
49 LayoutEmbeddedObject::~LayoutEmbeddedObject() {} | 50 LayoutEmbeddedObject::~LayoutEmbeddedObject() {} |
50 | 51 |
51 PaintLayerType LayoutEmbeddedObject::layerTypeRequired() const { | 52 PaintLayerType LayoutEmbeddedObject::layerTypeRequired() const { |
52 // This can't just use LayoutPart::layerTypeRequired, because PaintLayerCompos
itor | 53 // This can't just use LayoutPart::layerTypeRequired, because |
53 // doesn't loop through LayoutEmbeddedObjects the way it does frames in order | 54 // PaintLayerCompositor doesn't loop through LayoutEmbeddedObjects the way it |
54 // to update the self painting bit on their Layer. | 55 // does frames in order to update the self painting bit on their Layer. |
55 // Also, unlike iframes, embeds don't used the usesCompositing bit on LayoutVi
ew | 56 // Also, unlike iframes, embeds don't used the usesCompositing bit on |
56 // in requiresAcceleratedCompositing. | 57 // LayoutView in requiresAcceleratedCompositing. |
57 if (requiresAcceleratedCompositing()) | 58 if (requiresAcceleratedCompositing()) |
58 return NormalPaintLayer; | 59 return NormalPaintLayer; |
59 return LayoutPart::layerTypeRequired(); | 60 return LayoutPart::layerTypeRequired(); |
60 } | 61 } |
61 | 62 |
62 static String localizedUnavailablePluginReplacementText( | 63 static String localizedUnavailablePluginReplacementText( |
63 Node* node, | 64 Node* node, |
64 LayoutEmbeddedObject::PluginAvailability availability) { | 65 LayoutEmbeddedObject::PluginAvailability availability) { |
65 Locale& locale = node ? toElement(node)->locale() : Locale::defaultLocale(); | 66 Locale& locale = node ? toElement(node)->locale() : Locale::defaultLocale(); |
66 switch (availability) { | 67 switch (availability) { |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 return CompositingReasonNone; | 153 return CompositingReasonNone; |
153 } | 154 } |
154 | 155 |
155 LayoutReplaced* LayoutEmbeddedObject::embeddedReplacedContent() const { | 156 LayoutReplaced* LayoutEmbeddedObject::embeddedReplacedContent() const { |
156 if (!node() || !widget() || !widget()->isFrameView()) | 157 if (!node() || !widget() || !widget()->isFrameView()) |
157 return nullptr; | 158 return nullptr; |
158 return toFrameView(widget())->embeddedReplacedContent(); | 159 return toFrameView(widget())->embeddedReplacedContent(); |
159 } | 160 } |
160 | 161 |
161 } // namespace blink | 162 } // namespace blink |
OLD | NEW |