Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 m_pendingInvalidationRect.unite(dirtyRect); | 182 m_pendingInvalidationRect.unite(dirtyRect); |
| 183 | 183 |
| 184 layoutObject->setMayNeedPaintInvalidation(); | 184 layoutObject->setMayNeedPaintInvalidation(); |
| 185 } | 185 } |
| 186 | 186 |
| 187 void WebPluginContainerImpl::setFocused(bool focused, WebFocusType focusType) { | 187 void WebPluginContainerImpl::setFocused(bool focused, WebFocusType focusType) { |
| 188 FrameViewBase::setFocused(focused, focusType); | 188 FrameViewBase::setFocused(focused, focusType); |
| 189 m_webPlugin->updateFocus(focused, focusType); | 189 m_webPlugin->updateFocus(focused, focusType); |
| 190 } | 190 } |
| 191 | 191 |
| 192 bool WebPluginContainerImpl::isPlaceholder() { | |
| 193 if (m_webPlugin) | |
| 194 return m_webPlugin->isPlaceholder(); | |
| 195 return false; | |
|
Bernhard Bauer
2017/03/28 10:55:59
I would maybe return early in this case instead.
George Joseph
2017/03/30 08:41:44
Done.
| |
| 196 } | |
| 197 | |
| 192 void WebPluginContainerImpl::show() { | 198 void WebPluginContainerImpl::show() { |
| 193 setSelfVisible(true); | 199 setSelfVisible(true); |
| 194 m_webPlugin->updateVisibility(true); | 200 m_webPlugin->updateVisibility(true); |
| 195 | 201 |
| 196 FrameViewBase::show(); | 202 FrameViewBase::show(); |
| 197 } | 203 } |
| 198 | 204 |
| 199 void WebPluginContainerImpl::hide() { | 205 void WebPluginContainerImpl::hide() { |
| 200 setSelfVisible(false); | 206 setSelfVisible(false); |
| 201 m_webPlugin->updateVisibility(false); | 207 m_webPlugin->updateVisibility(false); |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 986 // frame view. | 992 // frame view. |
| 987 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect); | 993 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect); |
| 988 } | 994 } |
| 989 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); | 995 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); |
| 990 // Convert to the plugin position. | 996 // Convert to the plugin position. |
| 991 for (size_t i = 0; i < cutOutRects.size(); i++) | 997 for (size_t i = 0; i < cutOutRects.size(); i++) |
| 992 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); | 998 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); |
| 993 } | 999 } |
| 994 | 1000 |
| 995 } // namespace blink | 1001 } // namespace blink |
| OLD | NEW |