[webkit-dev] get the bits of the complete page

2007-11-22 Thread zaheer ahmad
hi,
iam working on the gtk port of webkit and have a need to get the
bitmap of the entire page without actually rendering it. Is there an
easy way to get in the current implementation.  one of the ways i
thought was to create a cairo surface over a memory buffer (instead of
the drawing window in webkit_page_expose_event) and pass it to the
scrollview::paint with a complete rectangle. Not sure if this is the
right track to solve this issue (also this could be performance/memory
intensive)

Any inputs would be greatly helpful.

thanks,
Zaheer
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] get the bits of the complete page

2008-02-18 Thread zaheer ahmad
hi,
The patch does not reposition the changed document to the top of the frame
view and also does not alter the documents width/height. The same behavior
is seen with transforms from html pages(e..g scaled content goes out of the
window)
Are these known issues?

Setting the transform origin (style->setTransformOriginX(Length(0,Fixed));)
should fix the first problem.  A force layout with changed width/height for
the renderview should solve the second problem. not sure if this is the
right thing to do.
let us know your comments.

thanks,
Zaheer

On Nov 30, 2007 4:47 PM, Alp Toker <[EMAIL PROTECTED]> wrote:

> Zaheer,
>
> If you really need full page zooming so much and can't wait for the bug
> to get fixed, try something like this (untested):
>
> void webkit_frame_set_scale(WebKitFrame* frame, double scale)
> {
> g_return_if_fail(WEBKIT_IS_FRAME(frame));
>
> WebKitFramePrivate* frameData = WEBKIT_FRAME_GET_PRIVATE(frame);
> Frame* wframe = frameData->frame;
> Document* document = wframe->document();
> HTMLElement* root =
> reinterpret_cast(document->documentElement());
> RenderObject* renderer = root->renderer();
> RenderStyle* style = renderer->style();
> TransformOperations ops;
> ScaleTransformOperation* scaleOp = new
> ScaleTransformOperation(scale, scale);
> ops.append(scaleOp);
> style->setTransform(ops);
> renderer->setStyle(style);
> }
>
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev