Bug 28176

Summary: "document.documentElement.removeAttribute("style");" occasionally silently fails.
Product: WebKit Reporter: Vincent Bernardi <vincent>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ap, bfulgham, elvanor, kennyluck, maurelio.campos, mitz
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.5   
Attachments:
Description Flags
Test URL (should be working) none

Description Vincent Bernardi 2009-08-11 07:23:23 PDT
This bug happens on both releases of Safari 3.2.3 (Windows XP/Intel) and Safari 4.0.2 (Mac OS X 10.5.8/Intel and Windows XP/Intel).

When first loaded my script does
-----------------------------
document.documentElement.style.display = "none";
-----------------------------
to delay the display of the page.

Later it does 
-----------------------------
document.documentElement.removeAttribute("style");
-----------------------------

This makes the page display correctly on IE 7,8 and FF3 but on Safari 3 and 4 the page stays blank as if the instruction had been discarded.
This bug mysteriously disapears if the page is loaded while the Error Console is enabled under Safari 4 (both Win and Mac). In that case the page displays correctly.

Suggested workaround: replacing the above line with 
-----------------------------
document.documentElement.style.display = "";
-----------------------------
makes it work, both with and without the Error Console enabled.
Comment 1 madcampos 2012-01-28 23:42:37 PST
this bug happens on safari and chrome, tested on windows.
element.removeAttribute('style') fails

as a workaround i am setting the attribute style to null, then removing, this seems to make webkit aware of the attribute's existence.

my browser versions are:
Safari v5.1.2
Chrome v16.0.912.77
Comment 2 Alexey Proskuryakov 2012-01-30 12:46:16 PST
Could someone please attach a test case?
Comment 3 madcampos 2012-01-30 15:07:08 PST
Created attachment 124607 [details]
Test URL (should be working)

This url uses the workarround i proposed in the file interface.js around line 89
Comment 4 Kang-Hao (Kenny) Lu 2012-10-15 00:10:50 PDT
This is either duplicated by Bug 99295 or a duplicate of it.