| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 // In order for our child HWNDs (NativeWindowWidgets) to update properly, | 74 // In order for our child HWNDs (NativeWindowWidgets) to update properly, |
| 75 // they need to be told that we are updating the screen. The problem is that | 75 // they need to be told that we are updating the screen. The problem is that |
| 76 // the native widgets need to recalculate their clip region and not overlap | 76 // the native widgets need to recalculate their clip region and not overlap |
| 77 // any of our non-native widgets. To force the resizing, call | 77 // any of our non-native widgets. To force the resizing, call |
| 78 // setFrameRect(). This will be a quick operation for most frames, but the | 78 // setFrameRect(). This will be a quick operation for most frames, but the |
| 79 // NativeWindowWidgets will update a proper clipping region. | 79 // NativeWindowWidgets will update a proper clipping region. |
| 80 view->setFrameRect(view->frameRect()); | 80 view->setFrameRect(view->frameRect()); |
| 81 | 81 |
| 82 // setFrameRect may have the side-effect of causing existing page layout to | 82 // setFrameRect may have the side-effect of causing existing page layout to |
| 83 // be invalidated, so layout needs to be called last. | 83 // be invalidated, so layout needs to be called last. |
| 84 view->updateLayoutAndStyleForPainting(); | 84 view->updateLayoutAndStyleIfNeededRecursive(); |
| 85 |
| 86 // For now, as we know this is the point in code where the compositor has |
| 87 // actually asked for Blink to update the composited layer tree. So finally |
| 88 // do all the deferred work for updateCompositingLayers() here. |
| 89 if (RenderView* renderView = view->renderView()) |
| 90 renderView->compositor()->updateCompositingLayers(); |
| 85 } | 91 } |
| 86 | 92 |
| 87 void PageWidgetDelegate::paint(Page* page, PageOverlayList* overlays, WebCanvas*
canvas, const WebRect& rect, CanvasBackground background) | 93 void PageWidgetDelegate::paint(Page* page, PageOverlayList* overlays, WebCanvas*
canvas, const WebRect& rect, CanvasBackground background) |
| 88 { | 94 { |
| 89 if (rect.isEmpty()) | 95 if (rect.isEmpty()) |
| 90 return; | 96 return; |
| 91 GraphicsContext gc(canvas); | 97 GraphicsContext gc(canvas); |
| 92 gc.setCertainlyOpaque(background == Opaque); | 98 gc.setCertainlyOpaque(background == Opaque); |
| 93 gc.applyDeviceScaleFactor(page->deviceScaleFactor()); | 99 gc.applyDeviceScaleFactor(page->deviceScaleFactor()); |
| 94 gc.setUseHighResMarkers(page->deviceScaleFactor() > 1.5f); | 100 gc.setUseHighResMarkers(page->deviceScaleFactor() > 1.5f); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 { | 219 { |
| 214 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m
ainFrame.view(), event)); | 220 return mainFrame.eventHandler().handleWheelEvent(PlatformWheelEventBuilder(m
ainFrame.view(), event)); |
| 215 } | 221 } |
| 216 | 222 |
| 217 bool PageWidgetEventHandler::handleTouchEvent(Frame& mainFrame, const WebTouchEv
ent& event) | 223 bool PageWidgetEventHandler::handleTouchEvent(Frame& mainFrame, const WebTouchEv
ent& event) |
| 218 { | 224 { |
| 219 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m
ainFrame.view(), event)); | 225 return mainFrame.eventHandler().handleTouchEvent(PlatformTouchEventBuilder(m
ainFrame.view(), event)); |
| 220 } | 226 } |
| 221 | 227 |
| 222 } | 228 } |
| OLD | NEW |