summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/style/clip_path_operation.cc
blob: 0710d6679025bd778136977eaab4b37a18b7b5d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/core/style/clip_path_operation.h"

namespace blink {

void ReferenceClipPathOperation::AddClient(SVGResourceClient& client) {
  if (resource_)
    resource_->AddClient(client);
}

void ReferenceClipPathOperation::RemoveClient(SVGResourceClient& client) {
  if (resource_)
    resource_->RemoveClient(client);
}

SVGResource* ReferenceClipPathOperation::Resource() const {
  return resource_;
}

bool ReferenceClipPathOperation::operator==(const ClipPathOperation& o) const {
  if (!IsSameType(o))
    return false;
  const ReferenceClipPathOperation& other = ToReferenceClipPathOperation(o);
  return resource_ == other.resource_ && url_ == other.url_;
}

}  // namespace blink