<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - AX: Selection change as a result of focusing an element should include that information in the intent"
href="https://bugs.webkit.org/show_bug.cgi?id=146533#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - AX: Selection change as a result of focusing an element should include that information in the intent"
href="https://bugs.webkit.org/show_bug.cgi?id=146533">bug 146533</a>
from <span class="vcard"><a class="email" href="mailto:cfleizach@apple.com" title="chris fleizach <cfleizach@apple.com>"> <span class="fn">chris fleizach</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=255970&action=diff" name="attach_255970" title="patch">attachment 255970</a> <a href="attachment.cgi?id=255970&action=edit" title="patch">[details]</a></span>
patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=255970&action=review">https://bugs.webkit.org/attachment.cgi?id=255970&action=review</a>
<span class="quote">> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:1686
> + if (AXObjectCache* cache = axObjectCache())</span >
i don't think you have to worry about axObjectCache() being nullptr inside of an AX object
<span class="quote">> Source/WebCore/dom/Element.h:325
> + static AXTextStateChangeIntent defaultFocusTextStateChangeIntent() { return AXTextStateChangeIntent(AXTextStateChangeTypeSelectionMove, AXTextSelection { AXTextSelectionDirectionDiscontiguous, AXTextSelectionGranularityUnknown, true }); }</span >
is this one different from the default AXTextStateChangeIntent();
for cases, like
select(Element::defaultFocusTextStateChangeIntent());
it would be nice to not have to pass the argument
<span class="quote">> Source/WebCore/editing/FrameSelection.cpp:174
> + AXTextStateChangeIntent newIntent;</span >
can we remove the else and just initialize with
newIntent = intent;
<span class="quote">> Source/WebCore/html/HTMLTextFormControlElement.h:113
> + void restoreCachedSelection(const AXTextStateChangeIntent& = AXTextStateChangeIntent());</span >
AXTextStateChangeIntent is looking a bit wordy. Since this is being used all over non accessibility code, maybe the name should be changed to something like
TextIntention</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>