| 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 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1801 | 1801 |
| 1802 if (m_owningLayer.hasVisibleBoxDecorations()) | 1802 if (m_owningLayer.hasVisibleBoxDecorations()) |
| 1803 return true; | 1803 return true; |
| 1804 | 1804 |
| 1805 if (layoutObject->hasMask()) // masks require special treatment | 1805 if (layoutObject->hasMask()) // masks require special treatment |
| 1806 return true; | 1806 return true; |
| 1807 | 1807 |
| 1808 if (layoutObject->isReplaced() && !isCompositedPlugin(layoutObject)) | 1808 if (layoutObject->isReplaced() && !isCompositedPlugin(layoutObject)) |
| 1809 return true; | 1809 return true; |
| 1810 | 1810 |
| 1811 if (layoutObject->isLayoutRegion()) | 1811 if (layoutObject->isLayoutMultiColumnSet()) |
| 1812 return true; | 1812 return true; |
| 1813 | 1813 |
| 1814 if (layoutObject->node() && layoutObject->node()->isDocumentNode()) { | 1814 if (layoutObject->node() && layoutObject->node()->isDocumentNode()) { |
| 1815 // Look to see if the root object has a non-simple background | 1815 // Look to see if the root object has a non-simple background |
| 1816 LayoutObject* rootObject = layoutObject->document().documentElement() ?
layoutObject->document().documentElement()->layoutObject() : 0; | 1816 LayoutObject* rootObject = layoutObject->document().documentElement() ?
layoutObject->document().documentElement()->layoutObject() : 0; |
| 1817 // Reject anything that has a border, a border-radius or outline, | 1817 // Reject anything that has a border, a border-radius or outline, |
| 1818 // or is not a simple background (no background, or solid color). | 1818 // or is not a simple background (no background, or solid color). |
| 1819 if (rootObject && hasBoxDecorationsOrBackgroundImage(rootObject->styleRe
f())) | 1819 if (rootObject && hasBoxDecorationsOrBackgroundImage(rootObject->styleRe
f())) |
| 1820 return true; | 1820 return true; |
| 1821 | 1821 |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2101 } | 2101 } |
| 2102 | 2102 |
| 2103 #if ENABLE(ASSERT) | 2103 #if ENABLE(ASSERT) |
| 2104 paintInfo.paintLayer->layoutObject()->assertSubtreeIsLaidOut(); | 2104 paintInfo.paintLayer->layoutObject()->assertSubtreeIsLaidOut(); |
| 2105 #endif | 2105 #endif |
| 2106 | 2106 |
| 2107 float deviceScaleFactor = blink::deviceScaleFactor(paintInfo.paintLayer->lay
outObject()->frame()); | 2107 float deviceScaleFactor = blink::deviceScaleFactor(paintInfo.paintLayer->lay
outObject()->frame()); |
| 2108 context->setDeviceScaleFactor(deviceScaleFactor); | 2108 context->setDeviceScaleFactor(deviceScaleFactor); |
| 2109 | 2109 |
| 2110 if (paintInfo.paintLayer->compositingState() != PaintsIntoGroupedBacking) { | 2110 if (paintInfo.paintLayer->compositingState() != PaintsIntoGroupedBacking) { |
| 2111 // FIXME: GraphicsLayers need a way to split for LayoutRegions. | 2111 // FIXME: GraphicsLayers need a way to split for multicol. |
| 2112 DeprecatedPaintLayerPaintingInfo paintingInfo(paintInfo.paintLayer, Layo
utRect(dirtyRect), PaintBehaviorNormal, paintInfo.paintLayer->subpixelAccumulati
on()); | 2112 DeprecatedPaintLayerPaintingInfo paintingInfo(paintInfo.paintLayer, Layo
utRect(dirtyRect), PaintBehaviorNormal, paintInfo.paintLayer->subpixelAccumulati
on()); |
| 2113 DeprecatedPaintLayerPainter(*paintInfo.paintLayer).paintLayerContents(co
ntext, paintingInfo, paintLayerFlags); | 2113 DeprecatedPaintLayerPainter(*paintInfo.paintLayer).paintLayerContents(co
ntext, paintingInfo, paintLayerFlags); |
| 2114 | 2114 |
| 2115 if (paintInfo.paintLayer->containsDirtyOverlayScrollbars()) | 2115 if (paintInfo.paintLayer->containsDirtyOverlayScrollbars()) |
| 2116 DeprecatedPaintLayerPainter(*paintInfo.paintLayer).paintLayerContent
s(context, paintingInfo, paintLayerFlags | PaintLayerPaintingOverlayScrollbars); | 2116 DeprecatedPaintLayerPainter(*paintInfo.paintLayer).paintLayerContent
s(context, paintingInfo, paintLayerFlags | PaintLayerPaintingOverlayScrollbars); |
| 2117 } else { | 2117 } else { |
| 2118 DeprecatedPaintLayerPaintingInfo paintingInfo(paintInfo.paintLayer, Layo
utRect(dirtyRect), PaintBehaviorNormal, paintInfo.paintLayer->subpixelAccumulati
on()); | 2118 DeprecatedPaintLayerPaintingInfo paintingInfo(paintInfo.paintLayer, Layo
utRect(dirtyRect), PaintBehaviorNormal, paintInfo.paintLayer->subpixelAccumulati
on()); |
| 2119 | 2119 |
| 2120 // DeprecatedPaintLayer::paintLayer assumes that the caller clips to the
passed rect. Squashed layers need to do this clipping in software, | 2120 // DeprecatedPaintLayer::paintLayer assumes that the caller clips to the
passed rect. Squashed layers need to do this clipping in software, |
| 2121 // since there is no graphics layer to clip them precisely. Furthermore,
in some cases we squash layers that need clipping in software | 2121 // since there is no graphics layer to clip them precisely. Furthermore,
in some cases we squash layers that need clipping in software |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2338 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2338 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
| 2339 name = "Scrolling Block Selection Layer"; | 2339 name = "Scrolling Block Selection Layer"; |
| 2340 } else { | 2340 } else { |
| 2341 ASSERT_NOT_REACHED(); | 2341 ASSERT_NOT_REACHED(); |
| 2342 } | 2342 } |
| 2343 | 2343 |
| 2344 return name; | 2344 return name; |
| 2345 } | 2345 } |
| 2346 | 2346 |
| 2347 } // namespace blink | 2347 } // namespace blink |
| OLD | NEW |