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

Side by Side Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2246143004: Use EphemeralRange instead of Range* in DocumentMarkerController class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on master Created 4 years, 4 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights 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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 DocumentMarker* marker = markerAt(node, markerType, index, exceptionState); 895 DocumentMarker* marker = markerAt(node, markerType, index, exceptionState);
896 if (!marker) 896 if (!marker)
897 return String(); 897 return String();
898 return marker->description(); 898 return marker->description();
899 } 899 }
900 900
901 void Internals::addTextMatchMarker(const Range* range, bool isActive) 901 void Internals::addTextMatchMarker(const Range* range, bool isActive)
902 { 902 {
903 ASSERT(range); 903 ASSERT(range);
904 range->ownerDocument().updateStyleAndLayoutIgnorePendingStylesheets(); 904 range->ownerDocument().updateStyleAndLayoutIgnorePendingStylesheets();
905 range->ownerDocument().markers().addTextMatchMarker(range, isActive); 905 range->ownerDocument().markers().addTextMatchMarker(EphemeralRange(range), i sActive);
906 } 906 }
907 907
908 void Internals::setMarkersActive(Node* node, unsigned startOffset, unsigned endO ffset, bool active) 908 void Internals::setMarkersActive(Node* node, unsigned startOffset, unsigned endO ffset, bool active)
909 { 909 {
910 ASSERT(node); 910 ASSERT(node);
911 node->document().markers().setMarkersActive(node, startOffset, endOffset, ac tive); 911 node->document().markers().setMarkersActive(node, startOffset, endOffset, ac tive);
912 } 912 }
913 913
914 void Internals::setMarkedTextMatchesAreHighlighted(Document* document, bool high light) 914 void Internals::setMarkedTextMatchesAreHighlighted(Document* document, bool high light)
915 { 915 {
(...skipping 1703 matching lines...) Expand 10 before | Expand all | Expand 10 after
2619 2619
2620 ClientRect* Internals::visualRect(Node* node) 2620 ClientRect* Internals::visualRect(Node* node)
2621 { 2621 {
2622 if (!node || !node->layoutObject()) 2622 if (!node || !node->layoutObject())
2623 return ClientRect::create(); 2623 return ClientRect::create();
2624 2624
2625 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); 2625 return ClientRect::create(FloatRect(node->layoutObject()->visualRect()));
2626 } 2626 }
2627 2627
2628 } // namespace blink 2628 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698