Bug 109892

Summary: Fix inconsistency in WebGLRenderingContext.idl for getAttribLocation
Product: WebKit Reporter: Andrey Adaikin <aandrey>
Component: WebGLAssignee: Andrey Adaikin <aandrey>
Status: RESOLVED FIXED    
Severity: Normal CC: haraken, kbr, webkit.review.bot, zmo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Andrey Adaikin 2013-02-14 22:52:45 PST
getAttribLocation should return long (GLint) instead of int.
Comment 1 Andrey Adaikin 2013-02-15 07:51:48 PST
Created attachment 188571 [details]
Patch
Comment 2 Andrey Adaikin 2013-02-15 07:52:55 PST
Only generator CPP will produce a different result:

diff --git a/tmp/bindings-golden/WebKitDOMWebGLRenderingContext.cpp b/tmp/bindings/WebKitDOMWebGLRenderingContext.cpp
index dcfdd19..d10052d 100644
--- a/tmp/bindings-golden/WebKitDOMWebGLRenderingContext.cpp
+++ b/tmp/bindings/WebKitDOMWebGLRenderingContext.cpp
@@ -1119,7 +1119,7 @@ webkit_dom_web_gl_rendering_context_get_active_uniform(WebKitDOMWebGLRenderingCo
 #endif /* ENABLE(WEBGL) */
 }
 
-gint
+glong
 webkit_dom_web_gl_rendering_context_get_attrib_location(WebKitDOMWebGLRenderingContext* self, WebKitDOMWebGLProgram* program, const gchar* name)
 {
 #if ENABLE(WEBGL)
@@ -1130,11 +1130,11 @@ webkit_dom_web_gl_rendering_context_get_attrib_location(WebKitDOMWebGLRenderingC
     WebCore::WebGLRenderingContext* item = WebKit::core(self);
     WebCore::WebGLProgram* convertedProgram = WebKit::core(program);
     WTF::String convertedName = WTF::String::fromUTF8(name);
-    gint result = item->getAttribLocation(convertedProgram, convertedName);
+    glong result = item->getAttribLocation(convertedProgram, convertedName);
     return result;
 #else
     WEBKIT_WARN_FEATURE_NOT_PRESENT("Webgl")
-    return static_cast<gint>(0);
+    return static_cast<glong>(0);
 #endif /* ENABLE(WEBGL) */
 }
 
diff --git a/tmp/bindings-golden/WebKitDOMWebGLRenderingContext.h b/tmp/bindings/WebKitDOMWebGLRenderingContext.h
index 3573ea3..5cae547 100644
--- a/tmp/bindings-golden/WebKitDOMWebGLRenderingContext.h
+++ b/tmp/bindings/WebKitDOMWebGLRenderingContext.h
@@ -793,7 +793,7 @@ webkit_dom_web_gl_rendering_context_get_active_uniform(WebKitDOMWebGLRenderingCo
  * Returns:
  *
 **/
-WEBKIT_API gint
+WEBKIT_API glong
 webkit_dom_web_gl_rendering_context_get_attrib_location(WebKitDOMWebGLRenderingContext* self, WebKitDOMWebGLProgram* program, const gchar* name);
 
 /**
Comment 3 Kentaro Hara 2013-02-15 07:58:12 PST
Comment on attachment 188571 [details]
Patch

OK. int is deprecated n the Web IDL spec.
Comment 4 WebKit Review Bot 2013-02-15 08:28:21 PST
Comment on attachment 188571 [details]
Patch

Clearing flags on attachment: 188571

Committed r143003: <http://trac.webkit.org/changeset/143003>
Comment 5 WebKit Review Bot 2013-02-15 08:28:24 PST
All reviewed patches have been landed.  Closing bug.