Bug 134165

Summary: Add skeleton code for updated Gamepad API
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, bunhere, cdumez, commit-queue, dino, esprehn+autocc, gyuyoung.kim, gyuyoung.kim, kangil.han, kondapallykalyan, rakuco, rniwa, sergio, syoichi, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 134169    
Bug Blocks: 134076    
Attachments:
Description Flags
Patch v1
none
Patch v2 - Try to get GTK/EFL builds to not be trying to build this stuff.
sam: review-
Patch v2
none
Patch v3 - Now with more building?
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2
none
Patch v4
none
Patch v4 - Take 2 (EFL should work after r170266)
none
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 none

Description Brady Eidson 2014-06-21 14:54:52 PDT
Add skeleton code for updated Gamepad API

This includes the interfaces for Gamepad, GamepadButton, GamepadEvent, and additions to Navigator.

This is about getting bindings generated and implementation files into the project, and the behavior of these objects will be entirely inert for now.
Comment 1 Brady Eidson 2014-06-21 15:05:18 PDT
Created attachment 233547 [details]
Patch v1

Skeleton idl and implementations for all of the interface additions in the spec.
Comment 2 Brady Eidson 2014-06-21 15:18:33 PDT
Hmmmm EFL has ENABLE_GAMEPAD on, which is wrong.

GTK also seems to have it.

Exploring...
Comment 3 Brady Eidson 2014-06-21 15:30:46 PDT
Created attachment 233548 [details]
Patch v2 - Try to get GTK/EFL builds to not be trying to build this stuff.
Comment 4 Brady Eidson 2014-06-21 16:06:07 PDT
GTK EWS is back to an unrelated failure.
Windows EWS also seems to be unrelated.

EFL is still enabling ENABLE_GAMEPAD for some reason (in addition to the now-deprecated ENABLED_GAMEPAD_DEPRECATED)

Dunno why.
Comment 5 Sam Weinig 2014-06-21 17:42:55 PDT
Comment on attachment 233548 [details]
Patch v2 - Try to get GTK/EFL builds to not be trying to build this stuff.

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

> Source/WebCore/Modules/gamepad/Gamepad.h:64
> +    Vector<RefPtr<GamepadButton>> m_buttons;

Can this be a Vector<Ref<GamepadButton>>?

> Source/WebCore/Modules/gamepad/Gamepad.idl:27
> +    NoInterfaceObject,

Why NoInterfaceObject?

> Source/WebCore/Modules/gamepad/GamepadButton.idl:27
> +    NoInterfaceObject,

Why NoInterfaceObject?

> Source/WebCore/Modules/gamepad/GamepadEvent.h:40
> +    };

Misplaced ;

> Source/WebCore/WebCore.xcodeproj/project.pbxproj:1613
> -		498770E91242C535002226BA /* Shader.h in Headers */ = {isa = PBXBuildFile; fileRef = 498770D01242C535002226BA /* Shader.h */; };
> +		498770E91242C535002226BA /* (null) in Headers */ = {isa = PBXBuildFile; };

This looks wrong.
Comment 6 Brady Eidson 2014-06-21 19:58:19 PDT
(In reply to comment #5)
> (From update of attachment 233548 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=233548&action=review
> 
> > Source/WebCore/Modules/gamepad/Gamepad.h:64
> > +    Vector<RefPtr<GamepadButton>> m_buttons;
> 
> Can this be a Vector<Ref<GamepadButton>>?

Yes.

Doing so requires a const_cast<> in JSDOMBinding.h.  Dunno how you feel about that.


> 
> > Source/WebCore/Modules/gamepad/Gamepad.idl:27
> > +    NoInterfaceObject,
> 
> Why NoInterfaceObject?
> 
> > Source/WebCore/Modules/gamepad/GamepadButton.idl:27
> > +    NoInterfaceObject,
> 
> Why NoInterfaceObject?

My lame copy from the deprecated IDLs that incorrectly have it!


> > Source/WebCore/WebCore.xcodeproj/project.pbxproj:1613
> > -		498770E91242C535002226BA /* Shader.h in Headers */ = {isa = PBXBuildFile; fileRef = 498770D01242C535002226BA /* Shader.h */; };
> > +		498770E91242C535002226BA /* (null) in Headers */ = {isa = PBXBuildFile; };
> 
> This looks wrong.

Yah, weird...  will check on that.  Wasn't explicit on my part!
Comment 7 Brady Eidson 2014-06-21 20:11:48 PDT
Created attachment 233554 [details]
Patch v2

The Shader.h weirdness was because Shader.h was apparently removed from the tree but not from our Xcodeproj.  Apparently the Xcode I'm using really wants to remove it, which seems fine.
Comment 8 Brady Eidson 2014-06-21 22:00:06 PDT
After the patch in 134169 lands, I think I have a patch ready that will also fix the windows build, so we should be good to go
Comment 9 Brady Eidson 2014-06-21 22:25:47 PDT
Created attachment 233559 [details]
Patch v3 - Now with more building?
Comment 10 Build Bot 2014-06-22 03:33:03 PDT
Comment on attachment 233559 [details]
Patch v3 - Now with more building?

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

New failing tests:
media/W3C/video/src/src_reflects_attribute_not_source_elements.html
Comment 11 Build Bot 2014-06-22 03:33:09 PDT
Created attachment 233564 [details]
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-10  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 12 Brady Eidson 2014-06-22 10:17:29 PDT
(In reply to comment #10)
> (From update of attachment 233559 [details])
> Attachment 233559 [details] did not pass mac-wk2-ews (mac-wk2):
> Output: http://webkit-queues.appspot.com/results/5847233958248448
> 
> New failing tests:
> media/W3C/video/src/src_reflects_attribute_not_source_elements.html

This definitely seems unrelated.
Comment 13 Brady Eidson 2014-06-22 10:27:52 PDT
Created attachment 233569 [details]
Patch v4
Comment 14 Brady Eidson 2014-06-22 12:38:38 PDT
Created attachment 233573 [details]
Patch v4 - Take 2 (EFL should work after r170266)
Comment 15 Build Bot 2014-06-22 15:55:00 PDT
Comment on attachment 233573 [details]
Patch v4 - Take 2 (EFL should work after r170266)

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

New failing tests:
media/W3C/video/networkState/networkState_during_loadstart.html
Comment 16 Build Bot 2014-06-22 15:55:07 PDT
Created attachment 233576 [details]
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-12  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 17 Brady Eidson 2014-06-22 17:33:08 PDT
(In reply to comment #16)
> Created an attachment (id=233576) [details]
> Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2
> 
> The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
> Bot: webkit-ews-12  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5

Unlikely the failure is from this patch.
Comment 18 WebKit Commit Bot 2014-06-23 12:20:23 PDT
Comment on attachment 233573 [details]
Patch v4 - Take 2 (EFL should work after r170266)

Clearing flags on attachment: 233573

Committed r170309: <http://trac.webkit.org/changeset/170309>
Comment 19 WebKit Commit Bot 2014-06-23 12:20:33 PDT
All reviewed patches have been landed.  Closing bug.
Comment 20 Brady Eidson 2014-06-23 13:25:42 PDT
Forgot to `git commit` Sam's review feedback on one file

Fixed in http://trac.webkit.org/changeset/170314