Make "overflow: overlay" a synonym for "overflow: auto"
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Sep 2018 18:42:25 +0000 (18:42 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Sep 2018 18:42:25 +0000 (18:42 +0000)
commit357be097c774feebda3a2b7dd74164e3569483e5
tree82c3730f18330b44da0076ef3f64cb743c2820fa
parent88cdc62116534cf7df9976e17758bb4379900f27
Make "overflow: overlay" a synonym for "overflow: auto"
https://bugs.webkit.org/show_bug.cgi?id=189811

Source/WebCore:

Reviewed by Zalan Bujtas.

The "overlay" value for overflow was added for an internal Safari feature, and only has
an effect (allow the scrollbar to overlap the content) with legacy scrollbars on macOS.
It's little used on the web.

To simplify code in rendering, just make "overflow: overlay" behave like "overflow: auto".
It's still parsed, but turns into an "auto" value internally, and will be returned from getComputedStyle
as "auto".

Test: fast/css/getComputedStyle/getComputedStyle-overflow.html

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator Overflow const):
* css/CSSProperties.json:
* css/CSSValueKeywords.in:
* css/StyleResolver.cpp:
(WebCore::isScrollableOverflow):
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
* page/ios/FrameIOS.mm:
(WebCore::Frame::nodeRespondingToScrollWheelEvents):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::hasVerticalScrollbarWithAutoBehavior const):
(WebCore::RenderBox::hasHorizontalScrollbarWithAutoBehavior const):
* rendering/RenderLayer.cpp:
(WebCore::styleDefinesAutomaticScrollbar):
* rendering/RenderLayerCompositor.cpp:
(WebCore::isScrollableOverflow):
* rendering/style/RenderStyleConstants.h:

Source/WebInspectorUI:

Reviewed by Zalan Bujtas.

Remove "overlay" from the overflow values.

* UserInterface/Models/CSSKeywordCompletions.js:
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WI.VisualStyleDetailsPanel.prototype._populateDisplaySection):

LayoutTests:

Reviewed by Zalan Bujtas.

Add a modern CSS parsing/computed style test for overflow, superseding
fast/css/overflow-property.html.

* fast/css/getComputedStyle/getComputedStyle-overflow-expected.txt: Added.
* fast/css/getComputedStyle/getComputedStyle-overflow.html: Added.
* fast/css/overflow-property-expected.txt: Removed.
* fast/css/overflow-property.html: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236341 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/getComputedStyle/getComputedStyle-overflow-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/getComputedStyle/getComputedStyle-overflow.html [new file with mode: 0644]
LayoutTests/fast/css/overflow-property-expected.txt [deleted file]
LayoutTests/fast/css/overflow-property.html [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSProperties.json
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/parser/CSSParserFastPaths.cpp
Source/WebCore/page/ios/FrameIOS.mm
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/style/RenderStyleConstants.h
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js