Bug 126285 - XML document builder should create render tree asynchronously
Summary: XML document builder should create render tree asynchronously
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-30 01:44 PST by Antti Koivisto
Modified: 2013-12-30 06:01 PST (History)
8 users (show)

See Also:


Attachments
patch (41.72 KB, patch)
2013-12-30 01:55 PST, Antti Koivisto
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2013-12-30 01:44:25 PST
Remove explicit attach call from the XML parser.
Comment 1 Antti Koivisto 2013-12-30 01:55:50 PST
Created attachment 220101 [details]
patch
Comment 2 WebKit Commit Bot 2013-12-30 01:56:57 PST
Attachment 220101 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/platform/mac/fast/table/dynamic-caption-add-before-child-expected.png', u'LayoutTests/platform/mac/fast/table/dynamic-caption-add-before-child-expected.txt', u'LayoutTests/svg/custom/object-no-size-attributes-expected.txt', u'LayoutTests/svg/custom/resource-invalidation-crash-expected.txt', u'Source/WebCore/ChangeLog', u'Source/WebCore/svg/SVGUseElement.cpp', u'Source/WebCore/svg/SVGUseElement.h', u'Source/WebCore/xml/parser/XMLDocumentParser.cpp', u'Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp', '--commit-queue']" exit_code: 1
Traceback (most recent call last):
  File "Tools/Scripts/check-webkit-style", line 48, in <module>
    sys.exit(CheckWebKitStyle().main())
  File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkitpy/style/main.py", line 154, in main
    patch_checker.check(patch)
  File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkitpy/style/patchreader.py", line 71, in check
    self._text_file_reader.process_file(file_path=path, line_numbers=None)
  File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkitpy/style/filereader.py", line 118, in process_file
    lines = self._read_lines(file_path)
  File "/Volumes/Data/StyleQueue/WebKit/Tools/Scripts/webkitpy/style/filereader.py", line 86, in _read_lines
    contents = file.read()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py", line 671, in read
    return self.reader.read(size)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py", line 477, in read
    newchars, decodedbytes = self.decode(data, self.errors)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x89 in position 0: invalid start byte


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Andreas Kling 2013-12-30 05:54:40 PST
Comment on attachment 220101 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=220101&action=review

r=me

> Source/WebCore/ChangeLog:19
> +            recalc don't start creating new renderers.

doesn't

> Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp:-1035
>      RefPtr<CDATASection> newNode = CDATASection::create(m_currentNode->document(), toString(s, len));
>      m_currentNode->parserAppendChild(newNode.get());
> -    if (m_view)
> -        Style::attachTextRenderer(*newNode);

We don't need to keep 'newNode' valid after appending it anymore, should make it:
m_currentNode->parserAppendChild(newNode.release());
Comment 4 Antti Koivisto 2013-12-30 06:01:49 PST
https://trac.webkit.org/r161140