Intent to Deprecate and Remove: HTMLPreElement.wrap IDL attribute

35 views
Skip to first unread message

Philip Jägenstedt

unread,
Jul 28, 2014, 6:27:34 PM7/28/14
to blink-dev

Primary eng (and PM) emails

phi...@opera.com


Summary

Remove the HTMLPreElement.wrap IDL attribute, but not the effect the content attribute has on rendering.


Motivation

The IDL attribute is not in the spec, and no browser except WebKit/Blink supports it:

http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#htmlpreelement


However, the content attribute is part of the user agent style sheet, and all 
browsers except IE support it:
http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#flow-content-3

Compatibility Risk

Insignificant.


Alternative implementation suggestion for web developers

Use CSS to control wrapping, and a class if it needs to be toggled from scripts.


Usage information from UseCounter

http://www.chromestatus.com/metrics/feature/timeline/popularity/399


Available in M36, the highest recorded measurement is 0.0002%.

When I added the use counter I wasn't aware that the user agent stylesheet bit was per spec, so I included that as well. Fortunately, the combined usage is low enough that it doesn't matter.

Entry on chromestatus.com, crbug.com, or MDN

None.


Requesting approval to remove too?

Yes.

Elliott Sprehn

unread,
Jul 28, 2014, 6:33:08 PM7/28/14
to Philip Jägenstedt, blink-dev
Yay, please keep up the removals of all this vestigial stuff. :)

Tab Atkins Jr.

unread,
Jul 28, 2014, 8:03:12 PM7/28/14
to Philip Jägenstedt, blink-dev
LGTM as well

On Mon, Jul 28, 2014 at 3:27 PM, Philip Jägenstedt <phi...@opera.com> wrote:
> To unsubscribe from this group and stop receiving emails from it, send an
> email to blink-dev+...@chromium.org.

Eric Seidel

unread,
Jul 29, 2014, 12:46:22 AM7/29/14
to Tab Atkins Jr., Philip Jägenstedt, blink-dev
lgtm

Dimitri Glazkov

unread,
Jul 29, 2014, 12:56:22 AM7/29/14
to Eric Seidel, Tab Atkins Jr., Philip Jägenstedt, blink-dev
LGTM2

Jochen Eisinger

unread,
Jul 29, 2014, 5:02:48 AM7/29/14
to Dimitri Glazkov, Eric Seidel, Tab Atkins Jr., Philip Jägenstedt, blink-dev
lgtm3

Erik Arvidsson

unread,
Jul 29, 2014, 1:36:57 PM7/29/14
to Jochen Eisinger, Dimitri Glazkov, Eric Seidel, Tab Atkins Jr., Philip Jägenstedt, blink-dev
If all browsers support the wrap boolean attribute it seems like reflecting the attribute as a property is reasonable.
--
erik


Anne van Kesteren

unread,
Jul 29, 2014, 1:47:26 PM7/29/14
to Erik Arvidsson, Jochen Eisinger, Dimitri Glazkov, Eric Seidel, Tab Atkins Jr., Philip Jägenstedt, blink-dev
On Tue, Jul 29, 2014 at 7:36 PM, Erik Arvidsson <a...@chromium.org> wrote:
> If all browsers support the wrap boolean attribute it seems like reflecting
> the attribute as a property is reasonable.

Why should non-WebKit/Blink browsers add this? No requests in Bugzilla.


--
http://annevankesteren.nl/

Erik Arvidsson

unread,
Jul 29, 2014, 2:00:03 PM7/29/14
to Anne van Kesteren, Jochen Eisinger, Dimitri Glazkov, Eric Seidel, Tab Atkins Jr., Philip Jägenstedt, blink-dev
My concern is that is that we should not have have content attributes that are not reflected. I do not care about wrap in particular, just about consistency.
--
erik


Philip Jägenstedt

unread,
Jul 29, 2014, 4:29:51 PM7/29/14
to Erik Arvidsson, Anne van Kesteren, Jochen Eisinger, Dimitri Glazkov, Eric Seidel, Tab Atkins Jr., blink-dev
FWIW, <pre wrap> is invalid.

If we want to reach a consistent, not just interoperable, state I think that dropping pre[wrap] { white-space: pre-wrap; } from the UA style sheet would be the quickest path to success. Lack of support in IE and the use counter data (which included that case) make that change seem very safe. It would also make HTMLPreElement.h/cpp empty like HTMLHeadElement.h/cpp.

If you like, a spec bug seems like the next step.

Philip

Ian Hickson

unread,
Jul 29, 2014, 5:14:16 PM7/29/14
to Philip Jägenstedt, Erik Arvidsson, Anne van Kesteren, Jochen Eisinger, Dimitri Glazkov, Eric Seidel, Tab Atkins Jr., blink-dev
On Tue, 29 Jul 2014, Philip Jägenstedt wrote:
>
> FWIW, <pre wrap> is invalid.
>
> If we want to reach a consistent, not just interoperable, state I think
> that dropping pre[wrap] { white-space: pre-wrap; } from the UA style
> sheet would be the quickest path to success. Lack of support in IE and
> the use counter data (which included that case) make that change seem
> very safe. It would also make HTMLPreElement.h/cpp empty like
> HTMLHeadElement.h/cpp.
>
> If you like, a spec bug seems like the next step.

Removing it (the CSS rule) seems fine to me, but I would expect this to
have effects on the Web. A use counter for the number of times that rule
is hit would provide useful data.

--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'

Philip Jägenstedt

unread,
Jul 29, 2014, 5:23:48 PM7/29/14
to Ian Hickson, Erik Arvidsson, Anne van Kesteren, Jochen Eisinger, Dimitri Glazkov, Eric Seidel, Tab Atkins Jr., blink-dev
On Tue, Jul 29, 2014 at 11:14 PM, Ian Hickson <i...@hixie.ch> wrote:
>
> On Tue, 29 Jul 2014, Philip Jägenstedt wrote:
> >
> > FWIW, <pre wrap> is invalid.
> >
> > If we want to reach a consistent, not just interoperable, state I think
> > that dropping pre[wrap] { white-space: pre-wrap; } from the UA style
> > sheet would be the quickest path to success. Lack of support in IE and
> > the use counter data (which included that case) make that change seem
> > very safe. It would also make HTMLPreElement.h/cpp empty like
> > HTMLHeadElement.h/cpp.
> >
> > If you like, a spec bug seems like the next step.
>
> Removing it (the CSS rule) seems fine to me, but I would expect this to
> have effects on the Web. A use counter for the number of times that rule
> is hit would provide useful data.

http://www.chromestatus.com/metrics/feature/timeline/popularity/399

This use counter includes the CSS bit, because at the time I didn't
realize it was in the spec. To be specific, it counted any time the
wrap attribute case in
HTMLPreElement::collectStyleForPresentationAttribute was hit.

Unless I've missed something, removal would be entirely safe. (Large
amounts of content can't depend on it because of IE.)

Philip
Reply all
Reply to author
Forward
0 new messages