Re: Notes about WebCore
Re: Notes about WebCore
- Subject: Re: Notes about WebCore
- From: Adam Atlas <email@hidden>
- Date: Sat, 11 Jan 2003 09:53:10 -0500
WebCoreBridge has a setRenderPart: method. I think that would be
required here, though I have no idea what it's for. If you still have
your WebCore source, take a look at khtml/rendering/render_frames.h,
and look for the RenderPart class (though it's in C++). If you create
one of those (maybe just a bare-bones one with nothing special set,
unless it looks like there needs to be more) and pass it to your
WebBridge object in its setRenderPart: method. I don't know if this
will work, but KHTMLRenderPart (and its c++ counterpart
khtml::RenderPart) stood out when I was looking through the source for
more information on this.
I hope you have better success with this soon...
-- Adam Atlas
On Sat, 11 Jan 2003 11:24:50, Marcel Weiher <email@hidden>
wrote:
Hi Buzz,
I've had (minutely) better success with doing only a minimal subclass
of WebCoreBride.
@interface WebBridge : WebCoreBridge {
}
@end
@implementation WebBridge
-(int)getObjectCacheSize
{
return 8192;
}
@end
and the following View that just tries to draw:
...
-(NSString*)demoUrl
{
return [NSString stringWithFormat:@"file://%@",[[self class]
frameworkPath:@"hi.html"]];
}
-(void)awakeFromNib
{
[self setWebBridge:[[[WebBridge alloc] init] autorelease]];
[[self webBridge] openURL:[self demoUrl] reload:YES headers:nil
lastModified:nil pageCache:nil];
}
- (void)drawRect:(NSRect)rect {
[[self webBridge] drawRect:rect];
}
This doesn't crash, and fills the View with red, so WebCore is actually
painting something, somehow (yeah!).
But it complains about missing renderers:
=================
ERROR: called KWQKHTMLPart::paint with nil renderer
(kwq/KWQKHTMLPart.mm:342 paint)
=================
and the red-filled view is not what I expect from the minimal HTML file
I was trying to render...
Marcel
--
Adam Atlas
"MS-DOS for the IBM PC has reached Version 37.4! Changes since version
37.2 are: Now features a Q prompt, in addition to the old A-O prompts!
(The P prompt didn't work.) Also, features a WEB BROWSER for this new
thing called the 'internet.' MS-DOS v37.2, )2002 Microsoft Corporation."
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.