| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 gc.setUseHighResMarkers(page->deviceScaleFactor() > 1.5f); | 90 gc.setUseHighResMarkers(page->deviceScaleFactor() > 1.5f); |
| 91 IntRect dirtyRect(rect); | 91 IntRect dirtyRect(rect); |
| 92 gc.save(); | 92 gc.save(); |
| 93 FrameView* view = mainFrameView(page); | 93 FrameView* view = mainFrameView(page); |
| 94 // FIXME: Can we remove the mainFrame()->document() check? | 94 // FIXME: Can we remove the mainFrame()->document() check? |
| 95 if (view && page->mainFrame()->document()) { | 95 if (view && page->mainFrame()->document()) { |
| 96 gc.clip(dirtyRect); | 96 gc.clip(dirtyRect); |
| 97 view->paint(&gc, dirtyRect); | 97 view->paint(&gc, dirtyRect); |
| 98 if (overlays) | 98 if (overlays) |
| 99 overlays->paintWebFrame(gc); | 99 overlays->paintWebFrame(gc); |
| 100 } else | 100 } else { |
| 101 gc.fillRect(dirtyRect, Color::white, ColorSpaceDeviceRGB); | 101 gc.fillRect(dirtyRect, Color::white); |
| 102 } |
| 102 gc.restore(); | 103 gc.restore(); |
| 103 } | 104 } |
| 104 | 105 |
| 105 bool PageWidgetDelegate::handleInputEvent(Page* page, PageWidgetEventHandler& ha
ndler, const WebInputEvent& event) | 106 bool PageWidgetDelegate::handleInputEvent(Page* page, PageWidgetEventHandler& ha
ndler, const WebInputEvent& event) |
| 106 { | 107 { |
| 107 Frame* frame = page ? page->mainFrame() : 0; | 108 Frame* frame = page ? page->mainFrame() : 0; |
| 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 |
| 111 // methods. For now we'll assume it has processed them (as we are only | 112 // methods. For now we'll assume it has processed them (as we are only |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 { | 211 { |
| 211 return mainFrame.eventHandler()->handleWheelEvent(PlatformWheelEventBuilder(
mainFrame.view(), event)); | 212 return mainFrame.eventHandler()->handleWheelEvent(PlatformWheelEventBuilder(
mainFrame.view(), event)); |
| 212 } | 213 } |
| 213 | 214 |
| 214 bool PageWidgetEventHandler::handleTouchEvent(Frame& mainFrame, const WebTouchEv
ent& event) | 215 bool PageWidgetEventHandler::handleTouchEvent(Frame& mainFrame, const WebTouchEv
ent& event) |
| 215 { | 216 { |
| 216 return mainFrame.eventHandler()->handleTouchEvent(PlatformTouchEventBuilder(
mainFrame.view(), event)); | 217 return mainFrame.eventHandler()->handleTouchEvent(PlatformTouchEventBuilder(
mainFrame.view(), event)); |
| 217 } | 218 } |
| 218 | 219 |
| 219 } | 220 } |
| OLD | NEW |