[Webkit-unassigned] [Bug 16401] [GTK] GObject/C DOM binding

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 3 18:15:55 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=16401





------- Comment #180 from jim at yorba.org  2009-03-03 18:15 PDT -------
Regarding the name prefix, I've looked over the suggestions that have come up
over the past few weeks as well as examined the multitude of files being
generated by the automatic bindings, and conclude we should use the plain
"WebKit" prefix (that is, Adam's option 1 in comment #171).

First, not all the generated classes are part of the DOM specification.  The
SQL classes, Plugin and PluginArray, and WebKitAnimationEvent all appear to be
outside the DOM spec, and there are certainly more.  The XMLHttpRequest and
XPath IDLs are W3C specifications, but also appear outside the DOM.  Thus, a
class called WebKitDomPlugin is technically wrong.

Christian brought up in comment #173 that WebKitText would clash with GtkText
in object oriented languages.  However, a class called Text is common beyond
Gtk.  Name collisions are not a unique problem.  I know it's inconvenient to
have to fully qualify the name in source, but it's not unprecedented.

Considering the wide gamut of the generated classes and the various
requirements we're placed under here -- that the classes may be invoked in C,
Python, Vala, and beyond, and that they all do not live inside the DOM spec --
I think the plain "WebKit" prefix is the way to go.

If maintaining namespace is necessary, as Gustavo mentions in comment #174,
we're going to need multiple namespaces for the various types of classes (DOM,
WebKit-specific, XML-HTTP, etc.).  In some ways, that's already been done for
us.  I count 7 namespaces already declared by virtue of consistent naming:
CSS*, DOM*, HTML*, SQL*, SVG*, WebKit* (i.e. WebKitAnimationEvent.idl),
XMLHttp*, and XPath*.  The generic classes outside those namespaces (i.e. Attr,
WheelEvent, Screen) would have to be categorized further to their appropriate
namespace, since they're not all DOM (or of any other common grouping).

But since we're talking about over 300 classes (in the full JS bindings), this
seems extraordinarily complex and unnecessary.  If someone would care to
provide such a taxonomy in a text file, I'd be happy to consider it.  For now,
however, I vote we move forward with the unadorned "WebKit" prefix.

-- Jim


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list