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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGURIReference.cpp

Issue 2940933003: DO NOT SUBMIT results of new clang-format (Closed)
Patch Set: Created 3 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 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 25 matching lines...) Expand all
36 SVGElementReferenceObserver(TreeScope& tree_scope, 36 SVGElementReferenceObserver(TreeScope& tree_scope,
37 const AtomicString& id, 37 const AtomicString& id,
38 std::unique_ptr<WTF::Closure> closure) 38 std::unique_ptr<WTF::Closure> closure)
39 : IdTargetObserver(tree_scope.GetIdTargetObserverRegistry(), id), 39 : IdTargetObserver(tree_scope.GetIdTargetObserverRegistry(), id),
40 closure_(std::move(closure)) {} 40 closure_(std::move(closure)) {}
41 41
42 private: 42 private:
43 void IdTargetChanged() override { (*closure_)(); } 43 void IdTargetChanged() override { (*closure_)(); }
44 std::unique_ptr<WTF::Closure> closure_; 44 std::unique_ptr<WTF::Closure> closure_;
45 }; 45 };
46 } 46 } // namespace
47 47
48 SVGURIReference::SVGURIReference(SVGElement* element) 48 SVGURIReference::SVGURIReference(SVGElement* element)
49 : href_(SVGAnimatedHref::Create(element)) { 49 : href_(SVGAnimatedHref::Create(element)) {
50 DCHECK(element); 50 DCHECK(element);
51 href_->AddToPropertyMap(element); 51 href_->AddToPropertyMap(element);
52 } 52 }
53 53
54 DEFINE_TRACE(SVGURIReference) { 54 DEFINE_TRACE(SVGURIReference) {
55 visitor->Trace(href_); 55 visitor->Trace(href_);
56 } 56 }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 145
146 void SVGURIReference::UnobserveTarget(Member<IdTargetObserver>& observer) { 146 void SVGURIReference::UnobserveTarget(Member<IdTargetObserver>& observer) {
147 if (!observer) 147 if (!observer)
148 return; 148 return;
149 observer->Unregister(); 149 observer->Unregister();
150 observer = nullptr; 150 observer = nullptr;
151 } 151 }
152 152
153 } // namespace blink 153 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698