Re: [webkit-dev] Question about return values of RenderObject:localToAbsolute()
On Wed, Jun 10, 2009 at 1:47 PM, Lucius Fox lucius.fo...@gmail.com wrote: Hi, I use the dumpRenderTree to dump out the absolute co-ordinates of the Render Tree of www.google.com. I put the absolute x, y result at the end marked by { and }. And www.google.com, the first text is 'Web followed by Images followed by Video followed by Maps. But what I don't understand is (from the output below), all the absolute coordinates of those text are x = 8.0 and y = 3.0. But visually, they are next to each other horizontally. So the y values should be the same but the x values should be different. Can someone please help me understand the result? You need add renderText's relative x. such as: IntRect linesBox = text-linesBoundingBox(); FloatPoint absPos = text-localToAbsolute(); int posX = lineBox.x() + absPos.x(); int posY = lineBox.y() + absPos.y(); ___ 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
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
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