Bug 166635 - Remove PassRefPtr use from the "html" directory, other improvements
Summary: Remove PassRefPtr use from the "html" directory, other improvements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-02 00:16 PST by Darin Adler
Modified: 2017-01-30 17:02 PST (History)
6 users (show)

See Also:


Attachments
Patch (471.25 KB, patch)
2017-01-02 00:19 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (471.31 KB, patch)
2017-01-02 00:52 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-elcapitan (929.44 KB, application/zip)
2017-01-02 02:14 PST, Build Bot
no flags Details
Archive of layout-test-results from ews114 for mac-elcapitan (1.66 MB, application/zip)
2017-01-02 02:22 PST, Build Bot
no flags Details
Patch (479.49 KB, patch)
2017-01-02 10:28 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (483.44 KB, patch)
2017-01-02 18:17 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (486.17 KB, patch)
2017-01-02 19:02 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (666.44 KB, patch)
2017-01-03 23:42 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (673.53 KB, patch)
2017-01-03 23:53 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (673.92 KB, patch)
2017-01-04 01:27 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (673.94 KB, patch)
2017-01-04 09:04 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (673.78 KB, patch)
2017-01-04 10:33 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (673.87 KB, patch)
2017-01-04 18:49 PST, Darin Adler
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews115 for mac-elcapitan (1.71 MB, application/zip)
2017-01-04 20:20 PST, Build Bot
no flags Details
Patch (674.30 KB, patch)
2017-01-04 21:11 PST, Darin Adler
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2017-01-02 00:16:27 PST
Remove PassRefPtr use from the "html" directory, other improvements
Comment 1 Darin Adler 2017-01-02 00:19:22 PST
Created attachment 297880 [details]
Patch
Comment 2 Darin Adler 2017-01-02 00:52:25 PST
Created attachment 297882 [details]
Patch
Comment 3 Build Bot 2017-01-02 02:14:23 PST
Comment on attachment 297882 [details]
Patch

Attachment 297882 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/2817679

New failing tests:
fast/forms/file/input-file-write-files.html
Comment 4 Build Bot 2017-01-02 02:14:26 PST
Created attachment 297884 [details]
Archive of layout-test-results from ews103 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 5 Build Bot 2017-01-02 02:22:11 PST
Comment on attachment 297882 [details]
Patch

Attachment 297882 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/2817686

New failing tests:
fast/forms/file/input-file-write-files.html
Comment 6 Build Bot 2017-01-02 02:22:13 PST
Created attachment 297886 [details]
Archive of layout-test-results from ews114 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 7 Darin Adler 2017-01-02 10:28:05 PST
Created attachment 297904 [details]
Patch
Comment 8 Darin Adler 2017-01-02 18:17:22 PST
Created attachment 297919 [details]
Patch
Comment 9 Darin Adler 2017-01-02 19:02:03 PST
Created attachment 297921 [details]
Patch
Comment 10 Darin Adler 2017-01-02 23:03:20 PST
Everything building and passing tests. Now I just need to write change log and decide whether to break this up into multiple patches or get it reviewed as one large one.
Comment 11 Darin Adler 2017-01-03 11:04:45 PST
Comment on attachment 297921 [details]
Patch

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

> Source/WebCore/html/track/TextTrackCueList.cpp:102
> +    unsigned insertionPosition = std::upper_bound(m_vector.begin(), m_vector.end(), cueRefPtr, compareCues) - m_vector.begin();
> +    ASSERT_SORTED(m_vector.begin(), m_vector.end(), compareCues);
> +    m_vector.insert(insertionPosition, WTFMove(cueRefPtr));
> +    ASSERT_SORTED(m_vector.begin(), m_vector.end(), compareCues);

Note to self: Old code would refuse to add duplicates (and returned false, but all callers were ignoring that return value). Need to either restore that behavior and make sure a regression test covers that, or figure out why it’s not actually a reachable case.
Comment 12 Alex Christensen 2017-01-03 13:00:37 PST
Comment on attachment 297921 [details]
Patch

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

I'll review a large patch.  A lot of this would be hard to split up into smaller patches.

> Source/WebCore/CMakeLists.txt:-1806
> -    html/canvas/WebGLQuery.cpp

Let's actually remove all these files.
Comment 13 Darin Adler 2017-01-03 18:50:51 PST
Comment on attachment 297921 [details]
Patch

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

>> Source/WebCore/CMakeLists.txt:-1806
>> -    html/canvas/WebGLQuery.cpp
> 
> Let's actually remove all these files.

I’m not sure what you mean. With the exception of WebGLGetInfo.cpp, these files are all used when ENABLE_WEBGL is true. The reason I deleted them from this list is that they were listed in both the main sources list and in the ENABLE_WEBGL list, and there was no need to list them twice, and no need to compile them when WebGL is not enabled. I discovered this because I had forgotten to put an #if in WebGLAny.cpp and I put that in both lists. It failed to compile on Windows. So I fixed it twice — once by not adding it to this list and a second time by adding an appropriate #if.
Comment 14 Darin Adler 2017-01-03 23:42:49 PST
Created attachment 297994 [details]
Patch
Comment 15 Darin Adler 2017-01-03 23:53:38 PST
Created attachment 297995 [details]
Patch
Comment 16 Darin Adler 2017-01-04 01:27:54 PST
Created attachment 298001 [details]
Patch
Comment 17 WebKit Commit Bot 2017-01-04 01:29:58 PST
Attachment 298001 [details] did not pass style-queue:


ERROR: Source/WebCore/html/canvas/WebGLRenderingContextBase.h:575:  'getWebGLFloatArrayParameter' is incorrectly named. It should be named 'protector' or 'protectedGC3Denum'.  [readability/naming/protected] [4]
ERROR: Source/WebCore/html/canvas/WebGLRenderingContextBase.h:576:  'getWebGLIntArrayParameter' is incorrectly named. It should be named 'protector' or 'protectedGC3Denum'.  [readability/naming/protected] [4]
Total errors found: 2 in 171 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 18 Darin Adler 2017-01-04 09:04:16 PST
Created attachment 298015 [details]
Patch
Comment 19 Darin Adler 2017-01-04 09:04:39 PST
(In reply to comment #17)
> ERROR: Source/WebCore/html/canvas/WebGLRenderingContextBase.h:575: 
> 'getWebGLFloatArrayParameter' is incorrectly named. It should be named
> 'protector' or 'protectedGC3Denum'.  [readability/naming/protected] [4]
> ERROR: Source/WebCore/html/canvas/WebGLRenderingContextBase.h:576: 
> 'getWebGLIntArrayParameter' is incorrectly named. It should be named
> 'protector' or 'protectedGC3Denum'.  [readability/naming/protected] [4]

Brady, this failure is annoying.
Comment 20 WebKit Commit Bot 2017-01-04 09:05:32 PST
Attachment 298015 [details] did not pass style-queue:


ERROR: Source/WebCore/html/canvas/WebGLRenderingContextBase.h:575:  'getWebGLFloatArrayParameter' is incorrectly named. It should be named 'protector' or 'protectedGC3Denum'.  [readability/naming/protected] [4]
ERROR: Source/WebCore/html/canvas/WebGLRenderingContextBase.h:576:  'getWebGLIntArrayParameter' is incorrectly named. It should be named 'protector' or 'protectedGC3Denum'.  [readability/naming/protected] [4]
Total errors found: 2 in 171 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 21 Darin Adler 2017-01-04 10:00:12 PST
Comment on attachment 298015 [details]
Patch

Need to fix the build failure on Windows (done) and the crash seen in the track tests (will probably have to wait until tonight).
Comment 22 Darin Adler 2017-01-04 10:33:48 PST
Created attachment 298025 [details]
Patch
Comment 23 WebKit Commit Bot 2017-01-04 10:36:05 PST
Attachment 298025 [details] did not pass style-queue:


ERROR: Source/WebCore/html/canvas/WebGLRenderingContextBase.h:575:  'getWebGLFloatArrayParameter' is incorrectly named. It should be named 'protector' or 'protectedGC3Denum'.  [readability/naming/protected] [4]
ERROR: Source/WebCore/html/canvas/WebGLRenderingContextBase.h:576:  'getWebGLIntArrayParameter' is incorrectly named. It should be named 'protector' or 'protectedGC3Denum'.  [readability/naming/protected] [4]
Total errors found: 2 in 171 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 24 Brady Eidson 2017-01-04 11:14:22 PST
(In reply to comment #19)
> (In reply to comment #17)
> > ERROR: Source/WebCore/html/canvas/WebGLRenderingContextBase.h:575: 
> > 'getWebGLFloatArrayParameter' is incorrectly named. It should be named
> > 'protector' or 'protectedGC3Denum'.  [readability/naming/protected] [4]
> > ERROR: Source/WebCore/html/canvas/WebGLRenderingContextBase.h:576: 
> > 'getWebGLIntArrayParameter' is incorrectly named. It should be named
> > 'protector' or 'protectedGC3Denum'.  [readability/naming/protected] [4]
> 
> Brady, this failure is annoying.

I agree.

And it's also fixable, but I haven't been able to navigate our scripts with my extremely limited python expertise to do so.

In the past I've tried convince others who are way more proficient than myself to take the time to help but have not been successful.
Comment 25 Alex Christensen 2017-01-04 13:15:00 PST
Comment on attachment 298025 [details]
Patch

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

> Source/WebCore/html/track/TextTrackCueList.cpp:98
> +    unsigned insertionPosition = std::upper_bound(m_vector.begin(), m_vector.end(), cueRefPtr, compareCues) - m_vector.begin();
> +    ASSERT_SORTED(m_vector.begin(), m_vector.end());
> +    m_vector.insert(insertionPosition, WTFMove(cueRefPtr));

If you insert near the beginning every time, this could cause O(n^2) execution time.
Comment 26 Darin Adler 2017-01-04 15:42:05 PST
Comment on attachment 298025 [details]
Patch

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

>> Source/WebCore/html/track/TextTrackCueList.cpp:98
>> +    m_vector.insert(insertionPosition, WTFMove(cueRefPtr));
> 
> If you insert near the beginning every time, this could cause O(n^2) execution time.

Yes, true, and not new to this patch.
Comment 27 Darin Adler 2017-01-04 18:49:32 PST
Created attachment 298057 [details]
Patch
Comment 28 WebKit Commit Bot 2017-01-04 18:52:59 PST
Attachment 298057 [details] did not pass style-queue:


ERROR: Source/WebCore/html/canvas/WebGLRenderingContextBase.h:575:  'getWebGLFloatArrayParameter' is incorrectly named. It should be named 'protector' or 'protectedGC3Denum'.  [readability/naming/protected] [4]
ERROR: Source/WebCore/html/canvas/WebGLRenderingContextBase.h:576:  'getWebGLIntArrayParameter' is incorrectly named. It should be named 'protector' or 'protectedGC3Denum'.  [readability/naming/protected] [4]
Total errors found: 2 in 171 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 29 Build Bot 2017-01-04 20:20:25 PST
Comment on attachment 298057 [details]
Patch

Attachment 298057 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/2832656

New failing tests:
imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrack/addCue.html
media/track/w3c/interfaces/TextTrack/addCue.html
Comment 30 Build Bot 2017-01-04 20:20:28 PST
Created attachment 298063 [details]
Archive of layout-test-results from ews115 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 31 Darin Adler 2017-01-04 21:11:52 PST
Created attachment 298066 [details]
Patch
Comment 32 WebKit Commit Bot 2017-01-04 21:14:56 PST
Attachment 298066 [details] did not pass style-queue:


ERROR: Source/WebCore/html/canvas/WebGLRenderingContextBase.h:575:  'getWebGLFloatArrayParameter' is incorrectly named. It should be named 'protector' or 'protectedGC3Denum'.  [readability/naming/protected] [4]
ERROR: Source/WebCore/html/canvas/WebGLRenderingContextBase.h:576:  'getWebGLIntArrayParameter' is incorrectly named. It should be named 'protector' or 'protectedGC3Denum'.  [readability/naming/protected] [4]
Total errors found: 2 in 171 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 33 Alex Christensen 2017-01-04 22:17:54 PST
Comment on attachment 298066 [details]
Patch

r=me!  Woo hoo!
Comment 34 WebKit Commit Bot 2017-01-04 22:46:50 PST
Comment on attachment 298066 [details]
Patch

Clearing flags on attachment: 298066

Committed r210319: <http://trac.webkit.org/changeset/210319>
Comment 35 WebKit Commit Bot 2017-01-04 22:46:56 PST
All reviewed patches have been landed.  Closing bug.
Comment 36 Csaba Osztrogonác 2017-01-05 01:14:28 PST
(In reply to comment #34)
> Comment on attachment 298066 [details]
> Patch
> 
> Clearing flags on attachment: 298066
> 
> Committed r210319: <http://trac.webkit.org/changeset/210319>

It broke the WinCairo build :https://build.webkit.org/builders/WinCairo%2064-Bit%20Release/builds/63994
Comment 37 Darin Adler 2017-01-05 20:24:11 PST
(In reply to comment #36)
> It broke the WinCairo build
> https://build.webkit.org/builders/WinCairo%2064-Bit%20Release/builds/63994

Is there someone who has a WinCairo configuration who can try different fixes for this?
Comment 38 Alex Christensen 2017-01-06 18:42:41 PST
http://trac.webkit.org/changeset/210465