OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
7 * reserved. | 7 * reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
206 RenderedDocumentMarker& marker) { | 206 RenderedDocumentMarker& marker) { |
207 Range* range = Range::create(node.document()); | 207 Range* range = Range::create(node.document()); |
208 // The offsets of the marker may be out-dated, so check for exceptions. | 208 // The offsets of the marker may be out-dated, so check for exceptions. |
209 DummyExceptionStateForTesting exceptionState; | 209 DummyExceptionStateForTesting exceptionState; |
210 range->setStart(&const_cast<Node&>(node), marker.startOffset(), | 210 range->setStart(&const_cast<Node&>(node), marker.startOffset(), |
211 exceptionState); | 211 exceptionState); |
212 if (!exceptionState.hadException()) { | 212 if (!exceptionState.hadException()) { |
213 range->setEnd(&const_cast<Node&>(node), marker.endOffset(), | 213 range->setEnd(&const_cast<Node&>(node), marker.endOffset(), |
214 IGNORE_EXCEPTION_FOR_TESTING); | 214 IGNORE_EXCEPTION_FOR_TESTING); |
215 } | 215 } |
216 if (!exceptionState.hadException()) { | 216 if (!exceptionState.hadException() && range->isConnected()) { |
yosin_UTC9
2017/04/04 01:20:39
This change should not be in this patch.
If we nee
Hwanseung Lee
2017/04/05 15:21:30
Done.
| |
217 // TODO(yosin): Once we have a |EphemeralRange| version of |boundingBox()|, | 217 // TODO(yosin): Once we have a |EphemeralRange| version of |boundingBox()|, |
218 // we should use it instead of |Range| version. | 218 // we should use it instead of |Range| version. |
219 marker.setRenderedRect(LayoutRect(range->boundingBox())); | 219 marker.setRenderedRect(LayoutRect(range->boundingBox())); |
220 } else { | 220 } else { |
221 marker.nullifyRenderedRect(); | 221 marker.nullifyRenderedRect(); |
222 } | 222 } |
223 range->dispose(); | 223 range->dispose(); |
224 } | 224 } |
225 | 225 |
226 // Markers are stored in order sorted by their start offset. | 226 // Markers are stored in order sorted by their start offset. |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
883 } | 883 } |
884 | 884 |
885 } // namespace blink | 885 } // namespace blink |
886 | 886 |
887 #ifndef NDEBUG | 887 #ifndef NDEBUG |
888 void showDocumentMarkers(const blink::DocumentMarkerController* controller) { | 888 void showDocumentMarkers(const blink::DocumentMarkerController* controller) { |
889 if (controller) | 889 if (controller) |
890 controller->showMarkers(); | 890 controller->showMarkers(); |
891 } | 891 } |
892 #endif | 892 #endif |
OLD | NEW |