| Summary: | [hovering] "Enrich on click" is not working on Indigo | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Andre Costa <blueser> | ||||
| Component: | SWT | Assignee: | Grant Gayed <grant_gayed> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | burkskinka, daniel_megert, eclipse.felipe, fwunderlich, markus.kell.r | ||||
| Version: | 3.7 | ||||||
| Target Milestone: | 3.8 M7 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux-GTK | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Andre Costa
Are you using 3.7 or 4.1? Which browser do you use? Works for me on both using Windows 7. Markus, please take a look. > is ineffective
What does that mean? Is the hover enriched earlier or not at all? Please attach a screenshot of a Javadoc hover that should show links, e.g. String#charAt(int).
(In reply to comment #1) > Are you using 3.7 or 4.1? Which browser do you use? Works for me on both using > Windows 7. I'm using Indigo release (3.7), sorry for the miscategorization. As for the browser, I have both Chrome (12.0.742.100) and Firefox (4.0.1-2), Chrome being the default browser. (In reply to comment #2) > > is ineffective > > What does that mean? Is the hover enriched earlier or not at all? Please attach > a screenshot of a Javadoc hover that should show links, e.g. > String#charAt(int). The hover is displayed just fine, and links appear and work as expected. What doesn't happen is that when I click the hover outside of a link nothing happens, and it should "enrich" (show scrollbars and navigation buttons, which does happen when I press F2 while the hover is displaying). It also doesn't enrich if I use the mouse wheel over the hover. At first I thought it was related to GNOME 3, but hovers work as expected on Helios on the same system. OK, then it's very likely a problem with the WebKit browser renderer (Indigo uses WebKit by default, whereas Helios used Mozilla). Unfortunately, I don't have a Linux machine with WebKit installed, so it's hard for me to find the exact problem. Our implementation uses a display listener for MouseUp in org.eclipse.jface.text.AbstractHoverInformationControlManager:311 that should get an event when the user releases the mouse. Looks like this event is not fired with WebKit. Moving to SWT. Please move back if my guess was wrong. I did some additional tests: 1. I tried to run Helios forcing WebKit rendering using -Dorg.eclipse.swt.browser.UseWebKitGTK=true, but it doesn't work because Fedora 15 ships with WebKit 1.4.0, and according to SWT FAQ Helios can only use WebKitGTK 1.2. So, hovers do enrich on click with Helios, but links appear as plain text etc. 2. I tried running Indigo with org.eclipse.swt.browser.UseWebKitGTK set to false, but it didn't help (hovers still don't enrich on click). Not sure though if setting this property to false would force Indigo to use Mozilla as browser renderer WebKit versions installed are: webkitgtk-1.4.1-1.fc15.x86_64 webkitgtk3-1.4.0-1.fc15.x86_64 (In reply to comment #6) > 1. I tried to run Helios forcing WebKit rendering [..] Then you get the fallback that doesn't use the Browser widget at all (no links). > 2. I tried running Indigo with org.eclipse.swt.browser.UseWebKitGTK set to > false [..] Yeah, that doesn't disable WebKit, see bug 349837 comment 12. (In reply to comment #7) > (In reply to comment #6) > > 1. I tried to run Helios forcing WebKit rendering [..] > Then you get the fallback that doesn't use the Browser widget at all (no > links). > > > 2. I tried running Indigo with org.eclipse.swt.browser.UseWebKitGTK set to > > false [..] > Yeah, that doesn't disable WebKit, see bug 349837 comment 12. Thks for the info. Well, I am out of ideas, please let me know if I can help in any other way. > please let me know if I can help in any other way. If you want to help the SWT team debugging this, you can launch the ControlExample [1] as a Java Application, go to the Browser tab, select the Listen checkbox, and then see whether you get a MouseUp event when you click into the browser. The situation in the hover is a bit more complicated since the shell that contains the browser is not active initially. Maybe a more similar situation could be created in the ControlExample when you click 'Set/Get API' and then click the browser. [1] CVS repository :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse Check out org.eclipse.swt.examples from HEAD. re: comment 9 WebKitGTK-based Browsers do generally send key/mouse events, but the one case where they don't, and I think this applies to this bug, is if JS is disabled in the Browser. This is because WebKitGTK versions earlier than 1.4 did not provide an embedder API for getting DOM events, so the Browser had to fall back to getting them via JS events. I believe that WebKitGTK 1.4 introduced embedder API for accessing the dom, so fixing the Browser to use them should allow it to get its events regardless of whether JS is enabled or not. FYI: I just tested Indigo on Ubuntu 11.04 and hovers also don't enrich on click (WebKit version is 1.3.13). Created attachment 200020 [details]
patch that uses new WebKitGTK DOM API
Using the new WebKitGTK DOM API does not fix the problem. Doing this works fine in the OSX port of WebKit, so I think this is either a bug in WebKitGTK, or JS disablement is not being done correctly.
Attaching patch here so that the work is not lost. This is a change that should be made regardless. Will continue investigating this case.
*** Bug 353305 has been marked as a duplicate of this bug. *** *** Bug 364908 has been marked as a duplicate of this bug. *** Should this bug get a 3.8 target? |