Commit graph

483 commits

Author SHA1 Message Date
Patrick Walton
106fdb1d32 layout: Implement word-spacing per CSS 2.1 § 16.4.
This assumes that there are no ligatures that span across multiple
words. Since we have a per-word shape cache, this is a safe assumption
as of now. I have left comments to ensure that, if and when this is
revisted, we make sure to handle it properly.
2014-12-12 17:55:11 -08:00
Patrick Walton
caee309ef4 layout: Implement text-indent per CSS 2.1 § 16.1.
I had to use a somewhat unconventional method of computing text
indentation (propagating from blocks down to inlines) because of the way
containing blocks are handled in Servo.

(As a side note, neither Gecko nor WebKit correctly handles percentages
in `text-align`, at least incrementally -- i.e. when the percentages are
relative to the viewport and the viewport is resized.)
2014-12-12 14:55:41 -08:00
bors-servo
e74a57821f auto merge of #4324 : Adenilson/servo/grooveBorderColor01, r=pcwalton
Groove and Ridge rendering shows a solid border when color is black, that is broken and the current patch will implement a similar behavior as Firefox.
2014-12-12 15:30:56 -07:00
Adenilson Cavalcanti
4d5cca2c69 Adding tests to check behavior. There are 3 files that will test:
a) If the groove border is different from a black border (the bug that this
patch set fixes);
b) If a ridge border is different from a black border (samething);
c) If groove is different from ridge (they should be inverse of each other).

All 3 new tests passes on OSX Yosemite (10.10).
2014-12-12 13:51:24 -08:00
Jack Moffitt
ca156942bc Update PowerMeasure.py post-cargoify 2014-12-12 22:49:02 +01:00
bors-servo
9e83f096a5 auto merge of #4354 : neojski/servo/getElementsByTagNameNS-filter-root, r=Ms2ger
This fixes #4349.
2014-12-12 14:09:53 -07:00
Patrick Walton
07bc97e3e2 gfx: Implement letter-spacing per CSS 2.1 § 16.4.
The ligature disabling code has been manually verified, but I was unable
to reftest it. (The only way I could think of would be to create an
Ahem-like font with a ligature table, but that would be an awful lot of
work.)

Near as I can tell, the method used to apply the spacing (manually
inserting extra advance post-shaping) matches Gecko.
2014-12-12 11:43:43 -08:00
Tomasz Kołodziejski
b30cdb8a5c Follow-up to work done in #4304.
all_elements should ignore root as well.
2014-12-12 10:39:21 -08:00
Tomasz Kołodziejski
5913ba983b Don't include the root element when calling Element#getElementsByTagNameNS. 2014-12-12 10:07:41 -08:00
Ms2ger
2a529cba09 Update web-platform-tests. 2014-12-12 14:49:39 +01:00
Joseph Crail
c254d195ad Fix spelling mistakes in comments. 2014-12-11 23:56:29 -05:00
Patrick Walton
52b9951cad layout: Implement outline per CSS 2.1 § 18.4.
`invert` is not yet supported.

Objects that get layers will not yet display outlines properly. This is
because our overflow calculation doesn't take styles into account and
because layers are always anchored to the top left of the border box.
Since fixing this is work that is not related to outline *per se* I'm
leaving that to a followup and making a note in the code.
2014-12-11 14:25:10 -08:00
Patrick Walton
877f02f1d1 layout: Implement text-transform.
The Unicode awareness of `text-transform` is implemented as well as
possible given the Rust standard library's Unicode support. In
particular, the notion of an alphabetic character is used instead of a
letter.

Gecko has a subclass of text run to handle text transforms, but I
implemented this in a simpler way.
2014-12-10 14:09:08 -08:00
bors-servo
d2a67abea9 auto merge of #4108 : shinglyu/servo/blob, r=jdm
Let's build this incrementally. I implemented a `Blob` that can hold a `DOMString`, and has `size` attribute and `slice(...)` method. I'll finish the rest in later PRs.
2014-12-09 08:43:08 -07:00
Shing Lyu
f2885b8fc7 Issue #1820 - Improve the Blob implementation 2014-12-09 22:52:19 +08:00
Emanuel Rylke
8ed6ace682 Don't include the root element when calling Element#getElementsByTagName
Fixes #4249
2014-12-09 13:41:14 +01:00
bors-servo
7d4ec33375 auto merge of #4298 : Manishearth/servo/zirak-link-attrs, r=Manishearth
Carried over from #4248

Critic review: https://critic.hoppipolla.co.uk/r/3392
2014-12-08 23:30:59 -07:00
Zirak
a586e05e83 Bound several link properties.
Specifically: href, rel, media, hreflang and type.
2014-12-09 11:38:51 +05:30
bors-servo
9f08d563ae auto merge of #4287 : Manishearth/servo/wpt-readme-fix, r=jdm 2014-12-08 15:55:01 -07:00
Patrick Walton
1d845ee4f2 gfx: Update Azure and Skia, and rewrite broken clipping logic.
This exposed some problems in our clipping logic, which was never
properly rewritten for the stacking context reform. The clipping code
worked in terms of a stack of clips, but the new stacking context code
has no concept of a stack of clip regions. Fixing that in turn exposed
some flaky/incorrect tests:

* `borders` had an incorrect reference image, as far as I can tell.

* `negative_margins` had some stray pixels, fixed by changing the text.
2014-12-08 13:45:51 -08:00
bors-servo
feabaf34ac auto merge of #4270 : ProgramFOX/servo/issue-4252, r=saneyuki
Resolves #4252
2014-12-08 13:28:12 -07:00
Manish Goregaokar
868273c027 Update WPTupdate readme for new directory structure 2014-12-09 00:18:52 +05:30
ProgramFOX
6104d5105f Implemented Document#inputEncoding
Resolves #4252
2014-12-08 18:22:29 +01:00
bors-servo
bdb3a2538b auto merge of #4257 : johnathan79717/servo/4008, r=jdm
This is a fix for issue #4008.
2014-12-08 01:55:08 -07:00
bors-servo
b805e74fef auto merge of #4265 : ProgramFOX/servo/issue-4251, r=Ms2ger
Resolves #4251
2014-12-06 07:31:01 -07:00
bors-servo
19c69b1625 auto merge of #4002 : Manishearth/servo/activation, r=jdm
Still need to impl `Activatable` on all activatable elements. I'll probably push those changes to this PR, however they can be made separately as well.
2014-12-06 03:55:04 -07:00
Manish Goregaokar
5511e02a78 Add Comparable trait to js.rs; fixups 2014-12-06 02:51:52 -08:00
Jonathan Hao
8b8eea15c7 Remove an expected failure from tests/wpt/metadata/dom/events/EventTarget-dispatchEvent.html.ini 2014-12-06 02:04:55 -08:00
bors-servo
33836715a8 auto merge of #4254 : medopaw/servo/settimeout-on-sync-error, r=Manishearth
fix #4253
2014-12-05 20:13:02 -07:00
Manish Goregaokar
e7b3caa386 Add oninput/onchange so tests work 2014-12-05 18:49:34 -08:00
Manish Goregaokar
c89ec3910f Hook up synthetic click activation to script_task and <>.click() 2014-12-05 18:33:03 -08:00
Med0paW
dacd21ac52 Issue 4253 - Setting timeout on a sync XHR should throw InvalidAccessErr 2014-12-05 18:29:39 -08:00
Jonathan Hao
ccb4e8b273 Implement the "messageevent" argument to Document#createEvent. #4008 2014-12-05 13:54:07 -08:00
ProgramFOX
2bd1269b02 Update content tests for Document#characterSet 2014-12-05 21:51:59 +01:00
Matthew Rasmus
c97a4d999e Handle default uint attributes properly
...and passing a whole bunch of new tests.
2014-12-05 12:31:32 -08:00
Matthew Rasmus
ed37b53a62 Updates WPT to expect newly passing tests
Addresses reviews

More review addressing
2014-12-05 12:31:31 -08:00
Matthew Rasmus
29241699fd Implements multi line text input for TextArea 2014-12-05 12:21:31 -08:00
ProgramFOX
86282022bd Corrected case of Document#characterSet
Resolves #4251
2014-12-05 20:52:39 +01:00
bors-servo
6bd9bf979b auto merge of #4198 : Manishearth/servo/hyper-droid, r=Manishearth
This is the Hyper pull request, plus the set up for OpenSSL on Android to make it merge.

Sean's commits have been reviewed in #4065 (My Android changes were reviewed by Glenn)
2014-12-05 04:16:11 -07:00
Manish Goregaokar
642e766688 Temporarily change expectations for some wpt tests till hyper gets support for status codes >599 2014-12-05 02:53:40 -08:00
bors-servo
0065c230da auto merge of #4230 : jdm/servo/errorreporter, r=jdm
Rebased from #3822.
2014-12-05 02:28:09 -07:00
Matt Brubeck
cddc6923d4 Implement the HTMLScriptElement.src setter
Fixes #1113.
2014-12-04 21:27:34 -08:00
Ronak Nisher
cbed366bea added ErrorEvent WebIDL and errorevent.rs 2014-12-04 21:22:15 -08:00
Sean McArthur
b7de46970f adjust WPT since hyper fixed some 2014-12-04 10:12:04 -08:00
Shanil Puri
72a5ae7210 Implemeneted ModifyAttribute handler to update DOM elements. 2014-12-03 18:58:44 -08:00
Ms2ger
b24b05d782 Update web-platform-tests. 2014-12-04 01:58:06 +01:00
nkdalmia
f6fb9f862d Implement Window.sessionStorage: Storage Task, Storage Methods (excluding Storage event, QuotaExceededError) 2014-12-03 18:31:50 -05:00
Patrick Walton
1c1c507c03 layout: Implement opacity per CSS-COLOR § 3.2.
This adds the infrastructure necessary to support stacking contexts that
are not containing blocks for absolutely-positioned elements. Our
infrastructure did not support that before. This minor revamp actually
ended up simplifying the logic around display list building and
stacking-relative position computation for absolutely-positioned flows,
which was nice.
2014-12-03 14:17:16 -08:00
Simon Sapin
e1c2210c23 More target path fixup. 2014-12-02 18:23:06 -08:00
Simon Sapin
cc4ea7507f Make build system more independent of current directory. 2014-12-02 18:04:06 -08:00