From dfae16f813e0984598985cf0124e9286ff34e7a5 Mon Sep 17 00:00:00 2001 From: Mason Freed Date: Thu, 14 Jul 2022 16:16:26 -0700 Subject: [PATCH] Rename togglepopup->popuptoggletarget, etc. Per the resolution [1], we are renaming: - togglepopup -> popuptoggletarget - showpopup -> popupshowtarget - hidepopup -> popuphidetarget A subsequent CL will add IDL reflections of these attributes. [1] https://github.com/openui/open-ui/issues/382#issuecomment-1184773425 Bug: 1307772 Change-Id: I3cf663b50b0b0f10cbc39d723608b1dcd28662e0 Cq-Do-Not-Cancel-Tryjobs: true --- .../popups/popup-focus.tentative.html | 10 +++---- .../popup-invoking-attribute.tentative.html | 12 ++++----- .../popups/popup-light-dismiss.tentative.html | 26 +++++++++---------- .../popups/popup-stacking.tentative.html | 8 +++--- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/html/semantics/popups/popup-focus.tentative.html b/html/semantics/popups/popup-focus.tentative.html index 0ab90bbf55457a..76cc33261eaf87 100644 --- a/html/semantics/popups/popup-focus.tentative.html +++ b/html/semantics/popups/popup-focus.tentative.html @@ -123,7 +123,7 @@ button.remove(); }); popUp.id = popUpId; - button.setAttribute('togglepopup', popUpId); + button.setAttribute('popuptoggletarget', popUpId); return button; } function addPriorFocus(t) { @@ -218,7 +218,7 @@ const priorFocus = addPriorFocus(t); assert_false(popUp.matches(':top-layer'), 'pop-up should start out hidden'); let button = addInvoker(t, popUp); - assert_equals(button.getAttribute('togglepopup'), popUp.id, 'This test assumes the button uses `togglepopup`.'); + assert_equals(button.getAttribute('popuptoggletarget'), popUp.id, 'This test assumes the button uses `popuptoggletarget`.'); assert_not_equals(button, priorFocus, 'Stranger things have happened'); assert_false(popUp.contains(button), 'Start with a non-contained button'); priorFocus.focus(); @@ -231,8 +231,8 @@ await finishAnimationsAndVerifyHide(popUp); // Same thing, but the button is contained within the pop-up - button.removeAttribute('togglepopup'); - button.setAttribute('hidepopup', popUp.id); + button.removeAttribute('popuptoggletarget'); + button.setAttribute('popuphidetarget', popUp.id); popUp.appendChild(button); priorFocus.focus(); popUp.showPopUp(); @@ -245,7 +245,7 @@ assert_equals(document.activeElement, priorFocus, 'Contained button should return focus to the previously focused element'); await finishAnimationsAndVerifyHide(popUp); - // Same thing, but the button is unrelated (no togglepopup) + // Same thing, but the button is unrelated (no popuptoggletarget) button = document.createElement('button'); document.body.appendChild(button); priorFocus.focus(); diff --git a/html/semantics/popups/popup-invoking-attribute.tentative.html b/html/semantics/popups/popup-invoking-attribute.tentative.html index 6b356c1563b77e..dbc3a1f4355619 100644 --- a/html/semantics/popups/popup-invoking-attribute.tentative.html +++ b/html/semantics/popups/popup-invoking-attribute.tentative.html @@ -123,9 +123,9 @@ assert_equals(popUp2.popUp,type); assert_not_equals(popUp1.id,popUp2.id); const invoker = testcase.makeElement(test); - if (t) invoker.setAttribute('togglepopup',t===1 ? popUp1.id : popUp2.id); - if (s) invoker.setAttribute('showpopup',s===1 ? popUp1.id : popUp2.id); - if (h) invoker.setAttribute('hidepopup',h===1 ? popUp1.id : popUp2.id); + if (t) invoker.setAttribute('popuptoggletarget',t===1 ? popUp1.id : popUp2.id); + if (s) invoker.setAttribute('popupshowtarget',s===1 ? popUp1.id : popUp2.id); + if (h) invoker.setAttribute('popuphidetarget',h===1 ? popUp1.id : popUp2.id); assert_true(!document.getElementById(popUp1.id)); assert_true(!document.getElementById(popUp2.id)); document.body.appendChild(popUp1); @@ -184,7 +184,7 @@ - +
This is pop-up #1
- - + + Outside all popups
Inside popup 1 - + Inside popup 1 after button
@@ -145,9 +145,9 @@ await waitForRender(); p1HideCount = popup1HideCount; await clickOn(button1toggle); - assert_false(popup1.matches(':top-layer'),'popup1 should be hidden by togglepopup'); - assert_equals(popup1HideCount,p1HideCount+1,'popup1 should get hidden only once by togglepopup'); - },'Clicking on togglepopup element, even if it wasn\'t used for activation, should hide it exactly once'); + assert_false(popup1.matches(':top-layer'),'popup1 should be hidden by popuptoggletarget'); + assert_equals(popup1HideCount,p1HideCount+1,'popup1 should get hidden only once by popuptoggletarget'); + },'Clicking on popuptoggletarget element, even if it wasn\'t used for activation, should hide it exactly once'); promise_test(async () => { popup1.showPopUp(); @@ -180,11 +180,11 @@ },'Dragging from an open popup outside an open popup should leave the popup open'); -
Inside popup 3
-