Commit Graph

329 Commits

Author SHA1 Message Date
Greg Guthe
0619875813 servo: Merge #8598 - Split paint task messages from ScriptMsg (from g-k:split-scriptmsg); r=KiChjang
Refs: https://github.com/servo/servo/issues/8592
Source-Repo: https://github.com/servo/servo
Source-Revision: 5e7306bf1965988551cafe6a27baab13eb927bbe
2015-11-26 02:33:47 +05:01
Alan Jeffrey
f4ab2bfdb5 servo: Merge #8667 - Update string cache (from asajeffrey:update-string-cache); r=SimonSapin
Updated string_cache to 0.2, and updated the dependencies that depend on string_cache.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 188fa9378c103093f1f8dac24bff0d9d237fd2bc
2015-11-25 23:41:39 +05:01
Patrick Walton
a2c55b5db1 servo: Merge #8660 - Update ipc-channel to pick up the improved error reporting (from pcwalton:ipc-channel-errors); r=larsbergstrom
Intended to help diagnose intermittent failures.

r? @jdm or @larsbergstrom (or whoever)

Source-Repo: https://github.com/servo/servo
Source-Revision: 13a96fcaf78c299beb2021d3ae9dae8d9e916762
2015-11-25 07:02:15 +05:01
Patrick Walton
8c7de61738 servo: Merge #8599 - compositing: Split Servo up into multiple sandboxed processes (from jdm:e10s-redux); r=metajack
Multiprocess mode is enabled with the `-M` switch, and sandboxing is
enabled with the `-S` switch.

Rebase of #6884.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8b39b9afed6ef8a3d7d3e6609fd301a37825d3e1
2015-11-20 03:30:48 +05:01
Keith Yeung
5b3f4b220a servo: Merge #8530 - Split ConstellationMsg into ScriptMsg and CompositorMsg (from KiChjang:split-constellation-msg); r=jdm
Fixes #8356.

Source-Repo: https://github.com/servo/servo
Source-Revision: acbe41305230a926458596444ca955eff063d9dd
2015-11-19 04:10:20 +05:01
Michael Wu
64aafda294 servo: Merge #8552 - Avoid overflow in freetype/font_context.rs (from michaelwu:avoid_overflow); r=glennw
When new_actual_size < old_actual_size, there is an overflow panic since we're using usize. This breaks Reddit for me.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8950345e0e2c803cfa87105374dfdb30a550cfe0
2015-11-17 12:35:47 +05:01
Michael Howell
2591ecef99 servo: Merge #8524 - Draw layers that are under sub-displaylists (from notriddle:paint_task_deep); r=jdm
Fixes #8325

Source-Repo: https://github.com/servo/servo
Source-Revision: 8f2a3a64f141f175e417e240766f9d7f06be0482
2015-11-14 21:57:22 +05:01
Michael Howell
6310520c6e servo: Merge #8493 - Clean up use of Option in font_cache_task (from notriddle:fct_cleanup); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 118fbd6120fdcbec04858ecddb3ac8be882f4da1
2015-11-13 07:35:50 +05:01
Ms2ger
d1fefa91f1 servo: Merge #8355 - Cleanup exit messages and related code (from Ms2ger:Exit); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 9a465c58429547b59b8a6e1258eaaea46bf7e5a2
2015-11-07 22:05:45 +05:01
Maciej Skrzypkowski
c78e45310c servo: Merge #7696 - Draft. Change PaintContext rects to TypedRects #7023 (from mskrzypkows:PaintContext_Units); r=mbrubeck
I created draft. I'm not sure if we need any units conversion in PaintContext. There is also strange 'clear' method, we use PagePx origin and ScreenPx size is it OK?

Source-Repo: https://github.com/servo/servo
Source-Revision: 8d8ffa8265d67e0ec89cf2d37d1c549b47187cca
2015-11-06 23:53:59 +05:01
Martin Robinson
3d6034f11c servo: Merge #8337 - Remove DisplayListBuildingResult (from mrobinson:remove-display-list-result); r=pcwalton
Always produce a DisplayList when processing nodes for display list
construction. StackingContexts are now added to the positioned content
section of DisplayLists. This makes the code a bit simpler and opens up
the possibility of producing a StackingContext in another section of
the DisplayList. This doesn't change behavior, but is a cleanup
prerequisite for proper inline stacking context support.

Source-Repo: https://github.com/servo/servo
Source-Revision: da25b8c848886d2fc875008de5adcaf13d7c9e99
2015-11-06 05:07:35 +05:01
Martin Robinson
92570bfa5e servo: Merge #8266 - Mix stacking contexts into the positioned content list (from mrobinson:stacking-context-mix); r=pcwalton
Sometimes positioned content needs to be layered on top of stacking
contexts. The layer synthesis code can do this, but the current design
prevents it because stacking contexts are stored in a separate struct
member. In order to preserve tree order, mix stacking contexts into the
positioned content list, by adding a new StackingContextClass
DisplayItem. Such items do not have a base DisplayItem.

In some ways this simplifies the code, because we no longer have to
have a separate code path in the StackingContextLayerCreator.

Source-Repo: https://github.com/servo/servo
Source-Revision: 86e3add8fdc35fc6980bb63695781925607437b8
2015-11-04 06:53:43 +05:01
Martin Robinson
5672e44e9c servo: Merge #8244 - Expand DisplayList layer bounds to whole pixels (from mrobinson:layer-size); r=pcwalton
Before passing these layers to the paint task, expand them to pixel
boundaries. This ensures that subpixel edges of the layer will not be
clipped away and helps prevent rounding issues with layer contents.

Fixes #8166.

Source-Repo: https://github.com/servo/servo
Source-Revision: 94ca87e7ddc07160b9205c0112b60b0a951f0742
2015-10-29 06:26:10 +05:01
Manish Goregaokar
0869f53e87 servo: Merge #8241 - Update euclid to 0.3 (from Manishearth:euclid_up); r=mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: 0d699a2b4419632e31b35352c518e2ef5ffcc9a3
2015-10-28 21:32:15 +05:01
Martin Robinson
7f9d8e7d86 servo: Merge #7950 - Integrate iframes into the display list (from mrobinson:layerize-iframes); r=pcwalton
Instead of always promoting iframes to StackingContexts, integrate them
into the display list. This prevents stacking bugs when
non-stacking-context elements should be drawn on top of iframes.

To accomplish this, we add another step to ordering layer creation,
where LayeredItems in the DisplayList are added to layers described by
the LayerInfo structures collected at the end of the DisplayList.
Unlayered items that follow these layered items are added to
synthesized layers.

Another result of this change is that iframe layers can be positioned
directly at the location of the iframe fragment, eliminating the need
for the SubpageLayerInfo struct entirely.

Iframes are the first type of content treated this way, but this change
opens up the possibility to properly order canvas and all other layered
content that does not create a stacking context.

Source-Repo: https://github.com/servo/servo
Source-Revision: 11d23a41b31c2b2846d1e9c6b40e87ba7e2a095f
2015-10-20 16:01:38 -06:00
Eli Friedman
75c42c7efd servo: Merge #7951 - Add support for pre-wrap and pre-line values for white-space (from eefriedman:white-space); r=pcwalton
This is mostly straightforward.  I had to modify a couple of places
which were accidentally discarding whitespace.

Fixes #1513.

This fixes some relevant tests from the CSS testsuite... but a lot of
them are either manual, or don't pass because of unrelated issues.  (For
example, white-space-mixed-002 renders correctly, but
white-space-mixed-002-ref doesn't because of a float bug.)

I'd appreciate any suggestions for how to go about adding tests for this.

Source-Repo: https://github.com/servo/servo
Source-Revision: c3ab71109ee2ffcc31b40890f4c6739d8f5b1333
2015-10-20 12:38:54 -06:00
Corey Farwell
7ef53c6ece servo: Merge #7987 - Fix issues found by rust-clippy (from frewsxcv:clippy); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: eb7039d04d4c83800ba9d92dc251222f79b83040
2015-10-12 18:33:30 -06:00
Anthony Ramine
eafe1e3613 servo: Merge #7918 - Derive PartialEq on the style Font structure (from nox:partialeq-font); r=mbrubeck
We check the hash first.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0f8493a5669d8c6c29d07881534e144bfc87b511
2015-10-10 12:26:07 -06:00
Martin Robinson
eb37118a1e servo: Merge #7891 - Properly size synthesized layers (from mrobinson:display-list-paint-layer); r=pcwalton
Layers that are composed of several stacking contexts that need to be
rendered on top of other layered content need synthesized layers.
Previously, these layers were placed into a stacking context that was
the same size as their parent. This patch creates a new type of
PaintLayer which simply holds a display list. The layer is sized to the
bounds of the DisplayList and its children are positioned relative to
the parent stacking context.

This will also be useful in the future, when items outside of
StackingContexts are given their own layer for render order purposes.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6d52bdf4ffd5479780df4a3fb0ff07bd7378720e
2015-10-09 17:00:21 -06:00
Paul Rouget
f320ac97d4 servo: Merge #7909 - Snap to screen pixels instead of px (from paulrouget:subpixelPos); r=mbrubeck
Fixes #7904

Source-Repo: https://github.com/servo/servo
Source-Revision: 8ef8c53d2a3e8a54a2bfc98e7e1d71d609098f62
2015-10-09 14:10:44 -06:00
Patrick Walton
791f7a5b16 servo: Merge #7896 - layout: Add a field in the display list for simple border radii on box shadows (from pcwalton:box-shadow-border-radii); r=mbrubeck
Only supported in WebRender (with my upcoming PR) for now.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 5eb1c04e7854d932c0d63f9e5ed4d54ee43deb9b
2015-10-06 15:46:56 -06:00
Ms2ger
8c45f9d5c5 servo: Merge #7827 - Check for font_variant equality in LayoutFontGroupCacheKey::eq (from Ms2ger:jumpy-variant); r=pcwalton
This fixes an issue whereby normal text would intermittently be rendered as
small-caps and vice versa.

Source-Repo: https://github.com/servo/servo
Source-Revision: c0b397db77b87f02d1742efd71f526ba6e89197b
2015-10-06 10:03:24 -06:00
Glenn Watson
5130b51a6c servo: Merge #7807 - Make it possible for iframes to create their own pipeline ID (from glennw:pid); r=jdm
This doesn't change any functionality, but it's the first step towards removing SubpageId.

Adding this change now will allow us to gradually change over code referencing subpage id rather than in one massive PR.

Introduces a namespace for pipeline ID generation - there is a namespace for the constellation thread, and one per script thread.

Source-Repo: https://github.com/servo/servo
Source-Revision: 098bdb5f22500a6e856b085a1140090f63ef8645
2015-10-06 01:08:32 -06:00
Martin Robinson
7845aaf33f servo: Merge #7822 - Rework how StackingContexts are dynamically added to layers (from mrobinson:layer-info); r=pcwalton
StackingContexts are added to layers when it is necessary to maintain
their ordering on top of other layered StackingContexts. Instead of
tracking the information about a layer scattered around into different
structs, combine it all into LayerInfo. LayerInfo will be used in the
future to hold layer information for DisplayItems that are layerized
independently of StackingContexts.

Source-Repo: https://github.com/servo/servo
Source-Revision: 27d468b6674b81c396aa0a13d8fe9eb410c12d6e
2015-10-05 23:05:21 -06:00
Patrick Walton
82da2292ff servo: Merge #7802 - Handle zero-sized source surfaces properly, and upgrade ipc-channel to incorporate the fix for zero-sized shmem on Mac (from pcwalton:zero-size-source-surfaces); r=mbrubeck
Depends on servo/rust-azure#201 and pcwalton/ipc-channel#10.

Closes #7422.

r? @mbrubeck (don't r+ until the upstream dependencies have landed)

cc @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: e2048d57c4c0602c5a6b82db8cb76e6c3e5467fa
2015-10-01 00:08:34 -06:00
Glenn Watson
ad94e13b24 servo: Merge #7811 - Update servo to use published app units crate (from glennw:use-crates-au); r=larsbergstrom
Source-Repo: https://github.com/servo/servo
Source-Revision: 0860be4c28ebaee36a0df4de3510d917b0e08cb7
2015-09-30 22:21:36 -06:00
Matt Brubeck
784ada3fce servo: Merge #7799 - Misc. code cleanup in gfx::text::glyph (from mbrubeck:glyph-cleanup); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: ac448cacbaa194ba7a41abffeac83e95217d5d81
2015-09-30 17:44:02 -06:00
Glenn Watson
40d2827806 servo: Merge #7795 - Split Au type into separate crate, with minimal dependencies (from glennw:app-units-crate); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 35888e5a1d48511ec54ddf8c58f1c7b0c47c5d3c
2015-09-30 15:19:33 -06:00
Martin Robinson
4e10279230 servo: Merge #7751 - Make DisplayList hit testing a method on DisplayList (from mrobinson:refactor-hit-testing); r=pcwalton
This will allow us to hit test into DisplayLists that are not directly
contained in StackingContexts, but instead are children of PaintLayers.
It also makes things slightly simpler.

Source-Repo: https://github.com/servo/servo
Source-Revision: b1d9f438b79743e03cb5b81a0e36f336943e940e
2015-09-30 03:04:16 -06:00
Patrick Walton
0f5d421cf7 servo: Merge #7423 - layout: Make the compositor rather than layout determine the position of each iframe (from pcwalton:iframe-stacking-context-position); r=glennw
The old code that attempted to do this during layout wasn't able to work
for multiple reasons: it couldn't know where the iframe was going to be
on the page (because of nested iframes), and at the time it was building
the display list for a fragment it couldn't know where that fragment was
going to be in page coordinates.

This patch rewrites that code so that only the size of an iframe is
determined during layout, and the position is determined by the
compositor. Layout layerizes iframes and marks the iframe layers with
the appropriate subpage ID so that the compositor can place them
correctly.

Closes #7377.

Source-Repo: https://github.com/servo/servo
Source-Revision: a0cb657fe80859dd8862361631268479d1045432
2015-09-29 19:26:49 -06:00
Matt Brubeck
c0299bc195 servo: Merge #7786 - Use Harfbuzz 1.0 and unicode-script for text shaping (from mbrubeck:harfbuzz-sys); r=pcwalton
Depends on servo/rust-harfbuzz#53 and introduces a dependency on the new servo/unicode-script crate.  r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: a144d086d911375f8d5674ac90ff55a9dcaf0cda
2015-09-29 15:37:11 -06:00
Patrick Walton
da504ba30c servo: Merge #7596 - layout: Load Web fonts asynchronously (from pcwalton:async-web-font-loading); r=mbrubeck
Improves page load times significantly.

Closes #7343.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7933b484300131d3de79edbcf399288b22010616
2015-09-28 12:11:50 -06:00
Glenn Watson
5f3d6b85ab servo: Merge #7766 - A few clean ups for Au type (from glennw:au-tidy); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 007c22737df0f002203ca4e42b56afff7d4e1661
2015-09-28 11:35:04 -06:00
Bryan Bell
4bde6430b3 servo: Merge #7703 - gfx: Fix border-radius panic when a corner has 0px and >0px borders (from bjwbell:bugfix-0px-and-non-0px-border-widths); r=pcwalton
When one border is 0px and the other is >0px then the border corner
drawing code panics when computing the values to use in drawing the
border corner arcs.

This fixes that bug and makes the `draw_corner` function more robust
by explicitly passing an enum, `BorderCorner`, naming which corner is
being drawn e.g. `BorderCorner::TL`.

Add a ref test,
`border_radius_zero_sizes_a.html/border_radius_zero_sizes_ref.html`.

Fixes https://github.com/servo/servo/issues/7700.

r? @pcwalton or @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 4d1be2f56cd7a37c4c803ba12733fca55b57d4de
2015-09-24 18:18:07 -06:00
Martin Robinson
2addce6653 servo: Merge #7710 - A few small bits of refactoring to prepare for more advanced DisplayList layerization (from mrobinson:small-dl-refactor); r=pcwalton
This will be useful when PaintLayers that contain DisplayLists instead
of StackingContexts need to draw themselves. This is a simple
preparatory refactoring and doesn't change any behavior.

Source-Repo: https://github.com/servo/servo
Source-Revision: 09b970af4aeba749146a9a9215e346653016672b
2015-09-23 17:22:31 -06:00
Ravi Shankar
7d512d50d1 servo: Merge #7698 - sorted the declarations in various files (from Wafflespeanut:sorting); r=frewsxcv
This is a direct extract from my abandoned PR for a lint (#7546), along with some rather clumsy modifications (only on `components/script/dom/mod.rs` and `components/style/lib.rs`), because I had to sort some of the files again to make peace with tidy, which hasn't been educated about sorting yet!

Source-Repo: https://github.com/servo/servo
Source-Revision: a7208869f2903e36f9b2f540b55b50283d7df466
2015-09-23 15:02:56 -06:00
Manish Goregaokar
a0f53e1f0e servo: Merge #7697 - Rust upgrade to rustc 1.5.0-dev (6217b002b 2015-09-21) (from servo:rustup_20150921); r=Ms2ger
Snapshot doesn't exist yet. Rust master+ should work.

Also https://github.com/serde-rs/aster/pull/33 hasn't merged yet.

r? @Ms2ger @larsbergstrom

Source-Repo: https://github.com/servo/servo
Source-Revision: f7f16870bebdc9359661544054259b37780f1331
2015-09-23 06:45:18 -06:00
Brandon Fairchild
f7fb1e4b4a servo: Merge #7662 - Check for multiple import blocks separated by whitespace (from nerith:import); r=frewsxcv
Fixes #7381.

Source-Repo: https://github.com/servo/servo
Source-Revision: a0d3c9223f09757124b1520c4f17e94fa8bbe249
2015-09-19 13:34:51 -06:00
Bryan Bell
20434e217e servo: Merge #7679 - Add css twitter fail whale html test & update ellipse_to_bezier comment (from bjwbell:reftest-twitter-fail-whale); r=pcwalton
cgaebel had a TODO for a css twitter fail whale reftest, which depended on elliptical border-radius support.
I didn't see any feasible way other than a reference image for border_twitter_fail_whale_b.html.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: c91c0188f279b9d7edf706fc7ad3111948156ed6
2015-09-18 22:54:44 -06:00
Hugo Thiessard
357588437d servo: Merge #7680 - fixes #7390 : tidy now check the order of mod declarations even whith attribute (from Mylainos:Issue-#7390); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: d1b85de762c0193276010a019f931526c34c04ce
2015-09-18 14:44:48 -06:00
Matt Brubeck
d460f99bca servo: Merge #7667 - Snap to screen pixels instead of px (from mbrubeck:oh-snap); r=glennw
Fixes #7665. r? @glennw

Source-Repo: https://github.com/servo/servo
Source-Revision: 491d62c27cbd55ea5c4269bca11dc8584c77e170
2015-09-18 04:09:26 -06:00
Martin Robinson
a8570d696e servo: Merge #7587 - Ensure unique LayerIds for pseudo-elements (from mrobinson:layer-id); r=pcwalton
Currently pseudo-elements, like the fragments created for ::before and
::after, with layers will have the same LayerId as the body of their
owning fragments. Instead all LayerIds should be unique.

Fixes #2010.

Source-Repo: https://github.com/servo/servo
Source-Revision: cf13e806fe2f4cf5ad5f30efd16d7bd3f501f8b3
2015-09-17 08:53:39 -06:00
Patrick Walton
12ae75107c servo: Merge #7644 - layout: Draw the insertion point in input elements (from pcwalton:carrot); r=mbrubeck
Known issues:

* The caret doesn't show up if there's no text present, because we don't create text runs in that case. This should be a followup.

* Text runs don't support decomposing ligatures into their constituent subglyphs for advance computation, so the caret won't appear inside a ligature. This is a text run bug.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 6cd098da302db85975d0967ddee836f04eae3bd5
2015-09-17 05:50:41 -06:00
Martin Robinson
4936135d02 servo: Merge #7648 - Improve printing of DisplayLists (from mrobinson:print-tree); r=glennw
Use box tree characters to make DisplayLists easier to scan when
printing them out.

This is what the output looked like before:
```
#### start printing display list.
"####" Stacking context at Rect(800px×608px at (0px,0px)) with overflow Rect(800px×608px at (0px,0px)):
#### SolidColor(0,0,0,0). Rect(800px×608px at (0px,0px))
#### SolidColor(0,0,0,0). Rect(784px×0px at (8px,0px))
#### SolidColor(0,0.5019608,0,1). Rect(100px×100px at (0px,0px))


#### Child layers list length: 1
"########" Stacking context at Rect(100px×100px at (0px,0px)) with overflow Rect(100px×100px at (0px,0px)):
######## SolidColor(1,0,0,1). Rect(100px×100px at (0px,0px))


######## Child layers list length: 1
"############" Stacking context at Rect(100px×100px at (0px,0px)) with overflow Rect(100px×100px at (0px,0px)):
```

This is what it looks like after this patch:
```
┌ DisplayList
│  ├─ Layered StackingContext at Rect(800px×608px at (0px,0px)) with overflow Rect(800px×608px at (0px,0px)):
│  │  ├─ Block Backgrounds and Borders
│  │  │  ├─ SolidColor rgba(0, 0, 0, 0) @ Rect(800px×608px at (0px,0px)) (7f926f46f1f0)
│  │  │  └─ SolidColor rgba(0, 0, 0, 0) @ Rect(784px×0px at (8px,0px)) (7f926f46f2e0)
│  │  ├─ Layered StackingContext at Rect(100px×100px at (0px,0px)) with overflow Rect(100px×100px at (0px,0px)):
│  │  │  ├─ Backgrounds and Borders
│  │  │  │  └─ SolidColor rgba(1, 0, 0, 1) @ Rect(100px×100px at (0px,0px)) (7f926f46f310)
│  │  │  ├─ Layered StackingContext at Rect(100px×100px at (0px,0px)) with overflow Rect(100px×100px at (0px,0px)):
│  │  ├─ Layered StackingContext at Rect(100px×100px at (0px,0px)) with overflow Rect(100px×100px at (0px,0px)):
│  │  │  ├─ Backgrounds and Borders
│  │  │  │  └─ SolidColor rgba(0, 0.5019608, 0, 1) @ Rect(100px×100px at (0px,0px)) (7f926f46f3a0)
```

Source-Repo: https://github.com/servo/servo
Source-Revision: 4e9a888f1ac58866833418ee5e8253358918b741
2015-09-16 20:43:59 -06:00
Jinwoo Song
2a438e5141 servo: Merge #7605 - Implement "transform: skew()" (from nox:skew); r=mbrubeck
Thanks to @Jinwoo-Song for the original commit, which I just rebased and cleaned up. Fixes #6237.

Source-Repo: https://github.com/servo/servo
Source-Revision: 6a12f00d6d392651bae10365b4c806f36d704b21
2015-09-16 06:31:48 -06:00
Mathieu Rheaume
fe567c36c0 servo: Merge #7559 - Remove 'get_*' on getters as per RFC 0344 on canevas, compositing, devtools, gfx, layout, net, profile, servo and webdriver_server (from ddrmanxbxfr:RFC-0344-Work); r=nox
Hi guys,

I just gave a big pass of RFC-0344 as per issue #6224 .

Pretty much renamed all the get_* fn that were used to fetch values.

I hope I didn't rename too much.

As said in the issue discussion, I didn't touch at the scripts folder so we keep the unsafe ones pretty explicit.

I've ran the whole pass of test, everything seems to be still working right :).

Please give feedback on this PR.

Thanks for looking into it.

Source-Repo: https://github.com/servo/servo
Source-Revision: b05f4aa3aa3085e65cb75433ae37bf272216d033
2015-09-12 18:29:56 -06:00
Bryan Bell
6a96bf0eb9 servo: Merge #7527 - Use SIMD in fast path for advance_for_char_range (from bjwbell:simd_advance_for_char_range); r=metajack
In advance_for_char_range add a fast SIMD code path for the the common
case where there are no detailed glyphs.


r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: c83825938346f794790bcd1343b7375e9e34f443
2015-09-09 16:55:16 -06:00
Bryan Bell
754f4baf13 servo: Merge #7577 - gfx: Fix bug with 1px width borders disappearing (from bjwbell:borders_pixel_rounding_bug); r=mbrubeck
In to_nearest_azure_rect when rounding to pixel coordinates, maintain
the invariant of rect non-overlap (if before rounding two rects don't overlap).

The previous code rounded the rect top left corner to the nearest pixel with
the size rounded to the nearest pixel multiple which can violate the
non-overlap condition, e.g.
10px×9.60px at (0px,6.6px) & 10px×9.60px at (0px,16.2px)
would round to
10px×10.0px at (0px,7.0px) & 10px×10.0px at (0px,16.0px), which overlap.

Instead round each corner to the nearest pixel.

For rects that dont need to satify the non-overlap condition and with
width or height between 0.5px and 1px, rounding each rect corner to the
nearest pixel can yield an empty rect e.g.
10px×0.6px at 0px,28.56px -> 10px×0px at 0px,29px.

For this scenario a new function to_nearest_non_empty_azure_rect
rounds the rect top left corner to the nearest pixel and the rect size
to the nearest pixel multiple. It's possible for non-overlapping rects
after this rounding to overlap.

This should fix https://github.com/servo/servo/issues/7184 "rounding ...borders not to be visible", without breaking https://github.com/servo/servo/issues/7152 "Underlines less than 1px high sometimes invisible".

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: f29ddb4b5d5eed595df37fa989511d2cb3aa8dfd
2015-09-09 13:30:41 -06:00
Martin Robinson
9546305f71 servo: Merge #7563 - Layerize StackingContexts that are on top of layers (from mrobinson:layerize-stacking-contexts); r=pcwalton
StackingContexts that should be painted on top of StackingContexts that
are already layerized should automatically get their own layer. This
will ensure proper painting order.

Source-Repo: https://github.com/servo/servo
Source-Revision: c0381c732569b9abe6282c6c750533bc271a2019
2015-09-09 10:52:56 -06:00
Eli Friedman
4875f833cb servo: Merge #7523 - Fix up some unnecessary uses of unsafe (from eefriedman:unnecessary-unsafe); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: be9a9ffda10fa2c50b13f79dabd49255f29f12f6
2015-09-09 00:05:17 -06:00