[Webkit-unassigned] [Bug 158634] AX: Form label text should be exposed as static text if it contains only static text

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 10 14:23:09 PDT 2016


--- Comment #5 from chris fleizach <cfleizach at apple.com> ---
Comment on attachment 281045
  --> https://bugs.webkit.org/attachment.cgi?id=281045

View in context: https://bugs.webkit.org/attachment.cgi?id=281045&action=review

>>> Source/WebCore/accessibility/AccessibilityLabel.cpp:76
>>> +                    staticText = true;
>> Seems like you don't need to keep track of staticText. As soon as you get a failure can you can just return false
>> Then you can return true at the end of it right
>> Also, you could probably cache this value and then update when children are updated
> Having bool staticText means I don't have to check if children is empty. I could switch to size == 0 at the top.
> Caching seemed tricky given there seem to be a lot of cases where the funnels aren't used and m_children.append() is used directly. And this method needs to be const to be called from stringValue() so calculating lazily and caching is tricky.

>> I could switch to size == 0 at the top.

That seems better to me

>>> Source/WebCore/accessibility/AccessibilityLabel.cpp:92
>>> +    return WebCore::containsOnlyStaticText(m_children);
>> This WebCore:: prefix is probably unnecessary
> You need it to disambiguate from AccessibilityLabel::containsOnlyStaticText() (the compiler gets huffy without it)

Might be better named

objectsContainOnlyStaticText or elementsContainOnlyStaticText

Since children is no longer accurate, the method being static rattan than an instance

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160610/0c309a28/attachment.html>

More information about the webkit-unassigned mailing list