Skip to content

Commit 0bbb05f

Browse files
committed
Unreviewed build fix after r212025.
inDocument -> isConnected * html/FormAssociatedElement.cpp: (WebCore::FormAssociatedElement::didMoveToNewDocument): (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::formElementIndex): Canonical link: https://commits.webkit.org/185137@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent efbebb9 commit 0bbb05f

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

Source/WebCore/ChangeLog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2017-02-09 Brent Fulgham <bfulgham@apple.com>
2+
3+
Unreviewed build fix after r212025.
4+
5+
inDocument -> isConnected
6+
7+
* html/FormAssociatedElement.cpp:
8+
(WebCore::FormAssociatedElement::didMoveToNewDocument):
9+
(WebCore::FormAssociatedElement::resetFormAttributeTargetObserver):
10+
* html/HTMLFormElement.cpp:
11+
(WebCore::HTMLFormElement::formElementIndex):
12+
113
2017-02-09 Chris Dumez <cdumez@apple.com>
214

315
Make sure Event keeps its current target element alive

Source/WebCore/html/FormAssociatedElement.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ FormAssociatedElement::~FormAssociatedElement()
6363
void FormAssociatedElement::didMoveToNewDocument(Document&)
6464
{
6565
HTMLElement& element = asHTMLElement();
66-
if (element.hasAttributeWithoutSynchronization(formAttr) && element.inDocument())
66+
if (element.hasAttributeWithoutSynchronization(formAttr) && element.isConnected())
6767
resetFormAttributeTargetObserver();
6868
}
6969

@@ -266,7 +266,7 @@ void FormAssociatedElement::setCustomValidity(const String& error)
266266

267267
void FormAssociatedElement::resetFormAttributeTargetObserver()
268268
{
269-
ASSERT_WITH_SECURITY_IMPLICATION(asHTMLElement().inDocument());
269+
ASSERT_WITH_SECURITY_IMPLICATION(asHTMLElement().isConnected());
270270
m_formAttributeTargetObserver = std::make_unique<FormAttributeTargetObserver>(asHTMLElement().attributeWithoutSynchronization(formAttr), *this);
271271
}
272272

Source/WebCore/html/HTMLFormElement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ unsigned HTMLFormElement::formElementIndex(FormAssociatedElement* associatedElem
547547

548548
// Treats separately the case where this element has the form attribute
549549
// for performance consideration.
550-
if (associatedHTMLElement.hasAttributeWithoutSynchronization(formAttr) && associatedHTMLElement.inDocument()) {
550+
if (associatedHTMLElement.hasAttributeWithoutSynchronization(formAttr) && associatedHTMLElement.isConnected()) {
551551
unsigned short position = compareDocumentPosition(associatedHTMLElement);
552552
ASSERT_WITH_SECURITY_IMPLICATION(!(position & DOCUMENT_POSITION_DISCONNECTED));
553553
if (position & DOCUMENT_POSITION_PRECEDING) {

0 commit comments

Comments
 (0)