Chromium Code Reviews| 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 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1359 { | 1359 { |
| 1360 Element* editable = frame()->selection()->rootEditableElement(); | 1360 Element* editable = frame()->selection()->rootEditableElement(); |
| 1361 if (!editable) | 1361 if (!editable) |
| 1362 return; | 1362 return; |
| 1363 | 1363 |
| 1364 VisiblePosition position = visiblePositionForWindowPoint(point); | 1364 VisiblePosition position = visiblePositionForWindowPoint(point); |
| 1365 if (frame()->selection()->shouldChangeSelection(position)) | 1365 if (frame()->selection()->shouldChangeSelection(position)) |
| 1366 frame()->selection()->moveTo(position, UserTriggered); | 1366 frame()->selection()->moveTo(position, UserTriggered); |
| 1367 } | 1367 } |
| 1368 | 1368 |
| 1369 void WebFrameImpl::setCaretEnabled(bool enable) | |
| 1370 { | |
| 1371 frame()->selection()->setCaretVisible(enable); | |
|
abarth-chromium
2013/08/12 18:40:34
Is there a reason to use a different name in the A
varunjain
2013/08/12 21:43:40
No particular reason. Changed.
| |
| 1372 } | |
| 1373 | |
| 1369 VisiblePosition WebFrameImpl::visiblePositionForWindowPoint(const WebPoint& poin t) | 1374 VisiblePosition WebFrameImpl::visiblePositionForWindowPoint(const WebPoint& poin t) |
| 1370 { | 1375 { |
| 1371 FloatPoint unscaledPoint(point); | 1376 FloatPoint unscaledPoint(point); |
| 1372 unscaledPoint.scale(1 / view()->pageScaleFactor(), 1 / view()->pageScaleFact or()); | 1377 unscaledPoint.scale(1 / view()->pageScaleFactor(), 1 / view()->pageScaleFact or()); |
| 1373 | 1378 |
| 1374 HitTestRequest request = HitTestRequest::Move | HitTestRequest::ReadOnly | H itTestRequest::Active | HitTestRequest::IgnoreClipping | HitTestRequest::Disallo wShadowContent; | 1379 HitTestRequest request = HitTestRequest::Move | HitTestRequest::ReadOnly | H itTestRequest::Active | HitTestRequest::IgnoreClipping | HitTestRequest::Disallo wShadowContent; |
| 1375 HitTestResult result(frame()->view()->windowToContents(roundedIntPoint(unsca ledPoint))); | 1380 HitTestResult result(frame()->view()->windowToContents(roundedIntPoint(unsca ledPoint))); |
| 1376 frame()->document()->renderView()->layer()->hitTest(request, result); | 1381 frame()->document()->renderView()->layer()->hitTest(request, result); |
| 1377 | 1382 |
| 1378 Node* node = result.targetNode(); | 1383 Node* node = result.targetNode(); |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2482 | 2487 |
| 2483 // There is a possibility that the frame being detached was the only | 2488 // There is a possibility that the frame being detached was the only |
| 2484 // pending one. We need to make sure final replies can be sent. | 2489 // pending one. We need to make sure final replies can be sent. |
| 2485 flushCurrentScopingEffort(m_findRequestIdentifier); | 2490 flushCurrentScopingEffort(m_findRequestIdentifier); |
| 2486 | 2491 |
| 2487 cancelPendingScopingEffort(); | 2492 cancelPendingScopingEffort(); |
| 2488 } | 2493 } |
| 2489 } | 2494 } |
| 2490 | 2495 |
| 2491 } // namespace WebKit | 2496 } // namespace WebKit |
| OLD | NEW |