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

Side by Side Diff: Source/core/editing/DOMSelection.cpp

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/shadow/ShadowRoot.cpp ('k') | Source/core/events/AnimationPlayerEvent.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 if (!node->isInShadowTree()) 57 if (!node->isInShadowTree())
58 return 0; 58 return 0;
59 59
60 return frame->document()->ancestorInThisScope(node); 60 return frame->document()->ancestorInThisScope(node);
61 } 61 }
62 62
63 DOMSelection::DOMSelection(const TreeScope* treeScope) 63 DOMSelection::DOMSelection(const TreeScope* treeScope)
64 : DOMWindowProperty(treeScope->rootNode().document().frame()) 64 : DOMWindowProperty(treeScope->rootNode().document().frame())
65 , m_treeScope(treeScope) 65 , m_treeScope(treeScope)
66 { 66 {
67 ScriptWrappable::init(this);
68 } 67 }
69 68
70 void DOMSelection::clearTreeScope() 69 void DOMSelection::clearTreeScope()
71 { 70 {
72 m_treeScope = nullptr; 71 m_treeScope = nullptr;
73 } 72 }
74 73
75 const VisibleSelection& DOMSelection::visibleSelection() const 74 const VisibleSelection& DOMSelection::visibleSelection() const
76 { 75 {
77 ASSERT(m_frame); 76 ASSERT(m_frame);
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 return node->document() == m_frame->document(); 547 return node->document() == m_frame->document();
549 } 548 }
550 549
551 void DOMSelection::addConsoleError(const String& message) 550 void DOMSelection::addConsoleError(const String& message)
552 { 551 {
553 if (m_treeScope) 552 if (m_treeScope)
554 m_treeScope->document().addConsoleMessage(ConsoleMessage::create(JSMessa geSource, ErrorMessageLevel, message)); 553 m_treeScope->document().addConsoleMessage(ConsoleMessage::create(JSMessa geSource, ErrorMessageLevel, message));
555 } 554 }
556 555
557 } // namespace blink 556 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/shadow/ShadowRoot.cpp ('k') | Source/core/events/AnimationPlayerEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698