WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
25452
AX: Don't create addition space AXStaticText element for every bold or link tag
https://bugs.webkit.org/show_bug.cgi?id=25452
Summary
AX: Don't create addition space AXStaticText element for every bold or link tag
chris fleizach
Reported
2009-04-28 11:41:53 PDT
In the following simplified html example with two bold tag and two links, I would expect four uiElements represented thru accessibility. Instead, I see eight uiElements. Somehow WebKit is creating another AXStaticText that contains a space character as the AXValue after every bold or link tag. See the screenshot for an example of one of these spacer AXStaticText. Note that the start marker is the same as the end marker. <b>First</b> <b>Second</b> <a href="
http://www.apple.com
">Apple</a> <a href="
http://www.yahoo.com
">Yahoo</a>
Attachments
patch
(5.36 KB, patch)
2009-04-28 11:45 PDT
,
chris fleizach
darin
: review-
Details
Formatted Diff
Diff
patch
(9.85 KB, patch)
2009-04-28 11:51 PDT
,
chris fleizach
darin
: review-
Details
Formatted Diff
Diff
patch
(9.75 KB, patch)
2009-04-28 12:03 PDT
,
chris fleizach
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
chris fleizach
Comment 1
2009-04-28 11:45:57 PDT
Created
attachment 29855
[details]
patch
Darin Adler
Comment 2
2009-04-28 11:51:52 PDT
Comment on
attachment 29855
[details]
patch
> + // text elements that are just empty whitespace should not be returned > + String text = renderText->text()->simplifyWhiteSpace(); > + if (text.isNull() || text.isEmpty()) > + return true; > + return false;
This should just be: return renderText->text()->simplifyWhiteSpace().isEmpty(); There's no need for a separate isNull check since null strings are also guaranteed to be empty. But really, to be efficient, it should be: return renderText->text()->containsOnlyWhitespace(); Unfortunately, that function is currently defined for StringImpl* but not for String. Since RenderText guarantees that text() will never return null (you can see assertions to that effect inside the class), you can do this: return renderText->text()->impl()->containsOnlyWhitespace(); I値l say review- because it would be better to do the more efficient version.
chris fleizach
Comment 3
2009-04-28 11:51:54 PDT
Created
attachment 29856
[details]
patch
Darin Adler
Comment 4
2009-04-28 11:54:29 PDT
Comment on
attachment 29856
[details]
patch Same comments on this patch, but this also seems to include other seemingly-unrelated changes. Maybe fixing two bugs at once?
chris fleizach
Comment 5
2009-04-28 11:55:28 PDT
you're too quick for me. first time uploaded i forgot the DumpRenderTree changes i obsoleted the first patch, then tried to upload again, but didn't see the comments until i had uploaded
chris fleizach
Comment 6
2009-04-28 12:03:44 PDT
Created
attachment 29857
[details]
patch updated patch based on darin's review.
chris fleizach
Comment 7
2009-04-28 12:04:10 PDT
it seems that i can use renderText->text()->containsOnlyWhitespace(); without problem
Darin Adler
Comment 8
2009-04-28 12:10:10 PDT
Comment on
attachment 29857
[details]
patch r=me
chris fleizach
Comment 9
2009-04-28 12:14:33 PDT
http://trac.webkit.org/changeset/42946
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug