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

Side by Side Diff: third_party/WebKit/Source/core/dom/TreeScopeAdopter.h

Issue 1958093002: CONTINUED Make FrameSelection to hold non-canonicalized positions Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2017-01-16T20:04:35 Created 3 years, 11 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 * 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 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2011 Google Inc. All rights reserved. 10 * Copyright (C) 2011 Google Inc. All rights reserved.
(...skipping 21 matching lines...) Expand all
32 namespace blink { 32 namespace blink {
33 33
34 class TreeScope; 34 class TreeScope;
35 35
36 class TreeScopeAdopter { 36 class TreeScopeAdopter {
37 STACK_ALLOCATED(); 37 STACK_ALLOCATED();
38 38
39 public: 39 public:
40 TreeScopeAdopter(Node& toAdopt, TreeScope& newScope); 40 TreeScopeAdopter(Node& toAdopt, TreeScope& newScope);
41 41
42 void execute() const { moveTreeToNewScope(*m_toAdopt); } 42 void execute() const;
43 bool needsScopeChange() const { return m_oldScope != m_newScope; } 43 bool needsScopeChange() const { return m_oldScope != m_newScope; }
44 44
45 #if DCHECK_IS_ON() 45 #if DCHECK_IS_ON()
46 static void ensureDidMoveToNewDocumentWasCalled(Document&); 46 static void ensureDidMoveToNewDocumentWasCalled(Document&);
47 #else 47 #else
48 static void ensureDidMoveToNewDocumentWasCalled(Document&) {} 48 static void ensureDidMoveToNewDocumentWasCalled(Document&) {}
49 #endif 49 #endif
50 50
51 private: 51 private:
52 void updateTreeScope(Node&) const; 52 void updateTreeScope(Node&) const;
(...skipping 13 matching lines...) Expand all
66 }; 66 };
67 67
68 inline TreeScopeAdopter::TreeScopeAdopter(Node& toAdopt, TreeScope& newScope) 68 inline TreeScopeAdopter::TreeScopeAdopter(Node& toAdopt, TreeScope& newScope)
69 : m_toAdopt(toAdopt), 69 : m_toAdopt(toAdopt),
70 m_newScope(newScope), 70 m_newScope(newScope),
71 m_oldScope(toAdopt.treeScope()) {} 71 m_oldScope(toAdopt.treeScope()) {}
72 72
73 } // namespace blink 73 } // namespace blink
74 74
75 #endif 75 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Text.cpp ('k') | third_party/WebKit/Source/core/dom/TreeScopeAdopter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698