Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Firefox Qt4 - a bit raw
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2325
Location: Germania

PostPosted: Fri Jan 08, 2010 3:15 pm    Post subject: Firefox Qt4 - a bit raw Reply with quote

Hi there!
I got around to patch firefox qpainter code into cairo-1.8.8 and added some patches from mozilla-central-tip(mc-tip) to firefox-3.6_rc.
so basic functionality and Look&Feel is there.

bugreports
:: https://bugzilla.mozilla.org/show_bug.cgi?id=521582
:: https://bugzilla.mozilla.org/show_bug.cgi?id=538872

my todo
:: get combobox dropdown list styled

:: fix nsWindow
→ FIXME:>>>>>>Func:void* nsWindow::SetupPluginPort()
→ FIXME:>>>>>>Func:virtual nsresult nsWindow::SetWindowClass(const nsAString_internal&)
→ FIXME:>>>>>>Func:virtual nsresult nsWindow::SetCursor(imgIContainer*, PRUint32, PRUint32)
→ FIXME:>>>>>>Func:void nsWindow::SetUrgencyHint(QWidget*, PRBool)
→ "Widget within another?"

your todo ( just not my type )
:: qt theme ( for css hackers or theme creators )
→ net-libs/xulrunner => path : toolkit/themes
→ www-client/mozilla-firefox => path : browser/themes

:: clean up update-xul-css.diff ( another css case, anyone? )
→ do not draw some types via xul/css but native on preferences window

:: checkbox/radio label/container widgets
→ types are registered already, check '#if 0' .. '#endif' block

___
overlay : http://geki.ath.cx/hacks/overlay.tar.bz2
layman : openoffice-geki

add keywords and remember, to check cairo from gentoo repo for changes and report! thank you!
/etc/portage/package.keywords wrote:
# browser
net-libs/xulrunner **
www-client/mozilla-firefox **
=x11-libs/cairo-1.8* **

have fun hacking! :twisted:

___
okay, some info if you are interested in hacking since I generated some code.

:: build setup to see results quickly
Quote:
# emerge --oneshot xulrunner
# ebuild /path/to/xulrunner.ebuild compile
# cd /path/to/tmp/portage/net-libs/xulrunner-*/work/mozilla-*/

### EDIT FILES

# make -j3
# cp toolkit/library/libxul.so /usr/lib/xulrunner-1.9.2/libxul.so

### RESTART firefox

### goto: EDIT FILES

### have fun! :D


:: source from OOo kde4 plugin
http://svn.services.openoffice.org/opengrok/xref/Current%20%28trunk%29/vcl/unx/kde4/KDESalGraphics.cxx

:: qt documentation, most important links
http://qt.nokia.com/doc/4.6/
http://qt.nokia.com/doc/4.6/classes.html (for specifics of below)
http://qt.nokia.com/doc/4.6/qt.html
http://qt.nokia.com/doc/4.6/qstyle.html
http://qt.nokia.com/doc/4.6/qstyleoption.html

:: check mozilla-qt.diff of net-libs/xulrunner
→ howto translate kde4 to qt4 in
→ widget/src/qt/nsNativeThemeQt.cpp

:: types, the theme may support, are listed here
http://hg.mozilla.org/mozilla-central/file/tip/gfx/public/nsThemeConstants.h

:: pass from css to native toolkit
→ various or alike '-moz-appearance: checkbox;' entries
→ this passes to NS_THEME_CHECKBOX type for example

___
o, some may need some proof with some picture. :roll:
http://geki.ath.cx/hacks/ff-qt4.png
_________________
boost|select libs to build|slotable|python-buildid

hear hear


Last edited by geki on Wed Feb 10, 2010 10:30 pm; edited 18 times in total
Back to top
View user's profile Send private message
Dottout
l33t
l33t


Joined: 07 Mar 2006
Posts: 882

PostPosted: Fri Jan 08, 2010 7:33 pm    Post subject: Reply with quote

hi, can you post a screenshot please?
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7113
Location: Austria

PostPosted: Fri Jan 08, 2010 7:34 pm    Post subject: Reply with quote

pics or it didn't happen :lol:

Now that could bring Firefox back again on my system...
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2325
Location: Germania

PostPosted: Fri Jan 08, 2010 11:52 pm    Post subject: Reply with quote

genstorm as if I lie! ;)

so what should be shot to verify for the unbelievers?

there is no info about cairo-gtk2 or cairo-qt being used in Help > About Mozilla Firefox.
are there any useful about:whatever pages?!
why? since my qt4 and gtk2 widgets look alike. and it is easy to fake anyway.

what I could show is the drop-down fubar. some early OpenOffice.org qt4/kde4 hackers saw that there before. :twisted:

anyway, I moved mozconfig-3.eclass to my overlay and have lifted the gtk+ depend for qt4.

best thing to do is always to see for yourself.


still, have fun guys! :twisted:

p.s.: ahem, it is not for everday use but to see the developing state and to hack on it.
_________________
boost|select libs to build|slotable|python-buildid

hear hear
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2325
Location: Germania

PostPosted: Mon Jan 11, 2010 9:30 am    Post subject: Reply with quote

I have got some qt theming done, though, it segfaults on some cairo_restore() now. very interesting.

edit #1
hmm, now I can edit this post without segfault.
well, just wanted to note that google.de segfaults sometimes, or so. just now it is working.

edit #2
it seems like a debug build of cairo helps for the 'edit post'-function and google?!
I will see as soon as a product build of cairo is merged again.
loading 'answer' page still segfaults.

okay, some info if you are interested in hacking since I generated some code.
:: source from OOo kde4 plugin
http://svn.services.openoffice.org/opengrok/xref/Current%20%28trunk%29/vcl/unx/kde4/KDESalGraphics.cxx

:: qt documentation, most important links
http://qt.nokia.com/doc/4.6/
http://qt.nokia.com/doc/4.6/classes.html (for specifics of below)
http://qt.nokia.com/doc/4.6/qt.html
http://qt.nokia.com/doc/4.6/qstyle.html
http://qt.nokia.com/doc/4.6/qstyleoption.html

:: check mozilla-qt.diff of net-libs/xulrunner
→ howto translate kde4 to qt4 in
→ widget/src/qt/nsNativeThemeQt.cpp

:: types, the theme may support, are listed here
http://hg.mozilla.org/mozilla-central/file/tip/gfx/public/nsThemeConstants.h
_________________
boost|select libs to build|slotable|python-buildid

hear hear
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2325
Location: Germania

PostPosted: Tue Jan 12, 2010 8:44 pm    Post subject: Reply with quote

new picture with new theming. :o
_________________
boost|select libs to build|slotable|python-buildid

hear hear
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2325
Location: Germania

PostPosted: Wed Jan 13, 2010 11:13 am    Post subject: Reply with quote

added three patches to cairo-qpainter
:: flush: fix crash; if QPainter pointer is NULL(lost, wtf?!) do not try to access
:: flush: only call QPainter::end() & QPainter::begin() if we own QPainter pointer; otherwise call QPainter::restore()
:: finish: remove call to QPainter::restore() here; see above.

now, this kills some massive runtime annoyance! :twisted:
:: QPainter::end: ... with 2 saved states
:: QPainter::restore: Unbalanced restore/save

so, when I open google it throws many XErrors like
Quote:
X Error: RenderBadPicture (invalid Picture parameter) 171
Extension: 149 (RENDER)
Minor opcode: 23 (RenderCompositeGlyphs8)
Resource id: 0x1803105
X Error: RenderBadPicture (invalid Picture parameter) 171
Extension: 149 (RENDER)
Minor opcode: 7 (RenderFreePicture)
Resource id: 0x1803bdb
X Error: BadMatch (invalid parameter attributes) 8
Extension: 149 (RENDER)
Minor opcode: 4 (RenderCreatePicture)
Resource id: 0x104
any ideas? I have no clue about X debugging.
I had XErrors once with my selfmade paint program, out of window drawing. hmpf... :o
_________________
boost|select libs to build|slotable|python-buildid

hear hear
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2325
Location: Germania

PostPosted: Wed Jan 13, 2010 12:15 pm    Post subject: Reply with quote

incredible feeling with
http://www.kde-look.org/content/show.php/Oxygen+KDE+%28Firefox+Theme%29?content=117962

now, I see the 'new tab'- & 'downarrow'-icons.

edit #1
hmm, so it seems the radio buttons on google and the dropdown buttons on b.g.o reports stay qt4 like? or whatever, but not gtk2. :roll:

→ DROPDOWN_BUTTON type to be implemented
→ let's see what I find for check/radio boxes

edit #2
I wonder if anyone find a way to alter the dropdown list background style. :?
_________________
boost|select libs to build|slotable|python-buildid

hear hear
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2325
Location: Germania

PostPosted: Thu Jan 14, 2010 1:37 pm    Post subject: Reply with quote

updated picture and intro post.

anyone interested in testing? even better one with a gtk+-less system. :o

I still wonder about the combobox dropdown list. should be able to alter.
anyone knows of css code for this? see last hunk of hacking help.
able to pass to native toolkit somehow?!

edit #1
got around to show downarrow for menu-type toolbar buttons.
and hacked css to show toolbar button dropdown for newtab widget.
though, with that hack you have a downarrow on each tab. :)
well, css could need some rewrite for qt I guess.
_________________
boost|select libs to build|slotable|python-buildid

hear hear
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2325
Location: Germania

PostPosted: Sun Jan 17, 2010 1:44 am    Post subject: Reply with quote

I finalized toolbar button style and I set the default newtab icon on tabbar.
now, if just the ctrl key did what it should and if the broken(ehh?!) glyphs errors were not, then ...
o, and, let's see if I find some css for the dropdown list of the combobox. :roll:

edit #1
the X Errors happen whenever opacity is set to zero.
so only non-fatal warnings of some misbehaviour.

edit #2
fixed default window background colour to white.
fixed default window foreground colour to black ( for text ).
added eColor__moz_nativehyperlinktext colour for address bar dropdown list.

anyone? should the background be white or qt app coloured? :o
_________________
boost|select libs to build|slotable|python-buildid

hear hear
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2325
Location: Germania

PostPosted: Tue Jan 19, 2010 6:05 am    Post subject: Reply with quote

address bar dropdown list is marked as TEXTFIELD now.
fixed X Errors by synchronizing with cairo head.

now, when I close firefox after google.com visit:
Quote:
firefox: cairo-hash.c:199: _cairo_hash_table_destroy: Zusicherung »hash_table->live_entries == 0« nicht erfüllt.

edit #1
rc2 bump seems to fix that assertion.

edit #2
fixed ctrl key depending on focus of window. :roll:
upstream may help now. see bugreport above.
_________________
boost|select libs to build|slotable|python-buildid

hear hear
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7113
Location: Austria

PostPosted: Wed Jan 20, 2010 9:33 am    Post subject: Reply with quote

I tried to emerge that whole thing, but mozilla-qt.diff didn't apply on xulrunner-1.9.2_rc2 ;)

Code:
patching file widget/src/qt/Makefile.in
patching file widget/src/qt/nsScreenManagerQt.cpp
patching file widget/src/qt/nsWindow.cpp
Hunk #2 succeeded at 668 (offset 30 lines).
Hunk #4 succeeded at 1347 (offset -3 lines).
Hunk #5 succeeded at 1401 (offset -3 lines).
Hunk #6 succeeded at 1682 (offset -3 lines).
patching file widget/src/qt/nsWindow.h
patching file widget/src/qt/mozqwidget.cpp
patching file gfx/thebes/src/gfxQtPlatform.cpp
patching file widget/src/qt/nsSound.cpp
patching file widget/src/qt/nsQtKeyUtils.cpp
Hunk #1 FAILED at 51.
1 out of 1 hunk FAILED -- saving rejects to file widget/src/qt/nsQtKeyUtils.cpp.rej
===========================


PS: My system is close to being gtk-free, unfortunately though dev-java/swt does still depend on it. And krita isn't complete enough to serve as a gimp replacement, yet. :(
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2325
Location: Germania

PostPosted: Wed Jan 20, 2010 4:22 pm    Post subject: Reply with quote

:lol: that one I hand-edited without testing?! but I merged it just fine. mmh, my mind is failing on chronological order.

for what do you need eclipse/SWT? ... now that you tell me. :o

edit #1
fixed patch hopefully.
_________________
boost|select libs to build|slotable|python-buildid

hear hear
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7113
Location: Austria

PostPosted: Thu Jan 21, 2010 11:38 pm    Post subject: Reply with quote

hm, I kind of like eclipse-sdk :) still hoping for a Qt-swt version though.

unfortunately, no, still doesn't work yet (no change in error msg).

edit: sorry, my fault - I got assaulted by the layman storage dir change. ;)
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7113
Location: Austria

PostPosted: Sat Jan 23, 2010 11:59 am    Post subject: Reply with quote

omg it works :lol:

Had to downgrade from cairo-1.9.4 to 1.8.8-r99 to make xulrunner compile.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
StringCheesian
l33t
l33t


Joined: 21 Oct 2003
Posts: 887

PostPosted: Sat Jan 23, 2010 12:05 pm    Post subject: Reply with quote

How well does it work?

Does it take longer to compile (with qt) than regular xulrunner?
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7113
Location: Austria

PostPosted: Sat Jan 23, 2010 12:09 pm    Post subject: Reply with quote

I can't really tell, because it's been a long time since I had xulrunner/firefox on my system, being annoyed by its suckiness and all. ;)

edit #1: Ok, according to splat, there's not really a difference:

Code:
 * net-libs/xulrunner-1.9.0.8

        Emerged at: Sa Apr  4 07:34:09 2009
        Build time: 20 minutes, and 7 seconds

 * net-libs/xulrunner-1.9.1.2-r1

        Emerged at: Di Aug 11 23:35:13 2009
        Build time: 17 minutes, and 50 seconds

 * net-libs/xulrunner-1.9.2_rc2

        Emerged at: Sa Jan 23 12:59:33 2010
        Build time: 18 minutes, and 22 seconds

There have been better or worse compile times, depending on my activity during emerge...

edit #2: I haven't had any segfault yet, it's running fine. youtube didn't work on first try, logging into gmail or various other accounts did. Also, the few extensions still lingering around from an earlier install upgraded properly. The theme would definitely like some polishing though ;)

edit #3: Seems firefox on Qt4 currently does a better job than regular 3.6 :lol:

edit #4: Still running fine after hours, consuming a moderate amount of RAM. ;)
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2325
Location: Germania

PostPosted: Wed Feb 10, 2010 10:29 pm    Post subject: Reply with quote

sync'ed with 1.9.2-r2 / 3.6-r2 of mozilla overlay.
added qt-plugin.diff, though not applied yet.
anyone interested to fix qt-plugin.diff for windowless embedded plugins? :o
_________________
boost|select libs to build|slotable|python-buildid

hear hear


Last edited by geki on Thu Feb 11, 2010 8:27 am; edited 1 time in total
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7113
Location: Austria

PostPosted: Wed Feb 10, 2010 10:37 pm    Post subject: Reply with quote

Just one thing before I can start build it:

Code:
emerge: there are no ebuilds to satisfy ">=dev-db/sqlite-3.6.22-r2[fts3,secure-delete]".
(dependency required by "www-client/mozilla-firefox-3.6-r2" [ebuild])

_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2325
Location: Germania

PostPosted: Thu Feb 11, 2010 8:31 am    Post subject: Reply with quote

hmm, right, they added it to mozilla overlay. feel free to get it from there until it is in portage. :o
http://git.overlays.gentoo.org/gitweb/?p=proj/mozilla.git;a=tree;f=dev-db/sqlite;hb=HEAD
_________________
boost|select libs to build|slotable|python-buildid

hear hear
Back to top
View user's profile Send private message
MalleRIM
Guru
Guru


Joined: 23 Jul 2007
Posts: 563
Location: China

PostPosted: Thu Mar 04, 2010 11:58 am    Post subject: Reply with quote

Thank you very much for the first ebuilds of a qt4 firefox ever to compile on my system! This is really great. Firefox starts and seems running well so far, although my Qt4 style (bespin) is not emulated that well. Please keep up the work until this get official.
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6108
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Thu Mar 04, 2010 12:20 pm    Post subject: Reply with quote

genstorm wrote:
omg it works :lol:

Had to downgrade from cairo-1.9.4 to 1.8.8-r99 to make xulrunner compile.



does this (your cairo) also work with the 1.9.3 alpha2 from the mozilla-overlay ? anyone tried ?

seems it's failing while looking for cairo-qpainter stuff :wink:


Thanks btw for your work on this
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 7113
Location: Austria

PostPosted: Sun Mar 07, 2010 11:57 pm    Post subject: Reply with quote

firefox-qt-3.6-r4 doesn't like me :(

Code:
Widget within another? (0x7f38e41f25e0)
FIXME:>>>>>>Func:virtual nsresult nsWindow::SetWindowClass(const nsAString_internal&)::1684

FIXME:>>>>>>Func:role::browser

RESIZING NSWINDOW: 0x7f38f7e65e00 940 x 1147
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 18 (X_ChangeProperty)
  Resource id:  0x0
RESIZING NSWINDOW: 0x7f38e41a8220 940 x 1000
Segmentation fault

Removed .mozilla/ dir without success.

EDIT #1: Ah, there's -r5, trying that now ;)

EDIT #2: Hm, same issue :(

kernelOfTruth wrote:
does this (your cairo) also work with the 1.9.3 alpha2 from the mozilla-overlay ? anyone tried ?

seems it's failing while looking for cairo-qpainter stuff :wink:

Won't work unless you apply geki's patches I think:
Code:
autogen.diff                         cairo-qpainter-surface.cpp        qt.diff
cairo-1.2.4-lcd-cleartype-like.diff  qpainter-build.diff
cairo-qpainter.h                     qpainter-unbalanced-restore.diff

They seem to be there for a reason. ;)
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
geki
Advocate
Advocate


Joined: 13 May 2004
Posts: 2325
Location: Germania

PostPosted: Mon Mar 08, 2010 2:03 am    Post subject: Reply with quote

well, cairo-qt went upstream in 1.9.x development. check xulrunner and firefox ebuilds for commented cairo-qt 1.10 changes.
_________________
boost|select libs to build|slotable|python-buildid

hear hear
Back to top
View user's profile Send private message
Waninkoko
Guru
Guru


Joined: 13 May 2005
Posts: 549

PostPosted: Sat Mar 27, 2010 12:39 pm    Post subject: Reply with quote

Whyyyy? :_(

Code:
In file included from gfxQPainterSurface.cpp:43:
../../../dist/system_wrappers/cairo-qpainter.h:3:33: error: cairo-qpainter.h: No such file or directory
gfxQPainterSurface.cpp: In constructor 'gfxQPainterSurface::gfxQPainterSurface(QPainter*)':
gfxQPainterSurface.cpp:47: error: 'cairo_qpainter_surface_create' was not declared in this scope
gfxQPainterSurface.cpp: In constructor 'gfxQPainterSurface::gfxQPainterSurface(const gfxIntSize&, gfxASurface::gfxImageFormat)':
gfxQPainterSurface.cpp:56: error: 'cairo_format_t' was not declared in this scope
gfxQPainterSurface.cpp:58: error: 'cairo_qpainter_surface_create_with_qimage' was not declared in this scope
gfxQPainterSurface.cpp:59: error: 'cairo_qpainter_surface_get_qpainter' was not declared in this scope
gfxQPainterSurface.cpp: In constructor 'gfxQPainterSurface::gfxQPainterSurface(const gfxIntSize&, gfxASurface::gfxContentType)':
gfxQPainterSurface.cpp:66: error: 'cairo_content_t' was not declared in this scope
gfxQPainterSurface.cpp:68: error: 'cairo_qpainter_surface_create_with_qpixmap' was not declared in this scope
gfxQPainterSurface.cpp:69: error: 'cairo_qpainter_surface_get_qpainter' was not declared in this scope
gfxQPainterSurface.cpp: In constructor 'gfxQPainterSurface::gfxQPainterSurface(cairo_surface_t*)':
gfxQPainterSurface.cpp:76: error: 'cairo_qpainter_surface_get_qpainter' was not declared in this scope
gfxQPainterSurface.cpp: In member function 'QImage* gfxQPainterSurface::GetQImage()':
gfxQPainterSurface.cpp:91: error: 'cairo_qpainter_surface_get_qimage' was not declared in this scope
gfxQPainterSurface.cpp: In member function 'already_AddRefed<gfxImageSurface> gfxQPainterSurface::GetImageSurface()':
gfxQPainterSurface.cpp:100: error: 'cairo_qpainter_surface_get_image' was not declared in this scope
make[5]: *** [gfxQPainterSurface.o] Error 1
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum