Changeset 293028 in webkit


Ignore:
Timestamp:
Apr 19, 2022 11:23:50 AM (3 months ago)
Author:
ntim@apple.com
Message:

user-select: none shouldn't affect editability
https://bugs.webkit.org/show_bug.cgi?id=118009

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-ui/user-select-none-in-editable-expected.txt: Added.
  • web-platform-tests/css/css-ui/user-select-none-in-editable.html: Added.
  • web-platform-tests/css/css-ui/user-select-none-on-input-expected.txt: Added.
  • web-platform-tests/css/css-ui/user-select-none-on-input.html: Added.

Source/WebCore:

Tests: editing/selection/user-select-js-property.html

imported/w3c/web-platform-tests/css/css-ui/user-select-none-in-editable.html
imported/w3c/web-platform-tests/css/css-ui/user-select-none-on-input.html

Change effectiveUserSelect to take in account -webkit-user-modify.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::effectiveUserSelect const):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::effectiveUserSelect const): Deleted.

LayoutTests:

  • Removed tests that were testing old behavior
  • Added new tests for new behavior (imported from the Blink codebase)
  • editing/selection/4866671.html: Removed.
  • editing/selection/5779984-1-expected.txt: Removed.
  • editing/selection/5779984-1.html: Removed.
  • editing/selection/user-select-js-property-expected.txt: Added.
  • editing/selection/user-select-js-property.html: Added.
  • platform/gtk/editing/selection/4866671-expected.png: Removed.
  • platform/gtk/editing/selection/4866671-expected.txt: Removed.
  • platform/ios/TestExpectations:
  • platform/ios/editing/selection/4866671-expected.txt: Removed.
  • platform/mac/editing/selection/4866671-expected.png: Removed.
  • platform/mac/editing/selection/4866671-expected.txt: Removed.
  • platform/win/editing/selection/4866671-expected.txt: Removed.
  • platform/wincairo/editing/selection/4866671-expected.txt: Removed.
Location:
trunk
Files:
6 added
10 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r293012 r293028  
     12022-04-19  Tim Nguyen  <ntim@apple.com>
     2
     3        user-select: none shouldn't affect editability
     4        https://bugs.webkit.org/show_bug.cgi?id=118009
     5
     6        Reviewed by Antti Koivisto.
     7
     8        - Removed tests that were testing old behavior
     9        - Added new tests for new behavior (imported from the Blink codebase)
     10
     11        * editing/selection/4866671.html: Removed.
     12        * editing/selection/5779984-1-expected.txt: Removed.
     13        * editing/selection/5779984-1.html: Removed.
     14        * editing/selection/user-select-js-property-expected.txt: Added.
     15        * editing/selection/user-select-js-property.html: Added.
     16        * platform/gtk/editing/selection/4866671-expected.png: Removed.
     17        * platform/gtk/editing/selection/4866671-expected.txt: Removed.
     18        * platform/ios/TestExpectations:
     19        * platform/ios/editing/selection/4866671-expected.txt: Removed.
     20        * platform/mac/editing/selection/4866671-expected.png: Removed.
     21        * platform/mac/editing/selection/4866671-expected.txt: Removed.
     22        * platform/win/editing/selection/4866671-expected.txt: Removed.
     23        * platform/wincairo/editing/selection/4866671-expected.txt: Removed.
     24
    1252022-04-19  Tim Nguyen  <ntim@apple.com>
    226
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r293021 r293028  
     12022-04-19  Tim Nguyen  <ntim@apple.com>
     2
     3        user-select: none shouldn't affect editability
     4        https://bugs.webkit.org/show_bug.cgi?id=118009
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * web-platform-tests/css/css-ui/user-select-none-in-editable-expected.txt: Added.
     9        * web-platform-tests/css/css-ui/user-select-none-in-editable.html: Added.
     10        * web-platform-tests/css/css-ui/user-select-none-on-input-expected.txt: Added.
     11        * web-platform-tests/css/css-ui/user-select-none-on-input.html: Added.
     12
    1132022-04-19  Joseph Griego  <jgriego@igalia.com>
    214
  • trunk/LayoutTests/platform/ios/TestExpectations

    r293012 r293028  
    10411041imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/maxlength-number.html [ Skip ]
    10421042imported/w3c/web-platform-tests/html/semantics/forms/the-input-element/radio-double-activate-pseudo.html [ Skip ]
     1043imported/w3c/web-platform-tests/css/css-ui/user-select-none-on-input.html [ Skip ]
    10431044
    10441045# Tests that use EventSender's mouseMoveTo, mouseUp and mouseDown
  • trunk/Source/WebCore/ChangeLog

    r293027 r293028  
     12022-04-19  Tim Nguyen  <ntim@apple.com>
     2
     3        user-select: none shouldn't affect editability
     4        https://bugs.webkit.org/show_bug.cgi?id=118009
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Tests: editing/selection/user-select-js-property.html
     9               imported/w3c/web-platform-tests/css/css-ui/user-select-none-in-editable.html
     10               imported/w3c/web-platform-tests/css/css-ui/user-select-none-on-input.html
     11
     12        Change `effectiveUserSelect` to take in account `-webkit-user-modify`.
     13
     14        * rendering/style/RenderStyle.cpp:
     15        (WebCore::RenderStyle::effectiveUserSelect const):
     16        * rendering/style/RenderStyle.h:
     17        (WebCore::RenderStyle::effectiveUserSelect const): Deleted.
     18
    1192022-04-19  Antti Koivisto  <antti@apple.com>
    220
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r292840 r293028  
    29132913}
    29142914
     2915UserSelect RenderStyle::effectiveUserSelect() const
     2916{
     2917    if (effectiveInert())
     2918        return UserSelect::None;
     2919
     2920    auto value = userSelect();
     2921    if (userModify() != UserModify::ReadOnly && userDrag() != UserDrag::Element)
     2922        return value == UserSelect::None ? UserSelect::Text : value;
     2923
     2924    return value;
     2925}
    29152926
    29162927} // namespace WebCore
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r292467 r293028  
    628628    UserModify userModify() const { return static_cast<UserModify>(m_rareInheritedData->userModify); }
    629629    UserDrag userDrag() const { return static_cast<UserDrag>(m_rareNonInheritedData->userDrag); }
    630     UserSelect effectiveUserSelect() const { return effectiveInert() ? UserSelect::None : userSelect(); }
     630    WEBCORE_EXPORT UserSelect effectiveUserSelect() const;
    631631    UserSelect userSelect() const { return static_cast<UserSelect>(m_rareInheritedData->userSelect); }
    632632    TextOverflow textOverflow() const { return static_cast<TextOverflow>(m_rareNonInheritedData->textOverflow); }
Note: See TracChangeset for help on using the changeset viewer.