| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 frame()->inputMethodController().extendSelectionAndDelete(before, after); | 660 frame()->inputMethodController().extendSelectionAndDelete(before, after); |
| 661 } | 661 } |
| 662 | 662 |
| 663 void WebLocalFrameImpl::setCaretVisible(bool visible) | 663 void WebLocalFrameImpl::setCaretVisible(bool visible) |
| 664 { | 664 { |
| 665 frame()->selection().setCaretVisible(visible); | 665 frame()->selection().setCaretVisible(visible); |
| 666 } | 666 } |
| 667 | 667 |
| 668 VisiblePosition WebLocalFrameImpl::visiblePositionForWindowPoint(const WebPoint&
point) | 668 VisiblePosition WebLocalFrameImpl::visiblePositionForWindowPoint(const WebPoint&
point) |
| 669 { | 669 { |
| 670 // FIXME(bokan): crbug.com/371902 - These scale/pinch transforms shouldn't | |
| 671 // be ad hoc and explicit. | |
| 672 PinchViewport& pinchViewport = frame()->page()->frameHost().pinchViewport(); | |
| 673 FloatPoint unscaledPoint(point); | |
| 674 unscaledPoint.moveBy(pinchViewport.visibleRect().location()); | |
| 675 | |
| 676 HitTestRequest request = HitTestRequest::Move | HitTestRequest::ReadOnly | H
itTestRequest::Active | HitTestRequest::IgnoreClipping; | 670 HitTestRequest request = HitTestRequest::Move | HitTestRequest::ReadOnly | H
itTestRequest::Active | HitTestRequest::IgnoreClipping; |
| 677 HitTestResult result(frame()->view()->windowToContents(roundedIntPoint(unsca
ledPoint))); | 671 HitTestResult result(frame()->view()->windowToContents(roundedIntPoint(Float
Point(point)))); |
| 678 frame()->document()->renderView()->layer()->hitTest(request, result); | 672 frame()->document()->renderView()->layer()->hitTest(request, result); |
| 679 | 673 |
| 680 if (Node* node = result.targetNode()) | 674 if (Node* node = result.targetNode()) |
| 681 return frame()->selection().selection().visiblePositionRespectingEditing
Boundary(result.localPoint(), node); | 675 return frame()->selection().selection().visiblePositionRespectingEditing
Boundary(result.localPoint(), node); |
| 682 return VisiblePosition(); | 676 return VisiblePosition(); |
| 683 } | 677 } |
| 684 | 678 |
| 685 WebString WebLocalFrameImpl::contentAsText(size_t maxChars) const | 679 WebString WebLocalFrameImpl::contentAsText(size_t maxChars) const |
| 686 { | 680 { |
| 687 if (!frame()) | 681 if (!frame()) |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 825 } | 819 } |
| 826 | 820 |
| 827 void WebLocalFrameImpl::invalidateAll() const | 821 void WebLocalFrameImpl::invalidateAll() const |
| 828 { | 822 { |
| 829 ASSERT(frame() && frame()->view()); | 823 ASSERT(frame() && frame()->view()); |
| 830 FrameView* view = frame()->view(); | 824 FrameView* view = frame()->view(); |
| 831 view->invalidateRect(view->frameRect()); | 825 view->invalidateRect(view->frameRect()); |
| 832 } | 826 } |
| 833 | 827 |
| 834 } // namespace blink | 828 } // namespace blink |
| OLD | NEW |