Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 42467 - Photon - implement the SWT browser widget
Summary: Photon - implement the SWT browser widget
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.0   Edit
Hardware: PC QNX-Photon
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Chris McKillop CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-03 14:25 EDT by Christophe Cornu CLA
Modified: 2003-09-22 18:21 EDT (History)
2 users (show)

See Also:


Attachments
Browser Patch (24.00 KB, patch)
2003-09-18 23:40 EDT, Chris McKillop CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Cornu CLA 2003-09-03 14:25:26 EDT
Provide an implementation of the new SWT browser widget for the QNX platform.

Stubs:
The org.eclipse.swt source from HEAD contains stubs for the Browser widget on 
Photon.
Source folders:
Eclipse SWT Browser/photon (org.eclipse.swt.browser.Browser for photon - to be 
implemented)
Eclipse SWT Browser/common (events which must be supported by the Browser 
widget)

1. report if part of the Browser api and events don't map to the Photon 
platform
2. for early feedback, you can post a (temporary) simplified version of the 
Browser which does not support the events.
3. The final implementation can be tested against the following snippet:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-
home/snippits/snippet128.html
Comment 1 Chris McKillop CLA 2003-09-18 23:40:07 EDT
Created attachment 6163 [details]
Browser Patch

This patch has a browser that is fully functional against the current contract.
Comment 2 Christophe Cornu CLA 2003-09-19 18:06:55 EDT
Browser released in CVS.
After review of the patch, you can notice a few modifications:
- WebClient is merged into the Browser class
- Rely on Display.findWidget instead of own hashtable
- Removed unused setWebOption
- Use single callback following a scheme similar to Display/Widget/Control
- Inlined some code in server initialization
- Some checks for back() and forward()

1 question: is the code inside focusIn doing anything? I didn't see a 
difference when commenting it out.
Comment 3 Chris McKillop CLA 2003-09-19 18:49:06 EDT
Some comments on your changes:
o The WWW_* stuff has been replaced with Pt_WEB_*.  It might not be in your
headers but that it what it is called now and the WWW_* counterparts are not
even listed.  Please change it back.  
o The setWebOptions() will have to go back since there are a bunch of options
that need to be configured with a little more sanity.  For instance, you will
find in your $HOME dir a bunch of files like globhist.html, etc, etc.  Based on
server we can either point into an swt specific location or into voyager's
locations.

Some questions:
o Why do you use the Listener() object rather then implimenting the interfaces?
 I assume that Browser isn't subclass-able so it really shouldn't matter should
it?  I must be missing something. ;)
o Why do you use the .* for importing? (this one is really troubling to me) 
Everything I have ever read on good java coding practice says you should list
them explicitly to avoid polluting the namespace.

Some Answers:
o The onFocus() code is in place because the Browser isn't really the widget,
unlike if we could take over createHandle().  So if someone did a setFocus(true)
on a browser instance it would be setting focus to the composite parent rather
then the PtWebClient widget.




Comment 4 Christophe Cornu CLA 2003-09-22 18:21:10 EDT
o Why do you use the Listener() object rather then implimenting the interfaces?
 I assume that Browser isn't subclass-able so it really shouldn't matter should
it?  I must be missing something. ;)
For consistency with the CTabFolder that I used as a reference for coding the 
Browser.

o Why do you use the .* for importing? (this one is really troubling to me) 
Everything I have ever read on good java coding practice says you should list
them explicitly to avoid polluting the namespace.
Consistency with what SWT usually does (see CTabFolder, Button for example). 

Noted: we need to look at the constants you mentionned