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

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

Issue 2899923002: Change DocumentMarkerController::AddCompositionMarker() to take EphemeralRange (Closed)
Patch Set: Created 3 years, 7 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 | « third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp ('k') | no next file » | 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) 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 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 DCHECK(range); 1058 DCHECK(range);
1059 range->OwnerDocument().UpdateStyleAndLayoutIgnorePendingStylesheets(); 1059 range->OwnerDocument().UpdateStyleAndLayoutIgnorePendingStylesheets();
1060 1060
1061 Color underline_color; 1061 Color underline_color;
1062 Color background_color; 1062 Color background_color;
1063 if (ParseColor(underline_color_value, underline_color, exception_state, 1063 if (ParseColor(underline_color_value, underline_color, exception_state,
1064 "Invalid underline color.") && 1064 "Invalid underline color.") &&
1065 ParseColor(background_color_value, background_color, exception_state, 1065 ParseColor(background_color_value, background_color, exception_state,
1066 "Invalid background color.")) { 1066 "Invalid background color.")) {
1067 range->OwnerDocument().Markers().AddCompositionMarker( 1067 range->OwnerDocument().Markers().AddCompositionMarker(
1068 range->StartPosition(), range->EndPosition(), underline_color, thick, 1068 EphemeralRange(range), underline_color, thick, background_color);
1069 background_color);
1070 } 1069 }
1071 } 1070 }
1072 1071
1073 void Internals::setTextMatchMarkersActive(Node* node, 1072 void Internals::setTextMatchMarkersActive(Node* node,
1074 unsigned start_offset, 1073 unsigned start_offset,
1075 unsigned end_offset, 1074 unsigned end_offset,
1076 bool active) { 1075 bool active) {
1077 DCHECK(node); 1076 DCHECK(node);
1078 node->GetDocument().Markers().SetTextMatchMarkersActive(node, start_offset, 1077 node->GetDocument().Markers().SetTextMatchMarkersActive(node, start_offset,
1079 end_offset, active); 1078 end_offset, active);
(...skipping 2201 matching lines...) Expand 10 before | Expand all | Expand 10 after
3281 3280
3282 void Internals::crash() { 3281 void Internals::crash() {
3283 CHECK(false) << "Intentional crash"; 3282 CHECK(false) << "Intentional crash";
3284 } 3283 }
3285 3284
3286 void Internals::setIsLowEndDevice(bool is_low_end_device) { 3285 void Internals::setIsLowEndDevice(bool is_low_end_device) {
3287 MemoryCoordinator::SetIsLowEndDeviceForTesting(is_low_end_device); 3286 MemoryCoordinator::SetIsLowEndDeviceForTesting(is_low_end_device);
3288 } 3287 }
3289 3288
3290 } // namespace blink 3289 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/markers/DocumentMarkerControllerTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698