Bug 208570

Summary: frame/iframe scrolling attribute does to recognize value "noscroll" or "off"
Product: WebKit Reporter: Frédéric Wang (:fredw) <fred.wang>
Component: DOMAssignee: Frédéric Wang (:fredw) <fred.wang>
Severity: Normal CC: cdumez, commit-queue, esprehn+autocc, ews-watchlist, fred.wang, gyuyoung.kim, masonfreed, mjs, rbuis, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar, WebExposed
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 209178    
Bug Blocks:    
Description Flags
WIP Patch
Patch none

Description Frédéric Wang (:fredw) 2020-03-04 03:08:00 PST
From https://html.spec.whatwg.org/multipage/rendering.html#the-page:

> If a Document's browsing context is a child browsing context, the container of that browsing context is a frame or iframe element, that element has a scrolling attribute, and that attribute's value is an ASCII case-insensitive match for the string "off", "noscroll", or "no", then the user agent is expected to prevent any scrollbars from being shown for the viewport of the Document's browsing context, regardless of the 'overflow' property that applies to that viewport.

Source/WebCore/html/HTMLFrameElementBase.cpp only handles "no":

ScrollbarMode HTMLFrameElementBase::scrollingMode() const
    return equalLettersIgnoringASCIICase(attributeWithoutSynchronization(scrollingAttr), "no")
        ? ScrollbarAlwaysOff : ScrollbarAuto;

Gecko recognizes the three values and Chromium added support for them after fixing https://bugs.chromium.org/p/chromium/issues/detail?id=1057454

WPT test was added in https://chromium-review.googlesource.com/c/chromium/src/+/2085396
Comment 1 Frédéric Wang (:fredw) 2020-03-04 23:39:23 PST
This should be trivial fix. I can take care of this.
Comment 2 Frédéric Wang (:fredw) 2020-03-05 02:19:04 PST
Created attachment 392550 [details]
WIP Patch

WPT tests haven't arrived yet into the WPT repos, so we need to wait before taking this...
Comment 3 Mason Freed 2020-03-05 09:42:18 PST
WPT tests are hung up here: https://github.com/web-platform-tests/wpt/pull/22072
Comment 4 Simon Fraser (smfr) 2020-03-17 13:26:20 PDT
Are "off", "noscroll", or "no" synonymous?
Comment 5 Frédéric Wang (:fredw) 2020-03-17 14:18:03 PDT
(In reply to Simon Fraser (smfr) from comment #4)
> Are "off", "noscroll", or "no" synonymous?

In HTML5, yes (see comment 0).

Maybe this was different in HTML4.
Comment 6 Frédéric Wang (:fredw) 2020-03-18 00:27:37 PDT
Created attachment 393825 [details]
Comment 7 Rob Buis 2020-03-18 09:48:48 PDT
Comment on attachment 393825 [details]

Approved also since Maciej indicated it as a reasonable change.
Comment 8 WebKit Commit Bot 2020-03-18 11:12:43 PDT
Comment on attachment 393825 [details]

Clearing flags on attachment: 393825

Committed r258651: <https://trac.webkit.org/changeset/258651>
Comment 9 WebKit Commit Bot 2020-03-18 11:12:45 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2020-03-18 11:13:14 PDT