OLD | NEW |
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 scrollableArea->verticalScrollbar()->isCustomScrollbar())) { | 122 scrollableArea->verticalScrollbar()->isCustomScrollbar())) { |
123 hasCustomScrollbars = true; | 123 hasCustomScrollbars = true; |
124 } | 124 } |
125 } | 125 } |
126 | 126 |
127 // TODO(flackr): When we correctly clip the scrolling contents layer we can | 127 // TODO(flackr): When we correctly clip the scrolling contents layer we can |
128 // paint locally equivalent backgrounds into it. https://crbug.com/645957 | 128 // paint locally equivalent backgrounds into it. https://crbug.com/645957 |
129 if (!style()->hasAutoClip()) | 129 if (!style()->hasAutoClip()) |
130 return BackgroundPaintInGraphicsLayer; | 130 return BackgroundPaintInGraphicsLayer; |
131 | 131 |
132 // TODO(flackr): Remove this when box shadows are still painted correctly when | |
133 // painting into the composited scrolling contents layer. | |
134 // https://crbug.com/646464 | |
135 if (style()->boxShadow()) | |
136 return BackgroundPaintInGraphicsLayer; | |
137 | |
138 // Assume optimistically that the background can be painted in the scrolling | 132 // Assume optimistically that the background can be painted in the scrolling |
139 // contents until we find otherwise. | 133 // contents until we find otherwise. |
140 BackgroundPaintLocation paintLocation = BackgroundPaintInScrollingContents; | 134 BackgroundPaintLocation paintLocation = BackgroundPaintInScrollingContents; |
141 const FillLayer* layer = &(style()->backgroundLayers()); | 135 const FillLayer* layer = &(style()->backgroundLayers()); |
142 for (; layer; layer = layer->next()) { | 136 for (; layer; layer = layer->next()) { |
143 if (layer->attachment() == LocalBackgroundAttachment) | 137 if (layer->attachment() == LocalBackgroundAttachment) |
144 continue; | 138 continue; |
145 | 139 |
146 // Solid color layers with an effective background clip of the padding box | 140 // Solid color layers with an effective background clip of the padding box |
147 // can be treated as local. | 141 // can be treated as local. |
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1327 if (rootElementStyle->hasBackground()) | 1321 if (rootElementStyle->hasBackground()) |
1328 return false; | 1322 return false; |
1329 | 1323 |
1330 if (node() != document().firstBodyElement()) | 1324 if (node() != document().firstBodyElement()) |
1331 return false; | 1325 return false; |
1332 | 1326 |
1333 return true; | 1327 return true; |
1334 } | 1328 } |
1335 | 1329 |
1336 } // namespace blink | 1330 } // namespace blink |
OLD | NEW |