diff options
Diffstat (limited to 'widget')
-rw-r--r-- | widget/nsBaseWidget.cpp | 3 | ||||
-rw-r--r-- | widget/windows/InProcessWinCompositorWidget.cpp | 25 | ||||
-rw-r--r-- | widget/windows/InProcessWinCompositorWidget.h | 4 | ||||
-rw-r--r-- | widget/windows/TSFTextStore.cpp | 10 |
4 files changed, 35 insertions, 7 deletions
diff --git a/widget/nsBaseWidget.cpp b/widget/nsBaseWidget.cpp index 909660f71..c6ec3a406 100644 --- a/widget/nsBaseWidget.cpp +++ b/widget/nsBaseWidget.cpp @@ -73,7 +73,6 @@ #endif #include "gfxConfig.h" #include "mozilla/layers/CompositorSession.h" -#include "VRManagerChild.h" #ifdef DEBUG #include "nsIObserver.h" @@ -366,7 +365,6 @@ nsBaseWidget::OnRenderingDeviceReset() // Update the texture factory identifier. clm->UpdateTextureFactoryIdentifier(identifier); ImageBridgeChild::IdentifyCompositorTextureHost(identifier); - gfx::VRManagerChild::IdentifyTextureHost(identifier); } void @@ -1377,7 +1375,6 @@ void nsBaseWidget::CreateCompositor(int aWidth, int aHeight) // compositors used with ImageBridge and VR (and more generally web content). if (WidgetTypeSupportsAcceleration()) { ImageBridgeChild::IdentifyCompositorTextureHost(textureFactoryIdentifier); - gfx::VRManagerChild::IdentifyTextureHost(textureFactoryIdentifier); } } diff --git a/widget/windows/InProcessWinCompositorWidget.cpp b/widget/windows/InProcessWinCompositorWidget.cpp index 685eaf5ca..a11790b32 100644 --- a/widget/windows/InProcessWinCompositorWidget.cpp +++ b/widget/windows/InProcessWinCompositorWidget.cpp @@ -23,6 +23,31 @@ InProcessWinCompositorWidget::InProcessWinCompositorWidget(const CompositorWidge MOZ_ASSERT(mWindow); } +void +InProcessWinCompositorWidget::OnDestroyWindow() +{ + EnterPresentLock(); + WinCompositorWidget::OnDestroyWindow(); + LeavePresentLock(); +} + +void +InProcessWinCompositorWidget::UpdateTransparency(nsTransparencyMode aMode) +{ + EnterPresentLock(); + WinCompositorWidget::UpdateTransparency(aMode); + LeavePresentLock(); +} + +void +InProcessWinCompositorWidget::ClearTransparentWindow() +{ + EnterPresentLock(); + WinCompositorWidget::ClearTransparentWindow(); + LeavePresentLock(); +} + + nsIWidget* InProcessWinCompositorWidget::RealWidget() { diff --git a/widget/windows/InProcessWinCompositorWidget.h b/widget/windows/InProcessWinCompositorWidget.h index 2ce6ba0be..afe5a7f53 100644 --- a/widget/windows/InProcessWinCompositorWidget.h +++ b/widget/windows/InProcessWinCompositorWidget.h @@ -22,6 +22,10 @@ class InProcessWinCompositorWidget final : public WinCompositorWidget public: InProcessWinCompositorWidget(const CompositorWidgetInitData& aInitData, nsWindow* aWindow); + void OnDestroyWindow() override; + void UpdateTransparency(nsTransparencyMode aMode) override; + void ClearTransparentWindow() override; + void ObserveVsync(VsyncObserver* aObserver) override; nsIWidget* RealWidget() override; diff --git a/widget/windows/TSFTextStore.cpp b/widget/windows/TSFTextStore.cpp index 7224126b8..c80de831c 100644 --- a/widget/windows/TSFTextStore.cpp +++ b/widget/windows/TSFTextStore.cpp @@ -4247,14 +4247,14 @@ TSFTextStore::InsertTextAtSelectionInternal(const nsAString& aInsertStr, TS_SELECTION_ACP oldSelection = contentForTSF.Selection().ACP(); if (!mComposition.IsComposing()) { // Use a temporary composition to contain the text - PendingAction* compositionStart = mPendingActions.AppendElement(); + PendingAction* compositionStart = mPendingActions.AppendElements(2); + PendingAction* compositionEnd = compositionStart + 1; compositionStart->mType = PendingAction::COMPOSITION_START; compositionStart->mSelectionStart = oldSelection.acpStart; compositionStart->mSelectionLength = oldSelection.acpEnd - oldSelection.acpStart; compositionStart->mAdjustSelection = false; - PendingAction* compositionEnd = mPendingActions.AppendElement(); compositionEnd->mType = PendingAction::COMPOSITION_END; compositionEnd->mData = aInsertStr; @@ -4455,10 +4455,12 @@ TSFTextStore::RecordCompositionEndAction() } // When only setting selection is necessary, we should append it. if (pendingAction.mAdjustSelection) { + LONG selectionStart = pendingAction.mSelectionStart; + LONG selectionLength = pendingAction.mSelectionLength; PendingAction* setSelection = mPendingActions.AppendElement(); setSelection->mType = PendingAction::SET_SELECTION; - setSelection->mSelectionStart = pendingAction.mSelectionStart; - setSelection->mSelectionLength = pendingAction.mSelectionLength; + setSelection->mSelectionStart = selectionStart; + setSelection->mSelectionLength = selectionLength; setSelection->mSelectionReversed = false; } // Remove the redundant pending composition. |