The Servo Browser Engine
Find a file
Patrick Walton a30379975a layout: Improve our handling of inline absolute containing blocks.
Several issues are addressed in this commit:

* Inline flows now bubble up their absolute descendants instead of
  making the inline flow the containing block for them. (In the future,
  we will need to make the inline flow *sometimes* be the containing
  block for them, but for now it improves sites to unconditionally
  bubble up.)

* Fragments now look at their inline fragment context to determine
  whether they are positioned.

* Inline flows now push the stacking-relative position of the absolute
  containing block down to their inline-block fragments.

* Inline absolute hypothetical fragments can be containing blocks.

* Fixes the logic in
  `containing_block_range_for_flow_surrounding_fragment_at_index`. The
  condition to determine whether fragments are positioned was inverted!

* `Descendants`/`AbsDescendants` has been refactored in order to become
  more friendly to inline absolute containing blocks in the future.

Improves the inline position of the green drop-down arrow in the Google
SERPs. (The block position is still wrong.)
2015-08-17 12:43:12 -07:00
components layout: Improve our handling of inline absolute containing blocks. 2015-08-17 12:43:12 -07:00
etc Use the gold linker when available. 2015-08-15 18:09:18 +02:00
ports Auto merge of #7195 - servo:rustup_20150814, r=Ms2ger 2015-08-14 12:53:54 -06:00
python Auto merge of #7229 - servo:gold, r=metajack 2015-08-15 10:25:26 -06:00
resources Make the Ahem font available to test-css and test-wpt tests. 2015-08-07 21:38:55 +02:00
support Remove double linking of static libs from task_info and azure 2015-07-15 00:51:48 +02:00
tests layout: Improve our handling of inline absolute containing blocks. 2015-08-17 12:43:12 -07:00
.gitattributes Appease Github's Linguist 2015-06-11 00:16:42 -04:00
.gitignore Revert "Auto merge of #7103 - frewsxcv:python-venv, r=metajack" for breaking web-platform-tests. 2015-08-09 11:20:40 +02:00
.gitmodules Remove web-platform-tests submodule 2015-04-03 23:28:51 +01:00
.travis.yml Only for master 2015-03-14 17:16:39 +05:30
cargo-nightly-build Update Cargo nightly version 2015-06-27 00:12:39 +01:00
CONTRIBUTING.md Use canonical Servo GitHub URLs 2015-04-30 18:26:33 +01:00
Info.plist Build an app bundle on OS X 2012-04-23 17:43:45 -07:00
LICENSE Add license 2013-04-03 18:37:29 -07:00
mach Cargoify servo 2014-09-08 20:21:42 -06:00
ORGANIZATION.md Remove the remaining traces of content tests. 2015-04-16 11:29:58 +02:00
README.md Add doc.s.o to the readme 2015-08-05 16:51:41 +05:30
rust-snapshot-hash Upgrade Rust to nightly 2015-08-10 2015-08-15 00:21:33 +05:30
servobuild.example Entries in servobuild.example file 2015-06-13 03:34:54 +05:30

The Servo Parallel Browser Project

Servo is a prototype web browser engine written in the Rust language. It is currently developed on 64bit OS X, 64bit Linux, Android, and Gonk (Firefox OS).

Servo welcomes contribution from everyone. See CONTRIBUTING.md for help getting started.

Prerequisites

On OS X (homebrew):

brew install automake pkg-config python cmake
pip install virtualenv

On OS X (MacPorts):

sudo port install python27 py27-virtualenv cmake

On Debian-based Linuxes:

sudo apt-get install curl freeglut3-dev \
    libfreetype6-dev libgl1-mesa-dri libglib2.0-dev xorg-dev \
    gperf g++ cmake python-virtualenv \
    libssl-dev libbz2-dev libosmesa6-dev libxmu6 libxmu-dev libglu1-mesa-dev

On Fedora:

sudo dnf install curl freeglut-devel libtool gcc-c++ libXi-devel \
    freetype-devel mesa-libGL-devel glib2-devel libX11-devel libXrandr-devel gperf \
    fontconfig-devel cabextract ttmkfdir python python-virtualenv expat-devel \
    rpm-build openssl-devel cmake bzip2-devel libXcursor-devel libXmu-devel mesa-libOSMesa-devel

On Arch Linux:

sudo pacman -S --needed base-devel git python2 python2-virtualenv mesa cmake bzip2 libxmu

Cross-compilation for Android:

Pre-installed Android tools are needed. See wiki for details

Using Virtualbox:

If you're running servo on a guest machine, make sure 3D Acceleration is switched off (#5643)

The Rust compiler

Servo's build system automatically downloads a snapshot Rust compiler to build itself. This is normally a specific revision of Rust upstream, but sometimes has a backported patch or two. If you'd like to know the snapshot revision of Rust which we use, see rust-snapshot-hash.

Building

Servo is built with Cargo, the Rust package manager. We also use Mozilla's Mach tools to orchestrate the build and other tasks.

Normal build

To build Servo in development mode. This is useful for development, but the resulting binary is very slow.

git clone https://github.com/servo/servo
cd servo
./mach build --dev
./mach run tests/html/about-mozilla.html

For benchmarking, performance testing, or real-world use, add the --release flag to create an optimized build:

./mach build --release
./mach run --release tests/html/about-mozilla.html

Building for Android target

git clone https://github.com/servo/servo
cd servo
ANDROID_TOOLCHAIN=/path/to/toolchain ANDROID_NDK=/path/to/ndk PATH=$PATH:/path/to/toolchain/bin ./mach build --android
cd ports/android
ANDROID_SDK=/path/to/sdk make install

Rather than setting the ANDROID_* environment variables every time, you can also create a .servobuild file and then edit it to contain the correct paths to the Android SDK/NDK tools:

cp servobuild.example .servobuild
# edit .servobuild

Running

Use ./mach run [url] to run Servo.

Commandline Arguments

  • -p INTERVAL turns on the profiler and dumps info to the console every INTERVAL seconds
  • -s SIZE sets the tile size for painting; defaults to 512
  • -z disables all graphical output; useful for running JS / layout tests

Keyboard Shortcuts

  • Ctrl-L opens a dialog to browse to a new URL (Mac only currently)
  • Ctrl-- zooms out
  • Ctrl-= zooms in
  • Backspace goes backwards in the history
  • Shift-Backspace goes forwards in the history
  • Esc exits servo

Developing

There are lots of mach commands you can use. You can list them with ./mach --help.

The generated documentation can be found on http://doc.servo.org/servo/index.html