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 93d7f63 commit 99f02ad
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 @@ -767,7 +767,7 @@ prefix
:
Option
<
DOMString
Atom
>
/
/
Expand Down Expand Up @@ -811,7 +811,7 @@ prefix
:
Option
<
DOMString
Atom
>
owner
:
Expand Down Expand Up @@ -903,7 +903,7 @@ prefix
:
Option
<
DOMString
Atom
>
owner
:
Expand Down Expand Up @@ -1032,7 +1032,7 @@ self
a
Option
<
DOMString
Atom
>
{
&
Expand Down Expand Up @@ -1538,10 +1538,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 @@ -196,15 +196,6 @@ use
std
:
:
borrow
:
:
ToOwned
;
use
std
:
:
boxed
;
use
Expand Down Expand Up @@ -4591,7 +4582,7 @@ Fallible
Namespace
Option
<
DOMString
Atom
>
Atom
)
Expand Down Expand Up @@ -4913,14 +4904,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 @@ -726,19 +726,13 @@ htmlvideoelement
HTMLVideoElement
;
use
util
:
:
str
:
:
DOMString
;
use
string_cache
:
:
{
Atom
QualName
}
;
use
std
Expand All @@ -760,7 +754,7 @@ prefix
:
Option
<
DOMString
Atom
>
document
:
Expand All @@ -779,6 +773,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 @@ -1143,7 +1143,7 @@ prefix
:
Option
<
DOMString
Atom
>
document
:
Expand Down Expand Up @@ -5413,7 +5413,7 @@ prefix
:
Option
<
DOMString
Atom
>
)
;
Expand Down Expand Up @@ -5468,7 +5468,7 @@ prefix
:
Option
<
DOMString
Atom
>
cb
:
Expand Down Expand Up @@ -6242,7 +6242,7 @@ prefix
:
Option
<
DOMString
Atom
>
)
{
Expand Down Expand Up @@ -6366,6 +6366,8 @@ format
{
}
"
&
*
*
prefix
&
Expand Down Expand Up @@ -6686,7 +6688,7 @@ prefix
:
Option
<
DOMString
Atom
>
cb
:
Expand Down Expand Up @@ -9447,18 +9449,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 @@ -875,7 +875,10 @@ use
string_cache
:
:
{
Atom
QualName
}
;
/
/
Expand Down Expand Up @@ -12621,15 +12624,14 @@ map
|
p
|
Atom
:
:
from_slice
(
*
*
&
p
)
.
to_owned
(
)
)
document
.
Expand Down

0 comments on commit 99f02ad

Please sign in to comment.