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

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

Issue 2450793002: Call invalidatePaintForTickmarks() in Internals::addTextMatchMarker() (Closed)
Patch Set: Add comment Created 4 years, 1 month 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 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 if (!marker) 984 if (!marker)
985 return String(); 985 return String();
986 return marker->description(); 986 return marker->description();
987 } 987 }
988 988
989 void Internals::addTextMatchMarker(const Range* range, bool isActive) { 989 void Internals::addTextMatchMarker(const Range* range, bool isActive) {
990 ASSERT(range); 990 ASSERT(range);
991 range->ownerDocument().updateStyleAndLayoutIgnorePendingStylesheets(); 991 range->ownerDocument().updateStyleAndLayoutIgnorePendingStylesheets();
992 range->ownerDocument().markers().addTextMatchMarker(EphemeralRange(range), 992 range->ownerDocument().markers().addTextMatchMarker(EphemeralRange(range),
993 isActive); 993 isActive);
994
995 // This simulates what the production code does after
996 // DocumentMarkerController::addTextMatchMarker().
997 range->ownerDocument().view()->invalidatePaintForTickmarks();
994 } 998 }
995 999
996 static bool parseColor(const String& value, 1000 static bool parseColor(const String& value,
997 Color& color, 1001 Color& color,
998 ExceptionState& exceptionState, 1002 ExceptionState& exceptionState,
999 String errorMessage) { 1003 String errorMessage) {
1000 if (!color.setFromString(value)) { 1004 if (!color.setFromString(value)) {
1001 exceptionState.throwDOMException(InvalidAccessError, errorMessage); 1005 exceptionState.throwDOMException(InvalidAccessError, errorMessage);
1002 return false; 1006 return false;
1003 } 1007 }
(...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after
3011 return ClientRect::create(); 3015 return ClientRect::create();
3012 3016
3013 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); 3017 return ClientRect::create(FloatRect(node->layoutObject()->visualRect()));
3014 } 3018 }
3015 3019
3016 void Internals::crash() { 3020 void Internals::crash() {
3017 CHECK(false) << "Intentional crash"; 3021 CHECK(false) << "Intentional crash";
3018 } 3022 }
3019 3023
3020 } // namespace blink 3024 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698