OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/css/CSSURIValue.h" | 5 #include "core/css/CSSURIValue.h" |
6 | 6 |
7 #include "core/css/CSSMarkup.h" | 7 #include "core/css/CSSMarkup.h" |
8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
9 #include "core/svg/SVGElementProxy.h" | 9 #include "core/svg/SVGElementProxy.h" |
10 #include "platform/weborigin/KURL.h" | 10 #include "platform/weborigin/KURL.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 bool CSSURIValue::IsLocal(const Document& document) const { | 64 bool CSSURIValue::IsLocal(const Document& document) const { |
65 return is_local_ || | 65 return is_local_ || |
66 EqualIgnoringFragmentIdentifier(AbsoluteUrl(), document.Url()); | 66 EqualIgnoringFragmentIdentifier(AbsoluteUrl(), document.Url()); |
67 } | 67 } |
68 | 68 |
69 bool CSSURIValue::Equals(const CSSURIValue& other) const { | 69 bool CSSURIValue::Equals(const CSSURIValue& other) const { |
70 // If only one has the 'local url' flag set, the URLs can't match. | 70 // If only one has the 'local url' flag set, the URLs can't match. |
71 if (is_local_ != other.is_local_) | 71 if (is_local_ != other.is_local_) |
72 return false; | 72 return false; |
73 return (is_local_ && relative_url_ == other.relative_url_) || | 73 if (is_local_) |
74 absolute_url_ == other.absolute_url_; | 74 return relative_url_ == other.relative_url_; |
| 75 return absolute_url_ == other.absolute_url_; |
75 } | 76 } |
76 | 77 |
77 DEFINE_TRACE_AFTER_DISPATCH(CSSURIValue) { | 78 DEFINE_TRACE_AFTER_DISPATCH(CSSURIValue) { |
78 visitor->Trace(proxy_); | 79 visitor->Trace(proxy_); |
79 CSSValue::TraceAfterDispatch(visitor); | 80 CSSValue::TraceAfterDispatch(visitor); |
80 } | 81 } |
81 | 82 |
82 } // namespace blink | 83 } // namespace blink |
OLD | NEW |