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

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

Issue 2733113002: Rename updateWidgetGeometry methods to updateGeometry. (Closed)
Patch Set: Created 3 years, 9 months 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // defaultEventHandler. 226 // defaultEventHandler.
227 if (!event->defaultHandled()) 227 if (!event->defaultHandled())
228 m_element->Node::defaultEventHandler(event); 228 m_element->Node::defaultEventHandler(event);
229 } 229 }
230 230
231 void WebPluginContainerImpl::frameRectsChanged() { 231 void WebPluginContainerImpl::frameRectsChanged() {
232 FrameViewBase::frameRectsChanged(); 232 FrameViewBase::frameRectsChanged();
233 reportGeometry(); 233 reportGeometry();
234 } 234 }
235 235
236 void WebPluginContainerImpl::widgetGeometryMayHaveChanged() { 236 void WebPluginContainerImpl::geometryMayHaveChanged() {
237 FrameViewBase::widgetGeometryMayHaveChanged(); 237 FrameViewBase::geometryMayHaveChanged();
238 reportGeometry(); 238 reportGeometry();
239 } 239 }
240 240
241 void WebPluginContainerImpl::eventListenersRemoved() { 241 void WebPluginContainerImpl::eventListenersRemoved() {
242 // We're no longer registered to receive touch events, so don't try to remove 242 // We're no longer registered to receive touch events, so don't try to remove
243 // the touch event handlers in our destructor. 243 // the touch event handlers in our destructor.
244 m_touchEventRequestType = TouchEventRequestTypeNone; 244 m_touchEventRequestType = TouchEventRequestTypeNone;
245 } 245 }
246 246
247 void WebPluginContainerImpl::setParentVisible(bool parentVisible) { 247 void WebPluginContainerImpl::setParentVisible(bool parentVisible) {
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 } 926 }
927 927
928 LayoutView* rootView = m_element->document().view()->layoutView(); 928 LayoutView* rootView = m_element->document().view()->layoutView();
929 while (rootView->frame()->ownerLayoutObject()) 929 while (rootView->frame()->ownerLayoutObject())
930 rootView = rootView->frame()->ownerLayoutObject()->view(); 930 rootView = rootView->frame()->ownerLayoutObject()->view();
931 931
932 LayoutBox* box = toLayoutBox(ownerElement->layoutObject()); 932 LayoutBox* box = toLayoutBox(ownerElement->layoutObject());
933 933
934 // Note: frameRect() for this plugin is equal to contentBoxRect, mapped to the 934 // Note: frameRect() for this plugin is equal to contentBoxRect, mapped to the
935 // containing view space, and rounded off. 935 // containing view space, and rounded off.
936 // See LayoutPart.cpp::updateWidgetGeometryInternal. To remove the lossy 936 // See LayoutPart.cpp::updateGeometryInternal. To remove the lossy
937 // effect of rounding off, use contentBoxRect directly. 937 // effect of rounding off, use contentBoxRect directly.
938 LayoutRect unclippedAbsoluteRect(box->contentBoxRect()); 938 LayoutRect unclippedAbsoluteRect(box->contentBoxRect());
939 box->mapToVisualRectInAncestorSpace(rootView, unclippedAbsoluteRect); 939 box->mapToVisualRectInAncestorSpace(rootView, unclippedAbsoluteRect);
940 940
941 // The frameRect is already in absolute space of the local frame to the 941 // The frameRect is already in absolute space of the local frame to the
942 // plugin. 942 // plugin.
943 windowRect = frameRect(); 943 windowRect = frameRect();
944 // Map up to the root frame. 944 // Map up to the root frame.
945 LayoutRect layoutWindowRect = 945 LayoutRect layoutWindowRect =
946 LayoutRect(m_element->document() 946 LayoutRect(m_element->document()
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 // frame view. 986 // frame view.
987 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect); 987 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect);
988 } 988 }
989 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); 989 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects);
990 // Convert to the plugin position. 990 // Convert to the plugin position.
991 for (size_t i = 0; i < cutOutRects.size(); i++) 991 for (size_t i = 0; i < cutOutRects.size(); i++)
992 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); 992 cutOutRects[i].move(-frameRect().x(), -frameRect().y());
993 } 993 }
994 994
995 } // namespace blink 995 } // namespace blink
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