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

Alp Toker alp at atoker.com
Fri Nov 30 03:17:09 PST 2007


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<HTMLElement*>(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);
}


More information about the webkit-dev mailing list