mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1159497 - Fix intermittent browser_bug427559.js failures r=MattN (7b3ea3f61) - Bug 1156110 - Make nsView::mWindow an nsCOMPtr; r=roc (463a0d551) - Bug 1167085 - Initialize nsBaseWidget::mLayerManager to nullptr. r=roc (a35cadb61) - Bug 1157941 - If the current PresShell is suppressed, paint the old one if it is available r=tn,Enn (a50bcd9e3) - Bug 1176959 nsGtkIMModule shouldn't commit composition when a selection change is notified but it was caused by selection set event r=m_kato (eae9672d1) - Bug 1184449 part.1 IMENotifiation::SelectionChangeData should store selected string r=smaug (a34eddb64) - Bug 1184449 part.2 nsIMM32Handler should store selection range as far as possible r=m_kato (d318ad109) - Bug 1167105 - Part 1. Set temporary range until OnSelectionChange is called. r=masayuki (6aff5bd9d) - Bug 1167105 - Part 2. Improve OnSelectionChange implementation. r=masayuki (4cb1f297f) - Bug 1184449 part.3 Fix the bustage of Mac OS X r=myself (8e35b4aa2) - Bug 1184986 NOTIFY_IME_OF_POSITION_CHANGE should be put off until all sending events are recieved by child process r=smaug (a1909600a) - Bug 1192156 Separate IME specific structs, classes and enums from nsIWidget.h to IMEData.h r=roc (53a9f5f4c) - Bug 1128607 - Add freshness check for OneCRL (r=keeler) (149e6a57f) - Bug 1128607 - Test the freshness check for OneCRL (r=keeler) (c2408b646) - Bug 1175382 TextRangeArray::TargetClauseOffset() and TextRangeArray::TargetClauseLength() shouldn't be public and same name methods of WidgetCompositionEvent should be used r=m_kato (5010f8363) - Bug 1181240 - Part 1: Copy methods from gfx3DMatrix,r=vlad (dbb277cb2) - Bug 1150704 - Use the same dest rect calculation for nsDisplayImage::GetOpaqueRegion and nsDisplayImage::GetDestRect. r=dholbert (60853571d) - Bug 1182929 - Work around bug 803703 by refusing to turn heavily-downscaled images into image layers. r=seth (ecf9f5c9e) - Bug 1177587 - Detect use of <img> elements for animation and use sync decoding to reduce flicker. r=tn (463ca0fd6) - Bug 1151359 (Part 1) - Predict the size of nsImageFrame images before drawing. r=tn (c0cd67ee0) - Bug 1151359 (Part 2) - Add support for detecting transform property changes that affect scale to ActiveLayerTracker. r=mstange (69094936c) - Bug 1122526 patch 1 - Factor in the scale from ancestors when computing scale for layer with OMT animation of transform. r=roc (75378e2c8) - Bug 1122526 patch 2 - Only do OMTA transform scale choosing for layers that are for transform display items. r=roc (299d3644b) - Bug 1122526 patch 3 - Correctly account for transform:none when finding maximum scale for a transform animation. r=roc (6b6e190ad) - Bug 1184200 - Update a check for APZ enabled. r=dvander (01c9f72df) - Bug 1122526 patch 4 - Use the nearest widget size as the maximum size for an animated layer, in case it's a popup larger than the toplevel window. r=roc (941979bcb) - Bug 771367 - Support compositor animation for pseudo-elements. r=dbaron (625ad9140) - Bug 1151359 (Part 3) - Treat nsImageFrames subject to scale animation as having an identity scale when predicting size. r=tn,birtles (708fb4323) - Bug 1238337. If the intrinsic size of the image hasn't changed then we don't need to do a new predictive image decode. r=mats (6b2bbe118) - Bug 1181240 - Part 2: Replace gfx3DMatrix with Matrix4x4 in layout,r=vlad (e99b4dae5) - Bug 1147279 - Get correct translation when layer optimize away. r=roc (a0bbf3c91) - Bug 1176411 - Stop parenthesizing array/object pattern destructuring assignment targets in addon SDK code. r=jsantell, a=KWierso (remaining parts of rev3f0d8da0b) (91a80210e) - Bug 1146136 - Fix most in-tree tests that parenthesize destructuring pattern assignment targets, as ES6 forbids such parenthesization. (was rev24bf70dac) (55d943c12) - Bug 1145764 - Remove unused functions. r=nical (6bb54ad02) - Bug 1150549 - Simplify TiledContentHost. r=jrmuizel (b800fa87d) - Bug 1169339 - Fix incorrect tile storage order in TiledContentHost. r=jrmuizel (618e476bd) - Bug 1145764 - Add logging for tile retention inside a TiledLayerBuffer. r=nical (113c84fbe) - Bug 1170189 - Use TilesPlacement to handle tile coordinates conversion. r=BenWa (c3f082a21)
This commit is contained in:
+30
-10
@@ -90,6 +90,10 @@ nsView::~nsView()
|
||||
mParent->RemoveChild(this);
|
||||
}
|
||||
|
||||
if (mPreviousWindow) {
|
||||
mPreviousWindow->SetPreviouslyAttachedWidgetListener(nullptr);
|
||||
}
|
||||
|
||||
// Destroy and release the widget
|
||||
DestroyWidget();
|
||||
|
||||
@@ -134,7 +138,7 @@ void nsView::DestroyWidget()
|
||||
NS_DispatchToMainThread(widgetDestroyer);
|
||||
}
|
||||
|
||||
NS_RELEASE(mWindow);
|
||||
mWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,7 +237,7 @@ nsIntRect nsView::CalcWidgetBounds(nsWindowType aType)
|
||||
// cocoa rounds widget coordinates to the nearest global "display pixel"
|
||||
// integer value. So we avoid fractional display pixel values by rounding
|
||||
// to the nearest value that won't yield a fractional display pixel.
|
||||
nsIWidget* widget = parentWidget ? parentWidget : mWindow;
|
||||
nsIWidget* widget = parentWidget ? parentWidget : mWindow.get();
|
||||
uint32_t round;
|
||||
if (aType == eWindowType_popup && widget &&
|
||||
((round = widget->RoundsWidgetCoordinatesTo()) > 1)) {
|
||||
@@ -575,7 +579,7 @@ nsresult nsView::CreateWidget(nsWidgetInitData *aWidgetInitData,
|
||||
|
||||
// XXX: using aForceUseIWidgetParent=true to preserve previous
|
||||
// semantics. It's not clear that it's actually needed.
|
||||
mWindow = parentWidget->CreateChild(trect, aWidgetInitData, true).take();
|
||||
mWindow = parentWidget->CreateChild(trect, aWidgetInitData, true);
|
||||
if (!mWindow) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
@@ -601,8 +605,7 @@ nsresult nsView::CreateWidgetForParent(nsIWidget* aParentWidget,
|
||||
|
||||
nsIntRect trect = CalcWidgetBounds(aWidgetInitData->mWindowType);
|
||||
|
||||
mWindow =
|
||||
aParentWidget->CreateChild(trect, aWidgetInitData).take();
|
||||
mWindow = aParentWidget->CreateChild(trect, aWidgetInitData);
|
||||
if (!mWindow) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
@@ -631,7 +634,7 @@ nsresult nsView::CreateWidgetForPopup(nsWidgetInitData *aWidgetInitData,
|
||||
if (aParentWidget) {
|
||||
// XXX: using aForceUseIWidgetParent=true to preserve previous
|
||||
// semantics. It's not clear that it's actually needed.
|
||||
mWindow = aParentWidget->CreateChild(trect, aWidgetInitData, true).take();
|
||||
mWindow = aParentWidget->CreateChild(trect, aWidgetInitData, true);
|
||||
}
|
||||
else {
|
||||
nsIWidget* nearestParent = GetParent() ? GetParent()->GetNearestWidget(nullptr)
|
||||
@@ -642,7 +645,7 @@ nsresult nsView::CreateWidgetForPopup(nsWidgetInitData *aWidgetInitData,
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
mWindow = nearestParent->CreateChild(trect, aWidgetInitData).take();
|
||||
mWindow = nearestParent->CreateChild(trect, aWidgetInitData);
|
||||
}
|
||||
if (!mWindow) {
|
||||
return NS_ERROR_FAILURE;
|
||||
@@ -695,7 +698,6 @@ nsresult nsView::AttachToTopLevelWidget(nsIWidget* aWidget)
|
||||
return rv;
|
||||
|
||||
mWindow = aWidget;
|
||||
NS_ADDREF(mWindow);
|
||||
|
||||
mWindow->SetAttachedWidgetListener(this);
|
||||
mWindow->EnableDragDrop(true);
|
||||
@@ -714,7 +716,19 @@ nsresult nsView::DetachFromTopLevelWidget()
|
||||
NS_PRECONDITION(mWindow, "null mWindow for DetachFromTopLevelWidget!");
|
||||
|
||||
mWindow->SetAttachedWidgetListener(nullptr);
|
||||
NS_RELEASE(mWindow);
|
||||
nsIWidgetListener* listener = mWindow->GetPreviouslyAttachedWidgetListener();
|
||||
|
||||
if (listener && listener->GetView()) {
|
||||
// Ensure the listener doesn't think it's being used anymore
|
||||
listener->GetView()->SetPreviousWidget(nullptr);
|
||||
}
|
||||
|
||||
// If the new view's frame is paint suppressed then the window
|
||||
// will want to use us instead until that's done
|
||||
mWindow->SetPreviouslyAttachedWidgetListener(this);
|
||||
|
||||
mPreviousWindow = mWindow;
|
||||
mWindow = nullptr;
|
||||
|
||||
mWidgetIsTopLevel = false;
|
||||
|
||||
@@ -739,7 +753,7 @@ void nsView::AssertNoWindow()
|
||||
NS_ERROR("We already have a window for this view? BAD");
|
||||
mWindow->SetWidgetListener(nullptr);
|
||||
mWindow->Destroy();
|
||||
NS_RELEASE(mWindow);
|
||||
mWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1088,3 +1102,9 @@ nsView::HandleEvent(WidgetGUIEvent* aEvent,
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool
|
||||
nsView::IsPrimaryFramePaintSuppressed()
|
||||
{
|
||||
return mFrame ? mFrame->PresContext()->PresShell()->IsPaintingSuppressed() : false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user