Bug 40192

Summary: AX: link won't return linked element if URL contains #
Product: WebKit Reporter: chris fleizach <cfleizach>
Component: AccessibilityAssignee: chris fleizach <cfleizach>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, ddkilzer, gustavo, webkit.review.bot, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
Patch darin: review+

chris fleizach
Reported 2010-06-04 17:37:43 PDT
If you click on an internal link, so that the document URL contains a frament in it, subsequent calls to ask for linkedElements will not work
Attachments
Patch (8.93 KB, patch)
2010-06-11 10:57 PDT, chris fleizach
no flags
Patch (10.40 KB, patch)
2010-06-11 11:25 PDT, chris fleizach
darin: review+
chris fleizach
Comment 1 2010-06-04 17:47:32 PDT
So i don't forget Index: WebCore/accessibility/AccessibilityRenderObject.cpp =================================================================== --- WebCore/accessibility/AccessibilityRenderObject.cpp (revision 230881) +++ WebCore/accessibility/AccessibilityRenderObject.cpp (working copy) @@ -1247,7 +1247,9 @@ AccessibilityObject* AccessibilityRender // check if URL is the same as current URL linkURL.removeFragmentIdentifier(); - if (m_renderer->document()->url() != linkURL) + KURL documentURL = m_renderer->document()->url(); + documentURL.removeFragmentIdentifier(); + if (documentURL != linkURL) return 0;
chris fleizach
Comment 2 2010-06-11 10:57:23 PDT
WebKit Review Bot
Comment 3 2010-06-11 11:08:14 PDT
chris fleizach
Comment 4 2010-06-11 11:25:19 PDT
WebKit Review Bot
Comment 5 2010-06-11 11:32:29 PDT
Darin Adler
Comment 6 2010-06-12 19:13:37 PDT
Comment on attachment 58489 [details] Patch > linkURL.removeFragmentIdentifier(); > - if (m_renderer->document()->url() != linkURL) > + KURL documentURL = m_renderer->document()->url(); > + documentURL.removeFragmentIdentifier(); > + if (documentURL != linkURL) > return 0; There's also a equalIgnoringFragmentIdentifier function in KURL.h that can be used for cases like this.
chris fleizach
Comment 7 2010-06-13 21:01:30 PDT
Note You need to log in before you can comment on or make changes to this bug.