Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5c7f87f8da391622fe1cd4d26e99baa86c14c514
https://github.com/WebKit/WebKit/commit/5c7f87f8da391622fe1cd4d26e99baa86c14c514
Author: Franco Vieira de Souza <[email protected]>
Date: 2026-08-14 (Fri, 14 Aug 2026)
Changed paths:
A LayoutTests/editing/selection/user-select-in-text-control-expected.txt
A LayoutTests/editing/selection/user-select-in-text-control.html
M Source/WebCore/html/HTMLTextFormControlElement.cpp
M Source/WebCore/html/shadow/TextControlInnerElements.cpp
M Source/WebCore/style/StyleAdjuster.cpp
M Source/WebCore/style/StyleAdjuster.h
M Source/WebCore/style/StyleDifference.cpp
M Source/WebCore/style/computed/StyleComputedStyle.cpp
M Source/WebCore/style/computed/StyleComputedStyleBase+SettersInlines.h
M Source/WebCore/style/computed/StyleComputedStyleBase.h
M Source/WebCore/style/computed/data/StyleInheritedRareData.cpp
M Source/WebCore/style/computed/data/StyleInheritedRareData.h
Log Message:
-----------
[CSS] Add Style::InheritedRareData::usedUserSelect
https://bugs.webkit.org/show_bug.cgi?id=321737
rdar://184867143
Reviewed by Megan Gardner and Tim Nguyen.
This patch adds `Style::InheritedRareData::usedUserSelect` as the source
of truth for `usedUserSelect()``, which used to read
`Style::InheritedRareData::webkitUserSelect` instead. This is only
plumbing for a future `-webkit-user-select` unprefixing effort:
`usedUserSelect` and `webkitUserSelect` here should always remain in
sync, so no changes is behavior are expected.
usedUserSelect is updated by `Adjuster::adjustUsedUserSelect()`, called by
`Adjuster::adjust()`. For cases in which `resolveCustomStyle()` might
cause `adjust()` to be skipped, `adjustUsedUserSelect()` is called
manually (on TextControlInnerElement and HTMLTextFormControlElement).
Test coverage was added specifically for this.
Tests: editing/selection/user-select-in-text-control.html
* LayoutTests/editing/selection/user-select-in-text-control-expected.txt: Added.
* LayoutTests/editing/selection/user-select-in-text-control.html: Added.
* Source/WebCore/html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const):
* Source/WebCore/html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerElement::resolveCustomStyle):
* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjust const):
(WebCore::Style::Adjuster::adjustUsedUserSelect const):
* Source/WebCore/style/StyleAdjuster.h:
* Source/WebCore/style/StyleDifference.cpp:
* Source/WebCore/style/computed/StyleComputedStyle.cpp:
(WebCore::Style::ComputedStyle::usedUserSelect const):
* Source/WebCore/style/computed/StyleComputedStyleBase+SettersInlines.h:
(WebCore::Style::ComputedStyleBase::setUsedUserSelect):
* Source/WebCore/style/computed/StyleComputedStyleBase.h:
* Source/WebCore/style/computed/data/StyleInheritedRareData.cpp:
(WebCore::Style::InheritedRareData::InheritedRareData):
(WebCore::Style::InheritedRareData::operator== const):
(WebCore::Style::InheritedRareData::dumpDifferences const):
* Source/WebCore/style/computed/data/StyleInheritedRareData.h:
temp
Canonical link: https://commits.webkit.org/319199@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications