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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 #include "core/paint/ScrollableAreaPainter.h" | 54 #include "core/paint/ScrollableAreaPainter.h" |
55 #include "core/paint/TransformRecorder.h" | 55 #include "core/paint/TransformRecorder.h" |
56 #include "core/plugins/PluginView.h" | 56 #include "core/plugins/PluginView.h" |
57 #include "platform/LengthFunctions.h" | 57 #include "platform/LengthFunctions.h" |
58 #include "platform/RuntimeEnabledFeatures.h" | 58 #include "platform/RuntimeEnabledFeatures.h" |
59 #include "platform/fonts/FontCache.h" | 59 #include "platform/fonts/FontCache.h" |
60 #include "platform/geometry/TransformState.h" | 60 #include "platform/geometry/TransformState.h" |
61 #include "platform/graphics/BitmapImage.h" | 61 #include "platform/graphics/BitmapImage.h" |
62 #include "platform/graphics/GraphicsContext.h" | 62 #include "platform/graphics/GraphicsContext.h" |
63 #include "platform/graphics/paint/ClipDisplayItem.h" | 63 #include "platform/graphics/paint/ClipDisplayItem.h" |
64 #include "platform/graphics/paint/DisplayItemList.h" | 64 #include "platform/graphics/paint/PaintController.h" |
65 #include "platform/graphics/paint/TransformDisplayItem.h" | 65 #include "platform/graphics/paint/TransformDisplayItem.h" |
66 #include "wtf/CurrentTime.h" | 66 #include "wtf/CurrentTime.h" |
67 #include "wtf/text/StringBuilder.h" | 67 #include "wtf/text/StringBuilder.h" |
68 | 68 |
69 namespace blink { | 69 namespace blink { |
70 | 70 |
71 using namespace HTMLNames; | 71 using namespace HTMLNames; |
72 | 72 |
73 static IntRect clipBox(LayoutBox* layoutObject); | 73 static IntRect clipBox(LayoutBox* layoutObject); |
74 | 74 |
(...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2136 } else { | 2136 } else { |
2137 PaintLayerPaintingInfo paintingInfo(paintInfo.paintLayer, LayoutRect(dir
tyRect), GlobalPaintNormalPhase, paintInfo.paintLayer->subpixelAccumulation()); | 2137 PaintLayerPaintingInfo paintingInfo(paintInfo.paintLayer, LayoutRect(dir
tyRect), GlobalPaintNormalPhase, paintInfo.paintLayer->subpixelAccumulation()); |
2138 | 2138 |
2139 // PaintLayer::paintLayer assumes that the caller clips to the passed re
ct. Squashed layers need to do this clipping in software, | 2139 // PaintLayer::paintLayer assumes that the caller clips to the passed re
ct. Squashed layers need to do this clipping in software, |
2140 // since there is no graphics layer to clip them precisely. Furthermore,
in some cases we squash layers that need clipping in software | 2140 // since there is no graphics layer to clip them precisely. Furthermore,
in some cases we squash layers that need clipping in software |
2141 // from clipping ancestors (see CompositedLayerMapping::localClipRectFor
SquashedLayer()). | 2141 // from clipping ancestors (see CompositedLayerMapping::localClipRectFor
SquashedLayer()). |
2142 // FIXME: Is it correct to clip to dirtyRect in slimming paint mode? | 2142 // FIXME: Is it correct to clip to dirtyRect in slimming paint mode? |
2143 // FIXME: Combine similar code here and LayerClipRecorder. | 2143 // FIXME: Combine similar code here and LayerClipRecorder. |
2144 dirtyRect.intersect(paintInfo.localClipRectForSquashedLayer); | 2144 dirtyRect.intersect(paintInfo.localClipRectForSquashedLayer); |
2145 { | 2145 { |
2146 ASSERT(context->displayItemList()); | 2146 ASSERT(context->paintController()); |
2147 context->displayItemList()->createAndAppend<ClipDisplayItem>(*this,
DisplayItem::ClipLayerOverflowControls, dirtyRect); | 2147 context->paintController()->createAndAppend<ClipDisplayItem>(*this,
DisplayItem::ClipLayerOverflowControls, dirtyRect); |
2148 } | 2148 } |
2149 PaintLayerPainter(*paintInfo.paintLayer).paintLayer(context, paintingInf
o, paintLayerFlags); | 2149 PaintLayerPainter(*paintInfo.paintLayer).paintLayer(context, paintingInf
o, paintLayerFlags); |
2150 { | 2150 { |
2151 ASSERT(context->displayItemList()); | 2151 ASSERT(context->paintController()); |
2152 context->displayItemList()->endItem<EndClipDisplayItem>(*this, Displ
ayItem::clipTypeToEndClipType(DisplayItem::ClipLayerOverflowControls)); | 2152 context->paintController()->endItem<EndClipDisplayItem>(*this, Displ
ayItem::clipTypeToEndClipType(DisplayItem::ClipLayerOverflowControls)); |
2153 } | 2153 } |
2154 } | 2154 } |
2155 } | 2155 } |
2156 | 2156 |
2157 static void paintScrollbar(const Scrollbar* scrollbar, GraphicsContext& context,
const IntRect& clip) | 2157 static void paintScrollbar(const Scrollbar* scrollbar, GraphicsContext& context,
const IntRect& clip) |
2158 { | 2158 { |
2159 if (!scrollbar) | 2159 if (!scrollbar) |
2160 return; | 2160 return; |
2161 | 2161 |
2162 const IntRect& scrollbarRect = scrollbar->frameRect(); | 2162 const IntRect& scrollbarRect = scrollbar->frameRect(); |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2438 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2438 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
2439 name = "Scrolling Block Selection Layer"; | 2439 name = "Scrolling Block Selection Layer"; |
2440 } else { | 2440 } else { |
2441 ASSERT_NOT_REACHED(); | 2441 ASSERT_NOT_REACHED(); |
2442 } | 2442 } |
2443 | 2443 |
2444 return name; | 2444 return name; |
2445 } | 2445 } |
2446 | 2446 |
2447 } // namespace blink | 2447 } // namespace blink |
OLD | NEW |