Skip to content

Commit

Permalink
Bug 1553705 - Use a cheaper to compute state key for parser inserted …
Browse files Browse the repository at this point in the history
…form controls. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D32259

UltraBlame original commit: fbb26a04ec1f69879c85249da04fe3b971928ff0
  • Loading branch information
marco-c committed Oct 4, 2019
1 parent 22098c5 commit cec9ec3
Show file tree
Hide file tree
Showing 13 changed files with 1,124 additions and 215 deletions.
32 changes: 19 additions & 13 deletions accessible/generic/Accessible.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,17 @@ h
#
include
"
mozilla
/
dom
/
HTMLFormElement
.
h
"
#
include
"
nsIContent
.
h
Expand Down Expand Up @@ -12597,27 +12608,22 @@ if
control
)
{
nsCOMPtr
<
nsIForm
>
form
(
do_QueryInterface
if
(
dom
:
:
HTMLFormElement
*
form
=
control
-
>
GetFormElement
(
)
)
)
;
if
(
form
)
{
nsCOMPtr
<
Expand Down
8 changes: 8 additions & 0 deletions dom/base/Document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8647,6 +8647,14 @@ mInRDMPane
(
false
)
mNextFormNumber
(
0
)
mNextControlNumber
(
0
)
{
MOZ_LOG
(
Expand Down
101 changes: 101 additions & 0 deletions dom/base/Document.h
Original file line number Diff line number Diff line change
Expand Up @@ -9342,6 +9342,94 @@ uint16_t
aKeyPressEventModel
)
;
/
/
Gets
the
next
form
number
.
/
/
/
/
Used
by
nsContentUtils
:
:
GenerateStateKey
to
get
a
unique
number
for
each
/
/
parser
inserted
form
element
.
int32_t
GetNextFormNumber
(
)
{
return
mNextFormNumber
+
+
;
}
/
/
Gets
the
next
form
control
number
.
/
/
/
/
Used
by
nsContentUtils
:
:
GenerateStateKey
to
get
a
unique
number
for
each
/
/
parser
inserted
form
control
element
.
int32_t
GetNextControlNumber
(
)
{
return
mNextControlNumber
+
+
;
}
protected
:
friend
Expand Down Expand Up @@ -31582,6 +31670,19 @@ nsIPrincipal
>
mIntrinsicStoragePrincipal
;
/
/
See
GetNextFormNumber
and
GetNextControlNumber
.
int32_t
mNextFormNumber
;
int32_t
mNextControlNumber
;
public
:
/
Expand Down
Loading

0 comments on commit cec9ec3

Please sign in to comment.