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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 #include "core/editing/FrameSelection.h" | 93 #include "core/editing/FrameSelection.h" |
94 #include "core/editing/InputMethodController.h" | 94 #include "core/editing/InputMethodController.h" |
95 #include "core/editing/PlainTextRange.h" | 95 #include "core/editing/PlainTextRange.h" |
96 #include "core/editing/SpellChecker.h" | 96 #include "core/editing/SpellChecker.h" |
97 #include "core/editing/TextAffinity.h" | 97 #include "core/editing/TextAffinity.h" |
98 #include "core/editing/TextIterator.h" | 98 #include "core/editing/TextIterator.h" |
99 #include "core/editing/htmlediting.h" | 99 #include "core/editing/htmlediting.h" |
100 #include "core/editing/markup.h" | 100 #include "core/editing/markup.h" |
101 #include "core/frame/Console.h" | 101 #include "core/frame/Console.h" |
102 #include "core/frame/DOMWindow.h" | 102 #include "core/frame/DOMWindow.h" |
| 103 #include "core/frame/FrameHost.h" |
103 #include "core/frame/FrameView.h" | 104 #include "core/frame/FrameView.h" |
104 #include "core/frame/Settings.h" | 105 #include "core/frame/Settings.h" |
105 #include "core/html/HTMLCollection.h" | 106 #include "core/html/HTMLCollection.h" |
106 #include "core/html/HTMLFormElement.h" | 107 #include "core/html/HTMLFormElement.h" |
107 #include "core/html/HTMLFrameElementBase.h" | 108 #include "core/html/HTMLFrameElementBase.h" |
108 #include "core/html/HTMLFrameOwnerElement.h" | 109 #include "core/html/HTMLFrameOwnerElement.h" |
109 #include "core/html/HTMLHeadElement.h" | 110 #include "core/html/HTMLHeadElement.h" |
110 #include "core/html/HTMLInputElement.h" | 111 #include "core/html/HTMLInputElement.h" |
111 #include "core/html/HTMLLinkElement.h" | 112 #include "core/html/HTMLLinkElement.h" |
112 #include "core/html/PluginDocument.h" | 113 #include "core/html/PluginDocument.h" |
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1299 frame()->document()->head()->appendChild(styleElement.release(), IGNORE_EXCE
PTION); | 1300 frame()->document()->head()->appendChild(styleElement.release(), IGNORE_EXCE
PTION); |
1300 } | 1301 } |
1301 | 1302 |
1302 void WebLocalFrameImpl::setCaretVisible(bool visible) | 1303 void WebLocalFrameImpl::setCaretVisible(bool visible) |
1303 { | 1304 { |
1304 frame()->selection().setCaretVisible(visible); | 1305 frame()->selection().setCaretVisible(visible); |
1305 } | 1306 } |
1306 | 1307 |
1307 VisiblePosition WebLocalFrameImpl::visiblePositionForWindowPoint(const WebPoint&
point) | 1308 VisiblePosition WebLocalFrameImpl::visiblePositionForWindowPoint(const WebPoint&
point) |
1308 { | 1309 { |
| 1310 // FIXME(bokan): crbug.com/371902 - These scale/pinch transforms shouldn't |
| 1311 // be ad hoc and explicit. |
| 1312 PinchViewport& pinchViewport = frame()->page()->frameHost().pinchViewport(); |
1309 FloatPoint unscaledPoint(point); | 1313 FloatPoint unscaledPoint(point); |
1310 unscaledPoint.scale(1 / view()->pageScaleFactor(), 1 / view()->pageScaleFact
or()); | 1314 unscaledPoint.scale(1 / view()->pageScaleFactor(), 1 / view()->pageScaleFact
or()); |
| 1315 unscaledPoint.moveBy(pinchViewport.visibleRect().location()); |
1311 | 1316 |
1312 HitTestRequest request = HitTestRequest::Move | HitTestRequest::ReadOnly | H
itTestRequest::Active | HitTestRequest::IgnoreClipping | HitTestRequest::Confusi
ngAndOftenMisusedDisallowShadowContent; | 1317 HitTestRequest request = HitTestRequest::Move | HitTestRequest::ReadOnly | H
itTestRequest::Active | HitTestRequest::IgnoreClipping | HitTestRequest::Confusi
ngAndOftenMisusedDisallowShadowContent; |
1313 HitTestResult result(frame()->view()->windowToContents(roundedIntPoint(unsca
ledPoint))); | 1318 HitTestResult result(frame()->view()->windowToContents(roundedIntPoint(unsca
ledPoint))); |
1314 frame()->document()->renderView()->layer()->hitTest(request, result); | 1319 frame()->document()->renderView()->layer()->hitTest(request, result); |
1315 | 1320 |
1316 if (Node* node = result.targetNode()) | 1321 if (Node* node = result.targetNode()) |
1317 return frame()->selection().selection().visiblePositionRespectingEditing
Boundary(result.localPoint(), node); | 1322 return frame()->selection().selection().visiblePositionRespectingEditing
Boundary(result.localPoint(), node); |
1318 return VisiblePosition(); | 1323 return VisiblePosition(); |
1319 } | 1324 } |
1320 | 1325 |
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1915 | 1920 |
1916 void WebLocalFrameImpl::invalidateAll() const | 1921 void WebLocalFrameImpl::invalidateAll() const |
1917 { | 1922 { |
1918 ASSERT(frame() && frame()->view()); | 1923 ASSERT(frame() && frame()->view()); |
1919 FrameView* view = frame()->view(); | 1924 FrameView* view = frame()->view(); |
1920 view->invalidateRect(view->frameRect()); | 1925 view->invalidateRect(view->frameRect()); |
1921 invalidateScrollbar(); | 1926 invalidateScrollbar(); |
1922 } | 1927 } |
1923 | 1928 |
1924 } // namespace blink | 1929 } // namespace blink |
OLD | NEW |