Backed out 3 changesets (bug 1850238, bug 1850161) for causing multiple failures at Element.cpp CLOSED TREE
Backed out changeset 30526c800ca7 (bug 1850161) Backed out changeset ebc81e5e7750 (bug 1850161) Backed out changeset e66a62c2f8c5 (bug 1850238)
This commit is contained in:
@@ -4528,26 +4528,17 @@ void HTMLInputElement::HandleTypeChange(FormControlType aNewType,
|
||||
// We're no longer an image input. Cancel our image requests, if we have
|
||||
// any.
|
||||
CancelImageRequests(aNotify);
|
||||
RemoveStates(ElementState::BROKEN, aNotify);
|
||||
} else {
|
||||
} else if (aNotify) {
|
||||
// We just got switched to be an image input; we should see whether we
|
||||
// have an image to load;
|
||||
bool hasSrc = false;
|
||||
if (aNotify) {
|
||||
nsAutoString src;
|
||||
if ((hasSrc = GetAttr(nsGkAtoms::src, src))) {
|
||||
// Mark channel as urgent-start before load image if the image load is
|
||||
// initiated by a user interaction.
|
||||
mUseUrgentStartForChannel = UserActivation::IsHandlingUserInput();
|
||||
nsAutoString src;
|
||||
if (GetAttr(nsGkAtoms::src, src)) {
|
||||
// Mark channel as urgent-start before load image if the image load is
|
||||
// initiated by a user interaction.
|
||||
mUseUrgentStartForChannel = UserActivation::IsHandlingUserInput();
|
||||
|
||||
LoadImage(src, false, aNotify, eImageLoadType_Normal,
|
||||
mSrcTriggeringPrincipal);
|
||||
}
|
||||
} else {
|
||||
hasSrc = HasAttr(nsGkAtoms::src);
|
||||
}
|
||||
if (!hasSrc) {
|
||||
AddStates(ElementState::BROKEN, aNotify);
|
||||
LoadImage(src, false, aNotify, eImageLoadType_Normal,
|
||||
mSrcTriggeringPrincipal);
|
||||
}
|
||||
}
|
||||
// We should update our mapped attribute mapping function.
|
||||
@@ -6068,6 +6059,17 @@ void HTMLInputElement::DestroyContent() {
|
||||
TextControlElement::DestroyContent();
|
||||
}
|
||||
|
||||
ElementState HTMLInputElement::IntrinsicState() const {
|
||||
// If you add states here, and they're type-dependent, you need to add them to
|
||||
// HandleTypeChange.
|
||||
ElementState state =
|
||||
nsGenericHTMLFormControlElementWithState::IntrinsicState();
|
||||
if (mType == FormControlType::InputImage) {
|
||||
state |= nsImageLoadingContent::ImageState();
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
void HTMLInputElement::UpdateValidityElementStates(bool aNotify) {
|
||||
AutoStateChangeNotifier notifier(*this, aNotify);
|
||||
RemoveStatesSilently(ElementState::VALIDITY_STATES);
|
||||
|
||||
Reference in New Issue
Block a user