Skip to content

Rendering of <iframe frameborder=none> #11098

@zcorpan

Description

@zcorpan

What is the issue with the HTML Standard?

Gecko has a webcompat issue (https://bugzilla.mozilla.org/show_bug.cgi?id=1951068) about <iframe frameborder=none>, which in Gecko and per spec results in the default iframe border being shown. In WebKit and Chromium, no border is shown.

The spec has:

The following CSS rules are expected to apply as presentational hints:
iframe[frameborder='0'], iframe[frameborder=no i] { border: none; }

https://html.spec.whatwg.org/#attributes-for-embedded-content-and-images

WebKit and Chromium parse the value as an HTML signed integer and remove the border (via preshint) if the parsed value was zero (or error), as far as I can tell.

WebKit:
https://github.com/WebKit/WebKit/blob/75f68af5e660a28446d188bf1c450d524ac594f1/Source/WebCore/html/HTMLIFrameElement.cpp#L112-L119

Chromium:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/html_iframe_element.cc;l=147-160?q=htmliframeelement&ss=chromium

It seems to me the spec and Gecko should align with WebKit/Chromium.

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatStandard is not web compatible or proprietary feature needs standardizingtopic: rendering

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions