import changes from `dev' branch of rmottola/Arctic-Fox:

- Bug 1215411 - Define MOZ_FALLTHROUGH annotation to suppress clang's -Wimplicit-fallthrough warnings. r=botond (5549d55e8b)
- Bug 1202794 - Explicitly clear array in SortChildrenBy3DZOrder to satisfy the move analysis, r=mattwoodrow (0c53a3db36)
- Bug 1217168 - Respect layer clip rects during plugin visibility computation. r=jimm (6289d35ff1)
- Bug 1220693 - Make mozilla::Atomic<enum class> work even on compilers that don't have <atomic>. r=froydnj (ef1b490ffd)
- Bug 947062 - Make background-position inline-style changes and CSS animations trigger layer activity. r=roc (44bc576960)
- Bug 1201330 - Refactor LayerActivity property management. r=roc (92528b8765)
- Bug 1201330 - Keep scroll handler induced layer activity active until the scroll frame becomes inactive. r=roc (08670902ec)
- Bug 1147707 - Intersect correctly in DisplayItemClip::ApplyNonRoundedIntersection. r=roc (66991b6be6)
- better attempt at 10.5 compaitbility, avoiding out-of-bounds array access (18f481ff6b)
- Bug 1217662 - part 1 - make LayerManagerUserDataDestroy a static function of LayerManager; r=mattwoodrow (f2d34451e0)
- Bug 1217662 - part 2 - move mozilla::layers::LayerUserData to a separate header; r=mattwoodrow (036d7327fa)
- Bug 1217662 - part 3 - move nsDisplayBlendContainer::GetLayerState out-of-line; r=mattwoodrow (fb2bd6bd20)
- Bug 1217662 - part 4 - move {LayerManager,Layer}::RemoveUserData out-of-line; r=mattwoodrow (86836f2a9b)
- Bug 1217662 - part 5 - move FrameLayerBuilder and helper classes's ctors/dtors out-of-line; r=mattwoodrow (e838bde0ec)
- Bug 1217662 - part 6 - remove Layers.h #include from FrameListBuilder.h; r=mattwoodrow (8aea4cb842)
- Bug 1216288 - Disable warning when we don't build an active layer for RenderFrameParent within an opacity:0 subtree. r=roc (2c5e70760a)
- Bug 1169996 - Don't lose eEditorMailMask; r=ehsan (b4647557bb)
- Bug 1211654 - Force opacity layers that were only created for APZ hit-testing information to always be inactive. r=mstange (4c56d440cf)
- Bug 1154336 - Convert nsTextEditorState::mRestoringSelection into a strong reference; r=baku (3e24a6ad18)
- Bug 549674 part.1 Commit composition string at setting value of <input> or <textarea> r=smaug (e6a6471370)
- Bug 1109410 Resolve CSS transform in ContentEventHandler::ConvertToRootViewRelativeOffset() r=roc (5ff3388f28)
- Bug 1180589 part 3 - Rename shadowed variable name; r=bholley (7194cda020)
- Bug 1222145 - Bump maximum video size to 8k. r=jya (056778dda9)
- Bug 1180589 part 1 - Add simulator code for TV Manager API; r=seanlin (dd78a38a27)
- Bug 1180589 part 2 - Add code to create a simulated mediastream; r=se# (c255e0dd07)
- spacing (856ee42504)
- missing bit of Bug 1136827 - Stop synchronously (befed33dbe)
- bit of Bug 1204401 (c1f98ed982)
- bits of 1142527 (dc39662797)
- Bug 1212220 - cache pref values so they are safe to access off the main thread. r=roc. (adb186836b)
- Bug 1194918 - Add VideoSink which contains either AudioSinkWrapper or DecodedStreamSink as a default operating MediaSink in MDSM. r=jwwang. (7ccda9b055)
- Bug 1194918 - Move av-sync and video frame rendering logic from MDSM to VideoSink. r=jwwang. (ba56ae120b)
- Bug 1202533 - Fix naming convention of MediaSink::PlaybackParams. (eed5ed3839)
- Bug 1194918 - Override function SetVolume/SetPreservesPitch in VideoSink for the contained AudioSink. r=jwwang. (0d96e6a395)
- Bug 1198663. Skip null Images in VideoSink::RenderVideoFrames instead of treating them as valid. r=jwwang (aaac235c1f)
- Bug 1207198: P2. Defer dormant request while ReadMetadata is pending in MDSM. r=sotaro (0a8e1f4bb0)
- Bug 1209850: Only attempt to initialize decoders as they are required. r=alfredo (615e41b66b)
- Bug 1192733: fix the MediaFormatReader can not back from dormant state. r=jya (c266107d33)
- Bug 1207198: P1. Do not initialize decoders during ReadMetadata. r=cpearce (4174dbc409)
- missing bit of 1196696 (7b1c0fbe95)
- Bug 1208922. Part 6 - IsWaitingOnCDMResource() is not used by MDSM anymore. Remove it from MediaDecoderReader and make it private in MediaFormatReader. r=cpearce. (db67939710)
- adapted of Bug 1208922. Part 3 - forward the CDMProxy from MediaDecoder (a5dca2f89d)
This commit is contained in:
2022-12-09 12:38:41 +08:00
parent a56e853455
commit 886c0a2723
61 changed files with 2540 additions and 591 deletions
+39 -23
View File
@@ -986,7 +986,7 @@ HTMLInputElement::Clone(mozilla::dom::NodeInfo* aNodeInfo, nsINode** aResult) co
nsAutoString value;
GetValueInternal(value);
// SetValueInternal handles setting the VALUE_CHANGED bit for us
rv = it->SetValueInternal(value, false, true);
rv = it->SetValueInternal(value, nsTextEditorState::eSetValue_Notify);
NS_ENSURE_SUCCESS(rv, rv);
}
break;
@@ -1173,7 +1173,8 @@ HTMLInputElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
// if @max in the example above were to change from 1 to -1.
nsAutoString value;
GetValue(value);
nsresult rv = SetValueInternal(value, false, false);
nsresult rv =
SetValueInternal(value, nsTextEditorState::eSetValue_Internal);
NS_ENSURE_SUCCESS(rv, rv);
MOZ_ASSERT(!GetValidityState(VALIDITY_STATE_RANGE_UNDERFLOW),
"HTML5 spec does not allow this");
@@ -1186,7 +1187,8 @@ HTMLInputElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
// See @max comment
nsAutoString value;
GetValue(value);
nsresult rv = SetValueInternal(value, false, false);
nsresult rv =
SetValueInternal(value, nsTextEditorState::eSetValue_Internal);
NS_ENSURE_SUCCESS(rv, rv);
MOZ_ASSERT(!GetValidityState(VALIDITY_STATE_RANGE_UNDERFLOW),
"HTML5 spec does not allow this");
@@ -1197,7 +1199,8 @@ HTMLInputElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
// See @max comment
nsAutoString value;
GetValue(value);
nsresult rv = SetValueInternal(value, false, false);
nsresult rv =
SetValueInternal(value, nsTextEditorState::eSetValue_Internal);
NS_ENSURE_SUCCESS(rv, rv);
MOZ_ASSERT(!GetValidityState(VALIDITY_STATE_RANGE_UNDERFLOW),
"HTML5 spec does not allow this");
@@ -1585,7 +1588,9 @@ HTMLInputElement::SetValue(const nsAString& aValue, ErrorResult& aRv)
nsAutoString currentValue;
GetValue(currentValue);
nsresult rv = SetValueInternal(aValue, false, true);
nsresult rv =
SetValueInternal(aValue, nsTextEditorState::eSetValue_ByContent |
nsTextEditorState::eSetValue_Notify);
if (NS_FAILED(rv)) {
aRv.Throw(rv);
return;
@@ -1595,7 +1600,9 @@ HTMLInputElement::SetValue(const nsAString& aValue, ErrorResult& aRv)
GetValue(mFocusedValue);
}
} else {
nsresult rv = SetValueInternal(aValue, false, true);
nsresult rv =
SetValueInternal(aValue, nsTextEditorState::eSetValue_ByContent |
nsTextEditorState::eSetValue_Notify);
if (NS_FAILED(rv)) {
aRv.Throw(rv);
return;
@@ -2212,7 +2219,9 @@ HTMLInputElement::SetUserInput(const nsAString& aValue)
MozSetFileNameArray(list, rv);
return rv.StealNSResult();
} else {
nsresult rv = SetValueInternal(aValue, true, true);
nsresult rv =
SetValueInternal(aValue, nsTextEditorState::eSetValue_BySetUserInput |
nsTextEditorState::eSetValue_Notify);
NS_ENSURE_SUCCESS(rv, rv);
}
@@ -2520,9 +2529,7 @@ HTMLInputElement::UpdateFileList()
}
nsresult
HTMLInputElement::SetValueInternal(const nsAString& aValue,
bool aUserInput,
bool aSetValueChanged)
HTMLInputElement::SetValueInternal(const nsAString& aValue, uint32_t aFlags)
{
NS_PRECONDITION(GetValueMode() != VALUE_MODE_FILENAME,
"Don't call SetValueInternal for file inputs");
@@ -2540,12 +2547,13 @@ HTMLInputElement::SetValueInternal(const nsAString& aValue,
}
// else DoneCreatingElement calls us again once mParserCreating is false
if (aSetValueChanged) {
bool setValueChanged = !!(aFlags & nsTextEditorState::eSetValue_Notify);
if (setValueChanged) {
SetValueChanged(true);
}
if (IsSingleLineTextControl(false)) {
if (!mInputData.mState->SetValue(value, aUserInput, aSetValueChanged)) {
if (!mInputData.mState->SetValue(value, aFlags)) {
return NS_ERROR_OUT_OF_MEMORY;
}
if (mType == NS_FORM_INPUT_EMAIL) {
@@ -2554,7 +2562,7 @@ HTMLInputElement::SetValueInternal(const nsAString& aValue,
} else {
free(mInputData.mValue);
mInputData.mValue = ToNewUnicode(value);
if (aSetValueChanged) {
if (setValueChanged) {
SetValueChanged(true);
}
if (mType == NS_FORM_INPUT_NUMBER) {
@@ -3164,7 +3172,8 @@ HTMLInputElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
if (IsExperimentalMobileType(mType)) {
nsAutoString aValue;
GetValueInternal(aValue);
nsresult rv = SetValueInternal(aValue, false, false);
nsresult rv =
SetValueInternal(aValue, nsTextEditorState::eSetValue_Internal);
NS_ENSURE_SUCCESS(rv, rv);
}
FireChangeEventIfNeeded();
@@ -3285,7 +3294,9 @@ HTMLInputElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
numberControlFrame->GetValueOfAnonTextControl(value);
numberControlFrame->HandlingInputEvent(true);
nsWeakFrame weakNumberControlFrame(numberControlFrame);
rv = SetValueInternal(value, true, true);
rv = SetValueInternal(value,
nsTextEditorState::eSetValue_BySetUserInput |
nsTextEditorState::eSetValue_Notify);
NS_ENSURE_SUCCESS(rv, rv);
if (weakNumberControlFrame.IsAlive()) {
numberControlFrame->HandlingInputEvent(false);
@@ -3362,7 +3373,8 @@ HTMLInputElement::CancelRangeThumbDrag(bool aIsForUserEvent)
ConvertNumberToString(mRangeThumbDragStartValue, val);
// TODO: What should we do if SetValueInternal fails? (The allocation
// is small, so we should be fine here.)
SetValueInternal(val, true, true);
SetValueInternal(val, nsTextEditorState::eSetValue_BySetUserInput |
nsTextEditorState::eSetValue_Notify);
nsRangeFrame* frame = do_QueryFrame(GetPrimaryFrame());
if (frame) {
frame->UpdateForValueChange();
@@ -3382,7 +3394,8 @@ HTMLInputElement::SetValueOfRangeForUserEvent(Decimal aValue)
ConvertNumberToString(aValue, val);
// TODO: What should we do if SetValueInternal fails? (The allocation
// is small, so we should be fine here.)
SetValueInternal(val, true, true);
SetValueInternal(val, nsTextEditorState::eSetValue_BySetUserInput |
nsTextEditorState::eSetValue_Notify);
nsRangeFrame* frame = do_QueryFrame(GetPrimaryFrame());
if (frame) {
frame->UpdateForValueChange();
@@ -3477,7 +3490,8 @@ HTMLInputElement::StepNumberControlForUserEvent(int32_t aDirection)
ConvertNumberToString(newValue, newVal);
// TODO: What should we do if SetValueInternal fails? (The allocation
// is small, so we should be fine here.)
SetValueInternal(newVal, true, true);
SetValueInternal(newVal, nsTextEditorState::eSetValue_BySetUserInput |
nsTextEditorState::eSetValue_Notify);
nsContentUtils::DispatchTrustedEvent(OwnerDoc(),
static_cast<nsIDOMHTMLInputElement*>(this),
@@ -4284,7 +4298,7 @@ HTMLInputElement::HandleTypeChange(uint8_t aNewType)
// TODO: What should we do if SetValueInternal fails? (The allocation
// may potentially be big, but most likely we've failed to allocate
// before the type change.)
SetValueInternal(value, false, false);
SetValueInternal(value, nsTextEditorState::eSetValue_Internal);
}
break;
case VALUE_MODE_FILENAME:
@@ -5074,7 +5088,8 @@ HTMLInputElement::SetRangeText(const nsAString& aReplacement, uint32_t aStart,
if (aStart <= aEnd) {
value.Replace(aStart, aEnd - aStart, aReplacement);
nsresult rv = SetValueInternal(value, false, false);
nsresult rv =
SetValueInternal(value, nsTextEditorState::eSetValue_ByContent);
if (NS_FAILED(rv)) {
aRv.Throw(rv);
return;
@@ -5395,7 +5410,7 @@ HTMLInputElement::SetDefaultValueAsValue()
GetDefaultValue(resetVal);
// SetValueInternal is going to sanitize the value.
return SetValueInternal(resetVal, false, false);
return SetValueInternal(resetVal, nsTextEditorState::eSetValue_Internal);
}
void
@@ -5636,7 +5651,7 @@ HTMLInputElement::DoneCreatingElement()
// TODO: What should we do if SetValueInternal fails? (The allocation
// may potentially be big, but most likely we've failed to allocate
// before the type change.)
SetValueInternal(aValue, false, false);
SetValueInternal(aValue, nsTextEditorState::eSetValue_Internal);
}
mShouldInitChecked = false;
@@ -5795,7 +5810,8 @@ HTMLInputElement::RestoreState(nsPresState* aState)
// TODO: What should we do if SetValueInternal fails? (The allocation
// may potentially be big, but most likely we've failed to allocate
// before the type change.)
SetValueInternal(inputState->GetValue(), false, true);
SetValueInternal(inputState->GetValue(),
nsTextEditorState::eSetValue_Notify);
break;
}
}