Bug 129686 - <audio> element takes space even with display:none
Summary: <audio> element takes space even with display:none
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad iOS 7.0
: P2 Normal
Assignee: Nobody
URL: http://jsbin.com/iphonebug/1
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-04 08:58 PST by andreyklinger+webkit
Modified: 2015-02-19 10:41 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andreyklinger+webkit 2014-03-04 08:58:56 PST
Tested on Safari on iOS 7.06

<div style="border: 1px solid red">
  a<audio style="display:none; border: 1px solid green"></audio>b
</div>
Comment 1 Daniel Bates 2015-02-18 21:11:37 PST
I am neither able to reproduce this issue using the iOS Simulator to simulate an iPhone 5s running iOS 8.1 (12B411) with system WebKit nor using the same simulator device with a debug build of WebKit r180217. That is, the <audio> element is not displayed and takes no visual space such that there is no whitespace between the characters 'a' and 'b' in the text rendered on the page described by the markup in comment 0.
Comment 2 Eric Carlson 2015-02-19 10:41:55 PST
(In reply to comment #0)
> Tested on Safari on iOS 7.06
> 
> <div style="border: 1px solid red">
>   a<audio style="display:none; border: 1px solid green"></audio>b
> </div>

This was fixed in iOS8 when the media element backend was completely rewritten.