Title: [284149] trunk/Source/WebCore
Revision
284149
Author
[email protected]
Date
2021-10-14 00:04:05 -0700 (Thu, 14 Oct 2021)

Log Message

Remove useless isConnected() check from HTMLDialogElement::close()
https://bugs.webkit.org/show_bug.cgi?id=231722

Reviewed by Antti Koivisto.

No behavior change.

Element::focus() already early returns if the element is disconnected, so it is redundant.

* html/HTMLDialogElement.cpp:
(WebCore::HTMLDialogElement::close):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (284148 => 284149)


--- trunk/Source/WebCore/ChangeLog	2021-10-14 05:29:16 UTC (rev 284148)
+++ trunk/Source/WebCore/ChangeLog	2021-10-14 07:04:05 UTC (rev 284149)
@@ -1,3 +1,17 @@
+2021-10-14  Tim Nguyen  <[email protected]>
+
+        Remove useless isConnected() check from HTMLDialogElement::close()
+        https://bugs.webkit.org/show_bug.cgi?id=231722
+
+        Reviewed by Antti Koivisto.
+
+        No behavior change.
+
+        Element::focus() already early returns if the element is disconnected, so it is redundant.
+
+        * html/HTMLDialogElement.cpp:
+        (WebCore::HTMLDialogElement::close):
+
 2021-10-13  Rob Buis  <[email protected]>
 
         Determine viewport distances for lazy image loading

Modified: trunk/Source/WebCore/html/HTMLDialogElement.cpp (284148 => 284149)


--- trunk/Source/WebCore/html/HTMLDialogElement.cpp	2021-10-14 05:29:16 UTC (rev 284148)
+++ trunk/Source/WebCore/html/HTMLDialogElement.cpp	2021-10-14 07:04:05 UTC (rev 284149)
@@ -95,7 +95,7 @@
     if (isInTopLayer())
         removeFromTopLayer();
 
-    if (RefPtr element = std::exchange(m_previouslyFocusedElement, nullptr).get(); element && element->isConnected()) {
+    if (RefPtr element = std::exchange(m_previouslyFocusedElement, nullptr).get()) {
         FocusOptions options;
         options.preventScroll = true;
         element->focus(options);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to