karenher
db2082bc6e
Store parser's current line when script elements are created.
...
Use the newly stored line as the starting line number when
evaluating JS. This ensures that inline scripts will report
errors with meaningful line numbers.
2017-01-11 21:11:00 -05:00
charlesvdv
19e31d5c50
Handle properly alternate stylesheet
2017-01-10 15:38:38 +01:00
mrnayak
a3026499f4
Implement Subresource Integrity
...
Implemented response validation part of
https://w3c.github.io/webappsec-subresource-integrity/ .
Implemented step eighteen of the main fetch. If a request has integrity
metadata, then following steps are performed
*Wait for response body
*If the response does not have a termination reason and response does not
match request’s integrity metadata, set response to a
network error.# Please enter the commit message for your changes. Lines starting
2017-01-08 08:52:18 +05:30
Ms2ger
1bc0862214
Remove and allow some dead code.
2016-12-22 16:06:22 +01:00
Emilio Cobos Álvarez
b9901fbd89
script: Abstract HTMLLinkElement and StyleElement into StylesheetOwner.
2016-12-16 17:59:45 +01:00
Emilio Cobos Álvarez
072db0279a
script: Clarify htmllinkelement's comment about pending_loads
.
2016-12-16 16:57:21 +01:00
Emilio Cobos Álvarez
7582a2d59d
script: Move the stylesheet loading code from htmllinkelement to stylesheet_loader. Make it track subresource loads properly.
2016-12-16 16:57:20 +01:00
Emilio Cobos Álvarez
21bf91c386
script: Add infrastructure to track subresource loads in <link> and <style> elements.
2016-12-16 16:57:20 +01:00
Anthony Ramine
1327ebd52f
Remove HeapGCValue
...
It could be used to have mutable JSVal fields without GC barriers.
With the removal of that trait, MutHeap and MutNullableHeap can respectively
be replaced by MutJS and MutNullableJS.
2016-12-12 10:47:54 -10:00
Corey Farwell
449f6337d4
Rename Reflectable
to DomObject
.
...
Fixes https://github.com/servo/servo/issues/8473 .
2016-12-08 08:50:35 -10:00
Anthony Ramine
620a67ff14
Mark JSTraceable and its method as unsafe
2016-12-06 13:15:06 -10:00
Cameron McCormack
64ff6dc103
Implement StyleSheet.disabled.
2016-11-25 11:27:51 +08:00
Manish Goregaokar
972e9ac0fb
Add support for LinkStyle's sheet getter on <style> and <link>
2016-11-23 09:30:33 -08:00
bors-servo
30867001d1
Auto merge of #14232 - servo:moar-locks, r=upsuper
...
CSSOM: Make Stylesheet fields have their own synchronization
<!-- Please describe your changes on the following line: -->
r? @upsuper
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix bug 1314208.
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14232 )
<!-- Reviewable:end -->
2016-11-21 19:33:57 -06:00
Simon Sapin
236c575c50
Replace Stylesheet::set_media with a constructor argument
2016-11-18 17:12:44 +01:00
Pu Xingyu
91f3d4f474
Remove redundant url clones
...
They are now redundant since now document.url() returns a struct rather
than a reference.
2016-11-18 12:39:22 +08:00
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often.
2016-11-17 18:34:23 +01:00
Manish Goregaokar
177d6fa4ee
Support basic immutable CSSOM
2016-11-15 06:56:18 -08:00
Keith Yeung
72cb856e31
Properly implement TaskSource for NetworkingTaskSource
2016-11-11 14:50:42 -08:00
Xidorn Quan
5dfcb07f6a
Allow empty media query list
...
And make empty list the default value of MediaList.
This commit also removes Option wrapper of Stylesheet.media because
a stylesheet should always have an associated media query list.
2016-11-10 17:42:16 +11:00
Xidorn Quan
2733ec3bdc
Rename media_queries::MediaQueryList to MediaList
2016-11-08 13:09:31 +11:00
bors-servo
73c9847ef8
Auto merge of #14036 - frewsxcv:event, r=nox
...
A couple improvements to `EventTarget` event firing.
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14036 )
<!-- Reviewable:end -->
2016-11-04 06:43:56 -05:00
Ms2ger
277c6d0154
Move ReferrerPolicy to net_traits.
2016-11-04 10:43:37 +01:00
Corey Farwell
f447040ea9
Migrate EventTarget
event firing functions to use Atom
s.
...
This allows us to utilize more `atom` macros.
2016-11-03 17:04:30 -04:00
Corey Farwell
c3b279a4c3
Remove "fire a simple event" concept, refactor event firing API.
...
"fire a simple event" concept was removed in
https://github.com/whatwg/html/pull/1933 .
2016-11-03 15:01:07 -04:00
Simon Sapin
53b638c0e2
Update to string-cache 0.3
2016-11-03 16:23:05 +01:00
Anthony Ramine
0b3ab875f4
Remove intrinsic Root::r()
2016-10-11 19:44:32 +02:00
Anthony Ramine
d8e92bb271
Rename Reflectable::global_scope to global
2016-10-06 21:36:41 +02:00
Anthony Ramine
ae6af5172b
Introduce Reflectable::global_scope
2016-10-06 21:35:38 +02:00
Anthony Ramine
27f100b1d4
Introduce GlobalScope::pipeline_id
2016-10-06 20:59:13 +02:00
Anthony Ramine
f789e73fd2
Introduce GlobalScope::constellation_chan
2016-10-06 20:59:12 +02:00
bors-servo
710bd7e1dc
Auto merge of #13575 - servo:fetch-link, r=jdm
...
Use the fetch stack for stylesheets.
Fixes #13462 .
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13575 )
<!-- Reviewable:end -->
2016-10-04 18:12:18 -05:00
Ms2ger
2980903bfb
Use the fetch stack for stylesheets.
...
Fixes #13462 .
2016-10-04 17:12:56 +02:00
Simon Sapin
aeb3efda1f
Make script build without impl<T: HeapSizeOf> HeapSizeOf for Arc<T>
.
...
The removal of this impl is not included in this commit.
CC https://github.com/servo/heapsize/issues/37#issuecomment-249861171
2016-10-04 13:45:58 +02:00
Ms2ger
e2f5ce4893
Ignore stylesheet links with an empty href.
2016-09-30 11:23:45 +02:00
Ms2ger
ebbf9fd4d5
Deindent the main part of handle_stylesheet_url.
2016-09-30 10:58:45 +02:00
Ms2ger
d207919a02
Pass the correct attribute to handle_stylesheet_url.
2016-09-27 17:46:36 +02:00
Nikhil Shagrithaya
9d378ceb74
use .set_tokenlist_attribute to set rel content attribute in SetRel
...
Removed .ini files expecting crashes
2016-09-23 17:36:59 +00:00
Ying-Ruei Liang(KK)
55a2270e16
Bring referrer policy delivery to <a> and <link> via rel attribute
2016-09-20 21:17:37 +08:00
Arthur Marble
883902bd97
Most of the code refactoring needed to be done is done with this commit.
2016-09-18 03:41:16 -05:00
Malisa Smith
faf32a7cfb
dom::Response implementation
2016-09-06 19:58:32 -07:00
Anthony Ramine
7ad51dcd7a
Update serde to 0.8 ( fixes #12659 )
2016-08-12 18:37:27 +02:00
Mike MacDonald (crazymykl)
aed761509b
Fire load event for external stylesheets
...
Do not load stylesheets with the wrong Content-Type
Fixes #11912 , #11910
2016-08-03 17:13:26 -04:00
Simon Sapin
6d0e48f6cc
Remove some type aliases that are now just re-exports.
2016-07-20 08:42:47 +02:00
Kuba Birecki
85f4da18a6
Inline DOM element creation into box expressions in components/script/dom/
2016-07-14 08:44:22 +02:00
Connor Brewster
315ffe7677
Make network listener runnable cancellable
2016-07-08 09:00:59 -06:00
Anthony Ramine
8ecb5962f3
Move util::str to style
2016-07-05 10:43:54 +02:00
Josh Matthews
29d3cbf34a
Avoid loading stylesheets in inactive documents.
2016-07-04 11:25:17 -04:00
Josh Matthews
1b495de29c
Allow pages to finish loading when external stylesheets have network errors.
2016-06-29 09:06:20 -04:00
Ms2ger
9e2e0ff98c
Move the remainder of layout_interface into script_layout_interface.
2016-06-20 19:08:12 +02:00