| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #include "core/paint/ScrollableAreaPainter.h" | 55 #include "core/paint/ScrollableAreaPainter.h" |
| 56 #include "core/paint/TransformRecorder.h" | 56 #include "core/paint/TransformRecorder.h" |
| 57 #include "core/plugins/PluginView.h" | 57 #include "core/plugins/PluginView.h" |
| 58 #include "platform/LengthFunctions.h" | 58 #include "platform/LengthFunctions.h" |
| 59 #include "platform/RuntimeEnabledFeatures.h" | 59 #include "platform/RuntimeEnabledFeatures.h" |
| 60 #include "platform/fonts/FontCache.h" | 60 #include "platform/fonts/FontCache.h" |
| 61 #include "platform/geometry/TransformState.h" | 61 #include "platform/geometry/TransformState.h" |
| 62 #include "platform/graphics/BitmapImage.h" | 62 #include "platform/graphics/BitmapImage.h" |
| 63 #include "platform/graphics/GraphicsContext.h" | 63 #include "platform/graphics/GraphicsContext.h" |
| 64 #include "platform/graphics/paint/ClipDisplayItem.h" | 64 #include "platform/graphics/paint/ClipDisplayItem.h" |
| 65 #include "platform/graphics/paint/CullRect.h" |
| 65 #include "platform/graphics/paint/PaintController.h" | 66 #include "platform/graphics/paint/PaintController.h" |
| 66 #include "platform/graphics/paint/TransformDisplayItem.h" | 67 #include "platform/graphics/paint/TransformDisplayItem.h" |
| 67 #include "wtf/CurrentTime.h" | 68 #include "wtf/CurrentTime.h" |
| 68 #include "wtf/text/StringBuilder.h" | 69 #include "wtf/text/StringBuilder.h" |
| 69 | 70 |
| 70 namespace blink { | 71 namespace blink { |
| 71 | 72 |
| 72 using namespace HTMLNames; | 73 using namespace HTMLNames; |
| 73 | 74 |
| 74 static IntRect clipBox(LayoutBox* layoutObject); | 75 static IntRect clipBox(LayoutBox* layoutObject); |
| (...skipping 2086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2161 | 2162 |
| 2162 static void paintScrollbar(const Scrollbar* scrollbar, GraphicsContext& context,
const IntRect& clip) | 2163 static void paintScrollbar(const Scrollbar* scrollbar, GraphicsContext& context,
const IntRect& clip) |
| 2163 { | 2164 { |
| 2164 if (!scrollbar) | 2165 if (!scrollbar) |
| 2165 return; | 2166 return; |
| 2166 | 2167 |
| 2167 const IntRect& scrollbarRect = scrollbar->frameRect(); | 2168 const IntRect& scrollbarRect = scrollbar->frameRect(); |
| 2168 TransformRecorder transformRecorder(context, *scrollbar, AffineTransform::tr
anslation(-scrollbarRect.x(), -scrollbarRect.y())); | 2169 TransformRecorder transformRecorder(context, *scrollbar, AffineTransform::tr
anslation(-scrollbarRect.x(), -scrollbarRect.y())); |
| 2169 IntRect transformedClip = clip; | 2170 IntRect transformedClip = clip; |
| 2170 transformedClip.moveBy(scrollbarRect.location()); | 2171 transformedClip.moveBy(scrollbarRect.location()); |
| 2171 scrollbar->paint(&context, transformedClip); | 2172 scrollbar->paint(&context, CullRect(transformedClip)); |
| 2172 } | 2173 } |
| 2173 | 2174 |
| 2174 static const int kPixelDistanceToRecord = 4000; | 2175 static const int kPixelDistanceToRecord = 4000; |
| 2175 | 2176 |
| 2176 IntRect CompositedLayerMapping::computeInterestRect(const GraphicsLayer* graphic
sLayer, LayoutObject* owningLayoutObject) | 2177 IntRect CompositedLayerMapping::computeInterestRect(const GraphicsLayer* graphic
sLayer, LayoutObject* owningLayoutObject) |
| 2177 { | 2178 { |
| 2178 FloatRect graphicsLayerBounds(FloatPoint(), graphicsLayer->size()); | 2179 FloatRect graphicsLayerBounds(FloatPoint(), graphicsLayer->size()); |
| 2179 | 2180 |
| 2180 // Start with the bounds of the graphics layer in the space of the owning La
youtObject. | 2181 // Start with the bounds of the graphics layer in the space of the owning La
youtObject. |
| 2181 FloatRect graphicsLayerBoundsInObjectSpace(graphicsLayerBounds); | 2182 FloatRect graphicsLayerBoundsInObjectSpace(graphicsLayerBounds); |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2460 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2461 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
| 2461 name = "Scrolling Block Selection Layer"; | 2462 name = "Scrolling Block Selection Layer"; |
| 2462 } else { | 2463 } else { |
| 2463 ASSERT_NOT_REACHED(); | 2464 ASSERT_NOT_REACHED(); |
| 2464 } | 2465 } |
| 2465 | 2466 |
| 2466 return name; | 2467 return name; |
| 2467 } | 2468 } |
| 2468 | 2469 |
| 2469 } // namespace blink | 2470 } // namespace blink |
| OLD | NEW |