Re: [webkit-dev] Rendering for small screen

2009-04-22 Thread Graffine

Hi xunxin:

Thanks for your reply in first. Because of I adapt the GTK+/webkit, I 
couldn't find same functions in GTK+ port. I found a function named 
FrameView::adjustViewSize which use setContentSize to set the content 
size. If I alter the width and height parameters, the scroll bar won't 
shon in browser window. But the whole page contents still overflow the 
window size.


For example, I set the window size is 800*400, and the web page contents 
are 781*488. In this case, we will have a vertical scroll bar. Now I 
want to render the web page contents in proportion to window size, and 
we can see the whole page contents in the browser window. To achieve 
this goal, what should I do? Do I need to set the width and height for 
different htnl tag or there is a global variable to control it in webkit?


And I have another question. I found a function named Frame::createView 
which has a viewportSize parameter, but I didn't know where this 
function be called. Do you have any suggestions?


Thanks,
Graffine.

xunxin ??:


Hi, Graffine:
 
  In QtWebKit, you may use:
page-mainFrame()-setScrollBarPolicy(Qt::Horizontal, 
Qt::ScrollBarAlwaysOff);
page-mainFrame()-setScrollBarPolicy(Qt::Vertical, 
Qt::ScrollBarAlwaysOff);


page-setViewportSize( mainFrame-contentsSize() );

On Mon, Apr 20, 2009 at 5:21 PM, Graffine graff...@gmail.com 
mailto:graff...@gmail.com wrote:


Hello:

I want to render the web page content to small screen size. The
goal is
to adjust viewport size to render whole
web content without scroll bar. I think it might start from Frame or
Render class, but I don't find any feature
or function to do this. Where can I find this?

Graffine.
___
webkit-dev mailing list
webkit-dev@lists.webkit.org mailto:webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev




___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Rendering for small screen

2009-04-22 Thread xunxin
Hi, Graffine:
you may try this fuction to ajust  viewport size.
  Frame::setZoomFactor(float percent, bool isTextOnly)

where the function Frame::createView is called?  you may try this
command
 ack createView */gtk/*
 and you will find
   WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
   941:frame-createView(size, backgroundColor, transparent,
IntSize(), false);
enjoy

On Wed, Apr 22, 2009 at 9:09 AM, xunxin wanxun...@gmail.com wrote:

 Hi, Graffine:

   In QtWebKit, you may use:
 page-mainFrame()-setScrollBarPolicy(Qt::Horizontal,
 Qt::ScrollBarAlwaysOff);
 page-mainFrame()-setScrollBarPolicy(Qt::Vertical,
 Qt::ScrollBarAlwaysOff);

 page-setViewportSize( mainFrame-contentsSize() );


 On Mon, Apr 20, 2009 at 5:21 PM, Graffine graff...@gmail.com wrote:

 Hello:

 I want to render the web page content to small screen size. The goal is
 to adjust viewport size to render whole
 web content without scroll bar. I think it might start from Frame or
 Render class, but I don't find any feature
 or function to do this. Where can I find this?

 Graffine.
 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev



___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] Rendering for small screen

2009-04-21 Thread xunxin
Hi, Graffine:

  In QtWebKit, you may use:
page-mainFrame()-setScrollBarPolicy(Qt::Horizontal,
Qt::ScrollBarAlwaysOff);
page-mainFrame()-setScrollBarPolicy(Qt::Vertical,
Qt::ScrollBarAlwaysOff);

page-setViewportSize( mainFrame-contentsSize() );

On Mon, Apr 20, 2009 at 5:21 PM, Graffine graff...@gmail.com wrote:

 Hello:

 I want to render the web page content to small screen size. The goal is
 to adjust viewport size to render whole
 web content without scroll bar. I think it might start from Frame or
 Render class, but I don't find any feature
 or function to do this. Where can I find this?

 Graffine.
 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev