Bug 1773070 - Unify Gecko and Servo EventState/ElementState bits. r=smaug
Add a dom/base/rust crate called just "dom" where we can share these. Most of the changes are automatic: s/mozilla::EventStates/mozilla::dom::ElementState/ s/EventStates/ElementState/ s/NS_EVENT_STATE_/ElementState::/ s/NS_DOCUMENT_STATE_/DocumentState::/ And so on. This requires a new cbindgen version to avoid ugly casts for large shifts. Differential Revision: https://phabricator.services.mozilla.com/D148537
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/EventStates.h"
|
||||
#include "mozilla/dom/BindContext.h"
|
||||
#include "mozilla/dom/Document.h"
|
||||
#include "mozilla/dom/HTMLObjectElement.h"
|
||||
@@ -38,7 +37,7 @@ HTMLObjectElement::HTMLObjectElement(
|
||||
SetBarredFromConstraintValidation(true);
|
||||
|
||||
// By default we're in the loading state
|
||||
AddStatesSilently(NS_EVENT_STATE_LOADING);
|
||||
AddStatesSilently(ElementState::LOADING);
|
||||
}
|
||||
|
||||
HTMLObjectElement::~HTMLObjectElement() {
|
||||
@@ -284,7 +283,7 @@ void HTMLObjectElement::StartObjectLoad(bool aNotify, bool aForce) {
|
||||
SetIsNetworkCreated(false);
|
||||
}
|
||||
|
||||
EventStates HTMLObjectElement::IntrinsicState() const {
|
||||
ElementState HTMLObjectElement::IntrinsicState() const {
|
||||
return nsGenericHTMLFormControlElement::IntrinsicState() | ObjectState();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user