From d8a633a65b9354bcca1fd7e0a0b9bfaea46ecdbd Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Wed, 13 Nov 2013 22:36:22 +0000 Subject: [PATCH] [e] (0) Reframe the rendering section for clarity Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=23443 Affected topics: Rendering git-svn-id: http://svn.whatwg.org/webapps@8280 340c8d12-0b0e-0410-8428-c7bf67bfef74 --- complete.html | 103 +++++++++++++++++++++++++++++--------------- index | 103 +++++++++++++++++++++++++++++--------------- source | 115 ++++++++++++++++++++++++++++++++++---------------- 3 files changed, 217 insertions(+), 104 deletions(-) diff --git a/complete.html b/complete.html index 0bdf302a4ea..576cd2de58f 100644 --- a/complete.html +++ b/complete.html @@ -94263,41 +94263,76 @@

14.4.1 Embedded content

14.4.2 Images

-

When an img element or an input element when its type attribute is in the Image - Button state represents an image, it is expected to be treated as a replaced - element.

+

User agents are expected to render img elements and input elements + whose type attributes are in the Image Button state, according to the first applicable rules + from the following list:

+ +
If the element represents an image
+ +
The user agent is expected to treat the element as a replaced element and render the image + according to the rules for doing so defined in CSS.
+ + +
+ + If the element does not represent an image, but the element + already has intrinsic dimensions (e.g. from the dimension attributes or CSS rules), + and either: + +
  • the Document is in quirks mode, or + + + +
  • the user agent has reason to believe that the image will become available and be rendered in due + course. + +
+ +
The user agent is expected to treat the element as a replaced element whose content is the + text that the element represents, if any, optionally alongside an icon indicating that the image + is being obtained (if applicable). For input elements, the element is expected to + appear button-like to indicate that the element is a button.
+ + +
If the element is an img element that might be a key part of the content, but + neither the image nor any kind of alternative text is available, and the user agent does not + expect this to change
+ +
The user agent is expected to treat the element as a non-replaced phrasing element whose + content is an icon indicating that an image is missing.
+ + +
If the element is an img element that represents some text and the + user agent does not expect this to change
+ +
The user agent is expected to treat the element as a non-replaced phrasing element whose + content is the text, optionally with an icon indicating that an image is missing, so that the + user can request the image be displayed or investigate why it is not rendering. In non-graphical + contexts, such an icon should be omitted.
+ + +
If the element is an img element that represents nothing and the + user agent does not expect this to change
+ +
The user agent is expected to treat the element as an empty inline element. (In the absence + of further styles, this will cause the element to essentially not be rendered.)
+ + +
If the element is an input element that does not represent an image and the user agent does not expect this to change
+ +
The user agent is expected to treat the element as a replaced element consisting of a button + whose content is the element's alternative text. The intrinsic dimensions of the button are + expected to be about one line in height and whatever width is necessary to render the text on one + line.
-

When an img element or an input element when its type attribute is in the Image - Button state does not represent an image, but the element - already has intrinsic dimensions (e.g. from the dimension attributes or CSS rules), - and either the user agent has reason to believe that the image will become available and be rendered in due course - or the Document is in quirks mode, the element is expected to be treated - as a replaced element whose content is the text that the element represents, if any, optionally - alongside an icon indicating that the image is being obtained. For input elements, - the text is expected to appear button-like to indicate that the element is a button.

- -

When an img element represents some text and the user agent does not - expect this to change, the element is expected to be treated as a non-replaced phrasing element - whose content is the text, optionally with an icon indicating that an image is missing, so that - the user can request the image be displayed or investigate why it is not rendering. In - non-graphical contexts, such an icon should be omitted.

- -

When an img element represents nothing and the user agent does not - expect this to change, the element is expected to not be rendered at all.

- -

When an img element might be a key part of the content, but neither the image nor - any kind of alternative text is available, and the user agent does not expect this to change, the - element is expected to be treated as a non-replaced phrasing element whose content is an icon - indicating that an image is missing.

- -

When an input element whose type attribute is - in the Image Button state does not represent an image and the user agent does not expect this to change, - the element is expected to be treated as a replaced element consisting of a button whose content - is the element's alternative text. The intrinsic dimensions of the button are expected to be about - one line in height and whatever width is necessary to render the text on one line.

- -

The icons mentioned above are expected to be relatively small so as not to disrupt most text +

The icons mentioned above are expected to be relatively small so as not to disrupt most text but be easily clickable. In a visual environment, for instance, icons could be 16 pixels by 16 pixels square, or 1em by 1em if the images are scalable. In an audio environment, the icon could be a short bleep. The icons are intended to indicate to the user that they can be used to get to diff --git a/index b/index index 0bdf302a4ea..576cd2de58f 100644 --- a/index +++ b/index @@ -94263,41 +94263,76 @@ iframe[seamless] { display: block; }

14.4.2 Images

-

When an img element or an input element when its type attribute is in the Image - Button state represents an image, it is expected to be treated as a replaced - element.

+

User agents are expected to render img elements and input elements + whose type attributes are in the Image Button state, according to the first applicable rules + from the following list:

+ +
If the element represents an image
+ +
The user agent is expected to treat the element as a replaced element and render the image + according to the rules for doing so defined in CSS.
+ + +
+ + If the element does not represent an image, but the element + already has intrinsic dimensions (e.g. from the dimension attributes or CSS rules), + and either: + +
  • the Document is in quirks mode, or + + + +
  • the user agent has reason to believe that the image will become available and be rendered in due + course. + +
+ +
The user agent is expected to treat the element as a replaced element whose content is the + text that the element represents, if any, optionally alongside an icon indicating that the image + is being obtained (if applicable). For input elements, the element is expected to + appear button-like to indicate that the element is a button.
+ + +
If the element is an img element that might be a key part of the content, but + neither the image nor any kind of alternative text is available, and the user agent does not + expect this to change
+ +
The user agent is expected to treat the element as a non-replaced phrasing element whose + content is an icon indicating that an image is missing.
+ + +
If the element is an img element that represents some text and the + user agent does not expect this to change
+ +
The user agent is expected to treat the element as a non-replaced phrasing element whose + content is the text, optionally with an icon indicating that an image is missing, so that the + user can request the image be displayed or investigate why it is not rendering. In non-graphical + contexts, such an icon should be omitted.
+ + +
If the element is an img element that represents nothing and the + user agent does not expect this to change
+ +
The user agent is expected to treat the element as an empty inline element. (In the absence + of further styles, this will cause the element to essentially not be rendered.)
+ + +
If the element is an input element that does not represent an image and the user agent does not expect this to change
+ +
The user agent is expected to treat the element as a replaced element consisting of a button + whose content is the element's alternative text. The intrinsic dimensions of the button are + expected to be about one line in height and whatever width is necessary to render the text on one + line.
-

When an img element or an input element when its type attribute is in the Image - Button state does not represent an image, but the element - already has intrinsic dimensions (e.g. from the dimension attributes or CSS rules), - and either the user agent has reason to believe that the image will become available and be rendered in due course - or the Document is in quirks mode, the element is expected to be treated - as a replaced element whose content is the text that the element represents, if any, optionally - alongside an icon indicating that the image is being obtained. For input elements, - the text is expected to appear button-like to indicate that the element is a button.

- -

When an img element represents some text and the user agent does not - expect this to change, the element is expected to be treated as a non-replaced phrasing element - whose content is the text, optionally with an icon indicating that an image is missing, so that - the user can request the image be displayed or investigate why it is not rendering. In - non-graphical contexts, such an icon should be omitted.

- -

When an img element represents nothing and the user agent does not - expect this to change, the element is expected to not be rendered at all.

- -

When an img element might be a key part of the content, but neither the image nor - any kind of alternative text is available, and the user agent does not expect this to change, the - element is expected to be treated as a non-replaced phrasing element whose content is an icon - indicating that an image is missing.

- -

When an input element whose type attribute is - in the Image Button state does not represent an image and the user agent does not expect this to change, - the element is expected to be treated as a replaced element consisting of a button whose content - is the element's alternative text. The intrinsic dimensions of the button are expected to be about - one line in height and whatever width is necessary to render the text on one line.

- -

The icons mentioned above are expected to be relatively small so as not to disrupt most text +

The icons mentioned above are expected to be relatively small so as not to disrupt most text but be easily clickable. In a visual environment, for instance, icons could be 16 pixels by 16 pixels square, or 1em by 1em if the images are scalable. In an audio environment, the icon could be a short bleep. The icons are intended to indicate to the user that they can be used to get to diff --git a/source b/source index 46234a7f65c..54e377f10f5 100644 --- a/source +++ b/source @@ -104843,44 +104843,87 @@ iframe[seamless] { display: block; }

Images

-

When an img element or an input element when its type attribute is in the Image - Button state represents an image, it is expected to be treated as a replaced - element.

+

User agents are expected to render img elements and input elements + whose type attributes are in the Image Button state, according to the first applicable rules + from the following list:

-

When an img element or an input element when its type attribute is in the Image - Button state does not represent an image, but the element - already has intrinsic dimensions (e.g. from the dimension attributes or CSS rules), - and either the user agent has reason to believe that the image will become available and be rendered in due course - or the Document is in quirks mode, the element is expected to be treated - as a replaced element whose content is the text that the element represents, if any, optionally - alongside an icon indicating that the image is being obtained. For input elements, - the text is expected to appear button-like to indicate that the element is a button.

+
+ + +
If the element represents an image
+ +
The user agent is expected to treat the element as a replaced element and render the image + according to the rules for doing so defined in CSS.
+ + +
+ + If the element does not represent an image, but the element + already has intrinsic dimensions (e.g. from the dimension attributes or CSS rules), + and either: + +
    + +
  • the Document is in quirks mode, or + + -

    When an img element represents some text and the user agent does not - expect this to change, the element is expected to be treated as a non-replaced phrasing element - whose content is the text, optionally with an icon indicating that an image is missing, so that - the user can request the image be displayed or investigate why it is not rendering. In - non-graphical contexts, such an icon should be omitted.

    - -

    When an img element represents nothing and the user agent does not - expect this to change, the element is expected to not be rendered at all.

    - -

    When an img element might be a key part of the content, but neither the image nor - any kind of alternative text is available, and the user agent does not expect this to change, the - element is expected to be treated as a non-replaced phrasing element whose content is an icon - indicating that an image is missing.

    - -

    When an input element whose type attribute is - in the Image Button state does not represent an image and the user agent does not expect this to change, - the element is expected to be treated as a replaced element consisting of a button whose content - is the element's alternative text. The intrinsic dimensions of the button are expected to be about - one line in height and whatever width is necessary to render the text on one line.

    +
  • the user agent has reason to believe that the image will become available and be rendered in due + course. + +
+ +
+ +
The user agent is expected to treat the element as a replaced element whose content is the + text that the element represents, if any, optionally alongside an icon indicating that the image + is being obtained (if applicable). For input elements, the element is expected to + appear button-like to indicate that the element is a button.
+ + +
If the element is an img element that might be a key part of the content, but + neither the image nor any kind of alternative text is available, and the user agent does not + expect this to change
+ +
The user agent is expected to treat the element as a non-replaced phrasing element whose + content is an icon indicating that an image is missing.
+ + +
If the element is an img element that represents some text and the + user agent does not expect this to change
+ +
The user agent is expected to treat the element as a non-replaced phrasing element whose + content is the text, optionally with an icon indicating that an image is missing, so that the + user can request the image be displayed or investigate why it is not rendering. In non-graphical + contexts, such an icon should be omitted.
+ + +
If the element is an img element that represents nothing and the + user agent does not expect this to change
+ +
The user agent is expected to treat the element as an empty inline element. (In the absence + of further styles, this will cause the element to essentially not be rendered.)
+ + +
If the element is an input element that does not represent an image and the user agent does not expect this to change
+ +
The user agent is expected to treat the element as a replaced element consisting of a button + whose content is the element's alternative text. The intrinsic dimensions of the button are + expected to be about one line in height and whatever width is necessary to render the text on one + line.
+ +

The icons mentioned above are expected to be relatively small so as not to disrupt most text but be easily clickable. In a visual environment, for instance, icons could be 16 pixels by 16