Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: sky/engine/core/editing/FrameSelection.cpp

Issue 878303002: Remove more scrolling code from Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/core/editing/EditorCommand.cpp ('k') | sky/engine/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « sky/engine/core/editing/EditorCommand.cpp ('k') | sky/engine/core/editing/VisibleUnits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698