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

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

Issue 869813003: Implement elementsFromPoint (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix typeo Created 5 years, 11 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 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 } 1043 }
1044 1044
1045 WebRect WebViewImpl::computeBlockBounds(const WebRect& rect, bool ignoreClipping ) 1045 WebRect WebViewImpl::computeBlockBounds(const WebRect& rect, bool ignoreClipping )
1046 { 1046 {
1047 if (!mainFrameImpl()) 1047 if (!mainFrameImpl())
1048 return WebRect(); 1048 return WebRect();
1049 1049
1050 // Use the rect-based hit test to find the node. 1050 // Use the rect-based hit test to find the node.
1051 IntPoint point = mainFrameImpl()->frameView()->windowToContents(IntPoint(rec t.x, rect.y)); 1051 IntPoint point = mainFrameImpl()->frameView()->windowToContents(IntPoint(rec t.x, rect.y));
1052 HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitT estRequest::Active | (ignoreClipping ? HitTestRequest::IgnoreClipping : 0); 1052 HitTestRequest::HitTestRequestType hitType = HitTestRequest::ReadOnly | HitT estRequest::Active | (ignoreClipping ? HitTestRequest::IgnoreClipping : 0);
1053 // crbug.com/451914: This does not look correct: we're using a list-based
1054 // hit test but only using the single element result.
1053 HitTestResult result = mainFrameImpl()->frame()->eventHandler().hitTestResul tAtPoint(point, hitType, LayoutSize(rect.width, rect.height)); 1055 HitTestResult result = mainFrameImpl()->frame()->eventHandler().hitTestResul tAtPoint(point, hitType, LayoutSize(rect.width, rect.height));
1054 result.setToShadowHostIfInUserAgentShadowRoot(); 1056 result.setToShadowHostIfInUserAgentShadowRoot();
1055 1057
1056 Node* node = result.innerNonSharedNode(); 1058 Node* node = result.innerNonSharedNode();
1057 if (!node) 1059 if (!node)
1058 return WebRect(); 1060 return WebRect();
1059 1061
1060 // Find the block type node based on the hit node. 1062 // Find the block type node based on the hit node.
1061 // FIXME: This wants to walk composed tree with NodeRenderingTraversal::pare nt(). 1063 // FIXME: This wants to walk composed tree with NodeRenderingTraversal::pare nt().
1062 while (node && (!node->renderer() || node->renderer()->isInline())) 1064 while (node && (!node->renderer() || node->renderer()->isInline()))
(...skipping 3486 matching lines...) Expand 10 before | Expand all | Expand 10 after
4549 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4551 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4550 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4552 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4551 } 4553 }
4552 4554
4553 void WebViewImpl::forceNextWebGLContextCreationToFail() 4555 void WebViewImpl::forceNextWebGLContextCreationToFail()
4554 { 4556 {
4555 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4557 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4556 } 4558 }
4557 4559
4558 } // namespace blink 4560 } // namespace blink
OLDNEW
« Source/core/rendering/RenderLayer.cpp ('K') | « Source/web/WebPluginContainerImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698