RESOLVED FIXED 40192
AX: link won't return linked element if URL contains #
https://bugs.webkit.org/show_bug.cgi?id=40192
Summary AX: link won't return linked element if URL contains #
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.