| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |