OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 float scaleFactor = page.deviceScaleFactor(); | 86 float scaleFactor = page.deviceScaleFactor(); |
87 graphicsContext->setDeviceScaleFactor(scaleFactor); | 87 graphicsContext->setDeviceScaleFactor(scaleFactor); |
88 | 88 |
89 AffineTransform scale; | 89 AffineTransform scale; |
90 scale.scale(scaleFactor); | 90 scale.scale(scaleFactor); |
91 TransformRecorder scaleRecorder(*graphicsContext, root.displayItemClient(),
scale); | 91 TransformRecorder scaleRecorder(*graphicsContext, root.displayItemClient(),
scale); |
92 | 92 |
93 IntRect dirtyRect(rect); | 93 IntRect dirtyRect(rect); |
94 FrameView* view = root.view(); | 94 FrameView* view = root.view(); |
95 if (view) { | 95 if (view) { |
96 ClipRecorder clipRecorder(root.displayItemClient(), graphicsContext.get(
), DisplayItem::PageWidgetDelegateClip, dirtyRect); | 96 ClipRecorder clipRecorder(root.displayItemClient(), graphicsContext.get(
), DisplayItem::PageWidgetDelegateClip, LayoutRect(dirtyRect)); |
97 | 97 |
98 view->paint(graphicsContext.get(), dirtyRect); | 98 view->paint(graphicsContext.get(), dirtyRect); |
99 if (overlays) | 99 if (overlays) |
100 overlays->paintWebFrame(*graphicsContext); | 100 overlays->paintWebFrame(*graphicsContext); |
101 } else { | 101 } else { |
102 DrawingRecorder drawingRecorder(graphicsContext.get(), root.displayItemC
lient(), DisplayItem::PageWidgetDelegateBackgroundFallback, dirtyRect); | 102 DrawingRecorder drawingRecorder(graphicsContext.get(), root.displayItemC
lient(), DisplayItem::PageWidgetDelegateBackgroundFallback, dirtyRect); |
103 graphicsContext->fillRect(dirtyRect, Color::white); | 103 graphicsContext->fillRect(dirtyRect, Color::white); |
104 } | 104 } |
105 | 105 |
106 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { | 106 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 { | 212 { |
213 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m
ainFrame.view(), event)); | 213 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m
ainFrame.view(), event)); |
214 } | 214 } |
215 | 215 |
216 bool PageWidgetEventHandler::handleTouchEvent(LocalFrame& mainFrame, const WebTo
uchEvent& event) | 216 bool PageWidgetEventHandler::handleTouchEvent(LocalFrame& mainFrame, const WebTo
uchEvent& event) |
217 { | 217 { |
218 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m
ainFrame.view(), event)); | 218 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m
ainFrame.view(), event)); |
219 } | 219 } |
220 | 220 |
221 } // namespace blink | 221 } // namespace blink |
OLD | NEW |