Closed
Bug 340802
Opened 19 years ago
Closed 19 years ago
New ATK: Implement AtkDocument support
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: aaronlev, Assigned: evan.yan)
References
Details
(Keywords: access)
Attachments
(3 files, 3 obsolete files)
|
2.33 KB,
patch
|
ginnchen+exoracle
:
review+
|
Details | Diff | Splinter Review |
|
5.21 KB,
patch
|
ginnchen+exoracle
:
review+
|
Details | Diff | Splinter Review |
|
5.06 KB,
patch
|
ginnchen+exoracle
:
review+
aaronlev
:
review+
|
Details | Diff | Splinter Review |
For any nsDocAccessible we can implement AtkDocument:
// Expose mime type here, available via nsIAccessibleDocument::GetMimeType()
const gchar* atk_document_get_document_type (AtkDocument *document);
// Not sure what to use this for, if anything
gpointer atk_document_get_document (AtkDocument *document);
// Use these to expose doc URL and doctype, also available via nsIAccessibleDocument
const gchar* atk_document_get_attribute_value
AtkAttributeSet* atk_document_get_attributes
| Reporter | ||
Updated•19 years ago
|
Assignee: aaronleventhal → gaomingcn
Attachment #230699 -
Flags: review?(ginn.chen)
Attachment #230700 -
Flags: review?(ginn.chen)
accessible/src/atk/nsMaiInterfaceDocument.cpp
Attachment #230701 -
Flags: review?(ginn.chen)
Comment on attachment 230699 [details] [diff] [review]
patch without new added file
+ (GInterfaceFinalizeFunc) NULL, NULL},
+#ifdef USE_ATK_TYPE_DOCUMENT
+ {(GInterfaceInitFunc)documentInterfaceInitCB,
(GInterfaceFinalizeFunc) NULL, NULL}
+#endif
should be
+#ifdef
+ (GInterfaceFinalizeFunc) NULL, NULL},
USE_ATK_TYPE_DOCUMENT
+ {(GInterfaceInitFunc)documentInterfaceInitCB,
+#endif
(GInterfaceFinalizeFunc) NULL, NULL}
| Reporter | ||
Comment 5•19 years ago
|
||
Comment on attachment 230701 [details] [diff] [review]
new added cpp file
Nit: I suppose the normal way to name consts in Mozilla is something like kDocTypeName instead of DOC_TYPE_NAME.
Also, I don't think they need "Attribute." as a prefix since we already know they are attributes.
Question, are the attribute names supposed to be case sensitive or insensitive?
Attachment #230699 -
Attachment is obsolete: true
Attachment #230835 -
Flags: review?(ginn.chen)
Attachment #230699 -
Flags: review?(ginn.chen)
Aaron, I use g_ascii_strcasecmp() to compare the attribute names, so they're case insensitive, is that right?
Attachment #230701 -
Attachment is obsolete: true
Attachment #230836 -
Flags: review?(ginn.chen)
Attachment #230701 -
Flags: review?(ginn.chen)
| Reporter | ||
Comment 8•19 years ago
|
||
(In reply to comment #7)
> Created an attachment (id=230836) [edit]
> cpp file (addressing Aaron's comment)
>
> Aaron, I use g_ascii_strcasecmp() to compare the attribute names, so they're
> case insensitive, is that right?
I think case insensitive is good, but it would be useful if that's specified in ATK/AT-SPI.
according to Ginn's suggesting, I'm writing a python testcase for this bug.
The testcase is originate from the testcase of bug 345825
its idea is to register a keystroke listener, and get the active window in the listener. Then traversal all the children and descendant to get the document object.
but now I have some problem of getting document object through queryInterface("IDL:Accessibility/Document:1.0"). it always return null even the role is "document frame".
I'm still working on that.
Comment 10•19 years ago
|
||
Aaron, I think to use "DocType" as attribute name is confusing.
We've atk_document_get_document_type, and we return mime type for it.
How could user tell the difference of document_type and "DocType" ?
BTW: I'm working on at-spi side and at-poke to get the api work, nearly finish.
| Reporter | ||
Comment 11•19 years ago
|
||
Okay, instead of DocType call it xml-doctype.
| Reporter | ||
Comment 12•19 years ago
|
||
Or w3c-doctype :)
Comment 13•19 years ago
|
||
Comment on attachment 230836 [details] [diff] [review]
cpp file (addressing Aaron's comment)
Change to "W3C-doctype", I found sometimes, accDocument->GetDocType doesn't succeed, I want to change to code sequence in getDocumentAttributesCB, so that we can still return DocURL in this case.
Attachment #230836 -
Flags: review?(ginn.chen) → review-
Comment 14•19 years ago
|
||
call nsAccessibleWrap::ReturnString twice in getDocumentAttributesCB is confusing, should use NS_ConvertUTF16toUTF8 directly instead.
| Assignee | ||
Comment 15•19 years ago
|
||
Attachment #230836 -
Attachment is obsolete: true
Attachment #233757 -
Flags: review?(ginn.chen)
Attachment #230700 -
Flags: review?(ginn.chen) → review+
Attachment #230835 -
Flags: review?(ginn.chen) → review+
Comment 16•19 years ago
|
||
Comment on attachment 233757 [details] [diff] [review]
cpp file, addression ginn's comments.
Aaron, I've verified this patch with patched at-spi and at-poke.
Patches in
http://bugzilla.gnome.org/show_bug.cgi?id=351409
http://bugzilla.gnome.org/show_bug.cgi?id=351427
Attachment #233757 -
Flags: review?(ginn.chen)
Attachment #233757 -
Flags: review?(aaronleventhal)
Attachment #233757 -
Flags: review+
| Reporter | ||
Comment 17•19 years ago
|
||
Comment on attachment 233757 [details] [diff] [review]
cpp file, addression ginn's comments.
Okay. At some point we may want to move some of this code to core via new nsIAccessibleDocument methods which return an array. That would make it possible to easily add new document attributes as well as have them be accessible via scripting. However, since they are already available via scripting through the other calls, I think this is okay.
Attachment #233757 -
Flags: review?(aaronleventhal) → review+
Comment 18•19 years ago
|
||
Committed.
Moved #if code from Makefile.in to nsMaiInterfaceDocument.cpp.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•