[Webkit-unassigned] [Bug 41569] [Chromium] Expose basic DOM information in WebAccessibilityObject

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 7 08:57:03 PDT 2010


Darin Fisher (:fishd, Google) <fishd at chromium.org> changed:

           What    |Removed                     |Added
  Attachment #60454|review?, commit-queue?      |review-
               Flag|                            |

--- Comment #5 from Darin Fisher (:fishd, Google) <fishd at chromium.org>  2010-07-07 08:57:03 PST ---
(From update of attachment 60454)
 +      WEBKIT_API void attributeAt(unsigned index, WebString* name, WebString* value) const;
nit: webkit style is to use reference types for out params:  WebString& name, WebString& value

 +      WEBKIT_API WebString documentUrl() const;
nit: documentUrl -> documentURL

but, why do you need to expose these document properties?  Why not just
expose WebDocument (and add properties to it as needed)?
 +      Node* node = renderObject->node();
instead of exposing a tagName property, how about just exposing
a WebNode getter?  then, the consumer can call WebNode::nodeName.

 +      if (!node || !node->hasAttributes())
this also feels like something that should be provided by exposing
an attributes getter on WebElement.  Use the WebNodeList type.

 +  WebString WebAccessibilityObject::documentUrl() const
this method should definitely be eliminated in favor of accessing
the related WebNode, and then query its document.  from the
WebDocument you can get the WebFrame, and that has a "url" property.

 +      return document->title();
eliminate this method in favor of querying WebDocument::title.

 +      if (document && document->isXHTMLDocument())
WebDocument already has an isXHTMLDocument accessor

 +      DocumentType* doctype = document->doctype();
please expose a "WebDocumentType WebDocument::docType()" accessor.
that means creating the WebDocumentType class and adding the methods
to it that you need (just name for now).  it is fairly easy to 
create a new subclass of WebNode.  just look at WebDocument and
WebElement to see good examples of it.

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

More information about the webkit-unassigned mailing list