Commit 239b6232 authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

Reland "Change the anonymous block in LayoutMenuList to a shadow element"

This is a reland of a98ef426
Differences from the original CL:
 * Add aria-hidden="true" to the shadow element because AXMenuList
   assumes its child is only AXMenuListPopup.
   This fixes ChromeVox test failures with the original CL.

Original change's description:
> Change the anonymous block in LayoutMenuList to a shadow element
>
> Enable rendering of the shadow element of <select>, and remove anonymous
> block in LayoutMenuList.
>
> * HTMLOptionElement::ParseAttribute():
>   Update the shadow element content on option[label] change.
>
> * HTMLSelectElement::UpdateFromElement():
>   Fold LayoutMenuList::UpdateFromElement() into here. If option_style_
>   and InnerElemnet's style are inconsistent, update InnerElement's
>   style.
>
> * HTMLSelectElement::UpdateMenuListLabel()
>   Move the code in LayoutMenuList::UpdateInnerStyle() here.
>   Also, kick TextChanged ax notification which LayoutText::ForceSetText
>   did.
>
> * MenuListInnerElement::CustomStyleForLayoutObject():
>   Set "display: block"
>   Add custom style which the anonymous block used.
>
> * layout_menu_list.{h,cc}:
>   Remove a lot of code.
>
> * ax_layout_object_test.cc:
>   Add tests to check if AXLayoutObject::StringValue() respects to
>   text-transform and -webkit-text-security.
>
> * web_tests/accessibility/notification-listeners.html:
>   Remove TextChanged notification expectation. After this CL, <select>
>   won't notify TextChanged in this test scenario. The text is changed
>   before creating LayoutObject and AXLayoutObject.
>
>
>
> Bug: 1040828
> Change-Id: Ia0c19f0897ab2d1461e457c83adceda2c0739f9f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2024250
> Reviewed-by: Koji Ishii <kojii@chromium.org>
> Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
> Commit-Queue: Kent Tamura <tkent@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#738416}

Bug: 1040828
Change-Id: I9696527720316c861b657a03e0a1ed9cfa7db653
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2040631Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738834}
parent f0400215
......@@ -391,7 +391,7 @@ TEST_P(ParameterizedTextOffsetMappingTest, RangeWithNestedPosition) {
TEST_P(ParameterizedTextOffsetMappingTest, RangeWithSelect) {
EXPECT_EQ(
"^<select>"
"<div></div>"
"<div aria-hidden=\"true\"></div>"
"<slot name=\"user-agent-custom-assign-slot\"></slot>"
"</select>foo|",
GetRange("<select>|</select>foo"));
......
......@@ -182,6 +182,8 @@ void HTMLOptionElement::ParseAttribute(
SetSelected(!params.new_value.IsNull());
PseudoStateChanged(CSSSelector::kPseudoDefault);
} else if (name == html_names::kLabelAttr) {
if (HTMLSelectElement* select = OwnerSelectElement())
select->OptionElementChildrenChanged(*this);
UpdateLabel();
} else {
HTMLElement::ParseAttribute(params);
......
......@@ -2007,8 +2007,10 @@ void HTMLSelectElement::UpdateUserAgentShadowTree(ShadowRoot& root) {
}
}
if (UsesMenuList()) {
root.insertBefore(MakeGarbageCollected<MenuListInnerElement>(GetDocument()),
root.firstChild());
Element* inner_element =
MakeGarbageCollected<MenuListInnerElement>(GetDocument());
inner_element->setAttribute(html_names::kAriaHiddenAttr, "true");
root.insertBefore(inner_element, root.firstChild());
UpdateMenuListLabel(UpdateFromElement());
}
}
......@@ -2327,18 +2329,42 @@ String HTMLSelectElement::UpdateFromElement() {
}
}
String stripped = text.StripWhiteSpace();
if (auto* layout_object = GetLayoutObject()) {
ToLayoutMenuList(layout_object)->SetText(stripped);
layout_object->UpdateFromElement();
DidUpdateMenuListActiveOption(option);
auto& inner_element = InnerElement();
const ComputedStyle* inner_style = inner_element.GetComputedStyle();
if (inner_style && option_style_ &&
((option_style_->Direction() != inner_style->Direction() ||
option_style_->GetUnicodeBidi() != inner_style->GetUnicodeBidi()))) {
scoped_refptr<ComputedStyle> cloned_style =
ComputedStyle::Clone(*inner_style);
cloned_style->SetDirection(option_style_->Direction());
cloned_style->SetUnicodeBidi(option_style_->GetUnicodeBidi());
if (auto* inner_layout = inner_element.GetLayoutObject()) {
inner_layout->SetModifiedStyleOutsideStyleRecalc(
std::move(cloned_style), LayoutObject::ApplyStyleChanges::kYes);
} else {
inner_element.SetComputedStyle(std::move(cloned_style));
}
}
return stripped;
if (GetLayoutObject())
DidUpdateMenuListActiveOption(option);
return text.StripWhiteSpace();
}
void HTMLSelectElement::UpdateMenuListLabel(const String& label) {
if (UsesMenuList())
InnerElement().setTextContent(label);
if (!UsesMenuList())
return;
InnerElement().setTextContent(label);
// LayoutMenuList::ControlClipRect() depends on the content box size of
// inner_element.
if (auto* box = GetLayoutBox()) {
box->SetNeedsPaintPropertyUpdate();
if (auto* layer = box->Layer())
layer->SetNeedsCompositingInputsUpdate();
if (auto* cache = GetDocument().ExistingAXObjectCache())
cache->TextChanged(box);
}
}
const ComputedStyle* HTMLSelectElement::OptionStyle() const {
......
......@@ -19,7 +19,8 @@ MenuListInnerElement::CustomStyleForLayoutObject() {
const ComputedStyle& parent_style = OwnerShadowHost()->ComputedStyleRef();
scoped_refptr<ComputedStyle> style =
ComputedStyle::CreateAnonymousStyleWithDisplay(parent_style,
EDisplay::kNone);
EDisplay::kBlock);
AdjustInnerStyle(parent_style, *style);
return style;
}
......
......@@ -15,6 +15,8 @@ class MenuListInnerElement : public HTMLDivElement {
private:
scoped_refptr<ComputedStyle> CustomStyleForLayoutObject() override;
void AdjustInnerStyle(const ComputedStyle& parent_style,
ComputedStyle& inner_style) const;
};
} // namespace blink
......
......@@ -33,6 +33,7 @@
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/html/forms/html_option_element.h"
#include "third_party/blink/renderer/core/html/forms/html_select_element.h"
#include "third_party/blink/renderer/core/html/forms/menu_list_inner_element.h"
#include "third_party/blink/renderer/core/layout/layout_block_flow.h"
#include "third_party/blink/renderer/core/layout/layout_text.h"
#include "third_party/blink/renderer/core/layout/layout_theme.h"
......@@ -43,8 +44,6 @@ namespace blink {
LayoutMenuList::LayoutMenuList(Element* element)
: LayoutFlexibleBox(element),
button_text_(nullptr),
inner_block_(nullptr),
options_width_(0) {
DCHECK(IsA<HTMLSelectElement>(element));
}
......@@ -53,72 +52,15 @@ LayoutMenuList::~LayoutMenuList() = default;
bool LayoutMenuList::IsChildAllowed(LayoutObject* object,
const ComputedStyle&) const {
// For a size=1 <select>, we only render the active option through the
// anonymous inner_block_ plus button_text_. We do not allow adding layout
// objects for options or optgroups.
return object->IsAnonymous();
// For a size=1 <select>, we only render the active option label through the
// InnerElement. We do not allow adding layout objects for options,
// optgroups, ::before, or ::after.
return object->GetNode() == &SelectElement()->InnerElement();
}
scoped_refptr<ComputedStyle> LayoutMenuList::CreateInnerStyle() {
scoped_refptr<ComputedStyle> inner_style =
ComputedStyle::CreateAnonymousStyleWithDisplay(StyleRef(),
EDisplay::kBlock);
AdjustInnerStyle(StyleRef(), *inner_style);
return inner_style;
}
void LayoutMenuList::UpdateInnerStyle() {
DCHECK(inner_block_);
scoped_refptr<ComputedStyle> inner_style =
ComputedStyle::Clone(inner_block_->StyleRef());
AdjustInnerStyle(StyleRef(), *inner_style);
inner_block_->SetModifiedStyleOutsideStyleRecalc(std::move(inner_style),
ApplyStyleChanges::kNo);
// LayoutMenuList::ControlClipRect() depends on inner_block_->ContentsSize().
SetNeedsPaintPropertyUpdate();
if (Layer())
Layer()->SetNeedsCompositingInputsUpdate();
}
void LayoutMenuList::CreateInnerBlock() {
if (inner_block_) {
DCHECK_EQ(FirstChild(), inner_block_);
DCHECK(!inner_block_->NextSibling());
return;
}
// Create an anonymous block.
LegacyLayout legacy =
ForceLegacyLayout() ? LegacyLayout::kForce : LegacyLayout::kAuto;
DCHECK(!FirstChild());
inner_block_ = LayoutBlockFlow::CreateAnonymous(&GetDocument(),
CreateInnerStyle(), legacy);
button_text_ =
LayoutText::CreateEmptyAnonymous(GetDocument(), Style(), legacy);
// We need to set the text explicitly though it was specified in the
// constructor because LayoutText doesn't refer to the text
// specified in the constructor in a case of re-transforming.
inner_block_->AddChild(button_text_);
LayoutFlexibleBox::AddChild(inner_block_);
// LayoutMenuList::ControlClipRect() depends on inner_block_->ContentsSize().
SetNeedsPaintPropertyUpdate();
if (Layer())
Layer()->SetNeedsCompositingInputsUpdate();
}
bool LayoutMenuList::HasOptionStyleChanged(
const ComputedStyle& inner_style) const {
const ComputedStyle* option_style = SelectElement()->OptionStyle();
return option_style &&
((option_style->Direction() != inner_style.Direction() ||
option_style->GetUnicodeBidi() != inner_style.GetUnicodeBidi()));
}
void LayoutMenuList::AdjustInnerStyle(const ComputedStyle& parent_style,
ComputedStyle& inner_style) const {
// TODO(tkent): Move this to menu_list_inner_element.cc.
void MenuListInnerElement::AdjustInnerStyle(const ComputedStyle& parent_style,
ComputedStyle& inner_style) const {
inner_style.SetFlexGrow(1);
inner_style.SetFlexShrink(1);
// min-width: 0; is needed for correct shrinking.
......@@ -138,8 +80,8 @@ void LayoutMenuList::AdjustInnerStyle(const ComputedStyle& parent_style,
LayoutTheme& theme = LayoutTheme::GetTheme();
Length padding_start =
Length::Fixed(theme.PopupInternalPaddingStart(parent_style));
Length padding_end =
Length::Fixed(theme.PopupInternalPaddingEnd(GetFrame(), parent_style));
Length padding_end = Length::Fixed(
theme.PopupInternalPaddingEnd(GetDocument().GetFrame(), parent_style));
if (parent_style.IsLeftToRightDirection()) {
inner_style.SetTextAlign(ETextAlign::kLeft);
inner_style.SetPaddingLeft(padding_start);
......@@ -154,10 +96,8 @@ void LayoutMenuList::AdjustInnerStyle(const ComputedStyle& parent_style,
inner_style.SetPaddingBottom(
Length::Fixed(theme.PopupInternalPaddingBottom(parent_style)));
if (HasOptionStyleChanged(inner_style)) {
inner_block_->SetNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(
layout_invalidation_reason::kStyleChange);
const ComputedStyle* option_style = SelectElement()->OptionStyle();
if (const ComputedStyle* option_style =
To<HTMLSelectElement>(OwnerShadowHost())->OptionStyle()) {
inner_style.SetDirection(option_style->Direction());
inner_style.SetUnicodeBidi(option_style->GetUnicodeBidi());
}
......@@ -168,41 +108,7 @@ HTMLSelectElement* LayoutMenuList::SelectElement() const {
}
LayoutBlock* LayoutMenuList::InnerBlock() const {
return inner_block_;
}
void LayoutMenuList::AddChild(LayoutObject* new_child,
LayoutObject* before_child) {
inner_block_->AddChild(new_child, before_child);
DCHECK_EQ(inner_block_, FirstChild());
if (AXObjectCache* cache = GetDocument().ExistingAXObjectCache())
cache->ChildrenChanged(this);
// LayoutMenuList::ControlClipRect() depends on inner_block_->ContentsSize().
SetNeedsPaintPropertyUpdate();
if (Layer())
Layer()->SetNeedsCompositingInputsUpdate();
}
void LayoutMenuList::RemoveChild(LayoutObject* old_child) {
if (old_child == inner_block_ || !inner_block_) {
LayoutFlexibleBox::RemoveChild(old_child);
inner_block_ = nullptr;
} else {
inner_block_->RemoveChild(old_child);
}
}
void LayoutMenuList::StyleDidChange(StyleDifference diff,
const ComputedStyle* old_style) {
LayoutBlock::StyleDidChange(diff, old_style);
if (!inner_block_)
CreateInnerBlock();
button_text_->SetStyle(Style());
UpdateInnerStyle();
return To<LayoutBlock>(SelectElement()->InnerElement().GetLayoutObject());
}
void LayoutMenuList::UpdateOptionsWidth() const {
......@@ -227,22 +133,8 @@ void LayoutMenuList::UpdateOptionsWidth() const {
options_width_ = static_cast<int>(ceilf(max_option_width));
}
void LayoutMenuList::UpdateFromElement() {
DCHECK(inner_block_);
if (HasOptionStyleChanged(inner_block_->StyleRef()))
UpdateInnerStyle();
}
void LayoutMenuList::SetText(const String& s) {
button_text_->ForceSetText(s.Impl());
// LayoutMenuList::ControlClipRect() depends on inner_block_->ContentsSize().
SetNeedsPaintPropertyUpdate();
if (Layer())
Layer()->SetNeedsCompositingInputsUpdate();
}
String LayoutMenuList::GetText() const {
return button_text_ ? button_text_->GetText() : String();
return SelectElement()->InnerElement().innerText();
}
PhysicalRect LayoutMenuList::ControlClipRect(
......
......@@ -27,12 +27,10 @@
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/layout/layout_flexible_box.h"
#include "third_party/blink/renderer/platform/geometry/layout_rect.h"
namespace blink {
class HTMLSelectElement;
class LayoutText;
class CORE_EXPORT LayoutMenuList final : public LayoutFlexibleBox {
public:
......@@ -41,7 +39,6 @@ class CORE_EXPORT LayoutMenuList final : public LayoutFlexibleBox {
HTMLSelectElement* SelectElement() const;
String GetText() const;
void SetText(const String&);
const char* GetName() const override { return "LayoutMenuList"; }
......@@ -54,13 +51,6 @@ class CORE_EXPORT LayoutMenuList final : public LayoutFlexibleBox {
}
bool IsChildAllowed(LayoutObject*, const ComputedStyle&) const override;
void AddChild(LayoutObject* new_child,
LayoutObject* before_child = nullptr) override;
void RemoveChild(LayoutObject*) override;
bool CreatesAnonymousWrapper() const override { return true; }
void UpdateFromElement() override;
PhysicalRect ControlClipRect(const PhysicalOffset&) const override;
bool HasControlClip() const override { return true; }
......@@ -71,20 +61,8 @@ class CORE_EXPORT LayoutMenuList final : public LayoutFlexibleBox {
LayoutUnit logical_top,
LogicalExtentComputedValues&) const override;
void StyleDidChange(StyleDifference, const ComputedStyle* old_style) override;
LayoutBlock* InnerBlock() const;
void CreateInnerBlock();
scoped_refptr<ComputedStyle> CreateInnerStyle();
void UpdateInnerStyle();
void AdjustInnerStyle(const ComputedStyle& parent_style,
ComputedStyle& inner_style) const;
bool HasOptionStyleChanged(const ComputedStyle& inner_style) const;
void UpdateOptionsWidth() const;
void SetIndexToSelectOnCancel(int list_index);
LayoutText* button_text_;
LayoutBlock* inner_block_;
// m_optionsWidth is calculated and cached on demand.
// updateOptionsWidth() should be called before reading them.
......
......@@ -252,6 +252,7 @@ jumbo_source_set("unit_tests") {
sources = [
"accessibility/accessibility_object_model_test.cc",
"accessibility/ax_layout_object_test.cc",
"accessibility/ax_object_cache_test.cc",
"accessibility/ax_object_test.cc",
"accessibility/ax_position_test.cc",
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/modules/accessibility/ax_layout_object.h"
#include "third_party/blink/renderer/modules/accessibility/testing/accessibility_test.h"
namespace blink {
class AXLayoutObjectTest : public test::AccessibilityTest {};
TEST_F(AXLayoutObjectTest, StringValueTextTransform) {
SetBodyInnerHTML(
"<select id='t' style='text-transform:uppercase'>"
"<option>abc</select>");
const AXObject* ax_select = GetAXObjectByElementId("t");
ASSERT_NE(nullptr, ax_select);
EXPECT_TRUE(ax_select->IsAXLayoutObject());
EXPECT_EQ("ABC", ax_select->StringValue());
}
TEST_F(AXLayoutObjectTest, StringValueTextSecurity) {
SetBodyInnerHTML(
"<select id='t' style='-webkit-text-security:disc'>"
"<option>abc</select>");
const AXObject* ax_select = GetAXObjectByElementId("t");
ASSERT_NE(nullptr, ax_select);
EXPECT_TRUE(ax_select->IsAXLayoutObject());
// U+2022 -> \xE2\x80\xA2 in UTF-8
EXPECT_EQ("\xE2\x80\xA2\xE2\x80\xA2\xE2\x80\xA2",
ax_select->StringValue().Utf8());
}
} // namespace blink
......@@ -22,9 +22,6 @@ async_test((t) => {
["Blur", new Map([
["select", 1],
])],
["TextChanged", new Map([
["select", 2],
])],
["InvalidStatusChanged", new Map([
["select", 1],
])],
......@@ -41,9 +38,6 @@ async_test((t) => {
["Blur", new Map([
["AXRole: AXPopUpButton", 1],
])],
["TextChanged", new Map([
["AXRole: AXPopUpButton", 2],
])],
["InvalidStatusChanged", new Map([
["AXRole: AXPopUpButton", 1],
])],
......@@ -104,9 +98,9 @@ async_test((t) => {
}
if (expected_element_notifications.size == 0 &&
expected_global_notifications.size === 0) {
assert_equals(selectNotificationCount, 5);
assert_equals(selectNotificationCount, 3);
assert_equals(sliderNotificationCount, 2);
assert_equals(globalNotificationCount, 7);
assert_equals(globalNotificationCount, 5);
accessibilityController.removeNotificationListener();
select.removeNotificationListener();
slider.removeNotificationListener();
......
......@@ -65,6 +65,7 @@ Input before setting suggested values:
| "TX"
| <shadow:root>
| <div>
| aria-hidden="true"
| <slot>
| name="user-agent-custom-assign-slot"
| "input.value: initial value"
......@@ -155,6 +156,7 @@ Input after setting suggestedValue:
| "TX"
| <shadow:root>
| <div>
| aria-hidden="true"
| "TX"
| <slot>
| name="user-agent-custom-assign-slot"
......@@ -244,6 +246,7 @@ After resetting suggestedValue value:
| "TX"
| <shadow:root>
| <div>
| aria-hidden="true"
| <slot>
| name="user-agent-custom-assign-slot"
| "input.value: initial value"
......
......@@ -91,6 +91,7 @@ instead of "initial value".
| "inserted value"
| <shadow:root>
| <div>
| aria-hidden="true"
| "initial value"
| <slot>
| name="user-agent-custom-assign-slot"
......
......@@ -7,8 +7,8 @@ C
layer at (0,0) size 31x20
LayoutBlockFlow (positioned) {DIV} at (8,50) size 31x20
LayoutMenuList {SELECT} at (0,0) size 31x20 [bgcolor=#DDDDDD] [border: (1px solid #767676)]
LayoutBlockFlow (anonymous) at (1,1) size 29x18
LayoutText (anonymous) at (4,1) size 9x16
LayoutBlockFlow {DIV} at (1,1) size 29x18
LayoutText {#text} at (4,1) size 9x16
text run at (4,1) width 9: "C"
LayoutText {#text} at (0,0) size 0x0
......@@ -116,6 +116,13 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"childNodeIndexes": [
9
],
"attributes": [
{
"name": "aria-hidden",
"value": "true"
}
],
"layoutNodeIndex": 5,
"shadowRootType": "user-agent"
},
{
......@@ -123,6 +130,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"nodeName": "#text",
"nodeValue": "Option 1",
"backendNodeId": "<number>",
"layoutNodeIndex": 6,
"shadowRootType": "user-agent"
},
{
......@@ -193,7 +201,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"nodeName": "#text",
"nodeValue": "\n ",
"backendNodeId": "<number>",
"layoutNodeIndex": 5
"layoutNodeIndex": 7
},
{
"nodeType": 1,
......@@ -214,7 +222,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"value": "InputValue"
}
],
"layoutNodeIndex": 6,
"layoutNodeIndex": 8,
"isClickable": true
},
{
......@@ -225,7 +233,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"childNodeIndexes": [
18
],
"layoutNodeIndex": 7,
"layoutNodeIndex": 9,
"shadowRootType": "user-agent",
"isClickable": true
},
......@@ -234,7 +242,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"nodeName": "#text",
"nodeValue": "InputValue",
"backendNodeId": "<number>",
"layoutNodeIndex": 8,
"layoutNodeIndex": 10,
"shadowRootType": "user-agent",
"isClickable": true
},
......@@ -243,7 +251,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"nodeName": "#text",
"nodeValue": "\n ",
"backendNodeId": "<number>",
"layoutNodeIndex": 9
"layoutNodeIndex": 11
},
{
"nodeType": 1,
......@@ -268,7 +276,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"value": "ButtonValue"
}
],
"layoutNodeIndex": 10,
"layoutNodeIndex": 12,
"isClickable": true
},
{
......@@ -276,7 +284,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"nodeName": "#text",
"nodeValue": "ButtonValue",
"backendNodeId": "<number>",
"layoutNodeIndex": 11,
"layoutNodeIndex": 13,
"shadowRootType": "user-agent"
},
{
......@@ -284,7 +292,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"nodeName": "#text",
"nodeValue": "\n ",
"backendNodeId": "<number>",
"layoutNodeIndex": 12
"layoutNodeIndex": 14
},
{
"nodeType": 1,
......@@ -311,7 +319,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"value": ""
}
],
"layoutNodeIndex": 13,
"layoutNodeIndex": 15,
"isClickable": true
},
{
......@@ -319,7 +327,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"nodeName": "#text",
"nodeValue": "\n ",
"backendNodeId": "<number>",
"layoutNodeIndex": 14
"layoutNodeIndex": 16
},
{
"nodeType": 1,
......@@ -338,7 +346,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"value": "radio"
}
],
"layoutNodeIndex": 15,
"layoutNodeIndex": 17,
"isClickable": true
},
{
......@@ -346,7 +354,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"nodeName": "#text",
"nodeValue": "\n ",
"backendNodeId": "<number>",
"layoutNodeIndex": 16
"layoutNodeIndex": 18
},
{
"nodeType": 1,
......@@ -373,7 +381,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"value": ""
}
],
"layoutNodeIndex": 17,
"layoutNodeIndex": 19,
"isClickable": true
},
{
......@@ -381,7 +389,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"nodeName": "#text",
"nodeValue": "\n ",
"backendNodeId": "<number>",
"layoutNodeIndex": 18
"layoutNodeIndex": 20
},
{
"nodeType": 1,
......@@ -404,7 +412,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"value": ""
}
],
"layoutNodeIndex": 19,
"layoutNodeIndex": 21,
"isClickable": true
},
{
......@@ -412,7 +420,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"nodeName": "#text",
"nodeValue": "\n ",
"backendNodeId": "<number>",
"layoutNodeIndex": 20
"layoutNodeIndex": 22
},
{
"nodeType": 1,
......@@ -429,7 +437,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"value": "TextArea"
}
],
"layoutNodeIndex": 21
"layoutNodeIndex": 23
},
{
"nodeType": 1,
......@@ -439,7 +447,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"childNodeIndexes": [
33
],
"layoutNodeIndex": 22,
"layoutNodeIndex": 24,
"shadowRootType": "user-agent",
"isClickable": true
},
......@@ -448,7 +456,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"nodeName": "#text",
"nodeValue": "TextAreaValue",
"backendNodeId": "<number>",
"layoutNodeIndex": 23,
"layoutNodeIndex": 25,
"shadowRootType": "user-agent",
"isClickable": true
},
......@@ -457,7 +465,7 @@ Tests DOMSnapshot.getSnapshot method returning input values.
"nodeName": "#text",
"nodeValue": "\n",
"backendNodeId": "<number>",
"layoutNodeIndex": 24
"layoutNodeIndex": 26
},
{
"nodeType": 3,
......
......@@ -16,8 +16,8 @@ layer at (0,0) size 800x600
text run at (0,0) width 22: "abc"
LayoutBR {BR} at (22,15) size 0x0
LayoutMenuList {SELECT} at (0,20) size 233x20 [bgcolor=#DDDDDD] [border: (1px solid #767676)]
LayoutBlockFlow (anonymous) at (1,1) size 231x18
LayoutText (anonymous) at (4,1) size 211x16
LayoutBlockFlow {DIV} at (1,1) size 231x18
LayoutText {#text} at (4,1) size 211x16
text run at (4,1) width 211: "this select box shouldn't be selected"
LayoutText {#text} at (0,0) size 0x0
selection start: position 1 of child 0 {#text} of child 3 {DIV} of body
......
......@@ -7,8 +7,8 @@ C
layer at (0,0) size 31x20
LayoutNGBlockFlow (positioned) {DIV} at (8,50) size 31x20
LayoutMenuList {SELECT} at (0,0) size 31x20 [bgcolor=#DDDDDD] [border: (1px solid #767676)]
LayoutBlockFlow (anonymous) at (1,1) size 29x18
LayoutText (anonymous) at (4,1) size 9x16
LayoutBlockFlow {DIV} at (1,1) size 29x18
LayoutText {#text} at (4,1) size 9x16
text run at (4,1) width 9: "C"
LayoutText {#text} at (0,0) size 0x0
......@@ -7,8 +7,8 @@ C
layer at (0,0) size 31x20
LayoutNGBlockFlow (positioned) {DIV} at (8,50) size 31x20
LayoutMenuList {SELECT} at (0,0) size 31x20 [bgcolor=#DDDDDD] [border: (1px solid #A9A9A9)]
LayoutBlockFlow (anonymous) at (1,1) size 29x18
LayoutText (anonymous) at (4,1) size 9x16
LayoutBlockFlow {DIV} at (1,1) size 29x18
LayoutText {#text} at (4,1) size 9x16
text run at (4,1) width 9: "C"
LayoutText {#text} at (0,0) size 0x0
......@@ -16,8 +16,8 @@ layer at (0,0) size 800x600
text run at (0,0) width 23: "abc"
LayoutBR {BR} at (22,14) size 1x0
LayoutMenuList {SELECT} at (0,18) size 215x18 [bgcolor=#F8F8F8]
LayoutBlockFlow (anonymous) at (0,0) size 215x18
LayoutText (anonymous) at (8,2) size 184x13
LayoutBlockFlow {DIV} at (0,0) size 215x18
LayoutText {#text} at (8,2) size 184x13
text run at (8,2) width 184: "this select box shouldn't be selected"
LayoutText {#text} at (0,0) size 0x0
selection start: position 1 of child 0 {#text} of child 3 {DIV} of body
......
......@@ -7,8 +7,8 @@ C
layer at (0,0) size 40x18
LayoutBlockFlow (positioned) {DIV} at (8,50) size 40x18
LayoutMenuList {SELECT} at (0,0) size 40x18 [bgcolor=#F8F8F8]
LayoutBlockFlow (anonymous) at (0,0) size 40x18
LayoutText (anonymous) at (8,2) size 9x13
LayoutBlockFlow {DIV} at (0,0) size 40x18
LayoutText {#text} at (8,2) size 9x13
text run at (8,2) width 9: "C"
LayoutText {#text} at (0,0) size 0x0
......@@ -16,8 +16,8 @@ layer at (0,0) size 800x600
text run at (0,0) width 23: "abc"
LayoutBR {BR} at (22,14) size 1x0
LayoutMenuList {SELECT} at (0,18) size 224x18 [bgcolor=#F8F8F8]
LayoutBlockFlow (anonymous) at (0,0) size 224x18
LayoutText (anonymous) at (8,2) size 193x13
LayoutBlockFlow {DIV} at (0,0) size 224x18
LayoutText {#text} at (8,2) size 193x13
text run at (8,2) width 193: "this select box shouldn't be selected"
LayoutText {#text} at (0,0) size 0x0
selection start: position 1 of child 0 {#text} of child 3 {DIV} of body
......
......@@ -7,8 +7,8 @@ C
layer at (0,0) size 39x18
LayoutBlockFlow (positioned) {DIV} at (8,50) size 39x18
LayoutMenuList {SELECT} at (0,0) size 39x18 [bgcolor=#F8F8F8]
LayoutBlockFlow (anonymous) at (0,0) size 39x18
LayoutText (anonymous) at (8,2) size 8x13
LayoutBlockFlow {DIV} at (0,0) size 39x18
LayoutText {#text} at (8,2) size 8x13
text run at (8,2) width 8: "C"
LayoutText {#text} at (0,0) size 0x0
......@@ -17,8 +17,8 @@ layer at (0,0) size 800x600
text run at (0,0) width 22: "abc"
LayoutBR {BR} at (22,15) size 0x0
LayoutMenuList {SELECT} at (0,20) size 235x20 [bgcolor=#FFFFFF] [border: (1px solid #767676)]
LayoutBlockFlow (anonymous) at (1,1) size 233x18
LayoutText (anonymous) at (4,1) size 211x16
LayoutBlockFlow {DIV} at (1,1) size 233x18
LayoutText {#text} at (4,1) size 211x16
text run at (4,1) width 211: "this select box shouldn't be selected"
LayoutText {#text} at (0,0) size 0x0
selection start: position 1 of child 0 {#text} of child 3 {DIV} of body
......
......@@ -7,8 +7,8 @@ C
layer at (0,0) size 33x20
LayoutNGBlockFlow (positioned) {DIV} at (8,50) size 33x20
LayoutMenuList {SELECT} at (0,0) size 33x20 [bgcolor=#FFFFFF] [border: (1px solid #767676)]
LayoutBlockFlow (anonymous) at (1,1) size 31x18
LayoutText (anonymous) at (4,1) size 9x16
LayoutBlockFlow {DIV} at (1,1) size 31x18
LayoutText {#text} at (4,1) size 9x16
text run at (4,1) width 9: "C"
LayoutText {#text} at (0,0) size 0x0
......@@ -82,6 +82,7 @@ instead of "initial value".
| "inserted value"
| <shadow:root>
| <div>
| aria-hidden="true"
| "initial value"
| <slot>
| name="user-agent-custom-assign-slot"
......
......@@ -7,8 +7,8 @@ C
layer at (0,0) size 33x20
LayoutNGBlockFlow (positioned) {DIV} at (8,50) size 33x20
LayoutMenuList {SELECT} at (0,0) size 33x20 [bgcolor=#FFFFFF] [border: (1px solid #A9A9A9)]
LayoutBlockFlow (anonymous) at (1,1) size 31x18
LayoutText (anonymous) at (4,1) size 9x16
LayoutBlockFlow {DIV} at (1,1) size 31x18
LayoutText {#text} at (4,1) size 9x16
text run at (4,1) width 9: "C"
LayoutText {#text} at (0,0) size 0x0
......@@ -91,6 +91,7 @@ instead of "initial value".
| "inserted value"
| <shadow:root>
| <div>
| aria-hidden="true"
| "initial value"
| <slot>
| name="user-agent-custom-assign-slot"
......
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