| 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 |
| 132 // Assume optimistically that the background can be painted in the scrolling | 138 // Assume optimistically that the background can be painted in the scrolling |
| 133 // contents until we find otherwise. | 139 // contents until we find otherwise. |
| 134 BackgroundPaintLocation paintLocation = BackgroundPaintInScrollingContents; | 140 BackgroundPaintLocation paintLocation = BackgroundPaintInScrollingContents; |
| 135 const FillLayer* layer = &(style()->backgroundLayers()); | 141 const FillLayer* layer = &(style()->backgroundLayers()); |
| 136 for (; layer; layer = layer->next()) { | 142 for (; layer; layer = layer->next()) { |
| 137 if (layer->attachment() == LocalBackgroundAttachment) | 143 if (layer->attachment() == LocalBackgroundAttachment) |
| 138 continue; | 144 continue; |
| 139 | 145 |
| 140 // Solid color layers with an effective background clip of the padding box | 146 // Solid color layers with an effective background clip of the padding box |
| 141 // can be treated as local. | 147 // can be treated as local. |
| (...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1321 if (rootElementStyle->hasBackground()) | 1327 if (rootElementStyle->hasBackground()) |
| 1322 return false; | 1328 return false; |
| 1323 | 1329 |
| 1324 if (node() != document().firstBodyElement()) | 1330 if (node() != document().firstBodyElement()) |
| 1325 return false; | 1331 return false; |
| 1326 | 1332 |
| 1327 return true; | 1333 return true; |
| 1328 } | 1334 } |
| 1329 | 1335 |
| 1330 } // namespace blink | 1336 } // namespace blink |
| OLD | NEW |