summaryrefslogtreecommitdiffstats
path: root/accessible/mac/GeckoTextMarker.mm
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /accessible/mac/GeckoTextMarker.mm
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'accessible/mac/GeckoTextMarker.mm')
-rw-r--r--accessible/mac/GeckoTextMarker.mm19
1 files changed, 19 insertions, 0 deletions
diff --git a/accessible/mac/GeckoTextMarker.mm b/accessible/mac/GeckoTextMarker.mm
index ba3a6e6231..bb787edd28 100644
--- a/accessible/mac/GeckoTextMarker.mm
+++ b/accessible/mac/GeckoTextMarker.mm
@@ -88,6 +88,13 @@ GeckoTextMarker GeckoTextMarker::MarkerFromIndex(Accessible* aRoot,
// Iterate through all segments until we exhausted the index sum
// so we can find the segment the index lives in.
for (TextLeafRange segment : range) {
+ if (segment.Start().mAcc->IsMenuPopup() &&
+ (segment.Start().mAcc->State() & states::COLLAPSED)) {
+ // XXX: Menu collapsed XUL menu popups are in our tree and we need to skip
+ // them.
+ continue;
+ }
+
if (segment.End().mAcc->Role() == roles::LISTITEM_MARKER) {
// XXX: MacOS expects bullets to be in the range's text, but not in
// the calculated length!
@@ -392,6 +399,12 @@ NSString* GeckoTextMarkerRange::Text() const {
for (TextLeafRange segment : range) {
TextLeafPoint start = segment.Start();
+ if (start.mAcc->IsMenuPopup() &&
+ (start.mAcc->State() & states::COLLAPSED)) {
+ // XXX: Menu collapsed XUL menu popups are in our tree and we need to skip
+ // them.
+ continue;
+ }
if (start.mAcc->IsTextField() && start.mAcc->ChildCount() == 0) {
continue;
}
@@ -441,6 +454,12 @@ NSAttributedString* GeckoTextMarkerRange::AttributedText() const {
for (TextLeafRange segment : range) {
TextLeafPoint start = segment.Start();
TextLeafPoint attributesNext;
+ if (start.mAcc->IsMenuPopup() &&
+ (start.mAcc->State() & states::COLLAPSED)) {
+ // XXX: Menu collapsed XUL menu popups are in our tree and we need to skip
+ // them.
+ continue;
+ }
do {
if (start.mAcc->IsText()) {
attributesNext = start.FindTextAttrsStart(eDirNext, false);