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

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

Issue 2861773004: Move border-*-width out of BorderValue and store on SurroundData in ComputedStyle instead (Closed)
Patch Set: meade@'s suggestion 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
1 /* 1 /*
2 * Copyright (C) 2013 Google, Inc. 2 * Copyright (C) 2013 Google, Inc.
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 public: 42 public:
43 static std::unique_ptr<CachedUAStyle> Create(const ComputedStyle* style) { 43 static std::unique_ptr<CachedUAStyle> Create(const ComputedStyle* style) {
44 return WTF::WrapUnique(new CachedUAStyle(style)); 44 return WTF::WrapUnique(new CachedUAStyle(style));
45 } 45 }
46 46
47 BorderData border; 47 BorderData border;
48 LengthSize top_left_; 48 LengthSize top_left_;
49 LengthSize top_right_; 49 LengthSize top_right_;
50 LengthSize bottom_left_; 50 LengthSize bottom_left_;
51 LengthSize bottom_right_; 51 LengthSize bottom_right_;
52 float border_left_width;
53 float border_right_width;
54 float border_top_width;
55 float border_bottom_width;
52 FillLayer background_layers; 56 FillLayer background_layers;
53 StyleColor background_color; 57 StyleColor background_color;
54 58
55 private: 59 private:
56 explicit CachedUAStyle(const ComputedStyle* style) 60 explicit CachedUAStyle(const ComputedStyle* style)
57 : border(style->Border()), 61 : border(style->Border()),
58 top_left_(style->BorderTopLeftRadius()), 62 top_left_(style->BorderTopLeftRadius()),
59 top_right_(style->BorderTopRightRadius()), 63 top_right_(style->BorderTopRightRadius()),
60 bottom_left_(style->BorderBottomLeftRadius()), 64 bottom_left_(style->BorderBottomLeftRadius()),
61 bottom_right_(style->BorderBottomRightRadius()), 65 bottom_right_(style->BorderBottomRightRadius()),
66 border_left_width(style->BorderLeftWidth()),
67 border_right_width(style->BorderRightWidth()),
68 border_top_width(style->BorderTopWidth()),
69 border_bottom_width(style->BorderBottomWidth()),
62 background_layers(style->BackgroundLayers()), 70 background_layers(style->BackgroundLayers()),
63 background_color(style->BackgroundColor()) {} 71 background_color(style->BackgroundColor()) {}
64 }; 72 };
65 73
66 } // namespace blink 74 } // namespace blink
67 75
68 #endif // CachedUAStyle_h 76 #endif // CachedUAStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/BorderValue.h ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698