mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Bug 644832. Windowless plugins inside CSS transforms should be rendered. r=tnikkel
This commit is contained in:
parent
c54d24db4b
commit
ae731149d4
@ -2013,9 +2013,7 @@ public:
|
||||
return GetBounds(aBuilder);
|
||||
}
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
nsDisplayWrapList* GetStoredList() { return &mStoredList; }
|
||||
#endif
|
||||
|
||||
virtual void HitTest(nsDisplayListBuilder *aBuilder, const nsRect& aRect,
|
||||
HitTestState *aState, nsTArray<nsIFrame*> *aOutFrames);
|
||||
|
@ -2527,7 +2527,7 @@ PluginHideEnumerator(nsPtrHashKey<nsObjectFrame>* aEntry, void* userArg)
|
||||
|
||||
static void
|
||||
RecoverPluginGeometry(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayList* aList, PluginGeometryClosure* aClosure)
|
||||
nsDisplayList* aList, PRBool aInTransform, PluginGeometryClosure* aClosure)
|
||||
{
|
||||
for (nsDisplayItem* i = aList->GetBottom(); i; i = i->GetAbove()) {
|
||||
switch (i->GetType()) {
|
||||
@ -2541,7 +2541,9 @@ RecoverPluginGeometry(nsDisplayListBuilder* aBuilder,
|
||||
// would be incorrect
|
||||
nsPtrHashKey<nsObjectFrame>* entry =
|
||||
aClosure->mAffectedPlugins.GetEntry(f);
|
||||
if (entry) {
|
||||
// Windowed plugins in transforms are always ignored, we don't
|
||||
// create configurations for them
|
||||
if (entry && (!aInTransform || !f->GetWidget())) {
|
||||
displayPlugin->GetWidgetConfiguration(aBuilder,
|
||||
aClosure->mOutputConfigurations);
|
||||
// we've dealt with this plugin now
|
||||
@ -2549,10 +2551,16 @@ RecoverPluginGeometry(nsDisplayListBuilder* aBuilder,
|
||||
}
|
||||
break;
|
||||
}
|
||||
case nsDisplayItem::TYPE_TRANSFORM: {
|
||||
nsDisplayList* sublist =
|
||||
static_cast<nsDisplayTransform*>(i)->GetStoredList()->GetList();
|
||||
RecoverPluginGeometry(aBuilder, sublist, PR_TRUE, aClosure);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
nsDisplayList* sublist = i->GetList();
|
||||
if (sublist) {
|
||||
RecoverPluginGeometry(aBuilder, sublist, aClosure);
|
||||
RecoverPluginGeometry(aBuilder, sublist, aInTransform, aClosure);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -2618,7 +2626,7 @@ nsRootPresContext::GetPluginGeometryUpdates(nsIFrame* aChangedSubtree,
|
||||
}
|
||||
#endif
|
||||
|
||||
RecoverPluginGeometry(&builder, &list, &closure);
|
||||
RecoverPluginGeometry(&builder, &list, PR_FALSE, &closure);
|
||||
list.DeleteAll();
|
||||
}
|
||||
|
||||
|
@ -212,6 +212,8 @@ public:
|
||||
*/
|
||||
static void EndSwapDocShells(nsIContent* aContent, void*);
|
||||
|
||||
nsIWidget* GetWidget() { return mWidget; }
|
||||
|
||||
protected:
|
||||
nsObjectFrame(nsStyleContext* aContext);
|
||||
virtual ~nsObjectFrame();
|
||||
@ -277,8 +279,6 @@ protected:
|
||||
const nsPoint& aPluginOrigin,
|
||||
nsTArray<nsIWidget::Configuration>* aConfigurations);
|
||||
|
||||
nsIWidget* GetWidget() { return mWidget; }
|
||||
|
||||
nsresult SetAbsoluteScreenPosition(nsIDOMElement* element,
|
||||
nsIDOMClientRect* position,
|
||||
nsIDOMClientRect* clip);
|
||||
@ -353,8 +353,8 @@ public:
|
||||
// with the root pres context for geometry updates.
|
||||
// The widget, its new position, size and clip region are appended as
|
||||
// a Configuration record to aConfigurations.
|
||||
// If there is no widget associated with the plugin, this
|
||||
// simply does nothing.
|
||||
// If the plugin has no widget, no configuration is added, but
|
||||
// the plugin visibility state may be adjusted.
|
||||
void GetWidgetConfiguration(nsDisplayListBuilder* aBuilder,
|
||||
nsTArray<nsIWidget::Configuration>* aConfigurations);
|
||||
|
||||
|
6
modules/plugin/test/reftest/plugin-transform-1-ref.html
Normal file
6
modules/plugin/test/reftest/plugin-transform-1-ref.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body>
|
||||
<embed type="application/x-test"></embed>
|
||||
</body>
|
||||
</html>
|
6
modules/plugin/test/reftest/plugin-transform-1.html
Normal file
6
modules/plugin/test/reftest/plugin-transform-1.html
Normal file
@ -0,0 +1,6 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body>
|
||||
<embed type="application/x-test" style="-moz-transform:scale(1)"></embed>
|
||||
</body>
|
||||
</html>
|
7
modules/plugin/test/reftest/plugin-transform-2-ref.html
Normal file
7
modules/plugin/test/reftest/plugin-transform-2-ref.html
Normal file
@ -0,0 +1,7 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body>
|
||||
<div style="width:100px; height:100px; -moz-transform-origin:top left;
|
||||
-moz-transform:scale(2); background:rgb(0,255,0)"></embed>
|
||||
</body>
|
||||
</html>
|
8
modules/plugin/test/reftest/plugin-transform-2.html
Normal file
8
modules/plugin/test/reftest/plugin-transform-2.html
Normal file
@ -0,0 +1,8 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<body>
|
||||
<embed type="application/x-test" drawmode="solid" color="FF00FF00"
|
||||
style="width:100px; height:100px; -moz-transform-origin:top left;
|
||||
-moz-transform:scale(2); display:block"></embed>
|
||||
</body>
|
||||
</html>
|
@ -17,3 +17,5 @@ random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) =
|
||||
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) == plugin-background-2-step.html plugin-background-ref.html
|
||||
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) == plugin-background-5-step.html plugin-background-ref.html
|
||||
random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) fails-if(!haveTestPlugin) == plugin-background-10-step.html plugin-background-ref.html
|
||||
fails-if(!haveTestPlugin) == plugin-transform-1.html plugin-transform-1-ref.html
|
||||
fails-if(!haveTestPlugin) fails-if(http.platform=="X11") == plugin-transform-2.html plugin-transform-2-ref.html # bug 468496
|
||||
|
Loading…
Reference in New Issue
Block a user