diff --git a/.eslintignore b/.eslintignore index 6abbfe5292..d823893422 100644 --- a/.eslintignore +++ b/.eslintignore @@ -187,28 +187,6 @@ devtools/client/framework/test/code_ugly* devtools/server/tests/unit/babel_and_browserify_script_with_source_map.js devtools/server/tests/unit/setBreakpoint* -# mobile/android/ exclusions -mobile/android/tests/ - -# Uses `#filter substitution` -mobile/android/b2gdroid/app/b2gdroid.js -mobile/android/app/mobile.js -mobile/android/chrome/content/healthreport-prefs.js - -# Uses `#expand` -mobile/android/chrome/content/about.js - -# Not much JS to lint and non-standard at that -mobile/android/installer/ -mobile/android/locales/ - -# Non-standard `(catch ex if ...)` -mobile/android/chrome/content/browser.js -mobile/android/components/Snippets.js - -# Bug 1178739: Ignore this file as a quick fix for "Illegal yield expression" -mobile/android/modules/HomeProvider.jsm - # services/ exclusions # Uses `#filter substitution` diff --git a/.gitignore b/.gitignore index 6348a46201..c4fd25d6e4 100644 --- a/.gitignore +++ b/.gitignore @@ -91,9 +91,6 @@ GPATH # Git clone directory for updating web-platform-tests testing/web-platform/sync/ -# Android Gradle artifacts. -mobile/android/gradle/.gradle - # XCode project cruft embedding/ios/GoannaEmbed/GoannaEmbed.xcodeproj/project.xcworkspace/xcuserdata embedding/ios/GoannaEmbed/GoannaEmbed.xcodeproj/xcuserdata diff --git a/accessible/jsat/AccessFu.jsm b/accessible/jsat/AccessFu.jsm index c6b16b38fb..4cfbfc2fa3 100644 --- a/accessible/jsat/AccessFu.jsm +++ b/accessible/jsat/AccessFu.jsm @@ -64,9 +64,7 @@ this.AccessFu = { // jshint ignore:line if (this._enabled) { this._disable(); } - if (Utils.MozBuildApp === 'mobile/android') { - Services.obs.removeObserver(this, 'Accessibility:Settings'); - } else if (Utils.win.navigator.mozSettings) { + if (Utils.win.navigator.mozSettings) { Utils.win.navigator.mozSettings.removeObserver( SCREENREADER_SETTING, this.handleEvent); } @@ -585,11 +583,7 @@ var Output = { get androidBridge() { delete this.androidBridge; - if (Utils.MozBuildApp === 'mobile/android') { - this.androidBridge = Services.androidBridge; - } else { - this.androidBridge = null; - } + this.androidBridge = null; return this.androidBridge; }, @@ -815,12 +809,6 @@ var Input = { target.blur(); } } - - if (Utils.MozBuildApp == 'mobile/android') { - // Return focus to native Android browser chrome. - Services.androidBridge.handleGeckoMessage( - { type: 'ToggleChrome:Focus' }); - } break; case aEvent.DOM_VK_RETURN: if (this.editState.editing) { @@ -837,18 +825,9 @@ var Input = { }, moveToPoint: function moveToPoint(aRule, aX, aY) { - // XXX: Bug 1013408 - There is no alignment between the chrome window's - // viewport size and the content viewport size in Android. This makes - // sending mouse events beyond its bounds impossible. - if (Utils.MozBuildApp === 'mobile/android') { - let mm = Utils.getMessageManager(Utils.CurrentBrowser); - mm.sendAsyncMessage('AccessFu:MoveToPoint', - {rule: aRule, x: aX, y: aY, origin: 'top'}); - } else { - let win = Utils.win; - Utils.winUtils.sendMouseEvent('mousemove', - aX - win.mozInnerScreenX, aY - win.mozInnerScreenY, 0, 0, 0); - } + let win = Utils.win; + Utils.winUtils.sendMouseEvent('mousemove', + aX - win.mozInnerScreenX, aY - win.mozInnerScreenY, 0, 0, 0); }, moveCursor: function moveCursor(aAction, aRule, aInputType, aAdjustRange) { diff --git a/accessible/jsat/Gestures.jsm b/accessible/jsat/Gestures.jsm index cc431614c7..dd21f040f6 100644 --- a/accessible/jsat/Gestures.jsm +++ b/accessible/jsat/Gestures.jsm @@ -76,8 +76,6 @@ const EDGE = 0.1; const TIMEOUT_MULTIPLIER = 1; // A single pointer down/up sequence periodically precedes the tripple swipe // gesture on Android. This delay acounts for that. -const IS_ANDROID = Utils.MozBuildApp === 'mobile/android' && - Utils.AndroidSdkVersion >= 14; /** * A point object containing distance travelled data. @@ -206,7 +204,7 @@ this.GestureTracker = { // jshint ignore:line if (aDetail.type !== 'pointerdown') { return; } - let GestureConstructor = aGesture || (IS_ANDROID ? DoubleTap : Tap); + let GestureConstructor = aGesture || Tap; this._create(GestureConstructor); this._update(aDetail, aTimeStamp); }, diff --git a/accessible/jsat/Presentation.jsm b/accessible/jsat/Presentation.jsm index 6912d0ea58..bd1ef96ca5 100644 --- a/accessible/jsat/Presentation.jsm +++ b/accessible/jsat/Presentation.jsm @@ -680,7 +680,6 @@ this.Presentation = { // jshint ignore:line get presenters() { delete this.presenters; let presenterMap = { - 'mobile/android': [VisualPresenter, AndroidPresenter], 'b2g': [VisualPresenter, B2GPresenter], 'browser': [VisualPresenter, B2GPresenter, AndroidPresenter] }; diff --git a/accessible/jsat/Utils.jsm b/accessible/jsat/Utils.jsm index 4e478cab0d..64a4150583 100644 --- a/accessible/jsat/Utils.jsm +++ b/accessible/jsat/Utils.jsm @@ -33,9 +33,7 @@ this.Utils = { // jshint ignore:line _buildAppMap: { '{3c2e2abc-06d4-11e1-ac3b-374f68613e61}': 'b2g', '{d1bfe7d9-c01e-4237-998b-7b5f960a4314}': 'graphene', - '{ec8030f7-c20a-464f-9b0e-13a3a9e97384}': 'browser', - '{aa3c5121-dab2-40e2-81ca-7ea25febc110}': 'mobile/android', - '{a23983c0-fd0e-11dc-95ff-0800200c9a66}': 'mobile/xul' + '{ec8030f7-c20a-464f-9b0e-13a3a9e97384}': 'browser' }, init: function Utils_init(aWindow) { diff --git a/application/palemoon/branding/shared/pref/uaoverrides.inc b/application/palemoon/branding/shared/pref/uaoverrides.inc index 404f7fc3fb..6771feca35 100644 --- a/application/palemoon/branding/shared/pref/uaoverrides.inc +++ b/application/palemoon/branding/shared/pref/uaoverrides.inc @@ -28,6 +28,7 @@ pref("@GUAO_PREF@.googlevideos.com","Mozilla/5.0 (%OS_SLICE% rv:38.9) @GK_SLICE@ pref("@GUAO_PREF@.gstatic.com","Mozilla/5.0 (%OS_SLICE% rv:71.0) @GK_SLICE@ Firefox/71.0 @PM_SLICE@"); pref("@GUAO_PREF@.live.com","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@ (Pale Moon)"); pref("@GUAO_PREF@.msn.com","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@ (Pale Moon)"); +pref("@GUAO_PREF@.netteller.com","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@"); pref("@GUAO_PREF@.patientaccess.com","Mozilla/5.0 (%OS_SLICE% rv:60.0) @GK_SLICE@ Firefox/60.0 @PM_SLICE@"); pref("@GUAO_PREF@.outlook.com","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@ (Pale Moon)"); pref("@GUAO_PREF@.web.de","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@ (Pale Moon)"); diff --git a/dom/base/ScreenOrientation.h b/dom/base/ScreenOrientation.h index 0604d87c66..c69ad69cbe 100644 --- a/dom/base/ScreenOrientation.h +++ b/dom/base/ScreenOrientation.h @@ -16,8 +16,6 @@ namespace mozilla { namespace dom { class Promise; -// Make sure that any change to ScreenOrientationInternal values are -// also made in mobile/android/base/GeckoScreenOrientation.java typedef uint32_t ScreenOrientationInternal; static const ScreenOrientationInternal eScreenOrientation_None = 0; diff --git a/dom/media/platforms/android/AndroidDecoderModule.cpp b/dom/media/platforms/android/AndroidDecoderModule.cpp deleted file mode 100644 index 3bf5cbf097..0000000000 --- a/dom/media/platforms/android/AndroidDecoderModule.cpp +++ /dev/null @@ -1,227 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "AndroidDecoderModule.h" -#include "AndroidBridge.h" - -#include "MediaCodecDataDecoder.h" -#include "RemoteDataDecoder.h" - -#include "MediaInfo.h" -#include "VPXDecoder.h" - -#include "MediaPrefs.h" -#include "OpusDecoder.h" -#include "VorbisDecoder.h" - -#include "nsPromiseFlatString.h" -#include "nsIGfxInfo.h" - -#include "prlog.h" - -#include - -#undef LOG -#define LOG(arg, ...) MOZ_LOG(sAndroidDecoderModuleLog, \ - mozilla::LogLevel::Debug, ("AndroidDecoderModule(%p)::%s: " arg, \ - this, __func__, ##__VA_ARGS__)) - -using namespace mozilla; -using namespace mozilla::gl; -using namespace mozilla::java::sdk; -using media::TimeUnit; - -namespace mozilla { - -mozilla::LazyLogModule sAndroidDecoderModuleLog("AndroidDecoderModule"); - -static const char* -TranslateMimeType(const nsACString& aMimeType) -{ - if (VPXDecoder::IsVPX(aMimeType, VPXDecoder::VP8)) { - return "video/x-vnd.on2.vp8"; - } else if (VPXDecoder::IsVPX(aMimeType, VPXDecoder::VP9)) { - return "video/x-vnd.on2.vp9"; - } - return PromiseFlatCString(aMimeType).get(); -} - -static bool -GetFeatureStatus(int32_t aFeature) -{ - nsCOMPtr gfxInfo = services::GetGfxInfo(); - int32_t status = nsIGfxInfo::FEATURE_STATUS_UNKNOWN; - nsCString discardFailureId; - if (!gfxInfo || NS_FAILED(gfxInfo->GetFeatureStatus(aFeature, discardFailureId, &status))) { - return false; - } - return status == nsIGfxInfo::FEATURE_STATUS_OK; -}; - -CryptoInfo::LocalRef -GetCryptoInfoFromSample(const MediaRawData* aSample) -{ - auto& cryptoObj = aSample->mCrypto; - - if (!cryptoObj.mValid) { - return nullptr; - } - - CryptoInfo::LocalRef cryptoInfo; - nsresult rv = CryptoInfo::New(&cryptoInfo); - NS_ENSURE_SUCCESS(rv, nullptr); - - uint32_t numSubSamples = - std::min(cryptoObj.mPlainSizes.Length(), cryptoObj.mEncryptedSizes.Length()); - - uint32_t totalSubSamplesSize = 0; - for (auto& size : cryptoObj.mEncryptedSizes) { - totalSubSamplesSize += size; - } - - // mPlainSizes is uint16_t, need to transform to uint32_t first. - nsTArray plainSizes; - for (auto& size : cryptoObj.mPlainSizes) { - totalSubSamplesSize += size; - plainSizes.AppendElement(size); - } - - uint32_t codecSpecificDataSize = aSample->Size() - totalSubSamplesSize; - // Size of codec specific data("CSD") for Android MediaCodec usage should be - // included in the 1st plain size. - plainSizes[0] += codecSpecificDataSize; - - static const int kExpectedIVLength = 16; - auto tempIV(cryptoObj.mIV); - auto tempIVLength = tempIV.Length(); - MOZ_ASSERT(tempIVLength <= kExpectedIVLength); - for (size_t i = tempIVLength; i < kExpectedIVLength; i++) { - // Padding with 0 - tempIV.AppendElement(0); - } - - auto numBytesOfPlainData = mozilla::jni::IntArray::New( - reinterpret_cast(&plainSizes[0]), - plainSizes.Length()); - - auto numBytesOfEncryptedData = - mozilla::jni::IntArray::New(reinterpret_cast(&cryptoObj.mEncryptedSizes[0]), - cryptoObj.mEncryptedSizes.Length()); - auto iv = mozilla::jni::ByteArray::New(reinterpret_cast(&tempIV[0]), - tempIV.Length()); - auto keyId = mozilla::jni::ByteArray::New(reinterpret_cast(&cryptoObj.mKeyId[0]), - cryptoObj.mKeyId.Length()); - cryptoInfo->Set(numSubSamples, - numBytesOfPlainData, - numBytesOfEncryptedData, - keyId, - iv, - MediaCodec::CRYPTO_MODE_AES_CTR); - - return cryptoInfo; -} - -bool -AndroidDecoderModule::SupportsMimeType(const nsACString& aMimeType, - DecoderDoctorDiagnostics* aDiagnostics) const -{ - if (!AndroidBridge::Bridge() || - AndroidBridge::Bridge()->GetAPIVersion() < 16) { - return false; - } - - if (aMimeType.EqualsLiteral("video/mp4") || - aMimeType.EqualsLiteral("video/avc")) { - return true; - } - - // When checking "audio/x-wav", CreateDecoder can cause a JNI ERROR by - // Accessing a stale local reference leading to a SIGSEGV crash. - // To avoid this we check for wav types here. - if (aMimeType.EqualsLiteral("audio/x-wav") || - aMimeType.EqualsLiteral("audio/wave; codecs=1") || - aMimeType.EqualsLiteral("audio/wave; codecs=6") || - aMimeType.EqualsLiteral("audio/wave; codecs=7") || - aMimeType.EqualsLiteral("audio/wave; codecs=65534")) { - return false; - } - - if ((VPXDecoder::IsVPX(aMimeType, VPXDecoder::VP8) && - !GetFeatureStatus(nsIGfxInfo::FEATURE_VP8_HW_DECODE)) || - (VPXDecoder::IsVPX(aMimeType, VPXDecoder::VP9) && - !GetFeatureStatus(nsIGfxInfo::FEATURE_VP9_HW_DECODE))) { - return false; - } - - // Prefer the gecko decoder for opus and vorbis; stagefright crashes - // on content demuxed from mp4. - if (OpusDataDecoder::IsOpus(aMimeType) || - VorbisDataDecoder::IsVorbis(aMimeType)) { - LOG("Rejecting audio of type %s", aMimeType.Data()); - return false; - } - - return java::HardwareCodecCapabilityUtils::FindDecoderCodecInfoForMimeType( - nsCString(TranslateMimeType(aMimeType))); -} - -already_AddRefed -AndroidDecoderModule::CreateVideoDecoder(const CreateDecoderParams& aParams) -{ - MediaFormat::LocalRef format; - - const VideoInfo& config = aParams.VideoConfig(); - NS_ENSURE_SUCCESS(MediaFormat::CreateVideoFormat( - TranslateMimeType(config.mMimeType), - config.mDisplay.width, - config.mDisplay.height, - &format), nullptr); - - RefPtr decoder = MediaPrefs::PDMAndroidRemoteCodecEnabled() ? - RemoteDataDecoder::CreateVideoDecoder(config, - format, - aParams.mCallback, - aParams.mImageContainer) : - MediaCodecDataDecoder::CreateVideoDecoder(config, - format, - aParams.mCallback, - aParams.mImageContainer); - - return decoder.forget(); -} - -already_AddRefed -AndroidDecoderModule::CreateAudioDecoder(const CreateDecoderParams& aParams) -{ - const AudioInfo& config = aParams.AudioConfig(); - MOZ_ASSERT(config.mBitDepth == 16, "We only handle 16-bit audio!"); - - MediaFormat::LocalRef format; - - LOG("CreateAudioFormat with mimeType=%s, mRate=%d, channels=%d", - config.mMimeType.Data(), config.mRate, config.mChannels); - - NS_ENSURE_SUCCESS(MediaFormat::CreateAudioFormat( - config.mMimeType, - config.mRate, - config.mChannels, - &format), nullptr); - - RefPtr decoder = MediaPrefs::PDMAndroidRemoteCodecEnabled() ? - RemoteDataDecoder::CreateAudioDecoder(config, format, aParams.mCallback) : - MediaCodecDataDecoder::CreateAudioDecoder(config, format, aParams.mCallback); - - return decoder.forget(); -} - -PlatformDecoderModule::ConversionRequired -AndroidDecoderModule::DecoderNeedsConversion(const TrackInfo& aConfig) const -{ - if (aConfig.IsVideo()) { - return ConversionRequired::kNeedAnnexB; - } - return ConversionRequired::kNeedNone; -} - -} // mozilla diff --git a/dom/media/platforms/android/AndroidDecoderModule.h b/dom/media/platforms/android/AndroidDecoderModule.h deleted file mode 100644 index 339cbb3114..0000000000 --- a/dom/media/platforms/android/AndroidDecoderModule.h +++ /dev/null @@ -1,34 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifndef AndroidDecoderModule_h_ -#define AndroidDecoderModule_h_ - -#include "PlatformDecoderModule.h" - -namespace mozilla { - -class AndroidDecoderModule : public PlatformDecoderModule { -public: - already_AddRefed - CreateVideoDecoder(const CreateDecoderParams& aParams) override; - - already_AddRefed - CreateAudioDecoder(const CreateDecoderParams& aParams) override; - - AndroidDecoderModule() {} - virtual ~AndroidDecoderModule() {} - - bool SupportsMimeType(const nsACString& aMimeType, - DecoderDoctorDiagnostics* aDiagnostics) const override; - - ConversionRequired - DecoderNeedsConversion(const TrackInfo& aConfig) const override; -}; - -extern LazyLogModule sAndroidDecoderModuleLog; - -} // namespace mozilla - -#endif diff --git a/dom/media/platforms/android/MediaCodecDataDecoder.cpp b/dom/media/platforms/android/MediaCodecDataDecoder.cpp deleted file mode 100644 index 3c5df54eed..0000000000 --- a/dom/media/platforms/android/MediaCodecDataDecoder.cpp +++ /dev/null @@ -1,698 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "MediaCodecDataDecoder.h" - -#include "AndroidBridge.h" -#include "AndroidSurfaceTexture.h" -#include "GeneratedJNINatives.h" -#include "GLImages.h" - -#include "MediaData.h" -#include "MediaInfo.h" -#include "VPXDecoder.h" - -#include "nsThreadUtils.h" -#include "nsPromiseFlatString.h" -#include "nsIGfxInfo.h" - -#include "prlog.h" - -#include - -#undef LOG -#define LOG(arg, ...) MOZ_LOG(sAndroidDecoderModuleLog, \ - mozilla::LogLevel::Debug, ("MediaCodecDataDecoder(%p)::%s: " arg, \ - this, __func__, ##__VA_ARGS__)) - -using namespace mozilla; -using namespace mozilla::gl; -using namespace mozilla::java; -using namespace mozilla::java::sdk; -using media::TimeUnit; - -namespace mozilla { - -#define INVOKE_CALLBACK(Func, ...) \ - if (mCallback) { \ - mCallback->Func(__VA_ARGS__); \ - } else { \ - NS_WARNING("Callback not set"); \ - } - -static MediaCodec::LocalRef -CreateDecoder(const nsACString& aMimeType) -{ - MediaCodec::LocalRef codec; - NS_ENSURE_SUCCESS(MediaCodec::CreateDecoderByType(TranslateMimeType(aMimeType), - &codec), nullptr); - return codec; -} - -class VideoDataDecoder : public MediaCodecDataDecoder -{ -public: - VideoDataDecoder(const VideoInfo& aConfig, - MediaFormat::Param aFormat, - MediaDataDecoderCallback* aCallback, - layers::ImageContainer* aImageContainer) - : MediaCodecDataDecoder(MediaData::Type::VIDEO_DATA, aConfig.mMimeType, - aFormat, aCallback) - , mImageContainer(aImageContainer) - , mConfig(aConfig) - { - - } - - const char* GetDescriptionName() const override - { - return "Android MediaCodec video decoder"; - } - - RefPtr Init() override - { - mSurfaceTexture = AndroidSurfaceTexture::Create(); - if (!mSurfaceTexture) { - NS_WARNING("Failed to create SurfaceTexture for video decode\n"); - return InitPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__); - } - - if (NS_FAILED(InitDecoder(mSurfaceTexture->JavaSurface()))) { - return InitPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__); - } - - return InitPromise::CreateAndResolve(TrackInfo::kVideoTrack, __func__); - } - - void Cleanup() override - { - } - - nsresult PostOutput(BufferInfo::Param aInfo, MediaFormat::Param aFormat, - const TimeUnit& aDuration) override - { - RefPtr img = - new SurfaceTextureImage(mSurfaceTexture.get(), mConfig.mDisplay, - gl::OriginPos::BottomLeft); - - nsresult rv; - int32_t flags; - NS_ENSURE_SUCCESS(rv = aInfo->Flags(&flags), rv); - - bool isSync = !!(flags & MediaCodec::BUFFER_FLAG_SYNC_FRAME); - - int32_t offset; - NS_ENSURE_SUCCESS(rv = aInfo->Offset(&offset), rv); - - int64_t presentationTimeUs; - NS_ENSURE_SUCCESS(rv = aInfo->PresentationTimeUs(&presentationTimeUs), rv); - - RefPtr v = - VideoData::CreateFromImage(mConfig, - offset, - presentationTimeUs, - aDuration.ToMicroseconds(), - img, - isSync, - presentationTimeUs, - gfx::IntRect(0, 0, - mConfig.mDisplay.width, - mConfig.mDisplay.height)); - INVOKE_CALLBACK(Output, v); - return NS_OK; - } - -protected: - layers::ImageContainer* mImageContainer; - const VideoInfo& mConfig; - RefPtr mSurfaceTexture; -}; - -class AudioDataDecoder : public MediaCodecDataDecoder -{ -public: - AudioDataDecoder(const AudioInfo& aConfig, MediaFormat::Param aFormat, - MediaDataDecoderCallback* aCallback) - : MediaCodecDataDecoder(MediaData::Type::AUDIO_DATA, aConfig.mMimeType, - aFormat, aCallback) - { - JNIEnv* const env = jni::GetEnvForThread(); - - jni::ByteBuffer::LocalRef buffer(env); - NS_ENSURE_SUCCESS_VOID(aFormat->GetByteBuffer(NS_LITERAL_STRING("csd-0"), - &buffer)); - - if (!buffer && aConfig.mCodecSpecificConfig->Length() >= 2) { - buffer = jni::ByteBuffer::New( - aConfig.mCodecSpecificConfig->Elements(), - aConfig.mCodecSpecificConfig->Length()); - NS_ENSURE_SUCCESS_VOID(aFormat->SetByteBuffer(NS_LITERAL_STRING("csd-0"), - buffer)); - } - } - - const char* GetDescriptionName() const override - { - return "android audio decoder"; - } - - nsresult Output(BufferInfo::Param aInfo, void* aBuffer, - MediaFormat::Param aFormat, const TimeUnit& aDuration) - { - // The output on Android is always 16-bit signed - nsresult rv; - int32_t numChannels; - NS_ENSURE_SUCCESS(rv = - aFormat->GetInteger(NS_LITERAL_STRING("channel-count"), &numChannels), rv); - AudioConfig::ChannelLayout layout(numChannels); - if (!layout.IsValid()) { - return NS_ERROR_FAILURE; - } - - int32_t sampleRate; - NS_ENSURE_SUCCESS(rv = - aFormat->GetInteger(NS_LITERAL_STRING("sample-rate"), &sampleRate), rv); - - int32_t size; - NS_ENSURE_SUCCESS(rv = aInfo->Size(&size), rv); - - int32_t offset; - NS_ENSURE_SUCCESS(rv = aInfo->Offset(&offset), rv); - -#ifdef MOZ_SAMPLE_TYPE_S16 - const int32_t numSamples = size / 2; -#else -#error We only support 16-bit integer PCM -#endif - - const int32_t numFrames = numSamples / numChannels; - AlignedAudioBuffer audio(numSamples); - if (!audio) { - return NS_ERROR_OUT_OF_MEMORY; - } - - const uint8_t* bufferStart = static_cast(aBuffer) + offset; - PodCopy(audio.get(), reinterpret_cast(bufferStart), - numSamples); - - int64_t presentationTimeUs; - NS_ENSURE_SUCCESS(rv = aInfo->PresentationTimeUs(&presentationTimeUs), rv); - - RefPtr data = new AudioData(0, presentationTimeUs, - aDuration.ToMicroseconds(), - numFrames, - Move(audio), - numChannels, - sampleRate); - INVOKE_CALLBACK(Output, data); - return NS_OK; - } -}; - -MediaDataDecoder* -MediaCodecDataDecoder::CreateAudioDecoder(const AudioInfo& aConfig, - MediaFormat::Param aFormat, - MediaDataDecoderCallback* aCallback) -{ - return new AudioDataDecoder(aConfig, aFormat, aCallback); -} - -MediaDataDecoder* -MediaCodecDataDecoder::CreateVideoDecoder(const VideoInfo& aConfig, - MediaFormat::Param aFormat, - MediaDataDecoderCallback* aCallback, - layers::ImageContainer* aImageContainer) -{ - return new VideoDataDecoder(aConfig, aFormat, aCallback, aImageContainer); -} - -MediaCodecDataDecoder::MediaCodecDataDecoder(MediaData::Type aType, - const nsACString& aMimeType, - MediaFormat::Param aFormat, - MediaDataDecoderCallback* aCallback) - : mType(aType) - , mMimeType(aMimeType) - , mFormat(aFormat) - , mCallback(aCallback) - , mInputBuffers(nullptr) - , mOutputBuffers(nullptr) - , mMonitor("MediaCodecDataDecoder::mMonitor") - , mState(ModuleState::kDecoding) -{ - -} - -MediaCodecDataDecoder::~MediaCodecDataDecoder() -{ - Shutdown(); -} - -RefPtr -MediaCodecDataDecoder::Init() -{ - nsresult rv = InitDecoder(nullptr); - - TrackInfo::TrackType type = - (mType == MediaData::AUDIO_DATA ? TrackInfo::TrackType::kAudioTrack - : TrackInfo::TrackType::kVideoTrack); - - return NS_SUCCEEDED(rv) ? - InitPromise::CreateAndResolve(type, __func__) : - InitPromise::CreateAndReject( - NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__); -} - -nsresult -MediaCodecDataDecoder::InitDecoder(Surface::Param aSurface) -{ - mDecoder = CreateDecoder(mMimeType); - if (!mDecoder) { - INVOKE_CALLBACK(Error, - MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__)); - return NS_ERROR_FAILURE; - } - - nsresult rv; - NS_ENSURE_SUCCESS(rv = mDecoder->Configure(mFormat, aSurface, nullptr, 0), rv); - NS_ENSURE_SUCCESS(rv = mDecoder->Start(), rv); - - NS_ENSURE_SUCCESS(rv = ResetInputBuffers(), rv); - NS_ENSURE_SUCCESS(rv = ResetOutputBuffers(), rv); - - nsCOMPtr r = NewRunnableMethod(this, &MediaCodecDataDecoder::DecoderLoop); - rv = NS_NewNamedThread("MC Decoder", getter_AddRefs(mThread), r); - - return rv; -} - -// This is in usec, so that's 10ms. -static const int64_t kDecoderTimeout = 10000; - -#define BREAK_ON_DECODER_ERROR() \ - if (NS_FAILED(res)) { \ - NS_WARNING("Exiting decoder loop due to exception"); \ - if (mState == ModuleState::kDrainDecoder) { \ - INVOKE_CALLBACK(DrainComplete); \ - SetState(ModuleState::kDecoding); \ - } \ - INVOKE_CALLBACK(Error, MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__)); \ - break; \ - } - -nsresult -MediaCodecDataDecoder::GetInputBuffer( - JNIEnv* aEnv, int aIndex, jni::Object::LocalRef* aBuffer) -{ - MOZ_ASSERT(aEnv); - MOZ_ASSERT(!*aBuffer); - - int numTries = 2; - - while (numTries--) { - *aBuffer = jni::Object::LocalRef::Adopt( - aEnv->GetObjectArrayElement(mInputBuffers.Get(), aIndex)); - if (*aBuffer) { - return NS_OK; - } - nsresult res = ResetInputBuffers(); - if (NS_FAILED(res)) { - return res; - } - } - return NS_ERROR_FAILURE; -} - -bool -MediaCodecDataDecoder::WaitForInput() -{ - MonitorAutoLock lock(mMonitor); - - while (mState == ModuleState::kDecoding && mQueue.empty()) { - // Signal that we require more input. - INVOKE_CALLBACK(InputExhausted); - lock.Wait(); - } - - return mState != ModuleState::kStopping; -} - - -already_AddRefed -MediaCodecDataDecoder::PeekNextSample() -{ - MonitorAutoLock lock(mMonitor); - - if (mState == ModuleState::kFlushing) { - mDecoder->Flush(); - ClearQueue(); - SetState(ModuleState::kDecoding); - lock.Notify(); - return nullptr; - } - - if (mQueue.empty()) { - if (mState == ModuleState::kDrainQueue) { - SetState(ModuleState::kDrainDecoder); - } - return nullptr; - } - - // We're not stopping or flushing, so try to get a sample. - return RefPtr(mQueue.front()).forget(); -} - -nsresult -MediaCodecDataDecoder::QueueSample(const MediaRawData* aSample) -{ - MOZ_ASSERT(aSample); - AutoLocalJNIFrame frame(jni::GetEnvForThread(), 1); - - // We have a sample, try to feed it to the decoder. - int32_t inputIndex = -1; - nsresult res = mDecoder->DequeueInputBuffer(kDecoderTimeout, &inputIndex); - if (NS_FAILED(res)) { - return res; - } - - if (inputIndex < 0) { - // There is no valid input buffer available. - return NS_ERROR_FAILURE; - } - - jni::Object::LocalRef buffer(frame.GetEnv()); - res = GetInputBuffer(frame.GetEnv(), inputIndex, &buffer); - if (NS_FAILED(res)) { - return res; - } - - void* directBuffer = frame.GetEnv()->GetDirectBufferAddress(buffer.Get()); - - MOZ_ASSERT(frame.GetEnv()->GetDirectBufferCapacity(buffer.Get()) >= - aSample->Size(), - "Decoder buffer is not large enough for sample"); - - PodCopy(static_cast(directBuffer), aSample->Data(), aSample->Size()); - - CryptoInfo::LocalRef cryptoInfo = GetCryptoInfoFromSample(aSample); - if (cryptoInfo) { - res = mDecoder->QueueSecureInputBuffer(inputIndex, 0, cryptoInfo, - aSample->mTime, 0); - } else { - res = mDecoder->QueueInputBuffer(inputIndex, 0, aSample->Size(), - aSample->mTime, 0); - } - - if (NS_FAILED(res)) { - return res; - } - - mDurations.push_back(TimeUnit::FromMicroseconds(aSample->mDuration)); - return NS_OK; -} - -nsresult -MediaCodecDataDecoder::QueueEOS() -{ - mMonitor.AssertCurrentThreadOwns(); - - nsresult res = NS_OK; - int32_t inputIndex = -1; - res = mDecoder->DequeueInputBuffer(kDecoderTimeout, &inputIndex); - if (NS_FAILED(res) || inputIndex < 0) { - return res; - } - - res = mDecoder->QueueInputBuffer(inputIndex, 0, 0, 0, - MediaCodec::BUFFER_FLAG_END_OF_STREAM); - if (NS_SUCCEEDED(res)) { - SetState(ModuleState::kDrainWaitEOS); - mMonitor.Notify(); - } - return res; -} - -void -MediaCodecDataDecoder::HandleEOS(int32_t aOutputStatus) -{ - MonitorAutoLock lock(mMonitor); - - if (mState == ModuleState::kDrainWaitEOS) { - SetState(ModuleState::kDecoding); - mMonitor.Notify(); - - INVOKE_CALLBACK(DrainComplete); - } - - mDecoder->ReleaseOutputBuffer(aOutputStatus, false); -} - -Maybe -MediaCodecDataDecoder::GetOutputDuration() -{ - if (mDurations.empty()) { - return Nothing(); - } - const Maybe duration = Some(mDurations.front()); - mDurations.pop_front(); - return duration; -} - -nsresult -MediaCodecDataDecoder::ProcessOutput( - BufferInfo::Param aInfo, MediaFormat::Param aFormat, int32_t aStatus) -{ - AutoLocalJNIFrame frame(jni::GetEnvForThread(), 1); - - const Maybe duration = GetOutputDuration(); - if (!duration) { - // Some devices report failure in QueueSample while actually succeeding at - // it, in which case we get an output buffer without having a cached duration - // (bug 1273523). - return NS_OK; - } - - const auto buffer = jni::Object::LocalRef::Adopt( - frame.GetEnv()->GetObjectArrayElement(mOutputBuffers.Get(), aStatus)); - - if (buffer) { - // The buffer will be null on Android L if we are decoding to a Surface. - void* directBuffer = frame.GetEnv()->GetDirectBufferAddress(buffer.Get()); - Output(aInfo, directBuffer, aFormat, duration.value()); - } - - // The Surface will be updated at this point (for video). - mDecoder->ReleaseOutputBuffer(aStatus, true); - PostOutput(aInfo, aFormat, duration.value()); - - return NS_OK; -} - -void -MediaCodecDataDecoder::DecoderLoop() -{ - bool isOutputDone = false; - AutoLocalJNIFrame frame(jni::GetEnvForThread(), 1); - MediaFormat::LocalRef outputFormat(frame.GetEnv()); - nsresult res = NS_OK; - - while (WaitForInput()) { - RefPtr sample = PeekNextSample(); - - { - MonitorAutoLock lock(mMonitor); - if (mState == ModuleState::kDrainDecoder) { - MOZ_ASSERT(!sample, "Shouldn't have a sample when pushing EOF frame"); - res = QueueEOS(); - BREAK_ON_DECODER_ERROR(); - } - } - - if (sample) { - res = QueueSample(sample); - if (NS_SUCCEEDED(res)) { - // We've fed this into the decoder, so remove it from the queue. - MonitorAutoLock lock(mMonitor); - MOZ_RELEASE_ASSERT(mQueue.size(), "Queue may not be empty"); - mQueue.pop_front(); - isOutputDone = false; - } - } - - if (isOutputDone) { - continue; - } - - BufferInfo::LocalRef bufferInfo; - nsresult res = BufferInfo::New(&bufferInfo); - BREAK_ON_DECODER_ERROR(); - - int32_t outputStatus = -1; - res = mDecoder->DequeueOutputBuffer(bufferInfo, kDecoderTimeout, - &outputStatus); - BREAK_ON_DECODER_ERROR(); - - if (outputStatus == MediaCodec::INFO_TRY_AGAIN_LATER) { - // We might want to call mCallback->InputExhausted() here, but there seems - // to be some possible bad interactions here with the threading. - } else if (outputStatus == MediaCodec::INFO_OUTPUT_BUFFERS_CHANGED) { - res = ResetOutputBuffers(); - BREAK_ON_DECODER_ERROR(); - } else if (outputStatus == MediaCodec::INFO_OUTPUT_FORMAT_CHANGED) { - res = mDecoder->GetOutputFormat(ReturnTo(&outputFormat)); - BREAK_ON_DECODER_ERROR(); - } else if (outputStatus < 0) { - NS_WARNING("Unknown error from decoder!"); - INVOKE_CALLBACK(Error, - MediaResult(NS_ERROR_DOM_MEDIA_DECODE_ERR, - __func__)); - // Don't break here just in case it's recoverable. If it's not, other - // stuff will fail later and we'll bail out. - } else { - // We have a valid buffer index >= 0 here. - int32_t flags; - nsresult res = bufferInfo->Flags(&flags); - BREAK_ON_DECODER_ERROR(); - - if (flags & MediaCodec::BUFFER_FLAG_END_OF_STREAM) { - HandleEOS(outputStatus); - isOutputDone = true; - // We only queue empty EOF frames, so we're done for now. - continue; - } - - res = ProcessOutput(bufferInfo, outputFormat, outputStatus); - BREAK_ON_DECODER_ERROR(); - } - } - - Cleanup(); - - // We're done. - MonitorAutoLock lock(mMonitor); - SetState(ModuleState::kShutdown); - mMonitor.Notify(); -} - -const char* -MediaCodecDataDecoder::ModuleStateStr(ModuleState aState) { - switch (aState) { - case ModuleState::kDecoding: return "Decoding"; - case ModuleState::kFlushing: return "Flushing"; - case ModuleState::kDrainQueue: return "DrainQueue"; - case ModuleState::kDrainDecoder: return "DrainDecoder"; - case ModuleState::kDrainWaitEOS: return "DrainWaitEOS"; - case ModuleState::kStopping: return "Stopping"; - case ModuleState::kShutdown: return "Shutdown"; - default: MOZ_ASSERT_UNREACHABLE("Invalid state."); - } - return "Unknown"; -} - -bool -MediaCodecDataDecoder::SetState(ModuleState aState) -{ - bool ok = true; - - if (mState == ModuleState::kShutdown) { - ok = false; - } else if (mState == ModuleState::kStopping) { - ok = aState == ModuleState::kShutdown; - } else if (aState == ModuleState::kDrainDecoder) { - ok = mState == ModuleState::kDrainQueue; - } else if (aState == ModuleState::kDrainWaitEOS) { - ok = mState == ModuleState::kDrainDecoder; - } - - if (ok) { - LOG("%s -> %s", ModuleStateStr(mState), ModuleStateStr(aState)); - mState = aState; - } else { - LOG("Fail to transit from %s to %s state", ModuleStateStr(mState), ModuleStateStr(aState)); - } - - return ok; -} - -void -MediaCodecDataDecoder::ClearQueue() -{ - mMonitor.AssertCurrentThreadOwns(); - - mQueue.clear(); - mDurations.clear(); -} - -void -MediaCodecDataDecoder::Input(MediaRawData* aSample) -{ - MonitorAutoLock lock(mMonitor); - mQueue.push_back(aSample); - lock.NotifyAll(); -} - -nsresult -MediaCodecDataDecoder::ResetInputBuffers() -{ - return mDecoder->GetInputBuffers(ReturnTo(&mInputBuffers)); -} - -nsresult -MediaCodecDataDecoder::ResetOutputBuffers() -{ - return mDecoder->GetOutputBuffers(ReturnTo(&mOutputBuffers)); -} - -void -MediaCodecDataDecoder::Flush() -{ - MonitorAutoLock lock(mMonitor); - if (!SetState(ModuleState::kFlushing)) { - return; - } - lock.Notify(); - - while (mState == ModuleState::kFlushing) { - lock.Wait(); - } -} - -void -MediaCodecDataDecoder::Drain() -{ - MonitorAutoLock lock(mMonitor); - if (mState == ModuleState::kDrainDecoder || - mState == ModuleState::kDrainQueue) { - return; - } - - SetState(ModuleState::kDrainQueue); - lock.Notify(); -} - - -void -MediaCodecDataDecoder::Shutdown() -{ - MonitorAutoLock lock(mMonitor); - - SetState(ModuleState::kStopping); - lock.Notify(); - - while (mThread && mState != ModuleState::kShutdown) { - lock.Wait(); - } - - if (mThread) { - mThread->Shutdown(); - mThread = nullptr; - } - - if (mDecoder) { - mDecoder->Stop(); - mDecoder->Release(); - mDecoder = nullptr; - } -} - -} // mozilla diff --git a/dom/media/platforms/android/MediaCodecDataDecoder.h b/dom/media/platforms/android/MediaCodecDataDecoder.h deleted file mode 100644 index 0db6407bfb..0000000000 --- a/dom/media/platforms/android/MediaCodecDataDecoder.h +++ /dev/null @@ -1,126 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifndef MediaCodecDataDecoder_h_ -#define MediaCodecDataDecoder_h_ - -#include "AndroidDecoderModule.h" - -#include "MediaCodec.h" -#include "SurfaceTexture.h" -#include "TimeUnits.h" -#include "mozilla/Monitor.h" -#include "mozilla/Maybe.h" - -#include - -namespace mozilla { - -typedef std::deque> SampleQueue; - -class MediaCodecDataDecoder : public MediaDataDecoder { -public: - static MediaDataDecoder* CreateAudioDecoder(const AudioInfo& aConfig, - java::sdk::MediaFormat::Param aFormat, - MediaDataDecoderCallback* aCallback); - - static MediaDataDecoder* CreateVideoDecoder(const VideoInfo& aConfig, - java::sdk::MediaFormat::Param aFormat, - MediaDataDecoderCallback* aCallback, - layers::ImageContainer* aImageContainer); - - virtual ~MediaCodecDataDecoder(); - - RefPtr Init() override; - void Flush() override; - void Drain() override; - void Shutdown() override; - void Input(MediaRawData* aSample) override; - const char* GetDescriptionName() const override - { - return "Android MediaCodec decoder"; - } - -protected: - enum class ModuleState : uint8_t { - kDecoding = 0, - kFlushing, - kDrainQueue, - kDrainDecoder, - kDrainWaitEOS, - kStopping, - kShutdown - }; - - friend class AndroidDecoderModule; - - MediaCodecDataDecoder(MediaData::Type aType, - const nsACString& aMimeType, - java::sdk::MediaFormat::Param aFormat, - MediaDataDecoderCallback* aCallback); - - static const char* ModuleStateStr(ModuleState aState); - - virtual nsresult InitDecoder(java::sdk::Surface::Param aSurface); - - virtual nsresult Output(java::sdk::BufferInfo::Param aInfo, void* aBuffer, - java::sdk::MediaFormat::Param aFormat, const media::TimeUnit& aDuration) - { - return NS_OK; - } - - virtual nsresult PostOutput(java::sdk::BufferInfo::Param aInfo, - java::sdk::MediaFormat::Param aFormat, const media::TimeUnit& aDuration) - { - return NS_OK; - } - - virtual void Cleanup() {}; - - nsresult ResetInputBuffers(); - nsresult ResetOutputBuffers(); - - nsresult GetInputBuffer(JNIEnv* env, int index, jni::Object::LocalRef* buffer); - bool WaitForInput(); - already_AddRefed PeekNextSample(); - nsresult QueueSample(const MediaRawData* aSample); - nsresult QueueEOS(); - void HandleEOS(int32_t aOutputStatus); - Maybe GetOutputDuration(); - nsresult ProcessOutput(java::sdk::BufferInfo::Param aInfo, - java::sdk::MediaFormat::Param aFormat, - int32_t aStatus); - // Sets decoder state and returns whether the new state has become effective. - bool SetState(ModuleState aState); - void DecoderLoop(); - - virtual void ClearQueue(); - - MediaData::Type mType; - - nsAutoCString mMimeType; - java::sdk::MediaFormat::GlobalRef mFormat; - - MediaDataDecoderCallback* mCallback; - - java::sdk::MediaCodec::GlobalRef mDecoder; - - jni::ObjectArray::GlobalRef mInputBuffers; - jni::ObjectArray::GlobalRef mOutputBuffers; - - nsCOMPtr mThread; - - // Only these members are protected by mMonitor. - Monitor mMonitor; - - ModuleState mState; - - SampleQueue mQueue; - // Durations are stored in microseconds. - std::deque mDurations; -}; - -} // namespace mozilla - -#endif diff --git a/dom/media/platforms/android/RemoteDataDecoder.cpp b/dom/media/platforms/android/RemoteDataDecoder.cpp deleted file mode 100644 index 56af2601fc..0000000000 --- a/dom/media/platforms/android/RemoteDataDecoder.cpp +++ /dev/null @@ -1,489 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "AndroidDecoderModule.h" -#include "AndroidBridge.h" -#include "AndroidSurfaceTexture.h" -#include "FennecJNINatives.h" -#include "GLImages.h" - -#include "MediaData.h" -#include "MediaInfo.h" -#include "VideoUtils.h" -#include "VPXDecoder.h" - -#include "nsThreadUtils.h" -#include "nsPromiseFlatString.h" -#include "nsIGfxInfo.h" - -#include "prlog.h" - -#include - -#include - -#undef LOG -#define LOG(arg, ...) MOZ_LOG(sAndroidDecoderModuleLog, \ - mozilla::LogLevel::Debug, ("RemoteDataDecoder(%p)::%s: " arg, \ - this, __func__, ##__VA_ARGS__)) - -using namespace mozilla; -using namespace mozilla::gl; -using namespace mozilla::java; -using namespace mozilla::java::sdk; -using media::TimeUnit; - -namespace mozilla { - -class JavaCallbacksSupport - : public CodecProxy::NativeCallbacks::Natives -{ -public: - typedef CodecProxy::NativeCallbacks::Natives Base; - using Base::AttachNative; - - JavaCallbacksSupport(MediaDataDecoderCallback* aDecoderCallback) - : mDecoderCallback(aDecoderCallback) - { - MOZ_ASSERT(aDecoderCallback); - } - - virtual ~JavaCallbacksSupport() {} - - void OnInputExhausted() - { - if (mDecoderCallback) { - mDecoderCallback->InputExhausted(); - } - } - - virtual void HandleOutput(Sample::Param aSample) = 0; - - void OnOutput(jni::Object::Param aSample) - { - if (mDecoderCallback) { - HandleOutput(Sample::Ref::From(aSample)); - } - } - - virtual void HandleOutputFormatChanged(MediaFormat::Param aFormat) {}; - - void OnOutputFormatChanged(jni::Object::Param aFormat) - { - if (mDecoderCallback) { - HandleOutputFormatChanged(MediaFormat::Ref::From(aFormat)); - } - } - - void OnError(bool aIsFatal) - { - if (mDecoderCallback) { - mDecoderCallback->Error(aIsFatal ? - MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__) : - MediaResult(NS_ERROR_DOM_MEDIA_DECODE_ERR, __func__)); - } - } - - void DisposeNative() - { - // TODO - } - - void Cancel() - { - mDecoderCallback = nullptr; - } - -protected: - MediaDataDecoderCallback* mDecoderCallback; -}; - -struct SampleTime final -{ - SampleTime(int64_t aStart, int64_t aDuration) - : mStart(aStart) - , mDuration(aDuration) - {} - - int64_t mStart; - int64_t mDuration; -}; - - -class RemoteVideoDecoder final : public RemoteDataDecoder -{ -public: - class CallbacksSupport final : public JavaCallbacksSupport - { - public: - CallbacksSupport(RemoteVideoDecoder* aDecoder, MediaDataDecoderCallback* aCallback) - : JavaCallbacksSupport(aCallback) - , mDecoder(aDecoder) - {} - - virtual ~CallbacksSupport() {} - - void HandleOutput(Sample::Param aSample) override - { - Maybe durationUs = mDecoder->mInputDurations.Get(); - if (!durationUs) { - return; - } - - BufferInfo::LocalRef info = aSample->Info(); - - int32_t flags; - bool ok = NS_SUCCEEDED(info->Flags(&flags)); - MOZ_ASSERT(ok); - - int32_t offset; - ok |= NS_SUCCEEDED(info->Offset(&offset)); - MOZ_ASSERT(ok); - - int64_t presentationTimeUs; - ok |= NS_SUCCEEDED(info->PresentationTimeUs(&presentationTimeUs)); - MOZ_ASSERT(ok); - - int32_t size; - ok |= NS_SUCCEEDED(info->Size(&size)); - MOZ_ASSERT(ok); - - NS_ENSURE_TRUE_VOID(ok); - - if (size > 0) { - RefPtr img = - new SurfaceTextureImage(mDecoder->mSurfaceTexture.get(), mDecoder->mConfig.mDisplay, - gl::OriginPos::BottomLeft); - - RefPtr v = - VideoData::CreateFromImage(mDecoder->mConfig, - offset, - presentationTimeUs, - durationUs.value(), - img, - !!(flags & MediaCodec::BUFFER_FLAG_SYNC_FRAME), - presentationTimeUs, - gfx::IntRect(0, 0, - mDecoder->mConfig.mDisplay.width, - mDecoder->mConfig.mDisplay.height)); - - mDecoderCallback->Output(v); - } - - if ((flags & MediaCodec::BUFFER_FLAG_END_OF_STREAM) != 0) { - mDecoderCallback->DrainComplete(); - } - } - - friend class RemoteDataDecoder; - - private: - RemoteVideoDecoder* mDecoder; - }; - - RemoteVideoDecoder(const VideoInfo& aConfig, - MediaFormat::Param aFormat, - MediaDataDecoderCallback* aCallback, - layers::ImageContainer* aImageContainer) - : RemoteDataDecoder(MediaData::Type::VIDEO_DATA, aConfig.mMimeType, - aFormat, aCallback) - , mImageContainer(aImageContainer) - , mConfig(aConfig) - { - } - - RefPtr Init() override - { - mSurfaceTexture = AndroidSurfaceTexture::Create(); - if (!mSurfaceTexture) { - NS_WARNING("Failed to create SurfaceTexture for video decode\n"); - return InitPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__); - } - - if (!jni::IsFennec()) { - NS_WARNING("Remote decoding not supported in non-Fennec environment\n"); - return InitPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__); - } - - // Register native methods. - JavaCallbacksSupport::Init(); - - mJavaCallbacks = CodecProxy::NativeCallbacks::New(); - JavaCallbacksSupport::AttachNative(mJavaCallbacks, - mozilla::MakeUnique(this, mCallback)); - - mJavaDecoder = CodecProxy::Create(mFormat, mSurfaceTexture->JavaSurface(), mJavaCallbacks); - if (mJavaDecoder == nullptr) { - return InitPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__); - } - - mInputDurations.Clear(); - - return InitPromise::CreateAndResolve(TrackInfo::kVideoTrack, __func__); - } - - void Flush() override - { - mInputDurations.Clear(); - RemoteDataDecoder::Flush(); - } - - void Drain() override - { - RemoteDataDecoder::Drain(); - mInputDurations.Put(0); - } - - void Input(MediaRawData* aSample) override - { - RemoteDataDecoder::Input(aSample); - mInputDurations.Put(aSample->mDuration); - } - -private: - class DurationQueue { - public: - - void Clear() - { - mValues.clear(); - } - - void Put(int64_t aDurationUs) - { - mValues.emplace_back(aDurationUs); - } - - Maybe Get() - { - if (mValues.empty()) { - return Nothing(); - } - - auto value = Some(mValues.front()); - mValues.pop_front(); - - return value; - } - - private: - std::deque mValues; - }; - - layers::ImageContainer* mImageContainer; - const VideoInfo& mConfig; - RefPtr mSurfaceTexture; - DurationQueue mInputDurations; -}; - -class RemoteAudioDecoder final : public RemoteDataDecoder -{ -public: - RemoteAudioDecoder(const AudioInfo& aConfig, - MediaFormat::Param aFormat, - MediaDataDecoderCallback* aCallback) - : RemoteDataDecoder(MediaData::Type::AUDIO_DATA, aConfig.mMimeType, - aFormat, aCallback) - , mConfig(aConfig) - { - JNIEnv* const env = jni::GetEnvForThread(); - - bool formatHasCSD = false; - NS_ENSURE_SUCCESS_VOID(aFormat->ContainsKey(NS_LITERAL_STRING("csd-0"), &formatHasCSD)); - - if (!formatHasCSD && aConfig.mCodecSpecificConfig->Length() >= 2) { - jni::ByteBuffer::LocalRef buffer(env); - buffer = jni::ByteBuffer::New( - aConfig.mCodecSpecificConfig->Elements(), - aConfig.mCodecSpecificConfig->Length()); - NS_ENSURE_SUCCESS_VOID(aFormat->SetByteBuffer(NS_LITERAL_STRING("csd-0"), - buffer)); - } - } - - RefPtr Init() override - { - // Register native methods. - JavaCallbacksSupport::Init(); - - mJavaCallbacks = CodecProxy::NativeCallbacks::New(); - JavaCallbacksSupport::AttachNative(mJavaCallbacks, - mozilla::MakeUnique(this, mCallback)); - - mJavaDecoder = CodecProxy::Create(mFormat, nullptr, mJavaCallbacks); - if (mJavaDecoder == nullptr) { - return InitPromise::CreateAndReject(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__); - } - - return InitPromise::CreateAndResolve(TrackInfo::kAudioTrack, __func__); - } - -private: - class CallbacksSupport final : public JavaCallbacksSupport - { - public: - CallbacksSupport(RemoteAudioDecoder* aDecoder, MediaDataDecoderCallback* aCallback) - : JavaCallbacksSupport(aCallback) - , mDecoder(aDecoder) - {} - - virtual ~CallbacksSupport() {} - - void HandleOutput(Sample::Param aSample) override - { - BufferInfo::LocalRef info = aSample->Info(); - - int32_t flags; - bool ok = NS_SUCCEEDED(info->Flags(&flags)); - MOZ_ASSERT(ok); - - int32_t offset; - ok |= NS_SUCCEEDED(info->Offset(&offset)); - MOZ_ASSERT(ok); - - int64_t presentationTimeUs; - ok |= NS_SUCCEEDED(info->PresentationTimeUs(&presentationTimeUs)); - MOZ_ASSERT(ok); - - int32_t size; - ok |= NS_SUCCEEDED(info->Size(&size)); - MOZ_ASSERT(ok); - - NS_ENSURE_TRUE_VOID(ok); - - if (size > 0) { -#ifdef MOZ_SAMPLE_TYPE_S16 - const int32_t numSamples = size / 2; -#else -#error We only support 16-bit integer PCM -#endif - - const int32_t numFrames = numSamples / mOutputChannels; - AlignedAudioBuffer audio(numSamples); - if (!audio) { - return; - } - - jni::ByteBuffer::LocalRef dest = jni::ByteBuffer::New(audio.get(), size); - aSample->WriteToByteBuffer(dest); - - RefPtr data = new AudioData(0, presentationTimeUs, - FramesToUsecs(numFrames, mOutputSampleRate).value(), - numFrames, - Move(audio), - mOutputChannels, - mOutputSampleRate); - - mDecoderCallback->Output(data); - } - - if ((flags & MediaCodec::BUFFER_FLAG_END_OF_STREAM) != 0) { - mDecoderCallback->DrainComplete(); - return; - } - } - - void HandleOutputFormatChanged(MediaFormat::Param aFormat) override - { - aFormat->GetInteger(NS_LITERAL_STRING("channel-count"), &mOutputChannels); - AudioConfig::ChannelLayout layout(mOutputChannels); - if (!layout.IsValid()) { - mDecoderCallback->Error(MediaResult( - NS_ERROR_DOM_MEDIA_FATAL_ERR, - RESULT_DETAIL("Invalid channel layout:%d", mOutputChannels))); - return; - } - aFormat->GetInteger(NS_LITERAL_STRING("sample-rate"), &mOutputSampleRate); - LOG("Audio output format changed: channels:%d sample rate:%d", mOutputChannels, mOutputSampleRate); - } - - private: - RemoteAudioDecoder* mDecoder; - int32_t mOutputChannels; - int32_t mOutputSampleRate; - }; - - const AudioInfo& mConfig; -}; - -MediaDataDecoder* -RemoteDataDecoder::CreateAudioDecoder(const AudioInfo& aConfig, - MediaFormat::Param aFormat, - MediaDataDecoderCallback* aCallback) -{ - return new RemoteAudioDecoder(aConfig, aFormat, aCallback); -} - -MediaDataDecoder* -RemoteDataDecoder::CreateVideoDecoder(const VideoInfo& aConfig, - MediaFormat::Param aFormat, - MediaDataDecoderCallback* aCallback, - layers::ImageContainer* aImageContainer) -{ - return new RemoteVideoDecoder(aConfig, aFormat, aCallback, aImageContainer); -} - -RemoteDataDecoder::RemoteDataDecoder(MediaData::Type aType, - const nsACString& aMimeType, - MediaFormat::Param aFormat, - MediaDataDecoderCallback* aCallback) - : mType(aType) - , mMimeType(aMimeType) - , mFormat(aFormat) - , mCallback(aCallback) -{ -} - -void -RemoteDataDecoder::Flush() -{ - mJavaDecoder->Flush(); -} - -void -RemoteDataDecoder::Drain() -{ - BufferInfo::LocalRef bufferInfo; - nsresult rv = BufferInfo::New(&bufferInfo); - NS_ENSURE_SUCCESS_VOID(rv); - bufferInfo->Set(0, 0, -1, MediaCodec::BUFFER_FLAG_END_OF_STREAM); - - mJavaDecoder->Input(nullptr, bufferInfo, nullptr); -} - -void -RemoteDataDecoder::Shutdown() -{ - LOG(""); - MOZ_ASSERT(mJavaDecoder && mJavaCallbacks); - - mJavaDecoder->Release(); - mJavaDecoder = nullptr; - - JavaCallbacksSupport::GetNative(mJavaCallbacks)->Cancel(); - mJavaCallbacks = nullptr; - - mFormat = nullptr; -} - -void -RemoteDataDecoder::Input(MediaRawData* aSample) -{ - MOZ_ASSERT(aSample != nullptr); - - jni::ByteBuffer::LocalRef bytes = jni::ByteBuffer::New(const_cast(aSample->Data()), - aSample->Size()); - - BufferInfo::LocalRef bufferInfo; - nsresult rv = BufferInfo::New(&bufferInfo); - if (NS_FAILED(rv)) { - mCallback->Error(MediaResult(NS_ERROR_OUT_OF_MEMORY, __func__)); - return; - } - bufferInfo->Set(0, aSample->Size(), aSample->mTime, 0); - - mJavaDecoder->Input(bytes, bufferInfo, GetCryptoInfoFromSample(aSample)); -} - -} // mozilla diff --git a/dom/media/platforms/android/RemoteDataDecoder.h b/dom/media/platforms/android/RemoteDataDecoder.h deleted file mode 100644 index 219539a0ac..0000000000 --- a/dom/media/platforms/android/RemoteDataDecoder.h +++ /dev/null @@ -1,62 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifndef RemoteDataDecoder_h_ -#define RemoteDataDecoder_h_ - -#include "AndroidDecoderModule.h" - -#include "FennecJNIWrappers.h" - -#include "SurfaceTexture.h" -#include "TimeUnits.h" -#include "mozilla/Monitor.h" -#include "mozilla/Maybe.h" - -#include - -namespace mozilla { - -class RemoteDataDecoder : public MediaDataDecoder { -public: - static MediaDataDecoder* CreateAudioDecoder(const AudioInfo& aConfig, - java::sdk::MediaFormat::Param aFormat, - MediaDataDecoderCallback* aCallback); - - static MediaDataDecoder* CreateVideoDecoder(const VideoInfo& aConfig, - java::sdk::MediaFormat::Param aFormat, - MediaDataDecoderCallback* aCallback, - layers::ImageContainer* aImageContainer); - - virtual ~RemoteDataDecoder() {} - - void Flush() override; - void Drain() override; - void Shutdown() override; - void Input(MediaRawData* aSample) override; - const char* GetDescriptionName() const override - { - return "android remote decoder"; - } - -protected: - RemoteDataDecoder(MediaData::Type aType, - const nsACString& aMimeType, - java::sdk::MediaFormat::Param aFormat, - MediaDataDecoderCallback* aCallback); - - MediaData::Type mType; - - nsAutoCString mMimeType; - java::sdk::MediaFormat::GlobalRef mFormat; - - MediaDataDecoderCallback* mCallback; - - java::CodecProxy::GlobalRef mJavaDecoder; - java::CodecProxy::NativeCallbacks::GlobalRef mJavaCallbacks; -}; - -} // namespace mozilla - -#endif diff --git a/dom/media/platforms/moz.build b/dom/media/platforms/moz.build index 75efbe6b4c..1a5933acf5 100644 --- a/dom/media/platforms/moz.build +++ b/dom/media/platforms/moz.build @@ -78,16 +78,6 @@ if CONFIG['MOZ_APPLEMEDIA']: include('/ipc/chromium/chromium-config.mozbuild') -if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': - EXPORTS += [ - 'android/AndroidDecoderModule.h', - ] - SOURCES += [ - 'android/AndroidDecoderModule.cpp', - 'android/MediaCodecDataDecoder.cpp', - 'android/RemoteDataDecoder.cpp', - ] - FINAL_LIBRARY = 'xul' if CONFIG['GNU_CXX']: diff --git a/gfx/2d/Logging.h b/gfx/2d/Logging.h index e6be2a7e83..534ee3d400 100644 --- a/gfx/2d/Logging.h +++ b/gfx/2d/Logging.h @@ -16,9 +16,6 @@ #endif #include "mozilla/Tuple.h" -#if defined(MOZ_WIDGET_ANDROID) -#include "nsDebug.h" -#endif #include "Point.h" #include "BaseRect.h" #include "Matrix.h" @@ -141,9 +138,6 @@ struct BasicLogger // in the appropriate places in that method. static bool ShouldOutputMessage(int aLevel) { if (LoggingPrefs::sGfxLogLevel >= aLevel) { -#if defined(MOZ_WIDGET_ANDROID) - return true; -#else #if defined(MOZ_LOGGING) if (MOZ_LOG_TEST(GetGFX2DLog(), PRLogLevelForLevel(aLevel))) { return true; @@ -153,7 +147,6 @@ struct BasicLogger (aLevel < LOG_DEBUG)) { return true; } -#endif } return false; } @@ -174,9 +167,6 @@ struct BasicLogger // make the corresponding change in the ShouldOutputMessage method // above. if (LoggingPrefs::sGfxLogLevel >= aLevel) { -#if defined(MOZ_WIDGET_ANDROID) - printf_stderr("%s%s", aString.c_str(), aNoNewline ? "" : "\n"); -#else #if defined(MOZ_LOGGING) if (MOZ_LOG_TEST(GetGFX2DLog(), PRLogLevelForLevel(aLevel))) { PR_LogPrint("%s%s", aString.c_str(), aNoNewline ? "" : "\n"); @@ -186,7 +176,6 @@ struct BasicLogger (aLevel < LOG_DEBUG)) { printf("%s%s", aString.c_str(), aNoNewline ? "" : "\n"); } -#endif } } }; diff --git a/gfx/2d/image_operations.cpp b/gfx/2d/image_operations.cpp index 79fa879d93..e9492a150e 100644 --- a/gfx/2d/image_operations.cpp +++ b/gfx/2d/image_operations.cpp @@ -303,7 +303,7 @@ SkBitmap ImageOperations::ResizeSubpixel(const SkBitmap& source, return result; #else return SkBitmap(); -#endif // OS_POSIX && !OS_MACOSX && !defined(OS_ANDROID) +#endif // OS_POSIX && !OS_MACOSX } // static diff --git a/gfx/2d/moz.build b/gfx/2d/moz.build index e1742f93d9..4f437d575a 100644 --- a/gfx/2d/moz.build +++ b/gfx/2d/moz.build @@ -201,12 +201,12 @@ FINAL_LIBRARY = 'xul' for var in ('USE_CAIRO', 'MOZ2D_HAS_MOZ_CAIRO'): DEFINES[var] = True -if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3'): +if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'): DEFINES['MOZ_ENABLE_FREETYPE'] = True CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] -if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3'): +if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3'): CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS'] LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES'] diff --git a/gfx/cairo/cairo/src/moz.build b/gfx/cairo/cairo/src/moz.build index a86e62c544..c5f936ad6b 100644 --- a/gfx/cairo/cairo/src/moz.build +++ b/gfx/cairo/cairo/src/moz.build @@ -242,11 +242,6 @@ if CONFIG['CLANG_CL']: '-Wno-unused-variable', ] -# See bug 386897. -if CONFIG['GNU_CC'] and CONFIG['OS_TARGET'] == 'Android' and CONFIG['MOZ_OPTIMIZE']: - CFLAGS += ['-O2'] - CXXFLAGS += ['-O2'] - if CONFIG['MOZ_X11']: CFLAGS += CONFIG['XCFLAGS'] diff --git a/gfx/cairo/libpixman/src/moz.build b/gfx/cairo/libpixman/src/moz.build index 69ad66ae4f..055b3dcf23 100644 --- a/gfx/cairo/libpixman/src/moz.build +++ b/gfx/cairo/libpixman/src/moz.build @@ -156,7 +156,3 @@ if CONFIG['CLANG_CL']: CFLAGS += [ '-Wno-unused-variable', ] - -# See bug 386897. -if CONFIG['OS_TARGET'] == 'Android' and CONFIG['MOZ_OPTIMIZE']: - CFLAGS += ['-O2'] diff --git a/gfx/gl/AndroidSurfaceTexture.cpp b/gfx/gl/AndroidSurfaceTexture.cpp deleted file mode 100644 index 3c8c81974a..0000000000 --- a/gfx/gl/AndroidSurfaceTexture.cpp +++ /dev/null @@ -1,260 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -// vim:set ts=2 sts=2 sw=2 et cin: -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifdef MOZ_WIDGET_ANDROID - -#include -#include -#include -#include "AndroidSurfaceTexture.h" -#include "gfxImageSurface.h" -#include "gfxPrefs.h" -#include "AndroidBridge.h" -#include "nsThreadUtils.h" -#include "mozilla/gfx/Matrix.h" -#include "GeneratedJNINatives.h" -#include "GLContext.h" - -using namespace mozilla; - -namespace mozilla { -namespace gl { - -class AndroidSurfaceTexture::Listener - : public java::SurfaceTextureListener::Natives -{ - using Base = java::SurfaceTextureListener::Natives; - - const nsCOMPtr mCallback; - -public: - using Base::AttachNative; - using Base::DisposeNative; - - Listener(nsIRunnable* aCallback) : mCallback(aCallback) {} - - void OnFrameAvailable() - { - if (NS_IsMainThread()) { - mCallback->Run(); - return; - } - NS_DispatchToMainThread(mCallback); - } -}; - -already_AddRefed -AndroidSurfaceTexture::Create() -{ - return Create(nullptr, 0); -} - -already_AddRefed -AndroidSurfaceTexture::Create(GLContext* aContext, GLuint aTexture) -{ - RefPtr st = new AndroidSurfaceTexture(); - if (!st->Init(aContext, aTexture)) { - printf_stderr("Failed to initialize AndroidSurfaceTexture"); - st = nullptr; - } - - return st.forget(); -} - -nsresult -AndroidSurfaceTexture::Attach(GLContext* aContext, PRIntervalTime aTimeout) -{ - MonitorAutoLock lock(mMonitor); - - if (mAttachedContext == aContext) { - NS_WARNING("Tried to attach same GLContext to AndroidSurfaceTexture"); - return NS_OK; - } - - if (!CanDetach()) { - return NS_ERROR_NOT_AVAILABLE; - } - - while (mAttachedContext) { - // Wait until it's detached (or we time out) - if (NS_FAILED(lock.Wait(aTimeout))) { - return NS_ERROR_NOT_AVAILABLE; - } - } - - MOZ_ASSERT(aContext->IsOwningThreadCurrent(), "Trying to attach GLContext from different thread"); - - aContext->fGenTextures(1, &mTexture); - - if (NS_FAILED(mSurfaceTexture->AttachToGLContext(mTexture))) { - return NS_ERROR_NOT_AVAILABLE; - } - mAttachedContext = aContext; - mAttachedContext->MakeCurrent(); - - return NS_OK; -} - -nsresult -AndroidSurfaceTexture::Detach() -{ - MonitorAutoLock lock(mMonitor); - - if (!CanDetach() || - !mAttachedContext || - !mAttachedContext->IsOwningThreadCurrent()) - { - return NS_ERROR_FAILURE; - } - - mAttachedContext->MakeCurrent(); - - mSurfaceTexture->DetachFromGLContext(); - - mTexture = 0; - mAttachedContext = nullptr; - lock.NotifyAll(); - return NS_OK; -} - -bool -AndroidSurfaceTexture::CanDetach() const -{ - // The API for attach/detach only exists on 16+, and PowerVR has some sort of - // fencing issue. Additionally, attach/detach seems to be busted on at least - // some Mali adapters (400MP2 for sure, bug 1131793) - return AndroidBridge::Bridge()->GetAPIVersion() >= 16 && - (!mAttachedContext || mAttachedContext->Vendor() != GLVendor::Imagination) && - (!mAttachedContext || mAttachedContext->Vendor() != GLVendor::ARM /* Mali */) && - gfxPrefs::SurfaceTextureDetachEnabled(); -} - -bool -AndroidSurfaceTexture::Init(GLContext* aContext, GLuint aTexture) -{ - - if (!aTexture && !CanDetach()) { - // We have no texture and cannot initialize detached, bail out - return false; - } - - if (NS_WARN_IF(NS_FAILED( - java::sdk::SurfaceTexture::New(aTexture, ReturnTo(&mSurfaceTexture))))) { - return false; - } - - if (!aTexture) { - mSurfaceTexture->DetachFromGLContext(); - } - - mAttachedContext = aContext; - - if (NS_WARN_IF(NS_FAILED( - java::sdk::Surface::New(mSurfaceTexture, ReturnTo(&mSurface))))) { - return false; - } - - mNativeWindow = ANativeWindow_fromSurface(jni::GetEnvForThread(), - mSurface.Get()); - MOZ_ASSERT(mNativeWindow, "Failed to create native window from surface"); - - return true; -} - -AndroidSurfaceTexture::AndroidSurfaceTexture() - : mTexture(0) - , mSurfaceTexture() - , mSurface() - , mAttachedContext(nullptr) - , mMonitor("AndroidSurfaceTexture") -{ -} - -AndroidSurfaceTexture::~AndroidSurfaceTexture() -{ - if (mSurfaceTexture) { - SetFrameAvailableCallback(nullptr); - mSurfaceTexture = nullptr; - } - - if (mNativeWindow) { - ANativeWindow_release(mNativeWindow); - mNativeWindow = nullptr; - } -} - -void -AndroidSurfaceTexture::UpdateTexImage() -{ - mSurfaceTexture->UpdateTexImage(); -} - -void -AndroidSurfaceTexture::GetTransformMatrix(gfx::Matrix4x4& aMatrix) const -{ - JNIEnv* const env = jni::GetEnvForThread(); - - auto jarray = jni::FloatArray::LocalRef::Adopt(env, env->NewFloatArray(16)); - mSurfaceTexture->GetTransformMatrix(jarray); - - jfloat* array = env->GetFloatArrayElements(jarray.Get(), nullptr); - - aMatrix._11 = array[0]; - aMatrix._12 = array[1]; - aMatrix._13 = array[2]; - aMatrix._14 = array[3]; - - aMatrix._21 = array[4]; - aMatrix._22 = array[5]; - aMatrix._23 = array[6]; - aMatrix._24 = array[7]; - - aMatrix._31 = array[8]; - aMatrix._32 = array[9]; - aMatrix._33 = array[10]; - aMatrix._34 = array[11]; - - aMatrix._41 = array[12]; - aMatrix._42 = array[13]; - aMatrix._43 = array[14]; - aMatrix._44 = array[15]; - - env->ReleaseFloatArrayElements(jarray.Get(), array, 0); -} - -void -AndroidSurfaceTexture::SetFrameAvailableCallback(nsIRunnable* aRunnable) -{ - java::SurfaceTextureListener::LocalRef newListener; - - if (aRunnable) { - newListener = java::SurfaceTextureListener::New(); - Listener::AttachNative(newListener, MakeUnique(aRunnable)); - } - - if (aRunnable || mListener) { - MOZ_ALWAYS_TRUE(NS_SUCCEEDED( - mSurfaceTexture->SetOnFrameAvailableListener(newListener))); - } - - if (mListener) { - Listener::DisposeNative(java::SurfaceTextureListener::LocalRef( - newListener.Env(), mListener)); - } - - mListener = newListener; -} - -void -AndroidSurfaceTexture::SetDefaultSize(mozilla::gfx::IntSize size) -{ - mSurfaceTexture->SetDefaultBufferSize(size.width, size.height); -} - -} // gl -} // mozilla - -#endif // MOZ_WIDGET_ANDROID diff --git a/gfx/gl/AndroidSurfaceTexture.h b/gfx/gl/AndroidSurfaceTexture.h deleted file mode 100644 index 056fab3263..0000000000 --- a/gfx/gl/AndroidSurfaceTexture.h +++ /dev/null @@ -1,107 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -// vim:set ts=2 sts=2 sw=2 et cin: -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifndef AndroidSurfaceTexture_h__ -#define AndroidSurfaceTexture_h__ -#ifdef MOZ_WIDGET_ANDROID - -#include -#include -#include "nsIRunnable.h" -#include "gfxPlatform.h" -#include "GLDefs.h" -#include "mozilla/gfx/2D.h" -#include "mozilla/gfx/MatrixFwd.h" -#include "mozilla/Monitor.h" - -#include "GeneratedJNIWrappers.h" -#include "SurfaceTexture.h" - -namespace mozilla { -namespace gl { - -class GLContext; - -/** - * This class is a wrapper around Android's SurfaceTexture class. - * Usage is pretty much exactly like the Java class, so see - * the Android documentation for details. - */ -class AndroidSurfaceTexture { - NS_INLINE_DECL_THREADSAFE_REFCOUNTING(AndroidSurfaceTexture) - -public: - - // The SurfaceTexture is created in an attached state. This method requires - // Android Ice Cream Sandwich. - static already_AddRefed Create(GLContext* aGLContext, GLuint aTexture); - - // Here the SurfaceTexture will be created in a detached state. You must call - // Attach() with the GLContext you wish to composite with. It must be done - // on the thread where that GLContext is current. This method requires - // Android Jelly Bean. - static already_AddRefed Create(); - - // If we are on Jelly Bean, the SurfaceTexture can be detached and reattached - // to allow consumption from different GLContexts. It is recommended to only - // attach while you are consuming in order to allow this. - // - // Only one GLContext may be attached at any given time. If another is already - // attached, we try to wait for it to become detached. - nsresult Attach(GLContext* aContext, PRIntervalTime aTiemout = PR_INTERVAL_NO_TIMEOUT); - - nsresult Detach(); - - // Ability to detach is based on API version (16+), and we also block PowerVR - // since it has some type of fencing problem. Bug 1100126. - bool CanDetach() const; - - GLContext* AttachedContext() const { return mAttachedContext; } - - ANativeWindow* NativeWindow() const { - return mNativeWindow; - } - - // This attaches the updated data to the TEXTURE_EXTERNAL target - void UpdateTexImage(); - - void GetTransformMatrix(mozilla::gfx::Matrix4x4& aMatrix) const; - - void SetDefaultSize(mozilla::gfx::IntSize size); - - // The callback is guaranteed to be called on the main thread even - // if the upstream callback is received on a different thread - void SetFrameAvailableCallback(nsIRunnable* aRunnable); - - GLuint Texture() const { return mTexture; } - const java::sdk::Surface::Ref& JavaSurface() const { return mSurface; } - -private: - class Listener; - - AndroidSurfaceTexture(); - ~AndroidSurfaceTexture(); - - bool Init(GLContext* aContext, GLuint aTexture); - - GLuint mTexture; - java::sdk::SurfaceTexture::GlobalRef mSurfaceTexture; - java::sdk::Surface::GlobalRef mSurface; - java::SurfaceTextureListener::GlobalRef mListener; - - GLContext* mAttachedContext; - - ANativeWindow* mNativeWindow; - - Monitor mMonitor; -}; - -} -} - - -#endif -#endif diff --git a/gfx/gl/GLBlitHelper.cpp b/gfx/gl/GLBlitHelper.cpp index d59cea8636..da7f5b462d 100644 --- a/gfx/gl/GLBlitHelper.cpp +++ b/gfx/gl/GLBlitHelper.cpp @@ -14,12 +14,6 @@ #include "mozilla/gfx/Matrix.h" #include "mozilla/UniquePtr.h" -#ifdef MOZ_WIDGET_ANDROID -#include "AndroidSurfaceTexture.h" -#include "GLImages.h" -#include "GLLibraryEGL.h" -#endif - #ifdef XP_MACOSX #include "MacIOSurfaceImage.h" #include "GLContextCGL.h" @@ -146,26 +140,6 @@ GLBlitHelper::InitTexQuadProgram(BlitType target) vTexCoord * uTexCoordMult); \n\ } \n\ "; -#ifdef ANDROID /* MOZ_WIDGET_ANDROID */ - const char kTexExternalBlit_FragShaderSource[] = "\ - #version 100 \n\ - #extension GL_OES_EGL_image_external : require \n\ - #ifdef GL_FRAGMENT_PRECISION_HIGH \n\ - precision highp float; \n\ - #else \n\ - precision mediump float; \n\ - #endif \n\ - varying vec2 vTexCoord; \n\ - uniform mat4 uTextureTransform; \n\ - uniform samplerExternalOES uTexUnit; \n\ - \n\ - void main() \n\ - { \n\ - gl_FragColor = texture2D(uTexUnit, \n\ - (uTextureTransform * vec4(vTexCoord, 0.0, 1.0)).xy); \n\ - } \n\ - "; -#endif /* From Rec601: [R] [1.1643835616438356, 0.0, 1.5960267857142858] [ Y - 16] [G] = [1.1643835616438358, -0.3917622900949137, -0.8129676472377708] x [Cb - 128] @@ -257,14 +231,6 @@ GLBlitHelper::InitTexQuadProgram(BlitType target) fragShaderPtr = &mTex2DRectBlit_FragShader; fragShaderSource = kTex2DRectBlit_FragShaderSource; break; -#ifdef ANDROID - case ConvertSurfaceTexture: - case ConvertGralloc: - programPtr = &mTexExternalBlit_Program; - fragShaderPtr = &mTexExternalBlit_FragShader; - fragShaderSource = kTexExternalBlit_FragShaderSource; - break; -#endif case ConvertPlanarYCbCr: programPtr = &mTexYUVPlanarBlit_Program; fragShaderPtr = &mTexYUVPlanarBlit_FragShader; @@ -398,10 +364,6 @@ GLBlitHelper::InitTexQuadProgram(BlitType target) // Cache and set attribute and uniform mGL->fUseProgram(program); switch (target) { -#ifdef ANDROID - case ConvertSurfaceTexture: - case ConvertGralloc: -#endif case BlitTex2D: case BlitTexRect: case ConvertEGLImage: { @@ -678,67 +640,6 @@ GLBlitHelper::BindAndUploadEGLImage(EGLImage image, GLuint target) mGL->fEGLImageTargetTexture2D(target, image); } -#ifdef MOZ_WIDGET_ANDROID - -#define ATTACH_WAIT_MS 50 - -bool -GLBlitHelper::BlitSurfaceTextureImage(layers::SurfaceTextureImage* stImage) -{ - AndroidSurfaceTexture* surfaceTexture = stImage->GetSurfaceTexture(); - - ScopedBindTextureUnit boundTU(mGL, LOCAL_GL_TEXTURE0); - - if (NS_FAILED(surfaceTexture->Attach(mGL, PR_MillisecondsToInterval(ATTACH_WAIT_MS)))) - return false; - - // UpdateTexImage() changes the EXTERNAL binding, so save it here - // so we can restore it after. - int oldBinding = 0; - mGL->fGetIntegerv(LOCAL_GL_TEXTURE_BINDING_EXTERNAL, &oldBinding); - - surfaceTexture->UpdateTexImage(); - - gfx::Matrix4x4 transform; - surfaceTexture->GetTransformMatrix(transform); - - mGL->fUniformMatrix4fv(mTextureTransformLoc, 1, false, &transform._11); - mGL->fDrawArrays(LOCAL_GL_TRIANGLE_STRIP, 0, 4); - - surfaceTexture->Detach(); - - mGL->fBindTexture(LOCAL_GL_TEXTURE_EXTERNAL, oldBinding); - return true; -} - -bool -GLBlitHelper::BlitEGLImageImage(layers::EGLImageImage* image) -{ - EGLImage eglImage = image->GetImage(); - EGLSync eglSync = image->GetSync(); - - if (eglSync) { - EGLint status = sEGLLibrary.fClientWaitSync(EGL_DISPLAY(), eglSync, 0, LOCAL_EGL_FOREVER); - if (status != LOCAL_EGL_CONDITION_SATISFIED) { - return false; - } - } - - ScopedBindTextureUnit boundTU(mGL, LOCAL_GL_TEXTURE0); - - int oldBinding = 0; - mGL->fGetIntegerv(LOCAL_GL_TEXTURE_BINDING_2D, &oldBinding); - - BindAndUploadEGLImage(eglImage, LOCAL_GL_TEXTURE_2D); - - mGL->fDrawArrays(LOCAL_GL_TRIANGLE_STRIP, 0, 4); - - mGL->fBindTexture(LOCAL_GL_TEXTURE_2D, oldBinding); - return true; -} - -#endif - bool GLBlitHelper::BlitPlanarYCbCrImage(layers::PlanarYCbCrImage* yuvImage) { @@ -835,16 +736,6 @@ GLBlitHelper::BlitImageToFramebuffer(layers::Image* srcImage, srcOrigin = OriginPos::BottomLeft; break; -#ifdef MOZ_WIDGET_ANDROID - case ImageFormat::SURFACE_TEXTURE: - type = ConvertSurfaceTexture; - srcOrigin = srcImage->AsSurfaceTextureImage()->GetOriginPos(); - break; - case ImageFormat::EGLIMAGE: - type = ConvertEGLImage; - srcOrigin = srcImage->AsEGLImageImage()->GetOriginPos(); - break; -#endif #ifdef XP_MACOSX case ImageFormat::MAC_IOSURFACE: type = ConvertMacIOSurfaceImage; @@ -877,14 +768,6 @@ GLBlitHelper::BlitImageToFramebuffer(layers::Image* srcImage, return ret; } -#ifdef MOZ_WIDGET_ANDROID - case ConvertSurfaceTexture: - return BlitSurfaceTextureImage(static_cast(srcImage)); - - case ConvertEGLImage: - return BlitEGLImageImage(static_cast(srcImage)); -#endif - #ifdef XP_MACOSX case ConvertMacIOSurfaceImage: return BlitMacIOSurfaceImage(srcImage->AsMacIOSurfaceImage()); @@ -983,8 +866,7 @@ GLBlitHelper::BlitFramebufferToTexture(GLuint srcFB, GLuint destTex, GLenum destTarget, bool internalFBs) { - // On the Android 4.3 emulator, IsFramebuffer may return false incorrectly. - MOZ_ASSERT_IF(mGL->Renderer() != GLRenderer::AndroidEmulator, !srcFB || mGL->fIsFramebuffer(srcFB)); + MOZ_ASSERT(!srcFB || mGL->fIsFramebuffer(srcFB)); MOZ_ASSERT(mGL->fIsTexture(destTex)); if (mGL->IsSupported(GLFeature::framebuffer_blit)) { diff --git a/gfx/gl/GLBlitHelper.h b/gfx/gl/GLBlitHelper.h index b98c472331..c2858f5913 100644 --- a/gfx/gl/GLBlitHelper.h +++ b/gfx/gl/GLBlitHelper.h @@ -107,11 +107,6 @@ class GLBlitHelper final void BindAndUploadEGLImage(EGLImage image, GLuint target); bool BlitPlanarYCbCrImage(layers::PlanarYCbCrImage* yuvImage); -#ifdef MOZ_WIDGET_ANDROID - // Blit onto the current FB. - bool BlitSurfaceTextureImage(layers::SurfaceTextureImage* stImage); - bool BlitEGLImageImage(layers::EGLImageImage* eglImage); -#endif #ifdef XP_MACOSX bool BlitMacIOSurfaceImage(layers::MacIOSurfaceImage* ioImage); #endif diff --git a/gfx/gl/GLContext.cpp b/gfx/gl/GLContext.cpp index e81bb980c7..72a7bea58b 100644 --- a/gfx/gl/GLContext.cpp +++ b/gfx/gl/GLContext.cpp @@ -10,9 +10,6 @@ #include #include #include -#ifdef MOZ_WIDGET_ANDROID -#include -#endif #include "GLBlitHelper.h" #include "GLReadTexImageHelper.h" @@ -47,10 +44,6 @@ #include "nsCocoaFeatures.h" #endif -#ifdef MOZ_WIDGET_ANDROID -#include "AndroidBridge.h" -#endif - namespace mozilla { namespace gl { @@ -234,7 +227,7 @@ ParseGLSLVersion(GLContext* gl, uint32_t* out_version) } if (!versionString) { - // This happens on the Android emulators. We'll just return 100 + MOZ_ASSERT(false, "LOCAL_GL_SHADING_LANGUAGE_VERSION undefined, returning 100"); *out_version = 100; return true; } @@ -1056,28 +1049,6 @@ GLContext::InitWithPrefixImpl(const char* prefix, bool trygl) // prevents occasional driver crash. mNeedsFlushBeforeDeleteFB = true; } -#ifdef MOZ_WIDGET_ANDROID - if (mWorkAroundDriverBugs && - (Renderer() == GLRenderer::AdrenoTM305 || - Renderer() == GLRenderer::AdrenoTM320 || - Renderer() == GLRenderer::AdrenoTM330) && - AndroidBridge::Bridge()->GetAPIVersion() < 21) { - // Bug 1164027. Driver crashes when functions such as - // glTexImage2D fail due to virtual memory exhaustion. - mTextureAllocCrashesOnMapFailure = true; - } -#endif -#if MOZ_WIDGET_ANDROID - if (mWorkAroundDriverBugs && - Renderer() == GLRenderer::SGX540 && - AndroidBridge::Bridge()->GetAPIVersion() <= 15) { - // Bug 1288446. Driver sometimes crashes when uploading data to a - // texture if the render target has changed since the texture was - // rendered from. Calling glCheckFramebufferStatus after - // glFramebufferTexture2D prevents the crash. - mNeedsCheckAfterAttachTextureToFb = true; - } -#endif mMaxTextureImageSize = mMaxTextureSize; @@ -1810,17 +1781,6 @@ GLContext::InitExtensions() MarkExtensionUnsupported(OES_EGL_sync); } -#ifdef MOZ_WIDGET_ANDROID - if (Vendor() == GLVendor::Imagination && - Renderer() == GLRenderer::SGX544MP && - AndroidBridge::Bridge()->GetAPIVersion() < 21) - { - // Bug 1026404 - MarkExtensionUnsupported(OES_EGL_image); - MarkExtensionUnsupported(OES_EGL_image_external); - } -#endif - if (Vendor() == GLVendor::ARM && (Renderer() == GLRenderer::Mali400MP || Renderer() == GLRenderer::Mali450MP)) @@ -1829,16 +1789,6 @@ GLContext::InitExtensions() MarkExtensionUnsupported(OES_EGL_image_external); } - if (Renderer() == GLRenderer::AndroidEmulator) { - // the Android emulator, which we use to run B2G reftests on, - // doesn't expose the OES_rgb8_rgba8 extension, but it seems to - // support it (tautologically, as it only runs on desktop GL). - MarkExtensionSupported(OES_rgb8_rgba8); - // there seems to be a similar issue for EXT_texture_format_BGRA8888 - // on the Android 4.3 emulator - MarkExtensionSupported(EXT_texture_format_BGRA8888); - } - if (Vendor() == GLVendor::VMware && Renderer() == GLRenderer::GalliumLlvmpipe) { @@ -2037,8 +1987,7 @@ GLContext::AttachBuffersToFB(GLuint colorTex, GLuint colorRB, colorTex, 0); } else if (colorRB) { - // On the Android 4.3 emulator, IsRenderbuffer may return false incorrectly. - MOZ_ASSERT_IF(Renderer() != GLRenderer::AndroidEmulator, fIsRenderbuffer(colorRB)); + MOZ_ASSERT(fIsRenderbuffer(colorRB)); fFramebufferRenderbuffer(LOCAL_GL_FRAMEBUFFER, LOCAL_GL_COLOR_ATTACHMENT0, LOCAL_GL_RENDERBUFFER, @@ -2046,7 +1995,7 @@ GLContext::AttachBuffersToFB(GLuint colorTex, GLuint colorRB, } if (depthRB) { - MOZ_ASSERT_IF(Renderer() != GLRenderer::AndroidEmulator, fIsRenderbuffer(depthRB)); + MOZ_ASSERT(fIsRenderbuffer(depthRB)); fFramebufferRenderbuffer(LOCAL_GL_FRAMEBUFFER, LOCAL_GL_DEPTH_ATTACHMENT, LOCAL_GL_RENDERBUFFER, @@ -2054,7 +2003,7 @@ GLContext::AttachBuffersToFB(GLuint colorTex, GLuint colorRB, } if (stencilRB) { - MOZ_ASSERT_IF(Renderer() != GLRenderer::AndroidEmulator, fIsRenderbuffer(stencilRB)); + MOZ_ASSERT(fIsRenderbuffer(stencilRB)); fFramebufferRenderbuffer(LOCAL_GL_FRAMEBUFFER, LOCAL_GL_STENCIL_ATTACHMENT, LOCAL_GL_RENDERBUFFER, @@ -2934,29 +2883,6 @@ GLContext::fDeleteFramebuffers(GLsizei n, const GLuint* names) TRACKING_CONTEXT(DeletedFramebuffers(this, n, names)); } -#ifdef MOZ_WIDGET_ANDROID -/** - * Conservatively estimate whether there is enough available - * contiguous virtual address space to map a newly allocated texture. - */ -static bool -WillTextureMapSucceed(GLsizei width, GLsizei height, GLenum format, GLenum type) -{ - bool willSucceed = false; - // Some drivers leave large gaps between textures, so require - // there to be double the actual size of the texture available. - size_t size = width * height * GetBytesPerTexel(format, type) * 2; - - void *p = mmap(nullptr, size, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if (p != MAP_FAILED) { - willSucceed = true; - munmap(p, size); - } - - return willSucceed; -} -#endif // MOZ_WIDGET_ANDROID - void GLContext::fTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, @@ -2969,17 +2895,6 @@ GLContext::fTexImage2D(GLenum target, GLint level, GLint internalformat, height = -1; border = -1; } -#if MOZ_WIDGET_ANDROID - if (mTextureAllocCrashesOnMapFailure) { - // We have no way of knowing whether this texture already has - // storage allocated for it, and therefore whether this check - // is necessary. We must therefore assume it does not and - // always perform the check. - if (!WillTextureMapSucceed(width, height, internalformat, type)) { - return; - } - } -#endif raw_fTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); } diff --git a/gfx/gl/GLContext.h b/gfx/gl/GLContext.h index f6af638972..5f0f5a4e89 100644 --- a/gfx/gl/GLContext.h +++ b/gfx/gl/GLContext.h @@ -788,18 +788,10 @@ private: static void AssertNotPassingStackBufferToTheGL(const void* ptr); -#ifdef MOZ_WIDGET_ANDROID -// Record the name of the GL call for better hang stacks on Android. -#define BEFORE_GL_CALL \ - PROFILER_LABEL_FUNC( \ - js::ProfileEntry::Category::GRAPHICS);\ - BeforeGLCall(MOZ_FUNCTION_NAME) -#else #define BEFORE_GL_CALL \ do { \ BeforeGLCall(MOZ_FUNCTION_NAME); \ } while (0) -#endif #define AFTER_GL_CALL \ do { \ @@ -815,12 +807,7 @@ private: #else // ifdef MOZ_GL_DEBUG -#ifdef MOZ_WIDGET_ANDROID -// Record the name of the GL call for better hang stacks on Android. -#define BEFORE_GL_CALL PROFILER_LABEL_FUNC(js::ProfileEntry::Category::GRAPHICS) -#else #define BEFORE_GL_CALL do { } while (0) -#endif #define AFTER_GL_CALL do { } while (0) #define TRACKING_CONTEXT(a) do {} while (0) #define ASSERT_NOT_PASSING_STACK_BUFFER_TO_GL(ptr) do {} while (0) diff --git a/gfx/gl/GLContextProviderEGL.cpp b/gfx/gl/GLContextProviderEGL.cpp index e39858a92e..ad515e6040 100644 --- a/gfx/gl/GLContextProviderEGL.cpp +++ b/gfx/gl/GLContextProviderEGL.cpp @@ -11,20 +11,7 @@ #define GET_NATIVE_WINDOW(aWidget) ((EGLNativeWindowType)aWidget->GetNativeData(NS_NATIVE_WINDOW)) #endif -#ifdef MOZ_WIDGET_ANDROID - #define GET_JAVA_SURFACE(aWidget) (aWidget->GetNativeData(NS_JAVA_SURFACE)) -#endif - #if defined(XP_UNIX) - #ifdef MOZ_WIDGET_ANDROID - #include - #include - #endif - - #ifdef ANDROID - #include - #define LOG(args...) __android_log_print(ANDROID_LOG_INFO, "Android" , ## args) - #endif #define GLES2_LIB "libGLESv2.so" #define GLES2_LIB2 "libGLESv2.so.2" @@ -164,22 +151,8 @@ CreateSurfaceForWindow(nsIWidget* widget, const EGLConfig& config) { EGLSurface newSurface = nullptr; MOZ_ASSERT(widget); -#ifdef MOZ_WIDGET_ANDROID - void* javaSurface = GET_JAVA_SURFACE(widget); - if (!javaSurface) { - MOZ_CRASH("GFX: Failed to get Java surface.\n"); - } - JNIEnv* const env = jni::GetEnvForThread(); - ANativeWindow* const nativeWindow = ANativeWindow_fromSurface( - env, reinterpret_cast(javaSurface)); - newSurface = sEGLLibrary.fCreateWindowSurface( - sEGLLibrary.fGetDisplay(EGL_DEFAULT_DISPLAY), - config, nativeWindow, 0); - ANativeWindow_release(nativeWindow); -#else newSurface = sEGLLibrary.fCreateWindowSurface(EGL_DISPLAY(), config, GET_NATIVE_WINDOW(widget), 0); -#endif return newSurface; } @@ -229,11 +202,6 @@ GLContextEGL::~GLContextEGL() bool GLContextEGL::Init() { -#if defined(ANDROID) - // We can't use LoadApitraceLibrary here because the GLContext - // expects its own handle to the GL library - if (!OpenLibrary(APITRACE_LIB)) -#endif if (!OpenLibrary(GLES2_LIB)) { #if defined(XP_UNIX) if (!OpenLibrary(GLES2_LIB2)) { @@ -432,10 +400,8 @@ GLContextEGL::GetWSIInfo(nsCString* const out) const out->AppendLiteral("\nEGL_EXTENSIONS: "); out->Append((const char*)sEGLLibrary.fQueryString(EGL_DISPLAY(), LOCAL_EGL_EXTENSIONS)); -#ifndef ANDROID // This query will crash some old android. out->AppendLiteral("\nEGL_EXTENSIONS(nullptr): "); out->Append((const char*)sEGLLibrary.fQueryString(nullptr, LOCAL_EGL_EXTENSIONS)); -#endif } // hold a reference to the given surface @@ -685,18 +651,6 @@ CreateConfig(EGLConfig* aConfig, nsIWidget* aWidget) { int32_t depth = gfxPlatform::GetPlatform()->GetScreenDepth(); if (!CreateConfig(aConfig, depth, aWidget)) { -#ifdef MOZ_WIDGET_ANDROID - // Bug 736005 - // Android doesn't always support 16 bit so also try 24 bit - if (depth == 16) { - return CreateConfig(aConfig, 24, aWidget); - } - // Bug 970096 - // Some devices that have 24 bit screens only support 16 bit OpenGL? - if (depth == 24) { - return CreateConfig(aConfig, 16, aWidget); - } -#endif return false; } else { return true; @@ -771,43 +725,6 @@ GLContextProviderEGL::CreateForWindow(nsIWidget* aWidget, bool aForceAccelerated return gl.forget(); } -#if defined(ANDROID) -EGLSurface -GLContextProviderEGL::CreateEGLSurface(void* aWindow) -{ - nsCString discardFailureId; - if (!sEGLLibrary.EnsureInitialized(false, &discardFailureId)) { - MOZ_CRASH("GFX: Failed to load EGL library 4!\n"); - } - - EGLConfig config; - if (!CreateConfig(&config, static_cast(aWindow))) { - MOZ_CRASH("GFX: Failed to create EGLConfig 2!\n"); - } - - MOZ_ASSERT(aWindow); - - EGLSurface surface = sEGLLibrary.fCreateWindowSurface(EGL_DISPLAY(), config, aWindow, - 0); - if (surface == EGL_NO_SURFACE) { - MOZ_CRASH("GFX: Failed to create EGLSurface 2!\n"); - } - - return surface; -} - -void -GLContextProviderEGL::DestroyEGLSurface(EGLSurface surface) -{ - nsCString discardFailureId; - if (!sEGLLibrary.EnsureInitialized(false, &discardFailureId)) { - MOZ_CRASH("GFX: Failed to load EGL library 5!\n"); - } - - sEGLLibrary.fDestroySurface(EGL_DISPLAY(), surface); -} -#endif // defined(ANDROID) - static void FillContextAttribs(bool alpha, bool depth, bool stencil, bool bpp16, bool es3, nsTArray* out) diff --git a/gfx/gl/GLContextProviderImpl.h b/gfx/gl/GLContextProviderImpl.h index 7b63905e64..0a5d30eaad 100644 --- a/gfx/gl/GLContextProviderImpl.h +++ b/gfx/gl/GLContextProviderImpl.h @@ -10,9 +10,6 @@ #ifndef GL_CONTEXT_PROVIDER_NAME #error GL_CONTEXT_PROVIDER_NAME not defined #endif -#if defined(ANDROID) -typedef void* EGLSurface; -#endif // defined(ANDROID) class GL_CONTEXT_PROVIDER_NAME { @@ -111,11 +108,6 @@ public: static already_AddRefed CreateWrappingExisting(void* aContext, void* aSurface); -#if defined(ANDROID) - static EGLSurface CreateEGLSurface(void* aWindow); - static void DestroyEGLSurface(EGLSurface surface); -#endif // defined(ANDROID) - /** * Get a pointer to the global context, creating it if it doesn't exist. */ diff --git a/gfx/gl/GLLibraryEGL.cpp b/gfx/gl/GLLibraryEGL.cpp index b8b53f7c27..5b95d83b2b 100644 --- a/gfx/gl/GLLibraryEGL.cpp +++ b/gfx/gl/GLLibraryEGL.cpp @@ -54,46 +54,6 @@ static const char* sEGLExtensionNames[] = { "EGL_ANGLE_platform_angle_d3d" }; -#if defined(ANDROID) - -static PRLibrary* LoadApitraceLibrary() -{ - // Initialization of gfx prefs here is only needed during the unit tests... - gfxPrefs::GetSingleton(); - if (!gfxPrefs::UseApitrace()) { - return nullptr; - } - - static PRLibrary* sApitraceLibrary = nullptr; - - if (sApitraceLibrary) - return sApitraceLibrary; - - nsCString logFile = Preferences::GetCString("gfx.apitrace.logfile"); - - if (logFile.IsEmpty()) { - logFile = "firefox.trace"; - } - - // The firefox process can't write to /data/local, but it can write - // to $GRE_HOME/ - nsAutoCString logPath; - logPath.AppendPrintf("%s/%s", getenv("GRE_HOME"), logFile.get()); - - // apitrace uses the TRACE_FILE environment variable to determine where - // to log trace output to - printf_stderr("Logging GL tracing output to %s", logPath.get()); - setenv("TRACE_FILE", logPath.get(), false); - - printf_stderr("Attempting load of %s\n", APITRACE_LIB); - - sApitraceLibrary = PR_LoadLibrary(APITRACE_LIB); - - return sApitraceLibrary; -} - -#endif // ANDROID - #ifdef XP_WIN // see the comment in GLLibraryEGL::EnsureInitialized() for the rationale here. static PRLibrary* @@ -348,13 +308,8 @@ GLLibraryEGL::EnsureInitialized(bool forceAccel, nsACString* const out_failureId #else // !Windows - // On non-Windows (Android) we use system copies of libEGL. We look for - // the APITrace lib, libEGL.so, and libEGL.so.1 in that order. - -#if defined(ANDROID) - if (!mEGLLibrary) - mEGLLibrary = LoadApitraceLibrary(); -#endif + // On non-Windows we use system copies of libEGL. We look for + // libEGL.so and libEGL.so.1 in that order. if (!mEGLLibrary) { printf_stderr("Attempting load of libEGL.so\n"); @@ -593,24 +548,6 @@ GLLibraryEGL::EnsureInitialized(bool forceAccel, nsACString* const out_failureId MarkExtensionUnsupported(KHR_image_pixmap); } - if (IsExtensionSupported(ANDROID_native_fence_sync)) { - GLLibraryLoader::SymLoadStruct nativeFenceSymbols[] = { - { (PRFuncPtr*) &mSymbols.fDupNativeFenceFDANDROID, { "eglDupNativeFenceFDANDROID", nullptr } }, - { nullptr, { nullptr } } - }; - - bool success = GLLibraryLoader::LoadSymbols(mEGLLibrary, - &nativeFenceSymbols[0], - lookupFunction); - if (!success) { - NS_ERROR("EGL supports ANDROID_native_fence_sync without exposing its functions!"); - - MarkExtensionUnsupported(ANDROID_native_fence_sync); - - mSymbols.fDupNativeFenceFDANDROID = nullptr; - } - } - mInitialized = true; return true; } @@ -642,12 +579,7 @@ GLLibraryEGL::InitClientExtensions() const char* rawExtString = nullptr; -#ifndef ANDROID - // Bug 1209612: Crashes on a number of android drivers. - // Ideally we would only blocklist this there, but for now we don't need the client - // extension list on ANDROID (we mostly need it on ANGLE), and we'd rather not crash. rawExtString = (const char*)fQueryString(nullptr, LOCAL_EGL_EXTENSIONS); -#endif if (!rawExtString) { if (shouldDumpExts) { diff --git a/gfx/gl/GLLibraryEGL.h b/gfx/gl/GLLibraryEGL.h index 88fce067ea..e48f2e21be 100644 --- a/gfx/gl/GLLibraryEGL.h +++ b/gfx/gl/GLLibraryEGL.h @@ -33,17 +33,6 @@ typedef void* EGLNativePixmapType; typedef void* EGLNativeWindowType; - #ifdef ANDROID - // We only need to explicitly dlopen egltrace - // on android as we can use LD_PRELOAD or other tricks - // on other platforms. We look for it in /data/local - // as that's writeable by all users - // - // This should really go in GLLibraryEGL.cpp but we currently reference - // APITRACE_LIB in GLContextProviderEGL.cpp. Further refactoring - // will come in subsequent patches on Bug 732865 - #define APITRACE_LIB "/data/local/tmp/egltrace.so" - #endif #endif #if defined(MOZ_X11) @@ -79,28 +68,15 @@ namespace gl { # endif #endif -#ifdef MOZ_WIDGET_ANDROID -// Record the name of the GL call for better hang stacks on Android. -#define BEFORE_GL_CALL \ - PROFILER_LABEL_FUNC( \ - js::ProfileEntry::Category::GRAPHICS);\ - BeforeGLCall(MOZ_FUNCTION_NAME) -#else #define BEFORE_GL_CALL do { \ BeforeGLCall(MOZ_FUNCTION_NAME); \ } while (0) -#endif #define AFTER_GL_CALL do { \ AfterGLCall(MOZ_FUNCTION_NAME); \ } while (0) -#else -#ifdef MOZ_WIDGET_ANDROID -// Record the name of the GL call for better hang stacks on Android. -#define BEFORE_GL_CALL PROFILER_LABEL_FUNC(js::ProfileEntry::Category::GRAPHICS) -#else +#else // !DEBUG #define BEFORE_GL_CALL -#endif #define AFTER_GL_CALL #endif diff --git a/gfx/gl/moz.build b/gfx/gl/moz.build index b2750c024e..29182d99e8 100644 --- a/gfx/gl/moz.build +++ b/gfx/gl/moz.build @@ -16,14 +16,11 @@ elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: gl_provider = 'EGL' else: gl_provider = 'GLX' -elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': - gl_provider = 'EGL' if CONFIG['MOZ_GL_PROVIDER']: gl_provider = CONFIG['MOZ_GL_PROVIDER'] EXPORTS += [ - 'AndroidSurfaceTexture.h', 'DecomposeIntoNoRepeatTriangles.h', 'EGLUtils.h', 'ForceDiscreteGPUHelperCGL.h', @@ -118,7 +115,6 @@ elif gl_provider == 'GLX': ] SOURCES += [ - 'AndroidSurfaceTexture.cpp', 'DecomposeIntoNoRepeatTriangles.cpp', 'EGLUtils.cpp', 'GfxTexturesReporter.cpp', diff --git a/gfx/layers/Compositor.cpp b/gfx/layers/Compositor.cpp index b623b8de92..e091975bf7 100644 --- a/gfx/layers/Compositor.cpp +++ b/gfx/layers/Compositor.cpp @@ -28,15 +28,8 @@ Compositor::Compositor(widget::CompositorWidget* aWidget, , mScreenRotation(ROTATION_0) , mWidget(aWidget) , mIsDestroyed(false) -#if defined(MOZ_WIDGET_ANDROID) - // If the default color isn't white for Fennec, there is a black - // flash before the first page of a tab is loaded. - , mClearColor(1.0, 1.0, 1.0, 1.0) - , mDefaultClearColor(1.0, 1.0, 1.0, 1.0) -#else , mClearColor(0.0, 0.0, 0.0, 0.0) , mDefaultClearColor(0.0, 0.0, 0.0, 0.0) -#endif { } @@ -173,11 +166,7 @@ Compositor::DrawDiagnosticsInternal(DiagnosticFlags aFlags, const gfx::Matrix4x4& aTransform, uint32_t aFlashCounter) { -#if defined(ANDROID) - int lWidth = 10; -#else int lWidth = 2; -#endif gfx::Color color; if (aFlags & DiagnosticFlags::CONTENT) { diff --git a/gfx/layers/GLImages.cpp b/gfx/layers/GLImages.cpp index c151d991b2..008067df7b 100644 --- a/gfx/layers/GLImages.cpp +++ b/gfx/layers/GLImages.cpp @@ -1,3 +1,7 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "GLImages.h" #include "GLContext.h" @@ -98,17 +102,5 @@ GLImage::GetAsSourceSurface() return source.forget(); } -#ifdef MOZ_WIDGET_ANDROID -SurfaceTextureImage::SurfaceTextureImage(gl::AndroidSurfaceTexture* aSurfTex, - const gfx::IntSize& aSize, - gl::OriginPos aOriginPos) - : GLImage(ImageFormat::SURFACE_TEXTURE), - mSurfaceTexture(aSurfTex), - mSize(aSize), - mOriginPos(aOriginPos) -{ -} -#endif - } // namespace layers } // namespace mozilla diff --git a/gfx/layers/GLImages.h b/gfx/layers/GLImages.h index 3e419d4b60..e7110db9d2 100644 --- a/gfx/layers/GLImages.h +++ b/gfx/layers/GLImages.h @@ -6,7 +6,6 @@ #ifndef GFX_GLIMAGES_H #define GFX_GLIMAGES_H -#include "AndroidSurfaceTexture.h" #include "GLContextTypes.h" #include "GLTypes.h" #include "ImageContainer.h" // for Image @@ -60,34 +59,6 @@ private: bool mOwns; }; -#ifdef MOZ_WIDGET_ANDROID - -class SurfaceTextureImage : public GLImage { -public: - SurfaceTextureImage(gl::AndroidSurfaceTexture* aSurfTex, - const gfx::IntSize& aSize, - gl::OriginPos aOriginPos); - - gfx::IntSize GetSize() override { return mSize; } - gl::AndroidSurfaceTexture* GetSurfaceTexture() const { - return mSurfaceTexture; - } - gl::OriginPos GetOriginPos() const { - return mOriginPos; - } - - SurfaceTextureImage* AsSurfaceTextureImage() override { - return this; - } - -private: - RefPtr mSurfaceTexture; - gfx::IntSize mSize; - gl::OriginPos mOriginPos; -}; - -#endif // MOZ_WIDGET_ANDROID - } // namespace layers } // namespace mozilla diff --git a/gfx/layers/ImageContainer.h b/gfx/layers/ImageContainer.h index a2f404e179..73085ba906 100644 --- a/gfx/layers/ImageContainer.h +++ b/gfx/layers/ImageContainer.h @@ -166,9 +166,7 @@ protected: class GLImage; class EGLImageImage; class SharedRGBImage; -#ifdef MOZ_WIDGET_ANDROID -class SurfaceTextureImage; -#elif defined(XP_MACOSX) +#if defined(XP_MACOSX) class MacIOSurfaceImage; #endif @@ -225,9 +223,6 @@ public: /* Access to derived classes. */ virtual EGLImageImage* AsEGLImageImage() { return nullptr; } virtual GLImage* AsGLImage() { return nullptr; } -#ifdef MOZ_WIDGET_ANDROID - virtual SurfaceTextureImage* AsSurfaceTextureImage() { return nullptr; } -#endif #ifdef XP_MACOSX virtual MacIOSurfaceImage* AsMacIOSurfaceImage() { return nullptr; } #endif diff --git a/gfx/layers/LayersLogging.cpp b/gfx/layers/LayersLogging.cpp index 3d11643603..bf3a139579 100644 --- a/gfx/layers/LayersLogging.cpp +++ b/gfx/layers/LayersLogging.cpp @@ -396,18 +396,7 @@ AppendToString(std::stringstream& aStream, ImageFormat format, void print_stderr(std::stringstream& aStr) { -#if defined(ANDROID) - // On Android logcat output is truncated to 1024 chars per line, and - // we usually use std::stringstream to build up giant multi-line gobs - // of output. So to avoid the truncation we find the newlines and - // print the lines individually. - std::string line; - while (std::getline(aStr, line)) { - printf_stderr("%s\n", line.c_str()); - } -#else printf_stderr("%s", aStr.str().c_str()); -#endif } void diff --git a/gfx/layers/apz/src/AndroidAPZ.cpp b/gfx/layers/apz/src/AndroidAPZ.cpp deleted file mode 100644 index 3a2baff86a..0000000000 --- a/gfx/layers/apz/src/AndroidAPZ.cpp +++ /dev/null @@ -1,273 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "AndroidAPZ.h" - -#include "AsyncPanZoomController.h" -#include "GeneratedJNIWrappers.h" -#include "gfxPrefs.h" -#include "OverscrollHandoffState.h" -#include "ViewConfiguration.h" - -#define ANDROID_APZ_LOG(...) -// #define ANDROID_APZ_LOG(...) printf_stderr("ANDROID_APZ: " __VA_ARGS__) - -static float sMaxFlingSpeed = 0.0f; - -namespace mozilla { -namespace layers { - -AndroidSpecificState::AndroidSpecificState() { - using namespace mozilla::java; - - sdk::ViewConfiguration::LocalRef config; - if (sdk::ViewConfiguration::Get(GeckoAppShell::GetApplicationContext(), &config) == NS_OK) { - int32_t speed = 0; - if (config->GetScaledMaximumFlingVelocity(&speed) == NS_OK) { - sMaxFlingSpeed = (float)speed * 0.001f; - } else { - ANDROID_APZ_LOG("%p Failed to query ViewConfiguration for scaled maximum fling velocity\n", this); - } - } else { - ANDROID_APZ_LOG("%p Failed to get ViewConfiguration\n", this); - } - - StackScroller::LocalRef scroller; - if (StackScroller::New(GeckoAppShell::GetApplicationContext(), &scroller) != NS_OK) { - ANDROID_APZ_LOG("%p Failed to create Android StackScroller\n", this); - return; - } - mOverScroller = scroller; -} - -const float BOUNDS_EPSILON = 1.0f; - -// This function is used to convert the scroll offset from a float to an integer -// suitable for using with the Android OverScroller Class. -// The Android OverScroller class (unfortunately) operates in integers instead of floats. -// When casting a float value such as 1.5 to an integer, the value is converted to 1. -// If this value represents the max scroll offset, the OverScroller class will never scroll -// to the end of the page as it will always be 0.5 pixels short. To work around this issue, -// the min and max scroll extents are floor/ceil to convert them to the nearest integer -// just outside of the actual scroll extents. This means, the starting -// scroll offset must be converted the same way so that if the frame has already been -// scrolled 1.5 pixels, it won't be snapped back when converted to an integer. This integer -// rounding error was one of several causes of Bug 1276463. -static int32_t -ClampStart(float aOrigin, float aMin, float aMax) -{ - if (aOrigin <= aMin) { - return (int32_t)floor(aMin); - } else if (aOrigin >= aMax) { - return (int32_t)ceil(aMax); - } - return (int32_t)aOrigin; -} - -AndroidFlingAnimation::AndroidFlingAnimation(AsyncPanZoomController& aApzc, - PlatformSpecificStateBase* aPlatformSpecificState, - const RefPtr& aOverscrollHandoffChain, - bool aFlingIsHandoff, - const RefPtr& aScrolledApzc) - : mApzc(aApzc) - , mOverscrollHandoffChain(aOverscrollHandoffChain) - , mScrolledApzc(aScrolledApzc) - , mSentBounceX(false) - , mSentBounceY(false) - , mFlingDuration(0) -{ - MOZ_ASSERT(mOverscrollHandoffChain); - AndroidSpecificState* state = aPlatformSpecificState->AsAndroidSpecificState(); - MOZ_ASSERT(state); - mOverScroller = state->mOverScroller; - MOZ_ASSERT(mOverScroller); - - // Drop any velocity on axes where we don't have room to scroll anyways - // (in this APZC, or an APZC further in the handoff chain). - // This ensures that we don't take the 'overscroll' path in Sample() - // on account of one axis which can't scroll having a velocity. - if (!mOverscrollHandoffChain->CanScrollInDirection(&mApzc, Layer::HORIZONTAL)) { - ReentrantMonitorAutoEnter lock(mApzc.mMonitor); - mApzc.mX.SetVelocity(0); - } - if (!mOverscrollHandoffChain->CanScrollInDirection(&mApzc, Layer::VERTICAL)) { - ReentrantMonitorAutoEnter lock(mApzc.mMonitor); - mApzc.mY.SetVelocity(0); - } - - ParentLayerPoint velocity = mApzc.GetVelocityVector(); - - float scrollRangeStartX = mApzc.mX.GetPageStart().value; - float scrollRangeEndX = mApzc.mX.GetScrollRangeEnd().value; - float scrollRangeStartY = mApzc.mY.GetPageStart().value; - float scrollRangeEndY = mApzc.mY.GetScrollRangeEnd().value; - mStartOffset.x = mPreviousOffset.x = mApzc.mX.GetOrigin().value; - mStartOffset.y = mPreviousOffset.y = mApzc.mY.GetOrigin().value; - float length = velocity.Length(); - if (length > 0.0f) { - mFlingDirection = velocity / length; - - if ((sMaxFlingSpeed > 0.0f) && (length > sMaxFlingSpeed)) { - velocity = mFlingDirection * sMaxFlingSpeed; - } - } - - mPreviousVelocity = velocity; - - int32_t originX = ClampStart(mStartOffset.x, scrollRangeStartX, scrollRangeEndX); - int32_t originY = ClampStart(mStartOffset.y, scrollRangeStartY, scrollRangeEndY); - if (!state->mLastFling.IsNull()) { - // If it's been too long since the previous fling, or if the new fling's - // velocity is too low, don't allow flywheel to kick in. If we do allow - // flywheel to kick in, then we need to update the timestamp on the - // StackScroller because otherwise it might use a stale velocity. - TimeDuration flingDuration = TimeStamp::Now() - state->mLastFling; - if (flingDuration.ToMilliseconds() < gfxPrefs::APZFlingAccelInterval() - && velocity.Length() >= gfxPrefs::APZFlingAccelMinVelocity()) { - bool unused = false; - mOverScroller->ComputeScrollOffset(flingDuration.ToMilliseconds(), &unused); - } else { - mOverScroller->ForceFinished(true); - } - } - mOverScroller->Fling(originX, originY, - // Android needs the velocity in pixels per second and it is in pixels per ms. - (int32_t)(velocity.x * 1000.0f), (int32_t)(velocity.y * 1000.0f), - (int32_t)floor(scrollRangeStartX), (int32_t)ceil(scrollRangeEndX), - (int32_t)floor(scrollRangeStartY), (int32_t)ceil(scrollRangeEndY), - 0, 0, 0); - state->mLastFling = TimeStamp::Now(); -} - -/** - * Advances a fling by an interpolated amount based on the Android OverScroller. - * This should be called whenever sampling the content transform for this - * frame. Returns true if the fling animation should be advanced by one frame, - * or false if there is no fling or the fling has ended. - */ -bool -AndroidFlingAnimation::DoSample(FrameMetrics& aFrameMetrics, - const TimeDuration& aDelta) -{ - bool shouldContinueFling = true; - - mFlingDuration += aDelta.ToMilliseconds(); - mOverScroller->ComputeScrollOffset(mFlingDuration, &shouldContinueFling); - - int32_t currentX = 0; - int32_t currentY = 0; - mOverScroller->GetCurrX(¤tX); - mOverScroller->GetCurrY(¤tY); - ParentLayerPoint offset((float)currentX, (float)currentY); - ParentLayerPoint preCheckedOffset(offset); - - bool hitBoundX = CheckBounds(mApzc.mX, offset.x, mFlingDirection.x, &(offset.x)); - bool hitBoundY = CheckBounds(mApzc.mY, offset.y, mFlingDirection.y, &(offset.y)); - - ParentLayerPoint velocity = mPreviousVelocity; - - // Sometimes the OverScroller fails to update the offset for a frame. - // If the frame can still scroll we just use the velocity from the previous - // frame. However, if the frame can no longer scroll in the direction - // of the fling, then end the animation. - if (offset != mPreviousOffset) { - if (aDelta.ToMilliseconds() > 0) { - mOverScroller->GetCurrSpeedX(&velocity.x); - mOverScroller->GetCurrSpeedY(&velocity.y); - - velocity.x /= 1000; - velocity.y /= 1000; - - mPreviousVelocity = velocity; - } - } else if ((fabsf(offset.x - preCheckedOffset.x) > BOUNDS_EPSILON) || (fabsf(offset.y - preCheckedOffset.y) > BOUNDS_EPSILON)) { - // The page is no longer scrolling but the fling animation is still animating beyond the page bounds. If it goes - // beyond the BOUNDS_EPSILON then it has overflowed and will never stop. In that case, stop the fling animation. - shouldContinueFling = false; - } else if (hitBoundX && hitBoundY) { - // We can't scroll any farther along either axis. - shouldContinueFling = false; - } - - float speed = velocity.Length(); - - // gfxPrefs::APZFlingStoppedThreshold is only used in tests. - if (!shouldContinueFling || (speed < gfxPrefs::APZFlingStoppedThreshold())) { - if (shouldContinueFling) { - // The OverScroller thinks it should continue but the speed is below - // the stopping threshold so abort the animation. - mOverScroller->AbortAnimation(); - } - // This animation is going to end. If DeferHandleFlingOverscroll - // has not been called and there is still some velocity left, - // call it so that fling hand off may occur if applicable. - if (!mSentBounceX && !mSentBounceY && (speed > 0.0f)) { - DeferHandleFlingOverscroll(velocity); - } - return false; - } - - mPreviousOffset = offset; - - mApzc.SetVelocityVector(velocity); - aFrameMetrics.SetScrollOffset(offset / aFrameMetrics.GetZoom()); - - // If we hit a bounds while flinging, send the velocity so that the bounce - // animation can play. - if (hitBoundX || hitBoundY) { - ParentLayerPoint bounceVelocity = velocity; - - if (!mSentBounceX && hitBoundX && fabsf(offset.x - mStartOffset.x) > BOUNDS_EPSILON) { - mSentBounceX = true; - } else { - bounceVelocity.x = 0.0f; - } - - if (!mSentBounceY && hitBoundY && fabsf(offset.y - mStartOffset.y) > BOUNDS_EPSILON) { - mSentBounceY = true; - } else { - bounceVelocity.y = 0.0f; - } - if (!IsZero(bounceVelocity)) { - DeferHandleFlingOverscroll(bounceVelocity); - } - } - - return true; -} - -void -AndroidFlingAnimation::DeferHandleFlingOverscroll(ParentLayerPoint& aVelocity) -{ - mDeferredTasks.AppendElement( - NewRunnableMethod, - RefPtr>(&mApzc, - &AsyncPanZoomController::HandleFlingOverscroll, - aVelocity, - mOverscrollHandoffChain, - mScrolledApzc)); - -} - -bool -AndroidFlingAnimation::CheckBounds(Axis& aAxis, float aValue, float aDirection, float* aClamped) -{ - if ((aDirection < 0.0f) && (aValue <= aAxis.GetPageStart().value)) { - if (aClamped) { - *aClamped = aAxis.GetPageStart().value; - } - return true; - } else if ((aDirection > 0.0f) && (aValue >= aAxis.GetScrollRangeEnd().value)) { - if (aClamped) { - *aClamped = aAxis.GetScrollRangeEnd().value; - } - return true; - } - return false; -} - -} // namespace layers -} // namespace mozilla diff --git a/gfx/layers/apz/src/AndroidAPZ.h b/gfx/layers/apz/src/AndroidAPZ.h deleted file mode 100644 index 248f2fbe7e..0000000000 --- a/gfx/layers/apz/src/AndroidAPZ.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifndef mozilla_layers_AndroidAPZ_h_ -#define mozilla_layers_AndroidAPZ_h_ - -#include "AsyncPanZoomAnimation.h" -#include "AsyncPanZoomController.h" -#include "GeneratedJNIWrappers.h" - -namespace mozilla { -namespace layers { - -class AndroidSpecificState : public PlatformSpecificStateBase { -public: - AndroidSpecificState(); - - virtual AndroidSpecificState* AsAndroidSpecificState() override { - return this; - } - - java::StackScroller::GlobalRef mOverScroller; - TimeStamp mLastFling; -}; - -class AndroidFlingAnimation: public AsyncPanZoomAnimation { -public: - AndroidFlingAnimation(AsyncPanZoomController& aApzc, - PlatformSpecificStateBase* aPlatformSpecificState, - const RefPtr& aOverscrollHandoffChain, - bool aFlingIsHandoff /* ignored */, - const RefPtr& aScrolledApzc); - virtual bool DoSample(FrameMetrics& aFrameMetrics, - const TimeDuration& aDelta) override; -private: - void DeferHandleFlingOverscroll(ParentLayerPoint& aVelocity); - // Returns true if value is on or outside of axis bounds. - bool CheckBounds(Axis& aAxis, float aValue, float aDirection, float* aClamped); - - AsyncPanZoomController& mApzc; - java::StackScroller::GlobalRef mOverScroller; - RefPtr mOverscrollHandoffChain; - RefPtr mScrolledApzc; - bool mSentBounceX; - bool mSentBounceY; - long mFlingDuration; - ParentLayerPoint mStartOffset; - ParentLayerPoint mPreviousOffset; - // Unit vector in the direction of the fling. - ParentLayerPoint mFlingDirection; - ParentLayerPoint mPreviousVelocity; -}; - - -} // namespace layers -} // namespace mozilla - -#endif // mozilla_layers_AndroidAPZ_h_ diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index 772590356a..4808daf49c 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -75,9 +75,6 @@ #include "SharedMemoryBasic.h" // for SharedMemoryBasic #include "ScrollSnap.h" // for ScrollSnapUtils #include "WheelScrollAnimation.h" -#if defined(MOZ_WIDGET_ANDROID) -#include "AndroidAPZ.h" -#endif // defined(MOZ_WIDGET_ANDROID) #define ENABLE_APZC_LOGGING 0 // #define ENABLE_APZC_LOGGING 1 @@ -110,16 +107,10 @@ using mozilla::gfx::PointTyped; using mozilla::gfx::RectTyped; using mozilla::gfx::ScaleFactors2D; -// Choose between platform-specific implementations. -#ifdef MOZ_WIDGET_ANDROID -typedef WidgetOverscrollEffect OverscrollEffect; -typedef AndroidSpecificState PlatformSpecificState; -typedef AndroidFlingAnimation FlingAnimation; -#else +// Platform-specific implementations. typedef GenericOverscrollEffect OverscrollEffect; typedef PlatformSpecificStateBase PlatformSpecificState; // no extra state, just use the base class typedef GenericFlingAnimation FlingAnimation; -#endif /** * \page APZCPrefs APZ preferences @@ -250,7 +241,6 @@ typedef GenericFlingAnimation FlingAnimation; * for a new sample, v(t0) is the velocity at the previous sample, f is the * value of this pref, and (t1 - t0) is the amount of time, in milliseconds, * that has elapsed between the two samples.\n - * NOTE: Not currently used in Android fling calculations. * * \li\b apz.fling_min_velocity_threshold * Minimum velocity for a fling to actually kick off. If the user pans and lifts @@ -271,8 +261,6 @@ typedef GenericFlingAnimation FlingAnimation; * animation completely. This is to prevent asymptotically approaching 0 * velocity and rerendering unnecessarily.\n * Units: screen pixels per millisecond.\n - * NOTE: Should not be set to anything - * other than 0.0 for Android except for tests to disable flings. * * \li\b apz.max_velocity_inches_per_ms * Maximum velocity. Velocity will be capped at this value if a faster fling diff --git a/gfx/layers/apz/util/APZCCallbackHelper.cpp b/gfx/layers/apz/util/APZCCallbackHelper.cpp index 3f33a59e43..2fda14719b 100644 --- a/gfx/layers/apz/util/APZCCallbackHelper.cpp +++ b/gfx/layers/apz/util/APZCCallbackHelper.cpp @@ -580,18 +580,7 @@ GetRootDocumentElementFor(nsIWidget* aWidget) static nsIFrame* UpdateRootFrameForTouchTargetDocument(nsIFrame* aRootFrame) { -#if defined(MOZ_WIDGET_ANDROID) - // Re-target so that the hit test is performed relative to the frame for the - // Root Content Document instead of the Root Document which are different in - // Android. See bug 1229752 comment 16 for an explanation of why this is necessary. - if (nsIDocument* doc = aRootFrame->PresContext()->PresShell()->GetTouchEventTargetDocument()) { - if (nsIPresShell* shell = doc->GetShell()) { - if (nsIFrame* frame = shell->GetRootFrame()) { - return frame; - } - } - } -#endif + // No retargeting needed on desktop. return aRootFrame; } diff --git a/gfx/layers/apz/util/APZEventState.cpp b/gfx/layers/apz/util/APZEventState.cpp index 20a41eed5a..00a18d7b26 100644 --- a/gfx/layers/apz/util/APZEventState.cpp +++ b/gfx/layers/apz/util/APZEventState.cpp @@ -479,11 +479,8 @@ APZEventState::ProcessAPZStateChange(ViewID aViewId, void APZEventState::ProcessClusterHit() { - // If we hit a cluster of links then we shouldn't activate any of them, - // as we will be showing the zoomed view. (This is only called on Fennec). -#ifndef MOZ_WIDGET_ANDROID - MOZ_ASSERT(false); -#endif + // If we hit a cluster of links then we shouldn't activate any of them. + MOZ_ASSERT(false, "Cluster hits shouldn't happen on desktop!"); mActiveElementManager->ClearActivation(); } diff --git a/gfx/layers/apz/util/APZThreadUtils.cpp b/gfx/layers/apz/util/APZThreadUtils.cpp index 46f67d010f..e1975a2a06 100644 --- a/gfx/layers/apz/util/APZThreadUtils.cpp +++ b/gfx/layers/apz/util/APZThreadUtils.cpp @@ -6,9 +6,6 @@ #include "mozilla/layers/APZThreadUtils.h" #include "mozilla/layers/Compositor.h" -#ifdef MOZ_WIDGET_ANDROID -#include "AndroidBridge.h" -#endif namespace mozilla { namespace layers { @@ -57,15 +54,6 @@ APZThreadUtils::RunOnControllerThread(already_AddRefed aTask) { RefPtr task = aTask; -#ifdef MOZ_WIDGET_ANDROID - // This is needed while nsWindow::ConfigureAPZControllerThread is not propper - // implemented. - if (AndroidBridge::IsJavaUiThread()) { - task->Run(); - } else { - AndroidBridge::Bridge()->PostTaskToUiThread(task.forget(), 0); - } -#else if (!sControllerThread) { // Could happen on startup NS_WARNING("Dropping task posted to controller thread"); @@ -77,17 +65,12 @@ APZThreadUtils::RunOnControllerThread(already_AddRefed aTask) } else { sControllerThread->PostTask(task.forget()); } -#endif } /*static*/ bool APZThreadUtils::IsControllerThread() { -#ifdef MOZ_WIDGET_ANDROID - return AndroidBridge::IsJavaUiThread(); -#else return sControllerThread == MessageLoop::current(); -#endif } NS_IMPL_ISUPPORTS(GenericTimerCallbackBase, nsITimerCallback) diff --git a/gfx/layers/basic/BasicPaintedLayer.cpp b/gfx/layers/basic/BasicPaintedLayer.cpp index 7ce0c24af7..d2c456daa1 100644 --- a/gfx/layers/basic/BasicPaintedLayer.cpp +++ b/gfx/layers/basic/BasicPaintedLayer.cpp @@ -149,7 +149,6 @@ BasicPaintedLayer::Validate(LayerManager::DrawPaintedLayerCallback aCallback, } uint32_t flags = 0; -#ifndef MOZ_WIDGET_ANDROID if (BasicManager()->CompositorMightResample()) { flags |= RotatedContentBuffer::PAINT_WILL_RESAMPLE; } @@ -158,7 +157,6 @@ BasicPaintedLayer::Validate(LayerManager::DrawPaintedLayerCallback aCallback, flags |= RotatedContentBuffer::PAINT_WILL_RESAMPLE; } } -#endif if (mDrawAtomically) { flags |= RotatedContentBuffer::PAINT_NO_ROTATION; } diff --git a/gfx/layers/client/ClientLayerManager.cpp b/gfx/layers/client/ClientLayerManager.cpp index 1e4369bcee..ddca3ec3c1 100644 --- a/gfx/layers/client/ClientLayerManager.cpp +++ b/gfx/layers/client/ClientLayerManager.cpp @@ -31,10 +31,6 @@ #include "TiledLayerBuffer.h" #include "mozilla/dom/WindowBinding.h" // for Overfill Callback #include "FrameLayerBuilder.h" // for FrameLayerbuilder -#ifdef MOZ_WIDGET_ANDROID -#include "AndroidBridge.h" -#include "LayerMetricsWrapper.h" -#endif #ifdef XP_WIN #include "mozilla/gfx/DeviceManagerDx.h" #endif @@ -250,7 +246,7 @@ ClientLayerManager::BeginTransactionWithTarget(gfxContext* aTarget) // // Desktop does not support async zoom yet, so we ignore this for those // platforms. -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_UIKIT) +#if defined(MOZ_WIDGET_UIKIT) if (mWidget && mWidget->GetOwningTabChild()) { mCompositorMightResample = AsyncPanZoomEnabled(); } diff --git a/gfx/layers/client/ClientTiledPaintedLayer.cpp b/gfx/layers/client/ClientTiledPaintedLayer.cpp index 5a07681f6d..599fb972c4 100644 --- a/gfx/layers/client/ClientTiledPaintedLayer.cpp +++ b/gfx/layers/client/ClientTiledPaintedLayer.cpp @@ -150,11 +150,6 @@ ClientTiledPaintedLayer::BeginPaint() if (!displayPortAncestor || !scrollAncestor) { // No displayport or scroll ancestor, so we can't do progressive rendering. -#if defined(MOZ_WIDGET_ANDROID) - // Both Android and b2g on phones are guaranteed to have a displayport set, so this - // should never happen. - NS_WARNING("Tiled PaintedLayer with no scrollable container ancestor"); -#endif return; } diff --git a/gfx/layers/client/ImageClient.cpp b/gfx/layers/client/ImageClient.cpp index 1ccb69502f..e5a725c277 100644 --- a/gfx/layers/client/ImageClient.cpp +++ b/gfx/layers/client/ImageClient.cpp @@ -128,13 +128,6 @@ ImageClient::CreateTextureClientForImage(Image* aImage, KnowsCompositor* aForwar EGLImageImage* typedImage = aImage->AsEGLImageImage(); texture = EGLImageTextureData::CreateTextureClient( typedImage, size, aForwarder->GetTextureForwarder(), TextureFlags::DEFAULT); -#ifdef MOZ_WIDGET_ANDROID - } else if (aImage->GetFormat() == ImageFormat::SURFACE_TEXTURE) { - SurfaceTextureImage* typedImage = aImage->AsSurfaceTextureImage(); - texture = AndroidSurfaceTextureData::CreateTextureClient( - typedImage->GetSurfaceTexture(), size, typedImage->GetOriginPos(), - aForwarder->GetTextureForwarder(), TextureFlags::DEFAULT); -#endif } else { MOZ_ASSERT(false, "Bad ImageFormat."); } diff --git a/gfx/layers/client/TiledContentClient.cpp b/gfx/layers/client/TiledContentClient.cpp index c5677a8a31..164e76da8c 100644 --- a/gfx/layers/client/TiledContentClient.cpp +++ b/gfx/layers/client/TiledContentClient.cpp @@ -1230,19 +1230,7 @@ ClientMultiTiledLayerBuffer::ComputeProgressiveUpdateRegion(const nsIntRegion& a // Compute a "coherent update rect" that we should paint all at once in a // single transaction. This is to avoid rendering glitches on animated // page content, and when layers change size/shape. - // On Fennec uploads are more expensive because we're not using gralloc, so - // we use a coherent update rect that is intersected with the screen at the - // time of issuing the draw command. This will paint faster but also potentially - // make the progressive paint more visible to the user while scrolling. - // On B2G uploads are cheaper and we value coherency more, especially outside - // the browser, so we always use the entire user-visible area. - IntRect coherentUpdateRect(RoundedOut( -#ifdef MOZ_WIDGET_ANDROID - transformedCompositionBounds->Intersect(aPaintData->mCompositionBounds) -#else - *transformedCompositionBounds -#endif - ).ToUnknownRect()); + IntRect coherentUpdateRect(RoundedOut(*transformedCompositionBounds).ToUnknownRect()); TILING_LOG("TILING %p: Progressive update final coherency rect %s\n", &mPaintedLayer, Stringify(coherentUpdateRect).c_str()); diff --git a/gfx/layers/composite/AsyncCompositionManager.cpp b/gfx/layers/composite/AsyncCompositionManager.cpp index cb6b23b0ca..e1938392f6 100644 --- a/gfx/layers/composite/AsyncCompositionManager.cpp +++ b/gfx/layers/composite/AsyncCompositionManager.cpp @@ -38,10 +38,6 @@ #include "nsTArrayForwardDeclare.h" // for InfallibleTArray #include "UnitTransforms.h" // for TransformTo #include "gfxPrefs.h" -#if defined(MOZ_WIDGET_ANDROID) -# include -# include "mozilla/widget/AndroidCompositorWidget.h" -#endif #include "GeckoProfiler.h" #include "FrameUniformityData.h" #include "TreeTraversal.h" // for ForEachNode, BreadthFirstSearch @@ -825,11 +821,7 @@ ExpandRootClipRect(Layer* aLayer, const ScreenMargin& aFixedLayerMargins) // clear the clip rect on aLayer entirely but this seems more precise. Maybe rootClipRect = aLayer->AsLayerComposite()->GetShadowClipRect(); if (rootClipRect && aFixedLayerMargins != ScreenMargin()) { -#ifndef MOZ_WIDGET_ANDROID - // We should never enter here on anything other than Fennec, since - // aFixedLayerMargins should be empty everywhere else. - MOZ_ASSERT(false); -#endif + MOZ_ASSERT(false, "aFixedLayerMargins should be empty!"); ParentLayerRect rect(rootClipRect.value()); rect.Deflate(ViewAs(aFixedLayerMargins, PixelCastJustification::ScreenIsParentLayerForRoot)); @@ -837,40 +829,6 @@ ExpandRootClipRect(Layer* aLayer, const ScreenMargin& aFixedLayerMargins) } } -#ifdef MOZ_WIDGET_ANDROID -static void -MoveScrollbarForLayerMargin(Layer* aRoot, FrameMetrics::ViewID aRootScrollId, - const ScreenMargin& aFixedLayerMargins) -{ - // See bug 1223928 comment 9 - once we can detect the RCD with just the - // isRootContent flag on the metrics, we can probably move this code into - // ApplyAsyncTransformToScrollbar rather than having it as a separate - // adjustment on the layer tree. - Layer* scrollbar = BreadthFirstSearch(aRoot, - [aRootScrollId](Layer* aNode) { - return (aNode->GetScrollbarDirection() == Layer::HORIZONTAL && - aNode->GetScrollbarTargetContainerId() == aRootScrollId); - }); - if (scrollbar) { - // Shift the horizontal scrollbar down into the new space exposed by the - // dynamic toolbar hiding. Technically we should also scale the vertical - // scrollbar a bit to expand into the new space but it's not as noticeable - // and it would add a lot more complexity, so we're going with the "it's not - // worth it" justification. - TranslateShadowLayer(scrollbar, ParentLayerPoint(0, -aFixedLayerMargins.bottom), true, nullptr); - if (scrollbar->GetParent()) { - // The layer that has the HORIZONTAL direction sits inside another - // ContainerLayer. This ContainerLayer also has a clip rect that causes - // the scrollbar to get clipped. We need to expand that clip rect to - // prevent that from happening. This is kind of ugly in that we're - // assuming a particular layer tree structure but short of adding more - // flags to the layer there doesn't appear to be a good way to do this. - ExpandRootClipRect(scrollbar->GetParent(), aFixedLayerMargins); - } - } -} -#endif - bool AsyncCompositionManager::ApplyAsyncContentTransformToTree(Layer *aLayer, bool* aOutFoundRoot) @@ -974,50 +932,9 @@ AsyncCompositionManager::ApplyAsyncContentTransformToTree(Layer *aLayer, const ScrollMetadata& scrollMetadata = layer->GetScrollMetadata(i); const FrameMetrics& metrics = scrollMetadata.GetMetrics(); -#if defined(MOZ_WIDGET_ANDROID) - // If we find a metrics which is the root content doc, use that. If not, use - // the root layer. Since this function recurses on children first we should - // only end up using the root layer if the entire tree was devoid of a - // root content metrics. This is a temporary solution; in the long term we - // should not need the root content metrics at all. See bug 1201529 comment - // 6 for details. - if (!(*aOutFoundRoot)) { - *aOutFoundRoot = metrics.IsRootContent() || /* RCD */ - (layer->GetParent() == nullptr && /* rootmost metrics */ - i + 1 >= layer->GetScrollMetadataCount()); - if (*aOutFoundRoot) { - mRootScrollableId = metrics.GetScrollId(); - CSSToLayerScale geckoZoom = metrics.LayersPixelsPerCSSPixel().ToScaleFactor(); - if (mIsFirstPaint) { - LayerIntPoint scrollOffsetLayerPixels = RoundedToInt(metrics.GetScrollOffset() * geckoZoom); - mContentRect = metrics.GetScrollableRect(); - SetFirstPaintViewport(scrollOffsetLayerPixels, - geckoZoom, - mContentRect); - } else { - ParentLayerPoint scrollOffset = controller->GetCurrentAsyncScrollOffset( - AsyncPanZoomController::RESPECT_FORCE_DISABLE); - // Compute the painted displayport in document-relative CSS pixels. - CSSRect displayPort(metrics.GetCriticalDisplayPort().IsEmpty() ? - metrics.GetDisplayPort() : - metrics.GetCriticalDisplayPort()); - displayPort += metrics.GetScrollOffset(); - SyncFrameMetrics(scrollOffset, - geckoZoom * asyncTransformWithoutOverscroll.mScale, - metrics.GetScrollableRect(), displayPort, geckoZoom, mLayersUpdated, - mPaintSyncId, fixedLayerMargins); - mFixedLayerMargins = fixedLayerMargins; - mLayersUpdated = false; - mPaintSyncId = 0; - } - mIsFirstPaint = false; - } - } -#else - // Non-Android platforms still care about this flag being cleared after + // We still care about this flag being cleared after // the first call to TransformShadowTree(). mIsFirstPaint = false; -#endif // Transform the current local clips by this APZC's async transform. If we're // using containerful scrolling, then the clip is not part of the scrolled @@ -1420,12 +1337,8 @@ AsyncCompositionManager::TransformShadowTree(TimeStamp aCurrentFrame, // in Gecko and partially in Java. bool foundRoot = false; if (ApplyAsyncContentTransformToTree(root, &foundRoot)) { -#if defined(MOZ_WIDGET_ANDROID) - MOZ_ASSERT(foundRoot); - if (foundRoot && mFixedLayerMargins != ScreenMargin()) { - MoveScrollbarForLayerMargin(root, mRootScrollableId, mFixedLayerMargins); - } -#endif + // Fixed margin considerations should go here, but we never encounter + // those outside of mobile. } // Advance APZ animations to the next expected vsync timestamp, if we can @@ -1458,14 +1371,7 @@ AsyncCompositionManager::SetFirstPaintViewport(const LayerIntPoint& aOffset, const CSSToLayerScale& aZoom, const CSSRect& aCssPageRect) { -#ifdef MOZ_WIDGET_ANDROID - widget::AndroidCompositorWidget* widget = - mLayerManager->GetCompositor()->GetWidget()->AsAndroid(); - if (!widget) { - return; - } - widget->SetFirstPaintViewport(aOffset, aZoom, aCssPageRect); -#endif + // ** STUB ** } void @@ -1478,16 +1384,7 @@ AsyncCompositionManager::SyncFrameMetrics(const ParentLayerPoint& aScrollOffset, int32_t aPaintSyncId, ScreenMargin& aFixedLayerMargins) { -#ifdef MOZ_WIDGET_ANDROID - widget::AndroidCompositorWidget* widget = - mLayerManager->GetCompositor()->GetWidget()->AsAndroid(); - if (!widget) { - return; - } - widget->SyncFrameMetrics( - aScrollOffset, aZoom, aCssPageRect, aDisplayPort, aPaintedResolution, - aLayersUpdated, aPaintSyncId, aFixedLayerMargins); -#endif + // ** STUB ** } } // namespace layers diff --git a/gfx/layers/composite/AsyncCompositionManager.h b/gfx/layers/composite/AsyncCompositionManager.h index 4ec49b1a93..98aaa964e7 100644 --- a/gfx/layers/composite/AsyncCompositionManager.h +++ b/gfx/layers/composite/AsyncCompositionManager.h @@ -238,14 +238,6 @@ private: LayerTransformRecorder mLayerTransformRecorder; TimeStamp mPreviousFrameTimeStamp; - -#ifdef MOZ_WIDGET_ANDROID - // The following two fields are only needed on Fennec with C++ APZ, because - // then we need to reposition the gecko scrollbar to deal with the - // dynamic toolbar shifting content around. - FrameMetrics::ViewID mRootScrollableId; - ScreenMargin mFixedLayerMargins; -#endif }; MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(AsyncCompositionManager::TransformsToSkip) diff --git a/gfx/layers/composite/CanvasLayerComposite.cpp b/gfx/layers/composite/CanvasLayerComposite.cpp index 86f25b1ee1..5ccbeeab9b 100644 --- a/gfx/layers/composite/CanvasLayerComposite.cpp +++ b/gfx/layers/composite/CanvasLayerComposite.cpp @@ -133,18 +133,7 @@ CanvasLayerComposite::CleanupResources() gfx::SamplingFilter CanvasLayerComposite::GetSamplingFilter() { - gfx::SamplingFilter filter = mSamplingFilter; -#ifdef ANDROID - // Bug 691354 - // Using the LINEAR filter we get unexplained artifacts. - // Use NEAREST when no scaling is required. - Matrix matrix; - bool is2D = GetEffectiveTransform().Is2D(&matrix); - if (is2D && !ThebesMatrix(matrix).HasNonTranslationOrFlip()) { - filter = SamplingFilter::POINT; - } -#endif - return filter; + return mSamplingFilter; } void diff --git a/gfx/layers/composite/LayerManagerComposite.cpp b/gfx/layers/composite/LayerManagerComposite.cpp index 800478d559..0ee11bdfb1 100644 --- a/gfx/layers/composite/LayerManagerComposite.cpp +++ b/gfx/layers/composite/LayerManagerComposite.cpp @@ -54,16 +54,6 @@ #include "nsPoint.h" // for nsIntPoint #include "nsRect.h" // for mozilla::gfx::IntRect #include "nsRegion.h" // for nsIntRegion, etc -#ifdef MOZ_WIDGET_ANDROID -#include -#include -#endif -#if defined(MOZ_WIDGET_ANDROID) -#include "opengl/CompositorOGL.h" -#include "GLContextEGL.h" -#include "GLContextProvider.h" -#include "ScopedGLHelpers.h" -#endif #include "GeckoProfiler.h" #include "TextRenderer.h" // for TextRenderer #include "mozilla/layers/CompositorBridgeParent.h" @@ -490,9 +480,6 @@ LayerManagerComposite::UpdateAndRender() } Render(invalid, opaque); -#if defined(MOZ_WIDGET_ANDROID) - RenderToPresentationSurface(); -#endif mGeometryChanged = false; mWindowOverlayChanged = false; @@ -618,42 +605,6 @@ LayerManagerComposite::RenderDebugOverlay(const IntRect& aBounds) } float alpha = 1; -#ifdef ANDROID - // Draw a translation delay warning overlay - int width; - int border; - if (!mWarnTime.IsNull() && (now - mWarnTime).ToMilliseconds() < kVisualWarningDuration) { - EffectChain effects; - - // Black blorder - border = 4; - width = 6; - effects.mPrimaryEffect = new EffectSolidColor(gfx::Color(0, 0, 0, 1)); - mCompositor->DrawQuad(gfx::Rect(border, border, aBounds.width - 2 * border, width), - aBounds, effects, alpha, gfx::Matrix4x4()); - mCompositor->DrawQuad(gfx::Rect(border, aBounds.height - border - width, aBounds.width - 2 * border, width), - aBounds, effects, alpha, gfx::Matrix4x4()); - mCompositor->DrawQuad(gfx::Rect(border, border + width, width, aBounds.height - 2 * border - width * 2), - aBounds, effects, alpha, gfx::Matrix4x4()); - mCompositor->DrawQuad(gfx::Rect(aBounds.width - border - width, border + width, width, aBounds.height - 2 * border - 2 * width), - aBounds, effects, alpha, gfx::Matrix4x4()); - - // Content - border = 5; - width = 4; - effects.mPrimaryEffect = new EffectSolidColor(gfx::Color(1, 1.f - mWarningLevel, 0, 1)); - mCompositor->DrawQuad(gfx::Rect(border, border, aBounds.width - 2 * border, width), - aBounds, effects, alpha, gfx::Matrix4x4()); - mCompositor->DrawQuad(gfx::Rect(border, aBounds.height - border - width, aBounds.width - 2 * border, width), - aBounds, effects, alpha, gfx::Matrix4x4()); - mCompositor->DrawQuad(gfx::Rect(border, border + width, width, aBounds.height - 2 * border - width * 2), - aBounds, effects, alpha, gfx::Matrix4x4()); - mCompositor->DrawQuad(gfx::Rect(aBounds.width - border - width, border + width, width, aBounds.height - 2 * border - 2 * width), - aBounds, effects, alpha, gfx::Matrix4x4()); - SetDebugOverlayWantsNextFrame(true); - } -#endif - float fillRatio = mCompositor->GetFillRatio(); mFPS->DrawFPS(now, drawFrameColorBars ? 10 : 1, 2, unsigned(fillRatio), mCompositor); @@ -932,8 +883,6 @@ LayerManagerComposite::Render(const nsIntRegion& aInvalidRegion, const nsIntRegi mozilla::widget::WidgetRenderingContext widgetContext; #if defined(XP_MACOSX) widgetContext.mLayerManager = this; -#elif defined(MOZ_WIDGET_ANDROID) - widgetContext.mCompositor = GetCompositor(); #endif { @@ -952,14 +901,6 @@ LayerManagerComposite::Render(const nsIntRegion& aInvalidRegion, const nsIntRegi CompositorBench(mCompositor, bounds); MOZ_ASSERT(mRoot->GetOpacity() == 1); -#if defined(MOZ_WIDGET_ANDROID) - LayerMetricsWrapper wrapper = GetRootContentLayer(); - if (wrapper) { - mCompositor->SetClearColor(wrapper.Metadata().GetBackgroundColor()); - } else { - mCompositor->SetClearColorToDefault(); - } -#endif if (mRoot->GetClipRect()) { clipRect = *mRoot->GetClipRect(); IntRect rect(clipRect.x, clipRect.y, clipRect.width, clipRect.height); @@ -1029,182 +970,6 @@ LayerManagerComposite::Render(const nsIntRegion& aInvalidRegion, const nsIntRegi RecordFrame(); } -#if defined(MOZ_WIDGET_ANDROID) -class ScopedCompositorProjMatrix { -public: - ScopedCompositorProjMatrix(CompositorOGL* aCompositor, const Matrix4x4& aProjMatrix): - mCompositor(aCompositor), - mOriginalProjMatrix(mCompositor->GetProjMatrix()) - { - mCompositor->SetProjMatrix(aProjMatrix); - } - - ~ScopedCompositorProjMatrix() - { - mCompositor->SetProjMatrix(mOriginalProjMatrix); - } -private: - CompositorOGL* const mCompositor; - const Matrix4x4 mOriginalProjMatrix; -}; - -class ScopedCompostitorSurfaceSize { -public: - ScopedCompostitorSurfaceSize(CompositorOGL* aCompositor, const gfx::IntSize& aSize) : - mCompositor(aCompositor), - mOriginalSize(mCompositor->GetDestinationSurfaceSize()) - { - mCompositor->SetDestinationSurfaceSize(aSize); - } - ~ScopedCompostitorSurfaceSize() - { - mCompositor->SetDestinationSurfaceSize(mOriginalSize); - } -private: - CompositorOGL* const mCompositor; - const gfx::IntSize mOriginalSize; -}; - -class ScopedCompositorRenderOffset { -public: - ScopedCompositorRenderOffset(CompositorOGL* aCompositor, const ScreenPoint& aOffset) : - mCompositor(aCompositor), - mOriginalOffset(mCompositor->GetScreenRenderOffset()) - { - mCompositor->SetScreenRenderOffset(aOffset); - } - ~ScopedCompositorRenderOffset() - { - mCompositor->SetScreenRenderOffset(mOriginalOffset); - } -private: - CompositorOGL* const mCompositor; - const ScreenPoint mOriginalOffset; -}; - -class ScopedContextSurfaceOverride { -public: - ScopedContextSurfaceOverride(GLContextEGL* aContext, void* aSurface) : - mContext(aContext) - { - MOZ_ASSERT(aSurface); - mContext->SetEGLSurfaceOverride(aSurface); - mContext->MakeCurrent(true); - } - ~ScopedContextSurfaceOverride() - { - mContext->SetEGLSurfaceOverride(EGL_NO_SURFACE); - mContext->MakeCurrent(true); - } -private: - GLContextEGL* const mContext; -}; - -void -LayerManagerComposite::RenderToPresentationSurface() -{ -#ifdef MOZ_WIDGET_ANDROID - nsIWidget* const widget = mCompositor->GetWidget()->RealWidget(); - auto window = static_cast( - widget->GetNativeData(NS_PRESENTATION_WINDOW)); - - if (!window) { - return; - } - - EGLSurface surface = widget->GetNativeData(NS_PRESENTATION_SURFACE); - - if (!surface) { - //create surface; - surface = GLContextProviderEGL::CreateEGLSurface(window); - if (!surface) { - return; - } - - widget->SetNativeData(NS_PRESENTATION_SURFACE, - reinterpret_cast(surface)); - } - - CompositorOGL* compositor = mCompositor->AsCompositorOGL(); - GLContext* gl = compositor->gl(); - GLContextEGL* egl = GLContextEGL::Cast(gl); - - if (!egl) { - return; - } - - const IntSize windowSize(ANativeWindow_getWidth(window), - ANativeWindow_getHeight(window)); - -#endif - - if ((windowSize.width <= 0) || (windowSize.height <= 0)) { - return; - } - - ScreenRotation rotation = compositor->GetScreenRotation(); - - const int actualWidth = windowSize.width; - const int actualHeight = windowSize.height; - - const gfx::IntSize originalSize = compositor->GetDestinationSurfaceSize(); - const nsIntRect originalRect = nsIntRect(0, 0, originalSize.width, originalSize.height); - - int pageWidth = originalSize.width; - int pageHeight = originalSize.height; - if (rotation == ROTATION_90 || rotation == ROTATION_270) { - pageWidth = originalSize.height; - pageHeight = originalSize.width; - } - - float scale = 1.0; - - if ((pageWidth > actualWidth) || (pageHeight > actualHeight)) { - const float scaleWidth = (float)actualWidth / (float)pageWidth; - const float scaleHeight = (float)actualHeight / (float)pageHeight; - scale = scaleWidth <= scaleHeight ? scaleWidth : scaleHeight; - } - - const gfx::IntSize actualSize(actualWidth, actualHeight); - ScopedCompostitorSurfaceSize overrideSurfaceSize(compositor, actualSize); - - const ScreenPoint offset((actualWidth - (int)(scale * pageWidth)) / 2, 0); - ScopedContextSurfaceOverride overrideSurface(egl, surface); - - Matrix viewMatrix = ComputeTransformForRotation(originalRect, - rotation); - viewMatrix.Invert(); // unrotate - viewMatrix.PostScale(scale, scale); - viewMatrix.PostTranslate(offset.x, offset.y); - Matrix4x4 matrix = Matrix4x4::From2D(viewMatrix); - - mRoot->ComputeEffectiveTransforms(matrix); - nsIntRegion opaque; - LayerIntRegion visible; - PostProcessLayers(mRoot, opaque, visible, Nothing()); - - nsIntRegion invalid; - IntRect bounds = IntRect::Truncate(0, 0, scale * pageWidth, actualHeight); - IntRect rect, actualBounds; - MOZ_ASSERT(mRoot->GetOpacity() == 1); - mCompositor->BeginFrame(invalid, nullptr, bounds, nsIntRegion(), &rect, &actualBounds); - - // The Java side of Fennec sets a scissor rect that accounts for - // chrome such as the URL bar. Override that so that the entire frame buffer - // is cleared. - ScopedScissorRect scissorRect(egl, 0, 0, actualWidth, actualHeight); - egl->fClearColor(0.0, 0.0, 0.0, 0.0); - egl->fClear(LOCAL_GL_COLOR_BUFFER_BIT); - - const IntRect clipRect = IntRect::Truncate(0, 0, actualWidth, actualHeight); - - RootLayer()->Prepare(RenderTargetIntRect::FromUnknownRect(clipRect)); - RootLayer()->RenderLayer(clipRect); - - mCompositor->EndFrame(); -} -#endif - already_AddRefed LayerManagerComposite::CreatePaintedLayerComposite() { diff --git a/gfx/layers/composite/LayerManagerComposite.h b/gfx/layers/composite/LayerManagerComposite.h index 8fe7a6b34a..ea4b203ac4 100644 --- a/gfx/layers/composite/LayerManagerComposite.h +++ b/gfx/layers/composite/LayerManagerComposite.h @@ -327,9 +327,6 @@ private: * Render the current layer tree to the active target. */ void Render(const nsIntRegion& aInvalidRegion, const nsIntRegion& aOpaqueRegion); -#if defined(MOZ_WIDGET_ANDROID) - void RenderToPresentationSurface(); -#endif /** * We need to know our invalid region before we're ready to render. diff --git a/gfx/layers/ipc/CompositorBridgeParent.cpp b/gfx/layers/ipc/CompositorBridgeParent.cpp index e6bf2d991a..25ac10130d 100644 --- a/gfx/layers/ipc/CompositorBridgeParent.cpp +++ b/gfx/layers/ipc/CompositorBridgeParent.cpp @@ -369,16 +369,6 @@ CompositorVsyncScheduler::ScheduleComposition() if (mAsapScheduling) { // Used only for performance testing purposes PostCompositeTask(TimeStamp::Now()); -#ifdef MOZ_WIDGET_ANDROID - } else if (mNeedsComposite >= 2 && mIsObservingVsync) { - // uh-oh, we already requested a composite at least twice so far, and a - // composite hasn't happened yet. It is possible that the vsync observation - // is blocked on the main thread, so let's just composite ASAP and not - // wait for the vsync. Note that this should only ever happen on Fennec - // because there content runs in the same process as the compositor, and so - // content can actually block the main thread in this process. - PostCompositeTask(TimeStamp::Now()); -#endif } else { SetNeedsComposite(); } @@ -953,11 +943,6 @@ CompositorBridgeParent::ResumeComposition() MonitorAutoLock lock(mResumeCompositionMonitor); if (!mCompositor->Resume()) { -#ifdef MOZ_WIDGET_ANDROID - // We can't get a surface. This could be because the activity changed between - // the time resume was scheduled and now. - __android_log_print(ANDROID_LOG_INFO, "CompositorBridgeParent", "Unable to renew compositor surface; remaining in paused state"); -#endif lock.NotifyAll(); return; } diff --git a/gfx/layers/ipc/RemoteContentController.cpp b/gfx/layers/ipc/RemoteContentController.cpp index 54a08eed3d..d71476a780 100644 --- a/gfx/layers/ipc/RemoteContentController.cpp +++ b/gfx/layers/ipc/RemoteContentController.cpp @@ -18,9 +18,6 @@ #include "mozilla/gfx/GPUProcessManager.h" #include "mozilla/Unused.h" #include "Units.h" -#ifdef MOZ_WIDGET_ANDROID -#include "AndroidBridge.h" -#endif namespace mozilla { namespace layers { @@ -90,8 +87,7 @@ RemoteContentController::HandleTap(TapType aTapType, if (NS_IsMainThread()) { HandleTapOnMainThread(aTapType, aPoint, aModifiers, aGuid, aInputBlockId); } else { - // We don't want to get the TabParent or call TabParent::SendHandleTap() from a non-main thread (this might happen - // on Android, where this is called from the Java UI thread) + // We don't want to get the TabParent or call TabParent::SendHandleTap() from a non-main thread NS_DispatchToMainThread(NewRunnableMethod (this, &RemoteContentController::HandleTapOnMainThread, aTapType, aPoint, aModifiers, aGuid, aInputBlockId)); } @@ -139,12 +135,8 @@ RemoteContentController::NotifyPinchGesture(PinchGestureInput::PinchGestureType void RemoteContentController::PostDelayedTask(already_AddRefed aTask, int aDelayMs) { -#ifdef MOZ_WIDGET_ANDROID - AndroidBridge::Bridge()->PostTaskToUiThread(Move(aTask), aDelayMs); -#else (MessageLoop::current() ? MessageLoop::current() : mCompositorThread)-> PostDelayedTask(Move(aTask), aDelayMs); -#endif } bool diff --git a/gfx/layers/moz.build b/gfx/layers/moz.build index d67bc74d4b..f0fedf404c 100644 --- a/gfx/layers/moz.build +++ b/gfx/layers/moz.build @@ -228,11 +228,6 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': 'opengl/GLManager.cpp', ] -if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': - SOURCES += [ - 'apz/src/AndroidAPZ.cpp', - ] - SOURCES += [ 'apz/public/IAPZCTreeManager.cpp', 'apz/src/APZCTreeManager.cpp', diff --git a/gfx/layers/opengl/CompositorOGL.cpp b/gfx/layers/opengl/CompositorOGL.cpp index 93656d72a0..6e5a011004 100644 --- a/gfx/layers/opengl/CompositorOGL.cpp +++ b/gfx/layers/opengl/CompositorOGL.cpp @@ -43,10 +43,6 @@ #include "GLBlitTextureImageHelper.h" #include "HeapCopyOfStackArray.h" -#if MOZ_WIDGET_ANDROID -#include "TexturePoolOGL.h" -#endif - #include "GeckoProfiler.h" namespace mozilla { @@ -229,13 +225,6 @@ CompositorOGL::Initialize(nsCString* const out_failureReason) mGLContext = CreateContext(); -#ifdef MOZ_WIDGET_ANDROID - if (!mGLContext){ - *out_failureReason = "FEATURE_FAILURE_OPENGL_NO_ANDROID_CONTEXT"; - NS_RUNTIMEABORT("We need a context on Android"); - } -#endif - if (!mGLContext){ *out_failureReason = "FEATURE_FAILURE_OPENGL_CREATE_CONTEXT"; return false; @@ -673,10 +662,6 @@ CompositorOGL::BeginFrame(const nsIntRegion& aInvalidRegion, mPixelsPerFrame = width * height; mPixelsFilled = 0; -#ifdef MOZ_WIDGET_ANDROID - TexturePoolOGL::Fill(gl()); -#endif - // Default blend function implements "OVER" mGLContext->fBlendFuncSeparate(LOCAL_GL_ONE, LOCAL_GL_ONE_MINUS_SRC_ALPHA, LOCAL_GL_ONE, LOCAL_GL_ONE_MINUS_SRC_ALPHA); @@ -1707,19 +1692,13 @@ CompositorOGL::CopyToTarget(DrawTarget* aTarget, const nsIntPoint& aTopLeft, con void CompositorOGL::Pause() { -#ifdef MOZ_WIDGET_ANDROID - if (!gl() || gl()->IsDestroyed()) - return; - - // ReleaseSurface internally calls MakeCurrent. - gl()->ReleaseSurface(); -#endif + // This was only used on Android } bool CompositorOGL::Resume() { -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_UIKIT) +#if defined(MOZ_WIDGET_UIKIT) if (!gl() || gl()->IsDestroyed()) return false; diff --git a/gfx/layers/opengl/TextureClientOGL.cpp b/gfx/layers/opengl/TextureClientOGL.cpp index 78d4e6d9c9..1e337717b2 100644 --- a/gfx/layers/opengl/TextureClientOGL.cpp +++ b/gfx/layers/opengl/TextureClientOGL.cpp @@ -73,64 +73,5 @@ EGLImageTextureData::Serialize(SurfaceDescriptor& aOutDescriptor) return true; } -//////////////////////////////////////////////////////////////////////// -// AndroidSurface - -#ifdef MOZ_WIDGET_ANDROID - -already_AddRefed -AndroidSurfaceTextureData::CreateTextureClient(AndroidSurfaceTexture* aSurfTex, - gfx::IntSize aSize, - gl::OriginPos aOriginPos, - LayersIPCChannel* aAllocator, - TextureFlags aFlags) -{ - MOZ_ASSERT(XRE_IsParentProcess(), - "Can't pass an android surfaces between processes."); - - if (!aSurfTex || !XRE_IsParentProcess()) { - return nullptr; - } - - if (aOriginPos == gl::OriginPos::BottomLeft) { - aFlags |= TextureFlags::ORIGIN_BOTTOM_LEFT; - } - - return TextureClient::CreateWithData( - new AndroidSurfaceTextureData(aSurfTex, aSize), - aFlags, aAllocator - ); -} - -AndroidSurfaceTextureData::AndroidSurfaceTextureData(AndroidSurfaceTexture* aSurfTex, - gfx::IntSize aSize) - : mSurfTex(aSurfTex) - , mSize(aSize) -{} - -AndroidSurfaceTextureData::~AndroidSurfaceTextureData() -{} - -void -AndroidSurfaceTextureData::FillInfo(TextureData::Info& aInfo) const -{ - aInfo.size = mSize; - aInfo.format = gfx::SurfaceFormat::UNKNOWN; - aInfo.hasIntermediateBuffer = false; - aInfo.hasSynchronization = false; - aInfo.supportsMoz2D = false; - aInfo.canExposeMappedData = false; -} - -bool -AndroidSurfaceTextureData::Serialize(SurfaceDescriptor& aOutDescriptor) -{ - aOutDescriptor = SurfaceTextureDescriptor((uintptr_t)mSurfTex.get(), - mSize); - return true; -} - -#endif // MOZ_WIDGET_ANDROID - } // namespace layers } // namespace mozilla diff --git a/gfx/layers/opengl/TextureClientOGL.h b/gfx/layers/opengl/TextureClientOGL.h index 6555f138ad..b996f7eba7 100644 --- a/gfx/layers/opengl/TextureClientOGL.h +++ b/gfx/layers/opengl/TextureClientOGL.h @@ -14,7 +14,6 @@ #include "mozilla/layers/CompositorTypes.h" #include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor #include "mozilla/layers/TextureClient.h" // for TextureClient, etc -#include "AndroidSurfaceTexture.h" namespace mozilla { @@ -48,41 +47,6 @@ protected: const gfx::IntSize mSize; }; -#ifdef MOZ_WIDGET_ANDROID - -class AndroidSurfaceTextureData : public TextureData -{ -public: - static already_AddRefed - CreateTextureClient(gl::AndroidSurfaceTexture* aSurfTex, - gfx::IntSize aSize, - gl::OriginPos aOriginPos, - LayersIPCChannel* aAllocator, - TextureFlags aFlags); - - ~AndroidSurfaceTextureData(); - - virtual void FillInfo(TextureData::Info& aInfo) const override; - - virtual bool Serialize(SurfaceDescriptor& aOutDescriptor) override; - - // Useless functions. - virtual bool Lock(OpenMode) override { return true; } - - virtual void Unlock() override {} - - // Our data is always owned externally. - virtual void Deallocate(LayersIPCChannel*) override {} - -protected: - AndroidSurfaceTextureData(gl::AndroidSurfaceTexture* aSurfTex, gfx::IntSize aSize); - - const RefPtr mSurfTex; - const gfx::IntSize mSize; -}; - -#endif // MOZ_WIDGET_ANDROID - } // namespace layers } // namespace mozilla diff --git a/gfx/layers/opengl/TextureHostOGL.cpp b/gfx/layers/opengl/TextureHostOGL.cpp index 02c398b51f..bc06444b0f 100644 --- a/gfx/layers/opengl/TextureHostOGL.cpp +++ b/gfx/layers/opengl/TextureHostOGL.cpp @@ -16,7 +16,6 @@ #include "mozilla/gfx/Logging.h" // for gfxCriticalError #include "mozilla/layers/ISurfaceAllocator.h" #include "nsRegion.h" // for nsIntRegion -#include "AndroidSurfaceTexture.h" #include "GfxTexturesReporter.h" // for GfxTexturesReporter #include "GLBlitTextureImageHelper.h" #include "GeckoProfiler.h" @@ -40,16 +39,6 @@ CreateTextureHostOGL(const SurfaceDescriptor& aDesc, { RefPtr result; switch (aDesc.type()) { -#ifdef MOZ_WIDGET_ANDROID - case SurfaceDescriptor::TSurfaceTextureDescriptor: { - const SurfaceTextureDescriptor& desc = aDesc.get_SurfaceTextureDescriptor(); - result = new SurfaceTextureHost(aFlags, - (AndroidSurfaceTexture*)desc.surfTex(), - desc.size()); - break; - } -#endif - case SurfaceDescriptor::TEGLImageDescriptor: { const EGLImageDescriptor& desc = aDesc.get_EGLImageDescriptor(); result = new EGLImageTextureHost(aFlags, @@ -346,177 +335,6 @@ GLTextureSource::gl() const return mCompositor ? mCompositor->gl() : nullptr; } -//////////////////////////////////////////////////////////////////////// -//////////////////////////////////////////////////////////////////////// -// SurfaceTextureHost - -#ifdef MOZ_WIDGET_ANDROID - -SurfaceTextureSource::SurfaceTextureSource(CompositorOGL* aCompositor, - AndroidSurfaceTexture* aSurfTex, - gfx::SurfaceFormat aFormat, - GLenum aTarget, - GLenum aWrapMode, - gfx::IntSize aSize) - : mCompositor(aCompositor) - , mSurfTex(aSurfTex) - , mFormat(aFormat) - , mTextureTarget(aTarget) - , mWrapMode(aWrapMode) - , mSize(aSize) -{ -} - -void -SurfaceTextureSource::BindTexture(GLenum aTextureUnit, - gfx::SamplingFilter aSamplingFilter) -{ - MOZ_ASSERT(mSurfTex); - GLContext* gl = this->gl(); - if (!gl || !gl->MakeCurrent()) { - NS_WARNING("Trying to bind a texture without a GLContext"); - return; - } - - gl->fActiveTexture(aTextureUnit); - - // SurfaceTexture spams us if there are any existing GL errors, so - // we'll clear them here in order to avoid that. - gl->FlushErrors(); - - mSurfTex->UpdateTexImage(); - - ApplySamplingFilterToBoundTexture(gl, aSamplingFilter, mTextureTarget); -} - -void -SurfaceTextureSource::SetCompositor(Compositor* aCompositor) -{ - CompositorOGL* glCompositor = AssertGLCompositor(aCompositor); - if (!glCompositor) { - DeallocateDeviceData(); - return; - } - if (mCompositor != glCompositor) { - DeallocateDeviceData(); - } - - mCompositor = glCompositor; -} - -bool -SurfaceTextureSource::IsValid() const -{ - return !!gl(); -} - -gl::GLContext* -SurfaceTextureSource::gl() const -{ - return mCompositor ? mCompositor->gl() : nullptr; -} - -gfx::Matrix4x4 -SurfaceTextureSource::GetTextureTransform() -{ - MOZ_ASSERT(mSurfTex); - - gfx::Matrix4x4 ret; - mSurfTex->GetTransformMatrix(ret); - - return ret; -} - -void -SurfaceTextureSource::DeallocateDeviceData() -{ - mSurfTex = nullptr; -} - -//////////////////////////////////////////////////////////////////////// - -SurfaceTextureHost::SurfaceTextureHost(TextureFlags aFlags, - AndroidSurfaceTexture* aSurfTex, - gfx::IntSize aSize) - : TextureHost(aFlags) - , mSurfTex(aSurfTex) - , mSize(aSize) - , mCompositor(nullptr) -{ -} - -SurfaceTextureHost::~SurfaceTextureHost() -{ -} - -gl::GLContext* -SurfaceTextureHost::gl() const -{ - return mCompositor ? mCompositor->gl() : nullptr; -} - -bool -SurfaceTextureHost::Lock() -{ - MOZ_ASSERT(mSurfTex); - GLContext* gl = this->gl(); - if (!gl || !gl->MakeCurrent()) { - return false; - } - - if (!mTextureSource) { - gfx::SurfaceFormat format = gfx::SurfaceFormat::R8G8B8A8; - GLenum target = LOCAL_GL_TEXTURE_EXTERNAL; - GLenum wrapMode = LOCAL_GL_CLAMP_TO_EDGE; - mTextureSource = new SurfaceTextureSource(mCompositor, - mSurfTex, - format, - target, - wrapMode, - mSize); - } - - return NS_SUCCEEDED(mSurfTex->Attach(gl)); -} - -void -SurfaceTextureHost::Unlock() -{ - MOZ_ASSERT(mSurfTex); - mSurfTex->Detach(); -} - -void -SurfaceTextureHost::SetCompositor(Compositor* aCompositor) -{ - CompositorOGL* glCompositor = AssertGLCompositor(aCompositor); - if (!glCompositor) { - DeallocateDeviceData(); - return; - } - mCompositor = glCompositor; - if (mTextureSource) { - mTextureSource->SetCompositor(glCompositor); - } -} - -gfx::SurfaceFormat -SurfaceTextureHost::GetFormat() const -{ - return mTextureSource ? mTextureSource->GetFormat() : gfx::SurfaceFormat::UNKNOWN; -} - -void -SurfaceTextureHost::DeallocateDeviceData() -{ - if (mTextureSource) { - mTextureSource->DeallocateDeviceData(); - } - mSurfTex = nullptr; -} - -#endif // MOZ_WIDGET_ANDROID - //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // EGLImage diff --git a/gfx/layers/opengl/TextureHostOGL.h b/gfx/layers/opengl/TextureHostOGL.h index dd425e768c..cac58ee65d 100644 --- a/gfx/layers/opengl/TextureHostOGL.h +++ b/gfx/layers/opengl/TextureHostOGL.h @@ -36,10 +36,6 @@ namespace gfx { class DataSourceSurface; } // namespace gfx -namespace gl { -class AndroidSurfaceTexture; -} // namespace gl - namespace layers { class Compositor; @@ -335,103 +331,6 @@ protected: RefPtr mTextureSource; }; -//////////////////////////////////////////////////////////////////////// -// SurfaceTexture - -#ifdef MOZ_WIDGET_ANDROID - -class SurfaceTextureSource : public TextureSource - , public TextureSourceOGL -{ -public: - SurfaceTextureSource(CompositorOGL* aCompositor, - mozilla::gl::AndroidSurfaceTexture* aSurfTex, - gfx::SurfaceFormat aFormat, - GLenum aTarget, - GLenum aWrapMode, - gfx::IntSize aSize); - - virtual const char* Name() const override { return "SurfaceTextureSource"; } - - virtual TextureSourceOGL* AsSourceOGL() override { return this; } - - virtual void BindTexture(GLenum activetex, - gfx::SamplingFilter aSamplingFilter) override; - - virtual bool IsValid() const override; - - virtual gfx::IntSize GetSize() const override { return mSize; } - - virtual gfx::SurfaceFormat GetFormat() const override { return mFormat; } - - virtual gfx::Matrix4x4 GetTextureTransform() override; - - virtual GLenum GetTextureTarget() const override { return mTextureTarget; } - - virtual GLenum GetWrapMode() const override { return mWrapMode; } - - virtual void DeallocateDeviceData() override; - - virtual void SetCompositor(Compositor* aCompositor) override; - - gl::GLContext* gl() const; - -protected: - RefPtr mCompositor; - RefPtr mSurfTex; - const gfx::SurfaceFormat mFormat; - const GLenum mTextureTarget; - const GLenum mWrapMode; - const gfx::IntSize mSize; -}; - -class SurfaceTextureHost : public TextureHost -{ -public: - SurfaceTextureHost(TextureFlags aFlags, - mozilla::gl::AndroidSurfaceTexture* aSurfTex, - gfx::IntSize aSize); - - virtual ~SurfaceTextureHost(); - - virtual void DeallocateDeviceData() override; - - virtual void SetCompositor(Compositor* aCompositor) override; - - virtual Compositor* GetCompositor() override { return mCompositor; } - - virtual bool Lock() override; - - virtual void Unlock() override; - - virtual gfx::SurfaceFormat GetFormat() const override; - - virtual bool BindTextureSource(CompositableTextureSourceRef& aTexture) override - { - aTexture = mTextureSource; - return !!aTexture; - } - - virtual already_AddRefed GetAsSurface() override - { - return nullptr; // XXX - implement this (for MOZ_DUMP_PAINTING) - } - - gl::GLContext* gl() const; - - virtual gfx::IntSize GetSize() const override { return mSize; } - - virtual const char* Name() override { return "SurfaceTextureHost"; } - -protected: - RefPtr mSurfTex; - const gfx::IntSize mSize; - RefPtr mCompositor; - RefPtr mTextureSource; -}; - -#endif // MOZ_WIDGET_ANDROID - //////////////////////////////////////////////////////////////////////// // EGLImage diff --git a/layout/base/AccessibleCaretManager.cpp b/layout/base/AccessibleCaretManager.cpp index ea73a5379a..4dd55009cc 100644 --- a/layout/base/AccessibleCaretManager.cpp +++ b/layout/base/AccessibleCaretManager.cpp @@ -22,9 +22,6 @@ #include "nsFrameSelection.h" #include "nsGenericHTMLElement.h" #include "nsIHapticFeedback.h" -#ifdef MOZ_WIDGET_ANDROID -#include "nsWindow.h" -#endif namespace mozilla { @@ -896,15 +893,6 @@ AccessibleCaretManager::SetSelectionDragState(bool aState) const if (fs) { fs->SetDragState(aState); } - - // Pin Fennecs DynamicToolbarAnimator in place before/after dragging, - // to avoid co-incident screen scrolling. - #ifdef MOZ_WIDGET_ANDROID - nsIDocument* doc = mPresShell->GetDocument(); - MOZ_ASSERT(doc); - nsIWidget* widget = nsContentUtils::WidgetForDocument(doc); - static_cast(widget)->SetSelectionDragState(aState); - #endif } void diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index 934d108e0b..8695cd6503 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -2502,7 +2502,6 @@ ContainerState::PreparePaintedLayerForUse(PaintedLayer* aLayer, aData->mVisibilityComputedRegion.SetEmpty(); // FIXME: Temporary workaround for bug 681192 and bug 724786. -#ifndef MOZ_WIDGET_ANDROID // Calculate exact position of the top-left of the active scrolled root. // This might not be 0,0 due to the snapping in ScaleToNearestPixels. gfxPoint animatedGeometryRootTopLeft = scaledOffset - ThebesPoint(matrix.GetTranslation()) + mParameters.mOffset; @@ -2515,9 +2514,6 @@ ContainerState::PreparePaintedLayerForUse(PaintedLayer* aLayer, } else if (didResetScrollPositionForLayerPixelAlignment) { aData->mAnimatedGeometryRootPosition = animatedGeometryRootTopLeft; } -#else - Unused << didResetScrollPositionForLayerPixelAlignment; -#endif } #if defined(DEBUG) || defined(MOZ_DUMP_PAINTING) diff --git a/layout/base/PositionedEventTargeting.cpp b/layout/base/PositionedEventTargeting.cpp index 668ff29389..731e951e5e 100644 --- a/layout/base/PositionedEventTargeting.cpp +++ b/layout/base/PositionedEventTargeting.cpp @@ -620,8 +620,6 @@ FindFrameTargetedByInputEvent(WidgetGUIEvent* aEvent, PET_LOG("Final target is %p\n", target); // Uncomment this to dump the frame tree to help with debugging. - // Note that dumping the frame tree at the top of the function may flood - // logcat on Android devices and cause the PET_LOGs to get dropped. // aRootFrame->DumpFrameTree(); if (!target || !prefs->mRepositionEventCoords) { diff --git a/layout/base/ZoomConstraintsClient.cpp b/layout/base/ZoomConstraintsClient.cpp index 2391a116dd..67666676b4 100644 --- a/layout/base/ZoomConstraintsClient.cpp +++ b/layout/base/ZoomConstraintsClient.cpp @@ -53,7 +53,7 @@ GetWidget(nsIPresShell* aShell) return nullptr; } if (nsIFrame* rootFrame = aShell->GetRootFrame()) { -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_UIKIT) +#if defined(MOZ_WIDGET_UIKIT) return rootFrame->GetNearestWidget(); #else if (nsView* view = rootFrame->GetView()) { diff --git a/layout/base/crashtests/crashtests.list b/layout/base/crashtests/crashtests.list index 9b09d1c843..1a3bf667ba 100644 --- a/layout/base/crashtests/crashtests.list +++ b/layout/base/crashtests/crashtests.list @@ -294,7 +294,7 @@ load 469861-1.xhtml load 469861-2.xhtml load 470851-1.xhtml load 471594-1.xhtml -asserts-if(Android&&!asyncPan,1-2) load 473042.xhtml # bug 1034369 (may also cause a few assertions to be registered on the next test) +load 473042.xhtml # bug 1034369 (may also cause a few assertions to be registered on the next test) asserts(0-5) load 474075.html # bug 847368 load 477333-1.xhtml load 477731-1.html @@ -411,7 +411,7 @@ load 709536-1.xhtml load 722137.html load 725535.html load 727601.html -skip-if(Android) asserts(0-2) pref(dom.disable_open_during_load,false) load 735943.html # the assertion is bug 735966, for android bug 760271 +asserts(0-2) pref(dom.disable_open_during_load,false) load 735943.html # the assertion is bug 735966 asserts(0-2) load 736389-1.xhtml # sometimes the above assertions are delayed and is reported on this test instead load 736924-1.html load 749816-1.html @@ -447,7 +447,7 @@ load 866588.html load 876092.html load 876221.html load 897852.html -asserts(4-6) asserts-if(Android&&!asyncPan,2) load 898913.html # bug 847368 +asserts(4-6) load 898913.html # bug 847368 pref(layers.acceleration.enabled,false) pref(layers.force-active,true) load 919434.html load 926728.html load 930381.html diff --git a/layout/base/moz.build b/layout/base/moz.build index faf421f2ee..51cab4c6ba 100644 --- a/layout/base/moz.build +++ b/layout/base/moz.build @@ -193,11 +193,6 @@ LOCAL_INCLUDES += [ '/view', ] -if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': - LOCAL_INCLUDES += [ - '/widget/android', - ] - FINAL_LIBRARY = 'xul' BROWSER_CHROME_MANIFESTS += ['tests/browser.ini'] diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 21068b6736..45b95826c0 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -3668,14 +3668,8 @@ nsCSSFrameConstructor::FindInputData(Element* aElement, nsCSSAnonBoxes::buttonContent) }, // TODO: this is temporary until a frame is written: bug 635240. SIMPLE_INT_CREATE(NS_FORM_INPUT_NUMBER, NS_NewNumberControlFrame), -#if defined(MOZ_WIDGET_ANDROID) - // On Android/B2G, date/time input appears as a normal text box. - SIMPLE_INT_CREATE(NS_FORM_INPUT_TIME, NS_NewTextControlFrame), - SIMPLE_INT_CREATE(NS_FORM_INPUT_DATE, NS_NewTextControlFrame), -#else SIMPLE_INT_CREATE(NS_FORM_INPUT_TIME, NS_NewDateTimeControlFrame), SIMPLE_INT_CREATE(NS_FORM_INPUT_DATE, NS_NewDateTimeControlFrame), -#endif // TODO: this is temporary until a frame is written: bug 888320 SIMPLE_INT_CREATE(NS_FORM_INPUT_MONTH, NS_NewTextControlFrame), // TODO: this is temporary until a frame is written: bug 888320 diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp index a66a1edacd..a0af38c289 100644 --- a/layout/base/nsDocumentViewer.cpp +++ b/layout/base/nsDocumentViewer.cpp @@ -4326,7 +4326,7 @@ nsDocumentViewer::ShouldAttachToTopLevel() if (nsIWidget::UsePuppetWidgets()) return true; -#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_UIKIT) +#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_UIKIT) // On windows, in the parent process we also attach, but just to // chrome items nsWindowType winType = mParentWidget->WindowType(); diff --git a/layout/base/nsIPresShell.h b/layout/base/nsIPresShell.h index 5f83b9c153..cf19867ef0 100644 --- a/layout/base/nsIPresShell.h +++ b/layout/base/nsIPresShell.h @@ -1711,10 +1711,6 @@ public: void SyncWindowProperties(nsView* aView); -#ifdef ANDROID - virtual nsIDocument* GetTouchEventTargetDocument() = 0; -#endif - protected: friend class nsRefreshDriver; diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index f2d166470d..86a11bce9e 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -911,11 +911,6 @@ ApplyRectMultiplier(nsRect aRect, float aMultiplier) bool nsLayoutUtils::UsesAsyncScrolling(nsIFrame* aFrame) { -#ifdef MOZ_WIDGET_ANDROID - // We always have async scrolling for android - return true; -#endif - return AsyncPanZoomEnabled(aFrame); } @@ -8104,7 +8099,7 @@ UpdateCompositionBoundsForRCDRSF(ParentLayerRect& aCompBounds, return false; } -#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_UIKIT) +#if defined(MOZ_WIDGET_UIKIT) nsIWidget* widget = rootFrame->GetNearestWidget(); #else nsView* view = rootFrame->GetView(); diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index b1b2671c4e..1fb2231723 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -197,10 +197,6 @@ #include "mozilla/StyleSheetInlines.h" #include "mozilla/dom/ImageTracker.h" -#ifdef ANDROID -#include "nsIDocShellTreeOwner.h" -#endif - #ifdef MOZ_TASK_TRACER #include "GeckoTaskTracer.h" using namespace mozilla::tasktracer; @@ -7287,12 +7283,6 @@ PresShell::HandleEvent(nsIFrame* aFrame, // if the mouse is being captured then retarget the mouse event at the // document that is being captured. retargetEventDoc = capturingContent->GetComposedDoc(); -#ifdef ANDROID - } else if ((aEvent->mClass == eTouchEventClass) || - (aEvent->mClass == eMouseEventClass) || - (aEvent->mClass == eWheelEventClass)) { - retargetEventDoc = GetTouchEventTargetDocument(); -#endif } if (retargetEventDoc) { @@ -7846,38 +7836,6 @@ PresShell::HandleEvent(nsIFrame* aFrame, return rv; } -#ifdef ANDROID -nsIDocument* -PresShell::GetTouchEventTargetDocument() -{ - nsPresContext* context = GetPresContext(); - if (!context || !context->IsRoot()) { - return nullptr; - } - - nsCOMPtr shellAsTreeItem = context->GetDocShell(); - if (!shellAsTreeItem) { - return nullptr; - } - - nsCOMPtr owner; - shellAsTreeItem->GetTreeOwner(getter_AddRefs(owner)); - if (!owner) { - return nullptr; - } - - // now get the primary content shell (active tab) - nsCOMPtr item; - owner->GetPrimaryContentShell(getter_AddRefs(item)); - nsCOMPtr childDocShell = do_QueryInterface(item); - if (!childDocShell) { - return nullptr; - } - - return childDocShell->GetDocument(); -} -#endif - #ifdef DEBUG void PresShell::ShowEventTargetDebug() diff --git a/layout/base/nsPresShell.h b/layout/base/nsPresShell.h index 80d4625513..fbbcfc7ecd 100644 --- a/layout/base/nsPresShell.h +++ b/layout/base/nsPresShell.h @@ -755,9 +755,6 @@ protected: virtual void SysColorChanged() override { mPresContext->SysColorChanged(); } virtual void ThemeChanged() override { mPresContext->ThemeChanged(); } virtual void BackingScaleFactorChanged() override { mPresContext->UIResolutionChanged(); } -#ifdef ANDROID - virtual nsIDocument* GetTouchEventTargetDocument() override; -#endif virtual void PausePainting() override; virtual void ResumePainting() override; diff --git a/layout/base/tests/chrome/chrome.ini b/layout/base/tests/chrome/chrome.ini index 2f6ca0ba8d..56454d3112 100644 --- a/layout/base/tests/chrome/chrome.ini +++ b/layout/base/tests/chrome/chrome.ini @@ -1,5 +1,4 @@ [DEFAULT] -skip-if = os == 'android' support-files = animated.gif blue-32x32.png diff --git a/layout/base/tests/mochitest.ini b/layout/base/tests/mochitest.ini index 405697977c..fc616b1ef8 100644 --- a/layout/base/tests/mochitest.ini +++ b/layout/base/tests/mochitest.ini @@ -1,6 +1,4 @@ [DEFAULT] -# Android: SLOW_DIRECTORY; -skip-if = toolkit == 'android' support-files = Ahem.ttf border_radius_hit_testing_iframe.html @@ -224,23 +222,18 @@ support-files = file_bug607529.html skip-if = e10s # bug 1020135, nested oop iframes not supported support-files = bug921928_event_target_iframe_apps_oop.html [test_mozPaintCount.html] -skip-if = toolkit == 'android' [test_scroll_event_ordering.html] [test_scroll_selection_into_view.html] support-files=scroll_selection_into_view_window.html [test_scroll_snapping.html] -skip-if = buildapp == 'android' # bug 1041833 [test_scroll_snapping_scrollbars.html] -skip-if = buildapp == 'android' # bug 1041833 [test_bug583889.html] support-files = bug583889_inner1.html bug583889_inner2.html [test_bug582771.html] [test_bug968148.html] support-files = bug968148_inner.html [test_bug603550.html] -skip-if = toolkit == 'android' #TIMED_OUT [test_bug629838.html] -skip-if = toolkit == 'android' [test_bug646757.html] [test_bug718809.html] [test_bug725426.html] @@ -270,13 +263,12 @@ support-files = # because of bug 469208. [test_bug332655-1.html] -skip-if = toolkit == 'android' [test_bug332655-2.html] [test_bug499538-1.html] [test_bug749186.html] [test_bug644768.html] [test_flush_on_paint.html] -skip-if = true || (toolkit == 'android') || (toolkit == "cocoa") # Bug 688128, bug 539356 +skip-if = true || (toolkit == "cocoa") # Bug 688128, bug 539356 [test_getBoxQuads_convertPointRectQuad.html] [test_bug687297.html] support-files = @@ -294,7 +286,7 @@ support-files = bug1080361_inner.html [test_bug1093686.html] support-files = bug1093686_inner.html [test_bug1120705.html] -skip-if = buildapp == 'android' || os == 'mac' || toolkit == 'gtk2' || toolkit == 'gtk3' # android does not have clickable scrollbars, mac does not have scrollbar down and up buttons, gtk may or may not have scrollbar buttons depending on theme +skip-if = os == 'mac' || toolkit == 'gtk2' || toolkit == 'gtk3' # mac does not have scrollbar down and up buttons, gtk may or may not have scrollbar buttons depending on theme [test_bug1153130.html] support-files = bug1153130_inner.html [test_bug1162990.html] diff --git a/layout/base/tests/test_reftests_with_caret.html b/layout/base/tests/test_reftests_with_caret.html index d9b5d4a6c9..062c605b98 100644 --- a/layout/base/tests/test_reftests_with_caret.html +++ b/layout/base/tests/test_reftests_with_caret.html @@ -189,20 +189,15 @@ var tests = [ function() {SpecialPowers.pushPrefEnv({'clear': [['layout.accessiblecaret.enabled']]}, nextTest);} , ]; -if (navigator.appVersion.indexOf("Android") == -1 && - SpecialPowers.Services.appinfo.name != "B2G") { - tests.push([ 'bug512295-1.html' , 'bug512295-1-ref.html' ]); - tests.push([ 'bug512295-2.html' , 'bug512295-2-ref.html' ]); - tests.push([ 'bug923376.html' , 'bug923376-ref.html' ]); - tests.push(function() {SpecialPowers.pushPrefEnv({'set': [['layout.css.overflow-clip-box.enabled', true]]}, nextTest);}); - tests.push([ 'bug966992-1.html' , 'bug966992-1-ref.html' ]); - tests.push([ 'bug966992-2.html' , 'bug966992-2-ref.html' ]); - tests.push([ 'bug966992-3.html' , 'bug966992-3-ref.html' ]); - tests.push(function() {SpecialPowers.pushPrefEnv({'clear': [['layout.css.overflow-clip-box.enabled']]}, nextTest);}); - tests.push([ 'bug1258308-1.html' , 'bug1258308-1-ref.html' ]); // maybe VK_END doesn't work on Android? -} else { - is(SpecialPowers.getIntPref("layout.spellcheckDefault"), 0, "Spellcheck should be turned off for this platform or this if..else check removed"); -} +tests.push([ 'bug512295-1.html' , 'bug512295-1-ref.html' ]); +tests.push([ 'bug512295-2.html' , 'bug512295-2-ref.html' ]); +tests.push([ 'bug923376.html' , 'bug923376-ref.html' ]); +tests.push(function() {SpecialPowers.pushPrefEnv({'set': [['layout.css.overflow-clip-box.enabled', true]]}, nextTest);}); +tests.push([ 'bug966992-1.html' , 'bug966992-1-ref.html' ]); +tests.push([ 'bug966992-2.html' , 'bug966992-2-ref.html' ]); +tests.push([ 'bug966992-3.html' , 'bug966992-3-ref.html' ]); +tests.push(function() {SpecialPowers.pushPrefEnv({'clear': [['layout.css.overflow-clip-box.enabled']]}, nextTest);}); +tests.push([ 'bug1258308-1.html' , 'bug1258308-1-ref.html' ]); if (navigator.platform.indexOf("Linux") >= 0 && SpecialPowers.Services.appinfo.name != "B2G") { diff --git a/layout/build/moz.build b/layout/build/moz.build index 7c9e130945..d7996af8d9 100644 --- a/layout/build/moz.build +++ b/layout/build/moz.build @@ -67,11 +67,6 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': LOCAL_INCLUDES += [ '/dom/system/mac', ] -elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': - LOCAL_INCLUDES += [ - '/dom/system', - '/dom/system/android', - ] elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: LOCAL_INCLUDES += [ '/widget/gtk', diff --git a/layout/build/nsLayoutModule.cpp b/layout/build/nsLayoutModule.cpp index 8a078194cb..3c6f5f3aa5 100644 --- a/layout/build/nsLayoutModule.cpp +++ b/layout/build/nsLayoutModule.cpp @@ -116,9 +116,6 @@ using mozilla::dom::AudioChannelAgent; #include "nsSystemPrincipal.h" #include "nsNullPrincipal.h" #include "nsNetCID.h" -#if defined(MOZ_WIDGET_ANDROID) -#include "nsHapticFeedback.h" -#endif #include "nsParserUtils.h" #include "nsHTMLCanvasFrame.h" @@ -253,9 +250,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(AudioChannelAgent) NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceSensors) -#if defined(ANDROID) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsHapticFeedback) -#endif NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(ThirdPartyUtil, Init) NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIPowerManagerService, PowerManagerService::GetInstance) @@ -653,10 +647,6 @@ NS_DEFINE_NAMED_CID(NS_NULLPRINCIPAL_CID); NS_DEFINE_NAMED_CID(THIRDPARTYUTIL_CID); NS_DEFINE_NAMED_CID(NS_STRUCTUREDCLONECONTAINER_CID); NS_DEFINE_NAMED_CID(NS_DEVICE_SENSORS_CID); - -#if defined(ANDROID) -NS_DEFINE_NAMED_CID(NS_HAPTICFEEDBACK_CID); -#endif NS_DEFINE_NAMED_CID(NS_POWERMANAGERSERVICE_CID); NS_DEFINE_NAMED_CID(OSFILECONSTANTSSERVICE_CID); NS_DEFINE_NAMED_CID(UDPSOCKETCHILD_CID); @@ -909,9 +899,6 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = { { &kNS_SYSTEMPRINCIPAL_CID, false, nullptr, nsSystemPrincipalConstructor }, { &kNS_NULLPRINCIPAL_CID, false, nullptr, nsNullPrincipalConstructor }, { &kNS_DEVICE_SENSORS_CID, false, nullptr, nsDeviceSensorsConstructor }, -#if defined(ANDROID) - { &kNS_HAPTICFEEDBACK_CID, false, nullptr, nsHapticFeedbackConstructor }, -#endif { &kTHIRDPARTYUTIL_CID, false, nullptr, ThirdPartyUtilConstructor }, { &kNS_STRUCTUREDCLONECONTAINER_CID, false, nullptr, nsStructuredCloneContainerConstructor }, { &kNS_POWERMANAGERSERVICE_CID, false, nullptr, nsIPowerManagerServiceConstructor, Module::ALLOW_IN_GPU_PROCESS }, @@ -1029,9 +1016,6 @@ static const mozilla::Module::ContractIDEntry kLayoutContracts[] = { { NS_SYSTEMPRINCIPAL_CONTRACTID, &kNS_SYSTEMPRINCIPAL_CID }, { NS_NULLPRINCIPAL_CONTRACTID, &kNS_NULLPRINCIPAL_CID }, { NS_DEVICE_SENSORS_CONTRACTID, &kNS_DEVICE_SENSORS_CID }, -#if defined(ANDROID) - { "@mozilla.org/widget/hapticfeedback;1", &kNS_HAPTICFEEDBACK_CID }, -#endif { THIRDPARTYUTIL_CONTRACTID, &kTHIRDPARTYUTIL_CID }, { NS_STRUCTUREDCLONECONTAINER_CONTRACTID, &kNS_STRUCTUREDCLONECONTAINER_CID }, { POWERMANAGERSERVICE_CONTRACTID, &kNS_POWERMANAGERSERVICE_CID, Module::ALLOW_IN_GPU_PROCESS }, diff --git a/layout/build/nsLayoutStatics.cpp b/layout/build/nsLayoutStatics.cpp index d81a8dfe2d..014176f03c 100644 --- a/layout/build/nsLayoutStatics.cpp +++ b/layout/build/nsLayoutStatics.cpp @@ -315,10 +315,7 @@ nsLayoutStatics::Initialize() // creating the hidden DOM window to support some current stylo hacks. We // should move initialization back here once those go away. -#ifndef MOZ_WIDGET_ANDROID - // On Android, we instantiate it when constructing AndroidBridge. MediaPrefs::GetSingleton(); -#endif return NS_OK; } diff --git a/layout/forms/test/chrome.ini b/layout/forms/test/chrome.ini index 32d862eecc..87aadcdb2b 100644 --- a/layout/forms/test/chrome.ini +++ b/layout/forms/test/chrome.ini @@ -1,5 +1,4 @@ [DEFAULT] -skip-if = os == 'android' support-files = bug536567_iframe.html bug536567_subframe.html diff --git a/layout/forms/test/mochitest.ini b/layout/forms/test/mochitest.ini index cc8519db71..ef1632a7a5 100644 --- a/layout/forms/test/mochitest.ini +++ b/layout/forms/test/mochitest.ini @@ -9,58 +9,44 @@ support-files = [test_bug345267.html] [test_bug346043.html] [test_bug348236.html] -skip-if = toolkit == 'android' || e10s || os == 'mac' # mac(select form control popup behavior is different) +skip-if = toolkit == e10s || os == 'mac' # mac(select form control popup behavior is different) [test_bug353539.html] [test_bug365410.html] [test_bug378670.html] -skip-if = toolkit == 'android' #TIMED_OUT [test_bug402198.html] [test_bug411236.html] [test_bug446663.html] -skip-if = toolkit == 'android' [test_bug476308.html] [test_bug477531.html] [test_bug477700.html] [test_bug478219.xhtml] -skip-if = toolkit == 'android' [test_bug534785.html] [test_bug542914.html] [test_bug549170.html] [test_bug562447.html] [test_bug563642.html] [test_bug564115.html] -skip-if = toolkit == 'android' #TIMED_OUT [test_bug571352.html] -skip-if = (os == 'mac' && os_version == '10.10') || toolkit == 'android' #TIMED_OUT # OS X 10.10 - bug 947690 +skip-if = (os == 'mac' && os_version == '10.10') # OS X 10.10 - bug 947690 [test_bug572406.html] [test_bug572649.html] -skip-if = toolkit == 'android' #TIMED_OUT [test_bug595310.html] [test_bug620936.html] [test_bug644542.html] -skip-if = toolkit == 'android' #TIMED_OUT [test_bug672810.html] -skip-if = toolkit == 'android' [test_bug704049.html] [test_bug717878_input_scroll.html] [test_bug869314.html] [test_bug903715.html] -skip-if = toolkit == 'android' || e10s #select elements don't use an in-page popup on Android [test_bug935876.html] -# Bug 1023472 - Fails when pushed into a different chunk on Android -skip-if = toolkit == 'android' [test_bug957562.html] [test_bug960277.html] [test_bug961363.html] -skip-if = toolkit == 'android' # Bug 1021644 - Fails when pushed into a different chunk on Android [test_bug1111995.html] [test_bug1301290.html] -skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' # b2g(resizing textarea not available in b2g) b2g-debug(resizing textarea not available in b2g) b2g-desktop(resizing textarea not available in b2g) [test_bug1305282.html] [test_listcontrol_search.html] -skip-if = toolkit == 'android' #select elements don't use an in-page popup on Android [test_select_prevent_default.html] [test_select_vertical.html] -skip-if = e10s || toolkit == 'android' # Bug 1170129 - vertical elements don't use an in-page popup on Android +skip-if = e10s # Bug 1170129 - vertical -== css-required-dyn-1.html css-required-dyn-1.html -== css-required-dyn-2.html css-required-dyn-2.html -== css-required-dyn-3.html css-required-dyn-3.html -== css-required-dyn-4.html css-required-dyn-4.html -== css-required-dyn-5.html css-required-dyn-5.html -== css-required-dyn-6.html css-required-dyn-6.html - -# Following input types do not support :required -== css-required-hidden.html css-required-hidden.html -== css-required-button.html css-required-button.html -== css-required-submit.html css-required-submit.html -== css-required-image.html css-required-image.html -== css-required-reset.html css-required-reset.html - -# Following elements can be optional but can't be required -== css-required-button-element.html css-required-button-element.html - diff --git a/layout/reftests/css-ruby/reftest-stylo.list b/layout/reftests/css-ruby/reftest-stylo.list deleted file mode 100644 index 1ed58bea4f..0000000000 --- a/layout/reftests/css-ruby/reftest-stylo.list +++ /dev/null @@ -1,59 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== bidi-1.html bidi-1.html -== bidi-2.html bidi-2.html -== box-generation-1.html box-generation-1.html -== box-generation-2.html box-generation-2.html -== box-generation-3.html box-generation-3.html -== box-generation-4.html box-generation-4.html -== box-generation-5.html box-generation-5.html -== box-properties-1.html box-properties-1.html -== box-properties-2.html box-properties-2.html -== box-properties-3.html box-properties-3.html -== box-properties-4.html box-properties-4.html -== dynamic-insertion-1.html dynamic-insertion-1.html -== dynamic-insertion-2.html dynamic-insertion-2.html -== dynamic-insertion-3.html dynamic-insertion-3.html -== dynamic-removal-1.html dynamic-removal-1.html -== dynamic-removal-2.html dynamic-removal-2.html -== dynamic-removal-3.html dynamic-removal-3.html -== float-handling.html float-handling.html -fails test-pref(dom.meta-viewport.enabled,true) test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.forceEnabled,true) test-pref(font.size.inflation.lineThreshold,0) == inflated-ruby-1.html inflated-ruby-1.html -== intra-level-whitespace-1.html intra-level-whitespace-1.html -== intra-level-whitespace-2.html intra-level-whitespace-2.html -== intra-level-whitespace-3.html intra-level-whitespace-3.html -== intrinsic-isize-1.html intrinsic-isize-1.html -== intrinsic-isize-2.html intrinsic-isize-2.html -== justification-1.html justification-1.html -== justification-2.html justification-2.html -fuzzy-if(winWidget,255,792) == lang-specific-style-1.html lang-specific-style-1.html -# bug 1134947 -== line-breaking-1.html line-breaking-1.html -== line-breaking-2.html line-breaking-2.html -fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),3,2) == line-break-suppression-1.html line-break-suppression-1.html -fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),3,2) == line-break-suppression-2.html line-break-suppression-2.html -== line-break-suppression-3.html line-break-suppression-3.html -== line-break-suppression-4.html line-break-suppression-4.html -== line-break-suppression-5.html line-break-suppression-5.html -== line-height-1.html line-height-1.html -== line-height-2.html line-height-2.html -== line-height-3.html line-height-3.html -== line-height-4.html line-height-4.html -test-pref(font.minimum-size.ja,16) == min-font-size-1.html min-font-size-1.html -skip load nested-ruby-1.html -== no-transform.html no-transform.html -== relative-positioning-1.html relative-positioning-1.html -== relative-positioning-2.html relative-positioning-2.html -== ruby-align-1.html ruby-align-1.html -== ruby-align-1a.html ruby-align-1a.html -== ruby-align-2.html ruby-align-2.html -== ruby-align-2a.html ruby-align-2a.html -== ruby-position-horizontal.html ruby-position-horizontal.html -== ruby-position-vertical-lr.html ruby-position-vertical-lr.html -== ruby-position-vertical-rl.html ruby-position-vertical-rl.html -== ruby-reflow-1-opaqueruby.html ruby-reflow-1-opaqueruby.html -fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),13,1) == ruby-reflow-1-transparentruby.html ruby-reflow-1-transparentruby.html -== ruby-span-1.html ruby-span-1.html -== ruby-whitespace-1.html ruby-whitespace-1.html -== ruby-whitespace-2.html ruby-whitespace-2.html -== bug1181890.html bug1181890.html -== bug1181890.html bug1181890.html diff --git a/layout/reftests/css-selectors/reftest-stylo.list b/layout/reftests/css-selectors/reftest-stylo.list deleted file mode 100644 index 155b7c2c0a..0000000000 --- a/layout/reftests/css-selectors/reftest-stylo.list +++ /dev/null @@ -1,9 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== state-dependent-in-any.html state-dependent-in-any.html -== attr-case-insensitive-1.html attr-case-insensitive-1.html -skip == sibling-combinators-on-anon-content-1.xhtml sibling-combinators-on-anon-content-1.xhtml -# Initial mulet triage: parity with B2G/B2G Desktop -skip == sibling-combinators-on-anon-content-2.xhtml sibling-combinators-on-anon-content-2.xhtml -# Initial mulet triage: parity with B2G/B2G Desktop -== nth-child-1.html nth-child-1.html -== nth-child-2.html nth-child-2.html diff --git a/layout/reftests/css-sizing/reftest-stylo.list b/layout/reftests/css-sizing/reftest-stylo.list deleted file mode 100644 index 76a94893d5..0000000000 --- a/layout/reftests/css-sizing/reftest-stylo.list +++ /dev/null @@ -1,5 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== min-intrinsic-with-percents-across-img-cases.html min-intrinsic-with-percents-across-img-cases.html -== min-intrinsic-with-percents-across-elements.html min-intrinsic-with-percents-across-elements.html -skip == min-intrinsic-with-max-width-percents-across-form-controls.html min-intrinsic-with-max-width-percents-across-form-controls.html -skip == min-intrinsic-with-width-percents-across-form-controls.html min-intrinsic-with-width-percents-across-form-controls.html diff --git a/layout/reftests/css-submit-invalid/button-submit/reftest-stylo.list b/layout/reftests/css-submit-invalid/button-submit/reftest-stylo.list deleted file mode 100644 index f7dbf62839..0000000000 --- a/layout/reftests/css-submit-invalid/button-submit/reftest-stylo.list +++ /dev/null @@ -1,17 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== static-valid.html static-valid.html -== dynamic-valid.html dynamic-valid.html -== static-invalid.html static-invalid.html -== dynamic-invalid.html dynamic-invalid.html -== dynamic-invalid-barred.html dynamic-invalid-barred.html -== dynamic-invalid-barred-2.html dynamic-invalid-barred-2.html -== dynamic-invalid-not-barred.html dynamic-invalid-not-barred.html -== static-invalid-barred.html static-invalid-barred.html -== remove-invalid-element.html remove-invalid-element.html -== add-invalid-element.html add-invalid-element.html -== add-submit-control.html add-submit-control.html -== remove-submit-control.html remove-submit-control.html -== change-type-submit-control.html change-type-submit-control.html -== change-type-not-submit-control.html change-type-not-submit-control.html -== self-invalid.html self-invalid.html -== remove-form.html remove-form.html diff --git a/layout/reftests/css-submit-invalid/default-style/reftest-stylo.list b/layout/reftests/css-submit-invalid/default-style/reftest-stylo.list deleted file mode 100644 index 49b10e400c..0000000000 --- a/layout/reftests/css-submit-invalid/default-style/reftest-stylo.list +++ /dev/null @@ -1,4 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== input-submit.html input-submit.html -== input-image.html input-image.html -== button-submit.html button-submit.html diff --git a/layout/reftests/css-submit-invalid/input-image/reftest-stylo.list b/layout/reftests/css-submit-invalid/input-image/reftest-stylo.list deleted file mode 100644 index 868f916c5f..0000000000 --- a/layout/reftests/css-submit-invalid/input-image/reftest-stylo.list +++ /dev/null @@ -1,18 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== static-valid.html static-valid.html -== dynamic-valid.html dynamic-valid.html -== static-invalid.html static-invalid.html -skip-if(B2G||Mulet) == dynamic-invalid.html dynamic-invalid.html -# Initial mulet triage: parity with B2G/B2G Desktop -== dynamic-invalid-barred.html dynamic-invalid-barred.html -== dynamic-invalid-barred-2.html dynamic-invalid-barred-2.html -== dynamic-invalid-not-barred.html dynamic-invalid-not-barred.html -== static-invalid-barred.html static-invalid-barred.html -== remove-invalid-element.html remove-invalid-element.html -== add-invalid-element.html add-invalid-element.html -== add-submit-control.html add-submit-control.html -== remove-submit-control.html remove-submit-control.html -== change-type-submit-control.html change-type-submit-control.html -== change-type-not-submit-control.html change-type-not-submit-control.html -== self-invalid.html self-invalid.html -== remove-form.html remove-form.html diff --git a/layout/reftests/css-submit-invalid/input-submit/reftest-stylo.list b/layout/reftests/css-submit-invalid/input-submit/reftest-stylo.list deleted file mode 100644 index 868f916c5f..0000000000 --- a/layout/reftests/css-submit-invalid/input-submit/reftest-stylo.list +++ /dev/null @@ -1,18 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== static-valid.html static-valid.html -== dynamic-valid.html dynamic-valid.html -== static-invalid.html static-invalid.html -skip-if(B2G||Mulet) == dynamic-invalid.html dynamic-invalid.html -# Initial mulet triage: parity with B2G/B2G Desktop -== dynamic-invalid-barred.html dynamic-invalid-barred.html -== dynamic-invalid-barred-2.html dynamic-invalid-barred-2.html -== dynamic-invalid-not-barred.html dynamic-invalid-not-barred.html -== static-invalid-barred.html static-invalid-barred.html -== remove-invalid-element.html remove-invalid-element.html -== add-invalid-element.html add-invalid-element.html -== add-submit-control.html add-submit-control.html -== remove-submit-control.html remove-submit-control.html -== change-type-submit-control.html change-type-submit-control.html -== change-type-not-submit-control.html change-type-not-submit-control.html -== self-invalid.html self-invalid.html -== remove-form.html remove-form.html diff --git a/layout/reftests/css-submit-invalid/reftest-stylo.list b/layout/reftests/css-submit-invalid/reftest-stylo.list deleted file mode 100644 index 3ffd1e9328..0000000000 --- a/layout/reftests/css-submit-invalid/reftest-stylo.list +++ /dev/null @@ -1,5 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -include button-submit/reftest-stylo.list -include input-image/reftest-stylo.list -include input-submit/reftest-stylo.list -include default-style/reftest-stylo.list diff --git a/layout/reftests/css-transitions/reftest-stylo.list b/layout/reftests/css-transitions/reftest-stylo.list deleted file mode 100644 index fe4eff44b8..0000000000 --- a/layout/reftests/css-transitions/reftest-stylo.list +++ /dev/null @@ -1,5 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -skip == transitions-inline-already-wrapped-1.html transitions-inline-already-wrapped-1.html -skip == transitions-inline-already-wrapped-2.html transitions-inline-already-wrapped-2.html -== transitions-inline-rewrap-1.html transitions-inline-rewrap-1.html -== transitions-inline-rewrap-2.html transitions-inline-rewrap-2.html diff --git a/layout/reftests/css-ui-invalid/button/reftest-stylo.list b/layout/reftests/css-ui-invalid/button/reftest-stylo.list deleted file mode 100644 index b4097b45d5..0000000000 --- a/layout/reftests/css-ui-invalid/button/reftest-stylo.list +++ /dev/null @@ -1,14 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== button-valid.html button-valid.html -fails fuzzy-if(skiaContent,1,3) == button-invalid.html button-invalid.html -fuzzy-if(skiaContent,2,5) == button-disabled.html button-disabled.html -fuzzy-if(skiaContent,2,5) == button-dyn-disabled.html button-dyn-disabled.html -fails fuzzy-if(skiaContent,1,3) == button-dyn-not-disabled.html button-dyn-not-disabled.html -fuzzy-if(skiaContent,1,3) == button-button.html button-button.html -fails fuzzy-if(skiaContent,1,3) == button-reset.html button-reset.html -fails fuzzy-if(skiaContent,1,3) == button-type-invalid.html button-type-invalid.html -fails fuzzy-if(skiaContent,1,3) == button-type-barred.html button-type-barred.html -fuzzy-if(skiaContent,1,3) == button-disabled-fieldset-1.html button-disabled-fieldset-1.html -fuzzy-if(skiaContent,1,3) == button-disabled-fieldset-2.html button-disabled-fieldset-2.html -fuzzy-if(skiaContent,1,4) == button-fieldset-legend.html button-fieldset-legend.html -fails fuzzy-if(skiaContent,1,3) == button-novalidate.html button-novalidate.html diff --git a/layout/reftests/css-ui-invalid/default-style/reftest-stylo.list b/layout/reftests/css-ui-invalid/default-style/reftest-stylo.list deleted file mode 100644 index b2a2c35d90..0000000000 --- a/layout/reftests/css-ui-invalid/default-style/reftest-stylo.list +++ /dev/null @@ -1,13 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== input.html input.html -== button.html button.html -== textarea.html textarea.html -== select.html select.html -== fieldset.html fieldset.html -== output.html output.html -random-if(winWidget) needs-focus == input-focus.html input-focus.html -# Intermittent failures, bug 660224 -needs-focus == button-focus.html button-focus.html -needs-focus == textarea-focus.html textarea-focus.html -random-if(winWidget) needs-focus == select-focus.html select-focus.html -# Intermittent failures, bug 660224 diff --git a/layout/reftests/css-ui-invalid/input/reftest-stylo.list b/layout/reftests/css-ui-invalid/input/reftest-stylo.list deleted file mode 100644 index 993d7c2455..0000000000 --- a/layout/reftests/css-ui-invalid/input/reftest-stylo.list +++ /dev/null @@ -1,48 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== input-valid.html input-valid.html -== input-customerror.html input-customerror.html -skip-if(B2G||Mulet) fuzzy-if(skiaContent,1,3) == input-disabled.html input-disabled.html -# Initial mulet triage: parity with B2G/B2G Desktop -skip-if(B2G||Mulet) fuzzy-if(skiaContent,1,3) == input-dyn-disabled.html input-dyn-disabled.html -# Initial mulet triage: parity with B2G/B2G Desktop -fuzzy-if(skiaContent,1,3) == input-dyn-not-disabled.html input-dyn-not-disabled.html -fuzzy-if(skiaContent,1,3) == input-readonly.html input-readonly.html -fuzzy-if(skiaContent,1,3) == input-dyn-readonly.html input-dyn-readonly.html -fails fuzzy-if(skiaContent,1,3) == input-dyn-not-readonly-not-changed.html input-dyn-not-readonly-not-changed.html -fails fuzzy-if(skiaContent,1,3) == input-dyn-not-readonly-changed.html input-dyn-not-readonly-changed.html -skip == input-maxlength-valid.html input-maxlength-valid.html -skip == input-maxlength-invalid-changed.html input-maxlength-invalid-changed.html -skip == input-maxlength-invalid-default.html input-maxlength-invalid-default.html -== input-required-valid.html input-required-valid.html -fuzzy-if(skiaContent,1,3) == input-required-invalid-default.html input-required-invalid-default.html -fails fuzzy-if(skiaContent,1,3) == input-required-invalid-changed.html input-required-invalid-changed.html -fuzzy-if(skiaContent,2,5) == input-button.html input-button.html -skip fuzzy-if(skiaContent,2,5) == input-reset.html input-reset.html -== input-email-invalid-default.html input-email-invalid-default.html -== input-email-invalid-changed.html input-email-invalid-changed.html -fuzzy-if(skiaContent,2,5) == input-email-valid.html input-email-valid.html -== input-url-invalid-changed.html input-url-invalid-changed.html -== input-url-invalid-default.html input-url-invalid-default.html -== input-url-valid.html input-url-valid.html -== input-pattern-valid.html input-pattern-valid.html -== input-pattern-invalid-default.html input-pattern-invalid-default.html -== input-pattern-invalid-changed.html input-pattern-invalid-changed.html -fuzzy-if(skiaContent,2,5) == input-type-barred.html input-type-barred.html -== input-type-invalid.html input-type-invalid.html -== input-disabled-fieldset-1.html input-disabled-fieldset-1.html -fuzzy-if(skiaContent,1,3) == input-disabled-fieldset-2.html input-disabled-fieldset-2.html -skip fuzzy-if(skiaContent,1,3) == input-fieldset-legend.html input-fieldset-legend.html -== input-checkbox-required-invalid-changed.html input-checkbox-required-invalid-changed.html -== input-checkbox-required-invalid-default.html input-checkbox-required-invalid-default.html -== input-radio-required-invalid-changed.html input-radio-required-invalid-changed.html -== input-radio-required-invalid-default.html input-radio-required-invalid-default.html -== input-file-required-invalid-changed.html input-file-required-invalid-changed.html -== input-file-required-invalid-default.html input-file-required-invalid-default.html -== input-radio-required.html input-radio-required.html -== input-radio-customerror.html input-radio-customerror.html -== input-radio-dyn-valid-1.html input-radio-dyn-valid-1.html -== input-radio-dyn-valid-2.html input-radio-dyn-valid-2.html -== input-radio-nogroup-required-valid.html input-radio-nogroup-required-valid.html -== input-radio-nogroup-required-invalid.html input-radio-nogroup-required-invalid.html -fails fuzzy-if(skiaContent,1,3) == input-novalidate.html input-novalidate.html -# input type='hidden' shouldn't show diff --git a/layout/reftests/css-ui-invalid/output/reftest-stylo.list b/layout/reftests/css-ui-invalid/output/reftest-stylo.list deleted file mode 100644 index 06d9280651..0000000000 --- a/layout/reftests/css-ui-invalid/output/reftest-stylo.list +++ /dev/null @@ -1,4 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== output-valid.html output-valid.html -== output-invalid.html output-invalid.html -== output-novalidate.html output-novalidate.html diff --git a/layout/reftests/css-ui-invalid/reftest-stylo.list b/layout/reftests/css-ui-invalid/reftest-stylo.list deleted file mode 100644 index a0db8feb5f..0000000000 --- a/layout/reftests/css-ui-invalid/reftest-stylo.list +++ /dev/null @@ -1,10 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -# :-moz-ui-invalid should apply on the following elements -include button/reftest-stylo.list -include input/reftest-stylo.list -include select/reftest-stylo.list -include textarea/reftest-stylo.list -include output/reftest-stylo.list - -# default :-moz-ui-invalid style -include default-style/reftest-stylo.list diff --git a/layout/reftests/css-ui-invalid/select/reftest-stylo.list b/layout/reftests/css-ui-invalid/select/reftest-stylo.list deleted file mode 100644 index 666fa6ad53..0000000000 --- a/layout/reftests/css-ui-invalid/select/reftest-stylo.list +++ /dev/null @@ -1,22 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -needs-focus == select-valid.html select-valid.html -fails fuzzy-if(skiaContent,1,3) needs-focus == select-invalid.html select-invalid.html -fails fuzzy-if(skiaContent,2,5) needs-focus == select-invalid-reset.html select-invalid-reset.html -needs-focus == select-disabled.html select-disabled.html -skip-if(B2G||Mulet) needs-focus == select-dyn-disabled.html select-dyn-disabled.html -# Initial mulet triage: parity with B2G/B2G Desktop -fails fuzzy-if(skiaContent,1,3) needs-focus == select-dyn-not-disabled.html select-dyn-not-disabled.html -fuzzy-if(skiaContent,2,5) needs-focus == select-required-invalid-1.html select-required-invalid-1.html -fuzzy-if(skiaContent,2,5) needs-focus == select-required-invalid-2.html select-required-invalid-2.html -fuzzy-if(skiaContent,2,5) needs-focus == select-required-invalid-changed-1.html select-required-invalid-changed-1.html -fuzzy-if(skiaContent,2,5) needs-focus == select-required-invalid-changed-2.html select-required-invalid-changed-2.html -fuzzy-if(skiaContent,2,5) needs-focus == select-required-valid.html select-required-valid.html -needs-focus == select-required-multiple-invalid.html select-required-multiple-invalid.html -fails fuzzy-if(asyncPan&&!layersGPUAccelerated,84,77) fuzzy-if(skiaContent,1,1000) needs-focus == select-required-multiple-invalid-changed.html select-required-multiple-invalid-changed.html -needs-focus == select-required-multiple-valid.html select-required-multiple-valid.html -skip-if(B2G||Mulet) fails-if(Android) fuzzy-if(skiaContent,2,10) needs-focus == select-disabled-fieldset-1.html select-disabled-fieldset-1.html -# Initial mulet triage: parity with B2G/B2G Desktop -skip-if(B2G||Mulet) fails-if(Android) fuzzy-if(skiaContent,2,10) needs-focus == select-disabled-fieldset-2.html select-disabled-fieldset-2.html -# Initial mulet triage: parity with B2G/B2G Desktop -fuzzy-if(skiaContent,2,10) needs-focus == select-fieldset-legend.html select-fieldset-legend.html -fails fuzzy-if(skiaContent,1,5) needs-focus == select-novalidate.html select-novalidate.html diff --git a/layout/reftests/css-ui-invalid/select/reftest.list b/layout/reftests/css-ui-invalid/select/reftest.list index 1fd1977939..09239e33e2 100644 --- a/layout/reftests/css-ui-invalid/select/reftest.list +++ b/layout/reftests/css-ui-invalid/select/reftest.list @@ -12,7 +12,7 @@ fuzzy-if(skiaContent,2,5) needs-focus == select-required-valid.html select-requi needs-focus == select-required-multiple-invalid.html select-required-multiple-ref.html fuzzy-if(asyncPan&&!layersGPUAccelerated,84,77) fuzzy-if(skiaContent,1,1000) needs-focus == select-required-multiple-invalid-changed.html select-required-multiple-ref.html needs-focus == select-required-multiple-valid.html select-required-multiple-ref.html -fails-if(Android) fuzzy-if(skiaContent&&!Android,2,10) needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html -fails-if(Android) fuzzy-if(skiaContent&&!Android,2,10) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html +fuzzy-if(skiaContent,2,10) needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html +fuzzy-if(skiaContent,2,10) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html fuzzy-if(skiaContent,2,10) needs-focus == select-fieldset-legend.html select-fieldset-legend-ref.html fuzzy-if(skiaContent,1,5) needs-focus == select-novalidate.html select-required-ref.html diff --git a/layout/reftests/css-ui-invalid/textarea/reftest-stylo.list b/layout/reftests/css-ui-invalid/textarea/reftest-stylo.list deleted file mode 100644 index 7ef5790a4e..0000000000 --- a/layout/reftests/css-ui-invalid/textarea/reftest-stylo.list +++ /dev/null @@ -1,19 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== textarea-valid.html textarea-valid.html -== textarea-customerror.html textarea-customerror.html -== textarea-disabled.html textarea-disabled.html -== textarea-dyn-disabled.html textarea-dyn-disabled.html -== textarea-dyn-not-disabled.html textarea-dyn-not-disabled.html -== textarea-readonly.html textarea-readonly.html -== textarea-dyn-readonly.html textarea-dyn-readonly.html -== textarea-dyn-not-readonly-not-changed.html textarea-dyn-not-readonly-not-changed.html -== textarea-dyn-not-readonly-changed.html textarea-dyn-not-readonly-changed.html -skip == textarea-maxlength-valid.html textarea-maxlength-valid.html -skip == textarea-maxlength-invalid.html textarea-maxlength-invalid.html -skip == textarea-maxlength-default-value-invalid.html textarea-maxlength-default-value-invalid.html -== textarea-required-valid.html textarea-required-valid.html -== textarea-required-invalid.html textarea-required-invalid.html -== textarea-required-invalid-changed.html textarea-required-invalid-changed.html -== textarea-disabled-fieldset-1.html textarea-disabled-fieldset-1.html -== textarea-disabled-fieldset-2.html textarea-disabled-fieldset-2.html -== textarea-novalidate.html textarea-novalidate.html diff --git a/layout/reftests/css-ui-valid/button/reftest-stylo.list b/layout/reftests/css-ui-valid/button/reftest-stylo.list deleted file mode 100644 index 26f44fe352..0000000000 --- a/layout/reftests/css-ui-valid/button/reftest-stylo.list +++ /dev/null @@ -1,14 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -fuzzy-if(skiaContent,2,2) == button-valid.html button-valid.html -fails fuzzy-if(skiaContent,2,3) == button-invalid.html button-invalid.html -== button-disabled.html button-disabled.html -fuzzy-if(skiaContent,1,3) == button-dyn-disabled.html button-dyn-disabled.html -fails fuzzy-if(skiaContent,2,3) == button-dyn-not-disabled.html button-dyn-not-disabled.html -fuzzy-if(skiaContent,2,3) == button-button.html button-button.html -fails fuzzy-if(skiaContent,2,3) == button-reset.html button-reset.html -fails fuzzy-if(skiaContent,2,3) == button-type-invalid.html button-type-invalid.html -fails fuzzy-if(skiaContent,2,3) == button-type-barred.html button-type-barred.html -== button-disabled-fieldset-1.html button-disabled-fieldset-1.html -fuzzy-if(skiaContent,1,3) == button-disabled-fieldset-2.html button-disabled-fieldset-2.html -fuzzy-if(skiaContent,1,3) == button-fieldset-legend.html button-fieldset-legend.html -fails fuzzy-if(skiaContent,2,2) == button-novalidate.html button-novalidate.html diff --git a/layout/reftests/css-ui-valid/input/reftest-stylo.list b/layout/reftests/css-ui-valid/input/reftest-stylo.list deleted file mode 100644 index acf1da14b8..0000000000 --- a/layout/reftests/css-ui-valid/input/reftest-stylo.list +++ /dev/null @@ -1,47 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== input-valid.html input-valid.html -== input-customerror.html input-customerror.html -fails-if(B2G||Mulet) == input-disabled.html input-disabled.html -# Initial mulet triage: parity with B2G/B2G Desktop -fails-if(B2G||Mulet) fuzzy-if(skiaContent,1,3) == input-dyn-disabled.html input-dyn-disabled.html -# Initial mulet triage: parity with B2G/B2G Desktop -fuzzy-if(skiaContent,1,3) == input-dyn-not-disabled.html input-dyn-not-disabled.html -fails fuzzy-if(skiaContent,1,3) == input-dyn-not-disabled-changed.html input-dyn-not-disabled-changed.html -fuzzy-if(skiaContent,1,3) == input-readonly.html input-readonly.html -fuzzy-if(skiaContent,1,3) == input-dyn-readonly.html input-dyn-readonly.html -fuzzy-if(skiaContent,1,3) == input-dyn-not-readonly.html input-dyn-not-readonly.html -skip == input-dyn-not-readonly-changed.html input-dyn-not-readonly-changed.html -skip == input-maxlength-valid.html input-maxlength-valid.html -skip == input-maxlength-valid-changed.html input-maxlength-valid-changed.html -skip == input-maxlength-invalid.html input-maxlength-invalid.html -== input-required-valid.html input-required-valid.html -== input-required-valid-changed.html input-required-valid-changed.html -fuzzy-if(skiaContent,1,3) == input-required-invalid.html input-required-invalid.html -== input-button.html input-button.html -skip == input-reset.html input-reset.html -== input-email-invalid.html input-email-invalid.html -== input-email-valid.html input-email-valid.html -== input-email-valid-changed.html input-email-valid-changed.html -== input-url-invalid.html input-url-invalid.html -== input-url-valid.html input-url-valid.html -== input-url-valid-changed.html input-url-valid-changed.html -== input-pattern-valid.html input-pattern-valid.html -skip == input-pattern-valid-changed.html input-pattern-valid-changed.html -== input-pattern-invalid.html input-pattern-invalid.html -== input-type-barred.html input-type-barred.html -== input-type-invalid.html input-type-invalid.html -== input-disabled-fieldset-1.html input-disabled-fieldset-1.html -fuzzy-if(skiaContent,1,3) == input-disabled-fieldset-2.html input-disabled-fieldset-2.html -skip fuzzy-if(skiaContent,1,3) == input-fieldset-legend.html input-fieldset-legend.html -== input-checkbox-valid-changed.html input-checkbox-valid-changed.html -== input-checkbox-valid-default.html input-checkbox-valid-default.html -skip == input-file-valid-changed.html input-file-valid-changed.html -== input-file-valid-default.html input-file-valid-default.html -== input-radio-required.html input-radio-required.html -== input-radio-customerror.html input-radio-customerror.html -== input-radio-dyn-valid-1.html input-radio-dyn-valid-1.html -== input-radio-dyn-valid-2.html input-radio-dyn-valid-2.html -== input-radio-nogroup-required-valid.html input-radio-nogroup-required-valid.html -== input-radio-nogroup-required-invalid.html input-radio-nogroup-required-invalid.html -fails fuzzy-if(skiaContent,1,3) == input-novalidate.html input-novalidate.html -# input type='hidden' shouldn't show diff --git a/layout/reftests/css-ui-valid/output/reftest-stylo.list b/layout/reftests/css-ui-valid/output/reftest-stylo.list deleted file mode 100644 index 06d9280651..0000000000 --- a/layout/reftests/css-ui-valid/output/reftest-stylo.list +++ /dev/null @@ -1,4 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== output-valid.html output-valid.html -== output-invalid.html output-invalid.html -== output-novalidate.html output-novalidate.html diff --git a/layout/reftests/css-ui-valid/reftest-stylo.list b/layout/reftests/css-ui-valid/reftest-stylo.list deleted file mode 100644 index bc70990c3d..0000000000 --- a/layout/reftests/css-ui-valid/reftest-stylo.list +++ /dev/null @@ -1,7 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -# :-moz-ui-valid should apply on the following elements -include button/reftest-stylo.list -include input/reftest-stylo.list -include select/reftest-stylo.list -include textarea/reftest-stylo.list -include output/reftest-stylo.list diff --git a/layout/reftests/css-ui-valid/select/reftest-stylo.list b/layout/reftests/css-ui-valid/select/reftest-stylo.list deleted file mode 100644 index efd559ede2..0000000000 --- a/layout/reftests/css-ui-valid/select/reftest-stylo.list +++ /dev/null @@ -1,21 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -needs-focus == select-valid.html select-valid.html -fails fuzzy-if(skiaContent,2,5) needs-focus == select-valid-reset.html select-valid-reset.html -fails fuzzy-if(skiaContent,1,3) needs-focus == select-invalid.html select-invalid.html -fuzzy-if(skiaContent,2,4) needs-focus == select-disabled.html select-disabled.html -fuzzy-if(skiaContent,2,4) needs-focus == select-dyn-disabled.html select-dyn-disabled.html -fails fuzzy-if(skiaContent,1,3) needs-focus == select-dyn-not-disabled.html select-dyn-not-disabled.html -fuzzy-if(skiaContent,2,5) needs-focus == select-required-invalid.html select-required-invalid.html -fuzzy-if(skiaContent,2,5) needs-focus == select-required-valid-1.html select-required-valid-1.html -fuzzy-if(skiaContent,2,5) needs-focus == select-required-valid-2.html select-required-valid-2.html -fuzzy-if(skiaContent,2,5) needs-focus == select-required-valid-changed-1.html select-required-valid-changed-1.html -fuzzy-if(skiaContent,2,5) needs-focus == select-required-valid-changed-2.html select-required-valid-changed-2.html -needs-focus == select-required-multiple-invalid.html select-required-multiple-invalid.html -needs-focus == select-required-multiple-valid.html select-required-multiple-valid.html -fails fuzzy-if(asyncPan&&layersGPUAccelerated,84,77) fuzzy-if(skiaContent,1,1000) needs-focus == select-required-multiple-valid-changed.html select-required-multiple-valid-changed.html -fails-if(Android||B2G||Mulet) needs-focus == select-disabled-fieldset-1.html select-disabled-fieldset-1.html -# Initial mulet triage: parity with B2G/B2G Desktop -fails-if(Android||B2G||Mulet) fuzzy-if(skiaContent,2,10) needs-focus == select-disabled-fieldset-2.html select-disabled-fieldset-2.html -# Initial mulet triage: parity with B2G/B2G Desktop -fuzzy-if(skiaContent,2,10) needs-focus == select-fieldset-legend.html select-fieldset-legend.html -fails fuzzy-if(skiaContent,2,5) needs-focus == select-novalidate.html select-novalidate.html diff --git a/layout/reftests/css-ui-valid/select/reftest.list b/layout/reftests/css-ui-valid/select/reftest.list index 082a6fc0ce..16e0eda32c 100644 --- a/layout/reftests/css-ui-valid/select/reftest.list +++ b/layout/reftests/css-ui-valid/select/reftest.list @@ -12,7 +12,7 @@ fuzzy-if(skiaContent,2,5) needs-focus == select-required-valid-changed-2.html se needs-focus == select-required-multiple-invalid.html select-required-multiple-ref.html needs-focus == select-required-multiple-valid.html select-required-multiple-ref.html fuzzy(64,4) fuzzy-if(asyncPan&&layersGPUAccelerated,84,77) fuzzy-if(skiaContent,1,1000) needs-focus == select-required-multiple-valid-changed.html select-required-multiple-ref.html -fails-if(Android) needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html -fails-if(Android) fuzzy-if(skiaContent&&!Android,2,10) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html +needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html +fuzzy-if(skiaContent,2,10) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html fuzzy-if(skiaContent,2,10) needs-focus == select-fieldset-legend.html select-fieldset-legend-ref.html fuzzy-if(skiaContent,2,5) needs-focus == select-novalidate.html select-required-ref.html diff --git a/layout/reftests/css-ui-valid/textarea/reftest-stylo.list b/layout/reftests/css-ui-valid/textarea/reftest-stylo.list deleted file mode 100644 index 06417ad921..0000000000 --- a/layout/reftests/css-ui-valid/textarea/reftest-stylo.list +++ /dev/null @@ -1,21 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== textarea-valid.html textarea-valid.html -== textarea-customerror.html textarea-customerror.html -== textarea-disabled.html textarea-disabled.html -== textarea-dyn-disabled.html textarea-dyn-disabled.html -== textarea-dyn-not-disabled.html textarea-dyn-not-disabled.html -== textarea-dyn-not-disabled-changed.html textarea-dyn-not-disabled-changed.html -== textarea-readonly.html textarea-readonly.html -== textarea-dyn-readonly.html textarea-dyn-readonly.html -== textarea-dyn-not-readonly.html textarea-dyn-not-readonly.html -== textarea-dyn-not-readonly-changed.html textarea-dyn-not-readonly-changed.html -skip == textarea-maxlength-valid.html textarea-maxlength-valid.html -skip == textarea-maxlength-valid-changed.html textarea-maxlength-valid-changed.html -skip == textarea-maxlength-invalid.html textarea-maxlength-invalid.html -== textarea-required-valid.html textarea-required-valid.html -== textarea-required-valid-changed.html textarea-required-valid-changed.html -== textarea-required-invalid.html textarea-required-invalid.html -== textarea-disabled-fieldset-1.html textarea-disabled-fieldset-1.html -== textarea-disabled-fieldset-2.html textarea-disabled-fieldset-2.html -== textarea-fieldset-legend.html textarea-fieldset-legend.html -== textarea-novalidate.html textarea-novalidate.html diff --git a/layout/reftests/css-valid/button/reftest-stylo.list b/layout/reftests/css-valid/button/reftest-stylo.list deleted file mode 100644 index 44f68ec361..0000000000 --- a/layout/reftests/css-valid/button/reftest-stylo.list +++ /dev/null @@ -1,13 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== button-valid.html button-valid.html -fails fuzzy-if(skiaContent,1,3) == button-invalid.html button-invalid.html -== button-disabled.html button-disabled.html -== button-dyn-disabled.html button-dyn-disabled.html -fails fuzzy-if(skiaContent,1,3) == button-dyn-not-disabled.html button-dyn-not-disabled.html -fuzzy-if(skiaContent,1,3) == button-button.html button-button.html -fails fuzzy-if(skiaContent,1,3) == button-reset.html button-reset.html -fails fuzzy-if(skiaContent,1,3) == button-type-invalid.html button-type-invalid.html -fails fuzzy-if(skiaContent,1,3) == button-type-barred.html button-type-barred.html -== button-disabled-fieldset-1.html button-disabled-fieldset-1.html -fuzzy-if(skiaContent,1,3) == button-disabled-fieldset-2.html button-disabled-fieldset-2.html -== button-fieldset-legend.html button-fieldset-legend.html diff --git a/layout/reftests/css-valid/fieldset/reftest-stylo.list b/layout/reftests/css-valid/fieldset/reftest-stylo.list deleted file mode 100644 index ddb0141902..0000000000 --- a/layout/reftests/css-valid/fieldset/reftest-stylo.list +++ /dev/null @@ -1,3 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== fieldset-valid.html fieldset-valid.html -== fieldset-invalid.html fieldset-invalid.html diff --git a/layout/reftests/css-valid/input/reftest-stylo.list b/layout/reftests/css-valid/input/reftest-stylo.list deleted file mode 100644 index 4124b358b7..0000000000 --- a/layout/reftests/css-valid/input/reftest-stylo.list +++ /dev/null @@ -1,37 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== input-valid.html input-valid.html -== input-customerror.html input-customerror.html -fails-if(B2G||Mulet) fuzzy-if(skiaContent,1,3) == input-disabled.html input-disabled.html -# Initial mulet triage: parity with B2G/B2G Desktop -fails-if(B2G||Mulet) fuzzy-if(skiaContent,1,3) == input-dyn-disabled.html input-dyn-disabled.html -# Initial mulet triage: parity with B2G/B2G Desktop -fuzzy-if(skiaContent,1,3) == input-dyn-not-disabled.html input-dyn-not-disabled.html -fuzzy-if(skiaContent,1,3) == input-readonly.html input-readonly.html -fuzzy-if(skiaContent,1,3) == input-dyn-readonly.html input-dyn-readonly.html -fuzzy-if(skiaContent,1,3) == input-dyn-not-readonly.html input-dyn-not-readonly.html -skip == input-maxlength-valid.html input-maxlength-valid.html -skip == input-maxlength-invalid.html input-maxlength-invalid.html -== input-required-valid.html input-required-valid.html -fuzzy-if(skiaContent,1,3) == input-required-invalid.html input-required-invalid.html -fuzzy-if(skiaContent,2,5) == input-button.html input-button.html -skip fuzzy-if(skiaContent,2,5) == input-reset.html input-reset.html -== input-email-invalid.html input-email-invalid.html -fuzzy-if(skiaContent,2,5) == input-email-valid.html input-email-valid.html -== input-url-invalid.html input-url-invalid.html -== input-url-valid.html input-url-valid.html -== input-pattern-valid.html input-pattern-valid.html -== input-pattern-invalid.html input-pattern-invalid.html -fuzzy-if(skiaContent,2,5) == input-type-barred.html input-type-barred.html -== input-type-invalid.html input-type-invalid.html -== input-disabled-fieldset-1.html input-disabled-fieldset-1.html -fuzzy-if(skiaContent,1,3) == input-disabled-fieldset-2.html input-disabled-fieldset-2.html -skip == input-fieldset-legend.html input-fieldset-legend.html -== input-radio-required.html input-radio-required.html -== input-radio-customerror.html input-radio-customerror.html -== input-radio-dyn-valid-1.html input-radio-dyn-valid-1.html -== input-radio-dyn-valid-2.html input-radio-dyn-valid-2.html -== input-radio-nogroup-required-valid.html input-radio-nogroup-required-valid.html -== input-radio-nogroup-required-invalid.html input-radio-nogroup-required-invalid.html -== input-submit.html input-submit.html -== input-image.html input-image.html -# input type='hidden' shouldn't show diff --git a/layout/reftests/css-valid/output/reftest-stylo.list b/layout/reftests/css-valid/output/reftest-stylo.list deleted file mode 100644 index 3a855c81b8..0000000000 --- a/layout/reftests/css-valid/output/reftest-stylo.list +++ /dev/null @@ -1,3 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== output-valid.html output-valid.html -== output-invalid.html output-invalid.html diff --git a/layout/reftests/css-valid/reftest-stylo.list b/layout/reftests/css-valid/reftest-stylo.list deleted file mode 100644 index 6e196de260..0000000000 --- a/layout/reftests/css-valid/reftest-stylo.list +++ /dev/null @@ -1,10 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -# :valid should not apply on fieldset (always barred from constraint validation) -include fieldset/reftest-stylo.list - -# :valid should apply on the following elements -include button/reftest-stylo.list -include input/reftest-stylo.list -include select/reftest-stylo.list -include textarea/reftest-stylo.list -include output/reftest-stylo.list diff --git a/layout/reftests/css-valid/select/reftest-stylo.list b/layout/reftests/css-valid/select/reftest-stylo.list deleted file mode 100644 index 9a0b62b722..0000000000 --- a/layout/reftests/css-valid/select/reftest-stylo.list +++ /dev/null @@ -1,15 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -fuzzy-if(skiaContent,2,7) needs-focus == select-valid.html select-valid.html -fails fuzzy-if(skiaContent,2,5) needs-focus == select-invalid.html select-invalid.html -needs-focus == select-disabled.html select-disabled.html -fuzzy-if(skiaContent,1,5) needs-focus == select-dyn-disabled.html select-dyn-disabled.html -fails fuzzy-if(skiaContent,2,5) needs-focus == select-dyn-not-disabled.html select-dyn-not-disabled.html -needs-focus == select-required-invalid.html select-required-invalid.html -needs-focus == select-required-valid.html select-required-valid.html -needs-focus == select-required-multiple-invalid.html select-required-multiple-invalid.html -fuzzy-if(skiaContent,1,250) needs-focus == select-required-multiple-valid.html select-required-multiple-valid.html -fails-if(Android||B2G||Mulet) needs-focus == select-disabled-fieldset-1.html select-disabled-fieldset-1.html -# Initial mulet triage: parity with B2G/B2G Desktop -fails-if(Android||B2G||Mulet) fuzzy-if(skiaContent,1,3) needs-focus == select-disabled-fieldset-2.html select-disabled-fieldset-2.html -# Initial mulet triage: parity with B2G/B2G Desktop -needs-focus == select-fieldset-legend.html select-fieldset-legend.html diff --git a/layout/reftests/css-valid/select/reftest.list b/layout/reftests/css-valid/select/reftest.list index e88d25f53b..a613551360 100644 --- a/layout/reftests/css-valid/select/reftest.list +++ b/layout/reftests/css-valid/select/reftest.list @@ -7,6 +7,6 @@ needs-focus == select-required-invalid.html select-required-ref.html needs-focus == select-required-valid.html select-required-ref.html needs-focus == select-required-multiple-invalid.html select-required-multiple-ref.html fuzzy-if(skiaContent,1,250) needs-focus == select-required-multiple-valid.html select-required-multiple-ref.html -fails-if(Android) needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html -fails-if(Android) fuzzy-if(skiaContent&&!Android,1,3) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html +needs-focus == select-disabled-fieldset-1.html select-fieldset-ref.html +fuzzy-if(skiaContent,1,3) needs-focus == select-disabled-fieldset-2.html select-fieldset-ref.html needs-focus == select-fieldset-legend.html select-fieldset-legend-ref.html diff --git a/layout/reftests/css-valid/textarea/reftest-stylo.list b/layout/reftests/css-valid/textarea/reftest-stylo.list deleted file mode 100644 index cd7a2facf3..0000000000 --- a/layout/reftests/css-valid/textarea/reftest-stylo.list +++ /dev/null @@ -1,16 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== textarea-valid.html textarea-valid.html -== textarea-customerror.html textarea-customerror.html -== textarea-disabled.html textarea-disabled.html -== textarea-dyn-disabled.html textarea-dyn-disabled.html -== textarea-dyn-not-disabled.html textarea-dyn-not-disabled.html -== textarea-readonly.html textarea-readonly.html -== textarea-dyn-readonly.html textarea-dyn-readonly.html -== textarea-dyn-not-readonly.html textarea-dyn-not-readonly.html -skip == textarea-maxlength-valid.html textarea-maxlength-valid.html -skip == textarea-maxlength-invalid.html textarea-maxlength-invalid.html -== textarea-required-valid.html textarea-required-valid.html -== textarea-required-invalid.html textarea-required-invalid.html -== textarea-disabled-fieldset-1.html textarea-disabled-fieldset-1.html -== textarea-disabled-fieldset-2.html textarea-disabled-fieldset-2.html -== textarea-fieldset-legend.html textarea-fieldset-legend.html diff --git a/layout/reftests/css-valuesandunits/reftest-stylo.list b/layout/reftests/css-valuesandunits/reftest-stylo.list deleted file mode 100644 index 2d1be233da..0000000000 --- a/layout/reftests/css-valuesandunits/reftest-stylo.list +++ /dev/null @@ -1,19 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== unit-rem-div-fontsize.html unit-rem-div-fontsize.html -== unit-rem-div-width-inner.html unit-rem-div-width-inner.html -== unit-rem-div-width-outer.html unit-rem-div-width-outer.html -skip-if(B2G||Mulet) == unit-rem-iframe.html unit-rem-iframe.html -# bug 773482 -# Initial mulet triage: parity with B2G/B2G Desktop -== unit-rem-root-fontsize.html unit-rem-root-fontsize.html -== unit-rem-root-fontsize.html unit-rem-root-fontsize.html -== unit-rem-root-width.html unit-rem-root-width.html -== unit-rem.svg unit-rem.svg -skip == unit-vh-vw.html unit-vh-vw.html -== unit-vh-vw-zoom.html unit-vh-vw-zoom.html -== unit-vh-vw-overflow-auto.html unit-vh-vw-overflow-auto.html -== unit-vh-vw-overflow-scroll.html unit-vh-vw-overflow-scroll.html -skip == unit-vh-vw-overflow-scroll-x.html unit-vh-vw-overflow-scroll-x.html -== unit-vh-vw-overflow-scroll-y.html unit-vh-vw-overflow-scroll-y.html -skip == unit-vh-vw-overflow-auto.html unit-vh-vw-overflow-auto.html -# Initial mulet triage: parity with B2G/B2G Desktop diff --git a/layout/reftests/css-valuesandunits/reftest.list b/layout/reftests/css-valuesandunits/reftest.list index 5e251b0045..94c2e1f812 100644 --- a/layout/reftests/css-valuesandunits/reftest.list +++ b/layout/reftests/css-valuesandunits/reftest.list @@ -12,4 +12,4 @@ == unit-vh-vw-overflow-scroll.html unit-vh-vw-overflow-scroll-ref.html == unit-vh-vw-overflow-scroll-x.html unit-vh-vw-overflow-scroll-x-ref.html == unit-vh-vw-overflow-scroll-y.html unit-vh-vw-overflow-scroll-y-ref.html -skip-if(Android) != unit-vh-vw-overflow-auto.html unit-vh-vw-overflow-scroll.html +!= unit-vh-vw-overflow-auto.html unit-vh-vw-overflow-scroll.html diff --git a/layout/reftests/css-variables/reftest-stylo.list b/layout/reftests/css-variables/reftest-stylo.list deleted file mode 100644 index 859f44c5e7..0000000000 --- a/layout/reftests/css-variables/reftest-stylo.list +++ /dev/null @@ -1,5 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -default-preferences pref(layout.css.variables.enabled,true) - -skip == variables-ruletree-cache-01.html variables-ruletree-cache-01.html -skip == variables-ruletree-cache-02.html variables-ruletree-cache-02.html diff --git a/layout/reftests/css-visited/reftest-stylo.list b/layout/reftests/css-visited/reftest-stylo.list deleted file mode 100644 index 40236791f5..0000000000 --- a/layout/reftests/css-visited/reftest-stylo.list +++ /dev/null @@ -1,5 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -# Because coloring of visited links is asynchronous and does not block -# or fire any events, the tests in this directory are not run through -# the reftest harness. Instead, they are run through -# layout/style/tests/test_visited_reftests.html . diff --git a/layout/reftests/cssom/reftest-stylo.list b/layout/reftests/cssom/reftest-stylo.list deleted file mode 100644 index 0677cddf67..0000000000 --- a/layout/reftests/cssom/reftest-stylo.list +++ /dev/null @@ -1,5 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -fails skip-if(B2G||Mulet) fuzzy-if(skiaContent,2,5) == computed-style-cross-window.html computed-style-cross-window.html -# bug 773482 -# Initial mulet triage: parity with B2G/B2G Desktop -== inline-style-null.html inline-style-null.html diff --git a/layout/reftests/datalist/reftest-stylo.list b/layout/reftests/datalist/reftest-stylo.list deleted file mode 100644 index fab81b7214..0000000000 --- a/layout/reftests/datalist/reftest-stylo.list +++ /dev/null @@ -1,3 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -== datalist-simple.html datalist-simple.html -== datalist-errors.html datalist-errors.html diff --git a/layout/reftests/details-summary/reftest-stylo.list b/layout/reftests/details-summary/reftest-stylo.list deleted file mode 100644 index 2c6ec0d7b9..0000000000 --- a/layout/reftests/details-summary/reftest-stylo.list +++ /dev/null @@ -1,81 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing - -# Basic handling -== multiple-summary.html multiple-summary.html -== open-multiple-summary.html open-multiple-summary.html -== summary-not-first-child.html summary-not-first-child.html -== open-summary-not-first-child.html open-summary-not-first-child.html -== open-summary-block-style.html open-summary-block-style.html -== no-summary.html no-summary.html -== open-no-summary.html open-no-summary.html -== summary-not-in-details.html summary-not-in-details.html -== summary-not-direct-child.html summary-not-direct-child.html -== float-in-summary.html float-in-summary.html - -# Add elements dynamically -== dynamic-add-single-summary.html dynamic-add-single-summary.html -== dynamic-add-summary-not-first-child.html dynamic-add-summary-not-first-child.html -== dynamic-add-summary-and-paragraph.html dynamic-add-summary-and-paragraph.html -== dynamic-add-paragraph-before-summary.html dynamic-add-paragraph-before-summary.html -== dynamic-add-paragraph-before-summary-close.html dynamic-add-paragraph-before-summary-close.html -== dynamic-add-paragraph-after-summary.html dynamic-add-paragraph-after-summary.html -== dynamic-add-paragraph-after-summary-close.html dynamic-add-paragraph-after-summary-close.html -== dynamic-add-details.html dynamic-add-details.html -== dynamic-add-first-summary.html dynamic-add-first-summary.html -== dynamic-add-second-summary.html dynamic-add-second-summary.html - -# Remove elements dynamically -== dynamic-remove-single-summary.html dynamic-remove-single-summary.html -== dynamic-remove-summary-not-first-child.html dynamic-remove-summary-not-first-child.html -== dynamic-remove-first-summary.html dynamic-remove-first-summary.html -== dynamic-remove-second-summary.html dynamic-remove-second-summary.html - -# Toggle details by open attribute -== close-nested-details.html close-nested-details.html -== open-nested-details.html open-nested-details.html - -# With 'overflow' property -== overflow-hidden-open-details.html overflow-hidden-open-details.html -== overflow-auto-open-details.html overflow-auto-open-details.html - -# With pagination property -== details-page-break-after-1.html details-page-break-after-1.html -== details-page-break-after-2.html details-page-break-after-2.html -== details-page-break-before-1.html details-page-break-before-1.html -== details-page-break-before-2.html details-page-break-before-2.html - -# Various properties on details or summary -== details-display-inline.html details-display-inline.html -== details-percentage-height-children.html details-percentage-height-children.html -== details-absolute-children.html details-absolute-children.html -== details-three-columns.html details-three-columns.html -== details-writing-mode.html details-writing-mode.html -== details-in-ol.html details-in-ol.html -== summary-three-columns.html summary-three-columns.html - -# Dispatch mouse click to summary -== mouse-click-single-summary.html mouse-click-single-summary.html -== mouse-click-twice-single-summary.html mouse-click-twice-single-summary.html -== mouse-click-open-single-summary.html mouse-click-open-single-summary.html -== mouse-click-twice-open-single-summary.html mouse-click-twice-open-single-summary.html -== mouse-click-open-second-summary.html mouse-click-open-second-summary.html -== mouse-click-overflow-hidden-details.html mouse-click-overflow-hidden-details.html -== mouse-click-twice-overflow-hidden-details.html mouse-click-twice-overflow-hidden-details.html -skip == mouse-click-overflow-auto-details.html mouse-click-overflow-auto-details.html -== mouse-click-twice-overflow-auto-details.html mouse-click-twice-overflow-auto-details.html -== mouse-click-display-none-details.html mouse-click-display-none-details.html -== mouse-click-change-details-to-display-none.html mouse-click-change-details-to-display-none.html -== mouse-click-change-summary-to-display-none.html mouse-click-change-summary-to-display-none.html -== mouse-click-move-summary-to-different-details.html mouse-click-move-summary-to-different-details.html - -# Dispatch mouse click to out-of-flow details or summary -== mouse-click-fixed-summary.html mouse-click-fixed-summary.html -== mouse-click-twice-fixed-summary.html mouse-click-twice-fixed-summary.html -== mouse-click-float-details.html mouse-click-float-details.html -== mouse-click-twice-float-details.html mouse-click-twice-float-details.html - -# Dispatch keyboard event to summary -== key-enter-single-summary.html key-enter-single-summary.html -== key-enter-open-second-summary.html key-enter-open-second-summary.html -== key-enter-prevent-default.html key-enter-prevent-default.html -== key-space-single-summary.html key-space-single-summary.html diff --git a/layout/reftests/dom/reftest-stylo.list b/layout/reftests/dom/reftest-stylo.list deleted file mode 100644 index 266ec1c2bb..0000000000 --- a/layout/reftests/dom/reftest-stylo.list +++ /dev/null @@ -1,76 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -# various tests involving dynamic insertion using the DOM - -# append a single element -skip == appendsingle.html appendsingle.html - -# append several elements -skip == appendmultiple.html appendmultiple.html - -# insert a single element -== insertsingle.html insertsingle.html - -# insert several elements -== insertmultiple.html insertmultiple.html - -# insert multiple nodes to a parent and one of its children -== inserttoparentandchild-1.html inserttoparentandchild-1.html -== inserttoparentandchild-2.html inserttoparentandchild-2.html - -# insert a parent with child and then insert more children to the parent -== insertparentandchild.html insertparentandchild.html - -# insert nodes to two different parents -== inserttwoparents.html inserttwoparents.html - -# multiple content inserts and appends -# multiple range inserts -== insertmultiplemultiple-1.html insertmultiplemultiple-1.html -# a range insert and an append -== insertmultiplemultiple-2.html insertmultiplemultiple-2.html -# multiple range inserts and an append -== insertmultiplemultiple-2.html insertmultiplemultiple-2.html - -# testing bindings that have multiple insertion points -# skip XBL test case on B2G -skip-if(B2G||Mulet) == multipleinsertionpoints-ref2.xhtml multipleinsertionpoints-ref2.xhtml -# Initial mulet triage: parity with B2G/B2G Desktop -# append a single element -skip skip-if(B2G||Mulet) == multipleinsertionpoints-appendsingle-1.xhtml multipleinsertionpoints-appendsingle-1.xhtml -# bug 773482 -# Initial mulet triage: parity with B2G/B2G Desktop -skip skip-if(B2G||Mulet) == multipleinsertionpoints-appendsingle-2.xhtml multipleinsertionpoints-appendsingle-2.xhtml -# bug 773482 -# Initial mulet triage: parity with B2G/B2G Desktop -# append several elements -skip skip-if(B2G||Mulet) == multipleinsertionpoints-appendmultiple.xhtml multipleinsertionpoints-appendmultiple.xhtml -# bug 773482 -# Initial mulet triage: parity with B2G/B2G Desktop -# insert a single element -skip-if(B2G||Mulet) == multipleinsertionpoints-insertsingle-1.xhtml multipleinsertionpoints-insertsingle-1.xhtml -# bug 773482 -# Initial mulet triage: parity with B2G/B2G Desktop -skip-if(B2G||Mulet) == multipleinsertionpoints-insertsingle-2.xhtml multipleinsertionpoints-insertsingle-2.xhtml -# bug 773482 -# Initial mulet triage: parity with B2G/B2G Desktop -# insert several elements -skip-if(B2G||Mulet) == multipleinsertionpoints-insertmultiple.xhtml multipleinsertionpoints-insertmultiple.xhtml -# bug 773482 -# Initial mulet triage: parity with B2G/B2G Desktop - -# test appending some nodes whose frame construction should be done lazily -# followed by appending a node that might not be done lazily -skip skip-if((B2G&&browserIsRemote)||Mulet) == multipleappendwithxul.xhtml multipleappendwithxul.xhtml -# Bug 974780 -# Initial mulet triage: parity with B2G/B2G Desktop -skip == multipleappendwithinput.xhtml multipleappendwithinput.xhtml -skip == multipleappendwitheditable.xhtml multipleappendwitheditable.xhtml - -skip-if(B2G||Mulet) == xbl-children-1.xhtml xbl-children-1.xhtml -# Initial mulet triage: parity with B2G/B2G Desktop -skip-if(B2G||Mulet) == xbl-children-2.xhtml xbl-children-2.xhtml -# Initial mulet triage: parity with B2G/B2G Desktop -skip-if(B2G||Mulet) == xbl-children-3.xhtml xbl-children-3.xhtml -# Initial mulet triage: parity with B2G/B2G Desktop -skip-if(B2G||Mulet) == xbl-children-4.xhtml xbl-children-4.xhtml -# Initial mulet triage: parity with B2G/B2G Desktop diff --git a/layout/reftests/first-letter/reftest-stylo.list b/layout/reftests/first-letter/reftest-stylo.list deleted file mode 100644 index 81751d0d63..0000000000 --- a/layout/reftests/first-letter/reftest-stylo.list +++ /dev/null @@ -1,82 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -# basic functionality -== basic-1.html basic-1.html -== basic-2.html basic-2.html - -# parent style context correct -== parent-style-1.html parent-style-1.html - -# others -== nested-1a.html nested-1a.html -== nested-1b.html nested-1b.html -== nested-1c.html nested-1c.html -== nested-1d.html nested-1d.html -== nested-1e.html nested-1e.html -== nested-1f.html nested-1f.html -== nested-1g.html nested-1g.html -== quote-1a.html quote-1a.html -== quote-1b.html quote-1b.html -# bug 509685 -== quote-1c.html quote-1c.html -# bug 509685 -== quote-1c.html quote-1c.html -== quote-1d.html quote-1d.html -== quote-1d.html quote-1d.html -== quote-1e.html quote-1e.html -# bug 509685 -== quote-1e.html quote-1e.html -== quote-1f.html quote-1f.html -== dynamic-1.html dynamic-1.html -# bug 8253 -random-if(d2d) == dynamic-2.html dynamic-2.html -== dynamic-3a.html dynamic-3a.html -== dynamic-3b.html dynamic-3b.html -== 23605-1.html 23605-1.html -== 23605-2.html 23605-2.html -== 23605-3.html 23605-3.html -== 23605-4.html 23605-4.html -== 23605-5.html 23605-5.html -== 23605-6.html 23605-6.html -== 229764-1.html 229764-1.html -== 229764-2.html 229764-2.html -== 329069-1.html 329069-1.html -fails-if(Android) == 329069-2.html 329069-2.html -# Bug 999139 -== 329069-3.html 329069-3.html -== 329069-4.html 329069-4.html -HTTP(..) == 329069-5.html 329069-5.html -== 342120-1.xhtml 342120-1.xhtml -== 379799-1.html 379799-1.html -== 399941-1.html 399941-1.html -== 399941-2.html 399941-2.html -== 399941-3.html 399941-3.html -== 399941-4.html 399941-4.html -== 399941-5.html 399941-5.html -== 399941-6.html 399941-6.html -== 399941-7.html 399941-7.html -== 399941-8.html 399941-8.html -== 399941-9.html 399941-9.html -== 429968-1a.html 429968-1a.html -== 429968-1b.html 429968-1b.html -== 429968-2a.html 429968-2a.html -== 429968-2b.html 429968-2b.html -== 429968-2c.html 429968-2c.html -== 441418-1.html 441418-1.html -== 469227-1.html 469227-1.html -== 484400-1.html 484400-1.html -skip == 594303-1.html 594303-1.html -skip fails-if(winWidget||cocoaWidget) == 617869-1.html 617869-1.html -== 723509-1.html 723509-1.html -== 922550-1.html 922550-1.html -== 958249.html 958249.html -== font-text-styles.html font-text-styles.html -skip == font-text-styles-floater.html font-text-styles-floater.html -# bug 992846 -# Initial mulet triage: parity with B2G/B2G Desktop -== inline-height-empty.html inline-height-empty.html -HTTP(..) == indic-clusters-1.html indic-clusters-1.html -== overflow-float-nooverflow.html overflow-float-nooverflow.html -== overflow-float-overflow.html overflow-float-overflow.html -== overflow-inline-nooverflow.html overflow-inline-nooverflow.html -== overflow-inline-overflow.html overflow-inline-overflow.html -== overflow-inline-overflow.html overflow-inline-overflow.html diff --git a/layout/reftests/first-letter/reftest.list b/layout/reftests/first-letter/reftest.list index bc79242063..9c6a03a16b 100644 --- a/layout/reftests/first-letter/reftest.list +++ b/layout/reftests/first-letter/reftest.list @@ -35,7 +35,7 @@ random-if(d2d) == dynamic-2.html dynamic-2-ref.html != 229764-1.html 229764-ref.html == 229764-2.html 229764-ref.html == 329069-1.html 329069-1-ref.html -fails-if(Android) == 329069-2.html 329069-2-ref.html # Bug 999139 +== 329069-2.html 329069-2-ref.html # Bug 999139 == 329069-3.html 329069-3-ref.html == 329069-4.html 329069-4-ref.html HTTP(..) == 329069-5.html 329069-5-ref.html diff --git a/layout/reftests/first-line/reftest-stylo.list b/layout/reftests/first-line/reftest-stylo.list deleted file mode 100644 index 4c2ad992c2..0000000000 --- a/layout/reftests/first-line/reftest-stylo.list +++ /dev/null @@ -1,49 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -# basic functionality -== basic-1.html basic-1.html - -# handling of out-of-flows when ::first-line happens -== out-of-flow-1a.html out-of-flow-1a.html -== out-of-flow-1b.html out-of-flow-1b.html -== out-of-flow-1c.html out-of-flow-1c.html -== out-of-flow-1d.html out-of-flow-1d.html -# bug 396645 - -# parent style context correct -== parent-style-1.html parent-style-1.html -== parent-style-2.html parent-style-2.html -== parent-style-3.html parent-style-3.html - -# stress-tests -skip load stress-1.html -# assertion test -skip == stress-2.html stress-2.html -# assertion + rendering test -skip load stress-3.html -# assertion test -load stress-4.html -# assertion/crash test. -load stress-5.html -# assertion/crash test -load stress-6.html -# assertion/crash test -load stress-7.html -# assertion/crash test -== stress-8.html stress-8.html -# assertion/crash test -== stress-9.html stress-9.html -# assertion/crash test -load stress-10.html -# crash test -== stress-11.xhtml stress-11.xhtml - -skip == border-not-apply.html border-not-apply.html -skip == 287088-1.html 287088-1.html -skip == 287088-2.html 287088-2.html -== 403177-1.html 403177-1.html -== 469227-2.html 469227-2.html -== 469227-3.html 469227-3.html - -== restyle-inside-first-line.html restyle-inside-first-line.html -== font-styles.html font-styles.html -fuzzy-if(OSX==1010,1,2) == font-styles-nooverflow.html font-styles-nooverflow.html diff --git a/layout/reftests/flexbox/pagination/reftest-stylo.list b/layout/reftests/flexbox/pagination/reftest-stylo.list deleted file mode 100644 index 47156fa3ab..0000000000 --- a/layout/reftests/flexbox/pagination/reftest-stylo.list +++ /dev/null @@ -1,31 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -# Tests with an empty flex container being fragmented: -== flexbox-empty-1a.html flexbox-empty-1a.html -== flexbox-empty-1b.html flexbox-empty-1b.html -== flexbox-empty-1c.html flexbox-empty-1c.html -== flexbox-empty-1d.html flexbox-empty-1d.html - -# Tests with an empty flex container that overflows a short fixed-height block -# being fragmented: -== flexbox-empty-1e.html flexbox-empty-1e.html -== flexbox-empty-1f.html flexbox-empty-1f.html -== flexbox-empty-1g.html flexbox-empty-1g.html -== flexbox-empty-1h.html flexbox-empty-1h.html - -# Tests with an empty flex container being fragmented, with margin, border, -# and/or padding being taller than the available height: -== flexbox-empty-2a.html flexbox-empty-2a.html -== flexbox-empty-2b.html flexbox-empty-2b.html -== flexbox-empty-2c.html flexbox-empty-2c.html -== flexbox-empty-2d.html flexbox-empty-2d.html - -# Tests for how we fragment a flex container with one unbreakable child -== flexbox-unbreakable-child-1a.html flexbox-unbreakable-child-1a.html -== flexbox-unbreakable-child-1a-wrap.html flexbox-unbreakable-child-1a-wrap.html -== flexbox-unbreakable-child-1b.html flexbox-unbreakable-child-1b.html -== flexbox-unbreakable-child-1b-wrap.html flexbox-unbreakable-child-1b-wrap.html -== flexbox-unbreakable-child-1c.html flexbox-unbreakable-child-1c.html -== flexbox-unbreakable-child-1c-wrap.html flexbox-unbreakable-child-1c-wrap.html -== flexbox-unbreakable-child-1d.html flexbox-unbreakable-child-1d.html -== flexbox-unbreakable-child-1d-wrap.html flexbox-unbreakable-child-1d-wrap.html -== flexbox-unbreakable-child-2.html flexbox-unbreakable-child-2.html diff --git a/layout/reftests/flexbox/reftest-stylo.list b/layout/reftests/flexbox/reftest-stylo.list deleted file mode 100644 index be3987fba8..0000000000 --- a/layout/reftests/flexbox/reftest-stylo.list +++ /dev/null @@ -1,121 +0,0 @@ -# DO NOT EDIT! This is a auto-generated temporary list for Stylo testing -# NOTE: Most of our flexbox tests have moved to the w3c-css reftest directory. -# The tests that remain in *this* directory are still here because either: -# a) They (or one of their closely-related tests) use some moz-prefixed -# feature, e.g. MozReftestInvalidate or -moz-max-content. -# ...or... -# b) They test a feature that has known bugs (e.g. bug 874713) -# -# Where possible & practical, we should try to address these so we can migrate -# tests over to the w3c-css directory, so that they can become part of the -# W3C's test suite. - -# SUBDIRECTORY: Reftests for paginated flex containers -include pagination/reftest-stylo.list - -# Tests for cross-axis alignment (align-self / align-items properties) -== flexbox-align-self-baseline-horiz-2.xhtml flexbox-align-self-baseline-horiz-2.xhtml -# bug 793456, and possibly others -# This one fails on windows R (but not Ru, strangely). On Windows R, the -# single-line