Commit 29751815 authored by Philip Rogers's avatar Philip Rogers Committed by Commit Bot

Make svg/dom/content-model.html resilient to paint layer changes

svg/dom/content-model.html does some manual parsing of the layout tree
dump which breaks if the LayoutSVGRoot gets a paint layer. This patch
updates the test to pass if the LayoutSVGRoot has a paint layer or not.

Bug: 1101002
Change-Id: Ic7d3b13e57784f9d40c4998b56ea233a44045b4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2284869
Commit-Queue: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Auto-Submit: Philip Rogers <pdr@chromium.org>
Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#785806}
parent acd4a8ce
......@@ -50,10 +50,11 @@
var drt = internals.elementLayoutTreeAsText(divContainer);
divContainer.removeChild(svgContainer);
// Skip 4 lines to get to the child tag subtree (layer, div, svg and parent).
var skip = 0;
for (var i = 0; i < 4; i++)
skip = drt.indexOf('\n', skip) + 1;
// Skip to the line after the LayoutSVGRoot.
var skip = drt.indexOf('LayoutSVGRoot');
skip = drt.indexOf('\n', skip) + 1;
// Skip the line with the parent tag.
skip = drt.indexOf('\n', skip) + 1;
return drt.substr(skip).search(new RegExp('\\{' + childTag + '\\}|\\[' + childTag + '[\\] ]')) > 0;
}
......
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