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

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

Issue 302083002: Always give RenderParts a RenderLayer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 3607 matching lines...) Expand 10 before | Expand all | Expand 10 after
3618 childLocalRect.moveBy(-childOffset); 3618 childLocalRect.moveBy(-childOffset);
3619 3619
3620 if (childLayer->backgroundIsKnownToBeOpaqueInRect(childLocalRect)) 3620 if (childLayer->backgroundIsKnownToBeOpaqueInRect(childLocalRect))
3621 return true; 3621 return true;
3622 } 3622 }
3623 return false; 3623 return false;
3624 } 3624 }
3625 3625
3626 bool RenderLayer::shouldBeSelfPaintingLayer() const 3626 bool RenderLayer::shouldBeSelfPaintingLayer() const
3627 { 3627 {
3628 if (renderer()->isRenderPart() && toRenderPart(renderer())->requiresAccelera tedCompositing())
3629 return true;
3628 return m_layerType == NormalLayer 3630 return m_layerType == NormalLayer
3629 || (m_scrollableArea && m_scrollableArea->hasOverlayScrollbars()) 3631 || (m_scrollableArea && m_scrollableArea->hasOverlayScrollbars())
3630 || needsCompositedScrolling(); 3632 || needsCompositedScrolling();
3631 } 3633 }
3632 3634
3633 void RenderLayer::updateSelfPaintingLayer() 3635 void RenderLayer::updateSelfPaintingLayer()
3634 { 3636 {
3635 bool isSelfPaintingLayer = this->shouldBeSelfPaintingLayer(); 3637 bool isSelfPaintingLayer = this->shouldBeSelfPaintingLayer();
3636 if (this->isSelfPaintingLayer() == isSelfPaintingLayer) 3638 if (this->isSelfPaintingLayer() == isSelfPaintingLayer)
3637 return; 3639 return;
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
4021 } 4023 }
4022 } 4024 }
4023 4025
4024 void showLayerTree(const WebCore::RenderObject* renderer) 4026 void showLayerTree(const WebCore::RenderObject* renderer)
4025 { 4027 {
4026 if (!renderer) 4028 if (!renderer)
4027 return; 4029 return;
4028 showLayerTree(renderer->enclosingLayer()); 4030 showLayerTree(renderer->enclosingLayer());
4029 } 4031 }
4030 #endif 4032 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698