Bug 41228 - Going through windows.forms/mono-webbrowser, loses all html colors/layouts
Summary: Going through windows.forms/mono-webbrowser, loses all html colors/layouts
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: Windows.Forms ()
Version: 4.2.0 (C6)
Hardware: PC Linux
: --- normal
Target Milestone: Community
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-05-21 01:41 UTC by Hin-Tak Leung
Modified: 2017-09-01 11:56 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
how http://www.google.com looks (139.71 KB, image/png)
2016-05-27 06:07 UTC, Hin-Tak Leung
Details
how http://www.kernel.org looks (81.67 KB, image/png)
2016-05-27 06:11 UTC, Hin-Tak Leung
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 41228 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Hin-Tak Leung 2016-05-21 01:41:23 UTC
I can run webkit-sharp + gtk-sharp directly, and it works correctly. However, I'd like the SWF WebBrowser code to work correctly, for porting some existing windows-centric code.

I am able to run the SWF WebBrowser code through mono-webbrowser (as in
https://bugzilla.xamarin.com/show_bug.cgi?id=4155#c3
) . However, when going through SWF WebBrowser + mono-webbrowser instead of going directly through webkit-sharp + git-sharp, the outcome seems to lose all layout and color imformation, and also seems to lose the ability to process javascript (i.e. javascript appears as plain text).

perhaps it is easier to show the figures - here is the slides of a talk I gave recently.
http://htl10.users.sf.net/tmp/FontVal-LG2016.pdf
page 28-32 shows how the embedded web browser looks like under wine + dotnet2 + ie8. Page 35-38 shows how it looks with linux + mono SWF + mono-webbrowser .

But you could run the much simplier example in https://bugzilla.xamarin.com/show_bug.cgi?id=4155#c3 , and even interactively, to see the result.

I am also curious if mono-webbrowser ever shows this problem in 2008(?) - it seems to be quite an obvious issue - losing all layouts + colors - if it did happen then, so this is probably a regression.

Would have liked to file at https://github.com/mono/mono-webbrowser except there is no issue tab there. It seems to be a problem between mono's SWF and mono-webbrowser .

I am tempted to have a go at resurrecting libgluezilla to figure this out...
Comment 1 Hin-Tak Leung 2016-05-21 07:05:40 UTC
The mono-webbrowser code base is quite small, and I have been wondering where the color and layout info is being lost. mono-webbrowser/mono-webkit/XEvent.cs seems to be a subset of mono/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Structs.cs , so my guess at the moment is either the gdk part, of webkit itself actually tries to see what surface it is being drawn in and renders differently because it guesses the rendering surface's capability wrong.

One explanation that javascript appearing as text definitely suggests that webkit thinks the rendering surface cannot cope.
Comment 2 Hin-Tak Leung 2016-05-21 09:34:01 UTC
besides rendering target, I wonder if it is a matter of interrupted rendering - i.e. the outcome seen is an intermediate state.
Comment 3 Hin-Tak Leung 2016-05-27 05:37:13 UTC
Difficult to tell, but 'display the Google home page as html' in
https://bugzilla.novell.com/show_bug.cgi?id=589474#c2
back in 2010 perhaps means the same thing as 'loses all html colors/layouts'.
Comment 4 Hin-Tak Leung 2016-05-27 06:07:50 UTC
Created attachment 16117 [details]
how http://www.google.com looks

Here is how http://www.google.com looks. it seems that javascripts becomes inline text.

website like http://www.kernel.org which does not use javapscript suffers less - www.kernel.org just seems to lose all layout and image info, with all the texts from the web site in one continuous paragraph.
Comment 5 Hin-Tak Leung 2016-05-27 06:11:36 UTC
Created attachment 16118 [details]
how http://www.kernel.org looks

here is how a less-javascript-heavy web site looks. The web page content is all there but striped of layout info.
Comment 6 Hin-Tak Leung 2016-06-06 09:05:48 UTC
Fixed all the rendering issues (they are really event-loop issues) by borrowing some ideas from geckofx.

Please pull:

https://github.com/mono/mono-webbrowser/pull/1