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

Side by Side Diff: third_party/WebKit/Source/core/style/BorderData.h

Issue 2891003002: Store border-image-* on SurroundData in ComputedStyle (Closed)
Patch Set: Store border-image-* on SurroundData in ComputedStyle Created 3 years, 7 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
(Empty)
1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
17 *
18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
22 *
23 */
24
25 #ifndef BorderData_h
26 #define BorderData_h
27
28 #include "core/style/NinePieceImage.h"
29 #include "platform/LengthSize.h"
30 #include "platform/geometry/IntRect.h"
31 #include "platform/wtf/Allocator.h"
32
33 namespace blink {
34
35 class BorderData {
36 DISALLOW_NEW();
37 friend class ComputedStyle;
38
39 public:
40 BorderData() {}
41
42 bool HasBorderFill() const { return image_.HasImage() && image_.Fill(); }
43
44 bool operator==(const BorderData& o) const { return image_ == o.image_; }
45
46 bool VisuallyEqual(const BorderData& o) const { return image_ == o.image_; }
47
48 bool VisualOverflowEqual(const BorderData& o) const {
49 return image_.Outset() == o.image_.Outset();
50 }
51
52 bool operator!=(const BorderData& o) const { return !(*this == o); }
53
54
55 const NinePieceImage& GetImage() const { return image_; }
56
57 private:
58 NinePieceImage image_;
59 };
60
61 } // namespace blink
62
63 #endif // BorderData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698