This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24634 - [WebDriver Spec]: 10.1.1 needs clarity regarding the BODY tag special case
Summary: [WebDriver Spec]: 10.1.1 needs clarity regarding the BODY tag special case
Status: RESOLVED FIXED
Alias: None
Product: Browser Test/Tools WG
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: David Burns :automatedtester
QA Contact: Browser Testing and Tools WG
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 20860
  Show dependency treegraph
 
Reported: 2014-02-12 21:43 UTC by Luke Inman-Semerau
Modified: 2014-07-10 10:45 UTC (History)
4 users (show)

See Also:


Attachments

Description Luke Inman-Semerau 2014-02-12 21:43:40 UTC
"The exception to this would be the BODY element, which is generally assumed to always be displayed by users of the WebDriver spec"

generally? when?

<body></body>

this element has 0 height / width. should it be 'visible'

<body style="display:none">....</body>

this element is explicitly invisible and should not be considered visible.

We aught to define the cases when body can be considered invisible (also style="visibility:hidden" ?)
Comment 1 David Burns :automatedtester 2014-02-25 20:07:06 UTC
Add a MUST on that BODY is always visible.
Comment 2 David Burns :automatedtester 2014-03-13 23:11:39 UTC
Fixed in https://dvcs.w3.org/hg/webdriver/rev/81cc3d3b5f5f
Comment 3 Andrey Botalov 2014-03-27 20:27:22 UTC
Why body should always be considered visible?

IMO body doesn't look visible in case of:
<body style="display:none">....</body>
Comment 4 Luke Inman-Semerau 2014-03-27 20:43:10 UTC
view the browser on an html page with that.

What do you see? You see a big blank white page... you "see" it! :)  body is 'specail'
Comment 5 Luke Inman-Semerau 2014-03-27 20:43:50 UTC
special*  ha!
Comment 6 Andreas Tolfsen 2014-07-10 10:44:58 UTC
Allow me to shed some light on why the body should always be considered visible.

In the CSS specification the HTML and BODY elements are considered special snowflakes.  Based on an order of preference (which always prefers the ancestral element, that is the HTML element) if background-color or background-image is set, that gets transposed on to the browser's painting canvas.

In effect this means that what you see on the screen in a document containing <body></body> (empty body) is always visible because the default value of background-color for the BODY element is "transparent", which the CSS spec defines as user agent specific behaviour.  In the case of desktop browsers that means falling back to base.css (or the equivalent) which defines the colour white to be the default.
Comment 7 Andreas Tolfsen 2014-07-10 10:45:30 UTC
The relevant spec prose around this is defined here:

    http://dev.w3.org/csswg/css-backgrounds/#special-backgrounds