Commit bdb08d7b authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

Deprecate -webkit-appearance keywords for arbitrary elements

For many keywords, this CL just apply blink::Deprecation to
existing counters.

Exceptions:
* Split ButtonForOthers into three
  - ButtonForBootstrapLooseSelector
  - ButtonForSelect
  - ButtonForOthers2
 and deprecate the second one.

* Add ListboxForOthers and MeterForOthers counters, and
  deprecate them.
  They are capped by kCSSValueAppearanceNoImplementationSkipBorder


Approved intent thread: https://groups.google.com/a/chromium.org/d/msg/blink-dev/1d9FpHEVI64/VSELVHzbAQAJ


Bug: 981720
Change-Id: Iec89d2bce70d2d86fd4630fb35d34798aac72af2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1705274Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678588}
parent d0792d63
...@@ -2346,6 +2346,11 @@ enum WebFeature { ...@@ -2346,6 +2346,11 @@ enum WebFeature {
kV8Database_Transaction_Method = 2960, kV8Database_Transaction_Method = 2960,
kV8Database_ReadTransaction_Method = 2961, kV8Database_ReadTransaction_Method = 2961,
kV8SQLTransaction_ExecuteSql_Method = 2962, kV8SQLTransaction_ExecuteSql_Method = 2962,
kCSSValueAppearanceButtonForBootstrapLooseSelectorRendered = 2963,
kCSSValueAppearanceButtonForOthers2Rendered = 2964,
kCSSValueAppearanceButtonForSelectRendered = 2965,
kCSSValueAppearanceListboxForOthersRendered = 2966,
kCSSValueAppearanceMeterForOthersRendered = 2967,
// Add new features immediately above this line. Don't change assigned // Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots. // numbers of any item, and don't reuse removed slots.
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "third_party/blink/renderer/core/frame/deprecation.h" #include "third_party/blink/renderer/core/frame/deprecation.h"
#include <bitset> #include <bitset>
#include "build/build_config.h"
#include "services/service_manager/public/cpp/connector.h" #include "services/service_manager/public/cpp/connector.h"
#include "third_party/blink/public/mojom/feature_policy/feature_policy.mojom-blink.h" #include "third_party/blink/public/mojom/feature_policy/feature_policy.mojom-blink.h"
#include "third_party/blink/public/mojom/reporting/reporting.mojom-blink.h" #include "third_party/blink/public/mojom/reporting/reporting.mojom-blink.h"
...@@ -579,6 +580,147 @@ DeprecationInfo GetDeprecationInfo(WebFeature feature) { ...@@ -579,6 +580,147 @@ DeprecationInfo GetDeprecationInfo(WebFeature feature) {
"4532810371039232 for details.", "4532810371039232 for details.",
MilestoneString(kM79))}; MilestoneString(kM79))};
case WebFeature::kCSSValueAppearanceCheckboxForOthersRendered:
return {"CSSValueAppearanceCheckboxForOthersRendered", kM79,
WillBeRemoved("'-webkit-appearance: checkbox' for elements other "
"than input[type=checkbox]",
kM79, "5070237827334144")};
case WebFeature::kCSSValueAppearanceRadioForOthersRendered:
return {"CSSValueAppearanceRadioForOthersRendered", kM79,
WillBeRemoved("'-webkit-appearance: radio' for elements other "
"than input[type=radio]",
kM79, "5070237827334144")};
case WebFeature::kCSSValueAppearancePushButtonForOthersRendered:
return {
"CSSValueAppearancePushButtonForOthersRendered", kM79,
WillBeRemoved(
"'-webkit-appearance: push-button' for elements other than "
"input[type=button], input[type=reset], and input[type=submit]",
kM79, "5070237827334144")};
case WebFeature::kCSSValueAppearanceSquareButtonForOthersRendered:
return {"CSSValueAppearanceSquareButtonForOthersRendered", kM79,
WillBeRemoved("'-webkit-appearance: square-button' for elements "
"other than input[type=color]",
kM79, "5070237827334144")};
case WebFeature::kCSSValueAppearanceButtonForAnchor:
return {"CSSValueAppearanceSquareButtonForAnchor", kM79,
WillBeRemoved("'-webkit-appearance: button' for a", kM79,
"5070237827334144")};
case WebFeature::kCSSValueAppearanceButtonForSelectRendered:
return {
"CSSValueAppearanceButtonForSelectRendered", kM79,
WillBeRemoved("'-webkit-appearance: button' for drop-down box select",
kM79, "5070237827334144")};
case WebFeature::kCSSValueAppearanceInnerSpinButtonForOthersRendered:
return {"CSSValueAppearanceInnerSpinButtonForOthersRendered", kM79,
WillBeRemoved("'-webkit-appearance: inner-spin-button' for "
"elements other than :-webkit-inner-spin-button",
kM79, "5070237827334144")};
case WebFeature::kCSSValueAppearanceListboxForOthersRendered:
return {"CSSValueAppearanceListboxForOthersRendered", kM79,
WillBeRemoved("'-webkit-appearance: listbox' for "
"elements other than listbox select",
kM79, "5070237827334144")};
case WebFeature::kCSSValueAppearanceMenuListForOthersRendered:
return {
"CSSValueAppearanceMenuListForOthersRendered", kM79,
WillBeRemoved(
#if defined(OS_ANDROID)
"'-webkit-appearance: menulist' for elements other "
"than drop-down box select, input[type=color][list], "
"input[type=date], "
"input[type=datetime-local], input[type=month], "
"input[type=time], and input[type=week]",
#else
"'-webkit-appearance: menulist' for elements other "
"than select and input[type=color][list]",
#endif
kM79, "5070237827334144")
};
case WebFeature::kCSSValueAppearanceMenuListButtonForOthersRendered:
return {
"CSSValueAppearanceMenuListButtonForOthersRendered", kM79,
WillBeRemoved(
#if defined(OS_ANDROID)
"'-webkit-appearance: menulist-button' for elements other "
"than drop-down box select, input[type=color][list], "
"input[type=date], "
"input[type=datetime-local], input[type=month], "
"input[type=time], and input[type=week]",
#else
"'-webkit-appearance: menulist-button' for elements other "
"than select and input[type=color][list]",
#endif
kM79, "5070237827334144")
};
case WebFeature::kCSSValueAppearanceMeterForOthersRendered:
return {"CSSValueAppearanceMeterForOthersRendered", kM79,
WillBeRemoved("'-webkit-appearance: meter' for "
"elements other than meter",
kM79, "5070237827334144")};
case WebFeature::kCSSValueAppearanceProgressBarForOthersRendered:
return {"CSSValueAppearanceProgressBarForOthersRendered", kM79,
WillBeRemoved("'-webkit-appearance: progress-bar' for "
"elements other than progress",
kM79, "5070237827334144")};
case WebFeature::kCSSValueAppearanceSliderHorizontalForOthersRendered:
return {"CSSValueAppearanceSliderHorizontalForOthersRendered", kM79,
WillBeRemoved("'-webkit-appearance: slider-horizontal' for "
"elements other than input[type=range]",
kM79, "5070237827334144")};
case WebFeature::kCSSValueAppearanceSliderVerticalForOthersRendered:
return {"CSSValueAppearanceSliderVerticalForOthersRendered", kM79,
WillBeRemoved("'-webkit-appearance: slider-vertical' for "
"elements other than input[type=range]",
kM79, "5070237827334144")};
case WebFeature::kCSSValueAppearanceSliderThumbHorizontalForOthersRendered:
return {"CSSValueAppearanceSliderThumbHorizontalForOthersRendered", kM79,
WillBeRemoved("'-webkit-appearance: sliderthumb-horizontal' for "
"elements other than ::-webkit-slider-thumb and "
"::-webkit-media-slider-thumb",
kM79, "5070237827334144")};
case WebFeature::kCSSValueAppearanceSliderThumbVerticalForOthersRendered:
return {"CSSValueAppearanceSliderThumbVerticalForOthersRendered", kM79,
WillBeRemoved("'-webkit-appearance: sliderthumb-vertical' for "
"elements other than ::-webkit-slider-thumb and "
"::-webkit-media-slider-thumb",
kM79, "5070237827334144")};
case WebFeature::kCSSValueAppearanceSearchFieldForOthersRendered:
return {"CSSValueAppearanceSearchFieldForOthersRendered", kM79,
WillBeRemoved("'-webkit-appearance: searchfield' for "
"elements other than input[type=search]",
kM79, "5070237827334144")};
case WebFeature::kCSSValueAppearanceSearchCancelForOthers2Rendered:
return {
"CSSValueAppearanceSearchCancelForOthers2Rendered", kM79,
WillBeRemoved("'-webkit-appearance: searchfield-cancel-button' for "
"elements other than ::-webkit-clear-button and "
"::-webkit-search-cancel-button",
kM79, "5070237827334144")};
case WebFeature::kCSSValueAppearanceTextFieldForOthersRendered:
return {
"CSSValueAppearanceTextFieldForOthersRendered", kM79,
WillBeRemoved(
"'-webkit-appearance: textfield' for "
#if defined(OS_ANDROID)
"elements other than input[type=email], input[type=number], "
"input[type=password], input[type=search], input[type=tel], "
"input[type=text], input[type=url]",
#else
"elements other than input[type=email], input[type=number], "
"input[type=password], input[type=search], input[type=tel], "
"input[type=text], input[type=url], input[type=date], "
"input[type=datetime-local], input[type=month], "
"input[type=time], and input[type=week]",
#endif
kM79, "5070237827334144")
};
case WebFeature::kCSSValueAppearanceTextAreaForOthersRendered:
return {"CSSValueAppearanceTextAreaForOthersRendered", kM79,
WillBeRemoved("'-webkit-appearance: textarea' for "
"elements other than textarea",
kM79, "5070237827334144")};
// Features that aren't deprecated don't have a deprecation message. // Features that aren't deprecated don't have a deprecation message.
default: default:
return {"NotDeprecated", kUnknown, ""}; return {"NotDeprecated", kUnknown, ""};
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "build/build_config.h" #include "build/build_config.h"
#include "third_party/blink/public/platform/platform.h" #include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/web_rect.h" #include "third_party/blink/public/platform/web_rect.h"
#include "third_party/blink/renderer/core/frame/deprecation.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h" #include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/html/forms/html_data_list_element.h" #include "third_party/blink/renderer/core/html/forms/html_data_list_element.h"
#include "third_party/blink/renderer/core/html/forms/html_data_list_options_collection.h" #include "third_party/blink/renderer/core/html/forms/html_data_list_options_collection.h"
...@@ -95,6 +96,9 @@ ThemePainter::ThemePainter() = default; ...@@ -95,6 +96,9 @@ ThemePainter::ThemePainter() = default;
#define COUNT_APPEARANCE(doc, feature) \ #define COUNT_APPEARANCE(doc, feature) \
doc.CountUse(WebFeature::kCSSValueAppearance##feature##Rendered) doc.CountUse(WebFeature::kCSSValueAppearance##feature##Rendered)
#define DEPRECATE_APPEARANCE(doc, feature) \
Deprecation::CountDeprecation( \
doc, WebFeature::kCSSValueAppearance##feature##Rendered)
void CountAppearanceTextFieldPart(const Node* node) { void CountAppearanceTextFieldPart(const Node* node) {
if (!node) { if (!node) {
...@@ -114,7 +118,11 @@ void CountAppearanceTextFieldPart(const Node* node) { ...@@ -114,7 +118,11 @@ void CountAppearanceTextFieldPart(const Node* node) {
feature = WebFeature::kCSSValueAppearanceTextFieldForTemporalRendered; feature = WebFeature::kCSSValueAppearanceTextFieldForTemporalRendered;
} }
} }
UseCounter::Count(node->GetDocument(), feature); if (feature == WebFeature::kCSSValueAppearanceTextFieldForOthersRendered) {
Deprecation::CountDeprecation(node->GetDocument(), feature);
} else {
UseCounter::Count(node->GetDocument(), feature);
}
} }
// Returns true; Needs CSS painting and/or PaintBorderOnly(). // Returns true; Needs CSS painting and/or PaintBorderOnly().
...@@ -131,7 +139,8 @@ bool ThemePainter::Paint(const LayoutObject& o, ...@@ -131,7 +139,8 @@ bool ThemePainter::Paint(const LayoutObject& o,
if (part == kButtonPart && node) { if (part == kButtonPart && node) {
if (IsHTMLAnchorElement(node)) { if (IsHTMLAnchorElement(node)) {
UseCounter::Count(doc, WebFeature::kCSSValueAppearanceButtonForAnchor); Deprecation::CountDeprecation(
doc, WebFeature::kCSSValueAppearanceButtonForAnchor);
COUNT_APPEARANCE(doc, ButtonForNonButton); COUNT_APPEARANCE(doc, ButtonForNonButton);
} else if (IsHTMLButtonElement(node)) { } else if (IsHTMLButtonElement(node)) {
UseCounter::Count(doc, WebFeature::kCSSValueAppearanceButtonForButton); UseCounter::Count(doc, WebFeature::kCSSValueAppearanceButtonForButton);
...@@ -144,6 +153,19 @@ bool ThemePainter::Paint(const LayoutObject& o, ...@@ -144,6 +153,19 @@ bool ThemePainter::Paint(const LayoutObject& o,
} else { } else {
COUNT_APPEARANCE(doc, ButtonForNonButton); COUNT_APPEARANCE(doc, ButtonForNonButton);
COUNT_APPEARANCE(doc, ButtonForOthers); COUNT_APPEARANCE(doc, ButtonForOthers);
if (IsA<HTMLSelectElement>(node) &&
To<HTMLSelectElement>(node)->UsesMenuList()) {
DEPRECATE_APPEARANCE(doc, ButtonForSelect);
} else {
const AtomicString& type =
To<Element>(node)->FastGetAttribute(html_names::kTypeAttr);
// https://github.com/twbs/bootstrap/pull/29053
if (type == "button" || type == "reset" || type == "submit") {
COUNT_APPEARANCE(doc, ButtonForBootstrapLooseSelector);
} else {
COUNT_APPEARANCE(doc, ButtonForOthers2);
}
}
} }
} }
...@@ -153,28 +175,28 @@ bool ThemePainter::Paint(const LayoutObject& o, ...@@ -153,28 +175,28 @@ bool ThemePainter::Paint(const LayoutObject& o,
COUNT_APPEARANCE(doc, Checkbox); COUNT_APPEARANCE(doc, Checkbox);
auto* input = ToHTMLInputElementOrNull(node); auto* input = ToHTMLInputElementOrNull(node);
if (!input || input->type() != input_type_names::kCheckbox) if (!input || input->type() != input_type_names::kCheckbox)
COUNT_APPEARANCE(doc, CheckboxForOthers); DEPRECATE_APPEARANCE(doc, CheckboxForOthers);
return PaintCheckbox(node, o.GetDocument(), style, paint_info, r); return PaintCheckbox(node, o.GetDocument(), style, paint_info, r);
} }
case kRadioPart: { case kRadioPart: {
COUNT_APPEARANCE(doc, Radio); COUNT_APPEARANCE(doc, Radio);
auto* input = ToHTMLInputElementOrNull(node); auto* input = ToHTMLInputElementOrNull(node);
if (!input || input->type() != input_type_names::kRadio) if (!input || input->type() != input_type_names::kRadio)
COUNT_APPEARANCE(doc, RadioForOthers); DEPRECATE_APPEARANCE(doc, RadioForOthers);
return PaintRadio(node, o.GetDocument(), style, paint_info, r); return PaintRadio(node, o.GetDocument(), style, paint_info, r);
} }
case kPushButtonPart: { case kPushButtonPart: {
COUNT_APPEARANCE(doc, PushButton); COUNT_APPEARANCE(doc, PushButton);
auto* input = ToHTMLInputElementOrNull(node); auto* input = ToHTMLInputElementOrNull(node);
if (!input || !input->IsTextButton()) if (!input || !input->IsTextButton())
COUNT_APPEARANCE(doc, PushButtonForOthers); DEPRECATE_APPEARANCE(doc, PushButtonForOthers);
return PaintButton(node, o.GetDocument(), style, paint_info, r); return PaintButton(node, o.GetDocument(), style, paint_info, r);
} }
case kSquareButtonPart: { case kSquareButtonPart: {
COUNT_APPEARANCE(doc, SquareButton); COUNT_APPEARANCE(doc, SquareButton);
auto* input = ToHTMLInputElementOrNull(node); auto* input = ToHTMLInputElementOrNull(node);
if (!input || input->type() != input_type_names::kColor) if (!input || input->type() != input_type_names::kColor)
COUNT_APPEARANCE(doc, SquareButtonForOthers); DEPRECATE_APPEARANCE(doc, SquareButtonForOthers);
return PaintButton(node, o.GetDocument(), style, paint_info, r); return PaintButton(node, o.GetDocument(), style, paint_info, r);
} }
case kButtonPart: case kButtonPart:
...@@ -183,34 +205,37 @@ bool ThemePainter::Paint(const LayoutObject& o, ...@@ -183,34 +205,37 @@ bool ThemePainter::Paint(const LayoutObject& o,
case kInnerSpinButtonPart: { case kInnerSpinButtonPart: {
COUNT_APPEARANCE(doc, InnerSpinButton); COUNT_APPEARANCE(doc, InnerSpinButton);
if (!DynamicTo<SpinButtonElement>(node)) if (!DynamicTo<SpinButtonElement>(node))
COUNT_APPEARANCE(doc, InnerSpinButtonForOthers); DEPRECATE_APPEARANCE(doc, InnerSpinButtonForOthers);
return PaintInnerSpinButton(node, style, paint_info, r); return PaintInnerSpinButton(node, style, paint_info, r);
} }
case kMenulistPart: case kMenulistPart:
COUNT_APPEARANCE(doc, MenuList); COUNT_APPEARANCE(doc, MenuList);
if (!IsHTMLSelectElement(node) && !IsMenulistInput(node)) if (!IsHTMLSelectElement(node) && !IsMenulistInput(node))
COUNT_APPEARANCE(doc, MenuListForOthers); DEPRECATE_APPEARANCE(doc, MenuListForOthers);
return PaintMenuList(node, o.GetDocument(), style, paint_info, r); return PaintMenuList(node, o.GetDocument(), style, paint_info, r);
case kMeterPart: case kMeterPart:
if (node && !IsA<HTMLMeterElement>(node) &&
!IsA<HTMLMeterElement>(node->OwnerShadowHost()))
DEPRECATE_APPEARANCE(doc, MeterForOthers);
return true; return true;
case kProgressBarPart: case kProgressBarPart:
COUNT_APPEARANCE(doc, ProgressBar); COUNT_APPEARANCE(doc, ProgressBar);
if (!o.IsProgress()) if (!o.IsProgress())
COUNT_APPEARANCE(doc, ProgressBarForOthers); DEPRECATE_APPEARANCE(doc, ProgressBarForOthers);
// Note that |-webkit-appearance: progress-bar| works only for <progress>. // Note that |-webkit-appearance: progress-bar| works only for <progress>.
return PaintProgressBar(o, paint_info, r); return PaintProgressBar(o, paint_info, r);
case kSliderHorizontalPart: { case kSliderHorizontalPart: {
COUNT_APPEARANCE(doc, SliderHorizontal); COUNT_APPEARANCE(doc, SliderHorizontal);
auto* input = ToHTMLInputElementOrNull(node); auto* input = ToHTMLInputElementOrNull(node);
if (!input || input->type() != input_type_names::kRange) if (!input || input->type() != input_type_names::kRange)
COUNT_APPEARANCE(doc, SliderHorizontalForOthers); DEPRECATE_APPEARANCE(doc, SliderHorizontalForOthers);
return PaintSliderTrack(o, paint_info, r); return PaintSliderTrack(o, paint_info, r);
} }
case kSliderVerticalPart: { case kSliderVerticalPart: {
COUNT_APPEARANCE(doc, SliderVertical); COUNT_APPEARANCE(doc, SliderVertical);
auto* input = ToHTMLInputElementOrNull(node); auto* input = ToHTMLInputElementOrNull(node);
if (!input || input->type() != input_type_names::kRange) if (!input || input->type() != input_type_names::kRange)
COUNT_APPEARANCE(doc, SliderVerticalForOthers); DEPRECATE_APPEARANCE(doc, SliderVerticalForOthers);
return PaintSliderTrack(o, paint_info, r); return PaintSliderTrack(o, paint_info, r);
} }
case kSliderThumbHorizontalPart: { case kSliderThumbHorizontalPart: {
...@@ -218,7 +243,7 @@ bool ThemePainter::Paint(const LayoutObject& o, ...@@ -218,7 +243,7 @@ bool ThemePainter::Paint(const LayoutObject& o,
auto* input = auto* input =
ToHTMLInputElementOrNull(node ? node->OwnerShadowHost() : nullptr); ToHTMLInputElementOrNull(node ? node->OwnerShadowHost() : nullptr);
if (!input || input->type() != input_type_names::kRange) if (!input || input->type() != input_type_names::kRange)
COUNT_APPEARANCE(doc, SliderThumbHorizontalForOthers); DEPRECATE_APPEARANCE(doc, SliderThumbHorizontalForOthers);
return PaintSliderThumb(node, style, paint_info, r); return PaintSliderThumb(node, style, paint_info, r);
} }
case kSliderThumbVerticalPart: { case kSliderThumbVerticalPart: {
...@@ -226,7 +251,7 @@ bool ThemePainter::Paint(const LayoutObject& o, ...@@ -226,7 +251,7 @@ bool ThemePainter::Paint(const LayoutObject& o,
auto* input = auto* input =
ToHTMLInputElementOrNull(node ? node->OwnerShadowHost() : nullptr); ToHTMLInputElementOrNull(node ? node->OwnerShadowHost() : nullptr);
if (!input || input->type() != input_type_names::kRange) if (!input || input->type() != input_type_names::kRange)
COUNT_APPEARANCE(doc, SliderThumbVerticalForOthers); DEPRECATE_APPEARANCE(doc, SliderThumbVerticalForOthers);
return PaintSliderThumb(node, style, paint_info, r); return PaintSliderThumb(node, style, paint_info, r);
} }
case kMediaSliderPart: case kMediaSliderPart:
...@@ -250,14 +275,14 @@ bool ThemePainter::Paint(const LayoutObject& o, ...@@ -250,14 +275,14 @@ bool ThemePainter::Paint(const LayoutObject& o,
const auto& doc = node->GetDocument(); const auto& doc = node->GetDocument();
COUNT_APPEARANCE(doc, TextArea); COUNT_APPEARANCE(doc, TextArea);
if (!IsHTMLTextAreaElement(node)) if (!IsHTMLTextAreaElement(node))
COUNT_APPEARANCE(doc, TextAreaForOthers); DEPRECATE_APPEARANCE(doc, TextAreaForOthers);
} }
return PaintTextArea(node, style, paint_info, r); return PaintTextArea(node, style, paint_info, r);
case kSearchFieldPart: { case kSearchFieldPart: {
COUNT_APPEARANCE(doc, SearchField); COUNT_APPEARANCE(doc, SearchField);
auto* input = ToHTMLInputElementOrNull(node); auto* input = ToHTMLInputElementOrNull(node);
if (!input || input->type() != input_type_names::kSearch) if (!input || input->type() != input_type_names::kSearch)
COUNT_APPEARANCE(doc, SearchFieldForOthers); DEPRECATE_APPEARANCE(doc, SearchFieldForOthers);
return PaintSearchField(node, style, paint_info, r); return PaintSearchField(node, style, paint_info, r);
} }
case kSearchFieldCancelButtonPart: { case kSearchFieldCancelButtonPart: {
...@@ -265,7 +290,7 @@ bool ThemePainter::Paint(const LayoutObject& o, ...@@ -265,7 +290,7 @@ bool ThemePainter::Paint(const LayoutObject& o,
auto* element = DynamicTo<Element>(node); auto* element = DynamicTo<Element>(node);
if (!element || !element->OwnerShadowHost()) { if (!element || !element->OwnerShadowHost()) {
COUNT_APPEARANCE(doc, SearchCancelForOthers); COUNT_APPEARANCE(doc, SearchCancelForOthers);
COUNT_APPEARANCE(doc, SearchCancelForOthers2); DEPRECATE_APPEARANCE(doc, SearchCancelForOthers2);
} else { } else {
const AtomicString& shadow_id = const AtomicString& shadow_id =
element->FastGetAttribute(html_names::kIdAttr); element->FastGetAttribute(html_names::kIdAttr);
...@@ -275,11 +300,16 @@ bool ThemePainter::Paint(const LayoutObject& o, ...@@ -275,11 +300,16 @@ bool ThemePainter::Paint(const LayoutObject& o,
COUNT_APPEARANCE(doc, SearchCancelForOthers); COUNT_APPEARANCE(doc, SearchCancelForOthers);
} else { } else {
COUNT_APPEARANCE(doc, SearchCancelForOthers); COUNT_APPEARANCE(doc, SearchCancelForOthers);
COUNT_APPEARANCE(doc, SearchCancelForOthers2); DEPRECATE_APPEARANCE(doc, SearchCancelForOthers2);
} }
} }
return PaintSearchFieldCancelButton(o, paint_info, r); return PaintSearchFieldCancelButton(o, paint_info, r);
} }
case kListboxPart:
if (!IsA<HTMLSelectElement>(node) ||
To<HTMLSelectElement>(node)->UsesMenuList())
DEPRECATE_APPEARANCE(doc, ListboxForOthers);
return true;
default: default:
break; break;
} }
...@@ -309,7 +339,7 @@ bool ThemePainter::PaintBorderOnly(const Node* node, ...@@ -309,7 +339,7 @@ bool ThemePainter::PaintBorderOnly(const Node* node,
const auto& doc = node->GetDocument(); const auto& doc = node->GetDocument();
COUNT_APPEARANCE(doc, TextArea); COUNT_APPEARANCE(doc, TextArea);
if (!IsHTMLTextAreaElement(node)) if (!IsHTMLTextAreaElement(node))
COUNT_APPEARANCE(doc, TextAreaForOthers); DEPRECATE_APPEARANCE(doc, TextAreaForOthers);
} }
return PaintTextArea(node, style, paint_info, r); return PaintTextArea(node, style, paint_info, r);
case kMenulistButtonPart: case kMenulistButtonPart:
...@@ -355,7 +385,7 @@ bool ThemePainter::PaintDecorations(const Node* node, ...@@ -355,7 +385,7 @@ bool ThemePainter::PaintDecorations(const Node* node,
case kMenulistButtonPart: case kMenulistButtonPart:
COUNT_APPEARANCE(document, MenuListButton); COUNT_APPEARANCE(document, MenuListButton);
if (!IsHTMLSelectElement(node) && !IsMenulistInput(node)) if (!IsHTMLSelectElement(node) && !IsMenulistInput(node))
COUNT_APPEARANCE(document, MenuListButtonForOthers); DEPRECATE_APPEARANCE(document, MenuListButtonForOthers);
return PaintMenuListButton(node, document, style, paint_info, r); return PaintMenuListButton(node, document, style, paint_info, r);
case kTextFieldPart: case kTextFieldPart:
case kTextAreaPart: case kTextAreaPart:
......
CONSOLE WARNING: '-webkit-appearance: checkbox' for elements other than input[type=checkbox] is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: radio' for elements other than input[type=radio] is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: push-button' for elements other than input[type=button], input[type=reset], and input[type=submit] is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: square-button' for elements other than input[type=color] is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: button' for a is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: button' for drop-down box select is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: inner-spin-button' for elements other than :-webkit-inner-spin-button is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: listbox' for elements other than listbox select is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: menulist' for elements other than select and input[type=color][list] is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: menulist-button' for elements other than select and input[type=color][list] is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: meter' for elements other than meter is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: progress-bar' for elements other than progress is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: slider-horizontal' for elements other than input[type=range] is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: slider-vertical' for elements other than input[type=range] is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: sliderthumb-horizontal' for elements other than ::-webkit-slider-thumb and ::-webkit-media-slider-thumb is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: sliderthumb-vertical' for elements other than ::-webkit-slider-thumb and ::-webkit-media-slider-thumb is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: searchfield' for elements other than input[type=search] is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: searchfield-cancel-button' for elements other than ::-webkit-clear-button and ::-webkit-search-cancel-button is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: textfield' for elements other than input[type=email], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=url], input[type=date], input[type=datetime-local], input[type=month], input[type=time], and input[type=week] is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: textarea' for elements other than textarea is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
See if we have deprecation messages for -webkit-appearance.
menulist
CONSOLE WARNING: '-webkit-appearance: progress-bar' for elements other than progress is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: meter' for elements other than meter is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
PASS if it doesn't crash. See Bug 40158. PASS if it doesn't crash. See Bug 40158.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
......
<!DOCTYPE html>
<style>
span, a {
display: inline-block;
width: 1em;
height: 1em;
}
</style>
<body>
<br>
<p>See if we have deprecation messages for -webkit-appearance.</p>
<span style="-webkit-appearance: checkbox"></span>
<span style="-webkit-appearance: radio"></span>
<span style="-webkit-appearance: push-button"></span>
<span style="-webkit-appearance: square-button"></span>
<a style="-webkit-appearance: button"></a>
<select style="-webkit-appearance: button"></select>
<span style="-webkit-appearance: inner-spin-button"></span>
<select style="-webkit-appearance: listbox"></select>
<span style="-webkit-appearance: listbox"></span>
<!-- font and height are necessary to avoid fallback to 'menulist-button'. -->
<span style="-webkit-appearance: menulist; font: -webkit-small-control; height: auto">menulist</span>
<span style="-webkit-appearance: menulist-button"></span>
<span style="-webkit-appearance: meter"></span>
<span style="-webkit-appearance: progress-bar"></span>
<span style="-webkit-appearance: slider-horizontal"></span>
<span style="-webkit-appearance: slider-vertical"></span>
<span style="-webkit-appearance: sliderthumb-horizontal"></span>
<span style="-webkit-appearance: sliderthumb-vertical"></span>
<span style="-webkit-appearance: searchfield"></span>
<span style="-webkit-appearance: searchfield-cancel-button"></span>
<textarea style="-webkit-appearance: textfield"></textarea>
<input style="-webkit-appearance: textarea">
<script>
testRunner.dumpAsText();
</script>
</body>
CONSOLE WARNING: '-webkit-appearance: square-button' for elements other than input[type=color] is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: slider-vertical' for elements other than input[type=range] is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: slider-horizontal' for elements other than input[type=range] is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
No crash means test PASS. No crash means test PASS.
CONSOLE WARNING: '-webkit-appearance: square-button' for elements other than input[type=color] is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
Tests internal components of a file upload control correctly inherit the style of the container input element. Tests internal components of a file upload control correctly inherit the style of the container input element.
PASS document.defaultView.getComputedStyle(button1, null).getPropertyValue("font-size") is "30px" PASS document.defaultView.getComputedStyle(button1, null).getPropertyValue("font-size") is "30px"
......
CONSOLE WARNING: '-webkit-appearance: slider-horizontal' for elements other than input[type=range] is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
Checks that slider appearance on regular node doesn't crash. Checks that slider appearance on regular node doesn't crash.
CONSOLE WARNING: '-webkit-appearance: sliderthumb-horizontal' for elements other than ::-webkit-slider-thumb and ::-webkit-media-slider-thumb is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
PASS If this test does not crash. http://bugs.webkit.org/show_bug.cgi?id=12045 PASS If this test does not crash. http://bugs.webkit.org/show_bug.cgi?id=12045
CONSOLE WARNING: '-webkit-appearance: sliderthumb-horizontal' for elements other than ::-webkit-slider-thumb and ::-webkit-media-slider-thumb is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: sliderthumb-vertical' for elements other than ::-webkit-slider-thumb and ::-webkit-media-slider-thumb is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: sliderthumb-vertical' for elements other than ::-webkit-slider-thumb and ::-webkit-media-slider-thumb is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
This test passes if it does not CRASH. This test passes if it does not CRASH.
CONSOLE WARNING: '-webkit-appearance: radio' for elements other than input[type=radio] is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: menulist-button' for elements other than select and input[type=color][list] is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: menulist' for elements other than select and input[type=color][list] is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
CONSOLE WARNING: '-webkit-appearance: searchfield-cancel-button' for elements other than ::-webkit-clear-button and ::-webkit-search-cancel-button is deprecated and will be removed in M79, around December 2019. See https://www.chromestatus.com/features/5070237827334144 for more details.
...@@ -23909,6 +23909,12 @@ Called by update_net_error_codes.py.--> ...@@ -23909,6 +23909,12 @@ Called by update_net_error_codes.py.-->
<int value="2960" label="V8Database_Transaction_Method"/> <int value="2960" label="V8Database_Transaction_Method"/>
<int value="2961" label="V8Database_ReadTransaction_Method"/> <int value="2961" label="V8Database_ReadTransaction_Method"/>
<int value="2962" label="V8SQLTransaction_ExecuteSql_Method"/> <int value="2962" label="V8SQLTransaction_ExecuteSql_Method"/>
<int value="2963"
label="CSSValueAppearanceButtonForBootstrapLooseSelectorRendered"/>
<int value="2964" label="CSSValueAppearanceButtonForOthers2Rendered"/>
<int value="2965" label="CSSValueAppearanceButtonForSelectRendered"/>
<int value="2966" label="CSSValueAppearanceListboxForOthersRendered"/>
<int value="2967" label="CSSValueAppearanceMeterForOthersRendered"/>
</enum> </enum>
<enum name="FeaturePolicyAllowlistType"> <enum name="FeaturePolicyAllowlistType">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment