WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 232755
[GTK][a11y] Add implementation of document interface when building with ATSPI
https://bugs.webkit.org/show_bug.cgi?id=232755
Summary
[GTK][a11y] Add implementation of document interface when building with ATSPI
Carlos Garcia Campos
Reported
2021-11-05 06:12:56 PDT
Implement document
Attachments
Patch
(19.95 KB, patch)
2021-11-05 06:17 PDT
,
Carlos Garcia Campos
no flags
Details
Formatted Diff
Diff
Patch
(19.86 KB, patch)
2021-11-19 05:45 PST
,
Carlos Garcia Campos
no flags
Details
Formatted Diff
Diff
Patch
(19.86 KB, patch)
2021-11-19 06:31 PST
,
Carlos Garcia Campos
aperez
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2021-11-05 06:17:29 PDT
Created
attachment 443390
[details]
Patch This won't apply because it depends on other bugs not fixed yet.
Carlos Garcia Campos
Comment 2
2021-11-19 05:45:40 PST
Created
attachment 444809
[details]
Patch
Carlos Garcia Campos
Comment 3
2021-11-19 06:31:13 PST
Created
attachment 444813
[details]
Patch
Adrian Perez
Comment 4
2021-11-19 06:42:01 PST
Comment on
attachment 444813
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=444813&action=review
> Source/WebCore/accessibility/atspi/AccessibilityObjectDocumentAtspi.cpp:112 > + return map;
I would first check m_coreObject and do the early return, after that we know that it will not be null and avoid checking it again. I am thinking of this: if (!m_coreObject) return map; m_coreObject->updateBackingStore(); auto* document = m_coreObject->document(); // ...rest of the code as it was...
> Source/WebCore/accessibility/atspi/AccessibilityObjectDocumentAtspi.cpp:148 > + return { };
Same here, there are two null-checks on m_coreObject one right after the other.
Carlos Garcia Campos
Comment 5
2021-11-19 06:46:20 PST
Comment on
attachment 444813
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=444813&action=review
>> Source/WebCore/accessibility/atspi/AccessibilityObjectDocumentAtspi.cpp:112 >> + return map; > > I would first check m_coreObject and do the early return, after that we know > that it will not be null and avoid checking it again. I am thinking of this: > > if (!m_coreObject) > return map; > > m_coreObject->updateBackingStore(); > auto* document = m_coreObject->document(); > // ...rest of the code as it was...
This is because updateBackingStore can make m_coreObject nullptr.
>> Source/WebCore/accessibility/atspi/AccessibilityObjectDocumentAtspi.cpp:148 >> + return { }; > > Same here, there are two null-checks on m_coreObject one right after the other.
Same here, the pattern is repeated everywhere.
Adrian Perez
Comment 6
2021-11-19 06:49:46 PST
(In reply to Carlos Garcia Campos from
comment #5
)
> Comment on
attachment 444813
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=444813&action=review
> > >> Source/WebCore/accessibility/atspi/AccessibilityObjectDocumentAtspi.cpp:112 > >> + return map; > > > > I would first check m_coreObject and do the early return, after that we know > > that it will not be null and avoid checking it again. I am thinking of this: > > > > if (!m_coreObject) > > return map; > > > > m_coreObject->updateBackingStore(); > > auto* document = m_coreObject->document(); > > // ...rest of the code as it was... > > This is because updateBackingStore can make m_coreObject nullptr. > > >> Source/WebCore/accessibility/atspi/AccessibilityObjectDocumentAtspi.cpp:148 > >> + return { }; > > > > Same here, there are two null-checks on m_coreObject one right after the other. > > Same here, the pattern is repeated everywhere.
Right. Thanks for commenting on this :-)
Carlos Garcia Campos
Comment 7
2021-11-19 06:51:21 PST
Committed
r286059
(
244446@main
): <
https://commits.webkit.org/244446@main
>
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