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

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

Issue 2797943002: Set plugin focus via element dispatch (Closed)
Patch Set: Set plugin focus after dispatching DOM events and making sure focus has not changed. Created 3 years, 8 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/platform/FrameViewBase.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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 dirtyRect.move( 179 dirtyRect.move(
180 (layoutObject->borderLeft() + layoutObject->paddingLeft()).toInt(), 180 (layoutObject->borderLeft() + layoutObject->paddingLeft()).toInt(),
181 (layoutObject->borderTop() + layoutObject->paddingTop()).toInt()); 181 (layoutObject->borderTop() + layoutObject->paddingTop()).toInt());
182 182
183 m_pendingInvalidationRect.unite(dirtyRect); 183 m_pendingInvalidationRect.unite(dirtyRect);
184 184
185 layoutObject->setMayNeedPaintInvalidation(); 185 layoutObject->setMayNeedPaintInvalidation();
186 } 186 }
187 187
188 void WebPluginContainerImpl::setFocused(bool focused, WebFocusType focusType) { 188 void WebPluginContainerImpl::setFocused(bool focused, WebFocusType focusType) {
189 FrameViewBase::setFocused(focused, focusType);
190 m_webPlugin->updateFocus(focused, focusType); 189 m_webPlugin->updateFocus(focused, focusType);
191 } 190 }
192 191
193 void WebPluginContainerImpl::show() { 192 void WebPluginContainerImpl::show() {
194 setSelfVisible(true); 193 setSelfVisible(true);
195 m_webPlugin->updateVisibility(true); 194 m_webPlugin->updateVisibility(true);
196 195
197 FrameViewBase::show(); 196 FrameViewBase::show();
198 } 197 }
199 198
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 // frame view. 985 // frame view.
987 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect); 986 computeClipRectsForPlugin(m_element, windowRect, clipRect, unobscuredRect);
988 } 987 }
989 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects); 988 getPluginOcclusions(m_element, this->parent(), frameRect(), cutOutRects);
990 // Convert to the plugin position. 989 // Convert to the plugin position.
991 for (size_t i = 0; i < cutOutRects.size(); i++) 990 for (size_t i = 0; i < cutOutRects.size(); i++)
992 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); 991 cutOutRects[i].move(-frameRect().x(), -frameRect().y());
993 } 992 }
994 993
995 } // namespace blink 994 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/FrameViewBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698