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

Unified Diff: webkit/glue/webframeloaderclient_impl.cc

Issue 267003: LTTF: Print the element path in TestWebViewDelegate::decidePolicyForNavigation()... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/empty_webframeclient.h ('k') | webkit/tools/layout_tests/test_expectations.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webframeloaderclient_impl.cc
===================================================================
--- webkit/glue/webframeloaderclient_impl.cc (revision 28239)
+++ webkit/glue/webframeloaderclient_impl.cc (working copy)
@@ -17,6 +17,7 @@
#include "FormState.h"
#include "FrameLoader.h"
#include "FrameLoadRequest.h"
+#include "HitTestResult.h"
#include "MIMETypeRegistry.h"
#include "MouseEvent.h"
#include "Page.h"
@@ -33,6 +34,7 @@
#include "net/base/net_errors.h"
#include "webkit/api/public/WebForm.h"
#include "webkit/api/public/WebFrameClient.h"
+#include "webkit/api/public/WebNode.h"
#include "webkit/api/public/WebPlugin.h"
#include "webkit/api/public/WebPluginParams.h"
#include "webkit/api/public/WebSecurityOrigin.h"
@@ -62,6 +64,7 @@
using WebKit::WebDataSourceImpl;
using WebKit::WebNavigationType;
using WebKit::WebNavigationPolicy;
+using WebKit::WebNode;
using WebKit::WebPlugin;
using WebKit::WebPluginContainerImpl;
using WebKit::WebPluginLoadObserver;
@@ -825,9 +828,22 @@
WebNavigationType webnav_type =
WebDataSourceImpl::toWebNavigationType(action.type());
+ RefPtr<WebCore::Node> node;
+ for (const Event* event = action.event(); event;
+ event = event->underlyingEvent()) {
+ if (event->isMouseEvent()) {
+ const MouseEvent* mouse_event =
+ static_cast<const MouseEvent*>(event);
+ node = webframe_->frame()->eventHandler()->hitTestResultAtPoint(
+ mouse_event->absoluteLocation(), false).innerNonSharedNode();
+ break;
+ }
+ }
+ WebNode originating_node = webkit_glue::NodeToWebNode(node);
+
navigation_policy = webframe_->client()->decidePolicyForNavigation(
- webframe_, ds->request(), webnav_type, navigation_policy,
- is_redirect);
+ webframe_, ds->request(), webnav_type, originating_node,
+ navigation_policy, is_redirect);
}
}
« no previous file with comments | « webkit/glue/empty_webframeclient.h ('k') | webkit/tools/layout_tests/test_expectations.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698