| 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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 | 639 |
| 640 bool RenderTheme::isControlContainer(ControlPart appearance) const | 640 bool RenderTheme::isControlContainer(ControlPart appearance) const |
| 641 { | 641 { |
| 642 // There are more leaves than this, but we'll patch this function as we add
support for | 642 // There are more leaves than this, but we'll patch this function as we add
support for |
| 643 // more controls. | 643 // more controls. |
| 644 return appearance != CheckboxPart && appearance != RadioPart; | 644 return appearance != CheckboxPart && appearance != RadioPart; |
| 645 } | 645 } |
| 646 | 646 |
| 647 static bool isBackgroundOrBorderStyled(const RenderStyle& style, const BorderDat
a& border, const FillLayer& background, const Color& backgroundColor) | 647 static bool isBackgroundOrBorderStyled(const RenderStyle& style, const BorderDat
a& border, const FillLayer& background, const Color& backgroundColor) |
| 648 { | 648 { |
| 649 // Code below excludes the background-repeat from comparison by resetting it |
| 650 FillLayer backgroundCopy = background; |
| 651 FillLayer backgroundLayersCopy = *style.backgroundLayers(); |
| 652 backgroundCopy.setRepeatX(NoRepeatFill); |
| 653 backgroundCopy.setRepeatY(NoRepeatFill); |
| 654 backgroundLayersCopy.setRepeatX(NoRepeatFill); |
| 655 backgroundLayersCopy.setRepeatY(NoRepeatFill); |
| 649 // Test the style to see if the UA border and background match. | 656 // Test the style to see if the UA border and background match. |
| 650 return style.border() != border | 657 return style.border() != border |
| 651 || *style.backgroundLayers() != background | 658 || backgroundLayersCopy != backgroundCopy |
| 652 || style.visitedDependentColor(CSSPropertyBackgroundColor) != background
Color; | 659 || style.visitedDependentColor(CSSPropertyBackgroundColor) != background
Color; |
| 653 } | 660 } |
| 654 | 661 |
| 655 bool RenderTheme::isControlStyled(const RenderStyle* style, const BorderData& bo
rder, const FillLayer& background, const Color& backgroundColor) const | 662 bool RenderTheme::isControlStyled(const RenderStyle* style, const BorderData& bo
rder, const FillLayer& background, const Color& backgroundColor) const |
| 656 { | 663 { |
| 657 switch (style->appearance()) { | 664 switch (style->appearance()) { |
| 658 case PushButtonPart: | 665 case PushButtonPart: |
| 659 case SquareButtonPart: | 666 case SquareButtonPart: |
| 660 case ButtonPart: | 667 case ButtonPart: |
| 661 case ProgressBarPart: | 668 case ProgressBarPart: |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1380 | 1387 |
| 1381 // padding - not honored by WinIE, needs to be removed. | 1388 // padding - not honored by WinIE, needs to be removed. |
| 1382 style->resetPadding(); | 1389 style->resetPadding(); |
| 1383 | 1390 |
| 1384 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) | 1391 // border - honored by WinIE, but looks terrible (just paints in the control
box and turns off the Windows XP theme) |
| 1385 // for now, we will not honor it. | 1392 // for now, we will not honor it. |
| 1386 style->resetBorder(); | 1393 style->resetBorder(); |
| 1387 } | 1394 } |
| 1388 | 1395 |
| 1389 } // namespace WebCore | 1396 } // namespace WebCore |
| OLD | NEW |