Bug 120685 - Create render tree lazily
Summary: Create render tree lazily
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: 120770 120891 120953 121058 121690
Blocks: 126976
  Show dependency treegraph
 
Reported: 2013-09-04 08:50 PDT by Antti Koivisto
Modified: 2015-12-08 14:09 PST (History)
26 users (show)

See Also:


Attachments
for bots (15.36 KB, patch)
2013-09-04 08:51 PDT, Antti Koivisto
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2 (344.16 KB, application/zip)
2013-09-04 16:33 PDT, Build Bot
no flags Details
for bots 2 (15.03 KB, patch)
2013-09-05 08:35 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
for bots 3 (57.47 KB, patch)
2013-09-05 14:32 PDT, Antti Koivisto
gtk-ews: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 (973.16 KB, application/zip)
2013-09-06 13:12 PDT, Build Bot
no flags Details
another (86.48 KB, patch)
2013-12-12 09:10 PST, Antti Koivisto
eflews.bot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion (1.36 MB, application/zip)
2013-12-13 21:16 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-02 for mac-mountainlion (1.36 MB, application/zip)
2013-12-13 22:32 PST, Build Bot
no flags Details
yet another (111.35 KB, patch)
2013-12-19 08:06 PST, Antti Koivisto
gtk-ews: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-02 for mac-mountainlion (502.30 KB, application/zip)
2013-12-19 10:13 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion (508.33 KB, application/zip)
2013-12-19 11:56 PST, Build Bot
no flags Details
patch (126.39 KB, patch)
2013-12-19 16:44 PST, Antti Koivisto
kling: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion (598.96 KB, application/zip)
2013-12-19 20:00 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion (533.65 KB, application/zip)
2013-12-19 20:57 PST, Build Bot
no flags Details
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion (625.93 KB, application/zip)
2013-12-19 21:25 PST, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2013-09-04 08:50:00 PDT
A document either has a render tree attached or not. There shouldn't be need to track attached state individually per element. Elements added to attached document should get attached automatically.
Comment 1 Antti Koivisto 2013-09-04 08:51:16 PDT
Created attachment 210464 [details]
for bots
Comment 2 WebKit Commit Bot 2013-09-04 08:53:52 PDT
Attachment 210464 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/dom/ContainerNode.cpp', u'Source/WebCore/dom/Document.cpp', u'Source/WebCore/dom/Element.cpp', u'Source/WebCore/dom/Node.cpp', u'Source/WebCore/dom/Node.h', u'Source/WebCore/dom/Range.cpp', u'Source/WebCore/html/HTMLElement.cpp', u'Source/WebCore/html/HTMLFrameElementBase.cpp', u'Source/WebCore/html/parser/HTMLConstructionSite.cpp', u'Source/WebCore/html/shadow/InsertionPoint.cpp', u'Source/WebCore/loader/PlaceholderDocument.cpp', u'Source/WebCore/style/StyleResolveTree.cpp', u'Source/WebCore/testing/Internals.cpp']" exit_code: 1
Source/WebCore/dom/ContainerNode.cpp:1071:  One space before end of line comments  [whitespace/comments] [5]
Source/WebCore/testing/Internals.cpp:498:  Should have a space between // and comment  [whitespace/comments] [4]
Total errors found: 2 in 10 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Build Bot 2013-09-04 16:33:15 PDT
Comment on attachment 210464 [details]
for bots

Attachment 210464 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/1694696

New failing tests:
editing/text-iterator/range-to-from-location-and-length.html
editing/selection/caret-ltr-right.html
css3/selectors3/xml/css3-modsel-147b.xml
css3/selectors3/xml/css3-modsel-24.xml
css3/selectors3/xml/css3-modsel-34.xml
css3/selectors3/xml/css3-modsel-d3.xml
css3/selectors3/xml/css3-modsel-145b.xml
css3/selectors3/xml/css3-modsel-146b.xml
editing/input/reveal-caret-of-multiline-input.html
http/tests/inspector/inspect-element.html
css3/selectors3/xml/css3-modsel-36.xml
editing/style/toggle-style-bold-italic.html
css3/selectors3/xml/css3-modsel-79.xml
editing/selection/caret-rtl-2-left.html
css3/selectors3/xml/css3-modsel-81b.xml
editing/selection/caret-ltr-2-left.html
css3/selectors3/xml/css3-modsel-23.xml
css3/selectors3/xml/css3-modsel-146a.xml
editing/style/toggle-style-bold-italic-mixed-editability.html
css3/selectors3/xml/css3-modsel-145a.xml
fast/block/block-remove-child-delete-line-box-crash.html
http/tests/inspector/network/network-initiator.html
css3/selectors3/xml/css3-modsel-147a.xml
css3/selectors3/xml/css3-modsel-68.xml
css3/selectors3/xml/css3-modsel-69.xml
css3/selectors3/xml/css3-modsel-81.xml
css2.1/t060401-c32-cascading-00-b.html
css3/calc/transitions-dependent.html
editing/selection/caret-ltr.html
editing/selection/caret-ltr-2.html
Comment 4 Build Bot 2013-09-04 16:33:17 PDT
Created attachment 210504 [details]
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-14  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.4
Comment 5 Antti Koivisto 2013-09-05 08:35:03 PDT
Created attachment 210619 [details]
for bots 2
Comment 6 WebKit Commit Bot 2013-09-05 08:37:55 PDT
Attachment 210619 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/dom/ContainerNode.cpp', u'Source/WebCore/dom/Document.cpp', u'Source/WebCore/dom/Element.cpp', u'Source/WebCore/dom/Node.cpp', u'Source/WebCore/dom/Node.h', u'Source/WebCore/dom/Range.cpp', u'Source/WebCore/html/HTMLElement.cpp', u'Source/WebCore/html/HTMLFrameElementBase.cpp', u'Source/WebCore/html/HTMLMediaElement.cpp', u'Source/WebCore/html/parser/HTMLConstructionSite.cpp', u'Source/WebCore/html/shadow/InsertionPoint.cpp', u'Source/WebCore/loader/PlaceholderDocument.cpp', u'Source/WebCore/style/StyleResolveTree.cpp', u'Source/WebCore/testing/Internals.cpp']" exit_code: 1
Source/WebCore/dom/ContainerNode.cpp:1071:  One space before end of line comments  [whitespace/comments] [5]
Source/WebCore/testing/Internals.cpp:498:  Should have a space between // and comment  [whitespace/comments] [4]
Total errors found: 2 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Antti Koivisto 2013-09-05 14:32:24 PDT
Created attachment 210664 [details]
for bots 3
Comment 8 kov's GTK+ EWS bot 2013-09-05 20:33:00 PDT
Comment on attachment 210664 [details]
for bots 3

Attachment 210664 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/1706232
Comment 9 Build Bot 2013-09-06 13:12:15 PDT
Comment on attachment 210664 [details]
for bots 3

Attachment 210664 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/1719036

New failing tests:
http/tests/misc/empty-urls.html
fast/dom/nodesFromRect/nodesFromRect-embedded-frame-content.html
fast/body-propagation/background-color/003-xhtml.xhtml
editing/style/toggle-style-bold-italic-mixed-editability.html
css3/calc/transitions-dependent.html
fast/dynamic/011.html
fast/forms/autofocus-in-sandbox-with-allow-scripts.html
fast/forms/radio/radio_checked_dynamic.html
fast/forms/basic-textareas-quirks.html
editing/style/toggle-style-bold-italic.html
fast/events/key-events-in-input-text.html
http/tests/inspector/network/network-initiator.html
fast/css-generated-content/before-content-continuation-chain.html
http/tests/inspector/inspect-element.html
Comment 10 Build Bot 2013-09-06 13:12:27 PDT
Created attachment 210785 [details]
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-16  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.4
Comment 11 Build Bot 2013-09-06 20:36:28 PDT
Comment on attachment 210664 [details]
for bots 3

Attachment 210664 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/1719185
Comment 16 Antti Koivisto 2013-12-12 09:10:41 PST
Created attachment 219089 [details]
another
Comment 17 EFL EWS Bot 2013-12-12 10:03:59 PST
Comment on attachment 219089 [details]
another

Attachment 219089 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/48248016
Comment 18 kov's GTK+ EWS bot 2013-12-12 14:51:06 PST
Comment on attachment 219089 [details]
another

Attachment 219089 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/48498030
Comment 19 Build Bot 2013-12-13 21:16:30 PST
Comment on attachment 219089 [details]
another

Attachment 219089 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/47178247

New failing tests:
fullscreen/full-screen-render-inline.html
tables/mozilla/other/wa_table_tr_align.html
editing/pasteboard/paste-into-textarea-with-new-line.html
platform/mac/editing/spelling/autocorrection-at-beginning-of-word-1.html
transitions/transition-duration-cleared-in-transitionend-crash.html
fast/forms/input-text-self-emptying-click.html
scrollbars/scrollbar-miss-mousemove-disabled.html
transitions/repeated-firing-background-color.html
tables/mozilla/bugs/bug113235-1.html
fast/images/imagemap-case.html
fast/forms/input-text-drag-down.html
plugins/object-onfocus-mutation-crash.html
fast/forms/input-text-double-click.html
printing/single-line-must-not-be-split-into-two-pages.html
fast/events/scrollbar-double-click.html
transitions/equivalent-background-image-no-transition.html
fast/forms/input-text-click-inside.html
plugins/clicking-missing-plugin-fires-delegate.html
fast/regions/cssom/webkit-named-flow-get-content.html
fast/forms/textarea-type-spaces.html
platform/mac/editing/spelling/autocorrection-at-beginning-of-word-2.html
plugins/plugin-remove-readystatechange.html
tables/mozilla/bugs/bug647.html
editing/selection/contenteditable-click-inside.html
fast/forms/input-text-click-outside.html
fast/events/key-events-in-input-text.html
fast/dom/HTMLTableColElement/resize-table-using-col-width.html
Comment 20 Build Bot 2013-12-13 21:16:35 PST
Created attachment 219231 [details]
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-07  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 21 Build Bot 2013-12-13 22:32:28 PST
Comment on attachment 219089 [details]
another

Attachment 219089 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/49088051

New failing tests:
fullscreen/full-screen-render-inline.html
tables/mozilla/other/wa_table_tr_align.html
editing/pasteboard/paste-into-textarea-with-new-line.html
platform/mac/editing/spelling/autocorrection-at-beginning-of-word-1.html
transitions/transition-duration-cleared-in-transitionend-crash.html
fast/forms/input-text-self-emptying-click.html
scrollbars/scrollbar-miss-mousemove-disabled.html
transitions/repeated-firing-background-color.html
tables/mozilla/bugs/bug113235-1.html
fast/images/imagemap-case.html
fast/forms/input-text-drag-down.html
plugins/object-onfocus-mutation-crash.html
fast/forms/input-text-double-click.html
printing/single-line-must-not-be-split-into-two-pages.html
fast/events/scrollbar-double-click.html
transitions/equivalent-background-image-no-transition.html
fast/forms/input-text-click-inside.html
plugins/clicking-missing-plugin-fires-delegate.html
fast/regions/cssom/webkit-named-flow-get-content.html
fast/forms/textarea-type-spaces.html
platform/mac/editing/spelling/autocorrection-at-beginning-of-word-2.html
plugins/plugin-remove-readystatechange.html
tables/mozilla/bugs/bug647.html
editing/selection/contenteditable-click-inside.html
fast/forms/input-text-click-outside.html
fast/events/key-events-in-input-text.html
fast/dom/HTMLTableColElement/resize-table-using-col-width.html
Comment 22 Build Bot 2013-12-13 22:32:32 PST
Created attachment 219239 [details]
Archive of layout-test-results from webkit-ews-02 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-02  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 23 Antti Koivisto 2013-12-19 08:06:39 PST
Created attachment 219652 [details]
yet another
Comment 24 kov's GTK+ EWS bot 2013-12-19 08:53:49 PST
Comment on attachment 219652 [details]
yet another

Attachment 219652 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/48938651
Comment 25 Build Bot 2013-12-19 10:13:42 PST
Comment on attachment 219652 [details]
yet another

Attachment 219652 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/48688293

New failing tests:
fullscreen/full-screen-render-inline.html
Comment 26 Build Bot 2013-12-19 10:13:48 PST
Created attachment 219656 [details]
Archive of layout-test-results from webkit-ews-02 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-02  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 27 Build Bot 2013-12-19 11:56:08 PST
Comment on attachment 219652 [details]
yet another

Attachment 219652 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/47778032

New failing tests:
fullscreen/full-screen-render-inline.html
Comment 28 Build Bot 2013-12-19 11:56:13 PST
Created attachment 219669 [details]
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-01  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 29 Antti Koivisto 2013-12-19 16:44:47 PST
Created attachment 219701 [details]
patch
Comment 30 Andreas Kling 2013-12-19 17:02:34 PST
Comment on attachment 219701 [details]
patch

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

r=me!

> Source/WebCore/ChangeLog:100
> +            TextControlInnerTextElement always preserveres newline even if it doesn't have style yet.

Typo, preserves.

> Source/WebCore/dom/Element.cpp:2938
> +    auto children = elementDescendants(*this);
> +    for (auto it = children.begin(), end = children.end(); it != end; ++it) {

Should use range for syntax here.

> Source/WebCore/dom/Node.cpp:2302
> +    // FIXME: This should go away alonw with the whole vague 'attached' concept. The conditions here produce
> +    // roughly the old behavior based on an explicit attached bit.

Typo, along.

> Source/WebCore/html/HTMLElement.cpp:666
>  bool HTMLElement::supportsFocus() const
>  {
> +    if (!document().view()->isInLayout())
> +        document().updateStyleIfNeeded();

I guess this function can be called during layout?

> Source/WebCore/html/HTMLFormControlElement.cpp:171
>  static bool shouldAutofocus(HTMLFormControlElement* element)

Urgh, raw pointer. How tacky.

> Source/WebCore/loader/PlaceholderDocument.cpp:40
> -    setAttached(true);
> +//    setAttached(true);

Busted!
Comment 31 Geoffrey Garen 2013-12-19 17:17:05 PST
antti++
Comment 32 Build Bot 2013-12-19 20:00:47 PST
Comment on attachment 219701 [details]
patch

Attachment 219701 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/50208137

New failing tests:
fast/preloader/input.html
fast/preloader/noscript.html
fast/preloader/image.html
fast/preloader/first-base-tag-scanned-wins.html
fast/preloader/first-base-tag-wins.html
fast/preloader/understands-base-tag.html
Comment 33 Build Bot 2013-12-19 20:00:51 PST
Created attachment 219721 [details]
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-05  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 34 kov's GTK+ EWS bot 2013-12-19 20:10:48 PST
Comment on attachment 219701 [details]
patch

Attachment 219701 [details] did not pass gtk-ews (gtk):
Output: http://webkit-queues.appspot.com/results/47778128
Comment 35 Build Bot 2013-12-19 20:57:42 PST
Comment on attachment 219701 [details]
patch

Attachment 219701 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/46678113

New failing tests:
fast/preloader/input.html
fast/preloader/noscript.html
fast/preloader/image.html
fast/preloader/first-base-tag-scanned-wins.html
fast/preloader/first-base-tag-wins.html
fast/preloader/understands-base-tag.html
Comment 36 Build Bot 2013-12-19 20:57:48 PST
Created attachment 219724 [details]
Archive of layout-test-results from webkit-ews-04 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-04  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 37 Build Bot 2013-12-19 21:25:46 PST
Comment on attachment 219701 [details]
patch

Attachment 219701 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/50938128

New failing tests:
fast/preloader/input.html
fast/preloader/noscript.html
svg/batik/filters/filterRegions.svg
fast/preloader/first-base-tag-scanned-wins.html
fast/preloader/first-base-tag-wins.html
fast/preloader/understands-base-tag.html
fast/preloader/image.html
Comment 38 Build Bot 2013-12-19 21:25:51 PST
Created attachment 219728 [details]
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-07  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 39 Antti Koivisto 2013-12-20 06:42:22 PST
https://trac.webkit.org/r160908 

(with preloading fixed)
Comment 40 Csaba Osztrogonác 2013-12-20 09:10:56 PST
(In reply to comment #39)
> https://trac.webkit.org/r160908 
> 
> (with preloading fixed)

FYI: It broke the Windows build - http://build.webkit.org/builders/Apple%20Win%20Release%20%28Build%29/builds/55846
Comment 41 Dirk Schulze 2014-01-15 03:29:27 PST
This caused a regression on forward referencing to a SVG resource <filter>.
Comment 42 David Kilzer (:ddkilzer) 2014-02-24 17:11:19 PST
(In reply to comment #41)
> This caused a regression on forward referencing to a SVG resource <filter>.

Filed as Bug 126976.  I don't think there is any purpose served by leaving this bug open at this point.
Comment 43 Brent Fulgham 2015-12-08 13:58:41 PST
Fixes (CVE-2014-4413, CVE-2014-4414).