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

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

Issue 2337503002: Don't automatically paint clipped backgrounds into scrolling contents layer. (Closed)
Patch Set: Turn off scrolling contents layer background painting when we have a CSS clip Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.cpp » ('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) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 bool hasCustomScrollbars = false; 125 bool hasCustomScrollbars = false;
126 // TODO(flackr): Detect opaque custom scrollbars which would cover up a bord er-box 126 // TODO(flackr): Detect opaque custom scrollbars which would cover up a bord er-box
127 // background. 127 // background.
128 if (PaintLayerScrollableArea* scrollableArea = getScrollableArea()) { 128 if (PaintLayerScrollableArea* scrollableArea = getScrollableArea()) {
129 if ((scrollableArea->horizontalScrollbar() && scrollableArea->horizontal Scrollbar()->isCustomScrollbar()) 129 if ((scrollableArea->horizontalScrollbar() && scrollableArea->horizontal Scrollbar()->isCustomScrollbar())
130 || (scrollableArea->verticalScrollbar() && scrollableArea->verticalS crollbar()->isCustomScrollbar())) { 130 || (scrollableArea->verticalScrollbar() && scrollableArea->verticalS crollbar()->isCustomScrollbar())) {
131 hasCustomScrollbars = true; 131 hasCustomScrollbars = true;
132 } 132 }
133 } 133 }
134 134
135 // TODO(flackr): When we correctly clip the scrolling contents layer we can
136 // paint locally equivalent backgrounds into it. https://crbug.com/645957
137 if (!style()->hasAutoClip())
138 return false;
139
135 // TODO(flackr): We should be able to paint locally attached borders with a border-radius 140 // TODO(flackr): We should be able to paint locally attached borders with a border-radius
136 // but these currently do not paint correctly. https://crbug.com/645949 141 // but these currently do not paint correctly. https://crbug.com/645949
137 if (style()->hasBorderRadius()) 142 if (style()->hasBorderRadius())
138 return false; 143 return false;
139 144
140 const FillLayer* layer = &(style()->backgroundLayers()); 145 const FillLayer* layer = &(style()->backgroundLayers());
141 for (; layer; layer = layer->next()) { 146 for (; layer; layer = layer->next()) {
142 if (layer->attachment() == LocalBackgroundAttachment) 147 if (layer->attachment() == LocalBackgroundAttachment)
143 continue; 148 continue;
144 149
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 if (rootElementStyle->hasBackground()) 1182 if (rootElementStyle->hasBackground())
1178 return false; 1183 return false;
1179 1184
1180 if (node() != document().firstBodyElement()) 1185 if (node() != document().firstBodyElement())
1181 return false; 1186 return false;
1182 1187
1183 return true; 1188 return true;
1184 } 1189 }
1185 1190
1186 } // namespace blink 1191 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintLayerScrollableAreaTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698