- Revision
- 283631
- Author
- [email protected]
- Date
- 2021-10-06 10:29:40 -0700 (Wed, 06 Oct 2021)
Log Message
Reset m_isModal flag when removing <dialog> from document
https://bugs.webkit.org/show_bug.cgi?id=231290
Reviewed by Alan Bujtas.
m_isModal triggers the :-internal-modal-dialog pseudo class, which changes position from absolute to fixed.
When removing a modal <dialog> from the document, it is also removed from the top layer, so it makes sense
to reset the m_isModal flag as well as a result.
Updated test expectations to reflect new passing tests.
LayoutTests/imported/w3c:
* web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt:
Source/WebCore:
* html/HTMLDialogElement.cpp:
(WebCore::HTMLDialogElement::removedFromAncestor):
* html/HTMLDialogElement.h:
LayoutTests:
* TestExpectations:
* platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt: Removed.
Modified Paths
Removed Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (283630 => 283631)
--- trunk/LayoutTests/ChangeLog 2021-10-06 17:13:19 UTC (rev 283630)
+++ trunk/LayoutTests/ChangeLog 2021-10-06 17:29:40 UTC (rev 283631)
@@ -1,3 +1,20 @@
+2021-10-06 Tim Nguyen <[email protected]>
+
+ Reset m_isModal flag when removing <dialog> from document
+ https://bugs.webkit.org/show_bug.cgi?id=231290
+
+ Reviewed by Alan Bujtas.
+
+ m_isModal triggers the :-internal-modal-dialog pseudo class, which changes position from absolute to fixed.
+
+ When removing a modal <dialog> from the document, it is also removed from the top layer, so it makes sense
+ to reset the m_isModal flag as well as a result.
+
+ Updated test expectations to reflect new passing tests.
+
+ * TestExpectations:
+ * platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt: Removed.
+
2021-10-06 Ayumi Kojima <[email protected]>
media/modern-media-controls tests are timing out.
Modified: trunk/LayoutTests/TestExpectations (283630 => 283631)
--- trunk/LayoutTests/TestExpectations 2021-10-06 17:13:19 UTC (rev 283630)
+++ trunk/LayoutTests/TestExpectations 2021-10-06 17:29:40 UTC (rev 283631)
@@ -2282,7 +2282,6 @@
# Top layer tests
webkit.org/b/84796 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer.html [ ImageOnlyFailure ]
webkit.org/b/84796 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column.html [ ImageOnlyFailure ]
-webkit.org/b/84796 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/removed-element-is-removed-from-top-layer.html [ ImageOnlyFailure ]
webkit.org/b/84796 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-containing-block.html [ ImageOnlyFailure ]
webkit.org/b/84796 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-stacking.html [ ImageOnlyFailure ]
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (283630 => 283631)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-10-06 17:13:19 UTC (rev 283630)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-10-06 17:29:40 UTC (rev 283631)
@@ -1,3 +1,19 @@
+2021-10-06 Tim Nguyen <[email protected]>
+
+ Reset m_isModal flag when removing <dialog> from document
+ https://bugs.webkit.org/show_bug.cgi?id=231290
+
+ Reviewed by Alan Bujtas.
+
+ m_isModal triggers the :-internal-modal-dialog pseudo class, which changes position from absolute to fixed.
+
+ When removing a modal <dialog> from the document, it is also removed from the top layer, so it makes sense
+ to reset the m_isModal flag as well as a result.
+
+ Updated test expectations to reflect new passing tests.
+
+ * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt:
+
2021-10-05 Kate Cheney <[email protected]>
CSP: unsafe-eval tests timing out or failing
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt (283630 => 283631)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt 2021-10-06 17:13:19 UTC (rev 283630)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt 2021-10-06 17:29:40 UTC (rev 283631)
@@ -6,7 +6,7 @@
PASS The dialog should be centered regardless of the presence of a horizontal scrollbar.
PASS Centering should work when dialog is inside positioned containers.
PASS A centered dialog's position should survive becoming display:none temporarily.
-FAIL Dialog should not still be centered when removed, and re-added to the document. assert_equals: expected 291 but got 320
+PASS Dialog should not still be centered when removed, and re-added to the document.
PASS Dialog's specified position should survive after close() and showModal().
PASS Dialog should be recentered if showModal() is called after removing 'open'.
Deleted: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt (283630 => 283631)
--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt 2021-10-06 17:13:19 UTC (rev 283630)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt 2021-10-06 17:29:40 UTC (rev 283631)
@@ -1,12 +0,0 @@
-
-PASS showModal() should center in the viewport
-PASS Dialog should be recentered if showModal() is called after close()
-PASS Dialog should not recenter on relayout.
-PASS A tall dialog should be positioned at the top of the viewport.
-PASS The dialog should be centered regardless of the presence of a horizontal scrollbar.
-PASS Centering should work when dialog is inside positioned containers.
-PASS A centered dialog's position should survive becoming display:none temporarily.
-FAIL Dialog should not still be centered when removed, and re-added to the document. assert_equals: expected 290 but got 320
-PASS Dialog's specified position should survive after close() and showModal().
-PASS Dialog should be recentered if showModal() is called after removing 'open'.
-
Modified: trunk/Source/WebCore/ChangeLog (283630 => 283631)
--- trunk/Source/WebCore/ChangeLog 2021-10-06 17:13:19 UTC (rev 283630)
+++ trunk/Source/WebCore/ChangeLog 2021-10-06 17:29:40 UTC (rev 283631)
@@ -1,3 +1,21 @@
+2021-10-06 Tim Nguyen <[email protected]>
+
+ Reset m_isModal flag when removing <dialog> from document
+ https://bugs.webkit.org/show_bug.cgi?id=231290
+
+ Reviewed by Alan Bujtas.
+
+ m_isModal triggers the :-internal-modal-dialog pseudo class, which changes position from absolute to fixed.
+
+ When removing a modal <dialog> from the document, it is also removed from the top layer, so it makes sense
+ to reset the m_isModal flag as well as a result.
+
+ Updated test expectations to reflect new passing tests.
+
+ * html/HTMLDialogElement.cpp:
+ (WebCore::HTMLDialogElement::removedFromAncestor):
+ * html/HTMLDialogElement.h:
+
2021-10-06 Youenn Fablet <[email protected]>
CoreAudioSharedUnit should not clear its persistentID when device capture changes
Modified: trunk/Source/WebCore/html/HTMLDialogElement.cpp (283630 => 283631)
--- trunk/Source/WebCore/html/HTMLDialogElement.cpp 2021-10-06 17:13:19 UTC (rev 283630)
+++ trunk/Source/WebCore/html/HTMLDialogElement.cpp 2021-10-06 17:29:40 UTC (rev 283631)
@@ -105,4 +105,10 @@
});
}
+void HTMLDialogElement::removedFromAncestor(RemovalType removalType, ContainerNode& oldParentOfRemovedTree)
+{
+ HTMLElement::removedFromAncestor(removalType, oldParentOfRemovedTree);
+ m_isModal = false;
}
+
+}
Modified: trunk/Source/WebCore/html/HTMLDialogElement.h (283630 => 283631)
--- trunk/Source/WebCore/html/HTMLDialogElement.h 2021-10-06 17:13:19 UTC (rev 283630)
+++ trunk/Source/WebCore/html/HTMLDialogElement.h 2021-10-06 17:29:40 UTC (rev 283631)
@@ -50,6 +50,8 @@
private:
HTMLDialogElement(const QualifiedName&, Document&);
+ void removedFromAncestor(RemovalType, ContainerNode& oldParentOfRemovedTree) final;
+
String m_returnValue;
bool m_isModal { false };
};