0

Update AccessibilityViewportInfo to use Selection struct.

This CL does not change any behavior, just clean up.

Bug: 387387738
Change-Id: I66b01b4d68fb5c88b41d4dd16cbf4c52cb35196e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6221302
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ramin Halavati <rhalavati@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1414762}
This commit is contained in:
Ramin Halavati
2025-02-02 23:04:24 -08:00
committed by Chromium LUCI CQ
parent fbb93e42a6
commit 1e8ec3e2ef
5 changed files with 21 additions and 37 deletions

@ -2883,10 +2883,7 @@ void PdfViewWebPlugin::PrepareAndSetAccessibilityViewportInfo() {
std::optional<Selection> selection = engine_->GetSelection();
if (selection.has_value()) {
viewport_info.selection_start_page_index = selection->start.page_index;
viewport_info.selection_start_char_index = selection->start.char_index;
viewport_info.selection_end_page_index = selection->end.page_index;
viewport_info.selection_end_char_index = selection->end.char_index;
viewport_info.selection = *selection;
}
pdf_accessibility_data_handler_->SetAccessibilityViewportInfo(