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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutPart.cpp

Issue 1602663003: Framelet Prototype 2016 using Mojo IPC Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Disabled oilpan Created 4 years, 11 months 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
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
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 bool LayoutPart::requiresAcceleratedCompositing() const 115 bool LayoutPart::requiresAcceleratedCompositing() const
116 { 116 {
117 // There are two general cases in which we can return true. First, if this i s a plugin 117 // There are two general cases in which we can return true. First, if this i s a plugin
118 // LayoutObject and the plugin has a layer, then we need a layer. Second, if this is 118 // LayoutObject and the plugin has a layer, then we need a layer. Second, if this is
119 // a LayoutObject with a contentDocument and that document needs a layer, th en we need 119 // a LayoutObject with a contentDocument and that document needs a layer, th en we need
120 // a layer. 120 // a layer.
121 if (widget() && widget()->isPluginView() && toPluginView(widget())->platform Layer()) 121 if (widget() && widget()->isPluginView() && toPluginView(widget())->platform Layer())
122 return true; 122 return true;
123 123
124 if (!node() || !node()->isFrameOwnerElement()) 124 if (!node())
125 return false;
126
127 if (node()->isFrameletElement())
128 return true;
129
130 if (!node()->isFrameOwnerElement())
125 return false; 131 return false;
126 132
127 HTMLFrameOwnerElement* element = toHTMLFrameOwnerElement(node()); 133 HTMLFrameOwnerElement* element = toHTMLFrameOwnerElement(node());
128 if (element->contentFrame() && element->contentFrame()->isRemoteFrame()) 134 if (element->contentFrame() && element->contentFrame()->isRemoteFrame())
129 return true; 135 return true;
130 136
131 if (Document* contentDocument = element->contentDocument()) { 137 if (Document* contentDocument = element->contentDocument()) {
132 if (LayoutView* view = contentDocument->layoutView()) 138 if (LayoutView* view = contentDocument->layoutView())
133 return view->usesCompositing(); 139 return view->usesCompositing();
134 } 140 }
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 363
358 bool LayoutPart::isThrottledFrameView() const 364 bool LayoutPart::isThrottledFrameView() const
359 { 365 {
360 if (!widget() || !widget()->isFrameView()) 366 if (!widget() || !widget()->isFrameView())
361 return false; 367 return false;
362 const FrameView* frameView = toFrameView(widget()); 368 const FrameView* frameView = toFrameView(widget());
363 return frameView->shouldThrottleRendering(); 369 return frameView->shouldThrottleRendering();
364 } 370 }
365 371
366 } // namespace blink 372 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698