Bug 42238 - Selection dumping code should not dump body's offset in the document
Summary: Selection dumping code should not dump body's offset in the document
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Eric Seidel (no email)
Depends on:
Blocks: 41123
  Show dependency treegraph
Reported: 2010-07-14 00:15 PDT by Eric Seidel (no email)
Modified: 2010-07-14 12:57 PDT (History)
5 users (show)

See Also:

Patch (1.73 KB, patch)
2010-07-14 00:17 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2010-07-14 00:15:20 PDT
Selection dumping code should not dump body's offset in the document
Comment 1 Eric Seidel (no email) 2010-07-14 00:17:37 PDT
Created attachment 61476 [details]
Comment 2 Eric Seidel (no email) 2010-07-14 00:18:45 PDT
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.
Comment 3 Eric Seidel (no email) 2010-07-14 01:02:08 PDT
I wrote a little script to update all the results:

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"):
        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 4 Nikolas Zimmermann 2010-07-14 01:05:00 PDT
Comment on attachment 61476 [details]

rs=me. Remember, that you probably have to update results on all platforms.
Comment 5 Eric Seidel (no email) 2010-07-14 02:08:31 PDT
I am having to land this in pieces due to SVN trouble.

so far. 2 more to go.
Comment 6 WebKit Review Bot 2010-07-14 02:17:37 PDT
http://trac.webkit.org/changeset/63292 might have broken GTK Linux 32-bit Debug
The following changes are on the blame list:
Comment 7 Eric Seidel (no email) 2010-07-14 02:18:30 PDT
http://trac.webkit.org/changeset/63295 is part 3. :)
Comment 8 WebKit Review Bot 2010-07-14 02:19:01 PDT
http://trac.webkit.org/changeset/63291 might have broken GTK Linux 32-bit Release
Comment 9 Eric Seidel (no email) 2010-07-14 02:22:06 PDT
Committed r63296: <http://trac.webkit.org/changeset/63296>
Comment 10 Alexey Proskuryakov 2010-07-14 12:31:10 PDT
> Selection dumping code should not dump body's offset in the document

Is that to avoid visual noise in test results?
Comment 11 Eric Seidel (no email) 2010-07-14 12:57:20 PDT
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).