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

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

Issue 2737883002: Rename LayoutPart::widget to LayoutPart::frameViewBase (Closed)
Patch Set: Rename LayoutPart::widget to LayoutPart::frameViewBase 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 if (WebInputEvent::RawKeyDown == event.type()) { 1151 if (WebInputEvent::RawKeyDown == event.type()) {
1152 // Suppress the next keypress event unless the focused node is a plugin 1152 // Suppress the next keypress event unless the focused node is a plugin
1153 // node. (Flash needs these keypress events to handle non-US keyboards.) 1153 // node. (Flash needs these keypress events to handle non-US keyboards.)
1154 Element* element = focusedElement(); 1154 Element* element = focusedElement();
1155 if (element && element->layoutObject() && 1155 if (element && element->layoutObject() &&
1156 element->layoutObject()->isEmbeddedObject()) { 1156 element->layoutObject()->isEmbeddedObject()) {
1157 if (event.windowsKeyCode == VKEY_TAB) { 1157 if (event.windowsKeyCode == VKEY_TAB) {
1158 // If the plugin supports keyboard focus then we should not send a tab 1158 // If the plugin supports keyboard focus then we should not send a tab
1159 // keypress event. 1159 // keypress event.
1160 FrameViewBase* frameViewBase = 1160 FrameViewBase* frameViewBase =
1161 toLayoutPart(element->layoutObject())->widget(); 1161 toLayoutPart(element->layoutObject())->frameViewBase();
1162 if (frameViewBase && frameViewBase->isPluginContainer()) { 1162 if (frameViewBase && frameViewBase->isPluginContainer()) {
1163 WebPluginContainerImpl* plugin = 1163 WebPluginContainerImpl* plugin =
1164 toWebPluginContainerImpl(frameViewBase); 1164 toWebPluginContainerImpl(frameViewBase);
1165 if (plugin && plugin->supportsKeyboardFocus()) 1165 if (plugin && plugin->supportsKeyboardFocus())
1166 m_suppressNextKeypressEvent = true; 1166 m_suppressNextKeypressEvent = true;
1167 } 1167 }
1168 } 1168 }
1169 } else { 1169 } else {
1170 m_suppressNextKeypressEvent = true; 1170 m_suppressNextKeypressEvent = true;
1171 } 1171 }
(...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after
3339 void WebViewImpl::performPluginAction(const WebPluginAction& action, 3339 void WebViewImpl::performPluginAction(const WebPluginAction& action,
3340 const WebPoint& location) { 3340 const WebPoint& location) {
3341 // FIXME: Location is probably in viewport coordinates 3341 // FIXME: Location is probably in viewport coordinates
3342 HitTestResult result = hitTestResultForRootFramePos(location); 3342 HitTestResult result = hitTestResultForRootFramePos(location);
3343 Node* node = result.innerNode(); 3343 Node* node = result.innerNode();
3344 if (!isHTMLObjectElement(*node) && !isHTMLEmbedElement(*node)) 3344 if (!isHTMLObjectElement(*node) && !isHTMLEmbedElement(*node))
3345 return; 3345 return;
3346 3346
3347 LayoutObject* object = node->layoutObject(); 3347 LayoutObject* object = node->layoutObject();
3348 if (object && object->isLayoutPart()) { 3348 if (object && object->isLayoutPart()) {
3349 FrameViewBase* frameViewWidget = toLayoutPart(object)->widget(); 3349 FrameViewBase* frameViewWidget = toLayoutPart(object)->frameViewBase();
3350 if (frameViewWidget && frameViewWidget->isPluginContainer()) { 3350 if (frameViewWidget && frameViewWidget->isPluginContainer()) {
3351 WebPluginContainerImpl* plugin = 3351 WebPluginContainerImpl* plugin =
3352 toWebPluginContainerImpl(frameViewWidget); 3352 toWebPluginContainerImpl(frameViewWidget);
3353 switch (action.type) { 3353 switch (action.type) {
3354 case WebPluginAction::Rotate90Clockwise: 3354 case WebPluginAction::Rotate90Clockwise:
3355 plugin->plugin()->rotateView(WebPlugin::RotationType90Clockwise); 3355 plugin->plugin()->rotateView(WebPlugin::RotationType90Clockwise);
3356 break; 3356 break;
3357 case WebPluginAction::Rotate90Counterclockwise: 3357 case WebPluginAction::Rotate90Counterclockwise:
3358 plugin->plugin()->rotateView( 3358 plugin->plugin()->rotateView(
3359 WebPlugin::RotationType90Counterclockwise); 3359 WebPlugin::RotationType90Counterclockwise);
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
4174 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame()) 4174 if (focusedFrame->localFrameRoot() != mainFrameImpl()->frame())
4175 return nullptr; 4175 return nullptr;
4176 return focusedFrame; 4176 return focusedFrame;
4177 } 4177 }
4178 4178
4179 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const { 4179 LocalFrame* WebViewImpl::focusedLocalFrameAvailableForIme() const {
4180 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr; 4180 return m_imeAcceptEvents ? focusedLocalFrameInWidget() : nullptr;
4181 } 4181 }
4182 4182
4183 } // namespace blink 4183 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebNode.cpp ('k') | third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698