Skip to content

Commit

Permalink
servo: Merge #5777 - Make Attr::prefix an Atom (from tamird:ICE-attr-…
Browse files Browse the repository at this point in the history
…prefix-atom); r=jdm

Rebase of https://github.com/Ms2ger/servo/commits/ICE-attr-prefix-atom

Some of the changes weren't necessary since the internals had been refactored some in the interim. In any case, I was unable to reproduce the ICE reported in rust-lang/rust#18957.

Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: b0a7d1bf865eff7b6ca3bae874004a61c19b3c27

UltraBlame original commit: 4af16b10e9d304b2651a66dcca09f497c38fa55d
  • Loading branch information
marco-c committed Oct 1, 2019
1 parent 9392cfd commit dbda3c7
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 56 deletions.
28 changes: 23 additions & 5 deletions servo/components/script/dom/attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ prefix
:
Option
<
DOMString
Atom
>
owner
:
Expand Down Expand Up @@ -725,7 +725,7 @@ prefix
:
Option
<
DOMString
Atom
>
owner
:
Expand Down Expand Up @@ -817,7 +817,7 @@ prefix
:
Option
<
DOMString
Atom
>
owner
:
Expand Down Expand Up @@ -946,7 +946,7 @@ self
a
Option
<
DOMString
Atom
>
{
&
Expand Down Expand Up @@ -1452,10 +1452,28 @@ DOMString
self
.
prefix
(
)
.
clone
as_ref
(
)
.
map
(
|
p
|
(
*
*
p
)
.
to_owned
(
)
)
}
/
/
Expand Down
23 changes: 5 additions & 18 deletions servo/components/script/dom/bindings/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,6 @@ use
std
:
:
borrow
:
:
ToOwned
;
use
std
:
:
boxed
;
use
Expand Down Expand Up @@ -3150,7 +3141,7 @@ Fallible
Namespace
Option
<
DOMString
Atom
>
Atom
)
Expand Down Expand Up @@ -3457,14 +3448,10 @@ p
.
map
(
|
s
|
s
.
to_owned
(
)
Atom
:
:
from_slice
)
Atom
:
Expand Down
34 changes: 24 additions & 10 deletions servo/components/script/dom/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -668,19 +668,13 @@ htmlvideoelement
HTMLVideoElement
;
use
util
:
:
str
:
:
DOMString
;
use
string_cache
:
:
{
Atom
QualName
}
;
use
std
Expand All @@ -702,7 +696,7 @@ prefix
:
Option
<
DOMString
Atom
>
document
:
Expand All @@ -721,6 +715,26 @@ Temporary
Element
>
{
let
prefix
=
prefix
.
map
(
|
p
|
(
*
p
)
.
to_owned
(
)
)
;
if
name
.
Expand Down
24 changes: 7 additions & 17 deletions servo/components/script/dom/element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ prefix
:
Option
<
DOMString
Atom
>
document
:
Expand Down Expand Up @@ -5341,7 +5341,7 @@ prefix
:
Option
<
DOMString
Atom
>
)
;
Expand Down Expand Up @@ -5396,7 +5396,7 @@ prefix
:
Option
<
DOMString
Atom
>
cb
:
Expand Down Expand Up @@ -6170,7 +6170,7 @@ prefix
:
Option
<
DOMString
Atom
>
)
{
Expand Down Expand Up @@ -6294,6 +6294,8 @@ format
{
}
"
&
*
*
prefix
&
Expand Down Expand Up @@ -6614,7 +6616,7 @@ prefix
:
Option
<
DOMString
Atom
>
cb
:
Expand Down Expand Up @@ -9375,18 +9377,6 @@ clone
(
)
prefix
.
map
(
|
s
|
s
.
to_owned
(
)
)
|
attr
|
Expand Down
14 changes: 8 additions & 6 deletions servo/components/script/dom/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,10 @@ use
string_cache
:
:
{
Atom
QualName
}
;
#
[
Expand Down Expand Up @@ -10706,15 +10709,14 @@ map
|
p
|
Atom
:
:
from_slice
(
*
*
&
p
)
.
to_owned
(
)
)
document
.
Expand Down

0 comments on commit dbda3c7

Please sign in to comment.