Last modified: 2014-02-27 19:44:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T21557, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 19557 - is_khtml can be triggered by Chrome with <!DOCTYPE html>
is_khtml can be triggered by Chrome with <!DOCTYPE html>
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: Aryeh Gregor (not reading bugmail, please e-mail directly)
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-06 22:39 UTC by Laurence 'GreenReaper' Parry
Modified: 2014-02-27 19:44 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Add navigator.accentColorName to KDE detection in wikibits.js (672 bytes, patch)
2009-07-06 22:39 UTC, Laurence 'GreenReaper' Parry
Details

Description Laurence 'GreenReaper' Parry 2009-07-06 22:39:00 UTC
Created attachment 6302 [details]
Add navigator.accentColorName to KDE detection in wikibits.js

When <!DOCTYPE html> is used (yes, I know . . .), the is_khtml compatibility variable in wikibits.js is activated by Google Chrome. This misdetection results in the KHTML fix stylesheet being applied, including this rule:
#column-content { margin-left: 0; }

Unfortunately this prevents the portlets from floating on the left; instead, they appear on the left but beneath the page content.

http://www.webreference.com/programming/javascript/sniffing/2.html suggested that the presence of navigator.accentColorName could be used to distinguish between Konquerer and Safari (or rather KHTML and Webkit, hence including Chrome). I added this to is_khtml, the stylesheet was no longer loaded, and the problem disappeared.
Comment 1 Bryan Tong Minh 2009-07-13 22:01:26 UTC
HTML5, assigning to Aryeh.
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2009-07-13 22:14:17 UTC
I already deleted the extra stylesheet entirely in r53141 (do you think it does anything useful?).  I wish I had known about this earlier so I didn't have to panic like I did.  :)
Comment 3 Laurence 'GreenReaper' Parry 2009-07-28 00:51:13 UTC
Not confident this is fixed as the revision is marked fixme. Though I would not be opposed to deleting it entirely if it can be confirmed that most KHTML users will not be affected as a result (or there are none :-).
Comment 4 Aryeh Gregor (not reading bugmail, please e-mail directly) 2009-07-28 00:57:43 UTC
The commit has not been reverted, so I'm re-resolving.  I believe I've adequately addressed werdna's fixme.  I've noted the bug number on the code review page, so anyone reverting it should reopen this.

Even if there are KHTML users, a variable that encompasses five years of their browser's history is unlikely to be useful for targeting actual bugs.  Whatever bugs it was used for back in the dawn of time are almost certainly long since fixed.  If they aren't, a workaround can be re-added with appropriate version number checks, rather than assuming that all KHTML past, present, and future will have exactly the same bugs.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links