Hi: I want to scale the frame size to fit different window size. In my way , I used layoutWidth() to get the displaying size and used contentsWidth() to get the web contents truly size, but both of this values sometims are same. For example, I launch GtkLauncher to browse google, I got the correct layoutWidth and contentsWidth value at the first time. Ater then, I click on the url entry and press enter key, the page will be reloaded, but this two function will return a same value. Is it right? I'm curious about what meaning of these three functions: 1. visibleWidth() 2. layoutWidth() 3. contentsWidth() I think layoutWidth() just the visiable area width of whole window, it isn't including title, toolbar, scrollbar, border, and other things, and I think contentsWidth() is the width of web page contents. If this is right, I have a weird case. I make the window size of GtkLauncher is 480x272, but the layoutWidth() will return 510 when I browse google. It looks like not the true visiable area width. Besides, the visableWidth() is the same as layoutWidth(). If I want to get the width and height of visiable area and web page contents, does any function I can use? Thanks in advances, Graffine
Hi, I'm Taeyun Kim, and this is my first post on this mailing list. Maybe it is somewhat old issue, I ran into the same problem that below. Although the final mail from Framk Thomsen includes the solution, that doesn't show the cause of the problem. And when I was browsing the sources to find the cause, I encountered the following code: #ifndef _WINSOCKAPI_ #define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h #endif It's in the WebKit\WebCore\WebCorePrefix.h. It prevents the inclusion of the winsock header(I don't know why), by fooling other sources that it is already included. I guess that curl.h became a victim of it. Can it be the source of the problem? --------------------------- [webkit-dev] Cairo-build on Windows fails Frank Thomsen fth at trifork.com Tue Mar 17 00:21:55 PDT 2009 Previous message: [webkit-dev] Cairo-build on Windows fails Next message: [webkit-dev] Is the HTML5 application cache secure? Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Hi Brent That worked - thank you very much! Apparently the following code snippet from curl.h did not include winsock.h: #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) && \ !defined(__CYGWIN__) || defined(__MINGW32__) #if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H)) /* The check above prevents the winsock2 inclusion if winsock.h already was included, since they can't co-exist without problems */ #include <winsock2.h> #include <ws2tcpip.h> #endif #else But I altered the code as you suggested: #ifndef curl_socket_typedef /* socket typedef */ #ifdef WIN32 #include <winsock2.h> typedef SOCKET curl_socket_t; #define CURL_SOCKET_BAD INVALID_SOCKET #else And that does the trick. Once again, thank you. Regards, Frank From: Brent Fulgham [mailto:bfulgham at gmail.com] Sent: 16. marts 2009 19:08 To: Frank Thomsen Cc: Mital Vora; webkit-dev at lists.webkit.org Subject: Re: [webkit-dev] Cairo-build on Windows fails Hi Frank, The compiler is unhappy with the SOCKET definition, most likely because the Windows networking header is not getting included. You could try including <winsock2.h> in the curl.h header before this line just to see if that gets you any further. I don't see this issue, and I don't believe Mital does either. So perhaps there is something different in our build environments. I will attempt a build today using current sources in case something has changed recently (i.e., since Thursday) that is complicating matters. Thanks, -Brent
participants (2)
-
Graffine
-
Taeyun Kim