OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * | 10 * |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 page->frameHost().visualViewport().containerLayer()->addChild(m_layer.ge
t()); | 89 page->frameHost().visualViewport().containerLayer()->addChild(m_layer.ge
t()); |
90 } | 90 } |
91 | 91 |
92 FloatSize size = page->frameHost().visualViewport().size(); | 92 FloatSize size = page->frameHost().visualViewport().size(); |
93 if (size != m_layer->size()) | 93 if (size != m_layer->size()) |
94 m_layer->setSize(size); | 94 m_layer->setSize(size); |
95 | 95 |
96 m_layer->setNeedsDisplay(); | 96 m_layer->setNeedsDisplay(); |
97 } | 97 } |
98 | 98 |
99 void PageOverlay::paintContents(const GraphicsLayer* graphicsLayer, GraphicsCont
ext& gc, GraphicsLayerPaintingPhase phase, const IntRect* inClip) const | 99 IntRect PageOverlay::paintContents(const GraphicsLayer* graphicsLayer, GraphicsC
ontext& gc, GraphicsLayerPaintingPhase phase, const IntRect*) const |
100 { | 100 { |
101 ASSERT(m_layer); | 101 ASSERT(m_layer); |
102 m_delegate->paintPageOverlay(*this, gc, expandedIntSize(m_layer->size())); | 102 IntSize paintSize = expandedIntSize(m_layer->size()); |
| 103 m_delegate->paintPageOverlay(*this, gc, paintSize); |
| 104 return IntRect(IntPoint(), paintSize); |
103 } | 105 } |
104 | 106 |
105 String PageOverlay::debugName(const GraphicsLayer*) | 107 String PageOverlay::debugName(const GraphicsLayer*) |
106 { | 108 { |
107 return "WebViewImpl Page Overlay Content Layer"; | 109 return "WebViewImpl Page Overlay Content Layer"; |
108 } | 110 } |
109 | 111 |
110 } // namespace blink | 112 } // namespace blink |
OLD | NEW |