Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp

Issue 1513573013: Don't call LayoutPart::widgetPositionsUpdated unnecessarily. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebPluginContainerImpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 #include "web/WebViewImpl.h" 98 #include "web/WebViewImpl.h"
99 #include "wtf/Assertions.h" 99 #include "wtf/Assertions.h"
100 100
101 namespace blink { 101 namespace blink {
102 102
103 // Public methods -------------------------------------------------------------- 103 // Public methods --------------------------------------------------------------
104 104
105 void WebPluginContainerImpl::setFrameRect(const IntRect& frameRect) 105 void WebPluginContainerImpl::setFrameRect(const IntRect& frameRect)
106 { 106 {
107 Widget::setFrameRect(frameRect); 107 Widget::setFrameRect(frameRect);
108 reportGeometry();
109 } 108 }
110 109
111 void WebPluginContainerImpl::layoutIfNeeded() 110 void WebPluginContainerImpl::layoutIfNeeded()
112 { 111 {
113 RELEASE_ASSERT(m_webPlugin); 112 RELEASE_ASSERT(m_webPlugin);
114 m_webPlugin->layoutIfNeeded(); 113 m_webPlugin->layoutIfNeeded();
115 } 114 }
116 115
117 void WebPluginContainerImpl::paint(GraphicsContext& context, const CullRect& cul lRect) const 116 void WebPluginContainerImpl::paint(GraphicsContext& context, const CullRect& cul lRect) const
118 { 117 {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 if (!event->defaultHandled()) 213 if (!event->defaultHandled())
215 m_element->Node::defaultEventHandler(event); 214 m_element->Node::defaultEventHandler(event);
216 } 215 }
217 216
218 void WebPluginContainerImpl::frameRectsChanged() 217 void WebPluginContainerImpl::frameRectsChanged()
219 { 218 {
220 Widget::frameRectsChanged(); 219 Widget::frameRectsChanged();
221 reportGeometry(); 220 reportGeometry();
222 } 221 }
223 222
224 void WebPluginContainerImpl::widgetPositionsUpdated() 223 void WebPluginContainerImpl::widgetGeometryMayHaveChanged()
225 { 224 {
226 Widget::widgetPositionsUpdated(); 225 Widget::widgetGeometryMayHaveChanged();
227 reportGeometry(); 226 reportGeometry();
228 } 227 }
229 228
230 void WebPluginContainerImpl::eventListenersRemoved() 229 void WebPluginContainerImpl::eventListenersRemoved()
231 { 230 {
232 // We're no longer registered to receive touch events, so don't try to remov e 231 // We're no longer registered to receive touch events, so don't try to remov e
233 // the touch event handlers in our destructor. 232 // the touch event handlers in our destructor.
234 m_touchEventRequestType = TouchEventRequestTypeNone; 233 m_touchEventRequestType = TouchEventRequestTypeNone;
235 } 234 }
236 235
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 // frame view. 976 // frame view.
978 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec t); 977 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRec t);
979 } 978 }
980 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); 979 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects);
981 // Convert to the plugin position. 980 // Convert to the plugin position.
982 for (size_t i = 0; i < cutOutRects.size(); i++) 981 for (size_t i = 0; i < cutOutRects.size(); i++)
983 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); 982 cutOutRects[i].move(-frameRect().x(), -frameRect().y());
984 } 983 }
985 984
986 } // namespace blinkf 985 } // namespace blinkf
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebPluginContainerImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698