Intent to Deprecate and Remove: Support for <applet>

334 views
Skip to first unread message

Daniel Cheng

unread,
Aug 12, 2015, 6:57:57 PM8/12/15
to blink-dev

Jochen Eisinger

unread,
Aug 12, 2015, 6:58:53 PM8/12/15
to Daniel Cheng, blink-dev
lgtm

Rick Byers

unread,
Aug 12, 2015, 7:00:13 PM8/12/15
to Jochen Eisinger, Daniel Cheng, blink-dev
LGTM2

Chris Harrelson

unread,
Aug 12, 2015, 7:03:42 PM8/12/15
to Rick Byers, Jochen Eisinger, Daniel Cheng, blink-dev
LGTM3!

LGTM2
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

PhistucK

unread,
Aug 13, 2015, 2:16:18 AM8/13/15
to Chris Harrelson, Rick Byers, Jochen Eisinger, Daniel Cheng, blink-dev
Obsolete features must not be used by authors, but must be implemented by vendors, as far as I know
Removing the interface and all of its properties (what about document.applets?) may be problematic. Do you have any usage data?


PhistucK

Daniel Cheng

unread,
Aug 13, 2015, 2:47:18 AM8/13/15
to PhistucK, Chris Harrelson, Rick Byers, Jochen Eisinger, blink-dev
I'm currently experimenting with a patch which removes it altogether just to see what the impact would be. Among other things:

- document.applets and window.applets would only return <OBJECT> tags that are applets, and not <APPLET> tags.
- The HTMLAppletElement constructor would be removed.
- Named access on the window object would no longer lookup <APPLET> tags by name.

So there are definitely some web visible effects....

The good thing is I was wrong about the use counter: there is a use counter [1] for <APPLET> and it shows that usage is already well under <0.01% and dropping. So I think that removing this will have minimal effect on the web ecosystem, even with the changes above.

Daniel

PhistucK

unread,
Aug 13, 2015, 2:53:54 AM8/13/15
to Daniel Cheng, Chris Harrelson, Rick Byers, Jochen Eisinger, blink-dev
A use counter for <applet> is one thing, but what about the interface itself and its members? Perhaps it is used for a browser-through-a-faulty-feature detection (for example, detection of Internet Explorer 8 and other relatively modern browsers with interfaces), who knows.


PhistucK

Philip Jägenstedt

unread,
Aug 13, 2015, 7:24:16 AM8/13/15
to Daniel Cheng, PhistucK, Chris Harrelson, Rick Byers, Jochen Eisinger, blink-dev
LGTM4, but can you also file a spec bug to have it removed from HTML? https://whatwg.org/newbug

Philip Rogers

unread,
Aug 13, 2015, 1:57:28 PM8/13/15
to Philip Jägenstedt, Daniel Cheng, PhistucK, Chris Harrelson, Rick Byers, Jochen Eisinger, blink-dev
Our standard release process should be sufficient to catch browser sniffing bugs caused by the removal of these apis. I think it's unlikely this will break anything.

Elliott Sprehn

unread,
Aug 21, 2015, 5:52:44 AM8/21/15
to Philip Rogers, Philip Jägenstedt, Daniel Cheng, PhistucK, Chris Harrelson, Rick Byers, Jochen Eisinger, blink-dev
On Thu, Aug 13, 2015 at 10:57 AM, Philip Rogers <p...@chromium.org> wrote:
Our standard release process should be sufficient to catch browser sniffing bugs caused by the removal of these apis. I think it's unlikely this will break anything.

This will break the layout of the pages using the applet element, removing all support means we won't support the presentation attributes which likely causes lots of pages with fallback content to look busted. ex. width/height attributes would stop working.

I don't think we should remove *all* support like this.

- E

Daniel Cheng

unread,
Aug 21, 2015, 11:36:40 AM8/21/15
to Elliott Sprehn, Philip Rogers, Philip Jägenstedt, PhistucK, Chris Harrelson, Rick Byers, Jochen Eisinger, blink-dev
My understanding is that presentation attributes do not apply to fallback content. I wasn't able to confirm this in Firefox (I could only get it to display various plugin placeholders), but Safari seems to follow this.

Daniel

Alex Russell

unread,
Aug 21, 2015, 1:04:55 PM8/21/15
to Elliott Sprehn, Philip Rogers, Philip Jägenstedt, Daniel Cheng, PhistucK, Chris Harrelson, Rick Byers, Jochen Eisinger, blink-dev
I think we should remove support, but only when we have the usecounter data back to show it isn't going to break a lot of things.

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Daniel Cheng

unread,
Aug 21, 2015, 5:33:34 PM8/21/15
to Alex Russell, Elliott Sprehn, Chris Harrelson, Jochen Eisinger, Philip Jägenstedt, Philip Rogers, PhistucK, Rick Byers, blink-dev
I mentioned this earlier, but it might have been missed in the earlier replies: we do have a use counter for HTMLAppletElement, and it is well under 0.01%.

Daniel

Elliott Sprehn

unread,
Aug 22, 2015, 11:13:26 AM8/22/15
to Daniel Cheng, Philip Rogers, Philip Jägenstedt, PhistucK, Chris Harrelson, Rick Byers, Jochen Eisinger, blink-dev
On Fri, Aug 21, 2015 at 5:36 PM, Daniel Cheng <dch...@chromium.org> wrote:
My understanding is that presentation attributes do not apply to fallback content. I wasn't able to confirm this in Firefox (I could only get it to display various plugin placeholders), but Safari seems to follow this.


That's not what I see in Safari.

<applet code="" width="150" height="150" style="border: 1px solid red; display: block;">
    Hello World.
</applet>

Renders a 150px square, they definitely still respect the presentation attributes.

- E 

Will Harris

unread,
Aug 25, 2015, 12:35:58 PM8/25/15
to Elliott Sprehn, Daniel Cheng, Philip Rogers, Philip Jägenstedt, PhistucK, Chris Harrelson, Rick Byers, Jochen Eisinger, blink-dev
Hi - given the usage is so small (0.01%) and right now Chromium does not even display the fallback content at all, is this really something we should be adding more complexity to fix?

Will

Daniel Cheng

unread,
Aug 25, 2015, 2:48:39 PM8/25/15
to Elliott Sprehn, Philip Rogers, Philip Jägenstedt, PhistucK, Chris Harrelson, Rick Byers, Jochen Eisinger, blink-dev
Hmm: I didn't consider the interaction between the presentation attributes and display: block / display: inline-block.

That being said, given that:
- <applet> usage is super low
- display: block, display: inline-block, etc. have to be set

I think removing complete support will have a very very very small compatibility effect.

Daniel

Chris Harrelson

unread,
Aug 25, 2015, 2:56:33 PM8/25/15
to Daniel Cheng, Elliott Sprehn, Philip Rogers, Philip Jägenstedt, PhistucK, Rick Byers, Jochen Eisinger, blink-dev
One option to avoid this compatibility risk is to implement the presentation attributes on HTMLAppletElement (but still remove all other functionality). I think this should be straightforward by making HTMLAppletElement inherit from HTMLElement rather than HTMLPluginElement, and implement these methods on it:

    bool isPresentationAttribute(const QualifiedName&) const override;
    void collectStyleForPresentationAttribute(const QualifiedName&, const AtomicString&, MutableStylePropertySet*) override;

with an implementation copied from HTMLPluginElement. Then you could also keep the applet-specific user agent CSS also in html.css.

Chris

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Philip Jägenstedt

unread,
Aug 31, 2015, 11:07:52 AM8/31/15
to Chris Harrelson, Daniel Cheng, Elliott Sprehn, Philip Rogers, PhistucK, Rick Byers, Jochen Eisinger, blink-dev
Without more specific use counters we can't really say what the compat risk here is, but I would support an attempt to remove <applet> entirely, and revert to keeping some of it only if it proves necessary. To do the removal in two steps (the other path to complete removal) doesn't sound great, so if direct removal seems too risky, then more use counters would be a good alternative.

Philip Jägenstedt

unread,
Sep 1, 2015, 9:42:45 AM9/1/15
to Chris Harrelson, Daniel Cheng, Elliott Sprehn, Philip Rogers, PhistucK, Rick Byers, Jochen Eisinger, blink-dev
I've filed a spec issue: https://github.com/whatwg/html/issues/75

Chris Harrelson

unread,
Sep 1, 2015, 1:59:02 PM9/1/15
to Philip Jägenstedt, Daniel Cheng, Elliott Sprehn, Philip Rogers, PhistucK, Rick Byers, Jochen Eisinger, blink-dev
The API owners met today to discuss this Intent.

The consensus was that we should proceed with full removal of <applet>, without preserving special behavior of fallback
content in the presence of presentation attributes. We concluded that the risk stemming from that is seems small enough,
and is therefore outweighed by the complication of keeping around code and having to have a two-phase deprecation in
the future.

We also identified that the risk for enterprise deployments is higher, and so we will proactively reach out to enterprise
customers to make them aware of this change.

Thanks,
Chris

Domenic Denicola

unread,
Sep 1, 2015, 2:22:32 PM9/1/15
to Daniel Cheng, Elliott Sprehn, Philip Rogers, PhistucK, Rick Byers, Jochen Eisinger, blink-dev, Justin Rogers, Chris Harrelson, Philip Jägenstedt
In the spec discussion [1], Justin from the Edge team (CC'ed) mentioned:

> we are also willing to remove the element entirely. My main concerns are with parsing semantics. We want to ensure that when we remove the element itself, that the parser still does the correct thing. We had issues with BGSOUND when we removed it that come to mind.

Daniel, what were your plans with regard to parsing behavior? There are a number of ways in which it is treated specially currently; Ctrl+F for "applet" in [2]. Was the intent to keep the parsing rules, but produce HTMLUnknownElement? Or was it to entirely remove applet, so that it parses the same as <asdfdsf>?

[1]: https://github.com/whatwg/html/issues/75
[2]: https://html.spec.whatwg.org/multipage/syntax.html#parsing

Daniel Cheng

unread,
Sep 28, 2015, 5:55:54 PM9/28/15
to Domenic Denicola, Elliott Sprehn, Philip Rogers, PhistucK, Rick Byers, Jochen Eisinger, blink-dev, Justin Rogers, Chris Harrelson, Philip Jägenstedt
Sorry I missed this message. The removal is a complete removal, without keeping any special parsing behavior around.

Daniel

Anne van Kesteren

unread,
Sep 29, 2015, 2:40:47 AM9/29/15
to Daniel Cheng, Domenic Denicola, Elliott Sprehn, Philip Rogers, PhistucK, Rick Byers, Jochen Eisinger, blink-dev, Justin Rogers, Chris Harrelson, Philip Jägenstedt
On Mon, Sep 28, 2015 at 11:55 PM, Daniel Cheng <dch...@chromium.org> wrote:
> Sorry I missed this message. The removal is a complete removal, without
> keeping any special parsing behavior around.

What's the rationale for that? Parsing legacy documents differently
doesn't seem great.


--
https://annevankesteren.nl/

Daniel Cheng

unread,
Sep 29, 2015, 3:10:47 AM9/29/15
to Anne van Kesteren, Domenic Denicola, Elliott Sprehn, Philip Rogers, PhistucK, Rick Byers, Jochen Eisinger, blink-dev, Justin Rogers, Chris Harrelson, Philip Jägenstedt
Well, I don't think there's any rationale other than I missed the message from Domenic. Given that there already seems to be precedent for keeping special parsing rules around, I'll just add back the special parsing rules for <applet> but have it parse into an HTMLUnknownElement.

Daniel
Reply all
Reply to author
Forward
0 new messages