| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 TransformRecorder scaleRecorder(paintContext, root, scale); | 87 TransformRecorder scaleRecorder(paintContext, root, scale); |
| 88 | 88 |
| 89 IntRect dirtyRect(rect); | 89 IntRect dirtyRect(rect); |
| 90 FrameView* view = root.view(); | 90 FrameView* view = root.view(); |
| 91 if (view) { | 91 if (view) { |
| 92 ClipRecorder clipRecorder(paintContext, root, DisplayItem::PageWidge
tDelegateClip, LayoutRect(dirtyRect)); | 92 ClipRecorder clipRecorder(paintContext, root, DisplayItem::PageWidge
tDelegateClip, LayoutRect(dirtyRect)); |
| 93 | 93 |
| 94 view->paint(&paintContext, dirtyRect); | 94 view->paint(&paintContext, dirtyRect); |
| 95 if (overlays) | 95 if (overlays) |
| 96 overlays->paintWebFrame(paintContext); | 96 overlays->paintWebFrame(paintContext); |
| 97 } else { | 97 } else if (!DrawingRecorder::useCachedDrawingIfPossible(paintContext, ro
ot, DisplayItem::PageWidgetDelegateBackgroundFallback)) { |
| 98 DrawingRecorder drawingRecorder(paintContext, root, DisplayItem::Pag
eWidgetDelegateBackgroundFallback, dirtyRect); | 98 DrawingRecorder drawingRecorder(paintContext, root, DisplayItem::Pag
eWidgetDelegateBackgroundFallback, dirtyRect); |
| 99 if (!drawingRecorder.canUseCachedDrawing()) | 99 paintContext.fillRect(dirtyRect, Color::white); |
| 100 paintContext.fillRect(dirtyRect, Color::white); | |
| 101 } | 100 } |
| 102 } | 101 } |
| 103 pictureBuilder.endRecording()->playback(canvas); | 102 pictureBuilder.endRecording()->playback(canvas); |
| 104 } | 103 } |
| 105 | 104 |
| 106 bool PageWidgetDelegate::handleInputEvent(PageWidgetEventHandler& handler, const
WebInputEvent& event, LocalFrame* root) | 105 bool PageWidgetDelegate::handleInputEvent(PageWidgetEventHandler& handler, const
WebInputEvent& event, LocalFrame* root) |
| 107 { | 106 { |
| 108 switch (event.type) { | 107 switch (event.type) { |
| 109 | 108 |
| 110 // FIXME: WebKit seems to always return false on mouse events processing | 109 // FIXME: WebKit seems to always return false on mouse events processing |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 { | 205 { |
| 207 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m
ainFrame.view(), event)); | 206 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m
ainFrame.view(), event)); |
| 208 } | 207 } |
| 209 | 208 |
| 210 bool PageWidgetEventHandler::handleTouchEvent(LocalFrame& mainFrame, const WebTo
uchEvent& event) | 209 bool PageWidgetEventHandler::handleTouchEvent(LocalFrame& mainFrame, const WebTo
uchEvent& event) |
| 211 { | 210 { |
| 212 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m
ainFrame.view(), event)); | 211 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m
ainFrame.view(), event)); |
| 213 } | 212 } |
| 214 | 213 |
| 215 } // namespace blink | 214 } // namespace blink |
| OLD | NEW |