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

Side by Side Diff: Source/core/dom/Range.cpp

Issue 340763003: Change [ConstructorCallWith={Document => ExecutionContext}] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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
OLDNEW
1 /* 1 /*
2 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no) 3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no)
4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no) 4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no)
5 * (C) 2001 Peter Kelly (pmk@post.com) 5 * (C) 2001 Peter Kelly (pmk@post.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
7 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 7 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 ScriptWrappable::init(this); 69 ScriptWrappable::init(this);
70 m_ownerDocument->attachRange(this); 70 m_ownerDocument->attachRange(this);
71 } 71 }
72 72
73 PassRefPtrWillBeRawPtr<Range> Range::create(Document& ownerDocument) 73 PassRefPtrWillBeRawPtr<Range> Range::create(Document& ownerDocument)
74 { 74 {
75 return adoptRefWillBeNoop(new Range(ownerDocument)); 75 return adoptRefWillBeNoop(new Range(ownerDocument));
76 } 76 }
77 77
78 PassRefPtrWillBeRawPtr<Range> Range::create(ExecutionContext* executionContext)
79 {
80 return create(*toDocument(executionContext));
81 }
82
78 inline Range::Range(Document& ownerDocument, Node* startContainer, int startOffs et, Node* endContainer, int endOffset) 83 inline Range::Range(Document& ownerDocument, Node* startContainer, int startOffs et, Node* endContainer, int endOffset)
79 : m_ownerDocument(&ownerDocument) 84 : m_ownerDocument(&ownerDocument)
80 , m_start(m_ownerDocument) 85 , m_start(m_ownerDocument)
81 , m_end(m_ownerDocument) 86 , m_end(m_ownerDocument)
82 { 87 {
83 #ifndef NDEBUG 88 #ifndef NDEBUG
84 rangeCounter.increment(); 89 rangeCounter.increment();
85 #endif 90 #endif
86 91
87 ScriptWrappable::init(this); 92 ScriptWrappable::init(this);
(...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after
1671 1676
1672 void showTree(const WebCore::Range* range) 1677 void showTree(const WebCore::Range* range)
1673 { 1678 {
1674 if (range && range->boundaryPointsValid()) { 1679 if (range && range->boundaryPointsValid()) {
1675 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r ange->endContainer(), "E"); 1680 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r ange->endContainer(), "E");
1676 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset (), range->endOffset()); 1681 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset (), range->endOffset());
1677 } 1682 }
1678 } 1683 }
1679 1684
1680 #endif 1685 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698