Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Create dedicated browser app emulator/desktop browser for development use #5

Open
jonbarrow opened this issue Dec 29, 2024 · 5 comments
Labels
awaiting-approval Topic has not been approved or denied feature A feature request

Comments

@jonbarrow
Copy link
Member

An issue that has come up a number of times is the ability to quickly and easily work with apps on the Wii U and 3DS which render their UIs using an embedded browser (Miiverse, eShop, Wii U Account Settings, etc.)

These have a number of challenges that must be overcome to work with them, such as (but not limited to):

  • Requiring dedicated SSL/cert patches, as each apps browser uses its own SSL/certs
  • Often times requiring hacky patches to change things like URLs

Additionally, the actual developer experience is not great. The platforms themselves have a number of issues, such as:

  • Slow hardware. This results in slow rendering times and download speeds, making it painful to quickly check changes
  • Lack of developer tools. There is no dedicated refresh button which makes iterating hard, there's no console which makes debugging difficult
  • You have to first overcome the previously mentioned setup issues to even begin development, which is rather annoying

We should consider looking into fixing this through the use of a dedicated tool to test these browser apps. We have 2 options for this:

  • Use an emulator. We have a number of options there, but each have pros and cons:
    • Cemu: The go-to choice for Wii U emulation. Fast and accurate but is a fully fledged emulator so it's rather heavy. Is also an HLE emulator so accuracy will likely never be perfect and would still require manual testing on real hardware to be 100% sure
    • Decaf: Same cons as Cemu with the added con of being less maintained
    • https://github.com/kinnay/Wii-U-Firmware-Emulator: The only LLE for the Wii U that we know of. Very well developed, arguably perfect. However, it has no graphics and adding them is not trivial
    • Emulators also are rather heavy, so, ideally, we would need to strip one down to only what we need. They also still inherently have some of the same issues as real hardware (no dedicated browser console, no refresh button, etc.). These issues can be fixed but would incur a lot of effort on our part, especially if we want to keep them updated with upstream
    • Emulators are also limited to 1 console in this case, so unless we say "screw it" and just test both 3DS and Wii U stuff in one emulator and pray they aren't different enough to matter, we'd need to do all of this for 2 different emulators
  • Build our own browser. We don't have to go full ladybird on this and build it from scratch. These browser apps use very old versions of WebKit (feature support is generally around Chrome <10), so we can piggy-back off that. According to wiiubrew it's specifically based on "NetFront Browser NX" (https://wiiubrew.org/wiki/Internet_Browser, this is for the Internet Browser app, NOT the browser apps in question here, but it's still a good resource). Nintendo also publishes their works which use open-source works (such as these browsers) on their website here https://support.nintendo.com/jp/oss/index.html so maybe we could find the exact browser version used and go from there? This has some pros and cons too however:
    • Pro: Extremely powerful, we can customize the browser however we want. We can add any features we want including a console, refresh, hot reload, etc. This would also be the fastest way for us to test and iterate changes, and would likely be perfectly accurate to real hardware (assuming we get all the versions correct and do proper API emulation, see below)
    • Con: The most technical of all the options. Building a custom browser, even when having a starting point like this, is still no easy task. We also have to consider the fact that we have to emulate the console-specific JavaScript APIs (shims exist for this, since Nintendo DID develop against these apps in normal browsers, but that's not enough for our purposes)
@jonbarrow jonbarrow converted this from a draft issue Dec 29, 2024
@jonbarrow jonbarrow changed the title Create dedicated browser app emulator/desktop browser for development use [Feature]: Create dedicated browser app emulator/desktop browser for development use Dec 29, 2024
@jonbarrow jonbarrow added awaiting-approval Topic has not been approved or denied feature A feature request labels Dec 29, 2024
@jonbarrow
Copy link
Member Author

Out of curiosity I checked both the Wii U and 3DS Miiverse apps. They use WebKit versions:

  • Wii U: 536.28
  • 3DS: 532.7

536.28 is on GitHub, https://github.com/WebKit/WebKit/tree/safari-536.28-branch, so that's not too bad. But I can't find a single source download for 532.7 anywhere. GitHub doesn't have it, and neither does https://chromium.googlesource.com/external/github.com/WebKit/webkit/+refs. The oldest I can find a download for is 533

I was able to find mentions of older versions on places like https://bugs.webkit.org/show_bug.cgi?id=32690, but I can't find a single source download. At least not a convenient one. The previous link says:

Bad: 532.7+ Webkit 4.0.4 (6531.21.10, r52242) (17 December 2009)

Which has a link to a single commit WebKit/WebKit@c6540e1. However this isn't a link to a 532.7 release

That makes sourcing an accurate version of WebKit somewhat difficult. It seems like it would actually be fairly trivial to get this idea working for the Wii U? But the 3DS is an issue here. If we can find a working release for 532.7 then maybe, but for now all we have is 536.28

@jonbarrow
Copy link
Member Author

This Dockerfile got me pretty far I think. It's kinda hacky in some areas but it made progress:

# * Use an old Ubuntu 12.04 base image to have older tools
FROM ubuntu:12.04

# * Switch out the default Ubuntu repository for old-releases (since 12.04 is EOL)
RUN sed -i '[email protected]@old-releases.ubuntu.com@g' /etc/apt/sources.list \
 && sed -i '[email protected]@old-releases.ubuntu.com@g' /etc/apt/sources.list

# * Update apt-get and install a bunch of dependencies WebKit seems to need
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    gperf \
    bison \
    flex \
    python \
    libglib2.0-dev \
    libgtk2.0-dev \
    libcairo2-dev \
    libpango1.0-dev \
    libicu-dev \
    libsqlite3-dev \
    libxslt1-dev \
    libjpeg-dev \
    libpng12-dev \
    libwebp-dev \
    libcurl4-gnutls-dev \
    autoconf \
    automake \
    libtool \
    pkg-config \
    git \
    subversion \
    gettext \
    ca-certificates \
 && apt-get clean \
 && rm -rf /var/lib/apt/lists/*

# * Cloned from https://github.com/WebKit/WebKit/tree/safari-536.28-branch
# * Before this step I manually delete the WebKit-536.38/.git folder because it has 11GB of history
COPY WebKit-536.38/ /webkit

# * Create a new non-root user and make them own the WebKit source.
# * build-webkit cannot be run as root, but the files aren't owned
# * by the non-root user so they fail to be modified
RUN useradd -ms /bin/bash builder
RUN chown -R builder:builder /webkit

USER builder

WORKDIR /webkit

# TODO - Patch Tools/jhbuild/jhbuild-wrapper to remove some of the git operations. Comment out uses of update_jhbuild() and MANUALLY clone https://gitlab.gnome.org/GNOME/jhbuild to WebKitBuild/Dependencies/Source and MANUALLY checkout 1eedc423f75c605224b430579e4c303292199507

# * Build WebKit in release mode for GTK
RUN ./Tools/Scripts/build-webkit --gtk --release

CMD ["/bin/bash"]

It starts to build everything but dies eventually, and requires editing the source a bit. It ends up dying with:

126.2 Running jhbuild-wrapper build failed.
126.2 Died at /webkit/Tools/Scripts/update-webkitgtk-libs line 24.
126.2 No such file or directory at /webkit/Tools/Scripts/webkitdirs.pm line 1976.
  • Tools/Scripts/webkitdirs.pm line 1976 just calls Tools/Scripts/update-webkitgtk-libs (which it finds and runs)
  • Tools/Scripts/update-webkitgtk-libs line 24 just calls Tools/Scripts/update-webkit-libs-jhbuild with the flags --gtk and then argv (which it finds and runs)
  • Tools/Scripts/update-webkit-libs-jhbuild ends up just calling Tools/Scripts/jhbuild-wrapper with the flags --PLATFORM build (i.e. --gtk build) and then whatever is in argv again (this is a Python script)

But it doesn't tell me where things start to die? It doesn't seem to have any sort of Python errors being logged. I THINK it's making it's way to ./autogen.sh but again no more details. I have no idea why this fails or how to fix it right now

@jonbarrow
Copy link
Member Author

I've made it even farther. Rather than dealing with local copies of the source, I instead opted to mirror them and clone them in the container. This was done because there's weird bootstrapping going on where some code and libraries are generated on the fly and use the full system path of the host, it was just a mess.

A copy of the WebKit version can be found at https://github.com/jonbarrow/webkit-536.28. All this does is mirror WebKit at the time of 536.28 but removes all the git history (since there's 11GB in total) and handles some minor modifications for dead dependency links.

Due to the issues with jhbuild, I have also mirrored it (with it's full git history, as that's required) here https://github.com/jonbarrow/jhbuild.

Updating the Dockerfile to:

# * Use an old Ubuntu 12.04 base image to have older tools
FROM ubuntu:12.04

# * Switch out the default Ubuntu repository for old-releases (since 12.04 is EOL)
RUN sed -i '[email protected]@old-releases.ubuntu.com@g' /etc/apt/sources.list \
 && sed -i '[email protected]@old-releases.ubuntu.com@g' /etc/apt/sources.list

# * Update apt-get and install a bunch of dependencies WebKit seems to need
RUN apt-get update && apt-get install -y --no-install-recommends \
	build-essential \
	gperf \
	bison \
	flex \
	python \
	libglib2.0-dev \
	libgtk2.0-dev \
	libcairo2-dev \
	libpango1.0-dev \
	libicu-dev \
	libsqlite3-dev \
	libxslt1-dev \
	libjpeg-dev \
	libpng12-dev \
	libwebp-dev \
	libcurl4-gnutls-dev \
	autoconf \
	automake \
	libtool \
	pkg-config \
	git \
	subversion \
	gettext \
	ca-certificates \
	wget \
	curl \
 && apt-get clean \
 && rm -rf /var/lib/apt/lists/*

# * Create a new non-root user and make them own the WebKit source.
# * build-webkit cannot be run as root, but the files aren't owned
# * by the non-root user so they fail to be modified
RUN useradd -ms /bin/bash builder
USER builder
RUN git clone https://github.com/jonbarrow/webkit-536.28 /home/builder/webkit

WORKDIR /home/builder/webkit

# * Build WebKit in release mode for GTK
RUN ./Tools/Scripts/build-webkit --gtk --release

CMD ["/bin/bash"]

Now gets the compilation MUCH farther. However it still ends up failing. It exits with:

#10 205.3 *** Configuring glib *** [8/18]
#10 205.3 ./autogen.sh --prefix /home/builder/webkit/WebKitBuild/Dependencies/Root --libdir '/home/builder/webkit/WebKitBuild/Dependencies/Root/lib64' --disable-dtrace --disable-static --disable-gtk-doc 
#10 205.3 *** Error during phase configure of glib: ########## Error running ./autogen.sh --prefix /home/builder/webkit/WebKitBuild/Dependencies/Root --libdir '/home/builder/webkit/WebKitBuild/Dependencies/Root/lib64' --disable-dtrace --disable-static --disable-gtk-doc  *** [8/18]
#10 205.3 *** module gdk-pixbuf not built due to non buildable glib *** [9/18]
#10 205.3 *** module pango not built due to non buildable glib *** [10/18]
#10 205.3 *** module gtk+ not built due to non buildable glib *** [11/18]
#10 205.3 *** module gtk+ not built due to non buildable pango *** [11/18]
#10 205.3 *** module gtk+ not built due to non buildable gdk-pixbuf *** [11/18]
#10 205.3 *** Checking out gnutls *** [12/18]
#10 205.3 wget --continue http://ftp.gnu.org/gnu/gnutls/gnutls-2.12.14.tar.bz2 -O /home/builder/webkit/WebKitBuild/Dependencies/Source/gnutls-2.12.14.tar.bz2
#10 205.3 bunzip2 -dc "/home/builder/webkit/WebKitBuild/Dependencies/Source/gnutls-2.12.14.tar.bz2" | tar xf -
#10 205.3 *** Configuring gnutls *** [12/18]
#10 205.3 ./configure --prefix /home/builder/webkit/WebKitBuild/Dependencies/Root --libdir '/home/builder/webkit/WebKitBuild/Dependencies/Root/lib64' --enable-ld-version-script --enable-cxx --without-lzo --with-libgcrypt --without-p11-kit --disable-static --disable-gtk-doc 
#10 205.3 *** Building gnutls *** [12/18]
#10 205.3 make -j 16
#10 205.3 *** Installing gnutls *** [12/18]
#10 205.3 make install DESTDIR=/home/builder/webkit/WebKitBuild/Dependencies/Root/_jhbuild/root-gnutls
#10 205.3 *** module glib-networking not built due to non buildable glib *** [13/18]
#10 205.3 *** module gnome-icon-theme not built due to non buildable gtk+ *** [14/18]
#10 205.3 *** module libsoup not built due to non buildable glib-networking *** [15/18]
#10 205.3 *** module at-spi2-core not built due to non buildable glib *** [16/18]
#10 205.3 *** module at-spi2-atk not built due to non buildable glib *** [17/18]
#10 205.3 *** module at-spi2-atk not built due to non buildable at-spi2-core *** [17/18]
#10 205.3 *** module webkitgtk-testing-dependencies not built due to non buildable gdk-pixbuf *** [18/18]
#10 205.3 *** module webkitgtk-testing-dependencies not built due to non buildable gtk+ *** [18/18]
#10 205.3 *** module webkitgtk-testing-dependencies not built due to non buildable glib *** [18/18]
#10 205.3 *** module webkitgtk-testing-dependencies not built due to non buildable glib-networking *** [18/18]
#10 205.3 *** module webkitgtk-testing-dependencies not built due to non buildable gnome-icon-theme *** [18/18]
#10 205.3 *** module webkitgtk-testing-dependencies not built due to non buildable libsoup *** [18/18]
#10 205.3 *** module webkitgtk-testing-dependencies not built due to non buildable at-spi2-core *** [18/18]
#10 205.3 *** module webkitgtk-testing-dependencies not built due to non buildable at-spi2-atk *** [18/18]
#10 205.3 *** the following modules were not built *** [18/18]
#10 205.3 glib gdk-pixbuf pango gtk+ glib-networking gnome-icon-theme libsoup at-spi2-core at-spi2-atk webkitgtk-testing-dependencies
#10 205.3 Running jhbuild-wrapper build failed.
#10 205.3 Traceback (most recent call last):
#10 205.3   File "/home/builder/webkit/Tools/jhbuild/jhbuild-wrapper", line 146, in <module>
#10 205.3     ensure_jhbuild()
#10 205.3   File "/home/builder/webkit/Tools/jhbuild/jhbuild-wrapper", line 131, in ensure_jhbuild
#10 205.3     update_webkit_libs_jhbuild()
#10 205.3   File "/home/builder/webkit/Tools/jhbuild/jhbuild-wrapper", line 115, in update_webkit_libs_jhbuild
#10 205.3     raise Exception('jhbuild configure failed with return code: %i' % process.returncode)
#10 205.3 Exception: jhbuild configure failed with return code: 1
#10 205.3 Cleaning jhbuild modules failed! at /home/builder/webkit/Tools/Scripts/webkitdirs.pm line 1962.
#10 ERROR: process "/bin/sh -c ./Tools/Scripts/build-webkit --gtk --release" did not complete successfully: exit code: 2
------
 > [7/7] RUN ./Tools/Scripts/build-webkit --gtk --release:
205.3 Running jhbuild-wrapper build failed.
205.3 Traceback (most recent call last):
205.3   File "/home/builder/webkit/Tools/jhbuild/jhbuild-wrapper", line 146, in <module>
205.3     ensure_jhbuild()
205.3   File "/home/builder/webkit/Tools/jhbuild/jhbuild-wrapper", line 131, in ensure_jhbuild
205.3     update_webkit_libs_jhbuild()
205.3   File "/home/builder/webkit/Tools/jhbuild/jhbuild-wrapper", line 115, in update_webkit_libs_jhbuild
205.3     raise Exception('jhbuild configure failed with return code: %i' % process.returncode)
205.3 Exception: jhbuild configure failed with return code: 1
205.3 Cleaning jhbuild modules failed! at /home/builder/webkit/Tools/Scripts/webkitdirs.pm line 1962.
------
Dockerfile:56
--------------------
  54 |     
  55 |     # * Build WebKit in release mode for GTK
  56 | >>> RUN ./Tools/Scripts/build-webkit --gtk --release
  57 |     
  58 |     CMD ["/bin/bash"]
--------------------
ERROR: failed to solve: process "/bin/sh -c ./Tools/Scripts/build-webkit --gtk --release" did not complete successfully: exit code: 2

I'm really not sure what's happening at this stage tbh. The gnutls link is still alive and it seems to download it, and it's the version that this release of WebKit wants. So I have no idea why it's failing to build

@jonbarrow
Copy link
Member Author

I've got gnutls to build now, and the compilation gets extremely far it seems. This is the new Dockerfile:

# * Use an old Ubuntu 12.04 base image to have older tools
FROM ubuntu:12.04

# * Switch out the default Ubuntu repository for old-releases (since 12.04 is EOL)
RUN sed -i '[email protected]@old-releases.ubuntu.com@g' /etc/apt/sources.list \
 && sed -i '[email protected]@old-releases.ubuntu.com@g' /etc/apt/sources.list

# * Update apt-get and install dependencies including additional ones that might help with glib
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    gperf \
    bison \
    flex \
    python \
    libglib2.0-dev \
    libgtk2.0-dev \
    libcairo2-dev \
    libpango1.0-dev \
    libicu-dev \
    libsqlite3-dev \
    libxslt1-dev \
    libjpeg-dev \
    libpng12-dev \
    libwebp-dev \
    libcurl4-gnutls-dev \
    autoconf2.13 \
    automake \
    libtool \
    pkg-config \
    git \
    subversion \
    gettext \
    ca-certificates \
    wget \
    curl \
    gtk-doc-tools \
    libffi-dev \
    python-dev \
    autopoint \
    zlib1g-dev \
	libc6 \
	libdbus-glib-1-dev \
	libgirepository1.0-dev \
	libxtst-dev \
	libpng-dev \
	libtiff-dev \
	libgif-dev \
	libx11-dev \
	libjasper-dev \
	icon-naming-utils \
	inkscape \
	libxml2-utils \
	intltool \
	libgdk-pixbuf2.0-dev \
	librsvg2-dev \
	libxt-dev \
	mesa-common-dev \
	libgl1-mesa-dev \
 && apt-get clean \
 && rm -rf /var/lib/apt/lists/*

# * Create a new non-root user and make them own the WebKit source
RUN useradd -ms /bin/bash builder
USER builder
RUN git clone https://github.com/jonbarrow/webkit-536.28 /home/builder/webkit

WORKDIR /home/builder/webkit

RUN ./Tools/Scripts/update-webkit
RUN ./Tools/Scripts/build-webkit --gtk --release --verbose

CMD ["/bin/bash"]

This setup seems to almost complete the build, however it fails with errors such as:

#11 709.1 checking whether to enable MathML support... ../../configure: line 21586: syntax error near unexpected token `$as_echo'
#11 709.1 ../../configure: line 21586: `{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable CSS Exclusions" >&5'

and:

#11 727.8 checking the font backend to use... ../../configure: line 21586: syntax error near unexpected token `$as_echo'
#11 727.8 ../../configure: line 21586: `{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable CSS Exclusions" >&5'

It looks like there's 2 issues happening here, neither of which I think we have any control over?

  1. The error is the same but happening at different times in the logs. Which tells me that the error itself may not have anything to do with the surrounding logs? Which is an odd issue?
  2. It straight up looks like a syntax error is being thrown in one of the build scripts. But this isn't a source file included in WebKit. WebKit will pull dependencies down from many sources and even generate it's own source/build files on the fly, so I have 0 real idea where this script is at or what might be wrong with it

I dug around a bit and made some conclusions:

  • https://web.archive.org/web/20130212094227/https://trac.webkit.org/wiki/BuildingGtk was made around when WebKit 536.28 was released (latest commit on the branch is from February 7th 2013 and this capture of the build docs is from February 12th 2013), and all it does is tell you to install some dependencies and then build (though some of the scripts it mentions DON'T exist in this version of WebKit?)
  • This implies that the system you're running should likely already have everything else you need
  • The popular OS versions at this time would have been Debian Squeeze (released 2011. Debian Wheezy would not be released until several months after this WebKit release so it doesn't apply despite being the same year) and Ubuntu 12 (released 2012, all other releases of Ubuntu happened after the final commit date of this branch)
  • I tried Debian Squeeze (and even Wheezy) but the package repositories lack some of the packages WebKit wants (such as libwebp-dev on Squeeze and libsecret-1-dev on Wheezy)
  • This tells me it wants Ubuntu?
  • I tried Ubuntu 12 again but with the exact steps shown on the docs, however it is also missing some packages WebKit says it wants (such as libopus-dev)?
  • I've been able to get really far with Ubuntu 12 by just installing packages as needed (it didn't seem like these missing ones became issues at any point thus far?) but that's when I ran into the above mentioned syntax errors
  • The missing packages were added to Ubuntu in Ubuntu 14, so I also tried that using the exact steps in the docs and it did pass the initial package installation steps and begin to build!! However it ended up dying way earlier than it did on Ubuntu 12, with some older errors I had already fixed now popping back up (they all seem to stem from pixman not being able to compile correctly? Which then causes a cascade of errors of other libs not building because they rely either on pixman or rely on something else that relies on pixman?)

Which all together tells me one of:

  1. WebKit wants a specific distro to build but the docs don't say which one
  2. WebKit docs are wrong and it wants either more packages than it says it wants (which explains the Ubuntu 14 failure) or it wants different packages entirely/says it wants packages it doesn't actually need (which explains the Ubuntu 12 and Debain failures)
  3. WebKit itself is busted in this release (at least for gtk? I have not tried Windows or MacOS)

@jonbarrow
Copy link
Member Author

jonbarrow commented Jan 5, 2025

Current Dockerfile:

# * Use an old Ubuntu 12.04 base image to have older tools
FROM ubuntu:12.04

# * Switch out the default Ubuntu repository for old-releases (since 12.04 is EOL)
RUN sed -i '[email protected]@old-releases.ubuntu.com@g' /etc/apt/sources.list \
 && sed -i '[email protected]@old-releases.ubuntu.com@g' /etc/apt/sources.list

# * Update apt-get and install dependencies including additional ones that might help with glib
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    gperf \
    bison \
    flex \
    python \
    libglib2.0-dev \
    libgtk2.0-dev \
    libcairo2-dev \
    libpango1.0-dev \
    libicu-dev \
    libsqlite3-dev \
    libxslt1-dev \
    libjpeg-dev \
    libpng12-dev \
    libwebp-dev \
    libcurl4-gnutls-dev \
    autoconf \
    automake \
    libtool \
    pkg-config \
    git \
    subversion \
    gettext \
    ca-certificates \
    wget \
    curl \
    gtk-doc-tools \
    libffi-dev \
    python-dev \
    autopoint \
    zlib1g-dev \
	libc6 \
	libdbus-glib-1-dev \
	libgirepository1.0-dev \
	libxtst-dev \
	libpng-dev \
	libtiff-dev \
	libgif-dev \
	libx11-dev \
	libjasper-dev \
	icon-naming-utils \
	inkscape \
	libxml2-utils \
	intltool \
	libgdk-pixbuf2.0-dev \
	librsvg2-dev \
	libxt-dev \
	mesa-common-dev \
	libgl1-mesa-dev \
	libgeoclue-dev \
	gstreamer0.10-plugins-base \
    gstreamer0.10-plugins-good \
    gstreamer0.10-plugins-bad \
    gstreamer0.10-plugins-ugly \
    gstreamer0.10-ffmpeg \
    gstreamer0.10-tools \
    libgstreamer0.10-dev \
    libgstreamer-plugins-base0.10-dev \
	libgtk-3-dev \
	#gcc-4.8 g++-4.8 \
	libgl1-mesa-glx \
	libgstreamer-plugins-base0.10-dev libgstreamer0.10-dev \
 && apt-get clean \
 && rm -rf /var/lib/apt/lists/*

# * Create a new non-root user and make them own the WebKit source
RUN useradd -ms /bin/bash builder
USER builder
RUN git clone https://github.com/jonbarrow/webkit-536.28 /home/builder/webkit

WORKDIR /home/builder/webkit

RUN ./Tools/Scripts/update-webkit
RUN ./Tools/Scripts/build-webkit --gtk --release --verbose

CMD ["/bin/bash"]

With the latest changes to my mirror of WebKit this now fully begins the build process. However it fails in the end for 2 reasons:

#13 1203.5 ../../Source/WebCore/rendering/RenderLayer.cpp: In member function 'void WebCore::RenderLayer::updateLayerPositions(WebCore::RenderGeometryMap*, WebCore::RenderLayer::UpdateLayerPositionsFlags)':
#13 1203.5 ../../Source/WebCore/rendering/RenderLayer.cpp:339:82: error: no matching function for call to 'WebCore::IntPoint::IntPoint(WebCore::FloatPoint)'
#13 1203.5 ../../Source/WebCore/rendering/RenderLayer.cpp:339:82: note: candidates are:
#13 1203.5 ../../Source/WebCore/platform/graphics/IntPoint.h:145:5: note: WebCore::IntPoint::IntPoint(const GdkPoint&)
#13 1203.5 ../../Source/WebCore/platform/graphics/IntPoint.h:145:5: note:   no known conversion for argument 1 from 'WebCore::FloatPoint' to 'const GdkPoint& {aka const _GdkPoint&}'
#13 1203.5 ../../Source/WebCore/platform/graphics/IntPoint.h:83:14: note: WebCore::IntPoint::IntPoint(const WebCore::IntSize&)
#13 1203.5 ../../Source/WebCore/platform/graphics/IntPoint.h:83:14: note:   no known conversion for argument 1 from 'WebCore::FloatPoint' to 'const WebCore::IntSize&'
#13 1203.5 ../../Source/WebCore/platform/graphics/IntPoint.h:82:5: note: WebCore::IntPoint::IntPoint(int, int)
#13 1203.5 ../../Source/WebCore/platform/graphics/IntPoint.h:82:5: note:   candidate expects 2 arguments, 1 provided
#13 1203.5 ../../Source/WebCore/platform/graphics/IntPoint.h:81:5: note: WebCore::IntPoint::IntPoint()
#13 1203.5 ../../Source/WebCore/platform/graphics/IntPoint.h:81:5: note:   candidate expects 0 arguments, 1 provided
#13 1203.5 ../../Source/WebCore/platform/graphics/IntPoint.h:79:7: note: WebCore::IntPoint::IntPoint(const WebCore::IntPoint&)
#13 1203.5 ../../Source/WebCore/platform/graphics/IntPoint.h:79:7: note:   no known conversion for argument 1 from 'WebCore::FloatPoint' to 'const WebCore::IntPoint&'
#13 1203.6 ../../Source/WebCore/rendering/RenderLayer.cpp: In member function 'void WebCore::RenderLayer::paintOverflowControls(WebCore::GraphicsContext*, const WebCore::IntPoint&, const WebCore::IntRect&, bool)':
#13 1203.6 ../../Source/WebCore/rendering/RenderLayer.cpp:2615:63: error: 'enclosingCompositingLayer' was not declared in this scope
#13 1203.6 ../../Source/WebCore/rendering/RenderLayer.cpp: In member function 'void WebCore::RenderLayer::paintLayerContents(WebCore::GraphicsContext*, const WebCore::RenderLayer::LayerPaintingInfo&, WebCore::RenderLayer::PaintLayerFlags)':
#13 1203.6 ../../Source/WebCore/rendering/RenderLayer.cpp:3050:10: warning: unused variable 'rootRelativeBoundsComputed' [-Wunused-variable]
#13 1204.4 make[1]: *** [Source/WebCore/rendering/libWebCore_la-RenderLayer.lo] Error 1
#13 1204.4 make[1]: *** Waiting for unfinished jobs....
#13 1205.9 make[1]: Leaving directory `/home/builder/webkit/WebKitBuild/Release'
#13 1205.9 make: *** [all] Error 2
#13 1206.0 
#13 1206.0 Failed to build WebKit using 'make'!
#13 ERROR: process "/bin/sh -c ./Tools/Scripts/build-webkit --gtk --release --verbose" did not complete successfully: exit code: 2

Note:

  1. ../../Source/WebCore/rendering/RenderLayer.cpp:339:82: error: no matching function for call to 'WebCore::IntPoint::IntPoint(WebCore::FloatPoint)'
  2. ../../Source/WebCore/rendering/RenderLayer.cpp:2615:63: error: 'enclosingCompositingLayer' was not declared in this scope

Error 1 is caused because of the following line: offsetFromRoot = LayoutPoint(geometryMap->absolutePoint(FloatPoint()));. It seems like this conversation is not valid

Error 2 is caused RenderLayer::enclosingCompositingLayer is only defined if ACCELERATED_COMPOSITING, however the offending line 2615 tries to call enclosingCompositingLayer even when ACCELERATED_COMPOSITING is disabled:

#if USE(ACCELERATED_COMPOSITING)
RenderLayer* RenderLayer::enclosingCompositingLayer(bool includeSelf) const
{
    if (includeSelf && isComposited())
        return const_cast<RenderLayer*>(this);

    for (const RenderLayer* curr = compositingContainer(this); curr; curr = compositingContainer(curr)) {
        if (curr->isComposited())
            return const_cast<RenderLayer*>(curr);
    }
         
    return 0;
}
#endif
#if USE(ACCELERATED_COMPOSITING)
        // It's not necessary to do the second pass if the scrollbars paint into layers.
        if ((m_hBar && layerForHorizontalScrollbar()) || (m_vBar && layerForVerticalScrollbar()))
            return;
#endif
        IntRect localDamgeRect = damageRect;
        localDamgeRect.moveBy(-paintOffset);
        if (!overflowControlsIntersectRect(localDamgeRect))
            return;

        RenderView* renderView = renderer()->view();

        RenderLayer* paintingRoot = enclosingCompositingLayer(); // line 2615
        if (!paintingRoot)
            paintingRoot = renderView->layer();

        paintingRoot->setContainsDirtyOverlayScrollbars(true);
        return;
    }

these are just actual bugs in WebKit it seems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-approval Topic has not been approved or denied feature A feature request
Projects
Status: No status
Development

No branches or pull requests

1 participant