<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>93113</bug_id>
          
          <creation_ts>2012-08-03 07:11:53 -0700</creation_ts>
          <short_desc>Move DOM operations in the element stack to HTMLConstructionSite.</short_desc>
          <delta_ts>2012-08-08 02:23:16 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>90751</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Kwang Yul Seo">skyul</reporter>
          <assigned_to name="Kwang Yul Seo">skyul</assigned_to>
          <cc>abarth</cc>
    
    <cc>eric</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>686684</commentid>
    <comment_count>0</comment_count>
    <who name="Kwang Yul Seo">skyul</who>
    <bug_when>2012-08-03 07:11:53 -0700</bug_when>
    <thetext>HTMLConstructionSite has DOM operations methods required for tree construction. But some DOM operations are still performed directly in the element stack. Extracted such DOM operations and moved them to HTMLConstructionSite for consistency.

See also Bug 93070.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686696</commentid>
    <comment_count>1</comment_count>
      <attachid>156367</attachid>
    <who name="Kwang Yul Seo">skyul</who>
    <bug_when>2012-08-03 07:14:48 -0700</bug_when>
    <thetext>Created attachment 156367
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686702</commentid>
    <comment_count>2</comment_count>
    <who name="Kwang Yul Seo">skyul</who>
    <bug_when>2012-08-03 07:16:00 -0700</bug_when>
    <thetext>This patch is also a prerequisite for speculative parsing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686891</commentid>
    <comment_count>3</comment_count>
    <who name="Kwang Yul Seo">skyul</who>
    <bug_when>2012-08-03 10:16:44 -0700</bug_when>
    <thetext>Now HTMLElementStack has a pointer to its owner HTMLConstructionSite. I couldn&apos;t come up with a better refactoring. Any idea?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>689489</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-08-07 15:30:15 -0700</bug_when>
    <thetext>Perhaps HTMLConstructionSite and ElementStack shoudl share some sort of DOMOperations abstraction which they indirect through to make dom modifications.  I assume this is done in preparation for making parsing possible on another thread?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>689576</commentid>
    <comment_count>5</comment_count>
    <who name="Kwang Yul Seo">skyul</who>
    <bug_when>2012-08-07 16:22:06 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; Perhaps HTMLConstructionSite and ElementStack shoudl share some sort of DOMOperations abstraction which they indirect through to make dom modifications.  I assume this is done in preparation for making parsing possible on another thread?

It&apos;s a good idea. But I chose to move DOM operations to HTMLConstructionSite and also call them construction site tasks in my current implementation of speculative parsing ( https://github.com/kseo/webkit/tree/speculativeparser ) because I need to put beginParsingChildren and finishParsingChildren in the task queue. While speculating, we can&apos;t immediately call beginParsingChildren or finishParsingChildren on element because element creation itself is deferred.

I identified the list of DOM creations/mutations in the parser:

HTMLTreeBuilder
    - addChildAndAttach
    - detachNode
    - moveAllChildrenToNewParent
    - setAttribute
    - removeAllChildren

HTMLElementStack
    - beginParsingChildren
    - finishParsingChildren

HTMLConstructionSite
    - dispatchDocumentElementAvailableIfNeeded
    - mergeAttributesFromTokenIntoElement
    - setCompatibilityMode
    - setCompatibilityModeFromDoctype
    - setDemoted
    - insertedByParser
    
    - insert
    - insertOnDocument
    - insertFosterParentedChild
    - insertComment
    - insertCommentOnDocument
    - insertDoctype
    - insertText
    - insertFosterParentedText

    - createElement
    - createHTMLElement
    - createHTMLHtmlElement
    - createHTMLScriptElement</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>689591</commentid>
    <comment_count>6</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-08-07 16:34:29 -0700</bug_when>
    <thetext>I think you really want to end up with something like GraphicsContext here.

GraphicsContext exists as an (per-platform) abstraction around the drawing context.  We pass it around.  And it&apos;s normally a compile-time defined implementation, but some ports have (in the past) implemented it as a run-time defined implementation.

Similarly, it seems like this off-thread parser wants an abstraction through which to talk to the DOM (and possibly a separate one for the reading... although it sounds like you already have the reading part done).

I think this abstraction wants to be separate from HTMLConstructionSite, and used by HTMLConstructionSite.

Having it be its own separate object, will allow us to separate the mechanics of cross-thread DOM mutation (or queuing of DOM operations) from the logic of what we want to do with the DOM.

HTMLConstructionSite remains the HTML parser&apos;s &quot;what we want to do with the DOM&quot; logic, and some new class (perhaps DOMModifier or DOMOperations or whatever) is the way that we talk to the DOM.

When we&apos;re on the main thread, we use a dumb DOMModifier implementation which just calls the DOM operations synchronously.

When we&apos;re off the main thread, we use a smarter implementation which allocates some sort of objects (similar to how the undo stack, and Editor and EditingCommand work) which are queued up for later execution on the main thread.

The code then becomes mostly ignorant of the question of if it&apos;s on the main thread or not, and this DOMModifications abstraction handles all the details.

I&apos;m not sure if complete ignorance of threaded-ness in HTMLConstructionSite, etc is possible, but were I implementing this, I might start with such as the goal.

Hopefully my musings above are helpful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>689643</commentid>
    <comment_count>7</comment_count>
    <who name="Kwang Yul Seo">skyul</who>
    <bug_when>2012-08-07 17:15:02 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; I think this abstraction wants to be separate from HTMLConstructionSite, and used by HTMLConstructionSite.
&gt; 
&gt; Having it be its own separate object, will allow us to separate the mechanics of cross-thread DOM mutation (or queuing of DOM operations) from the logic of what we want to do with the DOM.

Sounds reasonable!
 
&gt; HTMLConstructionSite remains the HTML parser&apos;s &quot;what we want to do with the DOM&quot; logic, and some new class (perhaps DOMModifier or DOMOperations or whatever) is the way that we talk to the DOM.
&gt; 
&gt; When we&apos;re on the main thread, we use a dumb DOMModifier implementation which just calls the DOM operations synchronously.
&gt; 
&gt; When we&apos;re off the main thread, we use a smarter implementation which allocates some sort of objects (similar to how the undo stack, and Editor and EditingCommand work) which are queued up for later execution on the main thread.
&gt;
&gt; The code then becomes mostly ignorant of the question of if it&apos;s on the main thread or not, and this DOMModifications abstraction handles all the details.

Yes, it&apos;s a great idea. My current implementation has m_isSpeculating flag in HTMLConstructionSite. When this flag is true, HTMLConstructionSite just calls the DOM operations synchronously. Otherwise, it queues up for later execution. This certainly works, but makes the code very complicated. You suggestion sounds much better.

&gt; I&apos;m not sure if complete ignorance of threaded-ness in HTMLConstructionSite, etc is possible, but were I implementing this, I might start with such as the goal.

Okay. I will try! BTW, it&apos;s not just about threaded-ness because my first speculative parsing implementation is still on the main thread. But it still needs to queue up DOM operations because element creation and DOM mutations have visible side effects.

&gt; Hopefully my musings above are helpful.

Thanks for your good advice. It is really helpful.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>689645</commentid>
    <comment_count>8</comment_count>
    <who name="Kwang Yul Seo">skyul</who>
    <bug_when>2012-08-07 17:17:03 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; Yes, it&apos;s a great idea. My current implementation has m_isSpeculating flag in HTMLConstructionSite. When this flag is true, HTMLConstructionSite just calls the DOM operations synchronously. Otherwise, it queues up for later execution. This certainly works, but makes the code very complicated. You suggestion sounds much better.

Oops. &quot;When this flag is true&quot; -&gt; &quot;When this flag is false&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>689660</commentid>
    <comment_count>9</comment_count>
    <who name="Kwang Yul Seo">skyul</who>
    <bug_when>2012-08-07 17:41:54 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Similarly, it seems like this off-thread parser wants an abstraction through which to talk to the DOM (and possibly a separate one for the reading... although it sounds like you already have the reading part done).

For the reading part, I think Bug 92057 is the right solution because we can&apos;t queue up DOM read operations.

So we need only DOMModifier or DOMModifcations abstraction.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>690078</commentid>
    <comment_count>10</comment_count>
    <who name="Kwang Yul Seo">skyul</who>
    <bug_when>2012-08-08 02:22:29 -0700</bug_when>
    <thetext>Close this bug in favor of Bug 93455.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>156367</attachid>
            <date>2012-08-03 07:14:48 -0700</date>
            <delta_ts>2012-08-08 02:23:16 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-93113-20120803231427.patch</filename>
            <type>text/plain</type>
            <size>7036</size>
            <attacher name="Kwang Yul Seo">skyul</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTI0NTgyCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggNjlhMjg3ZTdjNDMxZWRh
ZTc5MThjZjQ0MTg2YjEwODFlYjczNzhlYS4uMzM4ZDc0YTBkYWNkZDQ2ZjQyOGZiMzQ2OTA3M2Y5
Y2I2YzhjMWQyNyAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDMyIEBACisyMDEyLTA4LTAzICBLd2Fu
ZyBZdWwgU2VvICA8c2t5dWxAY29tcGFueTEwMC5uZXQ+CisKKyAgICAgICAgTW92ZSBET00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