Chromium Code Reviews| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 { |
| 98 DrawingRecorder drawingRecorder(paintContext, root, DisplayItem::Pag eWidgetDelegateBackgroundFallback, dirtyRect); | 98 if (!DrawingRecorder::useCachedDrawingIfPossible(paintContext, root, DisplayItem::PageWidgetDelegateBackgroundFallback)) { |
|
Xianzhu
2015/07/03 01:24:42
Nit: can use 'else if' to avoid indentation change
pdr.
2015/07/03 02:38:05
Done.
| |
| 99 if (!drawingRecorder.canUseCachedDrawing()) | 99 DrawingRecorder drawingRecorder(paintContext, root, DisplayItem: :PageWidgetDelegateBackgroundFallback, dirtyRect); |
| 100 paintContext.fillRect(dirtyRect, Color::white); | 100 paintContext.fillRect(dirtyRect, Color::white); |
| 101 } | |
| 101 } | 102 } |
| 102 } | 103 } |
| 103 pictureBuilder.endRecording()->playback(canvas); | 104 pictureBuilder.endRecording()->playback(canvas); |
| 104 } | 105 } |
| 105 | 106 |
| 106 bool PageWidgetDelegate::handleInputEvent(PageWidgetEventHandler& handler, const WebInputEvent& event, LocalFrame* root) | 107 bool PageWidgetDelegate::handleInputEvent(PageWidgetEventHandler& handler, const WebInputEvent& event, LocalFrame* root) |
| 107 { | 108 { |
| 108 switch (event.type) { | 109 switch (event.type) { |
| 109 | 110 |
| 110 // FIXME: WebKit seems to always return false on mouse events processing | 111 // 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 { | 207 { |
| 207 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m ainFrame.view(), event)); | 208 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m ainFrame.view(), event)); |
| 208 } | 209 } |
| 209 | 210 |
| 210 bool PageWidgetEventHandler::handleTouchEvent(LocalFrame& mainFrame, const WebTo uchEvent& event) | 211 bool PageWidgetEventHandler::handleTouchEvent(LocalFrame& mainFrame, const WebTo uchEvent& event) |
| 211 { | 212 { |
| 212 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m ainFrame.view(), event)); | 213 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m ainFrame.view(), event)); |
| 213 } | 214 } |
| 214 | 215 |
| 215 } // namespace blink | 216 } // namespace blink |
| OLD | NEW |