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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTheme.cpp

Issue 2834603003: Split StyleSurroundData::padding into four individual Lengths. (Closed)
Patch Set: Split StyleSurroundData::padding into four individual Lengths. 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * This file is part of the theme implementation for form controls in WebCore. 2 * This file is part of the theme implementation for form controls in WebCore.
3 * 3 *
4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc. 4 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Computer, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 static_cast<int>(style.BorderLeftWidth())) { 153 static_cast<int>(style.BorderLeftWidth())) {
154 style.SetBorderLeftWidth(border_box.Left().Value()); 154 style.SetBorderLeftWidth(border_box.Left().Value());
155 if (border_box.Left().Value()) 155 if (border_box.Left().Value())
156 style.SetBorderLeftWidth(border_box.Left().Value()); 156 style.SetBorderLeftWidth(border_box.Left().Value());
157 else 157 else
158 style.ResetBorderLeft(); 158 style.ResetBorderLeft();
159 } 159 }
160 160
161 // Padding 161 // Padding
162 LengthBox padding_box = platform_theme_->ControlPadding( 162 LengthBox padding_box = platform_theme_->ControlPadding(
163 part, style.GetFont().GetFontDescription(), style.Padding(), 163 part, style.GetFont().GetFontDescription(), style.PaddingTop(),
164 style.PaddingRight(), style.PaddingBottom(), style.PaddingLeft(),
164 style.EffectiveZoom()); 165 style.EffectiveZoom());
165 if (padding_box != style.Padding()) 166 if (!style.PaddingEqual(padding_box))
166 style.SetPadding(padding_box); 167 style.SetPadding(padding_box);
167 168
168 // Whitespace 169 // Whitespace
169 if (platform_theme_->ControlRequiresPreWhiteSpace(part)) 170 if (platform_theme_->ControlRequiresPreWhiteSpace(part))
170 style.SetWhiteSpace(EWhiteSpace::kPre); 171 style.SetWhiteSpace(EWhiteSpace::kPre);
171 172
172 // Width / Height 173 // Width / Height
173 // The width and height here are affected by the zoom. 174 // The width and height here are affected by the zoom.
174 // FIXME: Check is flawed, since it doesn't take min-width/max-width 175 // FIXME: Check is flawed, since it doesn't take min-width/max-width
175 // into account. 176 // into account.
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 // padding - not honored by WinIE, needs to be removed. 913 // padding - not honored by WinIE, needs to be removed.
913 style.ResetPadding(); 914 style.ResetPadding();
914 915
915 // border - honored by WinIE, but looks terrible (just paints in the control 916 // border - honored by WinIE, but looks terrible (just paints in the control
916 // box and turns off the Windows XP theme) 917 // box and turns off the Windows XP theme)
917 // for now, we will not honor it. 918 // for now, we will not honor it.
918 style.ResetBorder(); 919 style.ResetBorder();
919 } 920 }
920 921
921 } // namespace blink 922 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698