From 21fce85036b827ea65b86d5d0d0ec7f7b5a19372 Mon Sep 17 00:00:00 2001 From: Joel Einbinder Date: Mon, 13 Jan 2020 17:15:43 -0800 Subject: [PATCH] fix(webkit): support the readonly attribute (#476) `readOnlyValue()` was confusingly only the `aria-readonly` value. The real readonly value was determined by reading the `canSetValueAttribute` and `enabled` states. --- browser_patches/webkit/BUILD_NUMBER | 2 +- browser_patches/webkit/patches/bootstrap.diff | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/browser_patches/webkit/BUILD_NUMBER b/browser_patches/webkit/BUILD_NUMBER index fd1f63c243..75864bc505 100644 --- a/browser_patches/webkit/BUILD_NUMBER +++ b/browser_patches/webkit/BUILD_NUMBER @@ -1 +1 @@ -1085 +1086 diff --git a/browser_patches/webkit/patches/bootstrap.diff b/browser_patches/webkit/patches/bootstrap.diff index 95ad57706e..9854488797 100644 --- a/browser_patches/webkit/patches/bootstrap.diff +++ b/browser_patches/webkit/patches/bootstrap.diff @@ -2470,7 +2470,7 @@ index a68f84520736977c8b9216616c5a178fbf5275d6..bee832c4c65f9a4487c0d0b7c6fd6985 } // namespace WebCore diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp -index d4e6b5d1f2151a1f4c16081b2695dd66da416ba2..4c3fa82e3bb63bd3750731157950563808c754c2 100644 +index d4e6b5d1f2151a1f4c16081b2695dd66da416ba2..7ddcea8b824043a6a17cfe2d209d861b701029f1 100644 --- a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp +++ b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp @@ -32,6 +32,8 @@ @@ -3105,8 +3105,8 @@ index d4e6b5d1f2151a1f4c16081b2695dd66da416ba2..4c3fa82e3bb63bd37507311579505638 + axNode->setMultiline(multiline); + if (axObject->isMultiSelectable()) + axNode->setMultiselectable(axObject->isMultiSelectable()); -+ if (axObject->supportsReadOnly()) -+ axNode->setReadonly(axObject->readOnlyValue() == "true"); ++ if (axObject->supportsReadOnly() && !axObject->canSetValueAttribute() && axObject->isEnabled()) ++ axNode->setReadonly(true); + if (axObject->supportsRequiredAttribute()) + axNode->setRequired(axObject->isRequired()); + if (axObject->isSelected())