Changeset 281014 in webkit
- Timestamp:
- Aug 13, 2021, 7:16:31 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
dom/Element.h (modified) (1 diff)
-
html/HTMLDialogElement.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r281013 r281014 1 2021-08-13 Tim Nguyen <ntim@apple.com> 2 3 Check for dialog existence in top layer in HTMLDialogElement::showModal & close 4 https://bugs.webkit.org/show_bug.cgi?id=227907 5 6 Reviewed by Antti Koivisto. 7 8 Test: imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal.html 9 10 Test expectations are unchanged because the test uses elementFromPoint, meaning that behaviour difference isn't noticeable 11 until top layer rendering bits are implemented (which would change elementFromPoint's result by shuffling z-order based on top layer elements). 12 13 * dom/Element.h: 14 (WebCore::Element::isInTopLayer const): 15 * html/HTMLDialogElement.cpp: 16 (WebCore::HTMLDialogElement::showModal): 17 (WebCore::HTMLDialogElement::close): 18 1 19 2021-08-13 Jean-Yves Avenard <jya@apple.com> 2 20 -
trunk/Source/WebCore/dom/Element.h
r280718 r281014 512 512 void setLastStyleChangeEventStyle(PseudoId, std::unique_ptr<const RenderStyle>&&); 513 513 514 bool isInTopLayer() const { return document().topLayerElements().contains(makeRef(*const_cast<Element*>(this))); } 515 514 516 #if ENABLE(FULLSCREEN_API) 515 517 bool containsFullScreenElement() const { return hasNodeFlag(NodeFlag::ContainsFullScreenElement); } -
trunk/Source/WebCore/html/HTMLDialogElement.cpp
r280703 r281014 66 66 m_isModal = true; 67 67 68 // FIXME: Only add dialog to top layer if it's not already in it. (webkit.org/b/227907)69 document().addToTopLayer(*this);68 if (!isInTopLayer()) 69 document().addToTopLayer(*this); 70 70 71 71 // FIXME: Add steps 8 & 9 from spec. (webkit.org/b/227537) … … 86 86 m_returnValue = result; 87 87 88 // FIXME: Only remove dialog from top layer if it's inside it. (webkit.org/b/227907)89 document().removeFromTopLayer(*this);88 if (isInTopLayer()) 89 document().removeFromTopLayer(*this); 90 90 91 91 // FIXME: Add step 6 from spec. (webkit.org/b/227537)
Note:
See TracChangeset
for help on using the changeset viewer.