mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 02:35:41 +00:00
Bug 1347435 - Don't resolve URLs at parse time for Stylo. r=emilio
It's a bit unfortunate the use separate implementations of SpecifiedUrl for Servo and Gecko, but they're different enough at this point that I don't think it really makes sense to try to share everything. Splitting them out has some nice simplifications as well. I recognize that there's still some potential correctness issues for Servo using the resolved URI in various places where the original URI may be the right thing, but I've got too much on my plate to look into that for now. MozReview-Commit-ID: BeDu93TQ4Ow
This commit is contained in:
parent
e1fdc9a6a2
commit
701a45ad75
@ -1983,10 +1983,10 @@ fails == 1316719-1a.html 1316719-1a.html
|
||||
fails == 1316719-1b.html 1316719-1b.html
|
||||
fails == 1316719-1c.html 1316719-1c.html
|
||||
|
||||
fails HTTP == 652991-1a.html 652991-1a.html
|
||||
fails HTTP == 652991-1b.html 652991-1b.html
|
||||
fails HTTP == 652991-2.html 652991-2.html
|
||||
fails HTTP == 652991-3.html 652991-3.html
|
||||
HTTP == 652991-1a.html 652991-1a.html
|
||||
HTTP == 652991-1b.html 652991-1b.html
|
||||
HTTP == 652991-2.html 652991-2.html
|
||||
HTTP == 652991-3.html 652991-3.html
|
||||
fails HTTP == 652991-4.html 652991-4.html
|
||||
|
||||
|
||||
|
@ -102,7 +102,7 @@ fuzzy(64,370) == clip-path-borderBox-1a.html clip-path-borderBox-1a.html
|
||||
== clip-path-viewBox-1c.html clip-path-viewBox-1c.html
|
||||
== clip-path-geometryBox-2.html clip-path-geometryBox-2.html
|
||||
|
||||
fails == clip-path-localRef-1.html clip-path-localRef-1.html
|
||||
== clip-path-localRef-1.html clip-path-localRef-1.html
|
||||
|
||||
default-preferences
|
||||
|
||||
|
@ -1509,6 +1509,7 @@ void
|
||||
Gecko_LoadStyleSheet(css::Loader* aLoader,
|
||||
ServoStyleSheet* aParent,
|
||||
RawServoImportRuleBorrowed aImportRule,
|
||||
nsIURI* aBaseURI,
|
||||
const uint8_t* aURLString,
|
||||
uint32_t aURLStringLength,
|
||||
const uint8_t* aMediaString,
|
||||
@ -1518,6 +1519,7 @@ Gecko_LoadStyleSheet(css::Loader* aLoader,
|
||||
MOZ_ASSERT(aLoader, "Should've catched this before");
|
||||
MOZ_ASSERT(aParent, "Only used for @import, so parent should exist!");
|
||||
MOZ_ASSERT(aURLString, "Invalid URLs shouldn't be loaded!");
|
||||
MOZ_ASSERT(aBaseURI, "Need a base URI");
|
||||
RefPtr<nsMediaList> media = new nsMediaList();
|
||||
if (aMediaStringLength) {
|
||||
MOZ_ASSERT(aMediaString);
|
||||
@ -1533,7 +1535,7 @@ Gecko_LoadStyleSheet(css::Loader* aLoader,
|
||||
nsDependentCSubstring urlSpec(reinterpret_cast<const char*>(aURLString),
|
||||
aURLStringLength);
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
nsresult rv = NS_NewURI(getter_AddRefs(uri), urlSpec);
|
||||
nsresult rv = NS_NewURI(getter_AddRefs(uri), urlSpec, nullptr, aBaseURI);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
// Servo and Gecko have different ideas of what a valid URL is, so we might
|
||||
|
@ -131,6 +131,7 @@ RawGeckoElementBorrowedOrNull Gecko_GetDocumentElement(RawGeckoDocumentBorrowed
|
||||
void Gecko_LoadStyleSheet(mozilla::css::Loader* loader,
|
||||
mozilla::ServoStyleSheet* parent,
|
||||
RawServoImportRuleBorrowed import_rule,
|
||||
nsIURI* base_uri,
|
||||
const uint8_t* url_bytes,
|
||||
uint32_t url_length,
|
||||
const uint8_t* media_bytes,
|
||||
|
@ -79,7 +79,7 @@ to mochitest command.
|
||||
* test_bug389464.html: also font-size computation [1]
|
||||
* test_html_attribute_computed_values.html: also list-style-type [8]
|
||||
* test_bug387615.html: servo/servo#15006 [1]
|
||||
* test_bug397427.html: @import issue bug 1331291 and CSSOM support of @import [3]
|
||||
* test_bug397427.html: @import issue bug 1331291 and CSSOM support of @import [1]
|
||||
* console support:
|
||||
* test_bug413958.html `monitorConsole` [3]
|
||||
* test_parser_diagnostics_unprintables.html [550]
|
||||
|
Loading…
Reference in New Issue
Block a user