Bug 35139 - [Qt] QtWebkit always renders tab character as space
: [Qt] QtWebkit always renders tab character as space
Product: WebKit
Classification: Unclassified
Component: Text
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To: Tor Arne Vestbø (not active)
: Qt, QtTriaged
Depends on:
Blocks: 63467
  Show dependency treegraph
Reported: 2010-02-18 22:22 PST by Rion
Modified: 2014-10-28 05:48 PDT (History)
5 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Rion 2010-02-18 22:22:12 PST
100% reproducible with qt 4.6.1 and 4.6.2

test case:
just create a form with QWebView and try
ui->webView->setHtml("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">"
"<html><body><pre>hello	my	fine	world</pre></body></html>");

notice tabs between words and "pre". i also tried various values for white-space css attribute but tabs are always spaces.

just a quick test: open any source hosting site (googlecode for example) with arora browser and browse code (here for example http://code.google.com/p/psi-dev/source/browse/trunk/patches/1010-psi-fix-alt%2BN-crash.diff?spec=svn1885&r=1885 )
Comment 1 Rion 2010-02-18 22:29:01 PST
it seems bugzilla translated my tabs into number of spaces. so type them manually in code.

btw fyi bug is not reproducible with not qt webkit. so chromium a epiphany work fine.
Comment 2 Tor Arne Vestbø (not active) 2010-03-05 09:39:46 PST
Please follow the QtWebKit bug reporting guidelines when reporting bugs.

See http://trac.webkit.org/wiki/QtWebKitBugs


  - The 'QtWebKit' component should be used for bugs/features in the public QtWebKit API layer, not to signify that the bug is specific to the Qt port of WebKit

Comment 3 Robert Hogan 2011-06-25 03:45:55 PDT
Confirmed on trunk. The difference comparing http://code.google.com/p/psi-dev/source/browse/trunk/patches/1010-psi-fix-alt%2BN-crash.diff?spec=svn1885&r=1885 on Chromium and QtTestBrowser is pretty striking.

The tab isn't being converted a space - it's a tab but it is only rendered to the width of a space.
Comment 4 Thomas Bachem 2014-01-31 13:05:50 PST
This issue doesn't seem fixed to me. I tried Arora with Qt 4.8.6 and it's still showing tabs at the width of spaces.
Comment 5 Thomas Bachem 2014-10-28 05:48:13 PDT
Regarding my previous comment: It works for me now in Qt 5+. Thanks!