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

Side by Side Diff: third_party/WebKit/Source/core/editing/FrameSelection.cpp

Issue 2653523003: Make DOMSelection cache Range (Closed)
Patch Set: nit Created 3 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
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 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after
1421 } 1421 }
1422 1422
1423 void FrameSelection::setCaretBlinkingSuspended(bool suspended) { 1423 void FrameSelection::setCaretBlinkingSuspended(bool suspended) {
1424 m_frameCaret->setCaretBlinkingSuspended(suspended); 1424 m_frameCaret->setCaretBlinkingSuspended(suspended);
1425 } 1425 }
1426 1426
1427 bool FrameSelection::isCaretBlinkingSuspended() const { 1427 bool FrameSelection::isCaretBlinkingSuspended() const {
1428 return m_frameCaret->isCaretBlinkingSuspended(); 1428 return m_frameCaret->isCaretBlinkingSuspended();
1429 } 1429 }
1430 1430
1431 void FrameSelection::cacheRangeOfDocument(Range* range) {
1432 m_selectionEditor->cacheRangeOfDocument(range);
1433 }
1434
1435 Range* FrameSelection::documentCachedRange() const {
1436 return m_selectionEditor->documentCachedRange();
1437 }
1438
1439 void FrameSelection::clearDocumentCachedRange() {
1440 m_selectionEditor->clearDocumentCachedRange();
1441 }
1442
1431 } // namespace blink 1443 } // namespace blink
1432 1444
1433 #ifndef NDEBUG 1445 #ifndef NDEBUG
1434 1446
1435 void showTree(const blink::FrameSelection& sel) { 1447 void showTree(const blink::FrameSelection& sel) {
1436 sel.showTreeForThis(); 1448 sel.showTreeForThis();
1437 } 1449 }
1438 1450
1439 void showTree(const blink::FrameSelection* sel) { 1451 void showTree(const blink::FrameSelection* sel) {
1440 if (sel) 1452 if (sel)
1441 sel->showTreeForThis(); 1453 sel->showTreeForThis();
1442 else 1454 else
1443 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; 1455 LOG(INFO) << "Cannot showTree for <null> FrameSelection.";
1444 } 1456 }
1445 1457
1446 #endif 1458 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelection.h ('k') | third_party/WebKit/Source/core/editing/SelectionEditor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698