OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1212 return false; | 1212 return false; |
1213 | 1213 |
1214 if (paintsBoxDecorations() || paintsChildren()) | 1214 if (paintsBoxDecorations() || paintsChildren()) |
1215 return false; | 1215 return false; |
1216 | 1216 |
1217 if (renderObject->isRenderRegion()) | 1217 if (renderObject->isRenderRegion()) |
1218 return false; | 1218 return false; |
1219 | 1219 |
1220 if (renderObject->node() && renderObject->node()->isDocumentNode()) { | 1220 if (renderObject->node() && renderObject->node()->isDocumentNode()) { |
1221 // Look to see if the root object has a non-simple background | 1221 // Look to see if the root object has a non-simple background |
1222 RenderObject* rootObject = renderObject->document()->documentElement() ?
renderObject->document()->documentElement()->renderer() : 0; | 1222 RenderObject* rootObject = renderObject->document().documentElement() ?
renderObject->document().documentElement()->renderer() : 0; |
1223 if (!rootObject) | 1223 if (!rootObject) |
1224 return false; | 1224 return false; |
1225 | 1225 |
1226 RenderStyle* style = rootObject->style(); | 1226 RenderStyle* style = rootObject->style(); |
1227 | 1227 |
1228 // Reject anything that has a border, a border-radius or outline, | 1228 // Reject anything that has a border, a border-radius or outline, |
1229 // or is not a simple background (no background, or solid color). | 1229 // or is not a simple background (no background, or solid color). |
1230 if (hasBoxDecorationsOrBackgroundImage(style)) | 1230 if (hasBoxDecorationsOrBackgroundImage(style)) |
1231 return false; | 1231 return false; |
1232 | 1232 |
1233 // Now look at the body's renderer. | 1233 // Now look at the body's renderer. |
1234 HTMLElement* body = renderObject->document()->body(); | 1234 HTMLElement* body = renderObject->document().body(); |
1235 RenderObject* bodyObject = (body && body->hasLocalName(bodyTag)) ? body-
>renderer() : 0; | 1235 RenderObject* bodyObject = (body && body->hasLocalName(bodyTag)) ? body-
>renderer() : 0; |
1236 if (!bodyObject) | 1236 if (!bodyObject) |
1237 return false; | 1237 return false; |
1238 | 1238 |
1239 style = bodyObject->style(); | 1239 style = bodyObject->style(); |
1240 | 1240 |
1241 if (hasBoxDecorationsOrBackgroundImage(style)) | 1241 if (hasBoxDecorationsOrBackgroundImage(style)) |
1242 return false; | 1242 return false; |
1243 } | 1243 } |
1244 | 1244 |
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1929 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 1929 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
1930 name = "Scrolling Contents Layer"; | 1930 name = "Scrolling Contents Layer"; |
1931 } else { | 1931 } else { |
1932 ASSERT_NOT_REACHED(); | 1932 ASSERT_NOT_REACHED(); |
1933 } | 1933 } |
1934 | 1934 |
1935 return name; | 1935 return name; |
1936 } | 1936 } |
1937 | 1937 |
1938 } // namespace WebCore | 1938 } // namespace WebCore |
OLD | NEW |