Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1040 } | 1040 } |
| 1041 | 1041 |
| 1042 void Internals::addTextMatchMarker(const Range* range, bool isActive) { | 1042 void Internals::addTextMatchMarker(const Range* range, bool isActive) { |
| 1043 DCHECK(range); | 1043 DCHECK(range); |
| 1044 range->ownerDocument().updateStyleAndLayoutIgnorePendingStylesheets(); | 1044 range->ownerDocument().updateStyleAndLayoutIgnorePendingStylesheets(); |
| 1045 range->ownerDocument().markers().addTextMatchMarker(EphemeralRange(range), | 1045 range->ownerDocument().markers().addTextMatchMarker(EphemeralRange(range), |
| 1046 isActive); | 1046 isActive); |
| 1047 | 1047 |
| 1048 // This simulates what the production code does after | 1048 // This simulates what the production code does after |
| 1049 // DocumentMarkerController::addTextMatchMarker(). | 1049 // DocumentMarkerController::addTextMatchMarker(). |
| 1050 range->ownerDocument().view()->invalidatePaintForTickmarks(); | 1050 if (range->ownerDocument().view()) |
|
yosin_UTC9
2017/02/21 23:24:17
Could you do early return at top of function, e.g.
hiroshige
2017/02/21 23:29:56
Done.
| |
| 1051 range->ownerDocument().view()->invalidatePaintForTickmarks(); | |
| 1051 } | 1052 } |
| 1052 | 1053 |
| 1053 static bool parseColor(const String& value, | 1054 static bool parseColor(const String& value, |
| 1054 Color& color, | 1055 Color& color, |
| 1055 ExceptionState& exceptionState, | 1056 ExceptionState& exceptionState, |
| 1056 String errorMessage) { | 1057 String errorMessage) { |
| 1057 if (!color.setFromString(value)) { | 1058 if (!color.setFromString(value)) { |
| 1058 exceptionState.throwDOMException(InvalidAccessError, errorMessage); | 1059 exceptionState.throwDOMException(InvalidAccessError, errorMessage); |
| 1059 return false; | 1060 return false; |
| 1060 } | 1061 } |
| (...skipping 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3160 | 3161 |
| 3161 void Internals::crash() { | 3162 void Internals::crash() { |
| 3162 CHECK(false) << "Intentional crash"; | 3163 CHECK(false) << "Intentional crash"; |
| 3163 } | 3164 } |
| 3164 | 3165 |
| 3165 void Internals::setIsLowEndDevice(bool isLowEndDevice) { | 3166 void Internals::setIsLowEndDevice(bool isLowEndDevice) { |
| 3166 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); | 3167 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); |
| 3167 } | 3168 } |
| 3168 | 3169 |
| 3169 } // namespace blink | 3170 } // namespace blink |
| OLD | NEW |