Commit ca6c4a3c authored by James Teh's avatar James Teh
Browse files

Bug 1821951 part 2: Remove...

Bug 1821951 part 2: Remove PeekOffsetOption::AllowContentInDifferentNativeAnonymousSubtreeRoot. r=eeejay,masayuki,taskgraph-reviewers,bhearsum

This was only added for a11y and a11y no longer needs it.
Note that the code in Mac HyperTextAccessibleWrap which used this is no longer used itself and will be removed in bug 1821965.

Differential Revision: https://phabricator.services.mozilla.com/D177745
parent 1786366b
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -731,8 +731,7 @@ TextPoint HyperTextAccessibleWrap::FindTextPoint(
  PeekOffsetStruct pos(
      aAmount, aDirection, innerContentOffset, nsPoint(0, 0),
      {PeekOffsetOption::JumpLines, PeekOffsetOption::IsKeyboardSelect,
       PeekOffsetOption::PreserveSpaces,
       PeekOffsetOption::AllowContentInDifferentNativeAnonymousSubtreeRoot},
       PeekOffsetOption::PreserveSpaces},
      aWordMovementType);
  nsresult rv = frameAtOffset->PeekOffset(&pos);

+0 −4
Original line number Diff line number Diff line
@@ -101,10 +101,6 @@ enum class PeekOffsetOption : uint8_t {
  // If true, the offset has to end up in an editable node, otherwise we'll keep
  // searching.
  ForceEditableRegion,

  // If set, the result's native anonymous subtree root may be different from
  // the scan start content's root.
  AllowContentInDifferentNativeAnonymousSubtreeRoot,
};

using PeekOffsetOptions = EnumSet<PeekOffsetOption>;
+2 −5
Original line number Diff line number Diff line
@@ -9527,10 +9527,7 @@ nsIFrame::SelectablePeekReport nsIFrame::GetFrameFromDirection(
          // If the new frame is in a native anonymous subtree, we should treat
          // it as not selectable unless the frame and found frame are in same
          // subtree.
          if (!aOptions.contains(
                  PeekOffsetOption::
                      AllowContentInDifferentNativeAnonymousSubtreeRoot) &&
              aFrame->GetClosestNativeAnonymousSubtreeRoot() !=
          if (aFrame->GetClosestNativeAnonymousSubtreeRoot() !=
              nativeAnonymousSubtreeContent) {
            return false;
          }