Commit 8f901d53 authored by Aaron Leventhal's avatar Aaron Leventhal Committed by Chromium LUCI CQ

Early return on error condition in GetDocumentMarkers

Also add TODOs for Nektarios on next round of fixes to this code.

Bug: None
Change-Id: I1ce3184ab3caed82746c6e06e0dc81c249f9f600
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2633341
Commit-Queue: Aaron Leventhal <aleventhal@chromium.org>
Auto-Submit: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: default avatarNektarios Paisios <nektar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844090}
parent a6cd29b2
......@@ -223,6 +223,15 @@ AXObject* AXInlineTextBox::PreviousOnLine() const {
void AXInlineTextBox::GetDocumentMarkers(
Vector<DocumentMarker::MarkerType>* marker_types,
Vector<AXRange>* marker_ranges) const {
// TODO(nektar) Address 20% performance degredation and restore code.
// It may be necessary to add document markers as part of tree data instead
// of computing for every node. To measure current performance, create a
// release build without DCHECKs, and then run command similar to:
// tools/perf/run_benchmark blink_perf.accessibility --browser=exact \
// --browser-executable=path/to/chrome --story-filter="accessibility.*"
// --results-label="[my-branch-name]"
// Pay attention only to rows with ProcessDeferredAccessibilityEvents
// and RenderAccessibilityImpl::SendPendingAccessibilityEvents.
if (!RuntimeEnabledFeatures::
AccessibilityUseAXPositionForDocumentMarkersEnabled())
return;
......@@ -261,6 +270,14 @@ void AXInlineTextBox::GetDocumentMarkers(
if (dom_range_start.IsNull() || dom_range_end.IsNull())
return;
// TODO(nektar) Figure out why the start > end sometimes.
// To see error, comment out below early return and run command similar to:
// run_web_tests.py --driver-logging -t linux-debug
// --additional-driver-flag=--force-renderer-accessibility
// external/wpt/css/css-ui/text-overflow-006.html
if (dom_range_start > dom_range_end)
return; // Temporary until above TODO is resolved.
DCHECK_LE(dom_range_start, dom_range_end);
const EphemeralRangeInFlatTree dom_range(
ToPositionInFlatTree(dom_range_start),
ToPositionInFlatTree(dom_range_end));
......
......@@ -1661,6 +1661,9 @@ String AXNodeObject::AutoComplete() const {
return String();
}
// TODO(nektar): Consider removing this method in favor of
// AXInlineTextBox::GetDocumentMarkers, or add document markers to the tree data
// instead of nodes objects.
void AXNodeObject::GetDocumentMarkers(
Vector<DocumentMarker::MarkerType>* marker_types,
Vector<AXRange>* marker_ranges) const {
......
......@@ -40,17 +40,6 @@ fast/css-generated-content/after-with-inline-continuation.html [ Crash ]
fast/css-generated-content/after-with-first-letter-float-crash.html [ Crash ]
fast/css-generated-content/table-row-after-no-crash.html [ Crash ]
fast/css-generated-content/positioned-div-with-floating-after-content-crash.html [ Crash ]
fast/css/text-overflow-ellipsis-text-align-right.html [ Crash ]
fast/css/text-overflow-ellipsis-strict.html [ Crash ]
fast/css/text-overflow-ellipsis-block-with-border-and-padding.html [ Crash ]
fast/css/vertical-text-overflow-ellipsis-text-align-justify.html [ Crash ]
fast/css/vertical-text-overflow-ellipsis-text-align-center.html [ Crash ]
fast/css/text-overflow-ellipsis.html [ Crash ]
fast/css/text-overflow-ellipsis-text-align-left.html [ Crash ]
fast/css/vertical-text-overflow-ellipsis-text-align-right.html [ Crash ]
fast/css/text-overflow-ellipsis-text-align-center.html [ Crash ]
fast/css/vertical-text-overflow-ellipsis-text-align-left.html [ Crash ]
fast/css/text-overflow-ellipsis-text-align-justify.html [ Crash ]
paint/markers/inline-spelling-markers-hidpi-composited.html [ Crash ]
paint/markers/inline_spelling_markers.html [ Crash ]
paint/markers/composition-marker-split.html [ Crash ]
......@@ -63,10 +52,6 @@ external/wpt/css/css-text/hyphens/hyphens-manual-inline-012.html [ Crash ]
external/wpt/css/css-text/text-transform/text-transform-upperlower-044.html [ Crash ]
external/wpt/css/css-text/text-transform/text-transform-upperlower-041.html [ Crash ]
external/wpt/css/css-text/text-transform/text-transform-upperlower-043.html [ Crash ]
external/wpt/css/css-ui/text-overflow-006.html [ Crash ]
external/wpt/css/css-ui/text-overflow-013.html [ Crash ]
external/wpt/css/css-ui/text-overflow-028.html [ Crash ]
external/wpt/css/css-ui/text-overflow-027.html [ Crash ]
external/wpt/css/css-overflow/webkit-line-clamp-031.html [ Crash ]
external/wpt/css/css-overflow/webkit-line-clamp-034.html [ Crash ]
external/wpt/css/css-overflow/webkit-line-clamp-025.html [ Crash ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment