| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |