Coder Social home page Coder Social logo

documentation's Introduction

WebKit

WebKit is a cross-platform web browser engine. On iOS and macOS, it powers Safari, Mail, Apple Books, and many other applications. For more information about WebKit, see the WebKit project website.

Trying the Latest

On macOS, download Safari Technology Preview to test the latest version of WebKit. On Linux, download Epiphany Technology Preview. On Windows, you'll have to build it yourself.

Reporting Bugs

  1. Search WebKit Bugzilla to see if there is an existing report for the bug you've encountered.
  2. Create a Bugzilla account to report bugs (and comment on them) if you haven't done so already.
  3. File a bug in accordance with our guidelines.

Once your bug is filed, you will receive email when it is updated at each stage in the bug life cycle. After the bug is considered fixed, you may be asked to download the latest nightly and confirm that the fix works for you.

Getting the Code

Run the following command to clone WebKit's Git repository:

git clone https://github.com/WebKit/WebKit.git WebKit

You can enable git fsmonitor to make many git commands faster (such as git status) with git config core.fsmonitor true

Building WebKit

Building for Apple platforms

Install Xcode and its command line tools if you haven't done so already:

  1. Install Xcode Get Xcode from https://developer.apple.com/downloads. To build WebKit for OS X, Xcode 5.1.1 or later is required. To build WebKit for iOS Simulator, Xcode 7 or later is required.
  2. Install the Xcode Command Line Tools In Terminal, run the command: xcode-select --install

Run the following command to build a macOS debug build with debugging symbols and assertions:

Tools/Scripts/build-webkit --debug

For performance testing, and other purposes, use --release instead.

Embedded Builds

To build for an embedded platform like iOS, tvOS, or watchOS, pass a platform argument to build-webkit.

For example, to build a debug build with debugging symbols and assertions for embedded simulators:

Tools/Scripts/build-webkit --debug --<platform>-simulator

or embedded devices:

Tools/Scripts/build-webkit --debug --<platform>-device

where platform is ios, tvos or watchos.

Using Xcode

You can open WebKit.xcworkspace to build and debug WebKit within Xcode. Select the "Everything up to WebKit + Tools" scheme to build the entire project.

If you don't use a custom build location in Xcode preferences, you have to update the workspace settings to use WebKitBuild directory. In menu bar, choose File > Workspace Settings, then click the Advanced button, select "Custom", "Relative to Workspace", and enter WebKitBuild for both Products and Intermediates.

Building the GTK Port

For production builds:

cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja
ninja
sudo ninja install

For development builds:

Tools/gtk/install-dependencies
Tools/Scripts/update-webkitgtk-libs
Tools/Scripts/build-webkit --gtk --debug

For more information on building WebKitGTK, see the wiki page.

Building the WPE Port

For production builds:

cmake -DPORT=WPE -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja
ninja
sudo ninja install

For development builds:

Tools/wpe/install-dependencies
Tools/Scripts/update-webkitwpe-libs
Tools/Scripts/build-webkit --wpe --debug

Building Windows Port

For building WebKit on Windows, see the WebKit on Windows page.

Running WebKit

With Safari and Other macOS Applications

Run the following command to launch Safari with your local build of WebKit:

Tools/Scripts/run-safari --debug

The run-safari script sets the DYLD_FRAMEWORK_PATH environment variable to point to your build products, and then launches /Applications/Safari.app. DYLD_FRAMEWORK_PATH tells the system loader to prefer your build products over the frameworks installed in /System/Library/Frameworks.

To run other applications with your local build of WebKit, run the following command:

Tools/Scripts/run-webkit-app <application-path>

iOS Simulator

Run the following command to launch iOS simulator with your local build of WebKit:

run-safari --debug --ios-simulator

In both cases, if you have built release builds instead, use --release instead of --debug.

Linux Ports

If you have a development build, you can use the run-minibrowser script, e.g.:

run-minibrowser --debug --wpe

Pass one of --gtk, --jsc-only, or --wpe to indicate the port to use.

Contribute

Congratulations! You’re up and running. Now you can begin coding in WebKit and contribute your fixes and new features to the project. For details on submitting your code to the project, read Contributing Code.

documentation's People

Contributors

clopez avatar dpino avatar dustinbrett avatar emw-apple avatar fujii avatar jonwbedard avatar khei4 avatar mcatanzaro avatar mirnovov avatar moebazzigit avatar philn avatar r-otaka avatar rniwa avatar sammygill avatar sideshowbarker avatar stwrt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

documentation's Issues

make preview error 64 -- Unknown option '--product'

make preview

DOCC_HTML_DIR=ThirdParty/docc-render-artifact/dist swift package --disable-sandbox preview-documentation --product WebKit
error: Unknown option '--product'
Usage: swift package
See 'package --help' for more information.
make: *** [preview] Error 64

ENV
Version 13.0 (13A233)
macOS big Sur 11.4

Unable to make docc target

I ran the make docc command in the Documentation directory and got the following error:

xcodebuild: error: The workspace named "Documentation" does not contain a scheme named "WebKit". The "-list" option can be used to find the names of the schemes in the workspace.
make: *** [docc] Error 65

Cannot install mkdocs-material due to a dependency error

Looks like mkdocs-material can't be installed right now due to the following error :(

Collecting pymdown-extensions>=9.0 (from mkdocs-material)
  ERROR: Could not find a version that satisfies the requirement pymdown-extensions>=9.0 (from mkdocs-material) (from versions: 1.0.0, 1.0.1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.6.1, 1.7, 1.8, 2.0, 3.0, 3.1, 3.2, 3.2.1, 3.3, 3.4, 3.5, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 4.5.1, 4.6, 4.7, 4.8, 4.9, 4.9.1, 4.9.2, 4.10, 4.10.1, 4.10.2, 4.11, 4.12, 5.0, 6.0, 6.1, 6.2, 6.2.1, 6.3, 7.0b1, 7.0b2, 7.0rc1, 7.0rc2, 7.0, 7.1, 8.0)
ERROR: No matching distribution found for pymdown-extensions>=9.0 (from mkdocs-material)

Problems: Redundancy between docs.webkit.org & wiki; confusion; PR costs. Solution: Move/centralize all doc sources into one canonical place where project committers/reviewers can directly land changes without needing to raise PRs

Problems

  • Some docs content in the wiki is similar/redundant with docs.w3.org content.
  • Having similar docs in multiple places is confusing for users. Which place is canonical — which should they use/trust?
  • Some (potential) contributors reluctant/unwilling to do PRs to add/change docs.webkit.org docs; time/trouble costs.
  • Many (most) contributors more likely to contribute to the wiki; wiki contributing is easier + quicker (lower costs).
  • Without totally disabling wiki, no way to prevent new wiki content redundant with existing docs.webkit.org content.

Goals/requirements

  • Have only one place where all the canonical doc sources are stored, only place where contributors make changes.
  • With no need to raise docs PRs, contributors can make canonical docs changes directly (i.e., the way the wiki works).

Solution A: Move everything into the wiki

  • Take all existing content from wiki & docs.webkit.org, merge/centralize it into the wiki (i.e., the wiki’s backend repo).
  • Serve/deploy/publish centralized content to both docs.webkit.org and wiki as the single “canonical” project docs.

Solution B: Move all to docs.webkit.org repo, but allow commits with no PRs.

  • Take all existing content from the wiki and merge/centralize it into the docs.webkit.org repo.
  • Change docs.webkit.org repo settings so project committers/reviewers land changes directly, with no need to do PRs.
  • Serve/deploy/publish all centralized content from docs.webkit.org as the single “canonical” project docs collection.
  • Completely disable the WebKit wiki (via the https://github.com/webKit/WebKit/ repo settings).

Rationale

A single centralized/canonical repo for the docs:

  • Eliminates all current redundancy.
  • Avoids causing user confusion about which is most up-to-date & canonical — because it’d all be the same content.
  • Makes contributing as easy as possible for all potential contributors; lowest barriers, lowest time/trouble costs.
  • (Former) wiki contributors get the new benefit of their contributions automatically showing up at docs.webkit.org.
  • Gives potential contributors significantly more incentive to take the time to contribute quality docs content.

Questions/arguments against + answers/rebuttals for those


Q: If all content sources are moved to the wiki, what use would anybody then have for docs.webkit.org?

A: Good question. One good answer: docs.webkit.org does already exist and is a cool URL and Cool URIs don't change. Also, docs.webkit.org gives the project a way to brand/theme/skin presentation of the docs in whatever way the project chooses — rather than being restricted to the simple/limited common theme/branding GitHub’s wiki engine produces.


Q: docs.webkit.org uses a hierarchical structure (with subdirectories), but the wiki is a flat structure with just a single top-level set of pages, and no subdirectories — which doesn’t allow hierarchical structure.

A. True. So part of the process of moving/migrating the existing docs from docs.webkit.org back into the wiki would require flattening out the directory structure, so all the pages are maintained as a single flat set in a top-level directory.

But there are still some ways to impose a kind of hierarchical structure. One of those ways it use a structured naming convention for page names. See https://github.com/validator/validator/wiki for example, which uses a naming convention where some page names are prefaced with Output » while others are prefaced with Service ».

With such a convention, you can even have multi-level hierarchical names like Service » Input » file upload. And so in, the Pages sidebar of that page (and other pages), the wiki automatically hierarchically sorts the page names::

image


Q: Somebody would need to do the actual work of setting it all up.

A: I’d be personally willing to put time and work into making it happen.


Implementation notes (complications to do deal with)

Here are some details about how the centralized solution should be implemented/deployed:

Make the entire docs/ subdirectory into a git submodule

The most-straightforward way to implement the proposed solution would be to change the entire existing https://github.com/WebKit/Documentation/tree/main/docs directory into just being a git submodule from the https://github.com/WebKit/WebKit.wiki.git wiki repo.

For better docs.webkit.org site navigation, add in an extra mkdocs module, or move to new tool

Serving content from the (flat-structure) wiki at docs.webkit.org introduces some additional complications around page-titleing and sorting and such that would benefit from having some finer control over navigation features for the site.

While it’s true the core mkdocs engine itself doesn’t provide good control over site navigation and page titleing/sorting in navigation, etc. — there are some third-party plug-ins that do much more. Probably the best is mkdocs-literate-nav

Or else it could also be worth investigating whether it’d be more productive to move to another tool that’s more closely suited to publish-a-website-from-a-GitHub-wiki needs.


Disable trac, or make it read only

https://trac.webkit.org/wiki still exists and is unfortunately still being mistakenly cited as an authoritative source for WebKit documentation. It would be unfortunate to lose all our history on trac, but having multiple sources of documentation is harmful. We should surely redirect users towards https://docs.webkit.org/ somehow.

Brainstorming options:

  • Archive the history somehow (archive.org has done this already) and then turn off trac
  • Add a warning banner to the top of the page directing people to use the new site (example), and leave trac running; the downside here is got to keep maintaining the infrastructure, and our trac instance is already a couple versions behind upstream
  • Convert the website to static HTML pages (example); this might be too much effort to be worthwhile, but is probably the nicest solution as we can maintain previous content while still turning off trac itself

[WebKit WWDC23 Blog post] [JPEG XL] Lossless JPEG Transcode saves ~20%, not 60%

First of all, sorry for opening the issue here. I understand that it may not be the most appropriate place, but I hope this can get maintainers' attention, so that the blog post can be updated to reflect correct information about JPEG XL.

In the WebKit WWDC23 blog post, it claimed that:

And you can recompress existing JPEG files into JPEG XL without any loss of data while significantly reducing their size — up to 60%!

This is not the case - @jonsneyers (one of the core JPEG XL devs) has written the following in this post:

A unique feature of JPEG XL is that it is possible to recompress existing JPEG images (of which there are a lot out there!) to a JPEG XL file that is on average about 20% smaller, without introducing any loss. In fact, the bit-exact same JPEG file can be reconstructed from the JPEG XL file.

He also explained in the JPEG XL Discord (link to message):

And you can recompress existing JPEG files into JPEG XL without any loss of data while significantly reducing their size — up to 60%!

That is also quite drastically wrong. Lossless recompression of JPEG will give you ~20% size reduction. The 60% size reduction is only true if you compare something like JPEG produced by a camera vs JXL produced from the same raw data at a quality similar to the JPEG quality.

Thank you very much in advance for looking into this.

Windows Port S3 URL no longer visible?

In regards to the Windows Port instructions, it's been pointed out to me that the step involving transfer-to-s3 is no longer exists in the same way.

I went into a recent build (15606) and I see now that the step is called upload-file-to-s3 and it doesn't contain an S3 URL. I have gone back and found that Build 15405 was the last one to use transfer-to-s3.

15606 (upload-file-to-s3)

image

15405 (transfer-to-s3)

image

I am wondering what the new recommended way is to get WinCairo setup, or where the new URL can be found?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.