Simplify LayoutSVGText structural invalidation
Currently there are three different methods - SubtreeChildWasAdded, SubtreeChildWillBeRemoved and SubtreeTextDidChange - that are almost identical. Most callsites call them by first getting a LayoutSVGText from LocateLayoutSVGTextAncestor and then calling the method if an appropriate ancestor is found. Instead add a static LayoutSVGText::NotifySubtreeStructureChanged which find an ancestor and calls a new merged version of the above methods, SubtreeStructureChanged. Also fold InvalidatePositioningValues() into the new method since it is it's only caller. Change-Id: I797d350acf76f6a3372d0833566313d304d16fd2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2087400Reviewed-by:Stephen Chenney <schenney@chromium.org> Commit-Queue: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#746792}
Showing
Please register or sign in to comment