Selection dumping code should not dump body's offset in the document
Created attachment 61476 [details] Patch
I'll probably need to write a little script to update all the layout test results. This will make our results stop being sensitive to whether or not we allow whitespace nodes between the <head> and the <body> elements. We have enough tests which are sensitive to that for other reasons already.
I wrote a little script to update all the results: #!/usr/bin/python import fileinput import os.path import re # Use IGNORECASE because "BODY" will be "body" in xhtml. position_regexp = re.compile(r"child \d {BODY} .* of document", re.IGNORECASE) for (dirpath, dirnames, filenames) in os.walk("."): for name in filenames: if not name.endswith("-expected.txt"): continue full_path = os.path.join(dirpath, name) file_input = fileinput.input(full_path, inplace=True) for line in file_input: print position_regexp.sub("body", line),
Comment on attachment 61476 [details] Patch rs=me. Remember, that you probably have to update results on all platforms.
I am having to land this in pieces due to SVN trouble. http://trac.webkit.org/changeset/63291 http://trac.webkit.org/changeset/63292 so far. 2 more to go.
http://trac.webkit.org/changeset/63292 might have broken GTK Linux 32-bit Debug The following changes are on the blame list: http://trac.webkit.org/changeset/63292 http://trac.webkit.org/changeset/63293
http://trac.webkit.org/changeset/63295 is part 3. :)
http://trac.webkit.org/changeset/63291 might have broken GTK Linux 32-bit Release
Committed r63296: <http://trac.webkit.org/changeset/63296>
> Selection dumping code should not dump body's offset in the document Is that to avoid visual noise in test results?
Basically. Caused redundant testing. HTML5 as currently spec'd allows whitespace nodes between </head> and <body>, thus changing the offset of <body> within <html>. That part of the spec is currently under some debate, but it's better to have 100 tests failing because of that change (instead of nearly 1000 which failed before this patch).