Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: Source/core/rendering/RenderPart.cpp

Issue 104433003: Attach a WebLayer to a frame element for out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added missing null check Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/rendering/RenderLayerCompositor.cpp ('k') | Source/web/WebFrameImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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, 2009 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
11 * 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.
12 * 12 *
13 * 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,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details. 16 * Library General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU Library General Public License 18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to 19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA. 21 * Boston, MA 02110-1301, USA.
22 * 22 *
23 */ 23 */
24 24
25 #include "config.h" 25 #include "config.h"
26 #include "core/rendering/RenderPart.h" 26 #include "core/rendering/RenderPart.h"
27 27
28 #include "core/frame/Frame.h"
29 #include "core/frame/FrameView.h"
28 #include "core/html/HTMLFrameElementBase.h" 30 #include "core/html/HTMLFrameElementBase.h"
29 #include "core/frame/FrameView.h"
30 #include "core/plugins/PluginView.h" 31 #include "core/plugins/PluginView.h"
31 #include "core/rendering/HitTestResult.h" 32 #include "core/rendering/HitTestResult.h"
32 #include "core/rendering/RenderLayer.h" 33 #include "core/rendering/RenderLayer.h"
33 #include "core/rendering/RenderView.h" 34 #include "core/rendering/RenderView.h"
34 #include "core/rendering/svg/RenderSVGRoot.h" 35 #include "core/rendering/svg/RenderSVGRoot.h"
35 36
36 using namespace std; 37 using namespace std;
37 38
38 namespace WebCore { 39 namespace WebCore {
39 40
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // renderer and the plugin has a layer, then we need a layer. Second, if thi s is 79 // renderer and the plugin has a layer, then we need a layer. Second, if thi s is
79 // a renderer with a contentDocument and that document needs a layer, then w e need 80 // a renderer with a contentDocument and that document needs a layer, then w e need
80 // a layer. 81 // a layer.
81 if (widget() && widget()->isPluginView() && toPluginView(widget())->platform Layer()) 82 if (widget() && widget()->isPluginView() && toPluginView(widget())->platform Layer())
82 return true; 83 return true;
83 84
84 if (!node() || !node()->isFrameOwnerElement()) 85 if (!node() || !node()->isFrameOwnerElement())
85 return false; 86 return false;
86 87
87 HTMLFrameOwnerElement* element = toHTMLFrameOwnerElement(node()); 88 HTMLFrameOwnerElement* element = toHTMLFrameOwnerElement(node());
89 if (element->contentFrame() && element->contentFrame()->remotePlatformLayer( ))
90 return true;
91
88 if (Document* contentDocument = element->contentDocument()) { 92 if (Document* contentDocument = element->contentDocument()) {
89 if (RenderView* view = contentDocument->renderView()) 93 if (RenderView* view = contentDocument->renderView())
90 return view->usesCompositing(); 94 return view->usesCompositing();
91 } 95 }
92 96
93 return false; 97 return false;
94 } 98 }
95 99
96 bool RenderPart::needsPreferredWidthsRecalculation() const 100 bool RenderPart::needsPreferredWidthsRecalculation() const
97 { 101 {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 Scrollbar* frameScrollbar = childFrameView->scrollbarAtPoint(newHitT estLocation.roundedPoint()); 143 Scrollbar* frameScrollbar = childFrameView->scrollbarAtPoint(newHitT estLocation.roundedPoint());
140 if (frameScrollbar) 144 if (frameScrollbar)
141 result.setScrollbar(frameScrollbar); 145 result.setScrollbar(frameScrollbar);
142 } 146 }
143 } 147 }
144 148
145 return RenderWidget::nodeAtPoint(request, result, locationInContainer, accum ulatedOffset, action); 149 return RenderWidget::nodeAtPoint(request, result, locationInContainer, accum ulatedOffset, action);
146 } 150 }
147 151
148 } 152 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayerCompositor.cpp ('k') | Source/web/WebFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698