MAY
18
2007
|
Yet another GMail fixAs some might have noticed GMail was updated this morning. As usual this broke the standard view Konqueror, but only if you use the recommended method of spoofing as Firefox. Fortunately I traced it down and fixed it in no time at all :D Here is the patch for your convenience (apply in kdelibs/khtml): void HTMLElementImpl::setInnerHTML( const DOMString &html, int &exceptioncode )
|
![]() |
Comments
3.5.7
is this going to make it in KDE 3.5.7? I know it's tagged, but this sounds like it's worth it...
Curious...
Cool to see such patch.
Have two questions though:
- what JavaScript line causes this problem?
- And are these kind of necessary hacks documented somewhere? For example, the fact window.frames[ id ] returns any DOM element in MSIE, or location = location.href also works. :p
Answer
These lines are responsible:
if(BU)
{c.cssText=b}
else if(B9)
{c.innerText=b}
else
{c.innerHTML=b}
Where BU is set on MSIE UserAgent, and B9 set on Safari UserAgent.
So the short answers is that stuff like this happens because GMail is horrible piece of crappy enginering.
The correct way to do this would have been to test for the properties cssText or innerText on StyleElements, and only use the innerHTML gecko-hack if anything sane fails. Unfortunately the JS-idiots at Google are incapable of using anything other than UserAgent switches.
Hi Allen, care to explain
Hi Allen, care to explain why you're posting the fix, but not committing it? Any problems with it!?
How do I apply this patch to Konqueror 3.5
I can only access to gmail in html view. Standard view doesn't work at all, neither with IE browser identification nor with firefox browser identification. I wanna try this patch but how to apply this patch? Please provide a detailed instruction. I'm using fc8 with KDE 3.5.8-7.fc8