DescriptionabsoluteFocusRingQuads() => absoluteFocusRingBoundingBoxRect()
The original RenderObject::absoluteFocusRingQuads() is used by
AXRenderObject to get the rect of an element including its descendants.
For an element containing many line boxes and/or descendants, the
size of the Vector<Quad> may be large but the caller actually doesn't
need the quads but the bounding box of the quads.
I suspect that the quads causes out-of-memory on Android sometimes.
To save memory for storing the quads, now compute the bounding box of
the focus ring rects before mapping to absolute coordinates.
Though the rects still uses memory, this change will reduce the
peak memory required by the rects and quads to 1/3 (for rects only).
There might be measures to further save CPU and memory:
- Let addFocusRingRects be able to accumulate rects into a bounding box;
- Find another way to get the bounding box for accessibility, instead of
using addFocusRingRects.
BUG=419943
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=184981
Patch Set 1 #
Messages
Total messages: 11 (4 generated)
|