Bug 106294

Summary: [Shadow DOM] Distribution related code on ElementShadow should be minimized.
Product: WebKit Reporter: Hajime Morrita <morrita>
Component: DOMAssignee: Hajime Morrita <morrita>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, dglazkov, gtk-ews, ojan.autocc, philn, webcomponents-bugzilla, webkit.review.bot, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 103339    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch for landing
none
Patch for landing none

Description Hajime Morrita 2013-01-07 20:42:27 PST
This is a dual of 106282.
There are many projection related code in ElementShadow.cpp, which should be moved ContentDistributor or its family.
Comment 1 Hajime Morrita 2013-01-08 23:50:10 PST
Created attachment 181862 [details]
Patch
Comment 2 Build Bot 2013-01-08 23:55:34 PST
Comment on attachment 181862 [details]
Patch

Attachment 181862 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/15771384
Comment 3 Build Bot 2013-01-09 00:31:45 PST
Comment on attachment 181862 [details]
Patch

Attachment 181862 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/15761402
Comment 4 Hajime Morrita 2013-01-09 01:21:18 PST
Created attachment 181872 [details]
Patch
Comment 5 Build Bot 2013-01-09 01:26:44 PST
Comment on attachment 181872 [details]
Patch

Attachment 181872 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/15762418
Comment 6 kov's GTK+ EWS bot 2013-01-09 01:37:19 PST
Comment on attachment 181872 [details]
Patch

Attachment 181872 [details] did not pass gtk-ews (gtk):
Output: http://queues.webkit.org/results/15766361
Comment 7 Build Bot 2013-01-09 01:45:37 PST
Comment on attachment 181872 [details]
Patch

Attachment 181872 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/15757445
Comment 8 Hajime Morrita 2013-01-09 02:24:32 PST
Created attachment 181882 [details]
Patch
Comment 9 WebKit Review Bot 2013-01-09 03:16:28 PST
Comment on attachment 181882 [details]
Patch

Attachment 181882 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/15762444

New failing tests:
inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html
Comment 10 Dimitri Glazkov (Google) 2013-01-09 09:26:38 PST
Comment on attachment 181882 [details]
Patch

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

> Source/WebCore/dom/ElementShadow.h:69
> +    void invalidateDistribution() { m_distributor.invalidateDistribution(host()); }
> +    void ensureDistribution() { m_distributor.ensureDistribution(host()); }
> +    void didAffectSelector(AffectedSelectorMask mask) { m_distributor.didAffectSelector(host(), mask); }
> +    void willAffectSelector() { m_distributor.willAffectSelector(host()); }

I wonder if these plumb-throughs could be just eliminated?
Comment 11 Hajime Morrita 2013-01-09 15:38:42 PST
Comment on attachment 181882 [details]
Patch

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

Thanks for reviewing! I believe cr-linux redness came fron the tree itself
but I'll check it before landing.

>> Source/WebCore/dom/ElementShadow.h:69
>> +    void willAffectSelector() { m_distributor.willAffectSelector(host()); }
> 
> I wonder if these plumb-throughs could be just eliminated?

I first tried that but the code then had strange duplication: shadow->distributor().invalidateDistribution(shadow->host());
So I gave it up.
Comment 12 Hajime Morrita 2013-01-09 17:16:11 PST
Created attachment 182023 [details]
Patch for landing
Comment 13 WebKit Review Bot 2013-01-09 17:17:31 PST
Comment on attachment 182023 [details]
Patch for landing

Rejecting attachment 182023 [details] from commit-queue.

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', u'--status-host=queues.webkit.org', ..." exit_code: 2 cwd: /mnt/git/webkit-commit-queue

Last 500 characters of output:
 file Source/WebCore/testing/Internals.cpp
patching file Source/WebKit/win/WebKit.vcproj/WebKit.def.in
Hunk #1 FAILED at 181.
Hunk #2 FAILED at 570.
Hunk #3 FAILED at 959.
Hunk #4 FAILED at 1348.
4 out of 4 hunks FAILED -- saving rejects to file Source/WebKit/win/WebKit.vcproj/WebKit.def.in.rej
patching file Source/autotools/symbols.filter
patching file ChangeLog

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue

Full output: http://queues.webkit.org/results/15758740
Comment 14 Hajime Morrita 2013-01-09 18:06:49 PST
Created attachment 182035 [details]
Patch for landing
Comment 15 WebKit Review Bot 2013-01-09 18:31:00 PST
Comment on attachment 182035 [details]
Patch for landing

Clearing flags on attachment: 182035

Committed r139269: <http://trac.webkit.org/changeset/139269>
Comment 16 WebKit Review Bot 2013-01-09 18:31:05 PST
All reviewed patches have been landed.  Closing bug.