Summary: | AX: link won't return linked element if URL contains # | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | chris fleizach <cfleizach> | ||||||
Component: | Accessibility | Assignee: | 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
chris fleizach
2010-06-04 17:37:43 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; Created attachment 58486 [details]
Patch
Attachment 58486 [details] did not build on gtk: Build output: http://webkit-commit-queue.appspot.com/results/3222217 Created attachment 58489 [details]
Patch
Attachment 58486 [details] did not build on win: Build output: http://webkit-commit-queue.appspot.com/results/3238275 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. |