Bug 16433

Summary: LOW_BANDWIDTH_DISPLAY build is broken
Product: WebKit Reporter: Alp Toker <alp>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: dacarson, klobag
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Make LOW_BANDWIDTH_DISPLAY compile
darin: review-
new patch to make LOW_BANDWIDTH_DISPLAY compile darin: review+

Description Alp Toker 2007-12-14 02:40:52 PST
The first breakage was due to the recent KURL url() refactoring.

With that fixed, I got this:

g++ -c -pipe -D_REENTRANT -I/usr/include -Wall -W -Wcast-align -Wchar-subscripts -Wformat-security -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-format-y2k -Wno-unused-parameter -Wundef -pipe -fno-exceptions -fno-rtti -O2 -D_REENTRANT -I/opt/fdo/include/cairo -I/opt/fdo/include/directfb -I/opt/fdo/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -D_REENTRANT -I/opt/fdo/include/cairo -I/opt/fdo/include/directfb -I/opt/fdo/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -D_REENTRANT -I/opt/fdo/include/cairo -I/opt/fdo/include/directfb -I/opt/fdo/include/pixman-1 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -pthread -DORBIT2=1 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/libxml2 -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -DQT_SHARED -DBUILDING_CAIRO__=1 -DBUILDING_GTK__=1 -DUSE_SYSTEM_MALLOC -DNDEBUG -DHAVE_STDINT_H -DBUILD_WEBKIT -DUSE_LOW_BANDWIDTH_DISPLAY=1 -DWTF_USE_LOW_BANDWIDTH_DISPLAY=1 -DENABLE_DATABASE=1 -DENABLE_ICONDATABASE=1 -DENABLE_XPATH=1 -DENABLE_XSLT=1 -DENABLE_SVG=0 -DENABLE_VIDEO=1 -DWTF_CHANGES=1 -DBUILDING_GTK__ -I/usr/share/qt4/mkspecs/linux-g++ -I../../../WebCore -I../../../../webkit -I../../../WebCore/platform/gtk -I../../../WebCore/platform/network/curl -I../../../WebCore/platform/graphics/cairo -I../../../WebCore/loader/gtk -I../../../WebCore/page/gtk -I../../../WebKit/gtk/WebView -I../../../WebKit/gtk/WebCoreSupport -I../../../JavaScriptCore -I../../../JavaScriptCore/kjs -I../../../JavaScriptCore/bindings -I../../../JavaScriptCore/bindings/c -I../../../JavaScriptCore/wtf -I../../../JavaScriptCore/ForwardingHeaders -I../../../WebCore -I../../../WebCore/ForwardingHeaders -I../../../WebCore/platform -I../../../WebCore/platform/network -I../../../WebCore/platform/graphics -I../../../WebCore/loader -I../../../WebCore/page -I../../../WebCore/css -I../../../WebCore/dom -I../../../WebCore/bridge -I../../../WebCore/editing -I../../../WebCore/rendering -I../../../WebCore/history -I../../../WebCore/xml -I../../../WebCore/html -Itmp -Itmp -I../../../JavaScriptCore -I../../../JavaScriptCore/kjs -I../../../JavaScriptCore/bindings -I../../../JavaScriptCore/bindings/c -I../../../JavaScriptCore/wtf -I../../../JavaScriptCore/pcre -I../JavaScriptCore/kjs/tmp -I../../../WebCore/platform/gtk -I../../../WebCore/platform/graphics/gtk -I../../../WebCore/platform/graphics/cairo -I../../../WebCore/svg/graphics/cairo -I../../../WebCore/platform/network/curl -I../../../WebCore/platform/image-decoders -I../../../WebCore/platform/image-decoders/bmp -I../../../WebCore/platform/image-decoders/gif -I../../../WebCore/platform/image-decoders/ico -I../../../WebCore/platform/image-decoders/jpeg -I../../../WebCore/platform/image-decoders/png -I../../../WebCore/platform/image-decoders/xbm -I../../../WebCore/loader/gtk -I../../../WebCore/page/gtk -I../../../WebKit/gtk/WebCoreSupport -I../../../WebKit/gtk/WebView -I../../../WebCore -I../../../WebCore/ForwardingHeaders -I../../../../webkit -I../../../JavaScriptCore/kjs -I../../../JavaScriptCore/bindings -I../../../JavaScriptCore/wtf -I../../../WebCore/platform -I../../../WebCore/platform/network -I../../../WebCore/platform/graphics -I../../../WebCore/svg/graphics -I../../../WebCore/svg/graphics/filters -I../../../WebCore/platform/sql -I../../../WebCore/platform/text -I../../../WebCore/storage -I../../../WebCore/loader -I../../../WebCore/loader/icon -I../../../WebCore/css -I../../../WebCore/dom -I../../../WebCore/page -I../../../WebCore/bridge -I../../../WebCore/editing -I../../../WebCore/rendering -I../../../WebCore/history -I../../../WebCore/xml -I../../../WebCore/html -I../../../WebCore/bindings/js -I../../../WebCore/svg -I../../../WebCore/platform/image-decoders -I/usr/X11R6/include -I../../../WebCore -I. -o tmp/FrameLoader.o ../../../WebCore/loader/FrameLoader.cpp
../../../WebCore/loader/FrameLoader.cpp: In member function ‘bool WebCore::FrameLoader::addLowBandwidthDisplayRequest(WebCore::CachedResource*)’:
../../../WebCore/loader/FrameLoader.cpp:4715: warning: enumeration value ‘FontResource’ not handled in switch
../../../WebCore/loader/FrameLoader.cpp: In member function ‘void WebCore::FrameLoader::switchOutLowBandwidthDisplayIfReady()’:
../../../WebCore/loader/FrameLoader.cpp:4780: error: no matching function for call to ‘WebCore::DOMImplementation::createDocument(WebCore::String&, WebCore::FrameView*, bool)’
../../../WebCore/dom/DOMImplementation.h:50: note: candidates are: WTF::PassRefPtr<WebCore::Document> WebCore::DOMImplementation::createDocument(const WebCore::String&, const WebCore::String&, WebCore::DocumentType*, WebCore::ExceptionCode&)
../../../WebCore/dom/DOMImplementation.h:61: note:                 WTF::PassRefPtr<WebCore::Document> WebCore::DOMImplementation::createDocument(const WebCore::String&, WebCore::Frame*, bool)
../../../WebCore/dom/DOMImplementation.h:62: note:                 WTF::PassRefPtr<WebCore::Document> WebCore::DOMImplementation::createDocument(WebCore::Frame*)
../../../WebCore/loader/FrameLoader.cpp:4782: error: no matching function for call to ‘WebCore::Document::setURL(WebCore::String)’
../../../WebCore/dom/Document.h:365: note: candidates are: void WebCore::Document::setURL(const WebCore::DeprecatedString&)
../../../WebCore/loader/FrameLoader.cpp:4783: error: no matching function for call to ‘WebCore::Document::setBaseURL(WebCore::String)’
../../../WebCore/dom/Document.h:368: note: candidates are: void WebCore::Document::setBaseURL(const WebCore::DeprecatedString&)
../../../WebCore/loader/FrameLoader.cpp:4787: error: ‘partClearedInBegin’ was not declared in this scope


When was the last time someone built this feature?

It's a shame for it to fall out of sync :-(

I might spend some time looking into this. Could be a fun win for the various mobile ports, maybe even the iPhone port.

This issue was noticed with the GTK+ but appears to affect all ports.
Comment 1 David Kilzer (:ddkilzer) 2007-12-15 06:08:46 PST
Bug 12279 implemented this feature.

Comment 2 Grace Kloba 2007-12-15 20:14:51 PST
Created attachment 17923 [details]
Make LOW_BANDWIDTH_DISPLAY compile

The patch should make the project compile and it is what we use. But it doesn't work with Mac port any more. Can someone inside Apple take a look?

ASSERTION FAILED: thisDocumentView != nil
(/Volumes/Android/appleWebKit/WebKit/WebCoreSupport/WebFrameLoaderClient.mm:222 forceLayoutForNonHTML)
Comment 3 Darin Adler 2007-12-16 10:19:16 PST
Comment on attachment 17923 [details]
Make LOW_BANDWIDTH_DISPLAY compile

The rest of the changes look fine, but the change to FrameLoader doesn't seem to have anything to do with LOW_BANDWIDTH_DISPLAY.

I'm guessing that for some reason Android derives a subclass from FrameLoader. That doesn't sound like a good idea to me, but also seems unrelated to LOW_BANDWIDTH_DISPLAY so should not be controlled by the same ifdef.
Comment 4 Grace Kloba 2007-12-16 15:32:46 PST
The change in the FrameLoader.h was in the original patch. Android doesn't need it. But we discovered that we had to add it to avoid crash in the Mac port back then. I am happy to remove it.

(In reply to comment #3)
> (From update of attachment 17923 [details] [edit])
> The rest of the changes look fine, but the change to FrameLoader doesn't seem
> to have anything to do with LOW_BANDWIDTH_DISPLAY.
> 
> I'm guessing that for some reason Android derives a subclass from FrameLoader.
> That doesn't sound like a good idea to me, but also seems unrelated to
> LOW_BANDWIDTH_DISPLAY so should not be controlled by the same ifdef.
> 

Comment 5 Grace Kloba 2007-12-16 15:34:05 PST
Created attachment 17941 [details]
new patch to make LOW_BANDWIDTH_DISPLAY compile

Remove the change in the FrameLoader.h
Comment 6 Darin Adler 2007-12-16 15:40:15 PST
Comment on attachment 17941 [details]
new patch to make LOW_BANDWIDTH_DISPLAY compile

r=me
Comment 7 Mark Rowe (bdash) 2007-12-16 17:27:08 PST
Landed in r28784.
Comment 8 Alp Toker 2007-12-22 12:04:28 PST
The additional KURL API change fix was landed in r28960.