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

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

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, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 void updateAppearance(); 282 void updateAppearance();
283 bool shouldShowBlockCursor() const; 283 bool shouldShowBlockCursor() const;
284 void setShouldShowBlockCursor(bool); 284 void setShouldShowBlockCursor(bool);
285 285
286 // TODO(yosin): We should check DOM tree version and style version in 286 // TODO(yosin): We should check DOM tree version and style version in
287 // |FrameSelection::selection()| to make sure we use updated selection, 287 // |FrameSelection::selection()| to make sure we use updated selection,
288 // rather than having |updateIfNeeded()|. Once, we update all layout tests 288 // rather than having |updateIfNeeded()|. Once, we update all layout tests
289 // to use updated selection, we should make |updateIfNeeded()| private. 289 // to use updated selection, we should make |updateIfNeeded()| private.
290 void updateIfNeeded(); 290 void updateIfNeeded();
291 291
292 void cacheRangeOfDocument(Range*);
293 Range* documentCachedRange() const;
294 void clearDocumentCachedRange();
295
292 DECLARE_TRACE(); 296 DECLARE_TRACE();
293 297
294 private: 298 private:
295 friend class BlockPaintInvalidatorTest; 299 friend class BlockPaintInvalidatorTest;
296 friend class FrameSelectionTest; 300 friend class FrameSelectionTest;
297 friend class PaintControllerPaintTestForSlimmingPaintV1AndV2; 301 friend class PaintControllerPaintTestForSlimmingPaintV1AndV2;
298 friend class SelectionControllerTest; 302 friend class SelectionControllerTest;
299 FRIEND_TEST_ALL_PREFIXES(PaintControllerPaintTestForSlimmingPaintV1AndV2, 303 FRIEND_TEST_ALL_PREFIXES(PaintControllerPaintTestForSlimmingPaintV1AndV2,
300 FullDocumentPaintingWithCaret); 304 FullDocumentPaintingWithCaret);
301 305
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 373
370 } // namespace blink 374 } // namespace blink
371 375
372 #ifndef NDEBUG 376 #ifndef NDEBUG
373 // Outside the WebCore namespace for ease of invocation from gdb. 377 // Outside the WebCore namespace for ease of invocation from gdb.
374 void showTree(const blink::FrameSelection&); 378 void showTree(const blink::FrameSelection&);
375 void showTree(const blink::FrameSelection*); 379 void showTree(const blink::FrameSelection*);
376 #endif 380 #endif
377 381
378 #endif // FrameSelection_h 382 #endif // FrameSelection_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/DOMSelection.cpp ('k') | third_party/WebKit/Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698