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 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 | 1325 |
1326 Element* documentElement = document->documentElement(); | 1326 Element* documentElement = document->documentElement(); |
1327 if (!documentElement) | 1327 if (!documentElement) |
1328 return; | 1328 return; |
1329 if (HTMLBodyElement* body = | 1329 if (HTMLBodyElement* body = |
1330 Traversal<HTMLBodyElement>::firstChild(*documentElement)) { | 1330 Traversal<HTMLBodyElement>::firstChild(*documentElement)) { |
1331 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets | 1331 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
1332 // needs to be audited. See http://crbug.com/590369 for more details. | 1332 // needs to be audited. See http://crbug.com/590369 for more details. |
1333 document->updateStyleAndLayoutIgnorePendingStylesheets(); | 1333 document->updateStyleAndLayoutIgnorePendingStylesheets(); |
1334 | 1334 |
1335 setSelection(createVisibleSelection(firstPositionInOrBeforeNode(body), | 1335 setSelection(SelectionInDOMTree::Builder() |
1336 TextAffinity::Downstream)); | 1336 .collapse(firstPositionInOrBeforeNode(body)) |
| 1337 .build()); |
1337 } | 1338 } |
1338 } | 1339 } |
1339 | 1340 |
1340 // TODO(yoichio): We should have LocalFrame having FrameCaret, | 1341 // TODO(yoichio): We should have LocalFrame having FrameCaret, |
1341 // Editor and PendingSelection using FrameCaret directly | 1342 // Editor and PendingSelection using FrameCaret directly |
1342 // and get rid of this. | 1343 // and get rid of this. |
1343 bool FrameSelection::shouldShowBlockCursor() const { | 1344 bool FrameSelection::shouldShowBlockCursor() const { |
1344 return m_frameCaret->shouldShowBlockCursor(); | 1345 return m_frameCaret->shouldShowBlockCursor(); |
1345 } | 1346 } |
1346 | 1347 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1485 } | 1486 } |
1486 | 1487 |
1487 void showTree(const blink::FrameSelection* sel) { | 1488 void showTree(const blink::FrameSelection* sel) { |
1488 if (sel) | 1489 if (sel) |
1489 sel->showTreeForThis(); | 1490 sel->showTreeForThis(); |
1490 else | 1491 else |
1491 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; | 1492 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; |
1492 } | 1493 } |
1493 | 1494 |
1494 #endif | 1495 #endif |
OLD | NEW |