| 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 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2107 // RenderLayer::paintLayer assumes that the caller clips to the passed r
ect. Squashed layers need to do this clipping in software, | 2107 // RenderLayer::paintLayer assumes that the caller clips to the passed r
ect. Squashed layers need to do this clipping in software, |
| 2108 // since there is no graphics layer to clip them precisely. Furthermore,
in some cases we squash layers that need clipping in software | 2108 // since there is no graphics layer to clip them precisely. Furthermore,
in some cases we squash layers that need clipping in software |
| 2109 // from clipping ancestors (see CompositedLayerMapping::localClipRectFor
SquashedLayer()). | 2109 // from clipping ancestors (see CompositedLayerMapping::localClipRectFor
SquashedLayer()). |
| 2110 context->save(); | 2110 context->save(); |
| 2111 dirtyRect.intersect(paintInfo.localClipRectForSquashedLayer); | 2111 dirtyRect.intersect(paintInfo.localClipRectForSquashedLayer); |
| 2112 context->clip(dirtyRect); | 2112 context->clip(dirtyRect); |
| 2113 LayerPainter(*paintInfo.renderLayer).paintLayer(context, paintingInfo, p
aintLayerFlags); | 2113 LayerPainter(*paintInfo.renderLayer).paintLayer(context, paintingInfo, p
aintLayerFlags); |
| 2114 context->restore(); | 2114 context->restore(); |
| 2115 } | 2115 } |
| 2116 | 2116 |
| 2117 ASSERT(!paintInfo.renderLayer->usedTransparency()); | |
| 2118 | |
| 2119 // Manually restore the context to its original state by applying the opposi
te translation. | 2117 // Manually restore the context to its original state by applying the opposi
te translation. |
| 2120 context->translate(offset.width(), offset.height()); | 2118 context->translate(offset.width(), offset.height()); |
| 2121 } | 2119 } |
| 2122 | 2120 |
| 2123 static void paintScrollbar(Scrollbar* scrollbar, GraphicsContext& context, const
IntRect& clip) | 2121 static void paintScrollbar(Scrollbar* scrollbar, GraphicsContext& context, const
IntRect& clip) |
| 2124 { | 2122 { |
| 2125 if (!scrollbar) | 2123 if (!scrollbar) |
| 2126 return; | 2124 return; |
| 2127 | 2125 |
| 2128 context.save(); | 2126 context.save(); |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2326 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2324 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
| 2327 name = "Scrolling Block Selection Layer"; | 2325 name = "Scrolling Block Selection Layer"; |
| 2328 } else { | 2326 } else { |
| 2329 ASSERT_NOT_REACHED(); | 2327 ASSERT_NOT_REACHED(); |
| 2330 } | 2328 } |
| 2331 | 2329 |
| 2332 return name; | 2330 return name; |
| 2333 } | 2331 } |
| 2334 | 2332 |
| 2335 } // namespace blink | 2333 } // namespace blink |
| OLD | NEW |