| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 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 4117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4128 | 4128 |
| 4129 m_pageOverlays->add(overlay, zOrder); | 4129 m_pageOverlays->add(overlay, zOrder); |
| 4130 } | 4130 } |
| 4131 | 4131 |
| 4132 void WebViewImpl::removePageOverlay(WebPageOverlay* overlay) | 4132 void WebViewImpl::removePageOverlay(WebPageOverlay* overlay) |
| 4133 { | 4133 { |
| 4134 if (m_pageOverlays && m_pageOverlays->remove(overlay) && m_pageOverlays->emp
ty()) | 4134 if (m_pageOverlays && m_pageOverlays->remove(overlay) && m_pageOverlays->emp
ty()) |
| 4135 m_pageOverlays = nullptr; | 4135 m_pageOverlays = nullptr; |
| 4136 } | 4136 } |
| 4137 | 4137 |
| 4138 void WebViewImpl::addPageOverlay(PageOverlay::Painter* overlayPainter, int zOrde
r) |
| 4139 { |
| 4140 if (!m_pageOverlays) |
| 4141 m_pageOverlays = PageOverlayList::create(this); |
| 4142 |
| 4143 m_pageOverlays->add(overlayPainter, zOrder); |
| 4144 } |
| 4145 |
| 4146 void WebViewImpl::removePageOverlay(PageOverlay::Painter* overlayPainter) |
| 4147 { |
| 4148 if (m_pageOverlays && m_pageOverlays->remove(overlayPainter) && m_pageOverla
ys->empty()) |
| 4149 m_pageOverlays = nullptr; |
| 4150 } |
| 4151 |
| 4138 void WebViewImpl::setOverlayLayer(GraphicsLayer* layer) | 4152 void WebViewImpl::setOverlayLayer(GraphicsLayer* layer) |
| 4139 { | 4153 { |
| 4140 if (!m_rootGraphicsLayer) | 4154 if (!m_rootGraphicsLayer) |
| 4141 return; | 4155 return; |
| 4142 | 4156 |
| 4143 if (!m_page->mainFrame()->isLocalFrame()) | 4157 if (!m_page->mainFrame()->isLocalFrame()) |
| 4144 return; | 4158 return; |
| 4145 | 4159 |
| 4146 if (pinchVirtualViewportEnabled()) { | 4160 if (pinchVirtualViewportEnabled()) { |
| 4147 m_page->deprecatedLocalMainFrame()->view()->renderView()->compositor()->
setOverlayLayer(layer); | 4161 m_page->deprecatedLocalMainFrame()->view()->renderView()->compositor()->
setOverlayLayer(layer); |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4632 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width | 4646 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width |
| 4633 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); | 4647 || (constraints.minimumScale == constraints.maximumScale && constraints.
minimumScale != -1); |
| 4634 } | 4648 } |
| 4635 | 4649 |
| 4636 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4650 void WebViewImpl::forceNextWebGLContextCreationToFail() |
| 4637 { | 4651 { |
| 4638 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4652 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
| 4639 } | 4653 } |
| 4640 | 4654 |
| 4641 } // namespace blink | 4655 } // namespace blink |
| OLD | NEW |