| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1516 rect = VisiblePosition(position).absoluteCaretBounds(); | 1516 rect = VisiblePosition(position).absoluteCaretBounds(); |
| 1517 break; | 1517 break; |
| 1518 } | 1518 } |
| 1519 | 1519 |
| 1520 Position start = this->start(); | 1520 Position start = this->start(); |
| 1521 ASSERT(start.deprecatedNode()); | 1521 ASSERT(start.deprecatedNode()); |
| 1522 if (start.deprecatedNode() && start.deprecatedNode()->renderer()) { | 1522 if (start.deprecatedNode() && start.deprecatedNode()->renderer()) { |
| 1523 // FIXME: This code only handles scrolling the startContainer's layer, b
ut | 1523 // FIXME: This code only handles scrolling the startContainer's layer, b
ut |
| 1524 // the selection rect could intersect more than just that. | 1524 // the selection rect could intersect more than just that. |
| 1525 // See <rdar://problem/4799899>. | 1525 // See <rdar://problem/4799899>. |
| 1526 if (start.deprecatedNode()->renderer()->scrollRectToVisible(rect, alignm
ent, alignment)) | 1526 |
| 1527 updateAppearance(); | 1527 // FIXME(sky): Figure out how to reveal the selection... |
| 1528 } | 1528 } |
| 1529 } | 1529 } |
| 1530 | 1530 |
| 1531 void FrameSelection::setSelectionFromNone() | 1531 void FrameSelection::setSelectionFromNone() |
| 1532 { | 1532 { |
| 1533 // Put a caret inside the body if the entire frame is editable (either the | 1533 // Put a caret inside the body if the entire frame is editable (either the |
| 1534 // entire WebView is editable or designMode is on for this document). | 1534 // entire WebView is editable or designMode is on for this document). |
| 1535 | 1535 |
| 1536 // FIXME(sky): We have no body. | 1536 // FIXME(sky): We have no body. |
| 1537 } | 1537 } |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1629 sel.showTreeForThis(); | 1629 sel.showTreeForThis(); |
| 1630 } | 1630 } |
| 1631 | 1631 |
| 1632 void showTree(const blink::FrameSelection* sel) | 1632 void showTree(const blink::FrameSelection* sel) |
| 1633 { | 1633 { |
| 1634 if (sel) | 1634 if (sel) |
| 1635 sel->showTreeForThis(); | 1635 sel->showTreeForThis(); |
| 1636 } | 1636 } |
| 1637 | 1637 |
| 1638 #endif | 1638 #endif |
| OLD | NEW |