16. Building WebCore/html, css, loader, rendering and dom directory is done - WebKit porting to Mona OS

Let's build WebKit on OSX, and see what's happening.

% Tools/Scripts/build-webkit --debug --no-svg 2>&1|tee webkit.build.osx.log

The build process is going as following.

Okay, I gonna build WebCore. There must be many missing dependencies, but it doesn't matter. WebCore is huge, so started from subdirectory "./html".
When building Source/WebCore/html/BaseButtonInputType.cpp, following error is shown.

        from Source/WebCore/html/BaseButtonInputType.cpp:36:
./Source/WebCore/platform/DragImage.h:87:27: error: 'DragImageRef' was not declared in this scope./Source/WebCore/platform/DragImage.h:92:5: error: 'DragImageRef' does not name a type

Hmm. See DragImage.h.

#if PLATFORM(MAC)
    typedef RetainPtr<NSImage> DragImageRef;
#elif PLATFORM(QT)
    typedef QPixmap* DragImageRef;
#elif PLATFORM(WIN)
    typedef HBITMAP DragImageRef;
#elif PLATFORM(WX)
    typedef wxDragImage* DragImageRef;
#elif PLATFORM(GTK)
    typedef cairo_surface_t* DragImageRef;

It just hit me. We should define some platform depedent types. For now I defined them as void*.
Building WebCore/html is done!


The next is css directory.?

Source/WebCore/css/CSSFontFaceSource.cpp:39:36: fatal error: FontCustomPlatformData.h: No such file or directory
compilation terminated.
make: *** [Source/WebCore/css/CSSFontFaceSource.o] Error 1
% find . -name "FontCustomPlatformData.h"
./Source/WebCore/platform/graphics/cairo/FontCustomPlatformData.h
./Source/WebCore/platform/graphics/haiku/FontCustomPlatformData.h
./Source/WebCore/platform/graphics/mac/FontCustomPlatformData.h
./Source/WebCore/platform/graphics/qt/FontCustomPlatformData.h
./Source/WebCore/platform/graphics/skia/FontCustomPlatformData.h
./Source/WebCore/platform/graphics/win/FontCustomPlatformData.h
./Source/WebCore/platform/graphics/wince/FontCustomPlatformData.h
./Source/WebCore/platform/graphics/wx/FontCustomPlatformData.h

Copied the file from haiku directory. building css directory is done.
The next is WebCore/loader.

from Source/WebCore/loader/FrameLoader.cpp:97:
./Source/WebCore/xml/XMLErrors.h:36:27: fatal error: libxml/parser.h: No such file or directory

Okay, we have to port libxml. Added an empty stub header.
building loader directory is done.

ToDo - Dependencies

  • DragImageRef at Source/WebCore/platform/DragImage.h
  • NativeImagePtr and NativeImageSourcePtr at Source/WebCore/platform/graphics/ImageSource.h
  • PlatformWidget at Source/WebCore/platform/Widget.h
  • ImageBufferData at Source/WebCore/platform/graphics/ImageBufferData.h
  • PlatformPatternPtr atSource/WebCore/platform/graphics/Pattern.h
  • ENABLE(FTPDIR), ENABLE(VIDEO)
  • Source/WebCore/platform/graphics/wx/FontCustomPlatformData.h
  • Source/WebCore/xml/XMLErrors.h:36:27: fatal error: libxml/parser.h: No such file or directory