summaryrefslogtreecommitdiff
path: root/layout/generic
diff options
context:
space:
mode:
Diffstat (limited to 'layout/generic')
-rw-r--r--layout/generic/crashtests/crashtests.list18
-rw-r--r--layout/generic/nsGfxScrollFrame.cpp21
-rw-r--r--layout/generic/nsPluginFrame.cpp121
-rw-r--r--layout/generic/test/mochitest.ini1
4 files changed, 11 insertions, 150 deletions
diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list
index 72872bfded..d44d7614c1 100644
--- a/layout/generic/crashtests/crashtests.list
+++ b/layout/generic/crashtests/crashtests.list
@@ -25,7 +25,7 @@ load 321224.xul
load 322780-1.xul
load 323381-1.html
load 323381-2.html
-asserts-if(gtkWidget,1) asserts-if(Android&&asyncPan,1) asserts-if(winWidget,1) load 323386-1.html # Bug 718883
+asserts-if(gtkWidget,1) asserts-if(winWidget,1) load 323386-1.html # Bug 718883
load 323389-1.html
load 323389-2.html
load 323493-1.html
@@ -310,7 +310,7 @@ load 455171-3.html
load 455643-1.xhtml
load 457375.html
load 457380-1.html
-asserts-if(!Android,4) load 459968.html # bug 1067022
+asserts(4) load 459968.html # bug 1067022
load 460910-1.xml
load 461294-1.html
load 462968.xhtml
@@ -345,7 +345,7 @@ load 477928.html
load 478131-1.html
load 478170-1.html
load 478185-1.html
-asserts-if(!Android,0-1) load 479938-1.html # Bug 575011
+asserts(0-1) load 479938-1.html # Bug 575011
load 480345-1.html
load 481921.html
load 489462-1.html
@@ -473,8 +473,8 @@ load 700031.xhtml
load 718516.html
load 723108.html
load 724235.html
-skip-if(Android&&isDebugBuild) load 724978.xhtml # bug 1263300 - slow
-skip-if(Android&&isDebugBuild) load 730559.html # bug 1245634 - slow
+load 724978.xhtml
+load 730559.html
load 734777.html
load 737313-1.html
load 737313-2.html
@@ -500,7 +500,7 @@ load 786740-1.html
load 790260-1.html
asserts(1) test-pref(font.size.inflation.emPerLine,15) load 791601.xhtml # Bug 871327
test-pref(font.size.inflation.minTwips,120) load 794693.html
-asserts-if(!Android,4) load 798020-1.html
+asserts(4) load 798020-1.html
load 798235-1.html
load 799207-1.html
load 799207-2.html
@@ -532,7 +532,7 @@ load 842166.html
load 844529-1.html
load 847130.xhtml
load 847208.html
-asserts-if(Android,2) asserts-if(Android&&asyncPan,4) asserts-if(!Android,4) load 847209.html # bug 847368
+asserts(4) load 847209.html # bug 847368
load 847211-1.html
load 849603.html
asserts(0-12) load 850931.html # bug 569193
@@ -558,7 +558,7 @@ asserts(2-8) load 944909-1.html
load 946167-1.html
load 947158.html
load 949932.html
-asserts-if(Android,0-1) load 964078.html # bug 989718
+load 964078.html
load 970710.html
load 973701-1.xhtml
load 973701-2.xhtml
@@ -626,7 +626,7 @@ load text-overflow-bug671796.xhtml
load text-overflow-bug713610.html
load text-overflow-form-elements.html
load text-overflow-iframe.html
-asserts-if(Android,2-4) asserts-if(!Android,4) load 1225005.html # bug 682647 and bug 448083
+asserts(4) load 1225005.html # bug 682647 and bug 448083
load 1233191.html
asserts(2) load 1272983-1.html # bug 586628
asserts(2) load 1272983-2.html # bug 586628
diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp
index dd1b15f778..5c316b8b5e 100644
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -1266,21 +1266,6 @@ ScrollFrameHelper::HandleScrollbarStyleSwitching()
}
}
-#if defined(MOZ_WIDGET_ANDROID)
-static bool IsFocused(nsIContent* aContent)
-{
- // Some content elements, like the GetContent() of a scroll frame
- // for a text input field, are inside anonymous subtrees, but the focus
- // manager always reports a non-anonymous element as the focused one, so
- // walk up the tree until we reach a non-anonymous element.
- while (aContent && aContent->IsInAnonymousSubtree()) {
- aContent = aContent->GetParent();
- }
-
- return aContent ? nsContentUtils::IsFocusedContent(aContent) : false;
-}
-#endif
-
void
ScrollFrameHelper::SetScrollableByAPZ(bool aScrollable)
{
@@ -1315,12 +1300,8 @@ ScrollFrameHelper::WantAsyncScroll() const
bool isHScrollable = (scrollRange.width >= oneDevPixel) &&
(styles.mHorizontal != NS_STYLE_OVERFLOW_HIDDEN);
-#if defined(MOZ_WIDGET_ANDROID)
- // Mobile platforms need focus to scroll.
- bool canScrollWithoutScrollbars = IsFocused(mOuter->GetContent());
-#else
+ // Desktop platforms don't need focus to scroll.
bool canScrollWithoutScrollbars = true;
-#endif
// The check for scroll bars was added in bug 825692 to prevent layerization
// of text inputs for performance reasons.
diff --git a/layout/generic/nsPluginFrame.cpp b/layout/generic/nsPluginFrame.cpp
index 6e9e072e73..442f8ca262 100644
--- a/layout/generic/nsPluginFrame.cpp
+++ b/layout/generic/nsPluginFrame.cpp
@@ -84,11 +84,6 @@ using mozilla::DefaultXDisplay;
#include <winuser.h>
#endif
-#ifdef MOZ_WIDGET_ANDROID
-#include "AndroidBridge.h"
-#include "GLContext.h"
-#endif
-
#include "mozilla/dom/TabChild.h"
#include "ClientLayerManager.h"
@@ -938,55 +933,6 @@ nsDisplayPluginReadback::GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap)
return GetDisplayItemBounds(aBuilder, this, mFrame);
}
-#ifdef MOZ_WIDGET_ANDROID
-
-class nsDisplayPluginVideo : public nsDisplayItem {
-public:
- nsDisplayPluginVideo(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame, nsNPAPIPluginInstance::VideoInfo* aVideoInfo)
- : nsDisplayItem(aBuilder, aFrame), mVideoInfo(aVideoInfo)
- {
- MOZ_COUNT_CTOR(nsDisplayPluginVideo);
- }
-#ifdef NS_BUILD_REFCNT_LOGGING
- virtual ~nsDisplayPluginVideo() {
- MOZ_COUNT_DTOR(nsDisplayPluginVideo);
- }
-#endif
-
- virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder,
- bool* aSnap) override;
-
- NS_DISPLAY_DECL_NAME("PluginVideo", TYPE_PLUGIN_VIDEO)
-
- virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
- LayerManager* aManager,
- const ContainerLayerParameters& aContainerParameters) override
- {
- return static_cast<nsPluginFrame*>(mFrame)->BuildLayer(aBuilder, aManager, this, aContainerParameters);
- }
-
- virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
- LayerManager* aManager,
- const ContainerLayerParameters& aParameters) override
- {
- return LAYER_ACTIVE;
- }
-
- nsNPAPIPluginInstance::VideoInfo* VideoInfo() { return mVideoInfo; }
-
-private:
- nsNPAPIPluginInstance::VideoInfo* mVideoInfo;
-};
-
-nsRect
-nsDisplayPluginVideo::GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap)
-{
- *aSnap = false;
- return GetDisplayItemBounds(aBuilder, this, mFrame);
-}
-
-#endif
-
nsRect
nsDisplayPlugin::GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap)
{
@@ -1138,9 +1084,6 @@ nsPluginFrame::IsOpaque() const
{
#if defined(XP_MACOSX)
return false;
-#elif defined(MOZ_WIDGET_ANDROID)
- // We don't know, so just assume transparent
- return false;
#else
if (mInstanceOwner && mInstanceOwner->UseAsyncRendering()) {
@@ -1239,29 +1182,12 @@ nsPluginFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsDisplayItem::ForceActiveLayers()) {
state = LAYER_ACTIVE;
}
- // We don't need this on Android, and it just confuses things
-#if !MOZ_WIDGET_ANDROID
if (aBuilder->IsPaintingToWindow() &&
state == LAYER_ACTIVE &&
IsTransparentMode()) {
aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayPluginReadback(aBuilder, this));
}
-#endif
-
-#if MOZ_WIDGET_ANDROID
- if (aBuilder->IsPaintingToWindow() &&
- state == LAYER_ACTIVE) {
-
- nsTArray<nsNPAPIPluginInstance::VideoInfo*> videos;
- mInstanceOwner->GetVideos(videos);
-
- for (uint32_t i = 0; i < videos.Length(); i++) {
- aLists.Content()->AppendNewToTop(new (aBuilder)
- nsDisplayPluginVideo(aBuilder, this, videos[i]));
- }
- }
-#endif
aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayPlugin(aBuilder, this));
@@ -1399,10 +1325,6 @@ nsPluginFrame::GetLayerState(nsDisplayListBuilder* aBuilder,
if (!mInstanceOwner)
return LAYER_NONE;
-#ifdef MOZ_WIDGET_ANDROID
- // We always want a layer on Honeycomb and later
- return LAYER_ACTIVE;
-#else
if (mInstanceOwner->NeedsScrollImageLayer()) {
return LAYER_ACTIVE;
}
@@ -1412,7 +1334,6 @@ nsPluginFrame::GetLayerState(nsDisplayListBuilder* aBuilder,
}
return LAYER_ACTIVE_FORCE;
-#endif
}
class PluginFrameDidCompositeObserver final : public ClientLayerManager::
@@ -1529,32 +1450,6 @@ nsPluginFrame::BuildLayer(nsDisplayListBuilder* aBuilder,
}
lm->AddDidCompositeObserver(mDidCompositeObserver.get());
}
-#ifdef MOZ_WIDGET_ANDROID
- } else if (aItem->GetType() == nsDisplayItem::TYPE_PLUGIN_VIDEO) {
- nsDisplayPluginVideo* videoItem = reinterpret_cast<nsDisplayPluginVideo*>(aItem);
- nsNPAPIPluginInstance::VideoInfo* videoInfo = videoItem->VideoInfo();
-
- RefPtr<ImageContainer> container = mInstanceOwner->GetImageContainerForVideo(videoInfo);
- if (!container)
- return nullptr;
-
- if (!layer) {
- // Initialize ImageLayer
- layer = aManager->CreateImageLayer();
- if (!layer)
- return nullptr;
- }
-
- ImageLayer* imglayer = static_cast<ImageLayer*>(layer.get());
- imglayer->SetContainer(container);
-
- layer->SetContentFlags(IsOpaque() ? Layer::CONTENT_OPAQUE : 0);
-
- // Set the offset and size according to the video dimensions
- r.MoveBy(videoInfo->mDimensions.TopLeft());
- size.width = videoInfo->mDimensions.width;
- size.height = videoInfo->mDimensions.height;
-#endif
} else {
NS_ASSERTION(aItem->GetType() == nsDisplayItem::TYPE_PLUGIN_READBACK,
"Unknown item type");
@@ -1603,20 +1498,7 @@ nsPluginFrame::PaintPlugin(nsDisplayListBuilder* aBuilder,
nsRenderingContext& aRenderingContext,
const nsRect& aDirtyRect, const nsRect& aPluginRect)
{
-#if defined(MOZ_WIDGET_ANDROID)
- if (mInstanceOwner) {
- gfxRect frameGfxRect =
- PresContext()->AppUnitsToGfxUnits(aPluginRect);
- gfxRect dirtyGfxRect =
- PresContext()->AppUnitsToGfxUnits(aDirtyRect);
-
- gfxContext* ctx = aRenderingContext.ThebesContext();
-
- mInstanceOwner->Paint(ctx, frameGfxRect, dirtyGfxRect);
- return;
- }
-#else
-# if defined(DEBUG)
+#if defined(DEBUG)
// On Desktop, we should have built a layer as we no longer support in-process
// plugins or synchronous painting. We can only get here for windowed plugins
// (which draw themselves), or via some error/unload state.
@@ -1625,7 +1507,6 @@ nsPluginFrame::PaintPlugin(nsDisplayListBuilder* aBuilder,
mInstanceOwner->GetWindow(window);
MOZ_ASSERT(!window || window->type == NPWindowTypeWindow);
}
-# endif
#endif
}
diff --git a/layout/generic/test/mochitest.ini b/layout/generic/test/mochitest.ini
index 33dacddabc..78d6f2b19f 100644
--- a/layout/generic/test/mochitest.ini
+++ b/layout/generic/test/mochitest.ini
@@ -1,5 +1,4 @@
[DEFAULT]
-skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM, ONLY IN CHUNK 10
support-files =
../../reftests/backgrounds/blue-32x32.png
../../reftests/backgrounds/fuchsia-32x32.png