| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 static PassRefPtrWillBeRawPtr<Range> makeSearchRange(const Position& pos) | 267 static PassRefPtrWillBeRawPtr<Range> makeSearchRange(const Position& pos) |
| 268 { | 268 { |
| 269 Node* n = pos.deprecatedNode(); | 269 Node* n = pos.deprecatedNode(); |
| 270 if (!n) | 270 if (!n) |
| 271 return nullptr; | 271 return nullptr; |
| 272 Document& d = n->document(); | 272 Document& d = n->document(); |
| 273 Node* de = d.documentElement(); | 273 Node* de = d.documentElement(); |
| 274 if (!de) | 274 if (!de) |
| 275 return nullptr; | 275 return nullptr; |
| 276 Node* boundary = n->enclosingBlockFlowElement(); | 276 Node* boundary = enclosingBlockFlowElement(*n); |
| 277 if (!boundary) | 277 if (!boundary) |
| 278 return nullptr; | 278 return nullptr; |
| 279 | 279 |
| 280 RefPtrWillBeRawPtr<Range> searchRange(Range::create(d)); | 280 RefPtrWillBeRawPtr<Range> searchRange(Range::create(d)); |
| 281 TrackExceptionState exceptionState; | 281 TrackExceptionState exceptionState; |
| 282 | 282 |
| 283 Position start(pos.parentAnchoredEquivalent()); | 283 Position start(pos.parentAnchoredEquivalent()); |
| 284 searchRange->selectNodeContents(boundary, exceptionState); | 284 searchRange->selectNodeContents(boundary, exceptionState); |
| 285 searchRange->setStart(start.containerNode(), start.offsetInContainerNode(),
exceptionState); | 285 searchRange->setStart(start.containerNode(), start.offsetInContainerNode(),
exceptionState); |
| 286 | 286 |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 sel.showTreeForThis(); | 857 sel.showTreeForThis(); |
| 858 } | 858 } |
| 859 | 859 |
| 860 void showTree(const blink::VisibleSelection* sel) | 860 void showTree(const blink::VisibleSelection* sel) |
| 861 { | 861 { |
| 862 if (sel) | 862 if (sel) |
| 863 sel->showTreeForThis(); | 863 sel->showTreeForThis(); |
| 864 } | 864 } |
| 865 | 865 |
| 866 #endif | 866 #endif |
| OLD | NEW |