| Index: Source/core/layout/LayoutTheme.cpp
|
| diff --git a/Source/core/layout/LayoutTheme.cpp b/Source/core/layout/LayoutTheme.cpp
|
| index a652646e1c67866af971b466596dd1f5bb537e06..48c070c059dbd403cf10de807f5a3a06c815acec 100644
|
| --- a/Source/core/layout/LayoutTheme.cpp
|
| +++ b/Source/core/layout/LayoutTheme.cpp
|
| @@ -45,6 +45,7 @@
|
| #include "core/html/shadow/TextControlInnerElements.h"
|
| #include "core/page/FocusController.h"
|
| #include "core/page/Page.h"
|
| +#include "core/style/AuthorStyleInfo.h"
|
| #include "core/style/ComputedStyle.h"
|
| #include "platform/FileMetadata.h"
|
| #include "platform/FloatConversion.h"
|
| @@ -75,7 +76,7 @@
|
| {
|
| }
|
|
|
| -void LayoutTheme::adjustStyle(ComputedStyle& style, Element* e)
|
| +void LayoutTheme::adjustStyle(ComputedStyle& style, Element* e, const AuthorStyleInfo& authorStyle)
|
| {
|
| ASSERT(style.hasAppearance());
|
|
|
| @@ -89,15 +90,17 @@
|
| else if (style.display() == LIST_ITEM || style.display() == TABLE)
|
| style.setDisplay(BLOCK);
|
|
|
| - if (isControlStyled(style)) {
|
| + if (isControlStyled(style, authorStyle)) {
|
| if (part == MenulistPart) {
|
| style.setAppearance(MenulistButtonPart);
|
| part = MenulistButtonPart;
|
| } else {
|
| style.setAppearance(NoControlPart);
|
| - return;
|
| }
|
| }
|
| +
|
| + if (!style.hasAppearance())
|
| + return;
|
|
|
| if (shouldUseFallbackTheme(style)) {
|
| adjustStyleUsingFallbackTheme(style);
|
| @@ -365,7 +368,7 @@
|
| return appearance != CheckboxPart && appearance != RadioPart;
|
| }
|
|
|
| -bool LayoutTheme::isControlStyled(const ComputedStyle& style) const
|
| +bool LayoutTheme::isControlStyled(const ComputedStyle& style, const AuthorStyleInfo& authorStyle) const
|
| {
|
| switch (style.appearance()) {
|
| case PushButtonPart:
|
| @@ -377,13 +380,13 @@
|
| case ContinuousCapacityLevelIndicatorPart:
|
| case DiscreteCapacityLevelIndicatorPart:
|
| case RatingLevelIndicatorPart:
|
| - return style.hasAuthorBackground() || style.hasAuthorBorder();
|
| + return authorStyle.specifiesBackground() || authorStyle.specifiesBorder();
|
|
|
| case MenulistPart:
|
| case SearchFieldPart:
|
| case TextAreaPart:
|
| case TextFieldPart:
|
| - return style.hasAuthorBackground() || style.hasAuthorBorder() || style.boxShadow();
|
| + return authorStyle.specifiesBackground() || authorStyle.specifiesBorder() || style.boxShadow();
|
|
|
| case SliderHorizontalPart:
|
| case SliderVerticalPart:
|
|
|