Changeset 271446 in webkit
- Timestamp:
- Jan 13, 2021, 11:20:42 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/dom/focus-style-resolution-attribute-change-expected.html (added)
-
LayoutTests/fast/dom/focus-style-resolution-attribute-change.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/Element.cpp (modified) (1 diff)
-
Source/WebCore/dom/Node.cpp (modified) (1 diff)
-
Source/WebCore/html/InputType.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r271444 r271446 1 2021-01-13 Antti Koivisto <antti@apple.com> 2 3 REGRESSION (r257839): Broken focus when 'display' changes in an attribute selector 4 https://bugs.webkit.org/show_bug.cgi?id=217240 5 <rdar://problem/69891684> 6 7 Reviewed by Wenson Hsieh. 8 9 * fast/dom/focus-style-resolution-attribute-change-expected.html: Added. 10 * fast/dom/focus-style-resolution-attribute-change.html: Added. 11 1 12 2021-01-13 Kenneth Russell <kbr@chromium.org> 2 13 -
trunk/Source/WebCore/ChangeLog
r271444 r271446 1 2021-01-13 Antti Koivisto <antti@apple.com> 2 3 REGRESSION (r257839): Broken focus when 'display' changes in an attribute selector 4 https://bugs.webkit.org/show_bug.cgi?id=217240 5 <rdar://problem/69891684> 6 7 Reviewed by Wenson Hsieh. 8 9 Focus optimization that avoids full style resolution when setting focus in unrendered subtrees 10 misbehaves when the style is invalidated via an attribute change. 11 12 Test case by Ali Juma. 13 14 Test: fast/dom/focus-style-resolution-attribute-change.html 15 16 * dom/Element.cpp: 17 (WebCore::Element::invalidateStyle): 18 * dom/Node.cpp: 19 (WebCore::Node::invalidateStyle): 20 21 We need to set the computed style invalidity bit on all style invalidation code paths. 22 23 * html/InputType.cpp: 24 (WebCore::InputType::setValue): 25 26 Don't invalidate style when nothing changes. 27 1 28 2021-01-13 Kenneth Russell <kbr@chromium.org> 2 29 -
trunk/Source/WebCore/dom/Element.cpp
r271439 r271446 1967 1967 Node::invalidateStyle(Style::Validity::ElementInvalid); 1968 1968 invalidateSiblingsIfNeeded(*this); 1969 1970 // FIXME: This flag should be set whenever styles are invalidated while computed styles are present,1971 // not just in this codepath.1972 setNodeFlag(NodeFlag::IsComputedStyleInvalidFlag);1973 1969 } 1974 1970 -
trunk/Source/WebCore/dom/Node.cpp
r269946 r271446 891 891 return; 892 892 893 // FIXME: This should be set on all descendants in case of a subtree invalidation. 894 setNodeFlag(NodeFlag::IsComputedStyleInvalidFlag); 895 893 896 // FIXME: Why the second condition? 894 897 bool markAncestors = styleValidity() == Style::Validity::Valid || validity == Style::Validity::SubtreeAndRenderersInvalid; -
trunk/Source/WebCore/html/InputType.cpp
r269587 r271446 657 657 ASSERT(element()); 658 658 element()->setValueInternal(sanitizedValue, eventBehavior); 659 element()->invalidateStyleForSubtree();660 659 if (!valueChanged) 661 660 return; 661 element()->invalidateStyleForSubtree(); 662 662 663 663 switch (eventBehavior) {
Note:
See TracChangeset
for help on using the changeset viewer.