Title: [261536] trunk/Source/WebCore
- Revision
- 261536
- Author
- andresg...@apple.com
- Date
- 2020-05-11 18:28:40 -0700 (Mon, 11 May 2020)
Log Message
Fixes for crashes in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=211740
Reviewed by Chris Fleizach.
Fixes for several LayoutTests in isolated tree mode.
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(-[WebAccessibilityObjectWrapperBase attachIsolatedObject:]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper characterOffsetForTextMarker:]):
(-[WebAccessibilityObjectWrapper textMarkerForVisiblePosition:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (261535 => 261536)
--- trunk/Source/WebCore/ChangeLog 2020-05-12 01:05:57 UTC (rev 261535)
+++ trunk/Source/WebCore/ChangeLog 2020-05-12 01:28:40 UTC (rev 261536)
@@ -1,3 +1,21 @@
+2020-05-11 Andres Gonzalez <andresg...@apple.com>
+
+ Fixes for crashes in isolated tree mode.
+ https://bugs.webkit.org/show_bug.cgi?id=211740
+
+ Reviewed by Chris Fleizach.
+
+ Fixes for several LayoutTests in isolated tree mode.
+
+ * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
+ (-[WebAccessibilityObjectWrapperBase attachIsolatedObject:]):
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (-[WebAccessibilityObjectWrapper characterOffsetForTextMarker:]):
+ (-[WebAccessibilityObjectWrapper textMarkerForVisiblePosition:]):
+ (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
+ (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
+ (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
+
2020-05-11 Simon Fraser <simon.fra...@apple.com>
Scrollbars flicker in RTL scrollable regions
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm (261535 => 261536)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm 2020-05-12 01:05:57 UTC (rev 261535)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm 2020-05-12 01:28:40 UTC (rev 261536)
@@ -306,7 +306,8 @@
- (void)attachIsolatedObject:(AXCoreObject*)isolatedObject
{
ASSERT(isolatedObject && (_identifier == InvalidAXID || _identifier == isolatedObject->objectID()));
- ASSERT(m_axObject && isolatedObject->objectID() == m_axObject->objectID());
+ ASSERT(m_axObject);
+ ASSERT(isolatedObject->objectID() == m_axObject->objectID());
m_isolatedObject = isolatedObject;
if (_identifier == InvalidAXID)
_identifier = m_isolatedObject->objectID();
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (261535 => 261536)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2020-05-12 01:05:57 UTC (rev 261535)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2020-05-12 01:28:40 UTC (rev 261536)
@@ -895,12 +895,14 @@
- (CharacterOffset)characterOffsetForTextMarker:(id)textMarker
{
- return characterOffsetForTextMarker(self.axBackingObject->axObjectCache(), (__bridge CFTypeRef)textMarker);
+ auto *backingObject = self.axBackingObject;
+ return backingObject ? characterOffsetForTextMarker(backingObject->axObjectCache(), (__bridge CFTypeRef)textMarker) : nil;
}
- (id)textMarkerForVisiblePosition:(const VisiblePosition &)visiblePos
{
- return textMarkerForVisiblePosition(self.axBackingObject->axObjectCache(), visiblePos);
+ auto *backingObject = self.axBackingObject;
+ return backingObject ? textMarkerForVisiblePosition(backingObject->axObjectCache(), visiblePos) : nil;
}
- (id)textMarkerForFirstPositionInTextControl:(HTMLTextFormControlElement &)textControl
@@ -2429,7 +2431,7 @@
if (backingObject->isPasswordField() || backingObject->selectionEnd() > 0)
return nil;
- auto focusedObject = downcast<AccessibilityObject>(backingObject->focusedUIElement());
+ auto *focusedObject = backingObject->focusedUIElement();
if (focusedObject != backingObject)
return nil;
@@ -3489,8 +3491,8 @@
#if PLATFORM(MAC)
// In case anything we do by changing values causes an alert or other modal
// behaviors, we need to return now, so that VoiceOver doesn't hang indefinitely.
- dispatch_async(dispatch_get_main_queue(), ^{
- [self _accessibilitySetValue:value forAttribute:attributeName];
+ callOnMainThread([value = retainPtr(value), attributeName = retainPtr(attributeName), protectedSelf = retainPtr(self)] {
+ [protectedSelf _accessibilitySetValue:value.get() forAttribute:attributeName.get()];
});
#else
// dispatch_async on earlier versions can cause focus not to track.
@@ -3540,7 +3542,7 @@
} else if ([attributeName isEqualToString: NSAccessibilitySelectedChildrenAttribute]) {
if (!array)
return;
- if (backingObject->roleValue() != AccessibilityRole::ListBox)
+ if (!backingObject->isNativeListBox())
return;
AccessibilityObject::AccessibilityChildrenVector selectedChildren;
convertToVector(array, selectedChildren);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes