Skip to content

Commit 2929679

Browse files
committed
Backed out changeset a5ff95602119 (bug 1905021) as requested for causing accessibility crashes related to selection a=backout
UltraBlame original commit: 48a7ce6fe0888f9be96810dcf74829c995f29764
1 parent 6c1e80a commit 2929679

File tree

5 files changed

+124
-422
lines changed

5 files changed

+124
-422
lines changed

accessible/base/SelectionManager.cpp

+6-14
Original file line numberDiff line numberDiff line change
@@ -1228,17 +1228,6 @@ mCaretOffset
12281228
1
12291229
)
12301230
{
1231-
TextLeafPoint
1232-
caret
1233-
=
1234-
TextLeafPoint
1235-
:
1236-
:
1237-
GetCaret
1238-
(
1239-
caretCntr
1240-
)
1241-
;
12421231
RefPtr
12431232
<
12441233
AccCaretMoveEvent
@@ -1256,9 +1245,12 @@ selection
12561245
IsCollapsed
12571246
(
12581247
)
1259-
caret
1260-
.
1261-
mIsEndOfLineInsertionPoint
1248+
caretCntr
1249+
-
1250+
>
1251+
IsCaretAtEndOfLine
1252+
(
1253+
)
12621254
event
12631255
-
12641256
>

accessible/base/TextLeafRange.cpp

+58-220
Original file line numberDiff line numberDiff line change
@@ -7285,6 +7285,16 @@ Accessible
72857285
aAcc
72867286
)
72877287
{
7288+
HyperTextAccessibleBase
7289+
*
7290+
ht
7291+
;
7292+
int32_t
7293+
htOffset
7294+
;
7295+
bool
7296+
isEndOfLine
7297+
;
72887298
if
72897299
(
72907300
LocalAccessible
@@ -7337,8 +7347,6 @@ caret
73377347
events
73387348
)
73397349
.
7340-
HyperTextAccessible
7341-
*
73427350
ht
73437351
=
73447352
HyperTextFor
@@ -7358,7 +7366,6 @@ TextLeafPoint
73587366
)
73597367
;
73607368
}
7361-
int32_t
73627369
htOffset
73637370
=
73647371
ht
@@ -7383,198 +7390,55 @@ TextLeafPoint
73837390
)
73847391
;
73857392
}
7386-
TextLeafPoint
7387-
point
7388-
=
7389-
ht
7390-
-
7391-
>
7392-
ToTextLeafPoint
7393-
(
7394-
htOffset
7395-
)
7396-
;
7397-
nsIFrame
7398-
*
7399-
frame
7400-
=
7401-
ht
7402-
-
7403-
>
7404-
GetFrame
7405-
(
7406-
)
7407-
;
7408-
RefPtr
7409-
<
7410-
nsFrameSelection
7411-
>
7412-
sel
7413-
=
7414-
frame
7415-
?
7416-
frame
7417-
-
7418-
>
7419-
GetFrameSelection
7420-
(
7421-
)
7422-
:
7423-
nullptr
7424-
;
7425-
if
7426-
(
7427-
sel
7428-
&
7429-
&
7430-
sel
7431-
-
7432-
>
7433-
GetHint
7434-
(
7435-
)
7436-
=
7437-
=
7438-
CaretAssociationHint
7439-
:
7440-
:
7441-
Before
7442-
)
7443-
{
74447393
/
74457394
/
7446-
CaretAssociationHint
7395+
Use
7396+
HyperTextAccessible
74477397
:
74487398
:
7449-
Before
7450-
can
7451-
mean
7452-
that
7453-
the
7454-
caret
7455-
is
7456-
at
7457-
the
7458-
end
7459-
of
7399+
IsCaretAtEndOfLine
7400+
.
7401+
Eventually
7402+
we
7403+
'
7404+
ll
7405+
want
7406+
to
74607407
/
74617408
/
7462-
a
7463-
line
7464-
.
7465-
However
7466-
it
7467-
can
7468-
also
7469-
mean
7409+
move
74707410
that
7471-
the
7472-
caret
7473-
is
7474-
before
7475-
the
7476-
start
7411+
code
7412+
into
7413+
TextLeafPoint
7414+
but
7415+
existing
7416+
code
7417+
depends
7418+
on
7419+
it
7420+
living
74777421
/
74787422
/
7479-
of
7480-
a
7481-
node
74827423
in
7483-
the
7484-
middle
7485-
of
7486-
a
7487-
line
7488-
.
7489-
This
7490-
happens
7491-
when
7492-
moving
7493-
the
7494-
cursor
7495-
/
7496-
/
7497-
forward
7498-
to
7499-
a
7500-
new
7501-
node
7502-
.
7503-
if
7424+
HyperTextAccessible
75047425
(
7505-
point
7506-
.
7507-
mOffset
7508-
=
7509-
=
7510-
0
7511-
)
7512-
{
7513-
/
7514-
/
7515-
The
7516-
caret
7517-
is
7518-
before
7519-
the
7520-
start
7521-
of
7522-
a
7523-
node
7524-
.
7525-
The
7426+
including
75267427
caret
7527-
is
7528-
at
7529-
the
7530-
end
7531-
of
7532-
a
7533-
/
7534-
/
7535-
line
7536-
if
7537-
the
7538-
node
7539-
is
7540-
at
7541-
the
7542-
start
7543-
of
7544-
a
7545-
line
7546-
but
7547-
not
7548-
at
7549-
the
7550-
start
7551-
of
7552-
a
7553-
/
7554-
/
7555-
paragraph
7556-
.
7557-
point
7428+
events
7429+
)
75587430
.
7559-
mIsEndOfLineInsertionPoint
7431+
isEndOfLine
75607432
=
7561-
IsLocalAccAtLineStart
7562-
(
7563-
point
7564-
.
7565-
mAcc
7433+
localAcc
75667434
-
75677435
>
7568-
AsLocal
7436+
AsHyperText
75697437
(
75707438
)
7571-
)
7572-
&
7573-
&
7574-
!
7575-
point
7576-
.
7577-
IsParagraphStart
7439+
-
7440+
>
7441+
IsCaretAtEndOfLine
75787442
(
75797443
)
75807444
;
@@ -7583,40 +7447,6 @@ else
75837447
{
75847448
/
75857449
/
7586-
This
7587-
isn
7588-
'
7589-
t
7590-
the
7591-
start
7592-
of
7593-
a
7594-
node
7595-
so
7596-
we
7597-
must
7598-
be
7599-
at
7600-
the
7601-
end
7602-
of
7603-
a
7604-
line
7605-
.
7606-
point
7607-
.
7608-
mIsEndOfLineInsertionPoint
7609-
=
7610-
true
7611-
;
7612-
}
7613-
}
7614-
return
7615-
point
7616-
;
7617-
}
7618-
/
7619-
/
76207450
Ideally
76217451
we
76227452
'
@@ -7655,11 +7485,14 @@ Document
76557485
(
76567486
)
76577487
;
7658-
auto
7659-
[
7488+
std
7489+
:
7490+
:
7491+
tie
7492+
(
76607493
ht
76617494
htOffset
7662-
]
7495+
)
76637496
=
76647497
remoteDoc
76657498
-
@@ -7680,6 +7513,16 @@ TextLeafPoint
76807513
)
76817514
;
76827515
}
7516+
isEndOfLine
7517+
=
7518+
remoteDoc
7519+
-
7520+
>
7521+
IsCaretAtEndOfLine
7522+
(
7523+
)
7524+
;
7525+
}
76837526
TextLeafPoint
76847527
point
76857528
=
@@ -7695,12 +7538,7 @@ point
76957538
.
76967539
mIsEndOfLineInsertionPoint
76977540
=
7698-
remoteDoc
7699-
-
7700-
>
7701-
IsCaretAtEndOfLine
7702-
(
7703-
)
7541+
isEndOfLine
77047542
;
77057543
return
77067544
point

0 commit comments

Comments
 (0)