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

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

Issue 2678683002: Delay instantiating InputDeviceCapabilities until accessed. (Closed)
Patch Set: rebased Created 3 years, 10 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
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 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 event->setDefaultHandled(); 888 event->setDefaultHandled();
889 } 889 }
890 890
891 void WebPluginContainerImpl::focusPlugin() { 891 void WebPluginContainerImpl::focusPlugin() {
892 LocalFrame& containingFrame = toFrameView(parent())->frame(); 892 LocalFrame& containingFrame = toFrameView(parent())->frame();
893 if (Page* currentPage = containingFrame.page()) 893 if (Page* currentPage = containingFrame.page())
894 currentPage->focusController().setFocusedElement(m_element, 894 currentPage->focusController().setFocusedElement(m_element,
895 &containingFrame); 895 &containingFrame);
896 else 896 else
897 containingFrame.document()->setFocusedElement( 897 containingFrame.document()->setFocusedElement(
898 m_element, 898 m_element, FocusParams(SelectionBehaviorOnFocus::None, WebFocusTypeNone,
899 FocusParams(SelectionBehaviorOnFocus::None, WebFocusTypeNone, nullptr)); 899 InputDeviceCapabilities::Null));
900 } 900 }
901 901
902 void WebPluginContainerImpl::issuePaintInvalidations() { 902 void WebPluginContainerImpl::issuePaintInvalidations() {
903 if (m_pendingInvalidationRect.isEmpty()) 903 if (m_pendingInvalidationRect.isEmpty())
904 return; 904 return;
905 905
906 LayoutBox* layoutObject = toLayoutBox(m_element->layoutObject()); 906 LayoutBox* layoutObject = toLayoutBox(m_element->layoutObject());
907 if (!layoutObject) 907 if (!layoutObject)
908 return; 908 return;
909 909
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 // frame view. 985 // frame view.
986 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect); 986 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect);
987 } 987 }
988 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); 988 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects);
989 // Convert to the plugin position. 989 // Convert to the plugin position.
990 for (size_t i = 0; i < cutOutRects.size(); i++) 990 for (size_t i = 0; i < cutOutRects.size(); i++)
991 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); 991 cutOutRects[i].move(-frameRect().x(), -frameRect().y());
992 } 992 }
993 993
994 } // namespace blink 994 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698