From db092f3c12345f99e7fc0c926af728fe1f409185 Mon Sep 17 00:00:00 2001 From: Ting-Yu Chou Date: Mon, 1 Sep 2014 10:43:39 +0800 Subject: [PATCH 001/139] Bug 1050122 - Enable Nuwa on debug builds, and kill it if the preference is false. r=khuey --- b2g/app/B2GLoader.cpp | 7 +++++++ b2g/app/b2g.js | 2 -- ipc/glue/ProcessUtils_linux.cpp | 9 +++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/b2g/app/B2GLoader.cpp b/b2g/app/B2GLoader.cpp index 7e0aa9627840..6359331c2d46 100644 --- a/b2g/app/B2GLoader.cpp +++ b/b2g/app/B2GLoader.cpp @@ -215,6 +215,13 @@ RunProcesses(int argc, const char *argv[]) return XRE_ProcLoaderServiceRun(getppid(), childSock, argc, argv); } + // Reap zombie child process. + struct sigaction sa; + sa.sa_handler = SIG_IGN; + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + sigaction(SIGCHLD, &sa, nullptr); + // The b2g process int childPid = pid; XRE_ProcLoaderClientInit(childPid, parentSock); diff --git a/b2g/app/b2g.js b/b2g/app/b2g.js index d002a1c69fba..9a2d221082c8 100644 --- a/b2g/app/b2g.js +++ b/b2g/app/b2g.js @@ -754,13 +754,11 @@ pref("hal.processPriorityManager.gonk.notifyLowMemUnderKB", 14336); // blocked on a poll(), and this pref has no effect.) pref("gonk.systemMemoryPressureRecoveryPollMS", 5000); -#ifndef DEBUG // Enable pre-launching content processes for improved startup time // (hiding latency). pref("dom.ipc.processPrelaunch.enabled", true); // Wait this long before pre-launching a new subprocess. pref("dom.ipc.processPrelaunch.delayMs", 5000); -#endif pref("dom.ipc.reuse_parent_app", false); diff --git a/ipc/glue/ProcessUtils_linux.cpp b/ipc/glue/ProcessUtils_linux.cpp index 42998991bd79..4a071d0baeab 100644 --- a/ipc/glue/ProcessUtils_linux.cpp +++ b/ipc/glue/ProcessUtils_linux.cpp @@ -28,6 +28,7 @@ #include "mozilla/BackgroundHangMonitor.h" #include "mozilla/DebugOnly.h" #include "base/process_util.h" +#include "mozilla/Preferences.h" #include "prenv.h" @@ -181,6 +182,14 @@ ProcLoaderClientGeckoInit() MOZ_ASSERT(!sProcLoaderClientGeckoInitialized, "call ProcLoaderClientGeckoInit() more than once"); + if (!Preferences::GetBool("dom.ipc.processPrelaunch.enabled", false)) { + kill(sProcLoaderPid, SIGKILL); + sProcLoaderPid = 0; + close(sProcLoaderChannelFd); + sProcLoaderChannelFd = -1; + return; + } + sProcLoaderClientGeckoInitialized = true; FileDescriptor *fd = new FileDescriptor(sProcLoaderChannelFd); From fc62c263b071e640d4cf5dcff4286681a8cd8bd8 Mon Sep 17 00:00:00 2001 From: Bruce Sun Date: Mon, 1 Sep 2014 18:04:36 +0800 Subject: [PATCH 002/139] Bug 1033915 - Integrate MP3FrameParser into MediaCodecReader. r=cajbir --- content/media/omx/MediaCodecReader.cpp | 320 +++++++++++++++++++++++-- content/media/omx/MediaCodecReader.h | 140 ++++++++++- 2 files changed, 443 insertions(+), 17 deletions(-) diff --git a/content/media/omx/MediaCodecReader.cpp b/content/media/omx/MediaCodecReader.cpp index 7c07cbff79f6..d6713eef98b2 100644 --- a/content/media/omx/MediaCodecReader.cpp +++ b/content/media/omx/MediaCodecReader.cpp @@ -29,6 +29,7 @@ #include "MediaStreamSource.h" #include "MediaTaskQueue.h" +#include "MP3FrameParser.h" #include "nsThreadUtils.h" #include "ImageContainer.h" #include "SharedThreadPool.h" @@ -131,6 +132,7 @@ MediaCodecReader::TrackInputCopier::Copy(MediaBuffer* aSourceBuffer, MediaCodecReader::Track::Track() : mSourceIsStopped(true) + , mDurationLock("MediaCodecReader::Track::mDurationLock") , mDurationUs(INT64_C(0)) , mInputIndex(sInvalidInputIndex) , mInputEndOfStream(false) @@ -193,10 +195,96 @@ MediaCodecReader::CodecBufferInfo::CodecBufferInfo() { } +MediaCodecReader::SignalObject::SignalObject(const char* aName) + : mMonitor(aName) + , mSignaled(false) +{ +} + +MediaCodecReader::SignalObject::~SignalObject() +{ +} + +void +MediaCodecReader::SignalObject::Wait() +{ + MonitorAutoLock al(mMonitor); + if (!mSignaled) { + mMonitor.Wait(); + } +} + +void +MediaCodecReader::SignalObject::Signal() +{ + MonitorAutoLock al(mMonitor); + mSignaled = true; + mMonitor.Notify(); +} + +MediaCodecReader::ParseCachedDataRunnable::ParseCachedDataRunnable(nsRefPtr aReader, + const char* aBuffer, + uint32_t aLength, + int64_t aOffset, + nsRefPtr aSignal) + : mReader(aReader) + , mBuffer(aBuffer) + , mLength(aLength) + , mOffset(aOffset) + , mSignal(aSignal) +{ + MOZ_ASSERT(mReader, "Should have a valid MediaCodecReader."); + MOZ_ASSERT(mBuffer, "Should have a valid buffer."); + MOZ_ASSERT(mOffset >= INT64_C(0), "Should have a valid offset."); +} + +NS_IMETHODIMP +MediaCodecReader::ParseCachedDataRunnable::Run() +{ + NS_ASSERTION(NS_IsMainThread(), "Should be on main thread."); + + if (mReader->ParseDataSegment(mBuffer, mLength, mOffset)) { + MonitorAutoLock monLock(mReader->mParserMonitor); + if (mReader->mNextParserPosition >= mOffset + mLength && + mReader->mParsedDataLength < mOffset + mLength) { + mReader->mParsedDataLength = mOffset + mLength; + } + } + + if (mSignal != nullptr) { + mSignal->Signal(); + } + + return NS_OK; +} + +MediaCodecReader::ProcessCachedDataTask::ProcessCachedDataTask(nsRefPtr aReader, + int64_t aOffset) + : mReader(aReader) + , mOffset(aOffset) +{ + MOZ_ASSERT(mReader, "Should have a valid MediaCodecReader."); + MOZ_ASSERT(mOffset >= INT64_C(0), "Should have a valid offset."); +} + +void +MediaCodecReader::ProcessCachedDataTask::Run() +{ + mReader->ProcessCachedData(mOffset, nullptr); + nsRefPtr> runnable( + new ReferenceKeeperRunnable(mReader)); + mReader = nullptr; + NS_DispatchToMainThread(runnable.get()); +} + MediaCodecReader::MediaCodecReader(AbstractMediaDecoder* aDecoder) : MediaOmxCommonReader(aDecoder) , mColorConverterBufferSize(0) , mExtractor(nullptr) + , mParserMonitor("MediaCodecReader::mParserMonitor") + , mParseDataFromCache(true) + , mNextParserPosition(INT64_C(0)) + , mParsedDataLength(INT64_C(0)) { mHandler = new MessageHandler(this); mVideoListener = new VideoResourceListener(this); @@ -421,6 +509,144 @@ MediaCodecReader::HasVideo() return mInfo.mVideo.mHasVideo; } +void +MediaCodecReader::NotifyDataArrived(const char* aBuffer, + uint32_t aLength, + int64_t aOffset) +{ + MonitorAutoLock monLock(mParserMonitor); + if (mNextParserPosition == mParsedDataLength && + mNextParserPosition >= aOffset && + mNextParserPosition <= aOffset + aLength) { + // No pending parsing runnable currently. And available data are adjacent to + // parsed data. + int64_t shift = mNextParserPosition - aOffset; + const char* buffer = aBuffer + shift; + uint32_t length = aLength - shift; + int64_t offset = mNextParserPosition; + if (length > 0) { + MonitorAutoUnlock monUnlock(mParserMonitor); + ParseDataSegment(buffer, length, offset); + } + mParseDataFromCache = false; + mParsedDataLength = offset + length; + mNextParserPosition = mParsedDataLength; + } +} + +int64_t +MediaCodecReader::ProcessCachedData(int64_t aOffset, + nsRefPtr aSignal) +{ + // We read data in chunks of 32 KiB. We can reduce this + // value if media, such as sdcards, is too slow. + // Because of SD card's slowness, need to keep sReadSize to small size. + // See Bug 914870. + static const int64_t sReadSize = 32 * 1024; + + MOZ_ASSERT(!NS_IsMainThread(), "Should not be on main thread."); + + { + MonitorAutoLock monLock(mParserMonitor); + if (!mParseDataFromCache) { + // Skip cache processing since data can be continuously be parsed by + // ParseDataSegment() from NotifyDataArrived() directly. + return INT64_C(0); + } + } + + MediaResource *resource = mDecoder->GetResource(); + MOZ_ASSERT(resource); + + int64_t resourceLength = resource->GetCachedDataEnd(0); + NS_ENSURE_TRUE(resourceLength >= 0, INT64_C(-1)); + + if (aOffset >= resourceLength) { + return INT64_C(0); // Cache is empty, nothing to do + } + + int64_t bufferLength = std::min(resourceLength - aOffset, sReadSize); + + nsAutoArrayPtr buffer(new char[bufferLength]); + + nsresult rv = resource->ReadFromCache(buffer.get(), aOffset, bufferLength); + NS_ENSURE_SUCCESS(rv, INT64_C(-1)); + + MonitorAutoLock monLock(mParserMonitor); + if (mParseDataFromCache) { + nsRefPtr runnable( + new ParseCachedDataRunnable(this, + buffer.forget(), + bufferLength, + aOffset, + aSignal)); + + rv = NS_DispatchToMainThread(runnable.get()); + NS_ENSURE_SUCCESS(rv, INT64_C(-1)); + + mNextParserPosition = aOffset + bufferLength; + if (mNextParserPosition < resource->GetCachedDataEnd(0)) { + // We cannot read data in the main thread because it + // might block for too long. Instead we post an IO task + // to the IO thread if there is more data available. + XRE_GetIOMessageLoop()->PostTask(FROM_HERE, + new ProcessCachedDataTask(this, mNextParserPosition)); + } + } + + return bufferLength; +} + +bool +MediaCodecReader::ParseDataSegment(const char* aBuffer, + uint32_t aLength, + int64_t aOffset) +{ + NS_ASSERTION(NS_IsMainThread(), "Should be on main thread."); + + int64_t duration = INT64_C(-1); + + { + MonitorAutoLock monLock(mParserMonitor); + + // currently only mp3 files are supported for incremental parsing + if (mMP3FrameParser == nullptr) { + return false; + } + + if (!mMP3FrameParser->IsMP3()) { + return true; // NO-OP + } + + mMP3FrameParser->Parse(aBuffer, aLength, aOffset); + + duration = mMP3FrameParser->GetDuration(); + } + + bool durationUpdateRequired = false; + + { + MutexAutoLock al(mAudioTrack.mDurationLock); + if (duration > mAudioTrack.mDurationUs) { + mAudioTrack.mDurationUs = duration; + durationUpdateRequired = true; + } + } + + if (durationUpdateRequired && HasVideo()) { + MutexAutoLock al(mVideoTrack.mDurationLock); + durationUpdateRequired = duration > mVideoTrack.mDurationUs; + } + + if (durationUpdateRequired) { + MOZ_ASSERT(mDecoder); + ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor()); + mDecoder->UpdateEstimatedMediaDuration(duration); + } + + return true; +} + nsresult MediaCodecReader::ReadMetadata(MediaInfo* aInfo, MetadataTags** aTags) @@ -435,6 +661,10 @@ MediaCodecReader::ReadMetadata(MediaInfo* aInfo, CheckAudioOffload(); #endif + if (!TriggerIncrementalParser()) { + return NS_ERROR_FAILURE; + } + if (IsWaitingMediaResources()) { return NS_OK; } @@ -454,9 +684,18 @@ MediaCodecReader::ReadMetadata(MediaInfo* aInfo, } // Set the total duration (the max of the audio and video track). - int64_t duration = mAudioTrack.mDurationUs > mVideoTrack.mDurationUs ? - mAudioTrack.mDurationUs : mVideoTrack.mDurationUs; - if (duration >= 0LL) { + int64_t audioDuration = INT64_C(-1); + { + MutexAutoLock al(mAudioTrack.mDurationLock); + audioDuration = mAudioTrack.mDurationUs; + } + int64_t videoDuration = INT64_C(-1); + { + MutexAutoLock al(mVideoTrack.mDurationLock); + videoDuration = mVideoTrack.mDurationUs; + } + int64_t duration = audioDuration > videoDuration ? audioDuration : videoDuration; + if (duration >= INT64_C(0)) { ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor()); mDecoder->SetMediaDuration(duration); } @@ -814,8 +1053,7 @@ MediaCodecReader::CreateMediaSources() return false; } - sp extractorMetaData = mExtractor->getMetaData(); - // TODO: Check MP3 file format + mMetaData = mExtractor->getMetaData(); const ssize_t invalidTrackIndex = -1; ssize_t audioTrackIndex = invalidTrackIndex; @@ -960,7 +1198,6 @@ MediaCodecReader::CreateMediaCodec(sp& aLooper, bool MediaCodecReader::ConfigureMediaCodec(Track& aTrack) { - if (aTrack.mSource != nullptr && aTrack.mCodec != nullptr) { if (!aTrack.mCodec->allocated()) { return false; @@ -1009,6 +1246,54 @@ MediaCodecReader::DestroyMediaCodecs(Track& aTrack) aTrack.mCodec = nullptr; } +bool +MediaCodecReader::TriggerIncrementalParser() +{ + if (mMetaData == nullptr) { + return false; + } + + int64_t duration = INT64_C(-1); + + { + MonitorAutoLock monLock(mParserMonitor); + + // only support incremental parsing for mp3 currently. + if (mMP3FrameParser != nullptr) { + return true; + } + + mParseDataFromCache = true; + mNextParserPosition = INT64_C(0); + mParsedDataLength = INT64_C(0); + + // MP3 file duration + mMP3FrameParser = new MP3FrameParser(mDecoder->GetResource()->GetLength()); + const char* mime = nullptr; + if (mMetaData->findCString(kKeyMIMEType, &mime) && + !strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_MPEG)) { + { + MonitorAutoUnlock monUnlock(mParserMonitor); + // trigger parsing logic and wait for finishing parsing data in the beginning. + nsRefPtr signalObject = new SignalObject("MediaCodecReader::UpdateDuration()"); + if (ProcessCachedData(INT64_C(0), signalObject) > INT64_C(0)) { + signalObject->Wait(); + } + } + duration = mMP3FrameParser->GetDuration(); + } + } + + { + MutexAutoLock al(mAudioTrack.mDurationLock); + if (duration > mAudioTrack.mDurationUs) { + mAudioTrack.mDurationUs = duration; + } + } + + return true; +} + bool MediaCodecReader::UpdateDuration() { @@ -1016,23 +1301,26 @@ MediaCodecReader::UpdateDuration() if (mAudioTrack.mSource != nullptr) { sp audioFormat = mAudioTrack.mSource->getFormat(); if (audioFormat != nullptr) { - int64_t audioDurationUs = 0LL; - if (audioFormat->findInt64(kKeyDuration, &audioDurationUs) && - audioDurationUs > mAudioTrack.mDurationUs) { - mAudioTrack.mDurationUs = audioDurationUs; + int64_t duration = INT64_C(0); + if (audioFormat->findInt64(kKeyDuration, &duration)) { + MutexAutoLock al(mAudioTrack.mDurationLock); + if (duration > mAudioTrack.mDurationUs) { + mAudioTrack.mDurationUs = duration; + } } } } - // TODO: MP3 file duration // read video duration if (mVideoTrack.mSource != nullptr) { sp videoFormat = mVideoTrack.mSource->getFormat(); if (videoFormat != nullptr) { - int64_t videoDurationUs = 0LL; - if (videoFormat->findInt64(kKeyDuration, &videoDurationUs) && - videoDurationUs > mVideoTrack.mDurationUs) { - mVideoTrack.mDurationUs = videoDurationUs; + int64_t duration = INT64_C(0); + if (videoFormat->findInt64(kKeyDuration, &duration)) { + MutexAutoLock al(mVideoTrack.mDurationLock); + if (duration > mVideoTrack.mDurationUs) { + mVideoTrack.mDurationUs = duration; + } } } } @@ -1396,7 +1684,7 @@ MediaCodecReader::EnsureCodecFormatParsed(Track& aTrack) size_t index = 0; size_t offset = 0; size_t size = 0; - int64_t timeUs = 0LL; + int64_t timeUs = INT64_C(0); uint32_t flags = 0; while ((status = aTrack.mCodec->dequeueOutputBuffer(&index, &offset, &size, &timeUs, &flags)) != INFO_FORMAT_CHANGED) { diff --git a/content/media/omx/MediaCodecReader.h b/content/media/omx/MediaCodecReader.h index 53cf89f1ac1b..48b14c2940b8 100644 --- a/content/media/omx/MediaCodecReader.h +++ b/content/media/omx/MediaCodecReader.h @@ -9,7 +9,11 @@ #include +#include + #include +#include +#include #include "MediaData.h" @@ -22,14 +26,15 @@ struct ALooper; struct AMessage; class MOZ_EXPORT MediaExtractor; +class MOZ_EXPORT MetaData; class MOZ_EXPORT MediaBuffer; struct MOZ_EXPORT MediaSource; -struct MediaCodec; } // namespace android namespace mozilla { class MediaTaskQueue; +class MP3FrameParser; class MediaCodecReader : public MediaOmxCommonReader { @@ -55,6 +60,11 @@ public: // irreversible, whereas ReleaseMediaResources() is reversible. virtual void Shutdown(); + // Used to retrieve some special information that can only be retrieved after + // all contents have been continuously parsed. (ex. total duration of some + // variable-bit-rate MP3 files.) + virtual void NotifyDataArrived(const char* aBuffer, uint32_t aLength, int64_t aOffset); + // Flush the MediaTaskQueue, flush MediaCodec and raise the mDiscontinuity. virtual nsresult ResetDecode() MOZ_OVERRIDE; @@ -109,6 +119,8 @@ protected: nsAutoPtr mInputCopier; // media parameters + Mutex mDurationLock; // mDurationUs might be read or updated from multiple + // threads. int64_t mDurationUs; // playback parameters @@ -122,6 +134,11 @@ protected: bool mFlushed; // meaningless when mSeekTimeUs is invalid. bool mDiscontinuity; nsRefPtr mTaskQueue; + + private: + // Forbidden + Track(const Track &rhs) MOZ_DELETE; + const Track &operator=(const Track&) MOZ_DELETE; }; // Receive a message from MessageHandler. @@ -188,6 +205,11 @@ private: struct AudioTrack : public Track { AudioTrack(); + + private: + // Forbidden + AudioTrack(const AudioTrack &rhs) MOZ_DELETE; + const AudioTrack &operator=(const AudioTrack &rhs) MOZ_DELETE; }; struct VideoTrack : public Track @@ -203,6 +225,11 @@ private: nsIntSize mFrameSize; nsIntRect mPictureRect; gfx::IntRect mRelativePictureRect; + + private: + // Forbidden + VideoTrack(const VideoTrack &rhs) MOZ_DELETE; + const VideoTrack &operator=(const VideoTrack &rhs) MOZ_DELETE; }; struct CodecBufferInfo @@ -217,6 +244,101 @@ private: uint32_t mFlags; }; + class SignalObject + { + public: + NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SignalObject) + + SignalObject(const char* aName); + ~SignalObject(); + void Wait(); + void Signal(); + + private: + // Forbidden + SignalObject() MOZ_DELETE; + SignalObject(const SignalObject &rhs) MOZ_DELETE; + const SignalObject &operator=(const SignalObject &rhs) MOZ_DELETE; + + Monitor mMonitor; + bool mSignaled; + }; + + class ParseCachedDataRunnable : public nsRunnable + { + public: + ParseCachedDataRunnable(nsRefPtr aReader, + const char* aBuffer, + uint32_t aLength, + int64_t aOffset, + nsRefPtr aSignal); + + NS_IMETHOD Run() MOZ_OVERRIDE; + + private: + // Forbidden + ParseCachedDataRunnable() MOZ_DELETE; + ParseCachedDataRunnable(const ParseCachedDataRunnable &rhs) MOZ_DELETE; + const ParseCachedDataRunnable &operator=(const ParseCachedDataRunnable &rhs) MOZ_DELETE; + + nsRefPtr mReader; + nsAutoArrayPtr mBuffer; + uint32_t mLength; + int64_t mOffset; + nsRefPtr mSignal; + }; + friend class ParseCachedDataRunnable; + + class ProcessCachedDataTask : public Task + { + public: + ProcessCachedDataTask(nsRefPtr aReader, + int64_t aOffset); + + void Run() MOZ_OVERRIDE; + + private: + // Forbidden + ProcessCachedDataTask() MOZ_DELETE; + ProcessCachedDataTask(const ProcessCachedDataTask &rhs) MOZ_DELETE; + const ProcessCachedDataTask &operator=(const ProcessCachedDataTask &rhs) MOZ_DELETE; + + nsRefPtr mReader; + int64_t mOffset; + }; + friend class ProcessCachedDataTask; + + // This class is used to keep one reference count of T in it. And this class + // can make sure the stored reference count will be released on the dispatched + // thread. By using this class properly (ex. passing the pointer into this + // runnable first, then releasing the original pointer held by ourselves, and + // then dispatching this runnable onto the desired thread), we can avoid + // running the destructor of the referenced object on any other threads + // unexpectedly before this runnable has been executed. + template + class ReferenceKeeperRunnable : public nsRunnable + { + public: + ReferenceKeeperRunnable(nsRefPtr aPointer) + : mPointer(aPointer) + { + } + + NS_IMETHOD Run() MOZ_OVERRIDE + { + mPointer = nullptr; + return NS_OK; + } + + private: + // Forbidden + ReferenceKeeperRunnable() MOZ_DELETE; + ReferenceKeeperRunnable(const ReferenceKeeperRunnable &rhs) MOZ_DELETE; + const ReferenceKeeperRunnable &operator=(const ReferenceKeeperRunnable &rhs) MOZ_DELETE; + + nsRefPtr mPointer; + }; + // Forbidden MediaCodecReader() MOZ_DELETE; const MediaCodecReader& operator=(const MediaCodecReader& rhs) MOZ_DELETE; @@ -260,6 +382,8 @@ private: mAudioTrack.mTaskQueue); } + bool TriggerIncrementalParser(); + bool UpdateDuration(); bool UpdateAudioInfo(); bool UpdateVideoInfo(); @@ -275,10 +399,17 @@ private: uint8_t* GetColorConverterBuffer(int32_t aWidth, int32_t aHeight); void ClearColorConverterBuffer(); + int64_t ProcessCachedData(int64_t aOffset, + nsRefPtr aSignal); + bool ParseDataSegment(const char* aBuffer, + uint32_t aLength, + int64_t aOffset); + android::sp mHandler; android::sp mVideoListener; android::sp mLooper; + android::sp mMetaData; // media tracks AudioTrack mAudioTrack; @@ -289,6 +420,13 @@ private: android::I420ColorConverterHelper mColorConverter; nsAutoArrayPtr mColorConverterBuffer; size_t mColorConverterBufferSize; + + // incremental parser + Monitor mParserMonitor; + bool mParseDataFromCache; + int64_t mNextParserPosition; + int64_t mParsedDataLength; + nsAutoPtr mMP3FrameParser; }; } // namespace mozilla From 7e9f88e039dd7b7acb521fa842ec67644e8b5775 Mon Sep 17 00:00:00 2001 From: Martin Thomson Date: Fri, 29 Aug 2014 14:59:00 +0200 Subject: [PATCH 003/139] Bug 1036737 - Adding fallback SCSV use. r=dkeeler --- security/manager/ssl/src/nsNSSIOLayer.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/security/manager/ssl/src/nsNSSIOLayer.cpp b/security/manager/ssl/src/nsNSSIOLayer.cpp index 88b6cbbdb0f2..5d73577f5470 100644 --- a/security/manager/ssl/src/nsNSSIOLayer.cpp +++ b/security/manager/ssl/src/nsNSSIOLayer.cpp @@ -1800,16 +1800,16 @@ nsGetUserCertChoice(SSM_UserCertChoice* certChoice) { char* mode = nullptr; nsresult ret; - + NS_ENSURE_ARG_POINTER(certChoice); - + nsCOMPtr pref = do_GetService(NS_PREFSERVICE_CONTRACTID); - + ret = pref->GetCharPref("security.default_personal_cert", &mode); if (NS_FAILED(ret)) { goto loser; } - + if (PL_strcmp(mode, "Select Automatically") == 0) { *certChoice = AUTO; } else if (PL_strcmp(mode, "Ask Every Time") == 0) { @@ -2394,6 +2394,8 @@ nsSSLIOLayerSetOptions(PRFileDesc* fd, bool forSTARTTLS, return NS_ERROR_FAILURE; } + uint16_t maxEnabledVersion = range.max; + infoObject->SharedState().IOLayerHelpers() .adjustForTLSIntolerance(infoObject->GetHostName(), infoObject->GetPort(), range); @@ -2407,6 +2409,16 @@ nsSSLIOLayerSetOptions(PRFileDesc* fd, bool forSTARTTLS, } infoObject->SetTLSVersionRange(range); + // when adjustForTLSIntolerance tweaks the maximum version downward, + // we tell the server using this SCSV so they can detect a downgrade attack + if (range.max < maxEnabledVersion) { + PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, + ("[%p] nsSSLIOLayerSetOptions: enabling TLS_FALLBACK_SCSV\n", fd)); + if (SECSuccess != SSL_OptionSet(fd, SSL_ENABLE_FALLBACK_SCSV, true)) { + return NS_ERROR_FAILURE; + } + } + bool enabled = infoObject->SharedState().IsOCSPStaplingEnabled(); if (SECSuccess != SSL_OptionSet(fd, SSL_ENABLE_OCSP_STAPLING, enabled)) { return NS_ERROR_FAILURE; From 7895a9249af600fc7815f1be5801aa7f832d0fb8 Mon Sep 17 00:00:00 2001 From: Zac Campbell Date: Fri, 29 Aug 2014 14:20:30 +0100 Subject: [PATCH 004/139] Bug 1060279 - Update marionette client b2g mixin to return DM only when session exists. r=mdas --- testing/marionette/client/marionette/runner/mixins/b2g.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/marionette/client/marionette/runner/mixins/b2g.py b/testing/marionette/client/marionette/runner/mixins/b2g.py index 129fb882c4f7..0adbc30f0725 100644 --- a/testing/marionette/client/marionette/runner/mixins/b2g.py +++ b/testing/marionette/client/marionette/runner/mixins/b2g.py @@ -43,7 +43,7 @@ class B2GTestCaseMixin(object): capabilities = self.marionette.session and \ self.marionette.session_capabilities or {} if not self._device_manager and \ - capabilities.get('device') != 'desktop': + capabilities.get('platform').lower() == 'android': self._device_manager = get_dm(self.marionette, **kwargs) return self._device_manager From 4954f26ac4e372ed2a7775eb826e9bd198e185ea Mon Sep 17 00:00:00 2001 From: Andrea Marchesini Date: Tue, 2 Sep 2014 08:36:48 +0100 Subject: [PATCH 005/139] Bug 1046578 - HTMLMediaElement has to change the audioChannel of the MediaStream, r=roc --- content/html/content/src/HTMLMediaElement.cpp | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/content/html/content/src/HTMLMediaElement.cpp b/content/html/content/src/HTMLMediaElement.cpp index 270fe914ad06..b27532f71993 100755 --- a/content/html/content/src/HTMLMediaElement.cpp +++ b/content/html/content/src/HTMLMediaElement.cpp @@ -2358,10 +2358,23 @@ bool HTMLMediaElement::ParseAttribute(int32_t aNamespaceID, AudioChannel audioChannel = static_cast(aResult.GetEnumValue()); - if (audioChannel != mAudioChannel && - !mDecoder && - CheckAudioChannelPermissions(aValue)) { - mAudioChannel = audioChannel; + if (audioChannel == mAudioChannel || + !CheckAudioChannelPermissions(aValue)) { + return true; + } + + // We cannot change the AudioChannel of a decoder. + if (mDecoder) { + return true; + } + + mAudioChannel = audioChannel; + + if (mSrcStream) { + nsRefPtr stream = mSrcStream->GetStream(); + if (stream) { + stream->SetAudioChannelType(mAudioChannel); + } } return true; @@ -2822,6 +2835,12 @@ void HTMLMediaElement::SetupSrcMediaStreamPlayback(DOMMediaStream* aStream) NS_ASSERTION(!mSrcStream && !mSrcStreamListener, "Should have been ended already"); mSrcStream = aStream; + + nsRefPtr stream = mSrcStream->GetStream(); + if (stream) { + stream->SetAudioChannelType(mAudioChannel); + } + // XXX if we ever support capturing the output of a media element which is // playing a stream, we'll need to add a CombineWithPrincipal call here. mSrcStreamListener = new StreamListener(this); From fba8a8622462cbc9fce2ddf7ce5bbae95ec28bef Mon Sep 17 00:00:00 2001 From: Blake Wu Date: Mon, 1 Sep 2014 13:32:47 +0800 Subject: [PATCH 006/139] Bug 1036775 - Add one more define check to separate omx decoder mp4 decoder. r=edwin --- content/media/DecoderTraits.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/content/media/DecoderTraits.cpp b/content/media/DecoderTraits.cpp index 1f045795e315..d4c191d9cfe4 100644 --- a/content/media/DecoderTraits.cpp +++ b/content/media/DecoderTraits.cpp @@ -324,10 +324,18 @@ IsDirectShowSupportedType(const nsACString& aType) #ifdef MOZ_FMP4 static bool -IsMP4SupportedType(const nsACString& aType) +IsMP4SupportedType(const nsACString& aType, + const nsAString& aCodecs = EmptyString()) { +// Currently on B2G, FMP4 is only working for MSE playback. +// For other normal MP4, it still uses current omx decoder. +// Bug 1061034 is a follow-up bug to enable all MP4s with MOZ_FMP4 +#ifdef MOZ_OMX_DECODER + return false; +#else return Preferences::GetBool("media.fragmented-mp4.exposed", false) && - MP4Decoder::CanHandleMediaType(aType); + MP4Decoder::CanHandleMediaType(aType, aCodecs); +#endif } #endif @@ -410,7 +418,7 @@ DecoderTraits::CanHandleMediaType(const char* aMIMEType, } #endif #ifdef MOZ_FMP4 - if (MP4Decoder::CanHandleMediaType(nsDependentCString(aMIMEType), + if (IsMP4SupportedType(nsDependentCString(aMIMEType), aRequestedCodecs)) { return aHaveRequestedCodecs ? CANPLAY_YES : CANPLAY_MAYBE; } From 8ae8897e9db88d67c860c61fa5f8000fd9ccacea Mon Sep 17 00:00:00 2001 From: Alex Bardas Date: Fri, 29 Aug 2014 11:13:00 +0200 Subject: [PATCH 007/139] Bug 1042521 - Use original input when calling KeywordToURI and do not trim the input before calling urifixup in tests. r=Gijs --- docshell/base/nsDefaultURIFixup.cpp | 5 +++-- .../test/unit/test_nsDefaultURIFixup_info.js | 17 ++++++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/docshell/base/nsDefaultURIFixup.cpp b/docshell/base/nsDefaultURIFixup.cpp index b7e053357fe8..0061f3ea8863 100644 --- a/docshell/base/nsDefaultURIFixup.cpp +++ b/docshell/base/nsDefaultURIFixup.cpp @@ -142,10 +142,11 @@ nsDefaultURIFixup::GetFixupURIInfo(const nsACString& aStringURI, uint32_t aFixup nsresult rv; nsAutoCString uriString(aStringURI); - uriString.Trim(" "); // Cleanup the empty spaces that might be on each end. // Eliminate embedded newlines, which single-line text fields now allow: uriString.StripChars("\r\n"); + // Cleanup the empty spaces that might be on each end: + uriString.Trim(" "); NS_ENSURE_TRUE(!uriString.IsEmpty(), NS_ERROR_FAILURE); @@ -950,7 +951,7 @@ void nsDefaultURIFixup::KeywordURIFixup(const nsACString & aURIString, (spaceLoc < qMarkLoc || quoteLoc < qMarkLoc)) || qMarkLoc == 0) { - rv = KeywordToURI(aURIString, aPostData, + rv = KeywordToURI(aFixupInfo->mOriginalInput, aPostData, getter_AddRefs(aFixupInfo->mPreferredURI)); if (NS_SUCCEEDED(rv) && aFixupInfo->mPreferredURI) { diff --git a/docshell/test/unit/test_nsDefaultURIFixup_info.js b/docshell/test/unit/test_nsDefaultURIFixup_info.js index f7d14c71e69c..c63f5cb22078 100644 --- a/docshell/test/unit/test_nsDefaultURIFixup_info.js +++ b/docshell/test/unit/test_nsDefaultURIFixup_info.js @@ -60,6 +60,14 @@ let testcases = [ [".test", "http://.test/", "http://www..test/", true, true], ["mozilla is amazing", null, null, true, true], ["mozilla ", "http://mozilla/", "http://www.mozilla.com/", true, true], + [" mozilla ", "http://mozilla/", "http://www.mozilla.com/", true, true], + ["mozilla \\", null, null, true, true], + ["mozilla \\ foo.txt", null, null, true, true], + ["mozilla \\\r foo.txt", null, null, true, true], + ["mozilla\n", "http://mozilla/", "http://www.mozilla.com/", true, true], + ["mozilla \r\n", "http://mozilla/", "http://www.mozilla.com/", true, true], + ["moz\r\nfirefox\nos\r", "http://mozfirefoxos/", "http://www.mozfirefoxos.com/", true, true], + ["moz\r\n firefox\n", null, null, true, true], ["", null, null, true, true], ["[]", null, null, true, true] ]; @@ -74,10 +82,13 @@ if (Services.appinfo.OS.toLowerCase().startsWith("win")) { testcases.push(["mozilla\\", "http://mozilla\\/", "http://www.mozilla/", true, true]); } +function sanitize(input) { + return input.replace(/\r|\n/g, "").trim(); +} + function run_test() { for (let [testInput, expectedFixedURI, alternativeURI, expectKeywordLookup, expectProtocolChange] of testcases) { - testInput = testInput.trim(); for (let flags of flagInputs) { let info; let fixupURIOnly = null; @@ -121,7 +132,7 @@ function run_test() { // Check the preferred URI if (couldDoKeywordLookup && expectKeywordLookup) { - let urlparamInput = encodeURIComponent(testInput).replace("%20", "+", "g"); + let urlparamInput = encodeURIComponent(sanitize(testInput)).replace("%20", "+", "g"); let searchURL = kSearchEngineURL.replace("{searchTerms}", urlparamInput); do_check_eq(info.preferredURI.spec, searchURL); } else { @@ -129,7 +140,7 @@ function run_test() { // the fixed URI should be preferred: do_check_eq(info.preferredURI.spec, info.fixedURI.spec); } - do_check_eq(testInput, info.originalInput); + do_check_eq(sanitize(testInput), info.originalInput); } } } From 71763528bd304c92a869dcb1920b28ac993f79d6 Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Thu, 28 Aug 2014 22:37:00 +0200 Subject: [PATCH 008/139] Bug 1025173 - Nullable copy, move, and assignment should not transfer |mValue| if |mIsNull|. r=bz --- dom/bindings/Nullable.h | 63 +++++++++++++---------------------------- 1 file changed, 20 insertions(+), 43 deletions(-) diff --git a/dom/bindings/Nullable.h b/dom/bindings/Nullable.h index dfbf7f90a1c5..b5f394701a68 100644 --- a/dom/bindings/Nullable.h +++ b/dom/bindings/Nullable.h @@ -10,6 +10,7 @@ #include "mozilla/Assertions.h" #include "nsTArrayForwardDeclare.h" #include "mozilla/Move.h" +#include "mozilla/Maybe.h" class nsCycleCollectionTraversalCallback; @@ -21,73 +22,66 @@ template struct Nullable { private: - // mIsNull MUST COME FIRST because otherwise the casting in our array - // conversion operators would shift where it is found in the struct. - bool mIsNull; - T mValue; + Maybe mValue; public: Nullable() - : mIsNull(true) + : mValue() {} explicit Nullable(T aValue) - : mIsNull(false) - , mValue(aValue) - {} + : mValue() + { + mValue.emplace(aValue); + } explicit Nullable(Nullable&& aOther) - : mIsNull(aOther.mIsNull) - , mValue(mozilla::Move(aOther.mValue)) + : mValue(mozilla::Move(aOther.mValue)) {} Nullable(const Nullable& aOther) - : mIsNull(aOther.mIsNull) - , mValue(aOther.mValue) + : mValue(aOther.mValue) {} void operator=(const Nullable& aOther) { - mIsNull = aOther.mIsNull; mValue = aOther.mValue; } void SetValue(T aValue) { - mValue = aValue; - mIsNull = false; + mValue.reset(); + mValue.emplace(aValue); } // For cases when |T| is some type with nontrivial copy behavior, we may want // to get a reference to our internal copy of T and work with it directly // instead of relying on the copying version of SetValue(). T& SetValue() { - mIsNull = false; - return mValue; + if (mValue.isNothing()) { + mValue.emplace(); + } + return mValue.ref(); } void SetNull() { - mIsNull = true; + mValue.reset(); } const T& Value() const { - MOZ_ASSERT(!mIsNull); - return mValue; + return mValue.ref(); } T& Value() { - MOZ_ASSERT(!mIsNull); - return mValue; + return mValue.ref(); } bool IsNull() const { - return mIsNull; + return mValue.isNothing(); } bool Equals(const Nullable& aOtherNullable) const { - return (mIsNull && aOtherNullable.mIsNull) || - (!mIsNull && !aOtherNullable.mIsNull && - mValue == aOtherNullable.mValue); + return mValue == aOtherNullable.mValue; } bool operator==(const Nullable& aOtherNullable) const @@ -99,23 +93,6 @@ public: { return !Equals(aOtherNullable); } - - // Make it possible to use a const Nullable of an array type with other - // array types. - template - operator const Nullable< nsTArray >&() const { - // Make sure that T is ok to reinterpret to nsTArray - const nsTArray& arr = mValue; - (void)arr; - return *reinterpret_cast >*>(this); - } - template - operator const Nullable< FallibleTArray >&() const { - // Make sure that T is ok to reinterpret to FallibleTArray - const FallibleTArray& arr = mValue; - (void)arr; - return *reinterpret_cast >*>(this); - } }; From 47106cd231757b83492400347b312044545bfc37 Mon Sep 17 00:00:00 2001 From: Vincent Liu Date: Mon, 1 Sep 2014 13:52:03 +0800 Subject: [PATCH 009/139] Bug 1060811 - PlanarYCbCrData contains null for color conversion if the output format of HW decoder is YV12. r=Sotaro --- gfx/layers/GrallocImages.cpp | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/gfx/layers/GrallocImages.cpp b/gfx/layers/GrallocImages.cpp index 1d1de1b5044e..ff1375a231f4 100644 --- a/gfx/layers/GrallocImages.cpp +++ b/gfx/layers/GrallocImages.cpp @@ -317,11 +317,30 @@ ConvertOmxYUVFormatToRGB565(android::sp& aBuffer, } if (format == HAL_PIXEL_FORMAT_YV12) { - gfx::ConvertYCbCrToRGB(aYcbcrData, + // Depend on platforms, it is possible for HW decoder to output YV12 format. + // It means the mData won't be configured during the SetData API because the + // yuv data has already stored in GraphicBuffer. Here we try to confgiure the + // mData if it doesn't contain valid configuration. + layers::PlanarYCbCrData ycbcrData = aYcbcrData; + if (!ycbcrData.mYChannel) { + ycbcrData.mYChannel = buffer; + ycbcrData.mYSkip = 0; + ycbcrData.mYStride = aBuffer->getStride(); + ycbcrData.mYSize = aSurface->GetSize(); + ycbcrData.mCbSkip = 0; + ycbcrData.mCbCrSize = aSurface->GetSize() / 2; + ycbcrData.mPicSize = aSurface->GetSize(); + ycbcrData.mCrChannel = buffer + ycbcrData.mYStride * ycbcrData.mYSize.height; + ycbcrData.mCrSkip = 0; + // Align to 16 bytes boundary + ycbcrData.mCbCrStride = ((ycbcrData.mYStride / 2) + 15) & ~0x0F; + ycbcrData.mCbChannel = ycbcrData.mCrChannel + (ycbcrData.mCbCrStride * ycbcrData.mCbCrSize.height); + } + gfx::ConvertYCbCrToRGB(ycbcrData, aSurface->GetFormat(), aSurface->GetSize(), - aSurface->GetData(), - aSurface->Stride()); + aMappedSurface->mData, + aMappedSurface->mStride); return OK; } From a6e231487625974428ffa8e4f708bf13866841f4 Mon Sep 17 00:00:00 2001 From: Alexandre Poirot Date: Thu, 28 Aug 2014 10:10:00 +0200 Subject: [PATCH 010/139] Bug 1043699 - Fix command line arguments handling on desktop. r=fabrice --- b2g/chrome/content/desktop.js | 12 ++++++++---- b2g/chrome/content/runapp.js | 11 ++++++++--- b2g/chrome/content/screen.js | 4 ++-- b2g/components/B2GComponents.manifest | 6 +++++- b2g/components/CommandLine.js | 25 +++++++++++++++++++++++++ b2g/components/moz.build | 1 + b2g/installer/package-manifest.in | 1 + 7 files changed, 50 insertions(+), 10 deletions(-) create mode 100644 b2g/components/CommandLine.js diff --git a/b2g/chrome/content/desktop.js b/b2g/chrome/content/desktop.js index 3f345238a5e8..8071aa9b7510 100644 --- a/b2g/chrome/content/desktop.js +++ b/b2g/chrome/content/desktop.js @@ -55,13 +55,17 @@ function checkDebuggerPort() { // DebuggerServer.openListener detects that it isn't a file path (string), // and starts listening on the tcp port given here as command line argument. - if (!window.arguments) { + // Get the command line arguments that were passed to the b2g client + let args; + try { + let service = Cc["@mozilla.org/commandlinehandler/general-startup;1?type=b2gcmds"].getService(Ci.nsISupports); + args = service.wrappedJSObject.cmdLine; + } catch(e) {} + + if (!args) { return; } - // Get the command line arguments that were passed to the b2g client - let args = window.arguments[0].QueryInterface(Ci.nsICommandLine); - let dbgport; try { dbgport = args.handleFlagWithParam('start-debugger-server', false); diff --git a/b2g/chrome/content/runapp.js b/b2g/chrome/content/runapp.js index 70274b30fd52..dc851db11bcc 100644 --- a/b2g/chrome/content/runapp.js +++ b/b2g/chrome/content/runapp.js @@ -5,12 +5,17 @@ let runAppObj; window.addEventListener('load', function() { - if (!window.arguments) { + // Get the command line arguments that were passed to the b2g client + let args; + try { + let service = Cc["@mozilla.org/commandlinehandler/general-startup;1?type=b2gcmds"].getService(Ci.nsISupports); + args = service.wrappedJSObject.cmdLine; + } catch(e) {} + + if (!args) { return; } - // Get the command line arguments that were passed to the b2g client - let args = window.arguments[0].QueryInterface(Ci.nsICommandLine); let appname; // - Check if the argument is present before doing any work. diff --git a/b2g/chrome/content/screen.js b/b2g/chrome/content/screen.js index cfdbc0cde683..f49e56c88ab6 100644 --- a/b2g/chrome/content/screen.js +++ b/b2g/chrome/content/screen.js @@ -62,8 +62,8 @@ window.addEventListener('ContentStart', function() { // Get the command line arguments that were passed to the b2g client let args; try { - // On Firefox Mulet, we don't always have a command line argument - args = window.arguments[0].QueryInterface(Ci.nsICommandLine); + let service = Cc["@mozilla.org/commandlinehandler/general-startup;1?type=b2gcmds"].getService(Ci.nsISupports); + args = service.wrappedJSObject.cmdLine; } catch(e) {} let screenarg = null; diff --git a/b2g/components/B2GComponents.manifest b/b2g/components/B2GComponents.manifest index 2fe7b730eaf0..4cda97cac48d 100644 --- a/b2g/components/B2GComponents.manifest +++ b/b2g/components/B2GComponents.manifest @@ -96,6 +96,10 @@ category profile-after-change SimulatorScreen @mozilla.org/simulator-screen;1 component {e30b0e13-2d12-4cb0-bc4c-4e617a1bf76e} OopCommandLine.js contract @mozilla.org/commandlinehandler/general-startup;1?type=b2goop {e30b0e13-2d12-4cb0-bc4c-4e617a1bf76e} category command-line-handler m-b2goop @mozilla.org/commandlinehandler/general-startup;1?type=b2goop + +component {385993fe-8710-4621-9fb1-00a09d8bec37} CommandLine.js +contract @mozilla.org/commandlinehandler/general-startup;1?type=b2gcmds {385993fe-8710-4621-9fb1-00a09d8bec37} +category command-line-handler m-b2gcmds @mozilla.org/commandlinehandler/general-startup;1?type=b2gcmds #endif # MobileIdentityUIGlue.js @@ -105,4 +109,4 @@ contract @mozilla.org/services/mobileid-ui-glue;1 {83dbe26a-81f3-4a75-9541-3d0b7 # B2GAppMigrator.js component {7211ece0-b458-4635-9afc-f8d7f376ee95} B2GAppMigrator.js contract @mozilla.org/b2g-app-migrator;1 {7211ece0-b458-4635-9afc-f8d7f376ee95} -category profile-after-change B2GAppMigrator @mozilla.org/b2g-app-migrator;1 \ No newline at end of file +category profile-after-change B2GAppMigrator @mozilla.org/b2g-app-migrator;1 diff --git a/b2g/components/CommandLine.js b/b2g/components/CommandLine.js new file mode 100644 index 000000000000..bdb1221e8b72 --- /dev/null +++ b/b2g/components/CommandLine.js @@ -0,0 +1,25 @@ +/* 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/. */ + +const { classes: Cc, interfaces: Ci, utils: Cu } = Components; +Cu.import("resource://gre/modules/XPCOMUtils.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "Services", "resource://gre/modules/Services.jsm"); + +// Small helper to expose nsICommandLine object to chrome code + +function CommandlineHandler() { + this.wrappedJSObject = this; +} + +CommandlineHandler.prototype = { + handle: function(cmdLine) { + this.cmdLine = cmdLine; + }, + + helpInfo: "", + classID: Components.ID("{385993fe-8710-4621-9fb1-00a09d8bec37}"), + QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]), +}; + +this.NSGetFactory = XPCOMUtils.generateNSGetFactory([CommandlineHandler]); diff --git a/b2g/components/moz.build b/b2g/components/moz.build index 79ccff80c861..856d9d898c40 100644 --- a/b2g/components/moz.build +++ b/b2g/components/moz.build @@ -30,6 +30,7 @@ EXTRA_COMPONENTS += [ if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk': EXTRA_COMPONENTS += [ + 'CommandLine.js', 'OopCommandLine.js', 'SimulatorScreen.js' ] diff --git a/b2g/installer/package-manifest.in b/b2g/installer/package-manifest.in index 1636ed37f492..42af31c5530e 100644 --- a/b2g/installer/package-manifest.in +++ b/b2g/installer/package-manifest.in @@ -451,6 +451,7 @@ @BINPATH@/components/amWebInstallListener.js @BINPATH@/components/nsBlocklistService.js @BINPATH@/components/OopCommandLine.js +@BINPATH@/components/CommandLine.js #endif #ifdef MOZ_UPDATER From 10861ed968165d76ffdfc25bfb5fb06e6034c82a Mon Sep 17 00:00:00 2001 From: Chris Manchester Date: Fri, 29 Aug 2014 14:43:28 -0400 Subject: [PATCH 011/139] Bug 1060523 - Omit extra newlines when logging exception messages in moztest. r=jgraham --- testing/mozbase/moztest/moztest/adapters/unit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/mozbase/moztest/moztest/adapters/unit.py b/testing/mozbase/moztest/moztest/adapters/unit.py index 52317c8d0455..9ba905781f82 100644 --- a/testing/mozbase/moztest/moztest/adapters/unit.py +++ b/testing/mozbase/moztest/moztest/adapters/unit.py @@ -60,8 +60,8 @@ class StructuredTestResult(TextTestResult): exc_msg = "".join(traceback.format_exception_only(exc_ty, val)) if self.buffer: output_msg = "\n".join([sys.stdout.getvalue(), sys.stderr.getvalue()]) - return "\n".join([exc_msg, output_msg]) - return exc_msg + return "".join([exc_msg, output_msg]) + return exc_msg.rstrip() def _extract_stacktrace(self, err, test): # Format an exception stack in the style of unittest's _exc_info_to_string From a8ded9bf3a4443fbfe4cfdb6976ff8205c97ca97 Mon Sep 17 00:00:00 2001 From: Dirk Schulze Date: Thu, 28 Aug 2014 03:09:00 +0200 Subject: [PATCH 012/139] Bug 1058519 - Ship mask-type CSS property. r=heycam --- modules/libpref/init/all.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 16621b564de6..d70262747fdf 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -1963,11 +1963,7 @@ pref("layout.css.dpi", -1); pref("layout.css.devPixelsPerPx", "-1.0"); // Is support for CSS Masking features enabled? -#ifdef RELEASE_BUILD -pref("layout.css.masking.enabled", false); -#else pref("layout.css.masking.enabled", true); -#endif // Is support for mix-blend-mode enabled? pref("layout.css.mix-blend-mode.enabled", true); From f0d7e9609426df84f1e07a8a3f66c64b8ef24908 Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Tue, 2 Sep 2014 09:01:06 +0100 Subject: [PATCH 013/139] bug 1060791 - support cmap subtable format 10, for the Apple Symbols font. r=jdaggett --- gfx/thebes/gfxFontUtils.cpp | 103 ++++++++++++++++++++++++++++++++++-- gfx/thebes/gfxFontUtils.h | 7 +++ 2 files changed, 105 insertions(+), 5 deletions(-) diff --git a/gfx/thebes/gfxFontUtils.cpp b/gfx/thebes/gfxFontUtils.cpp index 491ba5f09580..8a0f678ce836 100644 --- a/gfx/thebes/gfxFontUtils.cpp +++ b/gfx/thebes/gfxFontUtils.cpp @@ -41,6 +41,15 @@ using namespace mozilla; #pragma pack(1) +typedef struct { + AutoSwap_PRUint16 format; + AutoSwap_PRUint16 reserved; + AutoSwap_PRUint32 length; + AutoSwap_PRUint32 language; + AutoSwap_PRUint32 startCharCode; + AutoSwap_PRUint32 numChars; +} Format10CmapHeader; + typedef struct { AutoSwap_PRUint16 format; AutoSwap_PRUint16 reserved; @@ -87,6 +96,53 @@ gfxSparseBitSet::Dump(const char* aPrefix, eGfxLog aWhichLog) const } #endif +nsresult +gfxFontUtils::ReadCMAPTableFormat10(const uint8_t *aBuf, uint32_t aLength, + gfxSparseBitSet& aCharacterMap) +{ + // Ensure table is large enough that we can safely read the header + NS_ENSURE_TRUE(aLength >= sizeof(Format10CmapHeader), + NS_ERROR_GFX_CMAP_MALFORMED); + + // Sanity-check header fields + const Format10CmapHeader *cmap10 = + reinterpret_cast(aBuf); + NS_ENSURE_TRUE(uint16_t(cmap10->format) == 10, + NS_ERROR_GFX_CMAP_MALFORMED); + NS_ENSURE_TRUE(uint16_t(cmap10->reserved) == 0, + NS_ERROR_GFX_CMAP_MALFORMED); + + uint32_t tablelen = cmap10->length; + NS_ENSURE_TRUE(tablelen >= sizeof(Format10CmapHeader) && + tablelen <= aLength, NS_ERROR_GFX_CMAP_MALFORMED); + + NS_ENSURE_TRUE(cmap10->language == 0, NS_ERROR_GFX_CMAP_MALFORMED); + + uint32_t numChars = cmap10->numChars; + NS_ENSURE_TRUE(tablelen == sizeof(Format10CmapHeader) + + numChars * sizeof(uint16_t), NS_ERROR_GFX_CMAP_MALFORMED); + + uint32_t charCode = cmap10->startCharCode; + NS_ENSURE_TRUE(charCode <= CMAP_MAX_CODEPOINT && + charCode + numChars <= CMAP_MAX_CODEPOINT, + NS_ERROR_GFX_CMAP_MALFORMED); + + // glyphs[] array immediately follows the subtable header + const AutoSwap_PRUint16 *glyphs = + reinterpret_cast(cmap10 + 1); + + for (uint32_t i = 0; i < numChars; ++i) { + if (uint16_t(*glyphs) != 0) { + aCharacterMap.set(charCode); + } + ++charCode; + ++glyphs; + } + + aCharacterMap.Compact(); + + return NS_OK; +} nsresult gfxFontUtils::ReadCMAPTableFormat12(const uint8_t *aBuf, uint32_t aLength, @@ -422,7 +478,8 @@ gfxFontUtils::FindPreferredSubtable(const uint8_t *aBuf, uint32_t aBufLength, keepFormat = format; *aTableOffset = offset; *aSymbolEncoding = false; - } else if (format == 12 && acceptableUCS4Encoding(platformID, encodingID, keepFormat)) { + } else if ((format == 10 || format == 12) && + acceptableUCS4Encoding(platformID, encodingID, keepFormat)) { keepFormat = format; *aTableOffset = offset; *aSymbolEncoding = false; @@ -431,7 +488,7 @@ gfxFontUtils::FindPreferredSubtable(const uint8_t *aBuf, uint32_t aBufLength, } } else if (format == 14 && isUVSEncoding(platformID, encodingID) && aUVSTableOffset) { *aUVSTableOffset = offset; - if (keepFormat == 12) { + if (keepFormat == 10 || keepFormat == 12) { break; } } @@ -451,7 +508,8 @@ gfxFontUtils::ReadCMAP(const uint8_t *aBuf, uint32_t aBufLength, uint32_t format = FindPreferredSubtable(aBuf, aBufLength, &offset, &aUVSOffset, &symbol); - if (format == 4) { + switch (format) { + case 4: if (symbol) { aUnicodeFont = false; aSymbolFont = true; @@ -461,13 +519,21 @@ gfxFontUtils::ReadCMAP(const uint8_t *aBuf, uint32_t aBufLength, } return ReadCMAPTableFormat4(aBuf + offset, aBufLength - offset, aCharacterMap); - } - if (format == 12) { + case 10: + aUnicodeFont = true; + aSymbolFont = false; + return ReadCMAPTableFormat10(aBuf + offset, aBufLength - offset, + aCharacterMap); + + case 12: aUnicodeFont = true; aSymbolFont = false; return ReadCMAPTableFormat12(aBuf + offset, aBufLength - offset, aCharacterMap); + + default: + break; } return NS_ERROR_FAILURE; @@ -570,6 +636,26 @@ gfxFontUtils::MapCharToGlyphFormat4(const uint8_t *aBuf, char16_t aCh) return 0; } +uint32_t +gfxFontUtils::MapCharToGlyphFormat10(const uint8_t *aBuf, uint32_t aCh) +{ + const Format10CmapHeader *cmap10 = + reinterpret_cast(aBuf); + + uint32_t startChar = cmap10->startCharCode; + uint32_t numChars = cmap10->numChars; + + if (aCh < startChar || aCh >= startChar + numChars) { + return 0; + } + + const AutoSwap_PRUint16 *glyphs = + reinterpret_cast(cmap10 + 1); + + uint16_t glyph = glyphs[aCh - startChar]; + return glyph; +} + uint32_t gfxFontUtils::MapCharToGlyphFormat12(const uint8_t *aBuf, uint32_t aCh) { @@ -681,6 +767,9 @@ gfxFontUtils::MapCharToGlyph(const uint8_t *aCmapBuf, uint32_t aBufLength, gid = aUnicode < UNICODE_BMP_LIMIT ? MapCharToGlyphFormat4(aCmapBuf + offset, char16_t(aUnicode)) : 0; break; + case 10: + gid = MapCharToGlyphFormat10(aCmapBuf + offset, aUnicode); + break; case 12: gid = MapCharToGlyphFormat12(aCmapBuf + offset, aUnicode); break; @@ -703,6 +792,10 @@ gfxFontUtils::MapCharToGlyph(const uint8_t *aCmapBuf, uint32_t aBufLength, char16_t(aUnicode)); } break; + case 10: + varGID = MapCharToGlyphFormat10(aCmapBuf + offset, + aUnicode); + break; case 12: varGID = MapCharToGlyphFormat12(aCmapBuf + offset, aUnicode); diff --git a/gfx/thebes/gfxFontUtils.h b/gfx/thebes/gfxFontUtils.h index a19ca0457ca4..c677bbb4ad5a 100644 --- a/gfx/thebes/gfxFontUtils.h +++ b/gfx/thebes/gfxFontUtils.h @@ -770,6 +770,10 @@ public: (aBuf[aIndex + 2] << 8) | (aBuf[aIndex + 3])); } + static nsresult + ReadCMAPTableFormat10(const uint8_t *aBuf, uint32_t aLength, + gfxSparseBitSet& aCharacterMap); + static nsresult ReadCMAPTableFormat12(const uint8_t *aBuf, uint32_t aLength, gfxSparseBitSet& aCharacterMap); @@ -796,6 +800,9 @@ public: static uint32_t MapCharToGlyphFormat4(const uint8_t *aBuf, char16_t aCh); + static uint32_t + MapCharToGlyphFormat10(const uint8_t *aBuf, uint32_t aCh); + static uint32_t MapCharToGlyphFormat12(const uint8_t *aBuf, uint32_t aCh); From a634f2368f2eae1cc58040ac81d64453fd0e13ea Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Tue, 2 Sep 2014 09:01:08 +0100 Subject: [PATCH 014/139] bug 1060791 - reftest for support of Apple Symbols font. r=jdaggett --- .../font-matching/apple-symbols-1-notref.html | 25 +++++++++++++++++++ .../font-matching/apple-symbols-1.html | 25 +++++++++++++++++++ layout/reftests/font-matching/reftest.list | 4 +++ 3 files changed, 54 insertions(+) create mode 100644 layout/reftests/font-matching/apple-symbols-1-notref.html create mode 100644 layout/reftests/font-matching/apple-symbols-1.html diff --git a/layout/reftests/font-matching/apple-symbols-1-notref.html b/layout/reftests/font-matching/apple-symbols-1-notref.html new file mode 100644 index 000000000000..b216a4ff5023 --- /dev/null +++ b/layout/reftests/font-matching/apple-symbols-1-notref.html @@ -0,0 +1,25 @@ + + + + +Apple Symbols test + + + +∙◦◎☑☞ + + diff --git a/layout/reftests/font-matching/apple-symbols-1.html b/layout/reftests/font-matching/apple-symbols-1.html new file mode 100644 index 000000000000..ba92206f1779 --- /dev/null +++ b/layout/reftests/font-matching/apple-symbols-1.html @@ -0,0 +1,25 @@ + + + + +Apple Symbols test + + + +∙◦◎☑☞ + + diff --git a/layout/reftests/font-matching/reftest.list b/layout/reftests/font-matching/reftest.list index e3271cfdfebb..d03606ed89b8 100644 --- a/layout/reftests/font-matching/reftest.list +++ b/layout/reftests/font-matching/reftest.list @@ -93,3 +93,7 @@ random-if(!(cocoaWidget||winWidget)) == arial-arabic.html arial-arabic-ref.html HTTP(..) == font-synthesis-1.html font-synthesis-1-ref.html HTTP(..) == font-synthesis-2.html font-synthesis-2-ref.html + +# Bug 1060791 - support for format 10 cmap in Apple Symbols; +# relevant fonts not present on other platforms. +skip-if(!cocoaWidget) HTTP(..) != apple-symbols-1.html apple-symbols-1-notref.html From 0cf786ab185036d51dc20f576583c72d309d80c3 Mon Sep 17 00:00:00 2001 From: Theodore Kokkoris Date: Mon, 25 Aug 2014 18:12:36 +0300 Subject: [PATCH 015/139] Bug 1057626 - Use ConnectivityManagerCompat instead of ConnectivityManager. r=snorp --- mobile/android/base/updater/UpdateService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mobile/android/base/updater/UpdateService.java b/mobile/android/base/updater/UpdateService.java index 9a48b6bee26f..67f573498aed 100644 --- a/mobile/android/base/updater/UpdateService.java +++ b/mobile/android/base/updater/UpdateService.java @@ -27,6 +27,7 @@ import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.Uri; import android.os.Environment; +import android.support.v4.net.ConnectivityManagerCompat; import android.support.v4.app.NotificationCompat; import android.support.v4.app.NotificationCompat.Builder; import android.util.Log; @@ -220,7 +221,7 @@ public class UpdateService extends IntentService { */ boolean shouldStartDownload = hasFlag(flags, UpdateServiceHelper.FLAG_FORCE_DOWNLOAD) || autoDownloadPolicy == UpdateServiceHelper.AUTODOWNLOAD_ENABLED || - (autoDownloadPolicy == UpdateServiceHelper.AUTODOWNLOAD_WIFI && !mConnectivityManager.isActiveNetworkMetered()); + (autoDownloadPolicy == UpdateServiceHelper.AUTODOWNLOAD_WIFI && !ConnectivityManagerCompat.isActiveNetworkMetered(mConnectivityManager)); if (!shouldStartDownload) { Log.i(LOGTAG, "not initiating automatic update download due to policy " + autoDownloadPolicy); From e965701956878f173811955bcbdcd13e4eaa1904 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 2 Sep 2014 10:25:38 +0200 Subject: [PATCH 016/139] Bug 1059710: OdinMonkey SIMD: add support for comparisons; r=luke --- js/src/asmjs/AsmJSLink.cpp | 16 +++- js/src/asmjs/AsmJSModule.h | 8 +- js/src/asmjs/AsmJSValidate.cpp | 95 +++++++++++++++++++++--- js/src/jit-test/tests/asm.js/testSIMD.js | 67 +++++++++++++++++ 4 files changed, 172 insertions(+), 14 deletions(-) diff --git a/js/src/asmjs/AsmJSLink.cpp b/js/src/asmjs/AsmJSLink.cpp index 4cba533f5775..d49ce5649803 100644 --- a/js/src/asmjs/AsmJSLink.cpp +++ b/js/src/asmjs/AsmJSLink.cpp @@ -345,10 +345,16 @@ ValidateSimdOperation(JSContext *cx, AsmJSModule::Global &global, HandleValue gl switch (global.simdOperation()) { case AsmJSSimdOperation_add: native = simd_int32x4_add; break; case AsmJSSimdOperation_sub: native = simd_int32x4_sub; break; + case AsmJSSimdOperation_lessThan: native = simd_int32x4_lessThan; break; + case AsmJSSimdOperation_greaterThan: native = simd_int32x4_greaterThan; break; + case AsmJSSimdOperation_equal: native = simd_int32x4_equal; break; + case AsmJSSimdOperation_lessThanOrEqual: + case AsmJSSimdOperation_greaterThanOrEqual: + case AsmJSSimdOperation_notEqual: case AsmJSSimdOperation_mul: case AsmJSSimdOperation_div: - MOZ_MAKE_COMPILER_ASSUME_IS_UNREACHABLE("Mul and div shouldn't have been validated in " - "the first place"); + MOZ_MAKE_COMPILER_ASSUME_IS_UNREACHABLE("shouldn't have been validated in the first " + "place"); } break; case AsmJSSimdType_float32x4: @@ -357,6 +363,12 @@ ValidateSimdOperation(JSContext *cx, AsmJSModule::Global &global, HandleValue gl case AsmJSSimdOperation_sub: native = simd_float32x4_sub; break; case AsmJSSimdOperation_mul: native = simd_float32x4_mul; break; case AsmJSSimdOperation_div: native = simd_float32x4_div; break; + case AsmJSSimdOperation_lessThan: native = simd_float32x4_lessThan ; break; + case AsmJSSimdOperation_lessThanOrEqual: native = simd_float32x4_lessThanOrEqual; break; + case AsmJSSimdOperation_equal: native = simd_float32x4_equal; break; + case AsmJSSimdOperation_notEqual: native = simd_float32x4_notEqual ; break; + case AsmJSSimdOperation_greaterThan: native = simd_float32x4_greaterThan; break; + case AsmJSSimdOperation_greaterThanOrEqual: native = simd_float32x4_greaterThanOrEqual ; break; } break; } diff --git a/js/src/asmjs/AsmJSModule.h b/js/src/asmjs/AsmJSModule.h index f47d4ba86e08..eb617552c312 100644 --- a/js/src/asmjs/AsmJSModule.h +++ b/js/src/asmjs/AsmJSModule.h @@ -79,7 +79,13 @@ enum AsmJSSimdOperation AsmJSSimdOperation_add, AsmJSSimdOperation_sub, AsmJSSimdOperation_mul, - AsmJSSimdOperation_div + AsmJSSimdOperation_div, + AsmJSSimdOperation_lessThan, + AsmJSSimdOperation_lessThanOrEqual, + AsmJSSimdOperation_equal, + AsmJSSimdOperation_notEqual, + AsmJSSimdOperation_greaterThan, + AsmJSSimdOperation_greaterThanOrEqual, }; // These labels describe positions in the prologue/epilogue of functions while diff --git a/js/src/asmjs/AsmJSValidate.cpp b/js/src/asmjs/AsmJSValidate.cpp index bbd89b875009..242a696d3a53 100644 --- a/js/src/asmjs/AsmJSValidate.cpp +++ b/js/src/asmjs/AsmJSValidate.cpp @@ -1368,7 +1368,13 @@ class MOZ_STACK_CLASS ModuleCompiler !addStandardLibrarySimdOpName("add", AsmJSSimdOperation_add) || !addStandardLibrarySimdOpName("sub", AsmJSSimdOperation_sub) || !addStandardLibrarySimdOpName("mul", AsmJSSimdOperation_mul) || - !addStandardLibrarySimdOpName("div", AsmJSSimdOperation_div)) + !addStandardLibrarySimdOpName("div", AsmJSSimdOperation_div) || + !addStandardLibrarySimdOpName("lessThanOrEqual", AsmJSSimdOperation_lessThanOrEqual) || + !addStandardLibrarySimdOpName("lessThan", AsmJSSimdOperation_lessThan) || + !addStandardLibrarySimdOpName("equal", AsmJSSimdOperation_equal) || + !addStandardLibrarySimdOpName("notEqual", AsmJSSimdOperation_notEqual) || + !addStandardLibrarySimdOpName("greaterThan", AsmJSSimdOperation_greaterThan) || + !addStandardLibrarySimdOpName("greaterThanOrEqual", AsmJSSimdOperation_greaterThanOrEqual)) { return false; } @@ -2401,6 +2407,17 @@ class FunctionCompiler return ins; } + MDefinition *binarySimd(MDefinition *lhs, MDefinition *rhs, MSimdBinaryComp::Operation op) + { + if (inDeadCode()) + return nullptr; + + JS_ASSERT(IsSimdType(lhs->type()) && rhs->type() == lhs->type()); + MSimdBinaryComp *ins = MSimdBinaryComp::NewAsmJS(alloc(), lhs, rhs, op); + curBlock_->add(ins); + return ins; + } + MDefinition *minMax(MDefinition *lhs, MDefinition *rhs, MIRType type, bool isMax) { if (inDeadCode()) return nullptr; @@ -3457,9 +3474,15 @@ IsSimdValidOperationType(AsmJSSimdType type, AsmJSSimdOperation op) switch (op) { case AsmJSSimdOperation_add: case AsmJSSimdOperation_sub: + case AsmJSSimdOperation_lessThan: + case AsmJSSimdOperation_equal: + case AsmJSSimdOperation_greaterThan: return true; case AsmJSSimdOperation_mul: case AsmJSSimdOperation_div: + case AsmJSSimdOperation_lessThanOrEqual: + case AsmJSSimdOperation_notEqual: + case AsmJSSimdOperation_greaterThanOrEqual: return type == AsmJSSimdType_float32x4; } return false; @@ -4616,8 +4639,8 @@ CheckMathBuiltinCall(FunctionCompiler &f, ParseNode *callNode, AsmJSMathBuiltinF } static bool -CheckBinarySimd(FunctionCompiler &f, ParseNode *call, AsmJSSimdType simdType, - MSimdBinaryArith::Operation op, MDefinition **def, Type *type) +CheckBinarySimd(FunctionCompiler &f, ParseNode *call, const ModuleCompiler::Global *global, + MDefinition **def, Type *type) { unsigned numArgs = CallArgListLength(call); if (numArgs != 2) @@ -4633,13 +4656,60 @@ CheckBinarySimd(FunctionCompiler &f, ParseNode *call, AsmJSSimdType simdType, if (!CheckExpr(f, rhs, &rhsDef, &rhsType)) return false; - Type retType = simdType; - JS_ASSERT_IF(retType.isInt32x4(), op != MSimdBinaryArith::Mul && op != MSimdBinaryArith::Div); + Type retType = global->simdOperationType(); if (lhsType != retType || rhsType != retType) return f.failf(lhs, "arguments to SIMD binary op should both be %s", retType.toChars()); - *type = retType; - *def = f.binarySimd(lhsDef, rhsDef, op, retType.toMIRType()); + + MIRType opType = retType.toMIRType(); + switch (global->simdOperation()) { + case AsmJSSimdOperation_add: + *def = f.binarySimd(lhsDef, rhsDef, MSimdBinaryArith::Add, opType); + *type = retType; + break; + case AsmJSSimdOperation_sub: + *def = f.binarySimd(lhsDef, rhsDef, MSimdBinaryArith::Sub, opType); + *type = retType; + break; + case AsmJSSimdOperation_mul: + JS_ASSERT(!retType.isInt32x4()); + *def = f.binarySimd(lhsDef, rhsDef, MSimdBinaryArith::Mul, opType); + *type = retType; + break; + case AsmJSSimdOperation_div: + JS_ASSERT(!retType.isInt32x4()); + *def = f.binarySimd(lhsDef, rhsDef, MSimdBinaryArith::Div, opType); + *type = retType; + break; + case AsmJSSimdOperation_lessThan: + *def = f.binarySimd(lhsDef, rhsDef, MSimdBinaryComp::lessThan); + *type = Type::Int32x4; + break; + case AsmJSSimdOperation_lessThanOrEqual: + JS_ASSERT(!retType.isInt32x4()); + *def = f.binarySimd(lhsDef, rhsDef, MSimdBinaryComp::lessThanOrEqual); + *type = Type::Int32x4; + break; + case AsmJSSimdOperation_equal: + *def = f.binarySimd(lhsDef, rhsDef, MSimdBinaryComp::equal); + *type = Type::Int32x4; + break; + case AsmJSSimdOperation_notEqual: + JS_ASSERT(!retType.isInt32x4()); + *def = f.binarySimd(lhsDef, rhsDef, MSimdBinaryComp::notEqual); + *type = Type::Int32x4; + break; + case AsmJSSimdOperation_greaterThan: + *def = f.binarySimd(lhsDef, rhsDef, MSimdBinaryComp::greaterThan); + *type = Type::Int32x4; + break; + case AsmJSSimdOperation_greaterThanOrEqual: + JS_ASSERT(!retType.isInt32x4()); + *def = f.binarySimd(lhsDef, rhsDef, MSimdBinaryComp::greaterThanOrEqual); + *type = Type::Int32x4; + break; + } + return true; } @@ -4650,13 +4720,16 @@ CheckSimdOperationCall(FunctionCompiler &f, ParseNode *call, const ModuleCompile JS_ASSERT(global->isSimdOperation()); switch (global->simdOperation()) { case AsmJSSimdOperation_add: - return CheckBinarySimd(f, call, global->simdOperationType(), MSimdBinaryArith::Add, def, type); case AsmJSSimdOperation_sub: - return CheckBinarySimd(f, call, global->simdOperationType(), MSimdBinaryArith::Sub, def, type); case AsmJSSimdOperation_mul: - return CheckBinarySimd(f, call, global->simdOperationType(), MSimdBinaryArith::Mul, def, type); case AsmJSSimdOperation_div: - return CheckBinarySimd(f, call, global->simdOperationType(), MSimdBinaryArith::Div, def, type); + case AsmJSSimdOperation_lessThan: + case AsmJSSimdOperation_lessThanOrEqual: + case AsmJSSimdOperation_equal: + case AsmJSSimdOperation_notEqual: + case AsmJSSimdOperation_greaterThan: + case AsmJSSimdOperation_greaterThanOrEqual: + return CheckBinarySimd(f, call, global, def, type); } MOZ_CRASH("unexpected simd operation in CheckSimdOperationCall"); } diff --git a/js/src/jit-test/tests/asm.js/testSIMD.js b/js/src/jit-test/tests/asm.js/testSIMD.js index a09beeef0971..7b1ed0a199c2 100644 --- a/js/src/jit-test/tests/asm.js/testSIMD.js +++ b/js/src/jit-test/tests/asm.js/testSIMD.js @@ -51,6 +51,17 @@ function CheckF4(header, code, expected) { } } +function CheckF4Comp(header, code, expected) { + // code needs to contain a local called x containing the result of the + // comparison + var lanes = ['x', 'y', 'z', 'w']; + header = USE_ASM + F32 + I32 + header; + for (var i = 0; i < 4; ++i) { + var lane = lanes[i]; + assertEq(asmLink(asmCompile('glob', header + ';function f() {' + code + ';return x.' + lane + '|0} return f'), this)(), expected[i]); + } +} + try { // 1. Constructors @@ -406,6 +417,62 @@ var f32x4 = SIMD.float32x4(0, 0, -0, NaN); var another = SIMD.float32x4(0, -0, 0, 0); assertEqX4(asmLink(asmCompile('glob', USE_ASM + F32 + F32D + "function f(x,y) {x=f4(x); y=f4(y); x=f4d(x,y); return f4(x);} return f"), this)(f32x4, another), [NaN, NaN, NaN, NaN]); +// Comparisons +// True yields all bits set to 1 (i.e as an int32, 0xFFFFFFFF === -1), false +// yields all bits set to 0 (i.e 0). +const T = -1; +const F = 0; +assertAsmTypeFail('glob', USE_ASM + I32 + "var lt=i4.lessThanOrEqual; function f() {} return f"); +assertAsmTypeFail('glob', USE_ASM + I32 + "var ge=i4.greaterThanOrEqual; function f() {} return f"); +assertAsmTypeFail('glob', USE_ASM + I32 + "var ne=i4.notEqual; function f() {} return f"); + +const LTI32 = 'var lt = i4.lessThan'; +const GTI32 = 'var gt = i4.greaterThan'; +const EQI32 = 'var eq = i4.equal'; + +CheckI4(LTI32, 'var x=i4(1,2,3,4); var y=i4(-1,1,0,2); x=lt(x,y)', [F, F, F, F]); +CheckI4(LTI32, 'var x=i4(-1,1,0,2); var y=i4(1,2,3,4); x=lt(x,y)', [T, T, T, T]); +CheckI4(LTI32, 'var x=i4(1,0,3,4); var y=i4(1,1,7,0); x=lt(x,y)', [F, T, T, F]); + +CheckI4(EQI32, 'var x=i4(1,2,3,4); var y=i4(-1,1,0,2); x=eq(x,y)', [F, F, F, F]); +CheckI4(EQI32, 'var x=i4(-1,1,0,2); var y=i4(1,2,3,4); x=eq(x,y)', [F, F, F, F]); +CheckI4(EQI32, 'var x=i4(1,0,3,4); var y=i4(1,1,7,0); x=eq(x,y)', [T, F, F, F]); + +CheckI4(GTI32, 'var x=i4(1,2,3,4); var y=i4(-1,1,0,2); x=gt(x,y)', [T, T, T, T]); +CheckI4(GTI32, 'var x=i4(-1,1,0,2); var y=i4(1,2,3,4); x=gt(x,y)', [F, F, F, F]); +CheckI4(GTI32, 'var x=i4(1,0,3,4); var y=i4(1,1,7,0); x=gt(x,y)', [F, F, F, T]); + +const LTF32 = 'var lt=f4.lessThan'; +const LEF32 = 'var le=f4.lessThanOrEqual'; +const GTF32 = 'var gt=f4.greaterThan'; +const GEF32 = 'var ge=f4.greaterThanOrEqual'; +const EQF32 = 'var eq=f4.equal'; +const NEF32 = 'var ne=f4.notEqual'; + +CheckF4Comp(LTF32, 'var y=f4(1,2,3,4); var z=f4(-1,1,0,2); var x=i4(0,0,0,0); x=lt(y,z)', [F, F, F, F]); +CheckF4Comp(LTF32, 'var y=f4(-1,1,0,2); var z=f4(1,2,3,4); var x=i4(0,0,0,0); x=lt(y,z)', [T, T, T, T]); +CheckF4Comp(LTF32, 'var y=f4(1,0,3,4); var z=f4(1,1,7,0); var x=i4(0,0,0,0); x=lt(y,z)', [F, T, T, F]); + +CheckF4Comp(LEF32, 'var y=f4(1,2,3,4); var z=f4(-1,1,0,2); var x=i4(0,0,0,0); x=le(y,z)', [F, F, F, F]); +CheckF4Comp(LEF32, 'var y=f4(-1,1,0,2); var z=f4(1,2,3,4); var x=i4(0,0,0,0); x=le(y,z)', [T, T, T, T]); +CheckF4Comp(LEF32, 'var y=f4(1,0,3,4); var z=f4(1,1,7,0); var x=i4(0,0,0,0); x=le(y,z)', [T, T, T, F]); + +CheckF4Comp(EQF32, 'var y=f4(1,2,3,4); var z=f4(-1,1,0,2); var x=i4(0,0,0,0); x=eq(y,z)', [F, F, F, F]); +CheckF4Comp(EQF32, 'var y=f4(-1,1,0,2); var z=f4(1,2,3,4); var x=i4(0,0,0,0); x=eq(y,z)', [F, F, F, F]); +CheckF4Comp(EQF32, 'var y=f4(1,0,3,4); var z=f4(1,1,7,0); var x=i4(0,0,0,0); x=eq(y,z)', [T, F, F, F]); + +CheckF4Comp(NEF32, 'var y=f4(1,2,3,4); var z=f4(-1,1,0,2); var x=i4(0,0,0,0); x=ne(y,z)', [T, T, T, T]); +CheckF4Comp(NEF32, 'var y=f4(-1,1,0,2); var z=f4(1,2,3,4); var x=i4(0,0,0,0); x=ne(y,z)', [T, T, T, T]); +CheckF4Comp(NEF32, 'var y=f4(1,0,3,4); var z=f4(1,1,7,0); var x=i4(0,0,0,0); x=ne(y,z)', [F, T, T, T]); + +CheckF4Comp(GTF32, 'var y=f4(1,2,3,4); var z=f4(-1,1,0,2); var x=i4(0,0,0,0); x=gt(y,z)', [T, T, T, T]); +CheckF4Comp(GTF32, 'var y=f4(-1,1,0,2); var z=f4(1,2,3,4); var x=i4(0,0,0,0); x=gt(y,z)', [F, F, F, F]); +CheckF4Comp(GTF32, 'var y=f4(1,0,3,4); var z=f4(1,1,7,0); var x=i4(0,0,0,0); x=gt(y,z)', [F, F, F, T]); + +CheckF4Comp(GEF32, 'var y=f4(1,2,3,4); var z=f4(-1,1,0,2); var x=i4(0,0,0,0); x=ge(y,z)', [T, T, T, T]); +CheckF4Comp(GEF32, 'var y=f4(-1,1,0,2); var z=f4(1,2,3,4); var x=i4(0,0,0,0); x=ge(y,z)', [F, F, F, F]); +CheckF4Comp(GEF32, 'var y=f4(1,0,3,4); var z=f4(1,1,7,0); var x=i4(0,0,0,0); x=ge(y,z)', [T, F, F, T]); + // Dead code assertEqX4(asmLink(asmCompile('glob', USE_ASM + I32 + 'function f(){var x=i4(1,2,3,4); return i4(x); x=i4(5,6,7,8); return i4(x);} return f'), this)(), [1, 2, 3, 4]); assertEqX4(asmLink(asmCompile('glob', USE_ASM + I32 + 'function f(){var x=i4(1,2,3,4); var c=0; return i4(x); c=x.x|0; return i4(x);} return f'), this)(), [1, 2, 3, 4]); From 1784bb4ee01a722063f529ae4c6d5160d8b11c89 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 2 Sep 2014 10:25:43 +0200 Subject: [PATCH 017/139] Bug 1059733: OdinMonkey SIMD: add support for bitwise operations; r=luke --- js/src/asmjs/AsmJSLink.cpp | 6 ++++ js/src/asmjs/AsmJSModule.h | 3 ++ js/src/asmjs/AsmJSValidate.cpp | 36 +++++++++++++++++++++++- js/src/jit-test/tests/asm.js/testSIMD.js | 36 ++++++++++++++++++++++++ 4 files changed, 80 insertions(+), 1 deletion(-) diff --git a/js/src/asmjs/AsmJSLink.cpp b/js/src/asmjs/AsmJSLink.cpp index d49ce5649803..47ca731c58f5 100644 --- a/js/src/asmjs/AsmJSLink.cpp +++ b/js/src/asmjs/AsmJSLink.cpp @@ -348,6 +348,9 @@ ValidateSimdOperation(JSContext *cx, AsmJSModule::Global &global, HandleValue gl case AsmJSSimdOperation_lessThan: native = simd_int32x4_lessThan; break; case AsmJSSimdOperation_greaterThan: native = simd_int32x4_greaterThan; break; case AsmJSSimdOperation_equal: native = simd_int32x4_equal; break; + case AsmJSSimdOperation_and: native = simd_int32x4_and; break; + case AsmJSSimdOperation_or: native = simd_int32x4_or; break; + case AsmJSSimdOperation_xor: native = simd_int32x4_xor; break; case AsmJSSimdOperation_lessThanOrEqual: case AsmJSSimdOperation_greaterThanOrEqual: case AsmJSSimdOperation_notEqual: @@ -369,6 +372,9 @@ ValidateSimdOperation(JSContext *cx, AsmJSModule::Global &global, HandleValue gl case AsmJSSimdOperation_notEqual: native = simd_float32x4_notEqual ; break; case AsmJSSimdOperation_greaterThan: native = simd_float32x4_greaterThan; break; case AsmJSSimdOperation_greaterThanOrEqual: native = simd_float32x4_greaterThanOrEqual ; break; + case AsmJSSimdOperation_and: native = simd_float32x4_and; break; + case AsmJSSimdOperation_or: native = simd_float32x4_or; break; + case AsmJSSimdOperation_xor: native = simd_float32x4_xor; break; } break; } diff --git a/js/src/asmjs/AsmJSModule.h b/js/src/asmjs/AsmJSModule.h index eb617552c312..31432c46f956 100644 --- a/js/src/asmjs/AsmJSModule.h +++ b/js/src/asmjs/AsmJSModule.h @@ -86,6 +86,9 @@ enum AsmJSSimdOperation AsmJSSimdOperation_notEqual, AsmJSSimdOperation_greaterThan, AsmJSSimdOperation_greaterThanOrEqual, + AsmJSSimdOperation_and, + AsmJSSimdOperation_or, + AsmJSSimdOperation_xor, }; // These labels describe positions in the prologue/epilogue of functions while diff --git a/js/src/asmjs/AsmJSValidate.cpp b/js/src/asmjs/AsmJSValidate.cpp index 242a696d3a53..e4b034c9bb5d 100644 --- a/js/src/asmjs/AsmJSValidate.cpp +++ b/js/src/asmjs/AsmJSValidate.cpp @@ -1374,7 +1374,10 @@ class MOZ_STACK_CLASS ModuleCompiler !addStandardLibrarySimdOpName("equal", AsmJSSimdOperation_equal) || !addStandardLibrarySimdOpName("notEqual", AsmJSSimdOperation_notEqual) || !addStandardLibrarySimdOpName("greaterThan", AsmJSSimdOperation_greaterThan) || - !addStandardLibrarySimdOpName("greaterThanOrEqual", AsmJSSimdOperation_greaterThanOrEqual)) + !addStandardLibrarySimdOpName("greaterThanOrEqual", AsmJSSimdOperation_greaterThanOrEqual) || + !addStandardLibrarySimdOpName("and", AsmJSSimdOperation_and) || + !addStandardLibrarySimdOpName("or", AsmJSSimdOperation_or) || + !addStandardLibrarySimdOpName("xor", AsmJSSimdOperation_xor)) { return false; } @@ -2407,6 +2410,19 @@ class FunctionCompiler return ins; } + MDefinition *binarySimd(MDefinition *lhs, MDefinition *rhs, MSimdBinaryBitwise::Operation op, + MIRType type) + { + if (inDeadCode()) + return nullptr; + + JS_ASSERT(IsSimdType(lhs->type()) && rhs->type() == lhs->type()); + JS_ASSERT(lhs->type() == type); + MSimdBinaryBitwise *ins = MSimdBinaryBitwise::NewAsmJS(alloc(), lhs, rhs, op, type); + curBlock_->add(ins); + return ins; + } + MDefinition *binarySimd(MDefinition *lhs, MDefinition *rhs, MSimdBinaryComp::Operation op) { if (inDeadCode()) @@ -3477,6 +3493,9 @@ IsSimdValidOperationType(AsmJSSimdType type, AsmJSSimdOperation op) case AsmJSSimdOperation_lessThan: case AsmJSSimdOperation_equal: case AsmJSSimdOperation_greaterThan: + case AsmJSSimdOperation_and: + case AsmJSSimdOperation_or: + case AsmJSSimdOperation_xor: return true; case AsmJSSimdOperation_mul: case AsmJSSimdOperation_div: @@ -4708,6 +4727,18 @@ CheckBinarySimd(FunctionCompiler &f, ParseNode *call, const ModuleCompiler::Glob *def = f.binarySimd(lhsDef, rhsDef, MSimdBinaryComp::greaterThanOrEqual); *type = Type::Int32x4; break; + case AsmJSSimdOperation_and: + *def = f.binarySimd(lhsDef, rhsDef, MSimdBinaryBitwise::and_, opType); + *type = retType; + break; + case AsmJSSimdOperation_or: + *def = f.binarySimd(lhsDef, rhsDef, MSimdBinaryBitwise::or_, opType); + *type = retType; + break; + case AsmJSSimdOperation_xor: + *def = f.binarySimd(lhsDef, rhsDef, MSimdBinaryBitwise::xor_, opType); + *type = retType; + break; } return true; @@ -4729,6 +4760,9 @@ CheckSimdOperationCall(FunctionCompiler &f, ParseNode *call, const ModuleCompile case AsmJSSimdOperation_notEqual: case AsmJSSimdOperation_greaterThan: case AsmJSSimdOperation_greaterThanOrEqual: + case AsmJSSimdOperation_and: + case AsmJSSimdOperation_or: + case AsmJSSimdOperation_xor: return CheckBinarySimd(f, call, global, def, type); } MOZ_CRASH("unexpected simd operation in CheckSimdOperationCall"); diff --git a/js/src/jit-test/tests/asm.js/testSIMD.js b/js/src/jit-test/tests/asm.js/testSIMD.js index 7b1ed0a199c2..35f3d1499bc7 100644 --- a/js/src/jit-test/tests/asm.js/testSIMD.js +++ b/js/src/jit-test/tests/asm.js/testSIMD.js @@ -449,6 +449,8 @@ const GEF32 = 'var ge=f4.greaterThanOrEqual'; const EQF32 = 'var eq=f4.equal'; const NEF32 = 'var ne=f4.notEqual'; +assertAsmTypeFail('glob', USE_ASM + F32 + "var lt=f4.lessThan; function f() {var x=f4(1,2,3,4); var y=f4(5,6,7,8); x=lt(x,y);} return f"); + CheckF4Comp(LTF32, 'var y=f4(1,2,3,4); var z=f4(-1,1,0,2); var x=i4(0,0,0,0); x=lt(y,z)', [F, F, F, F]); CheckF4Comp(LTF32, 'var y=f4(-1,1,0,2); var z=f4(1,2,3,4); var x=i4(0,0,0,0); x=lt(y,z)', [T, T, T, T]); CheckF4Comp(LTF32, 'var y=f4(1,0,3,4); var z=f4(1,1,7,0); var x=i4(0,0,0,0); x=lt(y,z)', [F, T, T, F]); @@ -473,6 +475,40 @@ CheckF4Comp(GEF32, 'var y=f4(1,2,3,4); var z=f4(-1,1,0,2); var x=i4(0,0,0,0); x CheckF4Comp(GEF32, 'var y=f4(-1,1,0,2); var z=f4(1,2,3,4); var x=i4(0,0,0,0); x=ge(y,z)', [F, F, F, F]); CheckF4Comp(GEF32, 'var y=f4(1,0,3,4); var z=f4(1,1,7,0); var x=i4(0,0,0,0); x=ge(y,z)', [T, F, F, T]); +// Bitwise ops +const ANDI32 = 'var andd=i4.and;'; +const ORI32 = 'var orr=i4.or;'; +const XORI32 = 'var xorr=i4.xor;'; + +CheckI4(ANDI32, 'var x=i4(42,1337,-1,13); var y=i4(2, 4, 7, 15); x=andd(x,y)', [42 & 2, 1337 & 4, -1 & 7, 13 & 15]); +CheckI4(ORI32, ' var x=i4(42,1337,-1,13); var y=i4(2, 4, 7, 15); x=orr(x,y)', [42 | 2, 1337 | 4, -1 | 7, 13 | 15]); +CheckI4(XORI32, 'var x=i4(42,1337,-1,13); var y=i4(2, 4, 7, 15); x=xorr(x,y)', [42 ^ 2, 1337 ^ 4, -1 ^ 7, 13 ^ 15]); + +const ANDF32 = 'var andd=f4.and;'; +const ORF32 = 'var orr=f4.or;'; +const XORF32 = 'var xorr=f4.xor;'; + +var bitwise = (function() { + var asf32 = new Float32Array(2); + var asi32 = new Int32Array(asf32.buffer); + function andd(x, y) { asf32[0] = x; asf32[1] = y; asi32[0] = asi32[0] & asi32[1]; return asf32[0]; } + function orr(x, y) { asf32[0] = x; asf32[1] = y; asi32[0] = asi32[0] | asi32[1]; return asf32[0]; } + function xorr(x, y) { asf32[0] = x; asf32[1] = y; asi32[0] = asi32[0] ^ asi32[1]; return asf32[0]; } + + function andx4(x, y) { var res = []; for (var i = 0; i < 4; i++) res[i] = andd(x[i], y[i]); return res; } + function orx4(x, y) { var res = []; for (var i = 0; i < 4; i++) res[i] = orr(x[i], y[i]); return res; } + function xorx4(x, y) { var res = []; for (var i = 0; i < 4; i++) res[i] = xorr(x[i], y[i]); return res; } + return { + and: andx4, + or: orx4, + xor: xorx4 + } +})(); + +CheckF4(ANDF32, 'var x=f4(42, 13.37,-1.42, 23.10); var y=f4(19.89, 2.4, 8.15, 16.36); x=andd(x,y)', bitwise.and([42, 13.37, -1.42, 23.10], [19.89, 2.4, 8.15, 16.36])); +CheckF4(ORF32, 'var x=f4(42, 13.37,-1.42, 23.10); var y=f4(19.89, 2.4, 8.15, 16.36); x=orr(x,y)', bitwise.or( [42, 13.37, -1.42, 23.10], [19.89, 2.4, 8.15, 16.36])); +CheckF4(XORF32, 'var x=f4(42, 13.37,-1.42, 23.10); var y=f4(19.89, 2.4, 8.15, 16.36); x=xorr(x,y)', bitwise.xor([42, 13.37, -1.42, 23.10], [19.89, 2.4, 8.15, 16.36])); + // Dead code assertEqX4(asmLink(asmCompile('glob', USE_ASM + I32 + 'function f(){var x=i4(1,2,3,4); return i4(x); x=i4(5,6,7,8); return i4(x);} return f'), this)(), [1, 2, 3, 4]); assertEqX4(asmLink(asmCompile('glob', USE_ASM + I32 + 'function f(){var x=i4(1,2,3,4); var c=0; return i4(x); c=x.x|0; return i4(x);} return f'), this)(), [1, 2, 3, 4]); From 91cf5f12db93278eb6dd5f7f6a391658dc3368f8 Mon Sep 17 00:00:00 2001 From: Douglas Crosher Date: Fri, 29 Aug 2014 22:42:06 +1000 Subject: [PATCH 018/139] Bug 1060087 - OdinMonkey SIMD: add support for signMask; r=luke --- js/src/asmjs/AsmJSValidate.cpp | 20 +++++++++++++++++++- js/src/jit-test/tests/asm.js/testSIMD.js | 15 +++++++++++++++ js/src/vm/CommonPropertyNames.h | 1 + 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/js/src/asmjs/AsmJSValidate.cpp b/js/src/asmjs/AsmJSValidate.cpp index e4b034c9bb5d..b8f25dd6b21c 100644 --- a/js/src/asmjs/AsmJSValidate.cpp +++ b/js/src/asmjs/AsmJSValidate.cpp @@ -2586,6 +2586,17 @@ class FunctionCompiler return ins; } + MDefinition *extractSignMask(MDefinition *base) + { + if (inDeadCode()) + return nullptr; + + JS_ASSERT(IsSimdType(base->type())); + MSimdSignMask *ins = MSimdSignMask::NewAsmJS(alloc(), base); + curBlock_->add(ins); + return ins; + } + template MDefinition *constructSimd(MDefinition *x, MDefinition *y, MDefinition *z, MDefinition *w, MIRType type) @@ -4027,6 +4038,13 @@ CheckDotAccess(FunctionCompiler &f, ParseNode *elem, MDefinition **def, Type *ty SimdLane lane; JSAtomState &names = m.cx()->names(); + + if (field == names.signMask) { + *type = Type::Int; + *def = f.extractSignMask(baseDef); + return true; + } + if (field == names.x) lane = LaneX; else if (field == names.y) @@ -4036,7 +4054,7 @@ CheckDotAccess(FunctionCompiler &f, ParseNode *elem, MDefinition **def, Type *ty else if (field == names.w) lane = LaneW; else - return f.fail(base, "dot access field must be a lane name (x, y, z, w)"); + return f.fail(base, "dot access field must be a lane name (x, y, z, w) or signMask"); *type = baseType.simdToScalarType(); *def = f.extractSimdElement(lane, baseDef, type->toMIRType()); diff --git a/js/src/jit-test/tests/asm.js/testSIMD.js b/js/src/jit-test/tests/asm.js/testSIMD.js index 35f3d1499bc7..eff82d52710d 100644 --- a/js/src/jit-test/tests/asm.js/testSIMD.js +++ b/js/src/jit-test/tests/asm.js/testSIMD.js @@ -161,6 +161,21 @@ CheckF4('', 'var x=f4(' + (INT32_MAX + 1) + ', 2, 3, 4)', [INT32_MAX + 1, 2, 3, CheckF4('', 'var x=f4(1.3, 2.4, 3.5, 98.76)', [1.3, 2.4, 3.5, 98.76]); CheckF4('', 'var x=f4(13.37, 2., 3., -0)', [13.37, 2, 3, -0]); +// signMask +assertAsmTypeFail('glob', USE_ASM + I32 + "function f() {var x=i4(1,2,3,4); var y=0.0; y=x.signMask;} return f"); +assertAsmTypeFail('glob', USE_ASM + I32 + FROUND + "function f() {var x=i4(1,2,3,4); var y=f32(0.0); y=x.signMask;} return f"); + +assertAsmTypeFail('glob', USE_ASM + "function f() {var x=42; return x.signMask;} return f"); +assertAsmTypeFail('glob', USE_ASM + "function f() {var x=42.; return x.signMask;} return f"); +assertAsmTypeFail('glob', USE_ASM + FROUND + "function f() {var x=f32(42.); return x.signMask;} return f"); + +assertEq(asmLink(asmCompile('glob', USE_ASM + I32 + 'function f() { var x=i4(1,2,3,4); return x.signMask | 0 } return f'), this)(), 0b0000); +assertEq(asmLink(asmCompile('glob', USE_ASM + I32 + 'function f() { var x=i4(0,-1, ' + INT32_MAX + ',' + INT32_MIN + '); return x.signMask | 0 } return f'), this)(), 0b1010); + +assertEq(asmLink(asmCompile('glob', USE_ASM + F32 + 'var Infinity = glob.Infinity; function f() { var x=f4(0,0,0,0); x=f4(1, -13.37, 42, -Infinity); return x.signMask | 0 } return f'), this)(), 0b1010); +assertEq(asmLink(asmCompile('glob', USE_ASM + F32 + 'var Infinity = glob.Infinity; function f() { var x=f4(0,0,0,0); x=f4(-1, 0, -0.000001, Infinity); return x.signMask | 0 } return f'), this)(), 0b0101); +assertEq(asmLink(asmCompile('glob', USE_ASM + F32 + 'var NaN = glob.NaN; function f() { var x=f4(0,0,0,0); x=f4(-1, NaN, 3., 4.); return x.signMask | 0 } return f'), this)(), 0b0001); + // 1.3.3. Variable assignments assertAsmTypeFail('glob', USE_ASM + I32 + I32A + "function f() {var x=i4(1,2,3,4); x=i4();} return f"); assertAsmTypeFail('glob', USE_ASM + I32 + I32A + "function f() {var x=i4(1,2,3,4); x=i4(1);} return f"); diff --git a/js/src/vm/CommonPropertyNames.h b/js/src/vm/CommonPropertyNames.h index 5ffe30645ebc..2ec45e86ab41 100644 --- a/js/src/vm/CommonPropertyNames.h +++ b/js/src/vm/CommonPropertyNames.h @@ -166,6 +166,7 @@ macro(sensitivity, sensitivity, "sensitivity") \ macro(set, set, "set") \ macro(shape, shape, "shape") \ + macro(signMask, signMask, "signMask") \ macro(source, source, "source") \ macro(stack, stack, "stack") \ macro(sticky, sticky, "sticky") \ From 3c492aabac6148c91123288fd539eaf789c03016 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Tue, 2 Sep 2014 10:30:37 +0200 Subject: [PATCH 019/139] Bug 1061214 r=terrence --- js/src/jit/VMFunctions.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/src/jit/VMFunctions.h b/js/src/jit/VMFunctions.h index 5de18ff6c06f..792cb26f68aa 100644 --- a/js/src/jit/VMFunctions.h +++ b/js/src/jit/VMFunctions.h @@ -380,6 +380,18 @@ template <> struct TypeToRootType { template <> struct TypeToRootType { static const uint32_t result = VMFunction::RootCell; }; +template <> struct TypeToRootType { + static const uint32_t result = VMFunction::RootCell; +}; +template <> struct TypeToRootType > { + static const uint32_t result = VMFunction::RootObject; +}; +template <> struct TypeToRootType > { + static const uint32_t result = VMFunction::RootCell; +}; +template struct TypeToRootType > { + // Fail for Handle types that aren't specialized above. +}; template struct OutParamToDataType { static const DataType result = Type_Void; }; template <> struct OutParamToDataType { static const DataType result = Type_Value; }; From 90fe8dce5442b5ab708dc932371fa8223e1ea6ba Mon Sep 17 00:00:00 2001 From: Douglas Crosher Date: Tue, 2 Sep 2014 01:49:20 +1000 Subject: [PATCH 020/139] Bug 1060437 - SIMD: Implement float32x4.select in the interpreter; r=bbouvier --- js/src/builtin/SIMD.cpp | 29 ++++++++++++++ js/src/builtin/SIMD.h | 1 + .../TypedObject/simd/float32x4select.js | 38 +++++++++++++++++++ .../ecma_6/TypedObject/simd/int32x4select.js | 27 +++++++++---- 4 files changed, 88 insertions(+), 7 deletions(-) create mode 100644 js/src/tests/ecma_6/TypedObject/simd/float32x4select.js diff --git a/js/src/builtin/SIMD.cpp b/js/src/builtin/SIMD.cpp index 337bb908bb5f..069a9b3d019d 100644 --- a/js/src/builtin/SIMD.cpp +++ b/js/src/builtin/SIMD.cpp @@ -875,6 +875,35 @@ Float32x4Clamp(JSContext *cx, unsigned argc, Value *vp) static bool Int32x4Select(JSContext *cx, unsigned argc, Value *vp) +{ + CallArgs args = CallArgsFromVp(argc, vp); + if (args.length() != 3 || !IsVectorObject(args[0]) || + !IsVectorObject(args[1]) || !IsVectorObject(args[2])) + { + return ErrorBadArgs(cx); + } + + int32_t *val = TypedObjectMemory(args[0]); + int32_t *tv = TypedObjectMemory(args[1]); + int32_t *fv = TypedObjectMemory(args[2]); + + int32_t tr[Int32x4::lanes]; + for (unsigned i = 0; i < Int32x4::lanes; i++) + tr[i] = And::apply(val[i], tv[i]); + + int32_t fr[Int32x4::lanes]; + for (unsigned i = 0; i < Int32x4::lanes; i++) + fr[i] = And::apply(Not::apply(val[i]), fv[i]); + + int32_t orInt[Int32x4::lanes]; + for (unsigned i = 0; i < Int32x4::lanes; i++) + orInt[i] = Or::apply(tr[i], fr[i]); + + return StoreResult(cx, args, orInt); +} + +static bool +Float32x4Select(JSContext *cx, unsigned argc, Value *vp) { CallArgs args = CallArgsFromVp(argc, vp); if (args.length() != 3 || !IsVectorObject(args[0]) || diff --git a/js/src/builtin/SIMD.h b/js/src/builtin/SIMD.h index ea7d83244471..e4371b243ca9 100644 --- a/js/src/builtin/SIMD.h +++ b/js/src/builtin/SIMD.h @@ -57,6 +57,7 @@ #define FLOAT32X4_TERNARY_FUNCTION_LIST(V) \ V(clamp, Float32x4Clamp, 3, 0) \ + V(select, Float32x4Select, 3, 0) \ V(shuffleMix, FuncShuffle, 3, 0) #define FLOAT32X4_FUNCTION_LIST(V) \ diff --git a/js/src/tests/ecma_6/TypedObject/simd/float32x4select.js b/js/src/tests/ecma_6/TypedObject/simd/float32x4select.js new file mode 100644 index 000000000000..4ab4f71cbe6f --- /dev/null +++ b/js/src/tests/ecma_6/TypedObject/simd/float32x4select.js @@ -0,0 +1,38 @@ +// |reftest| skip-if(!this.hasOwnProperty("SIMD")) +var BUGNUMBER = 1060437; +var float32x4 = SIMD.float32x4; +var int32x4 = SIMD.int32x4; + +var summary = 'float32x4 select'; + +function test() { + print(BUGNUMBER + ": " + summary); + + var a = float32x4(0.125,4.25,9.75,16.125); + var b = float32x4(1.5,2.75,3.25,4.5); + var sel_ttff = int32x4.bool(true, true, false, false); + var c = SIMD.float32x4.select(sel_ttff,a,b); + assertEq(c.x, 0.125); + assertEq(c.y, 4.25); + assertEq(c.z, 3.25); + assertEq(c.w, 4.5); + + var b2 = float32x4(1.5,2.75,NaN,Infinity); + var c = SIMD.float32x4.select(sel_ttff,a,b2); + assertEq(c.x, 0.125); + assertEq(c.y, 4.25); + assertEq(c.z, NaN); + assertEq(c.w, Infinity); + + var a2 = float32x4(-NaN,-Infinity,9.75,16.125); + var c = SIMD.float32x4.select(sel_ttff,a2,b2); + assertEq(c.x, -NaN); + assertEq(c.y, -Infinity); + assertEq(c.z, NaN); + assertEq(c.w, Infinity); + + if (typeof reportCompare === "function") + reportCompare(true, true); +} + +test(); diff --git a/js/src/tests/ecma_6/TypedObject/simd/int32x4select.js b/js/src/tests/ecma_6/TypedObject/simd/int32x4select.js index 7d3582dc5deb..fbba6ff332ec 100644 --- a/js/src/tests/ecma_6/TypedObject/simd/int32x4select.js +++ b/js/src/tests/ecma_6/TypedObject/simd/int32x4select.js @@ -1,17 +1,17 @@ // |reftest| skip-if(!this.hasOwnProperty("SIMD")) -var BUGNUMBER = 946042; -var float32x4 = SIMD.float32x4; +var BUGNUMBER = 1060437; var int32x4 = SIMD.int32x4; var summary = 'int32x4 select'; +const INT32_MAX = Math.pow(2, 31) - 1; +const INT32_MIN = INT32_MAX + 1 | 0; + function test() { print(BUGNUMBER + ": " + summary); - // FIXME -- Bug 948379: Amend to check for correctness of border cases. - - var a = float32x4(0.0,4.0,9.0,16.0) - var b = float32x4(1.0,2.0,3.0,4.0) + var a = int32x4(0,4,9,16) + var b = int32x4(1,2,3,4) var sel_ttff = int32x4.bool(true, true, false, false); var c = SIMD.int32x4.select(sel_ttff,a,b); assertEq(c.x, 0); @@ -19,9 +19,22 @@ function test() { assertEq(c.z, 3); assertEq(c.w, 4); + var a2 = int32x4(INT32_MAX,INT32_MIN,9,16) + var c = SIMD.int32x4.select(sel_ttff,a2,b); + assertEq(c.x, INT32_MAX); + assertEq(c.y, INT32_MIN); + assertEq(c.z, 3); + assertEq(c.w, 4); + + var b2 = int32x4(1,2,INT32_MAX,INT32_MIN) + var c = SIMD.int32x4.select(sel_ttff,a2,b2); + assertEq(c.x, INT32_MAX); + assertEq(c.y, INT32_MIN); + assertEq(c.z, INT32_MAX); + assertEq(c.w, INT32_MIN); + if (typeof reportCompare === "function") reportCompare(true, true); } test(); - From a538a72556f3574d716c240443b30e9a71729d1c Mon Sep 17 00:00:00 2001 From: Douglas Crosher Date: Tue, 2 Sep 2014 17:49:17 +1000 Subject: [PATCH 021/139] Bug 1060437 - SIMD backend: Implement the select operation; r=bbouvier --- js/src/jit/LIR-Common.h | 20 +++++++++++ js/src/jit/LOpcodes.h | 1 + js/src/jit/MIR.h | 36 +++++++++++++++++++ js/src/jit/MOpcodes.h | 1 + js/src/jit/ParallelSafetyAnalysis.cpp | 1 + js/src/jit/arm/Lowering-arm.cpp | 6 ++++ js/src/jit/arm/Lowering-arm.h | 1 + js/src/jit/mips/Lowering-mips.cpp | 6 ++++ js/src/jit/mips/Lowering-mips.h | 1 + js/src/jit/none/Lowering-none.h | 1 + js/src/jit/shared/Assembler-x86-shared.h | 16 +++++++++ js/src/jit/shared/BaseAssembler-x86-shared.h | 22 ++++++++++++ .../jit/shared/CodeGenerator-x86-shared.cpp | 16 +++++++++ js/src/jit/shared/CodeGenerator-x86-shared.h | 1 + js/src/jit/shared/Lowering-x86-shared.cpp | 25 +++++++++++++ js/src/jit/shared/Lowering-x86-shared.h | 1 + js/src/jit/shared/MacroAssembler-x86-shared.h | 3 ++ 17 files changed, 158 insertions(+) diff --git a/js/src/jit/LIR-Common.h b/js/src/jit/LIR-Common.h index f277e93fb33a..9822bf61c208 100644 --- a/js/src/jit/LIR-Common.h +++ b/js/src/jit/LIR-Common.h @@ -307,6 +307,26 @@ class LSimdBinaryBitwiseX4 : public LInstructionHelper<1, 2, 0> } }; +// SIMD selection of lanes from two int32x4 or float32x4 arguments based on a +// int32x4 argument. +class LSimdSelect : public LInstructionHelper<1, 3, 0> +{ + public: + LIR_HEADER(SimdSelect); + const LAllocation *mask() { + return getOperand(0); + } + const LAllocation *lhs() { + return getOperand(1); + } + const LAllocation *rhs() { + return getOperand(2); + } + MSimdTernaryBitwise::Operation operation() const { + return mir_->toSimdTernaryBitwise()->operation(); + } +}; + // Constant 32-bit integer. class LInteger : public LInstructionHelper<1, 0, 0> { diff --git a/js/src/jit/LOpcodes.h b/js/src/jit/LOpcodes.h index 1e49a60c8f75..dae2c0661a99 100644 --- a/js/src/jit/LOpcodes.h +++ b/js/src/jit/LOpcodes.h @@ -28,6 +28,7 @@ _(SimdBinaryArithIx4) \ _(SimdBinaryArithFx4) \ _(SimdBinaryBitwiseX4) \ + _(SimdSelect) \ _(Value) \ _(CloneLiteral) \ _(Parameter) \ diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h index c5c436f57b5b..7290bd984e0b 100644 --- a/js/src/jit/MIR.h +++ b/js/src/jit/MIR.h @@ -1587,6 +1587,42 @@ class MSimdBinaryBitwise : public MBinaryInstruction } }; +class MSimdTernaryBitwise : public MTernaryInstruction +{ + public: + enum Operation { + select + }; + + private: + Operation operation_; + + MSimdTernaryBitwise(MDefinition *mask, MDefinition *lhs, MDefinition *rhs, Operation op, MIRType type) + : MTernaryInstruction(mask, lhs, rhs), operation_(op) + { + MOZ_ASSERT(IsSimdType(type)); + MOZ_ASSERT(mask->type() == MIRType_Int32x4); + MOZ_ASSERT(lhs->type() == rhs->type()); + MOZ_ASSERT(lhs->type() == type); + setResultType(type); + setMovable(); + } + + public: + INSTRUCTION_HEADER(SimdTernaryBitwise); + static MSimdTernaryBitwise *NewAsmJS(TempAllocator &alloc, MDefinition *mask, MDefinition *lhs, + MDefinition *rhs, Operation op, MIRType t) + { + return new(alloc) MSimdTernaryBitwise(mask, lhs, rhs, op, t); + } + + AliasSet getAliasSet() const { + return AliasSet::None(); + } + + Operation operation() const { return operation_; } +}; + // Deep clone a constant JSObject. class MCloneLiteral : public MUnaryInstruction, diff --git a/js/src/jit/MOpcodes.h b/js/src/jit/MOpcodes.h index 949038b3b319..9f7b8f810535 100644 --- a/js/src/jit/MOpcodes.h +++ b/js/src/jit/MOpcodes.h @@ -20,6 +20,7 @@ namespace jit { _(SimdBinaryComp) \ _(SimdBinaryArith) \ _(SimdBinaryBitwise) \ + _(SimdTernaryBitwise) \ _(CloneLiteral) \ _(Parameter) \ _(Callee) \ diff --git a/js/src/jit/ParallelSafetyAnalysis.cpp b/js/src/jit/ParallelSafetyAnalysis.cpp index baebcf932c4e..05c6906e6f01 100644 --- a/js/src/jit/ParallelSafetyAnalysis.cpp +++ b/js/src/jit/ParallelSafetyAnalysis.cpp @@ -120,6 +120,7 @@ class ParallelSafetyVisitor : public MDefinitionVisitor SAFE_OP(SimdBinaryComp) SAFE_OP(SimdBinaryArith) SAFE_OP(SimdBinaryBitwise) + SAFE_OP(SimdTernaryBitwise) UNSAFE_OP(CloneLiteral) SAFE_OP(Parameter) SAFE_OP(Callee) diff --git a/js/src/jit/arm/Lowering-arm.cpp b/js/src/jit/arm/Lowering-arm.cpp index 55d502c4fa04..498543335c63 100644 --- a/js/src/jit/arm/Lowering-arm.cpp +++ b/js/src/jit/arm/Lowering-arm.cpp @@ -549,6 +549,12 @@ LIRGeneratorARM::visitForkJoinGetSlice(MForkJoinGetSlice *ins) MOZ_CRASH("NYI"); } +bool +LIRGeneratorARM::visitSimdTernaryBitwise(MSimdTernaryBitwise *ins) +{ + MOZ_CRASH("NYI"); +} + bool LIRGeneratorARM::visitSimdSplatX4(MSimdSplatX4 *ins) { diff --git a/js/src/jit/arm/Lowering-arm.h b/js/src/jit/arm/Lowering-arm.h index 1b267ae8514f..94d466633f5c 100644 --- a/js/src/jit/arm/Lowering-arm.h +++ b/js/src/jit/arm/Lowering-arm.h @@ -91,6 +91,7 @@ class LIRGeneratorARM : public LIRGeneratorShared bool visitAsmJSLoadFuncPtr(MAsmJSLoadFuncPtr *ins); bool visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic *ins); bool visitForkJoinGetSlice(MForkJoinGetSlice *ins); + bool visitSimdTernaryBitwise(MSimdTernaryBitwise *ins); bool visitSimdSplatX4(MSimdSplatX4 *ins); }; diff --git a/js/src/jit/mips/Lowering-mips.cpp b/js/src/jit/mips/Lowering-mips.cpp index c1a741c84a94..fc890ea4e4b2 100644 --- a/js/src/jit/mips/Lowering-mips.cpp +++ b/js/src/jit/mips/Lowering-mips.cpp @@ -531,6 +531,12 @@ LIRGeneratorMIPS::visitForkJoinGetSlice(MForkJoinGetSlice *ins) MOZ_CRASH("NYI"); } +bool +LIRGeneratorMIPS::visitSimdTernaryBitwise(MSimdTernaryBitwise *ins) +{ + MOZ_CRASH("NYI"); +} + bool LIRGeneratorMIPS::visitSimdSplatX4(MSimdSplatX4 *ins) { diff --git a/js/src/jit/mips/Lowering-mips.h b/js/src/jit/mips/Lowering-mips.h index 0ecfaa73c6da..ec6b0646b0f5 100644 --- a/js/src/jit/mips/Lowering-mips.h +++ b/js/src/jit/mips/Lowering-mips.h @@ -91,6 +91,7 @@ class LIRGeneratorMIPS : public LIRGeneratorShared bool visitAsmJSLoadFuncPtr(MAsmJSLoadFuncPtr *ins); bool visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic *ins); bool visitForkJoinGetSlice(MForkJoinGetSlice *ins); + bool visitSimdTernaryBitwise(MSimdTernaryBitwise *ins); bool visitSimdSplatX4(MSimdSplatX4 *ins); }; diff --git a/js/src/jit/none/Lowering-none.h b/js/src/jit/none/Lowering-none.h index 56f881756a5f..7e5c8d943bb2 100644 --- a/js/src/jit/none/Lowering-none.h +++ b/js/src/jit/none/Lowering-none.h @@ -73,6 +73,7 @@ class LIRGeneratorNone : public LIRGeneratorShared LTableSwitch *newLTableSwitch(LAllocation, LDefinition, MTableSwitch *) { MOZ_CRASH(); } LTableSwitchV *newLTableSwitchV(MTableSwitch *) { MOZ_CRASH(); } + bool visitSimdTernaryBitwise(MSimdTernaryBitwise *ins) { MOZ_CRASH(); } bool visitSimdSplatX4(MSimdSplatX4 *ins) { MOZ_CRASH(); } }; diff --git a/js/src/jit/shared/Assembler-x86-shared.h b/js/src/jit/shared/Assembler-x86-shared.h index 1172495d1cab..8acc2b2b67c9 100644 --- a/js/src/jit/shared/Assembler-x86-shared.h +++ b/js/src/jit/shared/Assembler-x86-shared.h @@ -1681,6 +1681,22 @@ class AssemblerX86Shared : public AssemblerShared MOZ_CRASH("unexpected operand kind"); } } + void andnps(const Operand &src, FloatRegister dest) { + JS_ASSERT(HasSSE2()); + switch (src.kind()) { + case Operand::FPREG: + masm.andnps_rr(src.fpu(), dest.code()); + break; + case Operand::MEM_REG_DISP: + masm.andnps_mr(src.disp(), src.base(), dest.code()); + break; + case Operand::MEM_ADDRESS32: + masm.andnps_mr(src.address(), dest.code()); + break; + default: + MOZ_CRASH("unexpected operand kind"); + } + } void orps(const Operand &src, FloatRegister dest) { MOZ_ASSERT(HasSSE2()); switch (src.kind()) { diff --git a/js/src/jit/shared/BaseAssembler-x86-shared.h b/js/src/jit/shared/BaseAssembler-x86-shared.h index dab227f18104..5ca53ffb192e 100644 --- a/js/src/jit/shared/BaseAssembler-x86-shared.h +++ b/js/src/jit/shared/BaseAssembler-x86-shared.h @@ -296,6 +296,7 @@ private: OP2_UCOMISD_VsdWsd = 0x2E, OP2_MOVMSKPD_EdVd = 0x50, OP2_ANDPS_VpsWps = 0x54, + OP2_ANDNPS_VpsWps = 0x55, OP2_ORPS_VpsWps = 0x56, OP2_XORPS_VpsWps = 0x57, OP2_ADDSD_VsdWsd = 0x58, @@ -3464,6 +3465,27 @@ public: m_formatter.twoByteOp(OP2_ANDPS_VpsWps, (RegisterID)dst, address); } + void andnps_rr(XMMRegisterID src, XMMRegisterID dst) + { + spew("andnps %s, %s", + nameFPReg(src), nameFPReg(dst)); + m_formatter.twoByteOp(OP2_ANDNPS_VpsWps, (RegisterID)dst, (RegisterID)src); + } + + void andnps_mr(int offset, RegisterID base, XMMRegisterID dst) + { + spew("andnps %s0x%x(%s), %s", + PRETTY_PRINT_OFFSET(offset), nameIReg(base), nameFPReg(dst)); + m_formatter.twoByteOp(OP2_ANDNPS_VpsWps, (RegisterID)dst, base, offset); + } + + void andnps_mr(const void* address, XMMRegisterID dst) + { + spew("andnps %p, %s", + address, nameFPReg(dst)); + m_formatter.twoByteOp(OP2_ANDPS_VpsWps, (RegisterID)dst, address); + } + void orps_rr(XMMRegisterID src, XMMRegisterID dst) { spew("orps %s, %s", diff --git a/js/src/jit/shared/CodeGenerator-x86-shared.cpp b/js/src/jit/shared/CodeGenerator-x86-shared.cpp index 56f9cb574eaa..7a51064e0969 100644 --- a/js/src/jit/shared/CodeGenerator-x86-shared.cpp +++ b/js/src/jit/shared/CodeGenerator-x86-shared.cpp @@ -2371,6 +2371,22 @@ CodeGeneratorX86Shared::visitSimdBinaryBitwiseX4(LSimdBinaryBitwiseX4 *ins) MOZ_CRASH("unexpected SIMD bitwise op"); } +bool +CodeGeneratorX86Shared::visitSimdSelect(LSimdSelect *ins) +{ + FloatRegister mask = ToFloatRegister(ins->mask()); + FloatRegister onTrue = ToFloatRegister(ins->lhs()); + FloatRegister onFalse = ToFloatRegister(ins->rhs()); + + MOZ_ASSERT(onTrue == ToFloatRegister(ins->output())); + // The onFalse argument is not destroyed but due to limitations of the + // register allocator its life ends at the start of the operation. + masm.bitwiseAndX4(Operand(mask), onTrue); + masm.bitwiseAndNotX4(Operand(onFalse), mask); + masm.bitwiseOrX4(Operand(mask), onTrue); + return true; +} + bool CodeGeneratorX86Shared::visitForkJoinGetSlice(LForkJoinGetSlice *ins) { diff --git a/js/src/jit/shared/CodeGenerator-x86-shared.h b/js/src/jit/shared/CodeGenerator-x86-shared.h index 30444e9c2910..46fa417f4cee 100644 --- a/js/src/jit/shared/CodeGenerator-x86-shared.h +++ b/js/src/jit/shared/CodeGenerator-x86-shared.h @@ -218,6 +218,7 @@ class CodeGeneratorX86Shared : public CodeGeneratorShared bool visitSimdBinaryArithIx4(LSimdBinaryArithIx4 *lir); bool visitSimdBinaryArithFx4(LSimdBinaryArithFx4 *lir); bool visitSimdBinaryBitwiseX4(LSimdBinaryBitwiseX4 *lir); + bool visitSimdSelect(LSimdSelect *ins); // Out of line visitors. bool visitOutOfLineBailout(OutOfLineBailout *ool); diff --git a/js/src/jit/shared/Lowering-x86-shared.cpp b/js/src/jit/shared/Lowering-x86-shared.cpp index 36e40df2e084..a718b9b6b933 100644 --- a/js/src/jit/shared/Lowering-x86-shared.cpp +++ b/js/src/jit/shared/Lowering-x86-shared.cpp @@ -307,6 +307,31 @@ LIRGeneratorX86Shared::visitForkJoinGetSlice(MForkJoinGetSlice *ins) return defineFixed(lir, ins, LAllocation(AnyRegister(ForkJoinGetSliceReg_output))); } +bool +LIRGeneratorX86Shared::visitSimdTernaryBitwise(MSimdTernaryBitwise *ins) +{ + MOZ_ASSERT(IsSimdType(ins->type())); + + if (ins->type() == MIRType_Int32x4 || ins->type() == MIRType_Float32x4) { + LSimdSelect *lins = new(alloc()) LSimdSelect; + + // This must be useRegisterAtStart() because it is destroyed. + lins->setOperand(0, useRegisterAtStart(ins->getOperand(0))); + // This must be useRegisterAtStart() because it is destroyed. + lins->setOperand(1, useRegisterAtStart(ins->getOperand(1))); + // This could be useRegister(), but combining it with + // useRegisterAtStart() is broken see bug 772830. + lins->setOperand(2, useRegisterAtStart(ins->getOperand(2))); + // The output is constrained to be in the same register as the second + // argument to avoid redundantly copying the result into place. The + // register allocator will move the result if necessary. + return defineReuseInput(lins, ins, 1); + } + + MOZ_CRASH("Unknown SIMD kind when doing bitwise operations"); + return false; +} + bool LIRGeneratorX86Shared::visitSimdSplatX4(MSimdSplatX4 *ins) { diff --git a/js/src/jit/shared/Lowering-x86-shared.h b/js/src/jit/shared/Lowering-x86-shared.h index 808aff067ad0..1b0aa4cef6e2 100644 --- a/js/src/jit/shared/Lowering-x86-shared.h +++ b/js/src/jit/shared/Lowering-x86-shared.h @@ -48,6 +48,7 @@ class LIRGeneratorX86Shared : public LIRGeneratorShared bool lowerTruncateDToInt32(MTruncateToInt32 *ins); bool lowerTruncateFToInt32(MTruncateToInt32 *ins); bool visitForkJoinGetSlice(MForkJoinGetSlice *ins); + bool visitSimdTernaryBitwise(MSimdTernaryBitwise *ins); bool visitSimdSplatX4(MSimdSplatX4 *ins); }; diff --git a/js/src/jit/shared/MacroAssembler-x86-shared.h b/js/src/jit/shared/MacroAssembler-x86-shared.h index 8890afeaace9..4f50303e40ca 100644 --- a/js/src/jit/shared/MacroAssembler-x86-shared.h +++ b/js/src/jit/shared/MacroAssembler-x86-shared.h @@ -472,6 +472,9 @@ class MacroAssemblerX86Shared : public Assembler // penalty for integer types and double. andps(src, dest); } + void bitwiseAndNotX4(const Operand &src, FloatRegister dest) { + andnps(src, dest); + } void bitwiseOrX4(const Operand &src, FloatRegister dest) { orps(src, dest); } From c7516679929988f34e66733f3d823a739e8a7d74 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Tue, 2 Sep 2014 11:07:21 +0200 Subject: [PATCH 022/139] Bug 650161 - Fix some jit-test failures when compacting GC enabled r=terrence --- js/src/gc/GCInternals.h | 12 ++++++++++++ js/src/gc/Marking.cpp | 4 ++++ js/src/jsgc.cpp | 20 ++++++++------------ js/src/jspropertytree.cpp | 8 ++++++++ 4 files changed, 32 insertions(+), 12 deletions(-) diff --git a/js/src/gc/GCInternals.h b/js/src/gc/GCInternals.h index 3712af872884..66b66c2b679a 100644 --- a/js/src/gc/GCInternals.h +++ b/js/src/gc/GCInternals.h @@ -136,6 +136,18 @@ void CheckHashTablesAfterMovingGC(JSRuntime *rt); #endif +#ifdef JSGC_COMPACTING +struct MovingTracer : JSTracer { + MovingTracer(JSRuntime *rt) : JSTracer(rt, Visit, TraceWeakMapValues) {} + + static void Visit(JSTracer *jstrc, void **thingp, JSGCTraceKind kind); + static void Sweep(JSTracer *jstrc); + static bool IsMovingTracer(JSTracer *trc) { + return trc->callback == Visit; + } +}; +#endif + } /* namespace gc */ } /* namespace js */ diff --git a/js/src/gc/Marking.cpp b/js/src/gc/Marking.cpp index 3fe44579268e..102d22b86111 100644 --- a/js/src/gc/Marking.cpp +++ b/js/src/gc/Marking.cpp @@ -182,6 +182,10 @@ CheckMarkedThing(JSTracer *trc, T **thingp) if (IsInsideNursery(thing)) return; +#ifdef JSGC_COMPACTING + JS_ASSERT_IF(!MovingTracer::IsMovingTracer(trc), !IsForwarded(*thingp)); +#endif + /* * Permanent atoms are not associated with this runtime, but will be ignored * during marking. diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index ef0e91855a62..9533952d991b 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -2134,7 +2134,7 @@ ArenaList::pickArenasToRelocate() #ifdef DEBUG inline bool -PtrIsInRange(void *ptr, void *start, size_t length) +PtrIsInRange(const void *ptr, const void *start, size_t length) { return uintptr_t(ptr) - uintptr_t(start) < length; } @@ -2176,7 +2176,7 @@ RelocateCell(Zone *zone, Cell *src, AllocKind thingKind, size_t thingSize) JS_ASSERT_IF(dstObj->isNative(), - !PtrIsInRange((HeapSlot*)dstObj->getDenseElements(), src, thingSize)); + !PtrIsInRange((const Value*)dstObj->getDenseElements(), src, thingSize)); } // Copy the mark bits. @@ -2293,13 +2293,6 @@ GCRuntime::relocateArenas() return relocatedList; } -struct MovingTracer : JSTracer { - MovingTracer(JSRuntime *rt) : JSTracer(rt, Visit, TraceWeakMapValues) {} - - static void Visit(JSTracer *jstrc, void **thingp, JSGCTraceKind kind); - static void Sweep(JSTracer *jstrc); -}; - void MovingTracer::Visit(JSTracer *jstrc, void **thingp, JSGCTraceKind kind) { @@ -2346,8 +2339,11 @@ MovingTracer::Sweep(JSTracer *jstrc) /* Type inference may put more blocks here to free. */ rt->freeLifoAlloc.freeAll(); - /* Clear the new object cache as this can contain cell pointers. */ + /* Clear runtime caches that can contain cell pointers. */ + // TODO: Should possibly just call PurgeRuntime() here. rt->newObjectCache.purge(); + rt->nativeIterCache.purge(); + rt->regExpTestCache.purge(); } /* @@ -2423,8 +2419,8 @@ GCRuntime::updatePointersToRelocatedCells() // Mark all gray roots, making sure we call the trace callback to get the // current set. - marker.resetBufferedGrayRoots(); - markAllGrayReferences(gcstats::PHASE_COMPACT_UPDATE_GRAY); + if (JSTraceDataOp op = grayRootTracer.op) + (*op)(&trc, grayRootTracer.data); MovingTracer::Sweep(&trc); } diff --git a/js/src/jspropertytree.cpp b/js/src/jspropertytree.cpp index 8c338e22b3ce..e046cf128178 100644 --- a/js/src/jspropertytree.cpp +++ b/js/src/jspropertytree.cpp @@ -277,6 +277,14 @@ Shape::fixupDictionaryShapeAfterMovingGC() if (!listp) return; + // It's possible that this shape is unreachable and that listp points to the + // location of a dead object in the nursery. In this case we should never + // touch it again, so poison it for good measure. + if (IsInsideNursery(reinterpret_cast(listp))) { + JS_POISON(reinterpret_cast(this), JS_SWEPT_TENURED_PATTERN, sizeof(Shape)); + return; + } + JS_ASSERT(!IsInsideNursery(reinterpret_cast(listp))); AllocKind kind = reinterpret_cast(listp)->tenuredGetAllocKind(); JS_ASSERT(kind == FINALIZE_SHAPE || kind <= FINALIZE_OBJECT_LAST); From 2e443e6daf22513f6412bff87ac78967524e4bf8 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Tue, 2 Sep 2014 11:07:22 +0200 Subject: [PATCH 023/139] Bug 650161 - Fix up shared object elements from copy on write arrays r=terrence --- js/src/jsarray.cpp | 4 +--- js/src/jsgc.cpp | 9 +++++--- js/src/jsobj.cpp | 19 ++++++++++++++++ js/src/jsobj.h | 11 ++++++++++ js/src/jsobjinlines.h | 51 +++++++++++++++++++++++++++++++------------ 5 files changed, 74 insertions(+), 20 deletions(-) diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp index 464b53e5d125..a33cbb6fa191 100644 --- a/js/src/jsarray.cpp +++ b/js/src/jsarray.cpp @@ -3380,11 +3380,9 @@ js::NewDenseAllocatedArrayWithTemplate(JSContext *cx, uint32_t length, JSObject JSObject * js::NewDenseCopyOnWriteArray(JSContext *cx, HandleObject templateObject, gc::InitialHeap heap) { - RootedTypeObject type(cx, templateObject->type()); RootedShape shape(cx, templateObject->lastProperty()); JS_ASSERT(!gc::IsInsideNursery(templateObject)); - HeapSlot *elements = templateObject->getDenseElementsAllowCopyOnWrite(); JSObject *metadata = nullptr; if (!NewObjectMetadata(cx, &metadata)) @@ -3395,7 +3393,7 @@ js::NewDenseCopyOnWriteArray(JSContext *cx, HandleObject templateObject, gc::Ini return nullptr; } - Rooted arr(cx, JSObject::createArray(cx, heap, shape, type, elements)); + Rooted arr(cx, JSObject::createCopyOnWriteArray(cx, heap, shape, templateObject)); if (!arr) return nullptr; diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index 9533952d991b..38b6d959da8a 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -2351,15 +2351,18 @@ MovingTracer::Sweep(JSTracer *jstrc) */ static void UpdateCellPointers(MovingTracer *trc, Cell *cell, JSGCTraceKind traceKind) { - TraceChildren(trc, cell, traceKind); - - if (traceKind == JSTRACE_SHAPE) { + if (traceKind == JSTRACE_OBJECT) { + JSObject *obj = static_cast(cell); + obj->fixupAfterMovingGC(); + } else if (traceKind == JSTRACE_SHAPE) { Shape *shape = static_cast(cell); shape->fixupAfterMovingGC(); } else if (traceKind == JSTRACE_BASE_SHAPE) { BaseShape *base = static_cast(cell); base->fixupAfterMovingGC(); } + + TraceChildren(trc, cell, traceKind); } /* diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp index a1f91d9cd7af..0eda57dc41d8 100644 --- a/js/src/jsobj.cpp +++ b/js/src/jsobj.cpp @@ -3555,6 +3555,25 @@ JSObject::CopyElementsForWrite(ThreadSafeContext *cx, JSObject *obj) return true; } +void +JSObject::fixupAfterMovingGC() +{ + /* + * If this is a copy-on-write elements we may need to fix up both the + * elements' pointer back to the owner object, and the elements pointer + * itself if it points to inline elements in another object. + */ + if (hasDynamicElements()) { + ObjectElements *header = getElementsHeader(); + if (header->isCopyOnWrite()) { + HeapPtrObject &owner = header->ownerObject(); + if (IsForwarded(owner.get())) + owner = Forwarded(owner.get()); + elements = owner->getElementsHeader()->elements(); + } + } +} + bool js::SetClassAndProto(JSContext *cx, HandleObject obj, const Class *clasp, Handle proto, diff --git a/js/src/jsobj.h b/js/src/jsobj.h index 9d122c7f31a5..bd6412ea35b5 100644 --- a/js/src/jsobj.h +++ b/js/src/jsobj.h @@ -253,11 +253,20 @@ class JSObject : public js::ObjectImpl js::HandleTypeObject type, js::HeapSlot *elements); + /* Make an copy-on-write array object which shares the elements of an existing object. */ + static inline js::ArrayObject *createCopyOnWriteArray(js::ExclusiveContext *cx, + js::gc::InitialHeap heap, + js::HandleShape shape, + js::HandleObject sharedElementsOwner); + private: // Helper for the above two methods. static inline JSObject * createArrayInternal(js::ExclusiveContext *cx, js::gc::AllocKind kind, js::gc::InitialHeap heap, js::HandleShape shape, js::HandleTypeObject type); + + static inline js::ArrayObject *finishCreateArray(JSObject *obj, + js::HandleShape shape); public: /* @@ -773,6 +782,8 @@ class JSObject : public js::ObjectImpl return getElementsHeader()->isCopyOnWrite(); } + void fixupAfterMovingGC(); + /* Packed information for this object's elements. */ inline bool writeToIndexWouldMarkNotPacked(uint32_t index); inline void markDenseElementsNotPacked(js::ExclusiveContext *cx); diff --git a/js/src/jsobjinlines.h b/js/src/jsobjinlines.h index 3bf981263a18..39ee8d923d15 100644 --- a/js/src/jsobjinlines.h +++ b/js/src/jsobjinlines.h @@ -581,6 +581,18 @@ JSObject::createArrayInternal(js::ExclusiveContext *cx, js::gc::AllocKind kind, return obj; } +/* static */ inline js::ArrayObject * +JSObject::finishCreateArray(JSObject *obj, js::HandleShape shape) +{ + size_t span = shape->slotSpan(); + if (span) + obj->initializeSlotRange(0, span); + + js::gc::TraceCreateObject(obj); + + return &obj->as(); +} + /* static */ inline js::ArrayObject * JSObject::createArray(js::ExclusiveContext *cx, js::gc::AllocKind kind, js::gc::InitialHeap heap, js::HandleShape shape, js::HandleTypeObject type, @@ -595,13 +607,7 @@ JSObject::createArray(js::ExclusiveContext *cx, js::gc::AllocKind kind, js::gc:: obj->setFixedElements(); new (obj->getElementsHeader()) js::ObjectElements(capacity, length); - size_t span = shape->slotSpan(); - if (span) - obj->initializeSlotRange(0, span); - - js::gc::TraceCreateObject(obj); - - return &obj->as(); + return finishCreateArray(obj, shape); } /* static */ inline js::ArrayObject * @@ -610,8 +616,8 @@ JSObject::createArray(js::ExclusiveContext *cx, js::gc::InitialHeap heap, js::HeapSlot *elements) { // Use the smallest allocation kind for the array, as it can't have any - // fixed slots (see assert in the above function) and will not be using its - // fixed elements. + // fixed slots (see the assert in createArrayInternal) and will not be using + // its fixed elements. js::gc::AllocKind kind = js::gc::FINALIZE_OBJECT0_BACKGROUND; JSObject *obj = createArrayInternal(cx, kind, heap, shape, type); @@ -620,13 +626,30 @@ JSObject::createArray(js::ExclusiveContext *cx, js::gc::InitialHeap heap, obj->elements = elements; - size_t span = shape->slotSpan(); - if (span) - obj->initializeSlotRange(0, span); + return finishCreateArray(obj, shape); +} - js::gc::TraceCreateObject(obj); +/* static */ inline js::ArrayObject * +JSObject::createCopyOnWriteArray(js::ExclusiveContext *cx, js::gc::InitialHeap heap, + js::HandleShape shape, + js::HandleObject sharedElementsOwner) +{ + MOZ_ASSERT(sharedElementsOwner->getElementsHeader()->isCopyOnWrite()); + MOZ_ASSERT(sharedElementsOwner->getElementsHeader()->ownerObject() == sharedElementsOwner); - return &obj->as(); + // Use the smallest allocation kind for the array, as it can't have any + // fixed slots (see the assert in createArrayInternal) and will not be using + // its fixed elements. + js::gc::AllocKind kind = js::gc::FINALIZE_OBJECT0_BACKGROUND; + + js::RootedTypeObject type(cx, sharedElementsOwner->type()); + JSObject *obj = createArrayInternal(cx, kind, heap, shape, type); + if (!obj) + return nullptr; + + obj->elements = sharedElementsOwner->getDenseElementsAllowCopyOnWrite(); + + return finishCreateArray(obj, shape); } inline void From fbd9cb9af777991bcfd466dd6cf68cef962dc6ec Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Tue, 2 Sep 2014 11:07:22 +0200 Subject: [PATCH 024/139] Bug 650161 - Add moving GC callback and use it to fix up ipc CPOW tables r=terrence --- js/ipc/JavaScriptChild.cpp | 16 ++++++++++++---- js/ipc/JavaScriptChild.h | 2 +- js/ipc/JavaScriptParent.cpp | 8 ++++++++ js/ipc/JavaScriptShared.cpp | 16 ++++++++++------ js/ipc/JavaScriptShared.h | 10 ++++++++-- js/src/gc/GCRuntime.h | 3 +++ js/src/jsapi.cpp | 13 +++++++++++++ js/src/jsapi.h | 9 +++++++++ js/src/jsgc.cpp | 26 ++++++++++++++++++++++++++ 9 files changed, 90 insertions(+), 13 deletions(-) diff --git a/js/ipc/JavaScriptChild.cpp b/js/ipc/JavaScriptChild.cpp index 294be407703b..90289446fe20 100644 --- a/js/ipc/JavaScriptChild.cpp +++ b/js/ipc/JavaScriptChild.cpp @@ -24,10 +24,16 @@ static void FinalizeChild(JSFreeOp *fop, JSFinalizeStatus status, bool isCompartment, void *data) { if (status == JSFINALIZE_GROUP_START) { - static_cast(data)->finalize(fop); + static_cast(data)->finalize(); } } +static void +FixupChildAfterMovingGC(JSRuntime *rt, void *data) +{ + static_cast(data)->fixupAfterMovingGC(); +} + JavaScriptChild::JavaScriptChild(JSRuntime *rt) : JavaScriptShared(rt), JavaScriptBase(rt) @@ -37,6 +43,7 @@ JavaScriptChild::JavaScriptChild(JSRuntime *rt) JavaScriptChild::~JavaScriptChild() { JS_RemoveFinalizeCallback(rt_, FinalizeChild); + JS_RemoveMovingGCCallback(rt_, FixupChildAfterMovingGC); } bool @@ -48,14 +55,15 @@ JavaScriptChild::init() return false; JS_AddFinalizeCallback(rt_, FinalizeChild, this); + JS_AddMovingGCCallback(rt_, FixupChildAfterMovingGC, this); return true; } void -JavaScriptChild::finalize(JSFreeOp *fop) +JavaScriptChild::finalize() { - objects_.finalize(fop); - objectIds_.finalize(fop); + objects_.sweep(); + objectIds_.sweep(); } JSObject * diff --git a/js/ipc/JavaScriptChild.h b/js/ipc/JavaScriptChild.h index 609b680dd5c9..fc6081f8c771 100644 --- a/js/ipc/JavaScriptChild.h +++ b/js/ipc/JavaScriptChild.h @@ -21,7 +21,7 @@ class JavaScriptChild : public JavaScriptBase virtual ~JavaScriptChild(); bool init(); - void finalize(JSFreeOp *fop); + void finalize(); void drop(JSObject *obj); diff --git a/js/ipc/JavaScriptParent.cpp b/js/ipc/JavaScriptParent.cpp index 8bd2086fa3bb..d05af7ee5ff8 100644 --- a/js/ipc/JavaScriptParent.cpp +++ b/js/ipc/JavaScriptParent.cpp @@ -27,6 +27,12 @@ TraceParent(JSTracer *trc, void *data) static_cast(data)->trace(trc); } +static void +FixupParentAfterMovingGC(JSRuntime *rt, void *data) +{ + static_cast(data)->fixupAfterMovingGC(); +} + JavaScriptParent::JavaScriptParent(JSRuntime *rt) : JavaScriptShared(rt), JavaScriptBase(rt) @@ -36,6 +42,7 @@ JavaScriptParent::JavaScriptParent(JSRuntime *rt) JavaScriptParent::~JavaScriptParent() { JS_RemoveExtraGCRootsTracer(rt_, TraceParent, this); + JS_RemoveMovingGCCallback(rt_, FixupParentAfterMovingGC); } bool @@ -45,6 +52,7 @@ JavaScriptParent::init() return false; JS_AddExtraGCRootsTracer(rt_, TraceParent, this); + JS_AddMovingGCCallback(rt_, FixupParentAfterMovingGC, this); return true; } diff --git a/js/ipc/JavaScriptShared.cpp b/js/ipc/JavaScriptShared.cpp index c63d6ac2b9a3..54092cd4fab7 100644 --- a/js/ipc/JavaScriptShared.cpp +++ b/js/ipc/JavaScriptShared.cpp @@ -41,14 +41,12 @@ IdToObjectMap::trace(JSTracer *trc) } void -IdToObjectMap::finalize(JSFreeOp *fop) +IdToObjectMap::sweep() { for (Table::Enum e(table_); !e.empty(); e.popFront()) { DebugOnly prior = e.front().value().get(); if (JS_IsAboutToBeFinalized(&e.front().value())) e.removeFront(); - else - MOZ_ASSERT(e.front().value() == prior); } } @@ -97,14 +95,14 @@ ObjectToIdMap::init() } void -ObjectToIdMap::finalize(JSFreeOp *fop) +ObjectToIdMap::sweep() { for (Table::Enum e(*table_); !e.empty(); e.popFront()) { JSObject *obj = e.front().key(); if (JS_IsAboutToBeFinalizedUnbarriered(&obj)) e.removeFront(); - else - MOZ_ASSERT(obj == e.front().key()); + else if (obj != e.front().key()) + e.rekeyFront(obj); } } @@ -596,3 +594,9 @@ JavaScriptShared::Wrap(JSContext *cx, HandleObject aObj, InfallibleTArray &aCpows, JS::MutableHandleObject objp); bool Wrap(JSContext *cx, JS::HandleObject aObj, InfallibleTArray *outCpows); + void fixupAfterMovingGC(); + protected: bool toVariant(JSContext *cx, JS::HandleValue from, JSVariant *to); bool fromVariant(JSContext *cx, const JSVariant &from, JS::MutableHandleValue to); diff --git a/js/src/gc/GCRuntime.h b/js/src/gc/GCRuntime.h index 91daac090be9..54d0cd63fc5f 100644 --- a/js/src/gc/GCRuntime.h +++ b/js/src/gc/GCRuntime.h @@ -414,6 +414,8 @@ class GCRuntime void setGCCallback(JSGCCallback callback, void *data); bool addFinalizeCallback(JSFinalizeCallback callback, void *data); void removeFinalizeCallback(JSFinalizeCallback func); + bool addMovingGCCallback(JSMovingGCCallback callback, void *data); + void removeMovingGCCallback(JSMovingGCCallback func); JS::GCSliceCallback setSliceCallback(JS::GCSliceCallback callback); void setValidate(bool enable); @@ -797,6 +799,7 @@ class GCRuntime Callback gcCallback; CallbackVector finalizeCallbacks; + CallbackVector movingCallbacks; /* * Malloc counter to measure memory pressure for GC scheduling. It runs diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index aab0c14dead1..6e3cee2ff791 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -1888,6 +1888,19 @@ JS_RemoveFinalizeCallback(JSRuntime *rt, JSFinalizeCallback cb) rt->gc.removeFinalizeCallback(cb); } +JS_PUBLIC_API(bool) +JS_AddMovingGCCallback(JSRuntime *rt, JSMovingGCCallback cb, void *data) +{ + AssertHeapIsIdle(rt); + return rt->gc.addMovingGCCallback(cb, data); +} + +JS_PUBLIC_API(void) +JS_RemoveMovingGCCallback(JSRuntime *rt, JSMovingGCCallback cb) +{ + rt->gc.removeMovingGCCallback(cb); +} + JS_PUBLIC_API(bool) JS_IsAboutToBeFinalized(JS::Heap *objp) { diff --git a/js/src/jsapi.h b/js/src/jsapi.h index 0f1b2d1cba9c..d12fc78fa9a8 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -689,6 +689,9 @@ typedef enum JSFinalizeStatus { typedef void (* JSFinalizeCallback)(JSFreeOp *fop, JSFinalizeStatus status, bool isCompartment, void *data); +typedef void +(* JSMovingGCCallback)(JSRuntime *rt, void *data); + typedef bool (* JSInterruptCallback)(JSContext *cx); @@ -2025,6 +2028,12 @@ JS_AddFinalizeCallback(JSRuntime *rt, JSFinalizeCallback cb, void *data); extern JS_PUBLIC_API(void) JS_RemoveFinalizeCallback(JSRuntime *rt, JSFinalizeCallback cb); +extern JS_PUBLIC_API(bool) +JS_AddMovingGCCallback(JSRuntime *rt, JSMovingGCCallback cb, void *data); + +extern JS_PUBLIC_API(void) +JS_RemoveMovingGCCallback(JSRuntime *rt, JSMovingGCCallback cb); + extern JS_PUBLIC_API(bool) JS_IsGCMarkingTracer(JSTracer *trc); diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index 38b6d959da8a..852e692d8e50 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -1595,6 +1595,25 @@ GCRuntime::removeFinalizeCallback(JSFinalizeCallback callback) } } +bool +GCRuntime::addMovingGCCallback(JSMovingGCCallback callback, void *data) +{ + return movingCallbacks.append(Callback(callback, data)); +} + +void +GCRuntime::removeMovingGCCallback(JSMovingGCCallback callback) +{ + for (Callback *p = movingCallbacks.begin(); + p < movingCallbacks.end(); p++) + { + if (p->op == callback) { + movingCallbacks.erase(p); + break; + } + } +} + JS::GCSliceCallback GCRuntime::setSliceCallback(JS::GCSliceCallback callback) { return stats.setSliceCallback(callback); @@ -2426,6 +2445,13 @@ GCRuntime::updatePointersToRelocatedCells() (*op)(&trc, grayRootTracer.data); MovingTracer::Sweep(&trc); + + // Call callbacks to get the rest of the system to fixup other untraced pointers. + for (Callback *p = rt->gc.movingCallbacks.begin(); + p < rt->gc.movingCallbacks.end(); p++) + { + p->op(rt, p->data); + } } void From 9f938c20cc7771d8c2686b5738afa8e98f507765 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Tue, 2 Sep 2014 11:07:22 +0200 Subject: [PATCH 025/139] Bug 650161 - Add a class hook that's called when an object is moved r=terrence --- js/public/Class.h | 23 ++++++++++++++++++++--- js/src/jsfriendapi.cpp | 5 +++++ js/src/jsfriendapi.h | 5 ++++- js/src/jsgc.cpp | 20 +++++--------------- js/src/jsproxy.cpp | 12 ++++++++++++ js/src/jsproxy.h | 1 + js/src/vm/ArrayBufferObject.cpp | 14 ++++++++++++-- js/src/vm/ArrayBufferObject.h | 2 +- js/src/vm/TypedArrayObject.cpp | 20 +++++++++++++++++++- js/src/vm/TypedArrayObject.h | 2 ++ 10 files changed, 81 insertions(+), 23 deletions(-) diff --git a/js/public/Class.h b/js/public/Class.h index bf96371a63e0..e2172598c4fd 100644 --- a/js/public/Class.h +++ b/js/public/Class.h @@ -10,7 +10,7 @@ #define js_Class_h #include "mozilla/NullPtr.h" - + #include "jstypes.h" #include "js/CallArgs.h" @@ -185,6 +185,9 @@ typedef JSObject * typedef JSObject * (* JSWeakmapKeyDelegateOp)(JSObject *obj); +typedef void +(* JSObjectMovedOp)(JSObject *obj, const JSObject *old); + /* js::Class operation signatures. */ namespace js { @@ -318,10 +321,19 @@ struct ClassExtension * wrapped object is collected. */ JSWeakmapKeyDelegateOp weakmapKeyDelegateOp; + + /* + * Optional hook called when an object is moved by a compacting GC. + * + * There may exist weak pointers to an object that are not traced through + * when the normal trace APIs are used, for example objects in the wrapper + * cache. This hook allows these pointers to be updated. + */ + JSObjectMovedOp objectMovedOp; }; #define JS_NULL_CLASS_SPEC {nullptr,nullptr,nullptr,nullptr,nullptr,nullptr} -#define JS_NULL_CLASS_EXT {nullptr,nullptr,nullptr,false,nullptr} +#define JS_NULL_CLASS_EXT {nullptr,nullptr,nullptr,false,nullptr,nullptr} struct ObjectOps { @@ -361,7 +373,7 @@ typedef void (*JSClassInternal)(); struct JSClass { JS_CLASS_MEMBERS(JSFinalizeOp); - void *reserved[31]; + void *reserved[32]; }; #define JSCLASS_HAS_PRIVATE (1<<0) // objects have private slot @@ -540,6 +552,11 @@ IsObjectWithClass(const JS::Value &v, ESClassValue classValue, JSContext *cx); inline bool Unbox(JSContext *cx, JS::HandleObject obj, JS::MutableHandleValue vp); +#ifdef DEBUG +JS_FRIEND_API(bool) +HasObjectMovedOp(JSObject *obj); +#endif + } /* namespace js */ #endif /* js_Class_h */ diff --git a/js/src/jsfriendapi.cpp b/js/src/jsfriendapi.cpp index e8e05cdb574e..9ea44eef814d 100644 --- a/js/src/jsfriendapi.cpp +++ b/js/src/jsfriendapi.cpp @@ -1195,6 +1195,11 @@ js::IsInRequest(JSContext *cx) { return !!cx->runtime()->requestDepth; } + +bool +js::HasObjectMovedOp(JSObject *obj) { + return !!GetObjectClass(obj)->ext.objectMovedOp; +} #endif #ifdef JSGC_GENERATIONAL diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h index bc57f046c609..bb50ce6d803b 100644 --- a/js/src/jsfriendapi.h +++ b/js/src/jsfriendapi.h @@ -262,7 +262,8 @@ namespace js { innerObject, \ iteratorObject, \ isWrappedNative, \ - js::proxy_WeakmapKeyDelegate \ + js::proxy_WeakmapKeyDelegate, \ + js::proxy_ObjectMoved \ } #define PROXY_CLASS_WITH_EXT(name, extraSlots, flags, callOp, constructOp, ext) \ @@ -377,6 +378,8 @@ extern JS_FRIEND_API(bool) proxy_Convert(JSContext *cx, JS::HandleObject proxy, JSType hint, JS::MutableHandleValue vp); extern JS_FRIEND_API(void) proxy_Finalize(FreeOp *fop, JSObject *obj); +extern JS_FRIEND_API(void) +proxy_ObjectMoved(JSObject *obj, const JSObject *old); extern JS_FRIEND_API(bool) proxy_HasInstance(JSContext *cx, JS::HandleObject proxy, JS::MutableHandleValue v, bool *bp); extern JS_FRIEND_API(bool) diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index 852e692d8e50..f7509f682e1d 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -2172,27 +2172,17 @@ RelocateCell(Zone *zone, Cell *src, AllocKind thingKind, size_t thingSize) // Copy source cell contents to destination. memcpy(dst, src, thingSize); - // Fixup the pointer to inline object elements if necessary. if (thingKind <= FINALIZE_OBJECT_LAST) { JSObject *srcObj = static_cast(src); JSObject *dstObj = static_cast(dst); + + // Fixup the pointer to inline object elements if necessary. if (srcObj->hasFixedElements()) dstObj->setFixedElements(); - if (srcObj->is()) { - // We must fix up any inline data pointers while we know the source - // object and before we mark any of the views. - ArrayBufferObject::fixupDataPointerAfterMovingGC( - srcObj->as(), dstObj->as()); - } else if (srcObj->is()) { - TypedArrayObject &typedArray = srcObj->as(); - if (!typedArray.hasBuffer()) { - JS_ASSERT(srcObj->getPrivate() == - srcObj->fixedData(TypedArrayObject::FIXED_DATA_START)); - dstObj->setPrivate(dstObj->fixedData(TypedArrayObject::FIXED_DATA_START)); - } - } - + // Call object moved hook if present. + if (JSObjectMovedOp op = srcObj->getClass()->ext.objectMovedOp) + op(dstObj, srcObj); JS_ASSERT_IF(dstObj->isNative(), !PtrIsInRange((const Value*)dstObj->getDenseElements(), src, thingSize)); diff --git a/js/src/jsproxy.cpp b/js/src/jsproxy.cpp index f27815523ecb..b29c046d8fa7 100644 --- a/js/src/jsproxy.cpp +++ b/js/src/jsproxy.cpp @@ -362,6 +362,11 @@ BaseProxyHandler::finalize(JSFreeOp *fop, JSObject *proxy) const { } +void +BaseProxyHandler::objectMoved(JSObject *proxy, const JSObject *old) const +{ +} + JSObject * BaseProxyHandler::weakmapKeyDelegate(JSObject *proxy) const { @@ -2878,6 +2883,13 @@ js::proxy_Finalize(FreeOp *fop, JSObject *obj) obj->as().handler()->finalize(fop, obj); } +void +js::proxy_ObjectMoved(JSObject *obj, const JSObject *old) +{ + JS_ASSERT(obj->is()); + obj->as().handler()->objectMoved(obj, old); +} + bool js::proxy_HasInstance(JSContext *cx, HandleObject proxy, MutableHandleValue v, bool *bp) { diff --git a/js/src/jsproxy.h b/js/src/jsproxy.h index 8f3a9b1b9f52..4be6da78d54e 100644 --- a/js/src/jsproxy.h +++ b/js/src/jsproxy.h @@ -220,6 +220,7 @@ class JS_FRIEND_API(BaseProxyHandler) virtual bool boxedValue_unbox(JSContext *cx, HandleObject proxy, MutableHandleValue vp) const; virtual bool defaultValue(JSContext *cx, HandleObject obj, JSType hint, MutableHandleValue vp) const; virtual void finalize(JSFreeOp *fop, JSObject *proxy) const; + virtual void objectMoved(JSObject *proxy, const JSObject *old) const; virtual bool getPrototypeOf(JSContext *cx, HandleObject proxy, MutableHandleObject protop) const; virtual bool setPrototypeOf(JSContext *cx, HandleObject proxy, HandleObject proto, bool *bp) const; diff --git a/js/src/vm/ArrayBufferObject.cpp b/js/src/vm/ArrayBufferObject.cpp index 82983a7c864f..9cc95337c712 100644 --- a/js/src/vm/ArrayBufferObject.cpp +++ b/js/src/vm/ArrayBufferObject.cpp @@ -122,7 +122,14 @@ const Class ArrayBufferObject::class_ = { nullptr, /* construct */ ArrayBufferObject::obj_trace, JS_NULL_CLASS_SPEC, - JS_NULL_CLASS_EXT + { + nullptr, /* outerObject */ + nullptr, /* innerObject */ + nullptr, /* iteratorObject */ + false, /* isWrappedNative */ + nullptr, /* weakmapKeyDelegateOp */ + ArrayBufferObject::objectMoved + } }; const JSFunctionSpec ArrayBufferObject::jsfuncs[] = { @@ -929,8 +936,11 @@ ArrayBufferObject::sweep(JSCompartment *compartment) } /* static */ void -ArrayBufferObject::fixupDataPointerAfterMovingGC(const ArrayBufferObject &src, ArrayBufferObject &dst) +ArrayBufferObject::objectMoved(JSObject *obj, const JSObject *old) { + ArrayBufferObject &dst = obj->as(); + const ArrayBufferObject &src = old->as(); + // Fix up possible inline data pointer. const size_t reservedSlots = JSCLASS_RESERVED_SLOTS(&ArrayBufferObject::class_); if (src.dataPointer() == src.fixedData(reservedSlots)) diff --git a/js/src/vm/ArrayBufferObject.h b/js/src/vm/ArrayBufferObject.h index fee20652000d..da5f166224b9 100644 --- a/js/src/vm/ArrayBufferObject.h +++ b/js/src/vm/ArrayBufferObject.h @@ -160,7 +160,7 @@ class ArrayBufferObject : public JSObject static void sweep(JSCompartment *rt); - static void fixupDataPointerAfterMovingGC(const ArrayBufferObject &src, ArrayBufferObject &dst); + static void objectMoved(JSObject *obj, const JSObject *old); static void resetArrayBufferList(JSCompartment *rt); static bool saveArrayBufferList(JSCompartment *c, ArrayBufferVector &vector); diff --git a/js/src/vm/TypedArrayObject.cpp b/js/src/vm/TypedArrayObject.cpp index fd12e0d30646..d9e7a58a45a9 100644 --- a/js/src/vm/TypedArrayObject.cpp +++ b/js/src/vm/TypedArrayObject.cpp @@ -134,6 +134,16 @@ TypedArrayObject::dataOffset() return JSObject::getPrivateDataOffset(DATA_SLOT); } +/* static */ void +TypedArrayObject::ObjectMoved(JSObject *obj, const JSObject *old) +{ + const TypedArrayObject &src = old->as(); + if (!src.hasBuffer()) { + JS_ASSERT(old->getPrivate() == old->fixedData(FIXED_DATA_START)); + obj->setPrivate(obj->fixedData(FIXED_DATA_START)); + } +} + /* Helper clamped uint8_t type */ uint32_t JS_FASTCALL @@ -2222,7 +2232,15 @@ IMPL_TYPED_ARRAY_COMBINED_UNWRAPPERS(Float64, double, double) nullptr, /* hasInstance */ \ nullptr, /* construct */ \ ArrayBufferViewObject::trace, /* trace */ \ - TYPED_ARRAY_CLASS_SPEC(_typedArray) \ + TYPED_ARRAY_CLASS_SPEC(_typedArray), \ + { \ + nullptr, /* outerObject */ \ + nullptr, /* innerObject */ \ + nullptr, /* iteratorObject */ \ + false, /* isWrappedNative */ \ + nullptr, /* weakmapKeyDelegateOp */ \ + TypedArrayObject::ObjectMoved \ + } \ } template diff --git a/js/src/vm/TypedArrayObject.h b/js/src/vm/TypedArrayObject.h index 0fdbbba4a6d8..35393fee8a62 100644 --- a/js/src/vm/TypedArrayObject.h +++ b/js/src/vm/TypedArrayObject.h @@ -125,6 +125,8 @@ class TypedArrayObject : public ArrayBufferViewObject static int dataOffset(); static bool isOriginalLengthGetter(Scalar::Type type, Native native); + + static void ObjectMoved(JSObject *obj, const JSObject *old); }; inline bool From cd7ba96e9db207da9fe1a5f517403f68e0790ae4 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 2 Sep 2014 11:07:25 +0200 Subject: [PATCH 026/139] Bug 1055655 - Fix warnings turned to errors by bug 1018288 found by mingw build. r=ted,jmathies --HG-- extra : rebase_source : 2e1d8d0ae697515994b718634f8f8ae9b26b8d80 --- gfx/layers/d3d9/CompositorD3D9.cpp | 1 - hal/windows/WindowsGamepad.cpp | 19 ++++++++++--------- ipc/chromium/src/base/waitable_event_win.cc | 2 +- widget/windows/KeyboardLayout.cpp | 6 +++--- widget/windows/WindowHook.cpp | 2 +- widget/windows/nsDragService.cpp | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gfx/layers/d3d9/CompositorD3D9.cpp b/gfx/layers/d3d9/CompositorD3D9.cpp index c8b1515a5307..be92764754ce 100644 --- a/gfx/layers/d3d9/CompositorD3D9.cpp +++ b/gfx/layers/d3d9/CompositorD3D9.cpp @@ -489,7 +489,6 @@ CompositorD3D9::SetMask(const EffectChain &aEffectChain, uint32_t aMaskTexture) TextureSourceD3D9 *source = maskEffect->mMaskTexture->AsSourceD3D9(); - MOZ_ASSERT(aMaskTexture >= 0); device()->SetTexture(aMaskTexture, source->GetD3D9Texture()); const gfx::Matrix4x4& maskTransform = maskEffect->mMaskTransform; diff --git a/hal/windows/WindowsGamepad.cpp b/hal/windows/WindowsGamepad.cpp index a1266c97a37e..3419971d0906 100644 --- a/hal/windows/WindowsGamepad.cpp +++ b/hal/windows/WindowsGamepad.cpp @@ -50,6 +50,8 @@ const uint32_t kDevicesChangedStableDelay = 200; // poll it periodically. 50ms is arbitrarily chosen. const uint32_t kXInputPollInterval = 50; +const UINT kRawInputError = (UINT)-1; + #ifndef XUSER_MAX_COUNT #define XUSER_MAX_COUNT 4 #endif @@ -178,7 +180,7 @@ bool GetPreparsedData(HANDLE handle, nsTArray& data) { UINT size; - if (GetRawInputDeviceInfo(handle, RIDI_PREPARSEDDATA, nullptr, &size) < 0) { + if (GetRawInputDeviceInfo(handle, RIDI_PREPARSEDDATA, nullptr, &size) == kRawInputError) { return false; } data.SetLength(size); @@ -418,13 +420,13 @@ WindowsGamepadService::ScanForRawInputDevices() UINT numDevices; if (GetRawInputDeviceList(nullptr, &numDevices, sizeof(RAWINPUTDEVICELIST)) - == -1) { + == kRawInputError) { return; } nsTArray devices(numDevices); devices.SetLength(numDevices); if (GetRawInputDeviceList(devices.Elements(), &numDevices, - sizeof(RAWINPUTDEVICELIST)) == -1) { + sizeof(RAWINPUTDEVICELIST)) == kRawInputError) { return; } @@ -631,7 +633,7 @@ WindowsGamepadService::GetRawGamepad(HANDLE handle) RID_DEVICE_INFO rdi = {}; UINT size = rdi.cbSize = sizeof(RID_DEVICE_INFO); - if (GetRawInputDeviceInfo(handle, RIDI_DEVICEINFO, &rdi, &size) < 0) { + if (GetRawInputDeviceInfo(handle, RIDI_DEVICEINFO, &rdi, &size) == kRawInputError) { return false; } // Ensure that this is a device we care about @@ -642,14 +644,13 @@ WindowsGamepadService::GetRawGamepad(HANDLE handle) Gamepad gamepad = {}; // Device name is a mostly-opaque string. - if (GetRawInputDeviceInfo(handle, RIDI_DEVICENAME, nullptr, &size) < 0) { + if (GetRawInputDeviceInfo(handle, RIDI_DEVICENAME, nullptr, &size) == kRawInputError) { return false; } nsTArray devname(size); devname.SetLength(size); - if (GetRawInputDeviceInfo(handle, RIDI_DEVICENAME, devname.Elements(), &size) - <= 0) { + if (GetRawInputDeviceInfo(handle, RIDI_DEVICENAME, devname.Elements(), &size) == kRawInputError) { return false; } @@ -667,7 +668,7 @@ WindowsGamepadService::GetRawGamepad(HANDLE handle) size = sizeof(name); nsTArray gamepad_name; HANDLE hid_handle = CreateFile(devname.Elements(), GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, NULL, NULL); + FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); if (hid_handle) { if (mHID.mHidD_GetProductString(hid_handle, &name, size)) { int bytes = WideCharToMultiByte(CP_UTF8, 0, name, -1, nullptr, 0, nullptr, @@ -786,7 +787,7 @@ WindowsGamepadService::HandleRawInput(HRAWINPUT handle) nsTArray data(size); data.SetLength(size); if (GetRawInputData(handle, RID_INPUT, data.Elements(), &size, - sizeof(RAWINPUTHEADER)) < 0) { + sizeof(RAWINPUTHEADER)) == kRawInputError) { return false; } PRAWINPUT raw = reinterpret_cast(data.Elements()); diff --git a/ipc/chromium/src/base/waitable_event_win.cc b/ipc/chromium/src/base/waitable_event_win.cc index ac85c5c80d64..21ee0a900140 100644 --- a/ipc/chromium/src/base/waitable_event_win.cc +++ b/ipc/chromium/src/base/waitable_event_win.cc @@ -86,7 +86,7 @@ size_t WaitableEvent::WaitMany(WaitableEvent** events, size_t count) { WaitForMultipleObjects(count, handles, FALSE, // don't wait for all the objects INFINITE); // no timeout - if (result < WAIT_OBJECT_0 || result >= WAIT_OBJECT_0 + count) { + if (result >= WAIT_OBJECT_0 + count) { NOTREACHED() << "WaitForMultipleObjects failed: " << GetLastError(); return 0; } diff --git a/widget/windows/KeyboardLayout.cpp b/widget/windows/KeyboardLayout.cpp index e248235b9c7c..162e4beffc15 100644 --- a/widget/windows/KeyboardLayout.cpp +++ b/widget/windows/KeyboardLayout.cpp @@ -606,7 +606,7 @@ UniCharsAndModifiers VirtualKey::GetNativeUniChars(ShiftState aShiftState) const { #ifdef DEBUG - if (aShiftState < 0 || aShiftState >= ArrayLength(mShiftStates)) { + if (aShiftState >= ArrayLength(mShiftStates)) { nsPrintfCString warning("Shift state is out of range: " "aShiftState=%d, ArrayLength(mShiftState)=%d", aShiftState, ArrayLength(mShiftStates)); @@ -2259,8 +2259,8 @@ KeyboardLayout::LoadLayout(HKL aLayout) static const UINT kMapType = IsVistaOrLater() ? MAPVK_VSC_TO_VK_EX : MAPVK_VSC_TO_VK; PR_LOG(sKeyboardLayoutLogger, PR_LOG_DEBUG, - ("Logging virtual keycode values for scancode (0x%08X)...", - reinterpret_cast(mKeyboardLayout))); + ("Logging virtual keycode values for scancode (0x%p)...", + mKeyboardLayout)); for (uint32_t i = 0; i < ArrayLength(kExtendedScanCode); i++) { for (uint32_t j = 1; j <= 0xFF; j++) { UINT scanCode = kExtendedScanCode[i] + j; diff --git a/widget/windows/WindowHook.cpp b/widget/windows/WindowHook.cpp index 2c3a533f34bf..8e87a3a55efa 100644 --- a/widget/windows/WindowHook.cpp +++ b/widget/windows/WindowHook.cpp @@ -94,7 +94,7 @@ WindowHook::DeleteIfEmpty(MessageData *data) { MessageDataArray::index_type idx; idx = data - mMessageData.Elements(); - NS_ASSERTION(idx >= 0 && idx < mMessageData.Length(), "Attempted to delete MessageData that doesn't belong to this array!"); + NS_ASSERTION(idx < mMessageData.Length(), "Attempted to delete MessageData that doesn't belong to this array!"); mMessageData.RemoveElementAt(idx); } diff --git a/widget/windows/nsDragService.cpp b/widget/windows/nsDragService.cpp index 4d9016d612b8..96c7c1c7a20d 100644 --- a/widget/windows/nsDragService.cpp +++ b/widget/windows/nsDragService.cpp @@ -424,7 +424,7 @@ nsDragService::GetData(nsITransferable * aTransferable, uint32_t anItem) // multiple items, use |anItem| as an index into our collection nsDataObjCollection * dataObjCol = GetDataObjCollection(mDataObject); uint32_t cnt = dataObjCol->GetNumDataObjects(); - if (anItem >= 0 && anItem < cnt) { + if (anItem < cnt) { IDataObject * dataObj = dataObjCol->GetDataObjectAt(anItem); dataFound = nsClipboard::GetDataFromDataObject(dataObj, 0, nullptr, aTransferable); From 0193598bf5ebbf78f466f08b2b20fef83e7ce98c Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 2 Sep 2014 11:10:12 +0200 Subject: [PATCH 027/139] Bug 286355 - Fixed char16_t/wchar_t mismatch for mingw. --HG-- extra : rebase_source : 285d1e36261ceab4cdf1be09024c4b7dbf907fd9 --- profile/dirserviceprovider/ProfileUnlockerWin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profile/dirserviceprovider/ProfileUnlockerWin.cpp b/profile/dirserviceprovider/ProfileUnlockerWin.cpp index 705ee8524b2b..02634960f3f7 100644 --- a/profile/dirserviceprovider/ProfileUnlockerWin.cpp +++ b/profile/dirserviceprovider/ProfileUnlockerWin.cpp @@ -82,7 +82,7 @@ ProfileUnlockerWin::Init() return NS_ERROR_ILLEGAL_VALUE; } - nsModuleHandle module(::LoadLibraryW(MOZ_UTF16("Rstrtmgr.dll"))); + nsModuleHandle module(::LoadLibraryW(L"Rstrtmgr.dll")); if (!module) { return NS_ERROR_NOT_AVAILABLE; } @@ -110,7 +110,7 @@ ProfileUnlockerWin::Init() mQueryFullProcessImageName = reinterpret_cast(::GetProcAddress( - ::GetModuleHandleW(MOZ_UTF16("kernel32.dll")), + ::GetModuleHandleW(L"kernel32.dll"), "QueryFullProcessImageNameW")); if (!mQueryFullProcessImageName) { return NS_ERROR_NOT_AVAILABLE; From 8f22177f6f0b92984368399bd70d670b1086d6af Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Tue, 2 Sep 2014 11:13:44 +0200 Subject: [PATCH 028/139] Bug 1059498 - Use the inner dirty rect when initializing the visible rect of display items inside the SVG filter stacking context. r=roc --- layout/generic/nsFrame.cpp | 12 +++++----- layout/reftests/bugs/1059498-1-ref.html | 20 ++++++++++++++++ layout/reftests/bugs/1059498-1.html | 32 +++++++++++++++++++++++++ layout/reftests/bugs/reftest.list | 1 + 4 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 layout/reftests/bugs/1059498-1-ref.html create mode 100644 layout/reftests/bugs/1059498-1.html diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 73ce24e01185..a72cb8eea925 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -1959,9 +1959,14 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder, inTransform = true; } + bool usingSVGEffects = nsSVGIntegrationUtils::UsingEffectsForFrame(this); + if (usingSVGEffects) { + dirtyRect = + nsSVGIntegrationUtils::GetRequiredSourceForInvalidArea(this, dirtyRect); + } + bool useOpacity = HasVisualOpacity() && !nsSVGUtils::CanOptimizeOpacity(this); bool useBlendMode = disp->mMixBlendMode != NS_STYLE_BLEND_NORMAL; - bool usingSVGEffects = nsSVGIntegrationUtils::UsingEffectsForFrame(this); bool useStickyPosition = disp->mPosition == NS_STYLE_POSITION_STICKY && IsScrollFrameActive(nsLayoutUtils::GetNearestScrollableFrame(GetParent(), nsLayoutUtils::SCROLLABLE_SAME_DOC | @@ -1987,11 +1992,6 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder, inTransformSetter(aBuilder, inTransform); CheckForTouchEventHandler(aBuilder, this); - if (usingSVGEffects) { - dirtyRect = - nsSVGIntegrationUtils::GetRequiredSourceForInvalidArea(this, dirtyRect); - } - nsRect clipPropClip; if (ApplyClipPropClipping(aBuilder, this, disp, &clipPropClip, nestedClipState)) { diff --git a/layout/reftests/bugs/1059498-1-ref.html b/layout/reftests/bugs/1059498-1-ref.html new file mode 100644 index 000000000000..f7ece299c584 --- /dev/null +++ b/layout/reftests/bugs/1059498-1-ref.html @@ -0,0 +1,20 @@ + + + +Test for bug 1059498 - Paint parts of the filter that are caused by parts of the source that are invisible + + + +
diff --git a/layout/reftests/bugs/1059498-1.html b/layout/reftests/bugs/1059498-1.html new file mode 100644 index 000000000000..4e3930bdbd5d --- /dev/null +++ b/layout/reftests/bugs/1059498-1.html @@ -0,0 +1,32 @@ + + + +Test for bug 1059498 - Paint parts of the filter that are caused by parts of the source that are invisible + + + +
+ + + + + + + + diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index 0790810daee8..eafcd03eaf9f 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -1830,3 +1830,4 @@ pref(browser.display.use_document_fonts,0) == 1022481-1.html 1022481-1-ref.html == 1053035-1-flex.html 1053035-1-ref.html test-pref(layout.css.grid.enabled,true) == 1053035-1-grid.html 1053035-1-ref.html == 1059167-1.html 1059167-1-ref.html +== 1059498-1.html 1059498-1-ref.html From c8b6ed281bbca9e62a99e0a4390c7b48ec3b52bc Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Sat, 30 Aug 2014 00:23:25 +1200 Subject: [PATCH 029/139] Bug 967844. Part 1: Move mBackgroundColor from Layer to FrameMetrics. r=kats --HG-- extra : rebase_source : d7cf8756678cc342e1d648638dd867c5479b74ba --- gfx/ipc/GfxMessageUtils.h | 4 +++- gfx/layers/FrameMetrics.h | 18 +++++++++++++++++- gfx/layers/Layers.cpp | 3 +-- gfx/layers/Layers.h | 14 -------------- .../composite/ContainerLayerComposite.cpp | 3 ++- gfx/layers/composite/TiledContentHost.cpp | 6 +++--- gfx/layers/ipc/LayerTransactionParent.cpp | 1 - gfx/layers/ipc/LayersMessages.ipdlh | 1 - gfx/layers/ipc/ShadowLayers.cpp | 1 - layout/base/nsDisplayList.cpp | 10 +++++----- 10 files changed, 31 insertions(+), 30 deletions(-) diff --git a/gfx/ipc/GfxMessageUtils.h b/gfx/ipc/GfxMessageUtils.h index 865e93938935..9d7e71629d19 100644 --- a/gfx/ipc/GfxMessageUtils.h +++ b/gfx/ipc/GfxMessageUtils.h @@ -753,6 +753,7 @@ struct ParamTraits WriteParam(aMsg, aParam.mUpdateScrollOffset); WriteParam(aMsg, aParam.mScrollGeneration); WriteParam(aMsg, aParam.mTransformScale); + WriteParam(aMsg, aParam.mBackgroundColor); } static bool Read(const Message* aMsg, void** aIter, paramType* aResult) @@ -779,7 +780,8 @@ struct ParamTraits ReadParam(aMsg, aIter, &aResult->mHasScrollgrab) && ReadParam(aMsg, aIter, &aResult->mUpdateScrollOffset) && ReadParam(aMsg, aIter, &aResult->mScrollGeneration) && - ReadParam(aMsg, aIter, &aResult->mTransformScale)); + ReadParam(aMsg, aIter, &aResult->mTransformScale) && + ReadParam(aMsg, aIter, &aResult->mBackgroundColor)); } }; diff --git a/gfx/layers/FrameMetrics.h b/gfx/layers/FrameMetrics.h index bcf5e43b73f6..8acd74aca769 100644 --- a/gfx/layers/FrameMetrics.h +++ b/gfx/layers/FrameMetrics.h @@ -12,6 +12,7 @@ #include "mozilla/gfx/Rect.h" // for RoundedIn #include "mozilla/gfx/ScaleFactor.h" // for ScaleFactor #include "mozilla/gfx/Logging.h" // for Log +#include "gfxColor.h" namespace IPC { template struct ParamTraits; @@ -97,6 +98,7 @@ public: , mUseDisplayPortMargins(false) , mPresShellId(-1) , mViewport(0, 0, 0, 0) + , mBackgroundColor(0, 0, 0, 0) {} // Default copy ctor and operator= are fine @@ -122,7 +124,8 @@ public: mScrollParentId == aOther.mScrollParentId && mScrollOffset == aOther.mScrollOffset && mHasScrollgrab == aOther.mHasScrollgrab && - mUpdateScrollOffset == aOther.mUpdateScrollOffset; + mUpdateScrollOffset == aOther.mUpdateScrollOffset && + mBackgroundColor == aOther.mBackgroundColor; } bool operator!=(const FrameMetrics& aOther) const { @@ -467,6 +470,16 @@ public: return mViewport; } + const gfxRGBA& GetBackgroundColor() const + { + return mBackgroundColor; + } + + void SetBackgroundColor(const gfxRGBA& aBackgroundColor) + { + mBackgroundColor = aBackgroundColor; + } + private: // New fields from now on should be made private and old fields should // be refactored to be private. @@ -535,6 +548,9 @@ private: // iframe. For layers that don't correspond to a document, this metric is // meaningless and invalid. CSSRect mViewport; + + // The background color to use when overscrolling. + gfxRGBA mBackgroundColor; }; /** diff --git a/gfx/layers/Layers.cpp b/gfx/layers/Layers.cpp index 47283390f8bc..f83cf124dba7 100644 --- a/gfx/layers/Layers.cpp +++ b/gfx/layers/Layers.cpp @@ -209,8 +209,7 @@ Layer::Layer(LayerManager* aManager, void* aImplData) : mScrollbarTargetId(FrameMetrics::NULL_SCROLL_ID), mScrollbarDirection(ScrollDirection::NONE), mDebugColorIndex(0), - mAnimationGeneration(0), - mBackgroundColor(0, 0, 0, 0) + mAnimationGeneration(0) {} Layer::~Layer() diff --git a/gfx/layers/Layers.h b/gfx/layers/Layers.h index 305a30fd6f9b..c4b1e259fe58 100644 --- a/gfx/layers/Layers.h +++ b/gfx/layers/Layers.h @@ -1171,17 +1171,6 @@ public: } } - void SetBackgroundColor(const gfxRGBA& aColor) - { - if (mBackgroundColor == aColor) { - return; - } - - MOZ_LAYERS_LOG_IF_SHADOWABLE(this, ("Layer::Mutated(%p) BackgroundColor", this)); - mBackgroundColor = aColor; - Mutated(); - } - void SetContentDescription(const std::string& aContentDescription) { if (mContentDescription == aContentDescription) { @@ -1226,7 +1215,6 @@ public: FrameMetrics::ViewID GetScrollbarTargetContainerId() { return mScrollbarTargetId; } ScrollDirection GetScrollbarDirection() { return mScrollbarDirection; } Layer* GetMaskLayer() const { return mMaskLayer; } - gfxRGBA GetBackgroundColor() const { return mBackgroundColor; } const std::string& GetContentDescription() const { return mContentDescription; } @@ -1655,8 +1643,6 @@ protected: // If this layer is used for OMTA, then this counter is used to ensure we // stay in sync with the animation manager uint64_t mAnimationGeneration; - // This is currently set and used only for scrollable container layers. - gfxRGBA mBackgroundColor; // A description of the content element corresponding to this frame. // This is empty unless this is a scrollable ContainerLayer and the // apz.printtree pref is turned on. diff --git a/gfx/layers/composite/ContainerLayerComposite.cpp b/gfx/layers/composite/ContainerLayerComposite.cpp index babbbd2e0765..4396c1d88c29 100644 --- a/gfx/layers/composite/ContainerLayerComposite.cpp +++ b/gfx/layers/composite/ContainerLayerComposite.cpp @@ -268,15 +268,16 @@ RenderLayers(ContainerT* aContainer, // placeholder for APZ purposes. if (aContainer->HasScrollableFrameMetrics() && !aContainer->IsScrollInfoLayer()) { bool overscrolled = false; + gfxRGBA color; for (uint32_t i = 0; i < aContainer->GetFrameMetricsCount(); i++) { AsyncPanZoomController* apzc = aContainer->GetAsyncPanZoomController(i); if (apzc && apzc->IsOverscrolled()) { overscrolled = true; + color = aContainer->GetFrameMetrics(i).GetBackgroundColor(); break; } } if (overscrolled) { - gfxRGBA color = aContainer->GetBackgroundColor(); // If the background is completely transparent, there's no point in // drawing anything for it. Hopefully the layers behind, if any, will // provide suitable content for the overscroll effect. diff --git a/gfx/layers/composite/TiledContentHost.cpp b/gfx/layers/composite/TiledContentHost.cpp index 02b97205e7f0..49d9bbfdc19e 100644 --- a/gfx/layers/composite/TiledContentHost.cpp +++ b/gfx/layers/composite/TiledContentHost.cpp @@ -367,9 +367,9 @@ TiledContentHost::Composite(EffectChain& aEffectChain, if (aOpacity == 1.0f && gfxPrefs::LowPrecisionOpacity() < 1.0f) { // Background colors are only stored on scrollable layers. Grab // the one from the nearest scrollable ancestor layer. - for (Layer* ancestor = GetLayer(); ancestor; ancestor = ancestor->GetParent()) { - if (ancestor->HasScrollableFrameMetrics()) { - backgroundColor = ancestor->GetBackgroundColor(); + for (LayerMetricsWrapper ancestor(GetLayer(), LayerMetricsWrapper::StartAt::BOTTOM); ancestor; ancestor = ancestor.GetParent()) { + if (ancestor.Metrics().IsScrollable()) { + backgroundColor = ancestor.Metrics().GetBackgroundColor(); break; } } diff --git a/gfx/layers/ipc/LayerTransactionParent.cpp b/gfx/layers/ipc/LayerTransactionParent.cpp index 6ae7f85f8e53..0a027df6bacf 100644 --- a/gfx/layers/ipc/LayerTransactionParent.cpp +++ b/gfx/layers/ipc/LayerTransactionParent.cpp @@ -321,7 +321,6 @@ LayerTransactionParent::RecvUpdate(const InfallibleTArray& cset, layer->SetAnimations(common.animations()); layer->SetInvalidRegion(common.invalidRegion()); layer->SetFrameMetrics(common.metrics()); - layer->SetBackgroundColor(common.backgroundColor().value()); layer->SetContentDescription(common.contentDescription()); typedef SpecificLayerAttributes Specific; diff --git a/gfx/layers/ipc/LayersMessages.ipdlh b/gfx/layers/ipc/LayersMessages.ipdlh index 4ba3cd8b72fb..cc956f97c58c 100644 --- a/gfx/layers/ipc/LayersMessages.ipdlh +++ b/gfx/layers/ipc/LayersMessages.ipdlh @@ -216,7 +216,6 @@ struct CommonLayerAttributes { Animation[] animations; nsIntRegion invalidRegion; FrameMetrics[] metrics; - LayerColor backgroundColor; string contentDescription; }; diff --git a/gfx/layers/ipc/ShadowLayers.cpp b/gfx/layers/ipc/ShadowLayers.cpp index 5e9ce6437206..fcbce592d22c 100644 --- a/gfx/layers/ipc/ShadowLayers.cpp +++ b/gfx/layers/ipc/ShadowLayers.cpp @@ -609,7 +609,6 @@ ShadowLayerForwarder::EndTransaction(InfallibleTArray* aReplies, common.animations() = mutant->GetAnimations(); common.invalidRegion() = mutant->GetInvalidRegion(); common.metrics() = mutant->GetAllFrameMetrics(); - common.backgroundColor() = mutant->GetBackgroundColor(); common.contentDescription() = mutant->GetContentDescription(); attrs.specific() = null_t(); mutant->FillSpecificAttributes(attrs.specific()); diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index e2559f44068f..b7670380e103 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -848,20 +848,20 @@ static void RecordFrameMetrics(nsIFrame* aForFrame, metrics.SetHasScrollgrab(true); } - aRoot->SetFrameMetrics(metrics); - - // Also compute and set the background color on the container. + // Also compute and set the background color. // This is needed for APZ overscrolling support. if (aScrollFrame) { if (isRootScrollFrame) { - aRoot->SetBackgroundColor(presShell->GetCanvasBackground()); + metrics.SetBackgroundColor(presShell->GetCanvasBackground()); } else { nsStyleContext* backgroundStyle; if (nsCSSRendering::FindBackground(aScrollFrame, &backgroundStyle)) { - aRoot->SetBackgroundColor(backgroundStyle->StyleBackground()->mBackgroundColor); + metrics.SetBackgroundColor(backgroundStyle->StyleBackground()->mBackgroundColor); } } } + + aRoot->SetFrameMetrics(metrics); } nsDisplayListBuilder::~nsDisplayListBuilder() { From 021e1aa7f6b9481df4755b1e4f487c4066641736 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Sat, 30 Aug 2014 00:23:25 +1200 Subject: [PATCH 030/139] Bug 967844. Part 2: Move mContentDescription from Layer to FrameMetrics. r=kats --HG-- extra : rebase_source : b616a0ab2e5bb203a66a5f0b3644bdcbe5f17ce7 --- gfx/ipc/GfxMessageUtils.h | 14 ++++++++++++- gfx/layers/FrameMetrics.h | 25 +++++++++++++++++++++-- gfx/layers/LayerMetricsWrapper.h | 7 ------- gfx/layers/Layers.h | 16 --------------- gfx/layers/apz/src/APZCTreeManager.cpp | 2 +- gfx/layers/ipc/LayerTransactionParent.cpp | 1 - gfx/layers/ipc/ShadowLayers.cpp | 1 - layout/base/nsDisplayList.cpp | 2 +- 8 files changed, 38 insertions(+), 30 deletions(-) diff --git a/gfx/ipc/GfxMessageUtils.h b/gfx/ipc/GfxMessageUtils.h index 9d7e71629d19..a929dbb1811b 100644 --- a/gfx/ipc/GfxMessageUtils.h +++ b/gfx/ipc/GfxMessageUtils.h @@ -754,6 +754,17 @@ struct ParamTraits WriteParam(aMsg, aParam.mScrollGeneration); WriteParam(aMsg, aParam.mTransformScale); WriteParam(aMsg, aParam.mBackgroundColor); + WriteParam(aMsg, aParam.GetContentDescription()); + } + + static bool ReadContentDescription(const Message* aMsg, void** aIter, paramType* aResult) + { + nsCString str; + if (!ReadParam(aMsg, aIter, &str)) { + return false; + } + aResult->SetContentDescription(str); + return true; } static bool Read(const Message* aMsg, void** aIter, paramType* aResult) @@ -781,7 +792,8 @@ struct ParamTraits ReadParam(aMsg, aIter, &aResult->mUpdateScrollOffset) && ReadParam(aMsg, aIter, &aResult->mScrollGeneration) && ReadParam(aMsg, aIter, &aResult->mTransformScale) && - ReadParam(aMsg, aIter, &aResult->mBackgroundColor)); + ReadParam(aMsg, aIter, &aResult->mBackgroundColor) && + ReadContentDescription(aMsg, aIter, aResult)); } }; diff --git a/gfx/layers/FrameMetrics.h b/gfx/layers/FrameMetrics.h index 8acd74aca769..ea4e72f0bf3d 100644 --- a/gfx/layers/FrameMetrics.h +++ b/gfx/layers/FrameMetrics.h @@ -13,6 +13,7 @@ #include "mozilla/gfx/ScaleFactor.h" // for ScaleFactor #include "mozilla/gfx/Logging.h" // for Log #include "gfxColor.h" +#include "nsString.h" namespace IPC { template struct ParamTraits; @@ -99,7 +100,9 @@ public: , mPresShellId(-1) , mViewport(0, 0, 0, 0) , mBackgroundColor(0, 0, 0, 0) - {} + { + mContentDescription[0] = '\0'; + } // Default copy ctor and operator= are fine @@ -125,7 +128,8 @@ public: mScrollOffset == aOther.mScrollOffset && mHasScrollgrab == aOther.mHasScrollgrab && mUpdateScrollOffset == aOther.mUpdateScrollOffset && - mBackgroundColor == aOther.mBackgroundColor; + mBackgroundColor == aOther.mBackgroundColor && + !strcmp(mContentDescription, aOther.mContentDescription); } bool operator!=(const FrameMetrics& aOther) const { @@ -480,6 +484,18 @@ public: mBackgroundColor = aBackgroundColor; } + nsCString GetContentDescription() const + { + return nsCString(mContentDescription); + } + + void SetContentDescription(const nsCString& aContentDescription) + { + strncpy(mContentDescription, aContentDescription.get(), + sizeof(mContentDescription)); + mContentDescription[sizeof(mContentDescription) - 1] = 0; + } + private: // New fields from now on should be made private and old fields should // be refactored to be private. @@ -551,6 +567,11 @@ private: // The background color to use when overscrolling. gfxRGBA mBackgroundColor; + + // A description of the content element corresponding to this frame. + // This is empty unless this is a scrollable ContainerLayer and the + // apz.printtree pref is turned on. + char mContentDescription[20]; }; /** diff --git a/gfx/layers/LayerMetricsWrapper.h b/gfx/layers/LayerMetricsWrapper.h index 40b6d6dbbf4f..384c28437849 100644 --- a/gfx/layers/LayerMetricsWrapper.h +++ b/gfx/layers/LayerMetricsWrapper.h @@ -328,13 +328,6 @@ public: return mLayer->GetClipRect(); } - const std::string& GetContentDescription() const - { - MOZ_ASSERT(IsValid()); - - return mLayer->GetContentDescription(); - } - // Expose an opaque pointer to the layer. Mostly used for printf // purposes. This is not intended to be a general-purpose accessor // for the underlying layer. diff --git a/gfx/layers/Layers.h b/gfx/layers/Layers.h index c4b1e259fe58..590b69a5eafc 100644 --- a/gfx/layers/Layers.h +++ b/gfx/layers/Layers.h @@ -1171,17 +1171,6 @@ public: } } - void SetContentDescription(const std::string& aContentDescription) - { - if (mContentDescription == aContentDescription) { - return; - } - - MOZ_LAYERS_LOG_IF_SHADOWABLE(this, ("Layer::Mutated(%p) ContentDescription", this)); - mContentDescription = aContentDescription; - Mutated(); - } - // These getters can be used anytime. float GetOpacity() { return mOpacity; } gfx::CompositionOp GetMixBlendMode() const { return mMixBlendMode; } @@ -1215,7 +1204,6 @@ public: FrameMetrics::ViewID GetScrollbarTargetContainerId() { return mScrollbarTargetId; } ScrollDirection GetScrollbarDirection() { return mScrollbarDirection; } Layer* GetMaskLayer() const { return mMaskLayer; } - const std::string& GetContentDescription() const { return mContentDescription; } // Note that all lengths in animation data are either in CSS pixels or app @@ -1643,10 +1631,6 @@ protected: // If this layer is used for OMTA, then this counter is used to ensure we // stay in sync with the animation manager uint64_t mAnimationGeneration; - // A description of the content element corresponding to this frame. - // This is empty unless this is a scrollable ContainerLayer and the - // apz.printtree pref is turned on. - std::string mContentDescription; #ifdef MOZ_DUMP_PAINTING nsTArray mExtraDumpInfo; #endif diff --git a/gfx/layers/apz/src/APZCTreeManager.cpp b/gfx/layers/apz/src/APZCTreeManager.cpp index 167d7ce4d23f..9fd2e71ee55a 100644 --- a/gfx/layers/apz/src/APZCTreeManager.cpp +++ b/gfx/layers/apz/src/APZCTreeManager.cpp @@ -308,7 +308,7 @@ APZCTreeManager::PrepareAPZCForLayer(const LayerMetricsWrapper& aLayer, << "\tsr=" << aMetrics.mScrollableRect << (aLayer.GetVisibleRegion().IsEmpty() ? "\tscrollinfo" : "") << (apzc->HasScrollgrab() ? "\tscrollgrab" : "") - << "\t" << aLayer.GetContentDescription(); + << "\t" << aMetrics.GetContentDescription().get(); // Bind the APZC instance into the tree of APZCs if (aNextSibling) { diff --git a/gfx/layers/ipc/LayerTransactionParent.cpp b/gfx/layers/ipc/LayerTransactionParent.cpp index 0a027df6bacf..90fb6c87f8c2 100644 --- a/gfx/layers/ipc/LayerTransactionParent.cpp +++ b/gfx/layers/ipc/LayerTransactionParent.cpp @@ -321,7 +321,6 @@ LayerTransactionParent::RecvUpdate(const InfallibleTArray& cset, layer->SetAnimations(common.animations()); layer->SetInvalidRegion(common.invalidRegion()); layer->SetFrameMetrics(common.metrics()); - layer->SetContentDescription(common.contentDescription()); typedef SpecificLayerAttributes Specific; const SpecificLayerAttributes& specific = attrs.specific(); diff --git a/gfx/layers/ipc/ShadowLayers.cpp b/gfx/layers/ipc/ShadowLayers.cpp index fcbce592d22c..ce56878b1223 100644 --- a/gfx/layers/ipc/ShadowLayers.cpp +++ b/gfx/layers/ipc/ShadowLayers.cpp @@ -609,7 +609,6 @@ ShadowLayerForwarder::EndTransaction(InfallibleTArray* aReplies, common.animations() = mutant->GetAnimations(); common.invalidRegion() = mutant->GetInvalidRegion(); common.metrics() = mutant->GetAllFrameMetrics(); - common.contentDescription() = mutant->GetContentDescription(); attrs.specific() = null_t(); mutant->FillSpecificAttributes(attrs.specific()); diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index b7670380e103..32b707ce675e 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -835,7 +835,7 @@ static void RecordFrameMetrics(nsIFrame* aForFrame, if (nsIContent* content = frameForCompositionBoundsCalculation->GetContent()) { nsAutoString contentDescription; content->Describe(contentDescription); - aRoot->SetContentDescription(NS_LossyConvertUTF16toASCII(contentDescription).get()); + metrics.SetContentDescription(NS_LossyConvertUTF16toASCII(contentDescription)); } } From bd45e1d4aa80686c5df465c0c3edd6f4158a3de3 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Sun, 31 Aug 2014 15:29:24 +1200 Subject: [PATCH 031/139] Bug 967844. Part 3: Setup FrameMetrics from FrameLayerBuilder based on animated geometry roots. r=mattwoodrow --HG-- extra : rebase_source : 19593cafc17053d450905161fa7d4ce8721c58a0 --- dom/base/nsDOMWindowUtils.cpp | 45 ++---- gfx/layers/LayersLogging.cpp | 1 + gfx/layers/ipc/LayerTransactionParent.cpp | 35 +++-- gfx/layers/ipc/LayerTransactionParent.h | 2 +- gfx/layers/ipc/PLayerTransaction.ipdl | 6 +- layout/base/FrameLayerBuilder.cpp | 134 +++++++++++++++--- layout/base/nsDisplayList.cpp | 113 ++++++++------- layout/base/nsDisplayList.h | 26 +++- layout/generic/nsGfxScrollFrame.cpp | 45 +++++- layout/generic/nsGfxScrollFrame.h | 25 ++++ layout/generic/nsIScrollableFrame.h | 19 +++ .../async-scrolling/nested-1-ref.html | 10 ++ layout/reftests/async-scrolling/nested-1.html | 17 +++ layout/reftests/async-scrolling/reftest.list | 36 +++-- .../async-scrolling/split-layers-1-ref.html | 13 ++ .../async-scrolling/split-layers-1.html | 16 +++ .../split-layers-multi-scrolling-1-ref.html | 14 ++ .../split-layers-multi-scrolling-1.html | 19 +++ .../split-opacity-layers-1-ref.html | 12 ++ .../split-opacity-layers-1.html | 15 ++ modules/libpref/init/all.js | 3 + 21 files changed, 472 insertions(+), 134 deletions(-) create mode 100644 layout/reftests/async-scrolling/nested-1-ref.html create mode 100644 layout/reftests/async-scrolling/nested-1.html create mode 100644 layout/reftests/async-scrolling/split-layers-1-ref.html create mode 100644 layout/reftests/async-scrolling/split-layers-1.html create mode 100644 layout/reftests/async-scrolling/split-layers-multi-scrolling-1-ref.html create mode 100644 layout/reftests/async-scrolling/split-layers-multi-scrolling-1.html create mode 100644 layout/reftests/async-scrolling/split-opacity-layers-1-ref.html create mode 100644 layout/reftests/async-scrolling/split-opacity-layers-1.html diff --git a/dom/base/nsDOMWindowUtils.cpp b/dom/base/nsDOMWindowUtils.cpp index 00fd2d159580..311d2fb57a85 100644 --- a/dom/base/nsDOMWindowUtils.cpp +++ b/dom/base/nsDOMWindowUtils.cpp @@ -2670,48 +2670,23 @@ nsDOMWindowUtils::SetAsyncScrollOffset(nsIDOMNode* aNode, if (!element) { return NS_ERROR_INVALID_ARG; } - nsIFrame* frame = element->GetPrimaryFrame(); - if (!frame) { - return NS_ERROR_UNEXPECTED; - } - nsIScrollableFrame* scrollable = do_QueryFrame(frame); - nsPresContext* presContext = frame->PresContext(); - nsIFrame* rootScrollFrame = presContext->PresShell()->GetRootScrollFrame(); - if (!scrollable) { - if (rootScrollFrame && rootScrollFrame->GetContent() == element) { - frame = rootScrollFrame; - scrollable = do_QueryFrame(frame); - } - } - if (!scrollable) { - return NS_ERROR_UNEXPECTED; - } - Layer* layer = FrameLayerBuilder::GetDedicatedLayer(scrollable->GetScrolledFrame(), - nsDisplayItem::TYPE_SCROLL_LAYER); - if (!layer) { - if (rootScrollFrame == frame && !presContext->GetParentPresContext()) { - nsIWidget* widget = GetWidget(); - if (widget) { - LayerManager* manager = widget->GetLayerManager(); - if (manager) { - layer = manager->GetRoot(); - } - } - } - if (!layer) { - return NS_ERROR_UNEXPECTED; - } - } FrameMetrics::ViewID viewId; if (!nsLayoutUtils::FindIDFor(element, &viewId)) { return NS_ERROR_UNEXPECTED; } - ShadowLayerForwarder* forwarder = layer->Manager()->AsShadowForwarder(); + nsIWidget* widget = GetWidget(); + if (!widget) { + return NS_ERROR_FAILURE; + } + LayerManager* manager = widget->GetLayerManager(); + if (!manager) { + return NS_ERROR_FAILURE; + } + ShadowLayerForwarder* forwarder = manager->AsShadowForwarder(); if (!forwarder || !forwarder->HasShadowManager()) { return NS_ERROR_UNEXPECTED; } - forwarder->GetShadowManager()->SendSetAsyncScrollOffset( - layer->AsShadowableLayer()->GetShadow(), viewId, aX, aY); + forwarder->GetShadowManager()->SendSetAsyncScrollOffset(viewId, aX, aY); return NS_OK; } diff --git a/gfx/layers/LayersLogging.cpp b/gfx/layers/LayersLogging.cpp index 546fa33aedba..3c0b251af69d 100644 --- a/gfx/layers/LayersLogging.cpp +++ b/gfx/layers/LayersLogging.cpp @@ -123,6 +123,7 @@ AppendToString(std::stringstream& aStream, const FrameMetrics& m, AppendToString(aStream, m.GetScrollOffset(), " s="); AppendToString(aStream, m.mDisplayPort, " dp="); AppendToString(aStream, m.mCriticalDisplayPort, " cdp="); + AppendToString(aStream, m.GetBackgroundColor(), " color="); if (!detailed) { AppendToString(aStream, m.GetScrollId(), " scrollId="); if (m.GetScrollParentId() != FrameMetrics::NULL_SCROLL_ID) { diff --git a/gfx/layers/ipc/LayerTransactionParent.cpp b/gfx/layers/ipc/LayerTransactionParent.cpp index 90fb6c87f8c2..dde422e238fb 100644 --- a/gfx/layers/ipc/LayerTransactionParent.cpp +++ b/gfx/layers/ipc/LayerTransactionParent.cpp @@ -687,26 +687,35 @@ LayerTransactionParent::RecvGetAnimationTransform(PLayerParent* aParent, return true; } +static AsyncPanZoomController* +GetAPZCForViewID(Layer* aLayer, FrameMetrics::ViewID aScrollID) +{ + for (uint32_t i = 0; i < aLayer->GetFrameMetricsCount(); i++) { + if (aLayer->GetFrameMetrics(i).GetScrollId() == aScrollID) { + return aLayer->GetAsyncPanZoomController(i); + } + } + ContainerLayer* container = aLayer->AsContainerLayer(); + if (container) { + for (Layer* l = container->GetFirstChild(); l; l = l->GetNextSibling()) { + AsyncPanZoomController* c = GetAPZCForViewID(l, aScrollID); + if (c) { + return c; + } + } + } + return nullptr; +} + bool -LayerTransactionParent::RecvSetAsyncScrollOffset(PLayerParent* aLayer, - const FrameMetrics::ViewID& aId, +LayerTransactionParent::RecvSetAsyncScrollOffset(const FrameMetrics::ViewID& aScrollID, const int32_t& aX, const int32_t& aY) { if (mDestroyed || !layer_manager() || layer_manager()->IsDestroyed()) { return false; } - Layer* layer = cast(aLayer)->AsLayer(); - if (!layer) { - return false; - } - AsyncPanZoomController* controller = nullptr; - for (uint32_t i = 0; i < layer->GetFrameMetricsCount(); i++) { - if (layer->GetFrameMetrics(i).GetScrollId() == aId) { - controller = layer->GetAsyncPanZoomController(i); - break; - } - } + AsyncPanZoomController* controller = GetAPZCForViewID(mRoot, aScrollID); if (!controller) { return false; } diff --git a/gfx/layers/ipc/LayerTransactionParent.h b/gfx/layers/ipc/LayerTransactionParent.h index b2ae66620583..fef3c3b876f7 100644 --- a/gfx/layers/ipc/LayerTransactionParent.h +++ b/gfx/layers/ipc/LayerTransactionParent.h @@ -126,7 +126,7 @@ protected: virtual bool RecvGetAnimationTransform(PLayerParent* aParent, MaybeTransform* aTransform) MOZ_OVERRIDE; - virtual bool RecvSetAsyncScrollOffset(PLayerParent* aLayer, const FrameMetrics::ViewID& aId, + virtual bool RecvSetAsyncScrollOffset(const FrameMetrics::ViewID& aId, const int32_t& aX, const int32_t& aY) MOZ_OVERRIDE; virtual bool RecvGetAPZTestData(APZTestData* aOutData); diff --git a/gfx/layers/ipc/PLayerTransaction.ipdl b/gfx/layers/ipc/PLayerTransaction.ipdl index 33872880a780..e5e72ca67549 100644 --- a/gfx/layers/ipc/PLayerTransaction.ipdl +++ b/gfx/layers/ipc/PLayerTransaction.ipdl @@ -81,10 +81,10 @@ parent: // be void_t. sync GetAnimationTransform(PLayer layer) returns (MaybeTransform transform); - // The next time this layer is composited, add this async scroll offset in - // CSS pixels. + // The next time the layer tree is composited, add this async scroll offset in + // CSS pixels for the given ViewID. // Useful for testing rendering of async scrolling. - async SetAsyncScrollOffset(PLayer layer, ViewID id, int32_t x, int32_t y); + async SetAsyncScrollOffset(ViewID id, int32_t x, int32_t y); // Drop any front buffers that might be retained on the compositor // side. diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index 25bb56090bf6..1e523f688386 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -259,6 +259,7 @@ public: mNeedComponentAlpha(false), mForceTransparentSurface(false), mHideAllLayersBelow(false), + mOpaqueForAnimatedGeometryRootParent(false), mImage(nullptr), mCommonClipCount(-1), mNewChildLayersIndex(-1), @@ -458,6 +459,13 @@ public: * Set if all layers below this ThebesLayer should be hidden. */ bool mHideAllLayersBelow; + /** + * Set if the opaque region for this layer can be applied to the parent + * animated geometry root of this layer's animated geometry root. + * We set this when a ThebesLayer's animated geometry root is a scrollframe + * and the ThebesLayer completely fills the displayport of the scrollframe. + */ + bool mOpaqueForAnimatedGeometryRootParent; /** * Stores the pointer to the nsDisplayImage if we want to @@ -532,6 +540,9 @@ struct NewLayerEntry { nsRefPtr mLayer; const nsIFrame* mAnimatedGeometryRoot; const nsIFrame* mFixedPosFrameForLayerData; + // If non-null, this FrameMetrics is set to the be the first FrameMetrics + // on the layer. + UniquePtr mBaseFrameMetrics; // The following are only used for retained layers (for occlusion // culling of those layers). These regions are all relative to the // container reference frame. @@ -756,14 +767,22 @@ protected: bool ItemCoversScrollableArea(nsDisplayItem* aItem, const nsRegion& aOpaque); /** + * Set FrameMetrics and scroll-induced clipping on aEntry's layer. + */ + void SetupScrollingMetadata(NewLayerEntry* aEntry); + + /** + * Applies occlusion culling. * For each layer in mNewChildLayers, remove from its visible region the * opaque regions of the layers at higher z-index, but only if they have * the same animated geometry root and fixed-pos frame ancestor. * The opaque region for the child layers that share the same animated * geometry root as the container frame is returned in * *aOpaqueRegionForContainer. + * + * Also sets scroll metadata on the layers. */ - void ApplyOcclusionCulling(nsIntRegion* aOpaqueRegionForContainer); + void PostprocessRetainedLayers(nsIntRegion* aOpaqueRegionForContainer); /** * Computes the snapped opaque area of aItem. Sets aList's opaque flag @@ -776,7 +795,8 @@ protected: const nsIFrame* aFixedPosFrame, const DisplayItemClip& aClip, nsDisplayList* aList, - bool* aHideAllLayersBelow); + bool* aHideAllLayersBelow, + bool* aOpaqueForAnimatedGeometryRootParent); /** * Indicate that we are done adding items to the ThebesLayer at the top of @@ -2140,12 +2160,7 @@ ContainerState::PopThebesLayerData() newLayerEntry->mVisibleRegion = data->mVisibleRegion; newLayerEntry->mOpaqueRegion = data->mOpaqueRegion; newLayerEntry->mHideAllLayersBelow = data->mHideAllLayersBelow; - if (nsLayoutUtils::GetScrollableFrameFor(newLayerEntry->mAnimatedGeometryRoot) && - !nsDisplayScrollLayer::IsConstructingScrollLayerForScrolledFrame(newLayerEntry->mAnimatedGeometryRoot)) { - // Async scrolling not currently active so we can propagate our opaque region - // up to the parent animated geometry root. - newLayerEntry->mOpaqueForAnimatedGeometryRootParent = true; - } + newLayerEntry->mOpaqueForAnimatedGeometryRootParent = data->mOpaqueForAnimatedGeometryRootParent; } else { SetOuterVisibleRegionForLayer(layer, data->mVisibleRegion); } @@ -2662,7 +2677,8 @@ ContainerState::ComputeOpaqueRect(nsDisplayItem* aItem, const nsIFrame* aFixedPosFrame, const DisplayItemClip& aClip, nsDisplayList* aList, - bool* aHideAllLayersBelow) + bool* aHideAllLayersBelow, + bool* aOpaqueForAnimatedGeometryRootParent) { bool snapOpaque; nsRegion opaque = aItem->GetOpaqueRegion(mBuilder, &snapOpaque); @@ -2690,6 +2706,23 @@ ContainerState::ComputeOpaqueRect(nsDisplayItem* aItem, if (aFixedPosFrame && ItemCoversScrollableArea(aItem, opaque)) { *aHideAllLayersBelow = true; } + + nsIScrollableFrame* sf = nsLayoutUtils::GetScrollableFrameFor(aAnimatedGeometryRoot); + if (sf) { + nsRect displayport; + bool usingDisplayport = + nsLayoutUtils::GetDisplayPort(aAnimatedGeometryRoot->GetContent(), &displayport); + if (!usingDisplayport) { + // No async scrolling, so all that matters is that the layer contents + // cover the scrollport. + displayport = sf->GetScrollPortRect(); + } + nsIFrame* scrollFrame = do_QueryFrame(sf); + displayport += scrollFrame->GetOffsetToCrossDoc(mContainerReferenceFrame); + if (opaque.Contains(displayport)) { + *aOpaqueForAnimatedGeometryRootParent = true; + } + } } return opaquePixels; } @@ -2970,15 +3003,24 @@ ContainerState::ProcessDisplayItems(nsDisplayList* aList, newLayerEntry->mVisibleRegion = itemVisibleRect; newLayerEntry->mOpaqueRegion = ComputeOpaqueRect(item, animatedGeometryRoot, fixedPosFrame, itemClip, aList, - &newLayerEntry->mHideAllLayersBelow); + &newLayerEntry->mHideAllLayersBelow, + &newLayerEntry->mOpaqueForAnimatedGeometryRootParent); } else { SetOuterVisibleRegionForLayer(ownLayer, itemVisibleRect, layerContentsVisibleRect.width >= 0 ? &layerContentsVisibleRect : nullptr); } - if (itemType == nsDisplayItem::TYPE_SCROLL_LAYER) { + if (itemType == nsDisplayItem::TYPE_SCROLL_LAYER || + itemType == nsDisplayItem::TYPE_SCROLL_INFO_LAYER) { nsDisplayScrollLayer* scrollItem = static_cast(item); newLayerEntry->mOpaqueForAnimatedGeometryRootParent = scrollItem->IsDisplayPortOpaque(); + newLayerEntry->mBaseFrameMetrics = + scrollItem->ComputeFrameMetrics(ownLayer, mParameters); + } else if (itemType == nsDisplayItem::TYPE_SUBDOCUMENT || + itemType == nsDisplayItem::TYPE_ZOOM || + itemType == nsDisplayItem::TYPE_RESOLUTION) { + newLayerEntry->mBaseFrameMetrics = + static_cast(item)->ComputeFrameMetrics(ownLayer, mParameters); } /** @@ -3011,7 +3053,8 @@ ContainerState::ProcessDisplayItems(nsDisplayList* aList, nsIntRegion opaquePixels = ComputeOpaqueRect(item, animatedGeometryRoot, thebesLayerData->mFixedPosFrameForLayerData, itemClip, aList, - &thebesLayerData->mHideAllLayersBelow); + &thebesLayerData->mHideAllLayersBelow, + &thebesLayerData->mOpaqueForAnimatedGeometryRootParent); thebesLayerData->Accumulate(this, item, opaquePixels, itemVisibleRect, itemDrawRect, itemClip); } @@ -3437,7 +3480,63 @@ FindOpaqueRegionEntry(nsTArray& aEntries, } void -ContainerState::ApplyOcclusionCulling(nsIntRegion* aOpaqueRegionForContainer) +ContainerState::SetupScrollingMetadata(NewLayerEntry* aEntry) +{ + nsAutoTArray metricsArray; + if (aEntry->mBaseFrameMetrics) { + metricsArray.AppendElement(*aEntry->mBaseFrameMetrics); + } + uint32_t baseLength = metricsArray.Length(); + + nsIntRect tmpClipRect; + const nsIntRect* layerClip = aEntry->mLayer->GetClipRect(); + nsIFrame* fParent; + for (const nsIFrame* f = aEntry->mAnimatedGeometryRoot; + f != mContainerAnimatedGeometryRoot; + f = nsLayoutUtils::GetAnimatedGeometryRootForFrame( + fParent, mContainerAnimatedGeometryRoot)) { + fParent = nsLayoutUtils::GetCrossDocParentFrame(f); + if (!fParent) { + // This means mContainerAnimatedGeometryRoot was not an ancestor + // of aEntry->mAnimatedGeometryRoot. This is a weird case but it + // can happen, e.g. when a scrolled frame contains a frame with opacity + // which contains a frame that is not scrolled by the scrolled frame. + // For now, we just don't apply any specific async scrolling to this layer. + // It will async-scroll with mContainerAnimatedGeometryRoot, which + // is substandard but not fatal. + metricsArray.SetLength(baseLength); + aEntry->mLayer->SetFrameMetrics(metricsArray); + return; + } + + nsIScrollableFrame* scrollFrame = nsLayoutUtils::GetScrollableFrameFor(f); + if (!scrollFrame) { + continue; + } + + nsRect clipRect(0, 0, -1, -1); + scrollFrame->ComputeFrameMetrics(aEntry->mLayer, mContainerReferenceFrame, + mParameters, &clipRect, &metricsArray); + if (clipRect.width >= 0) { + nsIntRect pixClip = ScaleToNearestPixels(clipRect); + if (layerClip) { + tmpClipRect.IntersectRect(pixClip, *layerClip); + } else { + tmpClipRect = pixClip; + } + layerClip = &tmpClipRect; + // XXX this could cause IPC churn due to cliprects being updated + // twice during layer building --- for non-ThebesLayers that have + // both CSS and scroll clipping. + } + } + aEntry->mLayer->SetClipRect(layerClip); + // Watch out for FrameMetrics copies in profiles + aEntry->mLayer->SetFrameMetrics(metricsArray); +} + +void +ContainerState::PostprocessRetainedLayers(nsIntRegion* aOpaqueRegionForContainer) { nsAutoTArray opaqueRegions; bool hideAll = false; @@ -3458,6 +3557,10 @@ ContainerState::ApplyOcclusionCulling(nsIntRegion* aOpaqueRegionForContainer) e->mVisibleRegion.Sub(e->mVisibleRegion, data->mOpaqueRegion); } + SetOuterVisibleRegionForLayer(e->mLayer, e->mVisibleRegion, + e->mLayerContentsVisibleRect.width >= 0 ? &e->mLayerContentsVisibleRect : nullptr); + SetupScrollingMetadata(e); + if (!e->mOpaqueRegion.IsEmpty()) { const nsIFrame* animatedGeometryRootToCover = e->mAnimatedGeometryRoot; if (e->mOpaqueForAnimatedGeometryRootParent && @@ -3485,9 +3588,6 @@ ContainerState::ApplyOcclusionCulling(nsIntRegion* aOpaqueRegionForContainer) } } - SetOuterVisibleRegionForLayer(e->mLayer, e->mVisibleRegion, - e->mLayerContentsVisibleRect.width >= 0 ? &e->mLayerContentsVisibleRect : nullptr); - if (e->mLayer->GetType() == Layer::TYPE_READBACK) { // ReadbackLayers need to accurately read what's behind them. So, // we don't want to do any occlusion culling of layers behind them. @@ -3518,7 +3618,7 @@ ContainerState::Finish(uint32_t* aTextContentFlags, LayerManagerData* aData, if (mLayerBuilder->IsBuildingRetainedLayers()) { nsIntRegion containerOpaqueRegion; - ApplyOcclusionCulling(&containerOpaqueRegion); + PostprocessRetainedLayers(&containerOpaqueRegion); if (containerOpaqueRegion.Contains(aContainerPixelBounds)) { aChildItems->SetIsOpaque(); } diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index 32b707ce675e..0d261ce83368 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -647,15 +647,17 @@ static void UnmarkFrameForDisplay(nsIFrame* aFrame) { } } -static void RecordFrameMetrics(nsIFrame* aForFrame, - nsIFrame* aScrollFrame, - const nsIFrame* aReferenceFrame, - ContainerLayer* aRoot, - ViewID aScrollParentId, - const nsRect& aViewport, - bool aForceNullScrollId, - bool aIsRoot, - const ContainerLayerParameters& aContainerParameters) { +/* static */ FrameMetrics +nsDisplayScrollLayer::ComputeFrameMetrics(nsIFrame* aForFrame, + nsIFrame* aScrollFrame, + const nsIFrame* aReferenceFrame, + Layer* aLayer, + ViewID aScrollParentId, + const nsRect& aViewport, + bool aForceNullScrollId, + bool aIsRoot, + const ContainerLayerParameters& aContainerParameters) +{ nsPresContext* presContext = aForFrame->PresContext(); int32_t auPerDevPixel = presContext->AppUnitsPerDevPixel(); LayoutDeviceToLayerScale resolution(aContainerParameters.mXScale, aContainerParameters.mYScale); @@ -673,7 +675,7 @@ static void RecordFrameMetrics(nsIFrame* aForFrame, nsRect dp; if (nsLayoutUtils::GetDisplayPort(content, &dp)) { metrics.mDisplayPort = CSSRect::FromAppUnits(dp); - nsLayoutUtils::LogTestDataForPaint(aRoot->Manager(), scrollId, "displayport", + nsLayoutUtils::LogTestDataForPaint(aLayer->Manager(), scrollId, "displayport", metrics.mDisplayPort); } if (nsLayoutUtils::GetCriticalDisplayPort(content, &dp)) { @@ -861,7 +863,7 @@ static void RecordFrameMetrics(nsIFrame* aForFrame, } } - aRoot->SetFrameMetrics(metrics); + return metrics; } nsDisplayListBuilder::~nsDisplayListBuilder() { @@ -1292,10 +1294,11 @@ void nsDisplayList::PaintForFrame(nsDisplayListBuilder* aBuilder, nsRect viewport(aBuilder->ToReferenceFrame(aForFrame), aForFrame->GetSize()); - RecordFrameMetrics(aForFrame, rootScrollFrame, - aBuilder->FindReferenceFrameFor(aForFrame), - root, FrameMetrics::NULL_SCROLL_ID, viewport, - !isRoot, isRoot, containerParameters); + root->SetFrameMetrics( + nsDisplayScrollLayer::ComputeFrameMetrics(aForFrame, rootScrollFrame, + aBuilder->FindReferenceFrameFor(aForFrame), + root, FrameMetrics::NULL_SCROLL_ID, viewport, + !isRoot, isRoot, containerParameters)); // NS_WARNING is debug-only, so don't even bother checking the conditions in // a release build. @@ -3668,28 +3671,35 @@ nsDisplaySubDocument::BuildLayer(nsDisplayListBuilder* aBuilder, params.mInLowPrecisionDisplayPort = true; } - nsRefPtr layer = nsDisplayOwnLayer::BuildLayer( - aBuilder, aManager, params); + return nsDisplayOwnLayer::BuildLayer(aBuilder, aManager, params); +} +UniquePtr +nsDisplaySubDocument::ComputeFrameMetrics(Layer* aLayer, + const ContainerLayerParameters& aContainerParameters) +{ if (!(mFlags & GENERATE_SCROLLABLE_LAYER)) { - return layer.forget(); + return UniquePtr(nullptr); } - NS_ASSERTION(layer->AsContainerLayer(), "nsDisplayOwnLayer should have made a ContainerLayer"); - if (ContainerLayer* container = layer->AsContainerLayer()) { - nsIFrame* rootScrollFrame = presContext->PresShell()->GetRootScrollFrame(); - bool isRootContentDocument = presContext->IsRootContentDocument(); - - nsRect viewport = mFrame->GetRect() - - mFrame->GetPosition() + - mFrame->GetOffsetToCrossDoc(ReferenceFrame()); - - RecordFrameMetrics(mFrame, rootScrollFrame, ReferenceFrame(), - container, mScrollParentId, viewport, - false, isRootContentDocument, params); + nsPresContext* presContext = mFrame->PresContext(); + nsIFrame* rootScrollFrame = presContext->PresShell()->GetRootScrollFrame(); + bool isRootContentDocument = presContext->IsRootContentDocument(); + ContainerLayerParameters params = aContainerParameters; + if ((mFlags & GENERATE_SCROLLABLE_LAYER) && + rootScrollFrame->GetContent() && + nsLayoutUtils::GetCriticalDisplayPort(rootScrollFrame->GetContent(), nullptr)) { + params.mInLowPrecisionDisplayPort = true; } - return layer.forget(); + nsRect viewport = mFrame->GetRect() - + mFrame->GetPosition() + + mFrame->GetOffsetToCrossDoc(ReferenceFrame()); + + return MakeUnique( + nsDisplayScrollLayer::ComputeFrameMetrics(mFrame, rootScrollFrame, ReferenceFrame(), + aLayer, mScrollParentId, viewport, + false, isRootContentDocument, params)); } nsRect @@ -3978,25 +3988,14 @@ nsDisplayScrollLayer::GetScrolledContentRectToDraw(nsDisplayListBuilder* aBuilde already_AddRefed nsDisplayScrollLayer::BuildLayer(nsDisplayListBuilder* aBuilder, LayerManager* aManager, - const ContainerLayerParameters& aContainerParameters) { - + const ContainerLayerParameters& aContainerParameters) +{ ContainerLayerParameters params = aContainerParameters; if (mScrolledFrame->GetContent() && nsLayoutUtils::GetCriticalDisplayPort(mScrolledFrame->GetContent(), nullptr)) { - params.mInLowPrecisionDisplayPort = true; + params.mInLowPrecisionDisplayPort = true; } - nsRefPtr layer = aManager->GetLayerBuilder()-> - BuildContainerLayerFor(aBuilder, aManager, mFrame, this, &mList, - params, nullptr); - - nsRect viewport = mScrollFrame->GetRect() - - mScrollFrame->GetPosition() + - mScrollFrame->GetOffsetToCrossDoc(ReferenceFrame()); - - RecordFrameMetrics(mScrolledFrame, mScrollFrame, ReferenceFrame(), layer, - mScrollParentId, viewport, false, false, params); - if (mList.IsOpaque()) { nsRect displayport; bool usingDisplayport = @@ -4007,14 +4006,28 @@ nsDisplayScrollLayer::BuildLayer(nsDisplayListBuilder* aBuilder, mDisplayPortContentsOpaque = false; } - return layer.forget(); + return aManager->GetLayerBuilder()-> + BuildContainerLayerFor(aBuilder, aManager, mFrame, this, &mList, + params, nullptr); } -bool -nsDisplayScrollLayer::IsConstructingScrollLayerForScrolledFrame(const nsIFrame* aScrolledFrame) +UniquePtr +nsDisplayScrollLayer::ComputeFrameMetrics(Layer* aLayer, + const ContainerLayerParameters& aContainerParameters) { - FrameProperties props = aScrolledFrame->Properties(); - return reinterpret_cast(props.Get(nsIFrame::ScrollLayerCount())) != 0; + ContainerLayerParameters params = aContainerParameters; + if (mScrolledFrame->GetContent() && + nsLayoutUtils::GetCriticalDisplayPort(mScrolledFrame->GetContent(), nullptr)) { + params.mInLowPrecisionDisplayPort = true; + } + + nsRect viewport = mScrollFrame->GetRect() - + mScrollFrame->GetPosition() + + mScrollFrame->GetOffsetToCrossDoc(ReferenceFrame()); + + return UniquePtr(new FrameMetrics( + ComputeFrameMetrics(mScrolledFrame, mScrollFrame, ReferenceFrame(), aLayer, + mScrollParentId, viewport, false, false, params))); } bool diff --git a/layout/base/nsDisplayList.h b/layout/base/nsDisplayList.h index c6c36cb50fd5..7cd74c4dc9b3 100644 --- a/layout/base/nsDisplayList.h +++ b/layout/base/nsDisplayList.h @@ -24,6 +24,8 @@ #include "nsDisplayListInvalidation.h" #include "DisplayListClipState.h" #include "LayerState.h" +#include "FrameMetrics.h" +#include "mozilla/UniquePtr.h" #include @@ -43,8 +45,8 @@ namespace layers { class Layer; class ImageLayer; class ImageContainer; -} //namepsace -} //namepsace +} //namespace +} //namespace // A set of blend modes, that never includes OP_OVER (since it's // considered the default, rather than a specific blend mode). @@ -806,6 +808,7 @@ class nsDisplayItem : public nsDisplayItemLink { public: typedef mozilla::ContainerLayerParameters ContainerLayerParameters; typedef mozilla::DisplayItemClip DisplayItemClip; + typedef mozilla::layers::FrameMetrics FrameMetrics; typedef mozilla::layers::FrameMetrics::ViewID ViewID; typedef mozilla::layers::Layer Layer; typedef mozilla::layers::LayerManager LayerManager; @@ -2885,6 +2888,10 @@ public: virtual nsRegion GetOpaqueRegion(nsDisplayListBuilder* aBuilder, bool* aSnap) MOZ_OVERRIDE; NS_DISPLAY_DECL_NAME("SubDocument", TYPE_SUBDOCUMENT) + + mozilla::UniquePtr ComputeFrameMetrics(Layer* aLayer, + const ContainerLayerParameters& aContainerParameters); + protected: ViewID mScrollParentId; }; @@ -3011,8 +3018,6 @@ public: // after merging, all the nsDisplayScrollLayers should flatten away. intptr_t GetScrollLayerCount(); - static bool IsConstructingScrollLayerForScrolledFrame(const nsIFrame* aScrolledFrame); - virtual nsIFrame* GetScrollFrame() { return mScrollFrame; } virtual nsIFrame* GetScrolledFrame() { return mScrolledFrame; } @@ -3022,6 +3027,19 @@ public: bool IsDisplayPortOpaque() { return mDisplayPortContentsOpaque; } + static FrameMetrics ComputeFrameMetrics(nsIFrame* aForFrame, + nsIFrame* aScrollFrame, + const nsIFrame* aReferenceFrame, + Layer* aLayer, + ViewID aScrollParentId, + const nsRect& aViewport, + bool aForceNullScrollId, + bool aIsRoot, + const ContainerLayerParameters& aContainerParameters); + + mozilla::UniquePtr ComputeFrameMetrics(Layer* aLayer, + const ContainerLayerParameters& aContainerParameters); + protected: nsRect GetScrolledContentRectToDraw(nsDisplayListBuilder* aBuilder, nsRect* aDisplayPort); diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 953d4022cb97..8beee0d19df2 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -63,6 +63,22 @@ using namespace mozilla; using namespace mozilla::dom; using namespace mozilla::layout; +static bool +BuildScrollContainerLayers() +{ + static bool sContainerlessScrollingEnabled; + static bool sContainerlessScrollingPrefCached = false; + + if (!sContainerlessScrollingPrefCached) { + sContainerlessScrollingPrefCached = true; + Preferences::AddBoolVarCache(&sContainerlessScrollingEnabled, + "layout.async-containerless-scrolling.enabled", + true); + } + + return !sContainerlessScrollingEnabled; +} + //---------------------------------------------------------------------- //----------nsHTMLScrollFrame------------------------------------------- @@ -2886,6 +2902,8 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder, (!mIsRoot || aBuilder->RootReferenceFrame()->PresContext() != mOuter->PresContext()); } + mScrollParentID = aBuilder->GetCurrentScrollParentId(); + nsDisplayListCollection scrolledContent; { // Note that setting the current scroll parent id here means that positioned children @@ -2954,7 +2972,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder, // scroll layer count. The display lists depend on this. ScrollLayerWrapper wrapper(mOuter, mScrolledFrame); - if (mShouldBuildScrollableLayer) { + if (mShouldBuildScrollableLayer && BuildScrollContainerLayers()) { DisplayListClipState::AutoSaveRestore clipState(aBuilder); // For root scrollframes in documents where the CSS viewport has been @@ -2996,6 +3014,31 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder, scrolledContent.MoveTo(aLists); } +void +ScrollFrameHelper::ComputeFrameMetrics(Layer* aLayer, + nsIFrame* aContainerReferenceFrame, + const ContainerLayerParameters& aParameters, + nsRect* aClipRect, + nsTArray* aOutput) const +{ + if (!mShouldBuildScrollableLayer || BuildScrollContainerLayers()) { + return; + } + + MOZ_ASSERT(mScrolledFrame->GetContent()); + + nsRect viewport = mScrollPort + + mOuter->GetOffsetToCrossDoc(aContainerReferenceFrame); + + if (!(mIsRoot && mOuter->PresContext()->PresShell()->GetIsViewportOverridden())) { + *aClipRect = viewport; + } + *aOutput->AppendElement() = + nsDisplayScrollLayer::ComputeFrameMetrics(mScrolledFrame, mOuter, + aContainerReferenceFrame, aLayer, mScrollParentID, + viewport, false, false, aParameters); +} + bool ScrollFrameHelper::IsRectNearlyVisible(const nsRect& aRect) const { diff --git a/layout/generic/nsGfxScrollFrame.h b/layout/generic/nsGfxScrollFrame.h index 8a5ae3be58e5..d8cd38347075 100644 --- a/layout/generic/nsGfxScrollFrame.h +++ b/layout/generic/nsGfxScrollFrame.h @@ -31,6 +31,9 @@ class nsIScrollPositionListener; struct ScrollReflowState; namespace mozilla { +namespace layers { +class Layer; +} namespace layout { class ScrollbarActivity; } @@ -43,6 +46,8 @@ public: typedef nsIFrame::Sides Sides; typedef mozilla::CSSIntPoint CSSIntPoint; typedef mozilla::layout::ScrollbarActivity ScrollbarActivity; + typedef mozilla::layers::FrameMetrics FrameMetrics; + typedef mozilla::layers::Layer Layer; class AsyncScroll; class AsyncSmoothMSDScroll; @@ -325,6 +330,10 @@ public: } } bool WantAsyncScroll() const; + void ComputeFrameMetrics(Layer* aLayer, nsIFrame* aContainerReferenceFrame, + const ContainerLayerParameters& aParameters, + nsRect* aClipRect, + nsTArray* aOutput) const; // nsIScrollbarMediator void ScrollByPage(nsScrollbarFrame* aScrollbar, int32_t aDirection); @@ -389,6 +398,8 @@ public: // The scroll position where we last updated image visibility. nsPoint mLastUpdateImagesPos; + FrameMetrics::ViewID mScrollParentID; + bool mNeverHasVerticalScrollbar:1; bool mNeverHasHorizontalScrollbar:1; bool mHasVerticalScrollbar:1; @@ -708,6 +719,13 @@ public: virtual bool WantAsyncScroll() const MOZ_OVERRIDE { return mHelper.WantAsyncScroll(); } + virtual void ComputeFrameMetrics(Layer* aLayer, nsIFrame* aContainerReferenceFrame, + const ContainerLayerParameters& aParameters, + nsRect* aClipRect, + nsTArray* aOutput) const MOZ_OVERRIDE { + mHelper.ComputeFrameMetrics(aLayer, aContainerReferenceFrame, + aParameters, aClipRect, aOutput); + } // nsIStatefulFrame NS_IMETHOD SaveState(nsPresState** aState) MOZ_OVERRIDE { @@ -1047,6 +1065,13 @@ public: virtual bool WantAsyncScroll() const MOZ_OVERRIDE { return mHelper.WantAsyncScroll(); } + virtual void ComputeFrameMetrics(Layer* aLayer, nsIFrame* aContainerReferenceFrame, + const ContainerLayerParameters& aParameters, + nsRect* aClipRect, + nsTArray* aOutput) const MOZ_OVERRIDE { + mHelper.ComputeFrameMetrics(aLayer, aContainerReferenceFrame, + aParameters, aClipRect, aOutput); + } // nsIStatefulFrame NS_IMETHOD SaveState(nsPresState** aState) MOZ_OVERRIDE { diff --git a/layout/generic/nsIScrollableFrame.h b/layout/generic/nsIScrollableFrame.h index 8a6ce21d66e6..14a8026533f2 100644 --- a/layout/generic/nsIScrollableFrame.h +++ b/layout/generic/nsIScrollableFrame.h @@ -15,6 +15,7 @@ #include "mozilla/gfx/Point.h" #include "nsIScrollbarMediator.h" #include "Units.h" +#include "FrameMetrics.h" #define NS_DEFAULT_VERTICAL_SCROLL_DISTANCE 3 #define NS_DEFAULT_HORIZONTAL_SCROLL_DISTANCE 5 @@ -27,6 +28,13 @@ class nsIContent; class nsRenderingContext; class nsIAtom; +namespace mozilla { +struct ContainerLayerParameters; +namespace layers { +class Layer; +} +} + /** * Interface for frames that are scrollable. This interface exposes * APIs for examining scroll state, observing changes to scroll state, @@ -35,6 +43,8 @@ class nsIAtom; class nsIScrollableFrame : public nsIScrollbarMediator { public: typedef mozilla::CSSIntPoint CSSIntPoint; + typedef mozilla::ContainerLayerParameters ContainerLayerParameters; + typedef mozilla::layers::FrameMetrics FrameMetrics; NS_DECL_QUERYFRAME_TARGET(nsIScrollableFrame) @@ -340,6 +350,15 @@ public: * scroll frame. */ virtual bool WantAsyncScroll() const = 0; + /** + * aLayer's animated geometry root is this frame. If there needs to be a + * FrameMetrics contributed by this frame, append it to aOutput. + */ + virtual void ComputeFrameMetrics(mozilla::layers::Layer* aLayer, + nsIFrame* aContainerReferenceFrame, + const ContainerLayerParameters& aParameters, + nsRect* aOutClipRect, + nsTArray* aOutput) const = 0; }; #endif diff --git a/layout/reftests/async-scrolling/nested-1-ref.html b/layout/reftests/async-scrolling/nested-1-ref.html new file mode 100644 index 000000000000..2ad0568e1951 --- /dev/null +++ b/layout/reftests/async-scrolling/nested-1-ref.html @@ -0,0 +1,10 @@ + + + +
+
+
+
+
+
+ diff --git a/layout/reftests/async-scrolling/nested-1.html b/layout/reftests/async-scrolling/nested-1.html new file mode 100644 index 000000000000..eda5c9bd7117 --- /dev/null +++ b/layout/reftests/async-scrolling/nested-1.html @@ -0,0 +1,17 @@ + + + + +
+
+
+
+
+
+ diff --git a/layout/reftests/async-scrolling/reftest.list b/layout/reftests/async-scrolling/reftest.list index 4ef8ab84b765..1e8076fe378f 100644 --- a/layout/reftests/async-scrolling/reftest.list +++ b/layout/reftests/async-scrolling/reftest.list @@ -1,10 +1,26 @@ -skip-if(!asyncPanZoom) == bg-fixed-1.html bg-fixed-1-ref.html -skip-if(!asyncPanZoom) == bg-fixed-cover-1.html bg-fixed-cover-1-ref.html -skip-if(!asyncPanZoom) == bg-fixed-cover-2.html bg-fixed-cover-2-ref.html -skip-if(!asyncPanZoom) == bg-fixed-cover-3.html bg-fixed-cover-3-ref.html -skip-if(!asyncPanZoom) == element-1.html element-1-ref.html -skip-if(!asyncPanZoom) == position-fixed-1.html position-fixed-1-ref.html -skip-if(!asyncPanZoom) == position-fixed-2.html position-fixed-2-ref.html -skip-if(!asyncPanZoom) == position-fixed-cover-1.html position-fixed-cover-1-ref.html -skip-if(!asyncPanZoom) == position-fixed-cover-2.html position-fixed-cover-2-ref.html -skip-if(!asyncPanZoom) == position-fixed-cover-3.html position-fixed-cover-3-ref.html +pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == bg-fixed-1.html bg-fixed-1-ref.html +pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == bg-fixed-cover-1.html bg-fixed-cover-1-ref.html +pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == bg-fixed-cover-2.html bg-fixed-cover-2-ref.html +pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == bg-fixed-cover-3.html bg-fixed-cover-3-ref.html +pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == element-1.html element-1-ref.html +pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == nested-1.html nested-1-ref.html +pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == position-fixed-1.html position-fixed-1-ref.html +pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == position-fixed-2.html position-fixed-2-ref.html +pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == position-fixed-cover-1.html position-fixed-cover-1-ref.html +pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == position-fixed-cover-2.html position-fixed-cover-2-ref.html +pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == position-fixed-cover-3.html position-fixed-cover-3-ref.html +pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == split-layers-1.html split-layers-1-ref.html +pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == split-layers-multi-scrolling-1.html split-layers-multi-scrolling-1-ref.html +pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == split-opacity-layers-1.html split-opacity-layers-1-ref.html + +pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == bg-fixed-1.html bg-fixed-1-ref.html +pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == bg-fixed-cover-1.html bg-fixed-cover-1-ref.html +pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == bg-fixed-cover-2.html bg-fixed-cover-2-ref.html +pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == bg-fixed-cover-3.html bg-fixed-cover-3-ref.html +pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == element-1.html element-1-ref.html +pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == position-fixed-1.html position-fixed-1-ref.html +pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == position-fixed-2.html position-fixed-2-ref.html +pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == position-fixed-cover-1.html position-fixed-cover-1-ref.html +pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == position-fixed-cover-2.html position-fixed-cover-2-ref.html +pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == position-fixed-cover-3.html position-fixed-cover-3-ref.html + diff --git a/layout/reftests/async-scrolling/split-layers-1-ref.html b/layout/reftests/async-scrolling/split-layers-1-ref.html new file mode 100644 index 000000000000..2d78cd17381d --- /dev/null +++ b/layout/reftests/async-scrolling/split-layers-1-ref.html @@ -0,0 +1,13 @@ + + + + +
+
+
+
+
+
+ diff --git a/layout/reftests/async-scrolling/split-layers-1.html b/layout/reftests/async-scrolling/split-layers-1.html new file mode 100644 index 000000000000..911982db3738 --- /dev/null +++ b/layout/reftests/async-scrolling/split-layers-1.html @@ -0,0 +1,16 @@ + + + + +
+
+
+
+
+
+ diff --git a/layout/reftests/async-scrolling/split-layers-multi-scrolling-1-ref.html b/layout/reftests/async-scrolling/split-layers-multi-scrolling-1-ref.html new file mode 100644 index 000000000000..bbb8a05290af --- /dev/null +++ b/layout/reftests/async-scrolling/split-layers-multi-scrolling-1-ref.html @@ -0,0 +1,14 @@ + + + + +
+
+
+
+
+
+ + diff --git a/layout/reftests/async-scrolling/split-layers-multi-scrolling-1.html b/layout/reftests/async-scrolling/split-layers-multi-scrolling-1.html new file mode 100644 index 000000000000..ecbc2814ebf2 --- /dev/null +++ b/layout/reftests/async-scrolling/split-layers-multi-scrolling-1.html @@ -0,0 +1,19 @@ + + + + +
+
+
+
+
+
+ diff --git a/layout/reftests/async-scrolling/split-opacity-layers-1-ref.html b/layout/reftests/async-scrolling/split-opacity-layers-1-ref.html new file mode 100644 index 000000000000..347bfe254782 --- /dev/null +++ b/layout/reftests/async-scrolling/split-opacity-layers-1-ref.html @@ -0,0 +1,12 @@ + + + +
+
+
+
+
+
+
+
+ diff --git a/layout/reftests/async-scrolling/split-opacity-layers-1.html b/layout/reftests/async-scrolling/split-opacity-layers-1.html new file mode 100644 index 000000000000..695412045189 --- /dev/null +++ b/layout/reftests/async-scrolling/split-opacity-layers-1.html @@ -0,0 +1,15 @@ + + + +
+
+
+
+
+
+
+
+ diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index d70262747fdf..038f064b65a2 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -426,6 +426,9 @@ pref("media.audio_data.enabled", false); // Whether to use async panning and zooming pref("layers.async-pan-zoom.enabled", false); +// Whether to enable containerless async scrolling +pref("layout.async-containerless-scrolling.enabled", true); + // APZ preferences. For documentation/details on what these prefs do, check // gfx/layers/apz/src/AsyncPanZoomController.cpp. pref("apz.allow_checkerboarding", true); From ad89b8776cf68f866b0ffffb5e754a482a45da04 Mon Sep 17 00:00:00 2001 From: Gabor Krizsanits Date: Tue, 2 Sep 2014 12:13:45 +0200 Subject: [PATCH 032/139] Bug 877072 - Script execution order for imports. r=mrbkap --- content/base/public/nsIDocument.h | 14 +- content/base/src/ImportManager.cpp | 360 +++++++++++++++++- content/base/src/ImportManager.h | 133 ++++++- content/base/src/nsDocument.cpp | 3 + content/base/src/nsDocument.h | 34 +- content/base/src/nsScriptLoader.cpp | 39 +- content/base/src/nsScriptLoader.h | 12 +- content/html/content/moz.build | 1 + content/html/content/src/HTMLLinkElement.cpp | 11 +- .../content/test/imports/file_importA1.html | 11 + .../content/test/imports/file_importA2.html | 10 + .../content/test/imports/file_importB1.html | 11 + .../content/test/imports/file_importB2.html | 10 + .../content/test/imports/file_importC1.html | 11 + .../content/test/imports/file_importC10.html | 11 + .../content/test/imports/file_importC2.html | 11 + .../content/test/imports/file_importC3.html | 11 + .../content/test/imports/file_importC4.html | 11 + .../content/test/imports/file_importC5.html | 11 + .../content/test/imports/file_importC6.html | 11 + .../content/test/imports/file_importC7.html | 11 + .../content/test/imports/file_importC8.html | 11 + .../content/test/imports/file_importC9.html | 11 + .../content/test/imports/file_importD.html | 8 + .../content/test/imports/file_importE.html | 11 + .../html/content/test/imports/mochitest.ini | 20 + content/html/content/test/mochitest.ini | 2 + .../content/test/test_imports_nested.html | 41 ++ .../content/test/test_imports_nested_2.html | 56 +++ 29 files changed, 854 insertions(+), 43 deletions(-) create mode 100644 content/html/content/test/imports/file_importA1.html create mode 100644 content/html/content/test/imports/file_importA2.html create mode 100644 content/html/content/test/imports/file_importB1.html create mode 100644 content/html/content/test/imports/file_importB2.html create mode 100644 content/html/content/test/imports/file_importC1.html create mode 100644 content/html/content/test/imports/file_importC10.html create mode 100644 content/html/content/test/imports/file_importC2.html create mode 100644 content/html/content/test/imports/file_importC3.html create mode 100644 content/html/content/test/imports/file_importC4.html create mode 100644 content/html/content/test/imports/file_importC5.html create mode 100644 content/html/content/test/imports/file_importC6.html create mode 100644 content/html/content/test/imports/file_importC7.html create mode 100644 content/html/content/test/imports/file_importC8.html create mode 100644 content/html/content/test/imports/file_importC9.html create mode 100644 content/html/content/test/imports/file_importD.html create mode 100644 content/html/content/test/imports/file_importE.html create mode 100644 content/html/content/test/imports/mochitest.ini create mode 100644 content/html/content/test/test_imports_nested.html create mode 100644 content/html/content/test/test_imports_nested_2.html diff --git a/content/base/public/nsIDocument.h b/content/base/public/nsIDocument.h index c302b48d33ab..90d33d3404fd 100644 --- a/content/base/public/nsIDocument.h +++ b/content/base/public/nsIDocument.h @@ -133,8 +133,8 @@ typedef CallbackObjectHolder NodeFilterHolder; } // namespace mozilla #define NS_IDOCUMENT_IID \ -{ 0x613ea294, 0x0288, 0x48b4, \ - { 0x9e, 0x7b, 0x0f, 0xe9, 0x3f, 0x8c, 0xf8, 0x95 } } +{ 0x42a263db, 0x6ac6, 0x40ff, \ + { 0x89, 0xe2, 0x25, 0x12, 0xe4, 0xbc, 0x2d, 0x2d } } // Enum for requesting a particular type of document when creating a doc enum DocumentFlavor { @@ -2353,11 +2353,15 @@ public: // Each import tree has exactly one master document which is // the root of the tree, and owns the browser context. - virtual already_AddRefed MasterDocument() = 0; + virtual nsIDocument* MasterDocument() = 0; virtual void SetMasterDocument(nsIDocument* master) = 0; virtual bool IsMasterDocument() = 0; - virtual already_AddRefed ImportManager() = 0; - + virtual mozilla::dom::ImportManager* ImportManager() = 0; + // We keep track of the order of sub imports were added to the document. + virtual bool HasSubImportLink(nsINode* aLink) = 0; + virtual uint32_t IndexOfSubImportLink(nsINode* aLink) = 0; + virtual void AddSubImportLink(nsINode* aLink) = 0; + virtual nsINode* GetSubImportLink(uint32_t aIdx) = 0; /* * Given a node, get a weak reference to it and append that reference to * mBlockedTrackingNodes. Can be used later on to look up a node in it. diff --git a/content/base/src/ImportManager.cpp b/content/base/src/ImportManager.cpp index 63a2fcdd094d..a16df3b6e0d5 100644 --- a/content/base/src/ImportManager.cpp +++ b/content/base/src/ImportManager.cpp @@ -23,6 +23,10 @@ #include "nsScriptLoader.h" #include "nsNetUtil.h" +//----------------------------------------------------------------------------- +// AutoError +//----------------------------------------------------------------------------- + class AutoError { public: explicit AutoError(mozilla::dom::ImportLoader* loader, bool scriptsBlocked = true) @@ -49,6 +53,212 @@ private: namespace mozilla { namespace dom { +//----------------------------------------------------------------------------- +// ImportLoader::Updater +//----------------------------------------------------------------------------- + +void +ImportLoader::Updater::GetReferrerChain(nsINode* aNode, + nsTArray& aResult) +{ + // We fill up the array backward. First the last link: aNode. + MOZ_ASSERT(mLoader->mLinks.Contains(aNode)); + + aResult.AppendElement(aNode); + nsINode* node = aNode; + nsRefPtr manager = mLoader->Manager(); + for (ImportLoader* referrersLoader = manager->Find(node->OwnerDoc()); + referrersLoader; + referrersLoader = manager->Find(node->OwnerDoc())) + { + // Then walking up the main referrer chain and append each link + // to the array. + node = referrersLoader->GetMainReferrer(); + MOZ_ASSERT(node); + aResult.AppendElement(node); + } + + // The reversed order is more useful for consumers. + // XXX: This should probably go to nsTArray or some generic utility + // lib for our containers that we don't have... I would really like to + // get rid of this part... + uint32_t l = aResult.Length(); + for (uint32_t i = 0; i < l / 2; i++) { + Swap(aResult[i], aResult[l - i - 1]); + } +} + +bool +ImportLoader::Updater::ShouldUpdate(nsTArray& aNewPath) +{ + // Let's walk down on the main referrer chains of both the current main and + // the new link, and find the last pair of links that are from the same + // document. This is the junction point between the two referrer chain. Their + // order in the subimport list of that document will determine if we have to + // update the spanning tree or this new edge changes nothing in the script + // execution order. + nsTArray oldPath; + GetReferrerChain(mLoader->mLinks[mLoader->mMainReferrer], oldPath); + uint32_t max = std::min(oldPath.Length(), aNewPath.Length()); + MOZ_ASSERT(max > 0); + uint32_t lastCommonImportAncestor = 0; + + for (uint32_t i = 0; + i < max && oldPath[i]->OwnerDoc() == aNewPath[i]->OwnerDoc(); + i++) + { + lastCommonImportAncestor = i; + } + + MOZ_ASSERT(lastCommonImportAncestor < max); + nsINode* oldLink = oldPath[lastCommonImportAncestor]; + nsINode* newLink = aNewPath[lastCommonImportAncestor]; + + if ((lastCommonImportAncestor == max - 1) && + newLink == oldLink ) { + // If one chain contains the other entirely, then this is a simple cycle, + // nothing to be done here. + MOZ_ASSERT(oldPath.Length() != aNewPath.Length(), + "This would mean that new link == main referrer link"); + return false; + } + + MOZ_ASSERT(aNewPath != oldPath, + "How could this happen?"); + nsIDocument* doc = oldLink->OwnerDoc(); + MOZ_ASSERT(doc->HasSubImportLink(newLink)); + MOZ_ASSERT(doc->HasSubImportLink(oldLink)); + + return doc->IndexOfSubImportLink(newLink) < doc->IndexOfSubImportLink(oldLink); +} + +void +ImportLoader::Updater::UpdateMainReferrer(uint32_t aNewIdx) +{ + MOZ_ASSERT(aNewIdx < mLoader->mLinks.Length()); + nsINode* newMainReferrer = mLoader->mLinks[aNewIdx]; + // This new link means we have to execute our scripts sooner... + if (mLoader->mDocument) { + // Our nearest predecessor has changed. So let's remove our pending + // ScriptLoader from the old one. + nsRefPtr manager = mLoader->Manager(); + nsScriptLoader* loader = mLoader->mDocument->ScriptLoader(); + ImportLoader*& pred = mLoader->mBlockingPredecessor; + if (pred) { + pred->RemoveBlockedScriptLoader(loader); + } + // And add it to the new one if there is any. + pred = manager->GetNearestPredecessor(newMainReferrer); + if (pred) { + pred->AddBlockedScriptLoader(loader); + } + } + if (mLoader->IsBlocking()) { + // Our import parent is changed as well, let's unblock it and block + // the new one. + mLoader->mImportParent->ScriptLoader()->RemoveExecuteBlocker(); + newMainReferrer->OwnerDoc()->ScriptLoader()->AddExecuteBlocker(); + } + // Finally update mMainReferrer to point to the newly added link. + mLoader->mMainReferrer = aNewIdx; + mLoader->mImportParent = newMainReferrer->OwnerDoc(); +} + +nsINode* +ImportLoader::Updater::NextDependant(nsINode* aCurrentLink, + nsTArray& aPath, + NodeTable& aVisitedNodes, bool aSkipChildren) +{ + // Depth first graph traversal. + if (!aSkipChildren) { + // "first child" + ImportLoader* loader = mLoader->Manager()->Find(aCurrentLink); + if (loader && loader->GetDocument()) { + nsINode* firstSubImport = loader->GetDocument()->GetSubImportLink(0); + if (firstSubImport && !aVisitedNodes.Contains(firstSubImport)) { + aPath.AppendElement(aCurrentLink); + aVisitedNodes.PutEntry(firstSubImport); + return firstSubImport; + } + } + } + + aPath.AppendElement(aCurrentLink); + // "(parent's) next sibling" + while(aPath.Length() > 1) { + aCurrentLink = aPath[aPath.Length() - 1]; + aPath.RemoveElementAt(aPath.Length() - 1); + + // Let's find the next "sibling" + ImportLoader* loader = mLoader->Manager()->Find(aCurrentLink->OwnerDoc()); + MOZ_ASSERT(loader && loader->GetDocument(), "How can this happend?"); + nsIDocument* doc = loader->GetDocument(); + MOZ_ASSERT(doc->HasSubImportLink(aCurrentLink)); + uint32_t idx = doc->IndexOfSubImportLink(aCurrentLink); + nsINode* next = doc->GetSubImportLink(idx + 1); + if (next) { + // Note: If we found an already visited link that means the parent links has + // closed the circle it's always the "first child" section that should find + // the first already visited node. Let's just assert that. + MOZ_ASSERT(!aVisitedNodes.Contains(next)); + aVisitedNodes.PutEntry(next); + return next; + } + } + + return nullptr; +} + +void +ImportLoader::Updater::UpdateDependants(nsINode* aNode, + nsTArray& aPath) +{ + NodeTable visitedNodes; + nsINode* current = aNode; + uint32_t initialLength = aPath.Length(); + bool neededUpdate = true; + while ((current = NextDependant(current, aPath, visitedNodes, !neededUpdate))) { + if (!current || aPath.Length() <= initialLength) { + break; + } + ImportLoader* loader = mLoader->Manager()->Find(current); + if (!loader) { + continue; + } + Updater& updater = loader->mUpdater; + neededUpdate = updater.ShouldUpdate(aPath); + if (neededUpdate) { + updater.UpdateMainReferrer(loader->mLinks.IndexOf(current)); + } + } +} + +void +ImportLoader::Updater::UpdateSpanningTree(nsINode* aNode) +{ + if (mLoader->mReady || mLoader->mStopped) { + // Scripts already executed, nothing to be done here. + return; + } + + if (mLoader->mLinks.Length() == 1) { + // If this is the first referrer, let's mark it. + mLoader->mMainReferrer = 0; + return; + } + + nsTArray newReferrerChain; + GetReferrerChain(aNode, newReferrerChain); + if (ShouldUpdate(newReferrerChain)) { + UpdateMainReferrer(mLoader->mLinks.Length() - 1); + UpdateDependants(aNode, newReferrerChain); + } +} + +//----------------------------------------------------------------------------- +// ImportLoader +//----------------------------------------------------------------------------- + NS_INTERFACE_MAP_BEGIN(ImportLoader) NS_INTERFACE_MAP_ENTRY(nsIStreamListener) NS_INTERFACE_MAP_ENTRY(nsIRequestObserver) @@ -66,10 +276,13 @@ NS_IMPL_CYCLE_COLLECTION(ImportLoader, ImportLoader::ImportLoader(nsIURI* aURI, nsIDocument* aImportParent) : mURI(aURI) , mImportParent(aImportParent) + , mBlockingPredecessor(nullptr) , mReady(false) , mStopped(false) , mBlockingScripts(false) -{} + , mUpdater(MOZ_THIS_IN_INITIALIZER_LIST()) +{ +} void ImportLoader::BlockScripts() @@ -84,9 +297,18 @@ ImportLoader::UnblockScripts() { MOZ_ASSERT(mBlockingScripts); mImportParent->ScriptLoader()->RemoveExecuteBlocker(); + // We probably should do a clever assertion here to see + // if our ScriptLoader unblocked all these ScriptLoaders. + mBlockedScriptLoaders.Clear(); mBlockingScripts = false; } +void +ImportLoader::SetBlockingPredecessor(ImportLoader* aLoader) +{ + mBlockingPredecessor = aLoader; +} + void ImportLoader::DispatchEventIfFinished(nsINode* aNode) { @@ -99,6 +321,33 @@ ImportLoader::DispatchEventIfFinished(nsINode* aNode) } } +void +ImportLoader::AddBlockedScriptLoader(nsScriptLoader* aScriptLoader) +{ + MOZ_ASSERT(!mBlockedScriptLoaders.Contains(aScriptLoader), + "Same scripts loader should be added only once"); + + aScriptLoader->AddExecuteBlocker(); + + if (mDocument) { + // If the document is ready we can just add the pending script loader + // to it. Otherwise we will add them once the document is created. + mDocument->ScriptLoader()->AddPendingChildLoader(aScriptLoader); + } + // Let's keep track of the pending script loaders. + mBlockedScriptLoaders.AppendElement(aScriptLoader); +} + +bool +ImportLoader::RemoveBlockedScriptLoader(nsScriptLoader* aScriptLoader) +{ + aScriptLoader->RemoveExecuteBlocker(); + if (mDocument) { + mDocument->ScriptLoader()->RemovePendingChildLoader(aScriptLoader); + } + return mBlockedScriptLoaders.RemoveElement(aScriptLoader); +} + void ImportLoader::AddLinkElement(nsINode* aNode) { @@ -106,14 +355,15 @@ ImportLoader::AddLinkElement(nsINode* aNode) // refers to an import that is already finished loading or // stopped trying, we need to fire the corresponding event // on it. - mLinks.AppendObject(aNode); + mLinks.AppendElement(aNode); + mUpdater.UpdateSpanningTree(aNode); DispatchEventIfFinished(aNode); } void ImportLoader::RemoveLinkElement(nsINode* aNode) { - mLinks.RemoveObject(aNode); + mLinks.RemoveElement(aNode); } // Events has to be fired with a script runner, so mImport can @@ -159,8 +409,8 @@ void ImportLoader::Done() { mReady = true; - uint32_t count = mLinks.Count(); - for (uint32_t i = 0; i < count; i++) { + uint32_t l = mLinks.Length(); + for (uint32_t i = 0; i < l; i++) { DispatchLoadEvent(mLinks[i]); } UnblockScripts(); @@ -172,8 +422,8 @@ ImportLoader::Error(bool aUnblockScripts) { mDocument = nullptr; mStopped = true; - uint32_t count = mLinks.Count(); - for (uint32_t i = 0; i < count; i++) { + uint32_t l = mLinks.Length(); + for (uint32_t i = 0; i < l; i++) { DispatchErrorEvent(mLinks[i]); } if (aUnblockScripts) { @@ -375,6 +625,10 @@ ImportLoader::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) nsCOMPtr master = mImportParent->MasterDocument(); mDocument->SetMasterDocument(master); + for (uint32_t i = 0; i < mBlockedScriptLoaders.Length(); i++) { + mDocument->ScriptLoader()->AddPendingChildLoader(mBlockedScriptLoaders[i]); + } + // We have to connect the blank document we created with the channel we opened, // and create its own LoadGroup for it. nsCOMPtr listener; @@ -388,7 +642,25 @@ ImportLoader::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) true); NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_ABORT_ERR); - // Let's start parser. + nsCOMPtr originalURI; + rv = channel->GetOriginalURI(getter_AddRefs(originalURI)); + NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_ABORT_ERR); + + nsCOMPtr URI; + rv = channel->GetURI(getter_AddRefs(URI)); + NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_ABORT_ERR); + MOZ_ASSERT(URI, "URI of a channel should never be null"); + + bool equals; + rv = URI->Equals(originalURI, &equals); + NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_ABORT_ERR); + + if (!equals) { + // In case of a redirection we must add the new URI to the import map. + Manager()->AddLoaderWithNewURI(this, URI); + } + + // Let's start the parser. mParserStreamListener = listener; rv = listener->OnStartRequest(aRequest, aContext); NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_ABORT_ERR); @@ -397,6 +669,10 @@ ImportLoader::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) return NS_OK; } +//----------------------------------------------------------------------------- +// ImportManager +//----------------------------------------------------------------------------- + NS_IMPL_CYCLE_COLLECTION(ImportManager, mImports) @@ -414,16 +690,78 @@ ImportManager::Get(nsIURI* aURI, nsINode* aNode, nsIDocument* aOrigDocument) // and start it up. nsRefPtr loader; mImports.Get(aURI, getter_AddRefs(loader)); - + bool needToStart = false; if (!loader) { loader = new ImportLoader(aURI, aOrigDocument); mImports.Put(aURI, loader); + needToStart = true; + } + + MOZ_ASSERT(loader); + // Let's keep track of the sub imports links in each document. It will + // be used later for scrip execution order calculation. (see UpdateSpanningTree) + // NOTE: removing and adding back the link to the tree somewhere else will + // NOT have an effect on script execution order. + if (!aOrigDocument->HasSubImportLink(aNode)) { + aOrigDocument->AddSubImportLink(aNode); + } + + loader->AddLinkElement(aNode); + + if (needToStart) { loader->Open(); } - loader->AddLinkElement(aNode); - MOZ_ASSERT(loader); + return loader.forget(); } +ImportLoader* +ImportManager::Find(nsIDocument* aImport) +{ + return mImports.GetWeak(aImport->GetDocumentURIObject()); +} + +ImportLoader* +ImportManager::Find(nsINode* aLink) +{ + HTMLLinkElement* linkElement = static_cast(aLink); + nsCOMPtr uri = linkElement->GetHrefURI(); + return mImports.GetWeak(uri); +} + +void +ImportManager::AddLoaderWithNewURI(ImportLoader* aLoader, nsIURI* aNewURI) +{ + mImports.Put(aNewURI, aLoader); +} + +nsRefPtr ImportManager::GetNearestPredecessor(nsINode* aNode) +{ + // Return the previous link if there is any in the same document. + nsIDocument* doc = aNode->OwnerDoc(); + int32_t idx = doc->IndexOfSubImportLink(aNode); + MOZ_ASSERT(idx != -1, "aNode must be a sub import link of its owner document"); + if (idx == 0) { + if (doc->IsMasterDocument()) { + // If there is no previous one, and it was the master document, then + // there is no predecessor. + return nullptr; + } + // Else we find the main referrer of the import parent of the link's document. + // And do a recursion. + ImportLoader* owner = Find(doc); + MOZ_ASSERT(owner); + nsCOMPtr mainReferrer = owner->GetMainReferrer(); + return GetNearestPredecessor(mainReferrer); + } + MOZ_ASSERT(idx > 0); + HTMLLinkElement* link = + static_cast(doc->GetSubImportLink(idx - 1)); + nsCOMPtr uri = link->GetHrefURI(); + nsRefPtr ret; + mImports.Get(uri, getter_AddRefs(ret)); + return ret; +} + } // namespace dom } // namespace mozilla diff --git a/content/base/src/ImportManager.h b/content/base/src/ImportManager.h index ba6199418046..4ce97ebc8e43 100644 --- a/content/base/src/ImportManager.h +++ b/content/base/src/ImportManager.h @@ -39,12 +39,13 @@ #ifndef mozilla_dom_ImportManager_h__ #define mozilla_dom_ImportManager_h__ -#include "nsCOMArray.h" +#include "nsTArray.h" #include "nsCycleCollectionParticipant.h" #include "nsIDOMEventListener.h" #include "nsIStreamListener.h" #include "nsIWeakReferenceUtils.h" #include "nsRefPtrHashtable.h" +#include "nsScriptLoader.h" #include "nsURIHashKey.h" class nsIDocument; @@ -58,11 +59,70 @@ namespace dom { class ImportManager; +typedef nsTHashtable> NodeTable; + class ImportLoader MOZ_FINAL : public nsIStreamListener , public nsIDOMEventListener { + + // A helper inner class to decouple the logic of updating the import graph + // after a new import link has been found by one of the parsers. + class Updater { + + public: + Updater(ImportLoader* aLoader) : mLoader(aLoader) + {} + + // After a new link is added that refers to this import, we + // have to update the spanning tree, since given this new link the + // priority of this import might be higher in the scripts + // execution order than before. It updates mMainReferrer, mImportParent, + // the corresponding pending ScriptRunners, etc. + // It also handles updating additional dependant loaders via the + // UpdateDependants calls. + // (NOTE: See GetMainReferrer about spanning tree.) + void UpdateSpanningTree(nsINode* aNode); + + private: + // Returns an array of links that forms a referring chain from + // the master document to this import. Each link in the array + // is marked as main referrer in the list. + void GetReferrerChain(nsINode* aNode, nsTArray& aResult); + + // Once we find a new referrer path to our import, we have to see if + // it changes the load order hence we have to do an update on the graph. + bool ShouldUpdate(nsTArray& aNewPath); + void UpdateMainReferrer(uint32_t newIdx); + + // It's a depth first graph traversal algorithm, for UpdateDependants. The + // nodes in the graph are the import link elements, and there is a directed + // edge from link1 to link2 if link2 is a subimport in the import document + // of link1. + // If the ImportLoader that aCurrentLink points to didn't need to be updated + // the algorithm skips its "children" (subimports). Note, that this graph can + // also contain cycles, aVisistedLinks is used to track the already visited + // links to avoid an infinite loop. + // aPath - (in/out) the referrer link chain of aCurrentLink when called, and + // of the next link when the function returns + // aVisitedLinks - (in/out) list of links that the traversal already visited + // (to handle cycles in the graph) + // aSkipChildren - when aCurrentLink points to an import that did not need + // to be updated, we can skip its sub-imports ('children') + nsINode* NextDependant(nsINode* aCurrentLink, + nsTArray& aPath, + NodeTable& aVisitedLinks, bool aSkipChildren); + + // When we find a new link that changes the load order of the known imports, + // we also have to check all the subimports of it, to see if they need an + // update too. (see test_imports_nested_2.html) + void UpdateDependants(nsINode* aNode, nsTArray& aPath); + + ImportLoader* mLoader; + }; + friend class ::AutoError; friend class ImportManager; + friend class Updater; public: ImportLoader(nsIURI* aURI, nsIDocument* aOriginDocument); @@ -83,11 +143,46 @@ public: bool IsReady() { return mReady; } bool IsStopped() { return mStopped; } bool IsBlocking() { return mBlockingScripts; } - already_AddRefed GetImport() - { - return mReady ? nsCOMPtr(mDocument).forget() : nullptr; + + ImportManager* Manager() { + MOZ_ASSERT(mDocument || mImportParent, "One of them should be always set"); + return (mDocument ? mDocument : mImportParent)->ImportManager(); } + // Simply getter for the import document. Can return a partially parsed + // document if called too early. + nsIDocument* GetDocument() + { + return mDocument; + } + + // Getter for the import document that is used in the spec. Returns + // nullptr if the import is not yet ready. + nsIDocument* GetImport() + { + return mReady ? mDocument : nullptr; + } + + // There is only one referring link that is marked as primary link per + // imports. This is the one that has to be taken into account when + // scrip execution order is determined. Links marked as primary link form + // a spanning tree in the import graph. (Eliminating the cycles and + // multiple parents.) This spanning tree is recalculated every time + // a new import link is added to the manager. + nsINode* GetMainReferrer() + { + return mLinks.IsEmpty() ? nullptr : mLinks[mMainReferrer]; + } + + // An import is not only blocked by its import children, but also + // by its predecessors. It's enough to find the closest predecessor + // and wait for that to run its scripts. We keep track of all the + // ScriptRunners that are waiting for this import. NOTE: updating + // the main referrer might change this list. + void AddBlockedScriptLoader(nsScriptLoader* aScriptLoader); + bool RemoveBlockedScriptLoader(nsScriptLoader* aScriptLoader); + void SetBlockingPredecessor(ImportLoader* aLoader); + private: ~ImportLoader() {} @@ -122,12 +217,25 @@ private: nsCOMPtr mURI; nsCOMPtr mParserStreamListener; nsCOMPtr mImportParent; + ImportLoader* mBlockingPredecessor; + // List of the LinkElements that are referring to this import // we need to keep track of them so we can fire event on them. - nsCOMArray mLinks; + nsTArray> mLinks; + + // List of pending ScriptLoaders that are waiting for this import + // to finish. + nsTArray> mBlockedScriptLoaders; + + // There is always exactly one referrer link that is flagged as + // the main referrer the primary link. This is the one that is + // used in the script execution order calculation. + // ("Branch" according to the spec.) + uint32_t mMainReferrer; bool mReady; bool mStopped; bool mBlockingScripts; + Updater mUpdater; }; class ImportManager MOZ_FINAL : public nsISupports @@ -142,9 +250,24 @@ public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS(ImportManager) + // Finds the ImportLoader that belongs to aImport in the map. + ImportLoader* Find(nsIDocument* aImport); + + // Find the ImportLoader aLink refers to. + ImportLoader* Find(nsINode* aLink); + + void AddLoaderWithNewURI(ImportLoader* aLoader, nsIURI* aNewURI); + + // When a new import link is added, this getter either creates + // a new ImportLoader for it, or returns an existing one if + // it was already created and in the import map. already_AddRefed Get(nsIURI* aURI, nsINode* aNode, nsIDocument* aOriginDocument); + // It finds the predecessor for an import link node that runs its + // scripts the latest among its predecessors. + nsRefPtr GetNearestPredecessor(nsINode* aNode); + private: ImportMap mImports; }; diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index d8c6248d3fff..5d084cbffb8f 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -1972,6 +1972,8 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsDocument) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mOnDemandBuiltInUASheets) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPreloadingImages) + NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSubImportLinks) + for (uint32_t i = 0; i < tmp->mFrameRequestCallbacks.Length(); ++i) { NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mFrameRequestCallbacks[i]"); cb.NoteXPCOMChild(tmp->mFrameRequestCallbacks[i].mCallback.GetISupports()); @@ -2036,6 +2038,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsDocument) NS_IMPL_CYCLE_COLLECTION_UNLINK(mRegistry) NS_IMPL_CYCLE_COLLECTION_UNLINK(mMasterDocument) NS_IMPL_CYCLE_COLLECTION_UNLINK(mImportManager) + NS_IMPL_CYCLE_COLLECTION_UNLINK(mSubImportLinks) tmp->mParentDocument = nullptr; diff --git a/content/base/src/nsDocument.h b/content/base/src/nsDocument.h index 34f13f21740e..d8f57773e62d 100644 --- a/content/base/src/nsDocument.h +++ b/content/base/src/nsDocument.h @@ -1291,10 +1291,10 @@ public: mozilla::ErrorResult& rv) MOZ_OVERRIDE; virtual void UseRegistryFromDocument(nsIDocument* aDocument) MOZ_OVERRIDE; - virtual already_AddRefed MasterDocument() + virtual nsIDocument* MasterDocument() { - return mMasterDocument ? (nsCOMPtr(mMasterDocument)).forget() - : (nsCOMPtr(this)).forget(); + return mMasterDocument ? mMasterDocument.get() + : this; } virtual void SetMasterDocument(nsIDocument* master) @@ -1307,11 +1307,11 @@ public: return !mMasterDocument; } - virtual already_AddRefed ImportManager() + virtual mozilla::dom::ImportManager* ImportManager() { if (mImportManager) { MOZ_ASSERT(!mMasterDocument, "Only the master document has ImportManager set"); - return nsRefPtr(mImportManager).forget(); + return mImportManager.get(); } if (mMasterDocument) { @@ -1323,7 +1323,28 @@ public: // master document and this is the first import in it. // Let's create a new manager. mImportManager = new mozilla::dom::ImportManager(); - return nsRefPtr(mImportManager).forget(); + return mImportManager.get(); + } + + virtual bool HasSubImportLink(nsINode* aLink) + { + return mSubImportLinks.Contains(aLink); + } + + virtual uint32_t IndexOfSubImportLink(nsINode* aLink) + { + return mSubImportLinks.IndexOf(aLink); + } + + virtual void AddSubImportLink(nsINode* aLink) + { + mSubImportLinks.AppendElement(aLink); + } + + virtual nsINode* GetSubImportLink(uint32_t aIdx) + { + return aIdx < mSubImportLinks.Length() ? mSubImportLinks[aIdx].get() + : nullptr; } virtual void UnblockDOMContentLoaded() MOZ_OVERRIDE; @@ -1749,6 +1770,7 @@ private: nsCOMPtr mMasterDocument; nsRefPtr mImportManager; + nsTArray > mSubImportLinks; // Set to true when the document is possibly controlled by the ServiceWorker. // Used to prevent multiple requests to ServiceWorkerManager. diff --git a/content/base/src/nsScriptLoader.cpp b/content/base/src/nsScriptLoader.cpp index 2ddb1ed827ff..4cf1758ba231 100644 --- a/content/base/src/nsScriptLoader.cpp +++ b/content/base/src/nsScriptLoader.cpp @@ -49,6 +49,7 @@ #include "nsSandboxFlags.h" #include "nsContentTypeParser.h" #include "nsINetworkPredictor.h" +#include "ImportManager.h" #include "mozilla/dom/EncodingUtils.h" #include "mozilla/CORSMode.h" @@ -1227,7 +1228,7 @@ nsScriptLoader::ReadyToExecuteScripts() if (!SelfReadyToExecuteScripts()) { return false; } - + for (nsIDocument* doc = mDocument; doc; doc = doc->GetParentDocument()) { nsScriptLoader* ancestor = doc->ScriptLoader(); if (!ancestor->SelfReadyToExecuteScripts() && @@ -1237,10 +1238,44 @@ nsScriptLoader::ReadyToExecuteScripts() } } + if (!mDocument->IsMasterDocument()) { + nsRefPtr im = mDocument->ImportManager(); + nsRefPtr loader = im->Find(mDocument); + MOZ_ASSERT(loader, "How can we have an import document without a loader?"); + + // The referring link that counts in the execution order calculation + // (in spec: flagged as branch) + nsCOMPtr referrer = loader->GetMainReferrer(); + MOZ_ASSERT(referrer, "There has to be a main referring link for each imports"); + + // Import documents are blocked by their import predecessors. We need to + // wait with script execution until all the predecessors are done. + // Technically it means we have to wait for the last one to finish, + // which is the neares one to us in the order. + nsRefPtr lastPred = im->GetNearestPredecessor(referrer); + if (!lastPred) { + // If there is no predecessor we can run. + return true; + } + + nsCOMPtr doc = lastPred->GetDocument(); + if (!doc || (doc && !doc->ScriptLoader()->SelfReadyToExecuteScripts())) { + // Document has not been created yet or it was created but not ready. + // Either case we are blocked by it. The ImportLoader will take care + // of blocking us, and adding the pending child loader to the blocking + // ScriptLoader when it's possible (at this point the blocking loader + // might not have created the document/ScriptLoader) + lastPred->AddBlockedScriptLoader(this); + // As more imports are parsed, this can change, let's cache what we + // blocked, so it can be later updated if needed (see: ImportLoader::Updater). + loader->SetBlockingPredecessor(lastPred); + return false; + } + } + return true; } - // This function was copied from nsParser.cpp. It was simplified a bit. static bool DetectByteOrderMark(const unsigned char* aBytes, int32_t aLen, nsCString& oCharset) diff --git a/content/base/src/nsScriptLoader.h b/content/base/src/nsScriptLoader.h index 19fad0ce51f5..200af7c37efb 100644 --- a/content/base/src/nsScriptLoader.h +++ b/content/base/src/nsScriptLoader.h @@ -249,6 +249,14 @@ public: nsresult ProcessOffThreadRequest(nsScriptLoadRequest *aRequest, void **aOffThreadToken); + bool AddPendingChildLoader(nsScriptLoader* aChild) { + return mPendingChildLoaders.AppendElement(aChild) != nullptr; + } + + bool RemovePendingChildLoader(nsScriptLoader* aLoader) { + return mPendingChildLoaders.RemoveElement(aLoader); + } + private: virtual ~nsScriptLoader(); @@ -302,10 +310,6 @@ private: return mEnabled && !mBlockerCount; } - bool AddPendingChildLoader(nsScriptLoader* aChild) { - return mPendingChildLoaders.AppendElement(aChild) != nullptr; - } - nsresult AttemptAsyncScriptParse(nsScriptLoadRequest* aRequest); nsresult ProcessRequest(nsScriptLoadRequest* aRequest, void **aOffThreadToken = nullptr); diff --git a/content/html/content/moz.build b/content/html/content/moz.build index 140507dd7127..7318432f13ae 100644 --- a/content/html/content/moz.build +++ b/content/html/content/moz.build @@ -8,6 +8,7 @@ DIRS += ['public', 'src'] MOCHITEST_MANIFESTS += [ 'test/forms/mochitest.ini', + 'test/imports/mochitest.ini', 'test/mochitest.ini', ] diff --git a/content/html/content/src/HTMLLinkElement.cpp b/content/html/content/src/HTMLLinkElement.cpp index 81a9934c8701..33c594aaf449 100644 --- a/content/html/content/src/HTMLLinkElement.cpp +++ b/content/html/content/src/HTMLLinkElement.cpp @@ -264,15 +264,6 @@ HTMLLinkElement::UpdateImport() return; } - // Until the script execution order is not sorted out for nested cases - // let's not allow them. - if (!doc->IsMasterDocument()) { - nsContentUtils::LogSimpleConsoleError( - NS_LITERAL_STRING("Nested imports are not supported yet"), - "Imports"); - return; - } - // 2. rel type should be import. nsAutoString rel; GetAttr(kNameSpaceID_None, nsGkAtoms::rel, rel); @@ -527,7 +518,7 @@ HTMLLinkElement::WrapNode(JSContext* aCx) already_AddRefed HTMLLinkElement::GetImport() { - return mImportLoader ? mImportLoader->GetImport() : nullptr; + return mImportLoader ? nsRefPtr(mImportLoader->GetImport()).forget() : nullptr; } } // namespace dom diff --git a/content/html/content/test/imports/file_importA1.html b/content/html/content/test/imports/file_importA1.html new file mode 100644 index 000000000000..ecce6f061232 --- /dev/null +++ b/content/html/content/test/imports/file_importA1.html @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/content/html/content/test/imports/file_importA2.html b/content/html/content/test/imports/file_importA2.html new file mode 100644 index 000000000000..d03e80a4b41f --- /dev/null +++ b/content/html/content/test/imports/file_importA2.html @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/content/html/content/test/imports/file_importB1.html b/content/html/content/test/imports/file_importB1.html new file mode 100644 index 000000000000..82fb55f9f61e --- /dev/null +++ b/content/html/content/test/imports/file_importB1.html @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/content/html/content/test/imports/file_importB2.html b/content/html/content/test/imports/file_importB2.html new file mode 100644 index 000000000000..01b6cc21584b --- /dev/null +++ b/content/html/content/test/imports/file_importB2.html @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC1.html b/content/html/content/test/imports/file_importC1.html new file mode 100644 index 000000000000..9ac117e65c9b --- /dev/null +++ b/content/html/content/test/imports/file_importC1.html @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC10.html b/content/html/content/test/imports/file_importC10.html new file mode 100644 index 000000000000..801d0f085574 --- /dev/null +++ b/content/html/content/test/imports/file_importC10.html @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC2.html b/content/html/content/test/imports/file_importC2.html new file mode 100644 index 000000000000..f0193be44999 --- /dev/null +++ b/content/html/content/test/imports/file_importC2.html @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC3.html b/content/html/content/test/imports/file_importC3.html new file mode 100644 index 000000000000..eb942b707f5a --- /dev/null +++ b/content/html/content/test/imports/file_importC3.html @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC4.html b/content/html/content/test/imports/file_importC4.html new file mode 100644 index 000000000000..5a172772ad93 --- /dev/null +++ b/content/html/content/test/imports/file_importC4.html @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC5.html b/content/html/content/test/imports/file_importC5.html new file mode 100644 index 000000000000..c29dc24ba06f --- /dev/null +++ b/content/html/content/test/imports/file_importC5.html @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC6.html b/content/html/content/test/imports/file_importC6.html new file mode 100644 index 000000000000..a53b62bb45ef --- /dev/null +++ b/content/html/content/test/imports/file_importC6.html @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC7.html b/content/html/content/test/imports/file_importC7.html new file mode 100644 index 000000000000..1c7d60114e06 --- /dev/null +++ b/content/html/content/test/imports/file_importC7.html @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC8.html b/content/html/content/test/imports/file_importC8.html new file mode 100644 index 000000000000..04bef617d392 --- /dev/null +++ b/content/html/content/test/imports/file_importC8.html @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC9.html b/content/html/content/test/imports/file_importC9.html new file mode 100644 index 000000000000..1a27497557f5 --- /dev/null +++ b/content/html/content/test/imports/file_importC9.html @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/content/html/content/test/imports/file_importD.html b/content/html/content/test/imports/file_importD.html new file mode 100644 index 000000000000..a4fbda536dd0 --- /dev/null +++ b/content/html/content/test/imports/file_importD.html @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/content/html/content/test/imports/file_importE.html b/content/html/content/test/imports/file_importE.html new file mode 100644 index 000000000000..6a8792acf2ad --- /dev/null +++ b/content/html/content/test/imports/file_importE.html @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/content/html/content/test/imports/mochitest.ini b/content/html/content/test/imports/mochitest.ini new file mode 100644 index 000000000000..c1a863ea8483 --- /dev/null +++ b/content/html/content/test/imports/mochitest.ini @@ -0,0 +1,20 @@ +[DEFAULT] +support-files = + file_importA1.html + file_importA2.html + file_importB1.html + file_importB2.html + file_importC1.html + file_importC2.html + file_importC3.html + file_importC4.html + file_importC5.html + file_importC6.html + file_importC7.html + file_importC8.html + file_importC9.html + file_importC10.html + file_importD.html + file_importE.html + + diff --git a/content/html/content/test/mochitest.ini b/content/html/content/test/mochitest.ini index df5499d15c14..4c8fc83edbdd 100644 --- a/content/html/content/test/mochitest.ini +++ b/content/html/content/test/mochitest.ini @@ -462,6 +462,8 @@ skip-if = buildapp == 'b2g' || e10s # b2g(multiple concurrent window.open()s fai [test_imports_basics.html] [test_imports_redirect.html] [test_imports_nonhttp.html] +[test_imports_nested.html] +[test_imports_nested_2.html] [test_li_attributes_reflection.html] [test_link_attributes_reflection.html] [test_link_sizes.html] diff --git a/content/html/content/test/test_imports_nested.html b/content/html/content/test/test_imports_nested.html new file mode 100644 index 000000000000..d6320884c440 --- /dev/null +++ b/content/html/content/test/test_imports_nested.html @@ -0,0 +1,41 @@ + + + + + Test for Bug 877072 + + + + + + Mozilla Bug 877072 + + + + + + + + + + \ No newline at end of file diff --git a/content/html/content/test/test_imports_nested_2.html b/content/html/content/test/test_imports_nested_2.html new file mode 100644 index 000000000000..d5ff72788453 --- /dev/null +++ b/content/html/content/test/test_imports_nested_2.html @@ -0,0 +1,56 @@ + + + + + Test for Bug 877072 + + + + + + Mozilla Bug 877072 + + + + + + + + + + + + \ No newline at end of file From 00cb5f712192b4c8f36bd77671812404130e6ccb Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 2 Sep 2014 12:23:06 +0200 Subject: [PATCH 033/139] Bug 1061229: Implement SIMD coercive calls; r=h4writer --HG-- extra : histedit_source : 5cc3742a5277422eaf7fb4bdf13b2cb55f2987fa --- js/src/builtin/SIMD.cpp | 27 ++++++-- .../ecma_6/TypedObject/simd/coercions.js | 66 +++++++++++++++++++ 2 files changed, 88 insertions(+), 5 deletions(-) create mode 100644 js/src/tests/ecma_6/TypedObject/simd/coercions.js diff --git a/js/src/builtin/SIMD.cpp b/js/src/builtin/SIMD.cpp index 069a9b3d019d..eb667a06e066 100644 --- a/js/src/builtin/SIMD.cpp +++ b/js/src/builtin/SIMD.cpp @@ -38,9 +38,8 @@ extern const JSFunctionSpec Int32x4Methods[]; static const char *laneNames[] = {"lane 0", "lane 1", "lane 2", "lane3"}; -template -bool -js::IsVectorObject(HandleValue v) +static bool +CheckVectorObject(HandleValue v, X4TypeDescr::Type expectedType) { if (!v.isObject()) return false; @@ -53,7 +52,14 @@ js::IsVectorObject(HandleValue v) if (typeRepr.kind() != type::X4) return false; - return typeRepr.as().type() == V::type; + return typeRepr.as().type() == expectedType; +} + +template +bool +js::IsVectorObject(HandleValue v) +{ + return CheckVectorObject(v, V::type); } template bool js::IsVectorObject(HandleValue v); @@ -300,6 +306,18 @@ X4TypeDescr::call(JSContext *cx, unsigned argc, Value *vp) CallArgs args = CallArgsFromVp(argc, vp); const unsigned LANES = 4; + Rooted descr(cx, &args.callee().as()); + if (args.length() == 1) { + // X4 type used as a coercion + if (!CheckVectorObject(args[0], descr->type())) { + JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr, JSMSG_SIMD_NOT_A_VECTOR); + return false; + } + + args.rval().setObject(args[0].toObject()); + return true; + } + if (args.length() < LANES) { JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr, JSMSG_MORE_ARGS_NEEDED, args.callee().getClass()->name, "3", "s"); @@ -312,7 +330,6 @@ X4TypeDescr::call(JSContext *cx, unsigned argc, Value *vp) return false; } - Rooted descr(cx, &args.callee().as()); Rooted result(cx, TypedObject::createZeroed(cx, descr, 0)); if (!result) return false; diff --git a/js/src/tests/ecma_6/TypedObject/simd/coercions.js b/js/src/tests/ecma_6/TypedObject/simd/coercions.js new file mode 100644 index 000000000000..06c34cca79d1 --- /dev/null +++ b/js/src/tests/ecma_6/TypedObject/simd/coercions.js @@ -0,0 +1,66 @@ +// |reftest| skip-if(!this.hasOwnProperty("SIMD")) +var BUGNUMBER = 1061229; +var float32x4 = SIMD.float32x4; +var int32x4 = SIMD.int32x4; +var {StructType, int32} = TypedObject; +var summary = 'constructors used as coercions'; + +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +function assertCaught(f) { + var caught = false; + var args = Array.slice(arguments, 1); + try { + f.apply(null, args); + } catch (e) { + caught = true; + print(e) + } + assertEq(caught, true); +} + +function test() { + var x = int32x4(1, 2, 3, 4); + var y = int32x4(x); + + assertEq(x, y); + + assertEq(y.x, x.x); + assertEq(y.x, 1); + assertEq(y.y, x.y); + assertEq(y.y, 2); + assertEq(y.z, x.z); + assertEq(y.z, 3); + assertEq(y.w, x.w); + assertEq(y.w, 4); + + assertCaught(int32x4, 3); + assertCaught(int32x4, float32x4(1, 2, 3, 4)); + assertCaught(int32x4, 'pony x 4'); + + var x = float32x4(NaN, 13.37, -Infinity, 4); + var y = float32x4(x); + + assertEq(x, y); + + assertEq(y.x, x.x); + assertEq(y.x, Math.fround(NaN)); + assertEq(y.y, x.y); + assertEq(y.y, Math.fround(13.37)); + assertEq(y.z, x.z); + assertEq(y.z, Math.fround(-Infinity)); + assertEq(y.w, x.w); + assertEq(y.w, Math.fround(4)); + + assertCaught(float32x4, 3); + assertCaught(float32x4, int32x4(1, 2, 3, 4)); + assertCaught(float32x4, 'pony x 4'); + + if (typeof reportCompare === "function") + reportCompare(true, true); +} + +test(); From 81af9774debc5b4bb7472f14ee820b196574e564 Mon Sep 17 00:00:00 2001 From: Cervantes Yu Date: Mon, 11 Aug 2014 15:50:20 +0800 Subject: [PATCH 034/139] Bug 1048011 - Fix a race condition that causes PProcLoaderParent leak. r=khuey --HG-- extra : rebase_source : d0230771da1992fab13681c9b5baa585d334d0cc --- ipc/glue/ProcessUtils_linux.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ipc/glue/ProcessUtils_linux.cpp b/ipc/glue/ProcessUtils_linux.cpp index 4a071d0baeab..9f7a84153ff1 100644 --- a/ipc/glue/ProcessUtils_linux.cpp +++ b/ipc/glue/ProcessUtils_linux.cpp @@ -122,12 +122,22 @@ public: void ProcLoaderParent::ActorDestroy(ActorDestroyReason aWhy) { + if (aWhy == AbnormalShutdown) { + NS_WARNING("ProcLoaderParent is destroyed abnormally."); + } + + if (sProcLoaderClientOnDeinit) { + // Get error for closing while the channel is already error. + return; + } + + // Destroy self asynchronously. + ProcLoaderClientDeinit(); } static void _ProcLoaderParentDestroy(PProcLoaderParent *aLoader) { - aLoader->Close(); delete aLoader; sProcLoaderClientOnDeinit = false; } @@ -136,7 +146,6 @@ bool ProcLoaderParent::RecvLoadComplete(const int32_t &aPid, const int32_t &aCookie) { - ProcLoaderClientDeinit(); return true; } From 05a80b0af1c2c4965868c4773ca3cda0b3d0dab4 Mon Sep 17 00:00:00 2001 From: Randell Jesup Date: Tue, 2 Sep 2014 04:52:45 -0400 Subject: [PATCH 035/139] Bug 1061475: fix crash in Loop calls on Macs due to Refresh() change r=gcp --- content/media/webrtc/MediaEngine.h | 5 +++ content/media/webrtc/MediaEngineWebRTC.cpp | 12 +++---- content/media/webrtc/MediaEngineWebRTC.h | 6 ---- .../media/webrtc/MediaEngineWebRTCVideo.cpp | 34 +++++++++++-------- 4 files changed, 30 insertions(+), 27 deletions(-) diff --git a/content/media/webrtc/MediaEngine.h b/content/media/webrtc/MediaEngine.h index b05f570228b0..43c7b9504429 100644 --- a/content/media/webrtc/MediaEngine.h +++ b/content/media/webrtc/MediaEngine.h @@ -83,6 +83,11 @@ protected: class MediaEngineSource : public nsISupports { public: + // code inside webrtc.org assumes these sizes; don't use anything smaller + // without verifying it's ok + static const unsigned int kMaxDeviceNameLength = 128; + static const unsigned int kMaxUniqueIdLength = 256; + virtual ~MediaEngineSource() {} /* Populate the human readable name of this device in the nsAString */ diff --git a/content/media/webrtc/MediaEngineWebRTC.cpp b/content/media/webrtc/MediaEngineWebRTC.cpp index ef55f4eb9d5b..a5b280bf2a4c 100644 --- a/content/media/webrtc/MediaEngineWebRTC.cpp +++ b/content/media/webrtc/MediaEngineWebRTC.cpp @@ -225,10 +225,8 @@ MediaEngineWebRTC::EnumerateVideoDevices(MediaSourceType aMediaSource, } for (int i = 0; i < num; i++) { - const unsigned int kMaxDeviceNameLength = 128; // XXX FIX! - const unsigned int kMaxUniqueIdLength = 256; - char deviceName[kMaxDeviceNameLength]; - char uniqueId[kMaxUniqueIdLength]; + char deviceName[MediaEngineSource::kMaxDeviceNameLength]; + char uniqueId[MediaEngineSource::kMaxUniqueIdLength]; // paranoia deviceName[0] = '\0'; @@ -246,10 +244,12 @@ MediaEngineWebRTC::EnumerateVideoDevices(MediaSourceType aMediaSource, LOG((" Capture Device Index %d, Name %s", i, deviceName)); webrtc::CaptureCapability cap; - int numCaps = ptrViECapture->NumberOfCapabilities(uniqueId, kMaxUniqueIdLength); + int numCaps = ptrViECapture->NumberOfCapabilities(uniqueId, + MediaEngineSource::kMaxUniqueIdLength); LOG(("Number of Capabilities %d", numCaps)); for (int j = 0; j < numCaps; j++) { - if (ptrViECapture->GetCaptureCapability(uniqueId, kMaxUniqueIdLength, + if (ptrViECapture->GetCaptureCapability(uniqueId, + MediaEngineSource::kMaxUniqueIdLength, j, cap ) != 0 ) { break; } diff --git a/content/media/webrtc/MediaEngineWebRTC.h b/content/media/webrtc/MediaEngineWebRTC.h index 0865710f448f..ca7fe54689dc 100644 --- a/content/media/webrtc/MediaEngineWebRTC.h +++ b/content/media/webrtc/MediaEngineWebRTC.h @@ -220,9 +220,6 @@ protected: ~MediaEngineWebRTCVideoSource() { Shutdown(); } private: - static const unsigned int KMaxDeviceNameLength = 128; - static const unsigned int KMaxUniqueIdLength = 256; - // Initialize the needed Video engine interfaces. void Init(); void Shutdown(); @@ -350,9 +347,6 @@ protected: int mSamples; private: - static const unsigned int KMaxDeviceNameLength = 128; - static const unsigned int KMaxUniqueIdLength = 256; - void Init(); void Shutdown(); diff --git a/content/media/webrtc/MediaEngineWebRTCVideo.cpp b/content/media/webrtc/MediaEngineWebRTCVideo.cpp index 5bf303a60685..1e381c1bc19c 100644 --- a/content/media/webrtc/MediaEngineWebRTCVideo.cpp +++ b/content/media/webrtc/MediaEngineWebRTCVideo.cpp @@ -218,7 +218,7 @@ MediaEngineWebRTCVideoSource::ChooseCapability( return GuessCapability(aConstraints, aPrefs); #else NS_ConvertUTF16toUTF8 uniqueId(mUniqueId); - int num = mViECapture->NumberOfCapabilities(uniqueId.get(), KMaxUniqueIdLength); + int num = mViECapture->NumberOfCapabilities(uniqueId.get(), kMaxUniqueIdLength); if (num <= 0) { // Mac doesn't support capabilities. return GuessCapability(aConstraints, aPrefs); @@ -240,7 +240,7 @@ MediaEngineWebRTCVideoSource::ChooseCapability( for (uint32_t i = 0; i < candidateSet.Length();) { webrtc::CaptureCapability cap; - mViECapture->GetCaptureCapability(uniqueId.get(), KMaxUniqueIdLength, + mViECapture->GetCaptureCapability(uniqueId.get(), kMaxUniqueIdLength, candidateSet[i], cap); if (!SatisfyConstraintSet(aConstraints.mRequired, cap)) { candidateSet.RemoveElementAt(i); @@ -260,7 +260,7 @@ MediaEngineWebRTCVideoSource::ChooseCapability( SourceSet rejects; for (uint32_t j = 0; j < candidateSet.Length();) { webrtc::CaptureCapability cap; - mViECapture->GetCaptureCapability(uniqueId.get(), KMaxUniqueIdLength, + mViECapture->GetCaptureCapability(uniqueId.get(), kMaxUniqueIdLength, candidateSet[j], cap); if (!SatisfyConstraintSet(array[i], cap)) { rejects.AppendElement(candidateSet[j]); @@ -288,7 +288,7 @@ MediaEngineWebRTCVideoSource::ChooseCapability( bool higher = true; for (uint32_t i = 0; i < candidateSet.Length(); i++) { mViECapture->GetCaptureCapability(NS_ConvertUTF16toUTF8(mUniqueId).get(), - KMaxUniqueIdLength, candidateSet[i], cap); + kMaxUniqueIdLength, candidateSet[i], cap); if (higher) { if (i == 0 || (mCapability.width > cap.width && mCapability.height > cap.height)) { @@ -451,7 +451,7 @@ MediaEngineWebRTCVideoSource::Allocate(const VideoTrackConstraintsN &aConstraint ChooseCapability(aConstraints, aPrefs); if (mViECapture->AllocateCaptureDevice(NS_ConvertUTF16toUTF8(mUniqueId).get(), - KMaxUniqueIdLength, mCaptureIndex)) { + kMaxUniqueIdLength, mCaptureIndex)) { return NS_ERROR_FAILURE; } mState = kAllocated; @@ -654,13 +654,11 @@ MediaEngineWebRTCVideoSource::Init() return; } - const uint32_t KMaxDeviceNameLength = 128; - const uint32_t KMaxUniqueIdLength = 256; - char deviceName[KMaxDeviceNameLength]; - char uniqueId[KMaxUniqueIdLength]; + char deviceName[kMaxDeviceNameLength]; + char uniqueId[kMaxUniqueIdLength]; if (mViECapture->GetCaptureDevice(mCaptureIndex, - deviceName, KMaxDeviceNameLength, - uniqueId, KMaxUniqueIdLength)) { + deviceName, kMaxDeviceNameLength, + uniqueId, kMaxUniqueIdLength)) { return; } @@ -707,15 +705,21 @@ void MediaEngineWebRTCVideoSource::Refresh(int aIndex) { // Caller looked up this source by uniqueId; since deviceName == uniqueId nothing else changes #else // Caller looked up this source by uniqueId, so it shouldn't change - const uint32_t KMaxDeviceNameLength = 128; - char deviceName[KMaxDeviceNameLength]; + char deviceName[kMaxDeviceNameLength]; + char uniqueId[kMaxUniqueIdLength]; + if (mViECapture->GetCaptureDevice(aIndex, - deviceName, KMaxDeviceNameLength, - nullptr, 0)) { + deviceName, sizeof(deviceName), + uniqueId, sizeof(uniqueId))) { return; } CopyUTF8toUTF16(deviceName, mDeviceName); +#ifdef DEBUG + nsString temp; + CopyUTF8toUTF16(uniqueId, temp); + MOZ_ASSERT(temp.Equals(mUniqueId)); +#endif #endif } From e95ac795adbd9376e435a23f9feed84ff8efffd9 Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Tue, 2 Sep 2014 13:56:44 +0200 Subject: [PATCH 036/139] Backed out changeset 6baeffddba47 (bug 1060279) for regressions --- testing/marionette/client/marionette/runner/mixins/b2g.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/marionette/client/marionette/runner/mixins/b2g.py b/testing/marionette/client/marionette/runner/mixins/b2g.py index 0adbc30f0725..129fb882c4f7 100644 --- a/testing/marionette/client/marionette/runner/mixins/b2g.py +++ b/testing/marionette/client/marionette/runner/mixins/b2g.py @@ -43,7 +43,7 @@ class B2GTestCaseMixin(object): capabilities = self.marionette.session and \ self.marionette.session_capabilities or {} if not self._device_manager and \ - capabilities.get('platform').lower() == 'android': + capabilities.get('device') != 'desktop': self._device_manager = get_dm(self.marionette, **kwargs) return self._device_manager From c1d9ac4e02d2d662f71bd4948c9e6fa41d6711c7 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Tue, 2 Sep 2014 14:05:00 +0200 Subject: [PATCH 037/139] Bug 1059793 - Mark the compositor's gl context destroyed before the widget is gone. r=jgilbert --- gfx/gl/GLContext.h | 7 +++---- gfx/layers/opengl/CompositorOGL.cpp | 7 +++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gfx/gl/GLContext.h b/gfx/gl/GLContext.h index 5f811942d870..ed73c9b31815 100644 --- a/gfx/gl/GLContext.h +++ b/gfx/gl/GLContext.h @@ -2641,6 +2641,9 @@ protected: public: virtual ~GLContext(); + // Mark this context as destroyed. This will nullptr out all + // the GL function pointers! + void MarkDestroyed(); // ----------------------------------------------------------------------------- // Everything that isn't standard GL APIs @@ -2683,10 +2686,6 @@ public: virtual void ReleaseSurface() {} - // Mark this context as destroyed. This will nullptr out all - // the GL function pointers! - void MarkDestroyed(); - bool IsDestroyed() { // MarkDestroyed will mark all these as null. return mSymbols.fUseProgram == nullptr; diff --git a/gfx/layers/opengl/CompositorOGL.cpp b/gfx/layers/opengl/CompositorOGL.cpp index a6b22af7cdcd..020d1bfa14e7 100644 --- a/gfx/layers/opengl/CompositorOGL.cpp +++ b/gfx/layers/opengl/CompositorOGL.cpp @@ -173,6 +173,13 @@ CompositorOGL::CleanupResources() mQuadVBO = 0; } + // On the main thread the Widget will be destroyed soon and calling MakeCurrent + // after that could cause a crash (at least with GLX, see bug 1059793), unless + // context is marked as destroyed. + // There may be some textures still alive that will try to call MakeCurrent on + // the context so let's make sure it is marked destroyed now. + mGLContext->MarkDestroyed(); + mGLContext = nullptr; } From 3757c2f101c8dbe380a86069c6719b0cbbf80d58 Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Tue, 2 Sep 2014 14:05:49 +0200 Subject: [PATCH 038/139] Bug 1055661 - Add Matrix5x4::operator== which does exact equality comparison. f=Milan, r=Bas --- gfx/2d/Matrix.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gfx/2d/Matrix.h b/gfx/2d/Matrix.h index 9867df9c595e..d461a721084f 100644 --- a/gfx/2d/Matrix.h +++ b/gfx/2d/Matrix.h @@ -750,6 +750,20 @@ public: , _51(a51), _52(a52), _53(a53), _54(a54) {} + bool operator==(const Matrix5x4 &o) const + { + return _11 == o._11 && _12 == o._12 && _13 == o._13 && _14 == o._14 && + _21 == o._21 && _22 == o._22 && _23 == o._23 && _24 == o._24 && + _31 == o._31 && _32 == o._32 && _33 == o._33 && _34 == o._34 && + _41 == o._41 && _42 == o._42 && _43 == o._43 && _44 == o._44 && + _51 == o._51 && _52 == o._52 && _53 == o._53 && _54 == o._54; + } + + bool operator!=(const Matrix5x4 &aMatrix) const + { + return !(*this == aMatrix); + } + Matrix5x4 operator*(const Matrix5x4 &aMatrix) const { Matrix5x4 resultMatrix; From 16ca30512b93d13ee226953e3e9f6bca722bca68 Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Tue, 2 Sep 2014 14:06:01 +0200 Subject: [PATCH 039/139] Bug 1055661 - Add Matrix5x4::operator*=. f=milan, r=Bas --- gfx/2d/Matrix.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gfx/2d/Matrix.h b/gfx/2d/Matrix.h index d461a721084f..fe13eff930a7 100644 --- a/gfx/2d/Matrix.h +++ b/gfx/2d/Matrix.h @@ -166,8 +166,8 @@ public: Matrix& operator*=(const Matrix &aMatrix) { - Matrix resultMatrix = *this * aMatrix; - return *this = resultMatrix; + *this = *this * aMatrix; + return *this; } /* Returns true if the other matrix is fuzzy-equal to this matrix. @@ -572,8 +572,8 @@ public: Matrix4x4& operator*=(const Matrix4x4 &aMatrix) { - Matrix4x4 resultMatrix = *this * aMatrix; - return *this = resultMatrix; + *this = *this * aMatrix; + return *this; } /* Returns true if the matrix is an identity matrix. @@ -792,6 +792,12 @@ public: return resultMatrix; } + Matrix5x4& operator*=(const Matrix5x4 &aMatrix) + { + *this = *this * aMatrix; + return *this; + } + Float _11, _12, _13, _14; Float _21, _22, _23, _24; Float _31, _32, _33, _34; From d86f60a1d7bb4f176c2d0fb94f6833cace46d95f Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Tue, 2 Sep 2014 14:09:21 +0200 Subject: [PATCH 040/139] Bug 1055646 - Fix a typo in the blur shader. r=nical --- gfx/layers/opengl/OGLShaderProgram.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/layers/opengl/OGLShaderProgram.cpp b/gfx/layers/opengl/OGLShaderProgram.cpp index 4cf0733f152b..4abe986fb4e8 100644 --- a/gfx/layers/opengl/OGLShaderProgram.cpp +++ b/gfx/layers/opengl/OGLShaderProgram.cpp @@ -312,7 +312,7 @@ For [0,1] instead of [0,255], and to 5 places: fs << "vec4 blur(vec4 color, vec2 coord) {" << endl; fs << " vec4 total = color * uBlurGaussianKernel[0];" << endl; fs << " for (int i = 1; i < " << GAUSSIAN_KERNEL_HALF_WIDTH << "; ++i) {" << endl; - fs << " float r = float(i) * " << GAUSSIAN_KERNEL_STEP << " << endl;" << endl; + fs << " float r = float(i) * " << GAUSSIAN_KERNEL_STEP << ";" << endl; fs << " float k = uBlurGaussianKernel[i];" << endl; fs << " total += sampleAtRadius(coord, r) * k;" << endl; fs << " total += sampleAtRadius(coord, -r) * k;" << endl; From df8cc49a5e1936a4e62bbe2fdc9a0804062df14e Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Tue, 2 Sep 2014 14:09:26 +0200 Subject: [PATCH 041/139] Bug 1055646 - Allow setting the uniforms of the blur shader on ShaderProgramOGL. r=nical --- gfx/layers/opengl/OGLShaderProgram.cpp | 24 ++++++++++++++++ gfx/layers/opengl/OGLShaderProgram.h | 39 ++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/gfx/layers/opengl/OGLShaderProgram.cpp b/gfx/layers/opengl/OGLShaderProgram.cpp index 4abe986fb4e8..faf49f3ebe3e 100644 --- a/gfx/layers/opengl/OGLShaderProgram.cpp +++ b/gfx/layers/opengl/OGLShaderProgram.cpp @@ -49,6 +49,10 @@ AddUniforms(ProgramProfileOGL& aProfile) "uTexturePass2", "uColorMatrix", "uColorMatrixVector", + "uBlurRadius", + "uBlurOffset", + "uBlurAlpha", + "uBlurGaussianKernel", nullptr }; @@ -549,5 +553,25 @@ ShaderProgramOGL::Activate() mGL->fUseProgram(mProgram); } +void +ShaderProgramOGL::SetBlurRadius(float aRX, float aRY) +{ + float f[] = {aRX, aRY}; + SetUniform(KnownUniform::BlurRadius, 2, f); + + float gaussianKernel[GAUSSIAN_KERNEL_HALF_WIDTH]; + float sum = 0.0f; + for (int i = 0; i < GAUSSIAN_KERNEL_HALF_WIDTH; i++) { + float x = i * GAUSSIAN_KERNEL_STEP; + float sigma = 1.0f; + gaussianKernel[i] = exp(-x * x / (2 * sigma * sigma)) / sqrt(2 * M_PI * sigma * sigma); + sum += gaussianKernel[i] * (i == 0 ? 1 : 2); + } + for (int i = 0; i < GAUSSIAN_KERNEL_HALF_WIDTH; i++) { + gaussianKernel[i] /= sum; + } + SetArrayUniform(KnownUniform::BlurGaussianKernel, GAUSSIAN_KERNEL_HALF_WIDTH, gaussianKernel); +} + } /* layers */ } /* mozilla */ diff --git a/gfx/layers/opengl/OGLShaderProgram.h b/gfx/layers/opengl/OGLShaderProgram.h index 51ecaaeed360..a7305809fa20 100644 --- a/gfx/layers/opengl/OGLShaderProgram.h +++ b/gfx/layers/opengl/OGLShaderProgram.h @@ -70,6 +70,10 @@ public: TexturePass2, ColorMatrix, ColorMatrixVector, + BlurRadius, + BlurOffset, + BlurAlpha, + BlurGaussianKernel, KnownUniformCount }; @@ -147,6 +151,19 @@ public: return false; } + bool UpdateArrayUniform(int cnt, const float *fp) { + if (mLocation == -1) return false; + if (cnt > 16) { + return false; + } + + if (memcmp(mValue.f16v, fp, sizeof(float) * cnt) != 0) { + memcpy(mValue.f16v, fp, sizeof(float) * cnt); + return true; + } + return false; + } + KnownUniformName mName; const char *mNameString; int32_t mLocation; @@ -389,6 +406,17 @@ public: SetUniform(KnownUniform::TexturePass2, aFlag ? 1 : 0); } + void SetBlurRadius(float aRX, float aRY); + + void SetBlurAlpha(float aAlpha) { + SetUniform(KnownUniform::BlurAlpha, aAlpha); + } + + void SetBlurOffset(float aOffsetX, float aOffsetY) { + float f[] = {aOffsetX, aOffsetY}; + SetUniform(KnownUniform::BlurOffset, 2, f); + } + size_t GetTextureCount() const { return mProfile.mTextureCount; } @@ -459,6 +487,17 @@ protected: } } + void SetArrayUniform(KnownUniform::KnownUniformName aKnownUniform, int aLength, float *aFloatValues) + { + ASSERT_THIS_PROGRAM; + NS_ASSERTION(aKnownUniform >= 0 && aKnownUniform < KnownUniform::KnownUniformCount, "Invalid known uniform"); + + KnownUniform& ku(mProfile.mUniforms[aKnownUniform]); + if (ku.UpdateArrayUniform(aLength, aFloatValues)) { + mGL->fUniform1fv(ku.mLocation, aLength, ku.mValue.f16v); + } + } + void SetUniform(KnownUniform::KnownUniformName aKnownUniform, GLint aIntValue) { ASSERT_THIS_PROGRAM; NS_ASSERTION(aKnownUniform >= 0 && aKnownUniform < KnownUniform::KnownUniformCount, "Invalid known uniform"); From 81d2189d353dc80697dbe8eb2f25cad3a1cb722b Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Tue, 2 Sep 2014 14:54:22 +0200 Subject: [PATCH 042/139] Backed out changeset 9678f9a596d8 (bug 877072) for B2G ICS Emulator Debug m3 and m5 test failures --- content/base/public/nsIDocument.h | 14 +- content/base/src/ImportManager.cpp | 360 +----------------- content/base/src/ImportManager.h | 131 +------ content/base/src/nsDocument.cpp | 3 - content/base/src/nsDocument.h | 34 +- content/base/src/nsScriptLoader.cpp | 39 +- content/base/src/nsScriptLoader.h | 12 +- content/html/content/moz.build | 1 - content/html/content/src/HTMLLinkElement.cpp | 11 +- .../content/test/imports/file_importA1.html | 11 - .../content/test/imports/file_importA2.html | 10 - .../content/test/imports/file_importB1.html | 11 - .../content/test/imports/file_importB2.html | 10 - .../content/test/imports/file_importC1.html | 11 - .../content/test/imports/file_importC10.html | 11 - .../content/test/imports/file_importC2.html | 11 - .../content/test/imports/file_importC3.html | 11 - .../content/test/imports/file_importC4.html | 11 - .../content/test/imports/file_importC5.html | 11 - .../content/test/imports/file_importC6.html | 11 - .../content/test/imports/file_importC7.html | 11 - .../content/test/imports/file_importC8.html | 11 - .../content/test/imports/file_importC9.html | 11 - .../content/test/imports/file_importD.html | 8 - .../content/test/imports/file_importE.html | 11 - .../html/content/test/imports/mochitest.ini | 20 - content/html/content/test/mochitest.ini | 2 - .../content/test/test_imports_nested.html | 41 -- .../content/test/test_imports_nested_2.html | 56 --- 29 files changed, 42 insertions(+), 853 deletions(-) delete mode 100644 content/html/content/test/imports/file_importA1.html delete mode 100644 content/html/content/test/imports/file_importA2.html delete mode 100644 content/html/content/test/imports/file_importB1.html delete mode 100644 content/html/content/test/imports/file_importB2.html delete mode 100644 content/html/content/test/imports/file_importC1.html delete mode 100644 content/html/content/test/imports/file_importC10.html delete mode 100644 content/html/content/test/imports/file_importC2.html delete mode 100644 content/html/content/test/imports/file_importC3.html delete mode 100644 content/html/content/test/imports/file_importC4.html delete mode 100644 content/html/content/test/imports/file_importC5.html delete mode 100644 content/html/content/test/imports/file_importC6.html delete mode 100644 content/html/content/test/imports/file_importC7.html delete mode 100644 content/html/content/test/imports/file_importC8.html delete mode 100644 content/html/content/test/imports/file_importC9.html delete mode 100644 content/html/content/test/imports/file_importD.html delete mode 100644 content/html/content/test/imports/file_importE.html delete mode 100644 content/html/content/test/imports/mochitest.ini delete mode 100644 content/html/content/test/test_imports_nested.html delete mode 100644 content/html/content/test/test_imports_nested_2.html diff --git a/content/base/public/nsIDocument.h b/content/base/public/nsIDocument.h index 90d33d3404fd..c302b48d33ab 100644 --- a/content/base/public/nsIDocument.h +++ b/content/base/public/nsIDocument.h @@ -133,8 +133,8 @@ typedef CallbackObjectHolder NodeFilterHolder; } // namespace mozilla #define NS_IDOCUMENT_IID \ -{ 0x42a263db, 0x6ac6, 0x40ff, \ - { 0x89, 0xe2, 0x25, 0x12, 0xe4, 0xbc, 0x2d, 0x2d } } +{ 0x613ea294, 0x0288, 0x48b4, \ + { 0x9e, 0x7b, 0x0f, 0xe9, 0x3f, 0x8c, 0xf8, 0x95 } } // Enum for requesting a particular type of document when creating a doc enum DocumentFlavor { @@ -2353,15 +2353,11 @@ public: // Each import tree has exactly one master document which is // the root of the tree, and owns the browser context. - virtual nsIDocument* MasterDocument() = 0; + virtual already_AddRefed MasterDocument() = 0; virtual void SetMasterDocument(nsIDocument* master) = 0; virtual bool IsMasterDocument() = 0; - virtual mozilla::dom::ImportManager* ImportManager() = 0; - // We keep track of the order of sub imports were added to the document. - virtual bool HasSubImportLink(nsINode* aLink) = 0; - virtual uint32_t IndexOfSubImportLink(nsINode* aLink) = 0; - virtual void AddSubImportLink(nsINode* aLink) = 0; - virtual nsINode* GetSubImportLink(uint32_t aIdx) = 0; + virtual already_AddRefed ImportManager() = 0; + /* * Given a node, get a weak reference to it and append that reference to * mBlockedTrackingNodes. Can be used later on to look up a node in it. diff --git a/content/base/src/ImportManager.cpp b/content/base/src/ImportManager.cpp index a16df3b6e0d5..63a2fcdd094d 100644 --- a/content/base/src/ImportManager.cpp +++ b/content/base/src/ImportManager.cpp @@ -23,10 +23,6 @@ #include "nsScriptLoader.h" #include "nsNetUtil.h" -//----------------------------------------------------------------------------- -// AutoError -//----------------------------------------------------------------------------- - class AutoError { public: explicit AutoError(mozilla::dom::ImportLoader* loader, bool scriptsBlocked = true) @@ -53,212 +49,6 @@ private: namespace mozilla { namespace dom { -//----------------------------------------------------------------------------- -// ImportLoader::Updater -//----------------------------------------------------------------------------- - -void -ImportLoader::Updater::GetReferrerChain(nsINode* aNode, - nsTArray& aResult) -{ - // We fill up the array backward. First the last link: aNode. - MOZ_ASSERT(mLoader->mLinks.Contains(aNode)); - - aResult.AppendElement(aNode); - nsINode* node = aNode; - nsRefPtr manager = mLoader->Manager(); - for (ImportLoader* referrersLoader = manager->Find(node->OwnerDoc()); - referrersLoader; - referrersLoader = manager->Find(node->OwnerDoc())) - { - // Then walking up the main referrer chain and append each link - // to the array. - node = referrersLoader->GetMainReferrer(); - MOZ_ASSERT(node); - aResult.AppendElement(node); - } - - // The reversed order is more useful for consumers. - // XXX: This should probably go to nsTArray or some generic utility - // lib for our containers that we don't have... I would really like to - // get rid of this part... - uint32_t l = aResult.Length(); - for (uint32_t i = 0; i < l / 2; i++) { - Swap(aResult[i], aResult[l - i - 1]); - } -} - -bool -ImportLoader::Updater::ShouldUpdate(nsTArray& aNewPath) -{ - // Let's walk down on the main referrer chains of both the current main and - // the new link, and find the last pair of links that are from the same - // document. This is the junction point between the two referrer chain. Their - // order in the subimport list of that document will determine if we have to - // update the spanning tree or this new edge changes nothing in the script - // execution order. - nsTArray oldPath; - GetReferrerChain(mLoader->mLinks[mLoader->mMainReferrer], oldPath); - uint32_t max = std::min(oldPath.Length(), aNewPath.Length()); - MOZ_ASSERT(max > 0); - uint32_t lastCommonImportAncestor = 0; - - for (uint32_t i = 0; - i < max && oldPath[i]->OwnerDoc() == aNewPath[i]->OwnerDoc(); - i++) - { - lastCommonImportAncestor = i; - } - - MOZ_ASSERT(lastCommonImportAncestor < max); - nsINode* oldLink = oldPath[lastCommonImportAncestor]; - nsINode* newLink = aNewPath[lastCommonImportAncestor]; - - if ((lastCommonImportAncestor == max - 1) && - newLink == oldLink ) { - // If one chain contains the other entirely, then this is a simple cycle, - // nothing to be done here. - MOZ_ASSERT(oldPath.Length() != aNewPath.Length(), - "This would mean that new link == main referrer link"); - return false; - } - - MOZ_ASSERT(aNewPath != oldPath, - "How could this happen?"); - nsIDocument* doc = oldLink->OwnerDoc(); - MOZ_ASSERT(doc->HasSubImportLink(newLink)); - MOZ_ASSERT(doc->HasSubImportLink(oldLink)); - - return doc->IndexOfSubImportLink(newLink) < doc->IndexOfSubImportLink(oldLink); -} - -void -ImportLoader::Updater::UpdateMainReferrer(uint32_t aNewIdx) -{ - MOZ_ASSERT(aNewIdx < mLoader->mLinks.Length()); - nsINode* newMainReferrer = mLoader->mLinks[aNewIdx]; - // This new link means we have to execute our scripts sooner... - if (mLoader->mDocument) { - // Our nearest predecessor has changed. So let's remove our pending - // ScriptLoader from the old one. - nsRefPtr manager = mLoader->Manager(); - nsScriptLoader* loader = mLoader->mDocument->ScriptLoader(); - ImportLoader*& pred = mLoader->mBlockingPredecessor; - if (pred) { - pred->RemoveBlockedScriptLoader(loader); - } - // And add it to the new one if there is any. - pred = manager->GetNearestPredecessor(newMainReferrer); - if (pred) { - pred->AddBlockedScriptLoader(loader); - } - } - if (mLoader->IsBlocking()) { - // Our import parent is changed as well, let's unblock it and block - // the new one. - mLoader->mImportParent->ScriptLoader()->RemoveExecuteBlocker(); - newMainReferrer->OwnerDoc()->ScriptLoader()->AddExecuteBlocker(); - } - // Finally update mMainReferrer to point to the newly added link. - mLoader->mMainReferrer = aNewIdx; - mLoader->mImportParent = newMainReferrer->OwnerDoc(); -} - -nsINode* -ImportLoader::Updater::NextDependant(nsINode* aCurrentLink, - nsTArray& aPath, - NodeTable& aVisitedNodes, bool aSkipChildren) -{ - // Depth first graph traversal. - if (!aSkipChildren) { - // "first child" - ImportLoader* loader = mLoader->Manager()->Find(aCurrentLink); - if (loader && loader->GetDocument()) { - nsINode* firstSubImport = loader->GetDocument()->GetSubImportLink(0); - if (firstSubImport && !aVisitedNodes.Contains(firstSubImport)) { - aPath.AppendElement(aCurrentLink); - aVisitedNodes.PutEntry(firstSubImport); - return firstSubImport; - } - } - } - - aPath.AppendElement(aCurrentLink); - // "(parent's) next sibling" - while(aPath.Length() > 1) { - aCurrentLink = aPath[aPath.Length() - 1]; - aPath.RemoveElementAt(aPath.Length() - 1); - - // Let's find the next "sibling" - ImportLoader* loader = mLoader->Manager()->Find(aCurrentLink->OwnerDoc()); - MOZ_ASSERT(loader && loader->GetDocument(), "How can this happend?"); - nsIDocument* doc = loader->GetDocument(); - MOZ_ASSERT(doc->HasSubImportLink(aCurrentLink)); - uint32_t idx = doc->IndexOfSubImportLink(aCurrentLink); - nsINode* next = doc->GetSubImportLink(idx + 1); - if (next) { - // Note: If we found an already visited link that means the parent links has - // closed the circle it's always the "first child" section that should find - // the first already visited node. Let's just assert that. - MOZ_ASSERT(!aVisitedNodes.Contains(next)); - aVisitedNodes.PutEntry(next); - return next; - } - } - - return nullptr; -} - -void -ImportLoader::Updater::UpdateDependants(nsINode* aNode, - nsTArray& aPath) -{ - NodeTable visitedNodes; - nsINode* current = aNode; - uint32_t initialLength = aPath.Length(); - bool neededUpdate = true; - while ((current = NextDependant(current, aPath, visitedNodes, !neededUpdate))) { - if (!current || aPath.Length() <= initialLength) { - break; - } - ImportLoader* loader = mLoader->Manager()->Find(current); - if (!loader) { - continue; - } - Updater& updater = loader->mUpdater; - neededUpdate = updater.ShouldUpdate(aPath); - if (neededUpdate) { - updater.UpdateMainReferrer(loader->mLinks.IndexOf(current)); - } - } -} - -void -ImportLoader::Updater::UpdateSpanningTree(nsINode* aNode) -{ - if (mLoader->mReady || mLoader->mStopped) { - // Scripts already executed, nothing to be done here. - return; - } - - if (mLoader->mLinks.Length() == 1) { - // If this is the first referrer, let's mark it. - mLoader->mMainReferrer = 0; - return; - } - - nsTArray newReferrerChain; - GetReferrerChain(aNode, newReferrerChain); - if (ShouldUpdate(newReferrerChain)) { - UpdateMainReferrer(mLoader->mLinks.Length() - 1); - UpdateDependants(aNode, newReferrerChain); - } -} - -//----------------------------------------------------------------------------- -// ImportLoader -//----------------------------------------------------------------------------- - NS_INTERFACE_MAP_BEGIN(ImportLoader) NS_INTERFACE_MAP_ENTRY(nsIStreamListener) NS_INTERFACE_MAP_ENTRY(nsIRequestObserver) @@ -276,13 +66,10 @@ NS_IMPL_CYCLE_COLLECTION(ImportLoader, ImportLoader::ImportLoader(nsIURI* aURI, nsIDocument* aImportParent) : mURI(aURI) , mImportParent(aImportParent) - , mBlockingPredecessor(nullptr) , mReady(false) , mStopped(false) , mBlockingScripts(false) - , mUpdater(MOZ_THIS_IN_INITIALIZER_LIST()) -{ -} +{} void ImportLoader::BlockScripts() @@ -297,18 +84,9 @@ ImportLoader::UnblockScripts() { MOZ_ASSERT(mBlockingScripts); mImportParent->ScriptLoader()->RemoveExecuteBlocker(); - // We probably should do a clever assertion here to see - // if our ScriptLoader unblocked all these ScriptLoaders. - mBlockedScriptLoaders.Clear(); mBlockingScripts = false; } -void -ImportLoader::SetBlockingPredecessor(ImportLoader* aLoader) -{ - mBlockingPredecessor = aLoader; -} - void ImportLoader::DispatchEventIfFinished(nsINode* aNode) { @@ -321,33 +99,6 @@ ImportLoader::DispatchEventIfFinished(nsINode* aNode) } } -void -ImportLoader::AddBlockedScriptLoader(nsScriptLoader* aScriptLoader) -{ - MOZ_ASSERT(!mBlockedScriptLoaders.Contains(aScriptLoader), - "Same scripts loader should be added only once"); - - aScriptLoader->AddExecuteBlocker(); - - if (mDocument) { - // If the document is ready we can just add the pending script loader - // to it. Otherwise we will add them once the document is created. - mDocument->ScriptLoader()->AddPendingChildLoader(aScriptLoader); - } - // Let's keep track of the pending script loaders. - mBlockedScriptLoaders.AppendElement(aScriptLoader); -} - -bool -ImportLoader::RemoveBlockedScriptLoader(nsScriptLoader* aScriptLoader) -{ - aScriptLoader->RemoveExecuteBlocker(); - if (mDocument) { - mDocument->ScriptLoader()->RemovePendingChildLoader(aScriptLoader); - } - return mBlockedScriptLoaders.RemoveElement(aScriptLoader); -} - void ImportLoader::AddLinkElement(nsINode* aNode) { @@ -355,15 +106,14 @@ ImportLoader::AddLinkElement(nsINode* aNode) // refers to an import that is already finished loading or // stopped trying, we need to fire the corresponding event // on it. - mLinks.AppendElement(aNode); - mUpdater.UpdateSpanningTree(aNode); + mLinks.AppendObject(aNode); DispatchEventIfFinished(aNode); } void ImportLoader::RemoveLinkElement(nsINode* aNode) { - mLinks.RemoveElement(aNode); + mLinks.RemoveObject(aNode); } // Events has to be fired with a script runner, so mImport can @@ -409,8 +159,8 @@ void ImportLoader::Done() { mReady = true; - uint32_t l = mLinks.Length(); - for (uint32_t i = 0; i < l; i++) { + uint32_t count = mLinks.Count(); + for (uint32_t i = 0; i < count; i++) { DispatchLoadEvent(mLinks[i]); } UnblockScripts(); @@ -422,8 +172,8 @@ ImportLoader::Error(bool aUnblockScripts) { mDocument = nullptr; mStopped = true; - uint32_t l = mLinks.Length(); - for (uint32_t i = 0; i < l; i++) { + uint32_t count = mLinks.Count(); + for (uint32_t i = 0; i < count; i++) { DispatchErrorEvent(mLinks[i]); } if (aUnblockScripts) { @@ -625,10 +375,6 @@ ImportLoader::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) nsCOMPtr master = mImportParent->MasterDocument(); mDocument->SetMasterDocument(master); - for (uint32_t i = 0; i < mBlockedScriptLoaders.Length(); i++) { - mDocument->ScriptLoader()->AddPendingChildLoader(mBlockedScriptLoaders[i]); - } - // We have to connect the blank document we created with the channel we opened, // and create its own LoadGroup for it. nsCOMPtr listener; @@ -642,25 +388,7 @@ ImportLoader::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) true); NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_ABORT_ERR); - nsCOMPtr originalURI; - rv = channel->GetOriginalURI(getter_AddRefs(originalURI)); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_ABORT_ERR); - - nsCOMPtr URI; - rv = channel->GetURI(getter_AddRefs(URI)); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_ABORT_ERR); - MOZ_ASSERT(URI, "URI of a channel should never be null"); - - bool equals; - rv = URI->Equals(originalURI, &equals); - NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_ABORT_ERR); - - if (!equals) { - // In case of a redirection we must add the new URI to the import map. - Manager()->AddLoaderWithNewURI(this, URI); - } - - // Let's start the parser. + // Let's start parser. mParserStreamListener = listener; rv = listener->OnStartRequest(aRequest, aContext); NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_ABORT_ERR); @@ -669,10 +397,6 @@ ImportLoader::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) return NS_OK; } -//----------------------------------------------------------------------------- -// ImportManager -//----------------------------------------------------------------------------- - NS_IMPL_CYCLE_COLLECTION(ImportManager, mImports) @@ -690,78 +414,16 @@ ImportManager::Get(nsIURI* aURI, nsINode* aNode, nsIDocument* aOrigDocument) // and start it up. nsRefPtr loader; mImports.Get(aURI, getter_AddRefs(loader)); - bool needToStart = false; + if (!loader) { loader = new ImportLoader(aURI, aOrigDocument); mImports.Put(aURI, loader); - needToStart = true; - } - - MOZ_ASSERT(loader); - // Let's keep track of the sub imports links in each document. It will - // be used later for scrip execution order calculation. (see UpdateSpanningTree) - // NOTE: removing and adding back the link to the tree somewhere else will - // NOT have an effect on script execution order. - if (!aOrigDocument->HasSubImportLink(aNode)) { - aOrigDocument->AddSubImportLink(aNode); - } - - loader->AddLinkElement(aNode); - - if (needToStart) { loader->Open(); } - + loader->AddLinkElement(aNode); + MOZ_ASSERT(loader); return loader.forget(); } -ImportLoader* -ImportManager::Find(nsIDocument* aImport) -{ - return mImports.GetWeak(aImport->GetDocumentURIObject()); -} - -ImportLoader* -ImportManager::Find(nsINode* aLink) -{ - HTMLLinkElement* linkElement = static_cast(aLink); - nsCOMPtr uri = linkElement->GetHrefURI(); - return mImports.GetWeak(uri); -} - -void -ImportManager::AddLoaderWithNewURI(ImportLoader* aLoader, nsIURI* aNewURI) -{ - mImports.Put(aNewURI, aLoader); -} - -nsRefPtr ImportManager::GetNearestPredecessor(nsINode* aNode) -{ - // Return the previous link if there is any in the same document. - nsIDocument* doc = aNode->OwnerDoc(); - int32_t idx = doc->IndexOfSubImportLink(aNode); - MOZ_ASSERT(idx != -1, "aNode must be a sub import link of its owner document"); - if (idx == 0) { - if (doc->IsMasterDocument()) { - // If there is no previous one, and it was the master document, then - // there is no predecessor. - return nullptr; - } - // Else we find the main referrer of the import parent of the link's document. - // And do a recursion. - ImportLoader* owner = Find(doc); - MOZ_ASSERT(owner); - nsCOMPtr mainReferrer = owner->GetMainReferrer(); - return GetNearestPredecessor(mainReferrer); - } - MOZ_ASSERT(idx > 0); - HTMLLinkElement* link = - static_cast(doc->GetSubImportLink(idx - 1)); - nsCOMPtr uri = link->GetHrefURI(); - nsRefPtr ret; - mImports.Get(uri, getter_AddRefs(ret)); - return ret; -} - } // namespace dom } // namespace mozilla diff --git a/content/base/src/ImportManager.h b/content/base/src/ImportManager.h index 4ce97ebc8e43..ba6199418046 100644 --- a/content/base/src/ImportManager.h +++ b/content/base/src/ImportManager.h @@ -39,13 +39,12 @@ #ifndef mozilla_dom_ImportManager_h__ #define mozilla_dom_ImportManager_h__ -#include "nsTArray.h" +#include "nsCOMArray.h" #include "nsCycleCollectionParticipant.h" #include "nsIDOMEventListener.h" #include "nsIStreamListener.h" #include "nsIWeakReferenceUtils.h" #include "nsRefPtrHashtable.h" -#include "nsScriptLoader.h" #include "nsURIHashKey.h" class nsIDocument; @@ -59,70 +58,11 @@ namespace dom { class ImportManager; -typedef nsTHashtable> NodeTable; - class ImportLoader MOZ_FINAL : public nsIStreamListener , public nsIDOMEventListener { - - // A helper inner class to decouple the logic of updating the import graph - // after a new import link has been found by one of the parsers. - class Updater { - - public: - Updater(ImportLoader* aLoader) : mLoader(aLoader) - {} - - // After a new link is added that refers to this import, we - // have to update the spanning tree, since given this new link the - // priority of this import might be higher in the scripts - // execution order than before. It updates mMainReferrer, mImportParent, - // the corresponding pending ScriptRunners, etc. - // It also handles updating additional dependant loaders via the - // UpdateDependants calls. - // (NOTE: See GetMainReferrer about spanning tree.) - void UpdateSpanningTree(nsINode* aNode); - - private: - // Returns an array of links that forms a referring chain from - // the master document to this import. Each link in the array - // is marked as main referrer in the list. - void GetReferrerChain(nsINode* aNode, nsTArray& aResult); - - // Once we find a new referrer path to our import, we have to see if - // it changes the load order hence we have to do an update on the graph. - bool ShouldUpdate(nsTArray& aNewPath); - void UpdateMainReferrer(uint32_t newIdx); - - // It's a depth first graph traversal algorithm, for UpdateDependants. The - // nodes in the graph are the import link elements, and there is a directed - // edge from link1 to link2 if link2 is a subimport in the import document - // of link1. - // If the ImportLoader that aCurrentLink points to didn't need to be updated - // the algorithm skips its "children" (subimports). Note, that this graph can - // also contain cycles, aVisistedLinks is used to track the already visited - // links to avoid an infinite loop. - // aPath - (in/out) the referrer link chain of aCurrentLink when called, and - // of the next link when the function returns - // aVisitedLinks - (in/out) list of links that the traversal already visited - // (to handle cycles in the graph) - // aSkipChildren - when aCurrentLink points to an import that did not need - // to be updated, we can skip its sub-imports ('children') - nsINode* NextDependant(nsINode* aCurrentLink, - nsTArray& aPath, - NodeTable& aVisitedLinks, bool aSkipChildren); - - // When we find a new link that changes the load order of the known imports, - // we also have to check all the subimports of it, to see if they need an - // update too. (see test_imports_nested_2.html) - void UpdateDependants(nsINode* aNode, nsTArray& aPath); - - ImportLoader* mLoader; - }; - friend class ::AutoError; friend class ImportManager; - friend class Updater; public: ImportLoader(nsIURI* aURI, nsIDocument* aOriginDocument); @@ -143,46 +83,11 @@ public: bool IsReady() { return mReady; } bool IsStopped() { return mStopped; } bool IsBlocking() { return mBlockingScripts; } - - ImportManager* Manager() { - MOZ_ASSERT(mDocument || mImportParent, "One of them should be always set"); - return (mDocument ? mDocument : mImportParent)->ImportManager(); - } - - // Simply getter for the import document. Can return a partially parsed - // document if called too early. - nsIDocument* GetDocument() + already_AddRefed GetImport() { - return mDocument; + return mReady ? nsCOMPtr(mDocument).forget() : nullptr; } - // Getter for the import document that is used in the spec. Returns - // nullptr if the import is not yet ready. - nsIDocument* GetImport() - { - return mReady ? mDocument : nullptr; - } - - // There is only one referring link that is marked as primary link per - // imports. This is the one that has to be taken into account when - // scrip execution order is determined. Links marked as primary link form - // a spanning tree in the import graph. (Eliminating the cycles and - // multiple parents.) This spanning tree is recalculated every time - // a new import link is added to the manager. - nsINode* GetMainReferrer() - { - return mLinks.IsEmpty() ? nullptr : mLinks[mMainReferrer]; - } - - // An import is not only blocked by its import children, but also - // by its predecessors. It's enough to find the closest predecessor - // and wait for that to run its scripts. We keep track of all the - // ScriptRunners that are waiting for this import. NOTE: updating - // the main referrer might change this list. - void AddBlockedScriptLoader(nsScriptLoader* aScriptLoader); - bool RemoveBlockedScriptLoader(nsScriptLoader* aScriptLoader); - void SetBlockingPredecessor(ImportLoader* aLoader); - private: ~ImportLoader() {} @@ -217,25 +122,12 @@ private: nsCOMPtr mURI; nsCOMPtr mParserStreamListener; nsCOMPtr mImportParent; - ImportLoader* mBlockingPredecessor; - // List of the LinkElements that are referring to this import // we need to keep track of them so we can fire event on them. - nsTArray> mLinks; - - // List of pending ScriptLoaders that are waiting for this import - // to finish. - nsTArray> mBlockedScriptLoaders; - - // There is always exactly one referrer link that is flagged as - // the main referrer the primary link. This is the one that is - // used in the script execution order calculation. - // ("Branch" according to the spec.) - uint32_t mMainReferrer; + nsCOMArray mLinks; bool mReady; bool mStopped; bool mBlockingScripts; - Updater mUpdater; }; class ImportManager MOZ_FINAL : public nsISupports @@ -250,24 +142,9 @@ public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS(ImportManager) - // Finds the ImportLoader that belongs to aImport in the map. - ImportLoader* Find(nsIDocument* aImport); - - // Find the ImportLoader aLink refers to. - ImportLoader* Find(nsINode* aLink); - - void AddLoaderWithNewURI(ImportLoader* aLoader, nsIURI* aNewURI); - - // When a new import link is added, this getter either creates - // a new ImportLoader for it, or returns an existing one if - // it was already created and in the import map. already_AddRefed Get(nsIURI* aURI, nsINode* aNode, nsIDocument* aOriginDocument); - // It finds the predecessor for an import link node that runs its - // scripts the latest among its predecessors. - nsRefPtr GetNearestPredecessor(nsINode* aNode); - private: ImportMap mImports; }; diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index 5d084cbffb8f..d8c6248d3fff 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -1972,8 +1972,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsDocument) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mOnDemandBuiltInUASheets) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPreloadingImages) - NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSubImportLinks) - for (uint32_t i = 0; i < tmp->mFrameRequestCallbacks.Length(); ++i) { NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mFrameRequestCallbacks[i]"); cb.NoteXPCOMChild(tmp->mFrameRequestCallbacks[i].mCallback.GetISupports()); @@ -2038,7 +2036,6 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsDocument) NS_IMPL_CYCLE_COLLECTION_UNLINK(mRegistry) NS_IMPL_CYCLE_COLLECTION_UNLINK(mMasterDocument) NS_IMPL_CYCLE_COLLECTION_UNLINK(mImportManager) - NS_IMPL_CYCLE_COLLECTION_UNLINK(mSubImportLinks) tmp->mParentDocument = nullptr; diff --git a/content/base/src/nsDocument.h b/content/base/src/nsDocument.h index d8f57773e62d..34f13f21740e 100644 --- a/content/base/src/nsDocument.h +++ b/content/base/src/nsDocument.h @@ -1291,10 +1291,10 @@ public: mozilla::ErrorResult& rv) MOZ_OVERRIDE; virtual void UseRegistryFromDocument(nsIDocument* aDocument) MOZ_OVERRIDE; - virtual nsIDocument* MasterDocument() + virtual already_AddRefed MasterDocument() { - return mMasterDocument ? mMasterDocument.get() - : this; + return mMasterDocument ? (nsCOMPtr(mMasterDocument)).forget() + : (nsCOMPtr(this)).forget(); } virtual void SetMasterDocument(nsIDocument* master) @@ -1307,11 +1307,11 @@ public: return !mMasterDocument; } - virtual mozilla::dom::ImportManager* ImportManager() + virtual already_AddRefed ImportManager() { if (mImportManager) { MOZ_ASSERT(!mMasterDocument, "Only the master document has ImportManager set"); - return mImportManager.get(); + return nsRefPtr(mImportManager).forget(); } if (mMasterDocument) { @@ -1323,28 +1323,7 @@ public: // master document and this is the first import in it. // Let's create a new manager. mImportManager = new mozilla::dom::ImportManager(); - return mImportManager.get(); - } - - virtual bool HasSubImportLink(nsINode* aLink) - { - return mSubImportLinks.Contains(aLink); - } - - virtual uint32_t IndexOfSubImportLink(nsINode* aLink) - { - return mSubImportLinks.IndexOf(aLink); - } - - virtual void AddSubImportLink(nsINode* aLink) - { - mSubImportLinks.AppendElement(aLink); - } - - virtual nsINode* GetSubImportLink(uint32_t aIdx) - { - return aIdx < mSubImportLinks.Length() ? mSubImportLinks[aIdx].get() - : nullptr; + return nsRefPtr(mImportManager).forget(); } virtual void UnblockDOMContentLoaded() MOZ_OVERRIDE; @@ -1770,7 +1749,6 @@ private: nsCOMPtr mMasterDocument; nsRefPtr mImportManager; - nsTArray > mSubImportLinks; // Set to true when the document is possibly controlled by the ServiceWorker. // Used to prevent multiple requests to ServiceWorkerManager. diff --git a/content/base/src/nsScriptLoader.cpp b/content/base/src/nsScriptLoader.cpp index 4cf1758ba231..2ddb1ed827ff 100644 --- a/content/base/src/nsScriptLoader.cpp +++ b/content/base/src/nsScriptLoader.cpp @@ -49,7 +49,6 @@ #include "nsSandboxFlags.h" #include "nsContentTypeParser.h" #include "nsINetworkPredictor.h" -#include "ImportManager.h" #include "mozilla/dom/EncodingUtils.h" #include "mozilla/CORSMode.h" @@ -1228,7 +1227,7 @@ nsScriptLoader::ReadyToExecuteScripts() if (!SelfReadyToExecuteScripts()) { return false; } - + for (nsIDocument* doc = mDocument; doc; doc = doc->GetParentDocument()) { nsScriptLoader* ancestor = doc->ScriptLoader(); if (!ancestor->SelfReadyToExecuteScripts() && @@ -1238,44 +1237,10 @@ nsScriptLoader::ReadyToExecuteScripts() } } - if (!mDocument->IsMasterDocument()) { - nsRefPtr im = mDocument->ImportManager(); - nsRefPtr loader = im->Find(mDocument); - MOZ_ASSERT(loader, "How can we have an import document without a loader?"); - - // The referring link that counts in the execution order calculation - // (in spec: flagged as branch) - nsCOMPtr referrer = loader->GetMainReferrer(); - MOZ_ASSERT(referrer, "There has to be a main referring link for each imports"); - - // Import documents are blocked by their import predecessors. We need to - // wait with script execution until all the predecessors are done. - // Technically it means we have to wait for the last one to finish, - // which is the neares one to us in the order. - nsRefPtr lastPred = im->GetNearestPredecessor(referrer); - if (!lastPred) { - // If there is no predecessor we can run. - return true; - } - - nsCOMPtr doc = lastPred->GetDocument(); - if (!doc || (doc && !doc->ScriptLoader()->SelfReadyToExecuteScripts())) { - // Document has not been created yet or it was created but not ready. - // Either case we are blocked by it. The ImportLoader will take care - // of blocking us, and adding the pending child loader to the blocking - // ScriptLoader when it's possible (at this point the blocking loader - // might not have created the document/ScriptLoader) - lastPred->AddBlockedScriptLoader(this); - // As more imports are parsed, this can change, let's cache what we - // blocked, so it can be later updated if needed (see: ImportLoader::Updater). - loader->SetBlockingPredecessor(lastPred); - return false; - } - } - return true; } + // This function was copied from nsParser.cpp. It was simplified a bit. static bool DetectByteOrderMark(const unsigned char* aBytes, int32_t aLen, nsCString& oCharset) diff --git a/content/base/src/nsScriptLoader.h b/content/base/src/nsScriptLoader.h index 200af7c37efb..19fad0ce51f5 100644 --- a/content/base/src/nsScriptLoader.h +++ b/content/base/src/nsScriptLoader.h @@ -249,14 +249,6 @@ public: nsresult ProcessOffThreadRequest(nsScriptLoadRequest *aRequest, void **aOffThreadToken); - bool AddPendingChildLoader(nsScriptLoader* aChild) { - return mPendingChildLoaders.AppendElement(aChild) != nullptr; - } - - bool RemovePendingChildLoader(nsScriptLoader* aLoader) { - return mPendingChildLoaders.RemoveElement(aLoader); - } - private: virtual ~nsScriptLoader(); @@ -310,6 +302,10 @@ private: return mEnabled && !mBlockerCount; } + bool AddPendingChildLoader(nsScriptLoader* aChild) { + return mPendingChildLoaders.AppendElement(aChild) != nullptr; + } + nsresult AttemptAsyncScriptParse(nsScriptLoadRequest* aRequest); nsresult ProcessRequest(nsScriptLoadRequest* aRequest, void **aOffThreadToken = nullptr); diff --git a/content/html/content/moz.build b/content/html/content/moz.build index 7318432f13ae..140507dd7127 100644 --- a/content/html/content/moz.build +++ b/content/html/content/moz.build @@ -8,7 +8,6 @@ DIRS += ['public', 'src'] MOCHITEST_MANIFESTS += [ 'test/forms/mochitest.ini', - 'test/imports/mochitest.ini', 'test/mochitest.ini', ] diff --git a/content/html/content/src/HTMLLinkElement.cpp b/content/html/content/src/HTMLLinkElement.cpp index 33c594aaf449..81a9934c8701 100644 --- a/content/html/content/src/HTMLLinkElement.cpp +++ b/content/html/content/src/HTMLLinkElement.cpp @@ -264,6 +264,15 @@ HTMLLinkElement::UpdateImport() return; } + // Until the script execution order is not sorted out for nested cases + // let's not allow them. + if (!doc->IsMasterDocument()) { + nsContentUtils::LogSimpleConsoleError( + NS_LITERAL_STRING("Nested imports are not supported yet"), + "Imports"); + return; + } + // 2. rel type should be import. nsAutoString rel; GetAttr(kNameSpaceID_None, nsGkAtoms::rel, rel); @@ -518,7 +527,7 @@ HTMLLinkElement::WrapNode(JSContext* aCx) already_AddRefed HTMLLinkElement::GetImport() { - return mImportLoader ? nsRefPtr(mImportLoader->GetImport()).forget() : nullptr; + return mImportLoader ? mImportLoader->GetImport() : nullptr; } } // namespace dom diff --git a/content/html/content/test/imports/file_importA1.html b/content/html/content/test/imports/file_importA1.html deleted file mode 100644 index ecce6f061232..000000000000 --- a/content/html/content/test/imports/file_importA1.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/content/html/content/test/imports/file_importA2.html b/content/html/content/test/imports/file_importA2.html deleted file mode 100644 index d03e80a4b41f..000000000000 --- a/content/html/content/test/imports/file_importA2.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/content/html/content/test/imports/file_importB1.html b/content/html/content/test/imports/file_importB1.html deleted file mode 100644 index 82fb55f9f61e..000000000000 --- a/content/html/content/test/imports/file_importB1.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/content/html/content/test/imports/file_importB2.html b/content/html/content/test/imports/file_importB2.html deleted file mode 100644 index 01b6cc21584b..000000000000 --- a/content/html/content/test/imports/file_importB2.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC1.html b/content/html/content/test/imports/file_importC1.html deleted file mode 100644 index 9ac117e65c9b..000000000000 --- a/content/html/content/test/imports/file_importC1.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC10.html b/content/html/content/test/imports/file_importC10.html deleted file mode 100644 index 801d0f085574..000000000000 --- a/content/html/content/test/imports/file_importC10.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC2.html b/content/html/content/test/imports/file_importC2.html deleted file mode 100644 index f0193be44999..000000000000 --- a/content/html/content/test/imports/file_importC2.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC3.html b/content/html/content/test/imports/file_importC3.html deleted file mode 100644 index eb942b707f5a..000000000000 --- a/content/html/content/test/imports/file_importC3.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC4.html b/content/html/content/test/imports/file_importC4.html deleted file mode 100644 index 5a172772ad93..000000000000 --- a/content/html/content/test/imports/file_importC4.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC5.html b/content/html/content/test/imports/file_importC5.html deleted file mode 100644 index c29dc24ba06f..000000000000 --- a/content/html/content/test/imports/file_importC5.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC6.html b/content/html/content/test/imports/file_importC6.html deleted file mode 100644 index a53b62bb45ef..000000000000 --- a/content/html/content/test/imports/file_importC6.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC7.html b/content/html/content/test/imports/file_importC7.html deleted file mode 100644 index 1c7d60114e06..000000000000 --- a/content/html/content/test/imports/file_importC7.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC8.html b/content/html/content/test/imports/file_importC8.html deleted file mode 100644 index 04bef617d392..000000000000 --- a/content/html/content/test/imports/file_importC8.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/content/html/content/test/imports/file_importC9.html b/content/html/content/test/imports/file_importC9.html deleted file mode 100644 index 1a27497557f5..000000000000 --- a/content/html/content/test/imports/file_importC9.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/content/html/content/test/imports/file_importD.html b/content/html/content/test/imports/file_importD.html deleted file mode 100644 index a4fbda536dd0..000000000000 --- a/content/html/content/test/imports/file_importD.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/content/html/content/test/imports/file_importE.html b/content/html/content/test/imports/file_importE.html deleted file mode 100644 index 6a8792acf2ad..000000000000 --- a/content/html/content/test/imports/file_importE.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/content/html/content/test/imports/mochitest.ini b/content/html/content/test/imports/mochitest.ini deleted file mode 100644 index c1a863ea8483..000000000000 --- a/content/html/content/test/imports/mochitest.ini +++ /dev/null @@ -1,20 +0,0 @@ -[DEFAULT] -support-files = - file_importA1.html - file_importA2.html - file_importB1.html - file_importB2.html - file_importC1.html - file_importC2.html - file_importC3.html - file_importC4.html - file_importC5.html - file_importC6.html - file_importC7.html - file_importC8.html - file_importC9.html - file_importC10.html - file_importD.html - file_importE.html - - diff --git a/content/html/content/test/mochitest.ini b/content/html/content/test/mochitest.ini index 4c8fc83edbdd..df5499d15c14 100644 --- a/content/html/content/test/mochitest.ini +++ b/content/html/content/test/mochitest.ini @@ -462,8 +462,6 @@ skip-if = buildapp == 'b2g' || e10s # b2g(multiple concurrent window.open()s fai [test_imports_basics.html] [test_imports_redirect.html] [test_imports_nonhttp.html] -[test_imports_nested.html] -[test_imports_nested_2.html] [test_li_attributes_reflection.html] [test_link_attributes_reflection.html] [test_link_sizes.html] diff --git a/content/html/content/test/test_imports_nested.html b/content/html/content/test/test_imports_nested.html deleted file mode 100644 index d6320884c440..000000000000 --- a/content/html/content/test/test_imports_nested.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - Test for Bug 877072 - - - - - - Mozilla Bug 877072 - - - - - - - - - - \ No newline at end of file diff --git a/content/html/content/test/test_imports_nested_2.html b/content/html/content/test/test_imports_nested_2.html deleted file mode 100644 index d5ff72788453..000000000000 --- a/content/html/content/test/test_imports_nested_2.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - Test for Bug 877072 - - - - - - Mozilla Bug 877072 - - - - - - - - - - - - \ No newline at end of file From 66e1349be993e49db166c79169032c8324fd311d Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 2 Sep 2014 09:44:54 -0400 Subject: [PATCH 043/139] Bug 1061048 - Fix some bad impliciti constructors in profiler; r=BenWa --- tools/profiler/AutoObjectMapper.h | 2 +- tools/profiler/JSStreamWriter.h | 2 +- tools/profiler/ProfilerBacktrace.h | 2 +- tools/profiler/ProfilerMarkers.h | 4 ++-- tools/profiler/TableTicker.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/profiler/AutoObjectMapper.h b/tools/profiler/AutoObjectMapper.h index e1a3c4afbe1f..1f813d6f2824 100644 --- a/tools/profiler/AutoObjectMapper.h +++ b/tools/profiler/AutoObjectMapper.h @@ -23,7 +23,7 @@ public: // call Map() to attempt the mapping. There is no corresponding // Unmap() since the unmapping is done in the destructor. Failure // messages are sent to |aLog|. - AutoObjectMapperPOSIX(void(*aLog)(const char*)); + explicit AutoObjectMapperPOSIX(void(*aLog)(const char*)); // Unmap the file on destruction of this object. ~AutoObjectMapperPOSIX(); diff --git a/tools/profiler/JSStreamWriter.h b/tools/profiler/JSStreamWriter.h index 02bd79ff6f45..e55e2e15f78c 100644 --- a/tools/profiler/JSStreamWriter.h +++ b/tools/profiler/JSStreamWriter.h @@ -13,7 +13,7 @@ class JSStreamWriter { public: - JSStreamWriter(std::ostream& aStream); + explicit JSStreamWriter(std::ostream& aStream); ~JSStreamWriter(); void BeginObject(); diff --git a/tools/profiler/ProfilerBacktrace.h b/tools/profiler/ProfilerBacktrace.h index 9ae7d4dda410..209b81f3a84e 100644 --- a/tools/profiler/ProfilerBacktrace.h +++ b/tools/profiler/ProfilerBacktrace.h @@ -12,7 +12,7 @@ class SyncProfile; class ProfilerBacktrace { public: - ProfilerBacktrace(SyncProfile* aProfile); + explicit ProfilerBacktrace(SyncProfile* aProfile); ~ProfilerBacktrace(); void StreamJSObject(JSStreamWriter& b); diff --git a/tools/profiler/ProfilerMarkers.h b/tools/profiler/ProfilerMarkers.h index 7fcc6433032e..fc561e52c01d 100644 --- a/tools/profiler/ProfilerMarkers.h +++ b/tools/profiler/ProfilerMarkers.h @@ -28,7 +28,7 @@ public: /** * ProfilerMarkerPayload takes ownership of aStack */ - ProfilerMarkerPayload(ProfilerBacktrace* aStack = nullptr); + explicit ProfilerMarkerPayload(ProfilerBacktrace* aStack = nullptr); ProfilerMarkerPayload(const mozilla::TimeStamp& aStartTime, const mozilla::TimeStamp& aEndTime, ProfilerBacktrace* aStack = nullptr); @@ -91,7 +91,7 @@ private: class ProfilerMarkerImagePayload : public ProfilerMarkerPayload { public: - ProfilerMarkerImagePayload(gfxASurface *aImg); + explicit ProfilerMarkerImagePayload(gfxASurface *aImg); protected: virtual void diff --git a/tools/profiler/TableTicker.cpp b/tools/profiler/TableTicker.cpp index c14ddc0827ac..43b64a9cf873 100644 --- a/tools/profiler/TableTicker.cpp +++ b/tools/profiler/TableTicker.cpp @@ -184,7 +184,7 @@ JSObject* TableTicker::ToJSObject(JSContext *aCx) } struct SubprocessClosure { - SubprocessClosure(JSStreamWriter *aWriter) + explicit SubprocessClosure(JSStreamWriter *aWriter) : mWriter(aWriter) {} From a725e9f55fd96712812dc009920d47053f9ddcb3 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 2 Sep 2014 09:45:28 -0400 Subject: [PATCH 044/139] Bug 1061248 - Fix some bad implicit constructors in LUL; r=BenWa --- tools/profiler/LulCommon.cpp | 2 +- tools/profiler/LulMain.cpp | 4 ++-- tools/profiler/LulMain.h | 4 ++-- tools/profiler/LulMainInt.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/profiler/LulCommon.cpp b/tools/profiler/LulCommon.cpp index 86c3e500e58b..9664230ee3c4 100644 --- a/tools/profiler/LulCommon.cpp +++ b/tools/profiler/LulCommon.cpp @@ -72,7 +72,7 @@ Module::~Module() { // class UniqueString { public: - UniqueString(string str) { str_ = strdup(str.c_str()); } + explicit UniqueString(string str) { str_ = strdup(str.c_str()); } ~UniqueString() { free(reinterpret_cast(const_cast(str_))); } const char* str_; }; diff --git a/tools/profiler/LulMain.cpp b/tools/profiler/LulMain.cpp index 6e6c1d235f10..0384afc8f488 100644 --- a/tools/profiler/LulMain.cpp +++ b/tools/profiler/LulMain.cpp @@ -490,7 +490,7 @@ class SegArray { class PriMap { public: - PriMap(void (*aLog)(const char*)) + explicit PriMap(void (*aLog)(const char*)) : mLog(aLog) {} @@ -838,7 +838,7 @@ class PriMap { class CFICache { public: - CFICache(PriMap* aPriMap) { + explicit CFICache(PriMap* aPriMap) { Invalidate(); mPriMap = aPriMap; } diff --git a/tools/profiler/LulMain.h b/tools/profiler/LulMain.h index ec84d43882d9..ac97a908f9fe 100644 --- a/tools/profiler/LulMain.h +++ b/tools/profiler/LulMain.h @@ -60,7 +60,7 @@ namespace lul { class TaggedUWord { public: // Construct a valid one. - TaggedUWord(uintptr_t w) + explicit TaggedUWord(uintptr_t w) : mValue(w) , mValid(true) {} @@ -165,7 +165,7 @@ class CFICache; class LUL { public: // Create; supply a logging sink. Initialises the rw-lock. - LUL(void (*aLog)(const char*)); + explicit LUL(void (*aLog)(const char*)); // Destroy. This acquires mRWlock for writing. By doing that, waits // for all unwinder threads to finish any Unwind() calls they may be diff --git a/tools/profiler/LulMainInt.h b/tools/profiler/LulMainInt.h index 16cd391ab9ff..5b795d659332 100644 --- a/tools/profiler/LulMainInt.h +++ b/tools/profiler/LulMainInt.h @@ -223,7 +223,7 @@ public: // so let's use mSummaryMinAddr == 1 and mSummaryMaxAddr == 0 to denote // this case. - SecMap(void(*aLog)(const char*)); + explicit SecMap(void(*aLog)(const char*)); ~SecMap(); // Binary search mRuleSets to find one that brackets |ia|, or nullptr From 71ce70204a3807ffeb677ed203b02d1f84161393 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 2 Sep 2014 09:46:06 -0400 Subject: [PATCH 045/139] Bug 1061253 - Fix more bad implicit constructors in widget; r=roc --- widget/gtk/nsGtkIMModule.h | 2 +- widget/gtk/nsGtkKeyUtils.h | 2 +- widget/gtk/nsSound.cpp | 2 +- widget/gtk/nsWindow.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/widget/gtk/nsGtkIMModule.h b/widget/gtk/nsGtkIMModule.h index 7127c832bd35..42139c5f2992 100644 --- a/widget/gtk/nsGtkIMModule.h +++ b/widget/gtk/nsGtkIMModule.h @@ -54,7 +54,7 @@ public: // aOwnerWindow is a pointer of the owner window. When aOwnerWindow is // destroyed, the related IME contexts are released (i.e., IME cannot be // used with the instance after that). - nsGtkIMModule(nsWindow* aOwnerWindow); + explicit nsGtkIMModule(nsWindow* aOwnerWindow); ~nsGtkIMModule(); // "Enabled" means the users can use all IMEs. diff --git a/widget/gtk/nsGtkKeyUtils.h b/widget/gtk/nsGtkKeyUtils.h index e519b5dea764..721f152f20db 100644 --- a/widget/gtk/nsGtkKeyUtils.h +++ b/widget/gtk/nsGtkKeyUtils.h @@ -157,7 +157,7 @@ protected: guint mHardwareKeycode; guint mMask; - ModifierKey(guint aHardwareKeycode) : + explicit ModifierKey(guint aHardwareKeycode) : mHardwareKeycode(aHardwareKeycode), mMask(0) { } diff --git a/widget/gtk/nsSound.cpp b/widget/gtk/nsSound.cpp index 7135603d0cdc..62fc1676f857 100644 --- a/widget/gtk/nsSound.cpp +++ b/widget/gtk/nsSound.cpp @@ -69,7 +69,7 @@ static ca_proplist_sets_fn ca_proplist_sets; static ca_context_play_full_fn ca_context_play_full; struct ScopedCanberraFile { - ScopedCanberraFile(nsIFile *file): mFile(file) {}; + explicit ScopedCanberraFile(nsIFile *file): mFile(file) {}; ~ScopedCanberraFile() { if (mFile) { diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp index 31fc64bb5275..281ff6602cd7 100644 --- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp @@ -294,7 +294,7 @@ protected: typedef pixman_region32 RawRef; nsSimpleRef() { data = nullptr; } - nsSimpleRef(const RawRef &aRawRef) : pixman_region32(aRawRef) { } + explicit nsSimpleRef(const RawRef &aRawRef) : pixman_region32(aRawRef) { } static void Release(pixman_region32& region) { pixman_region32_fini(®ion); From 8b978389de52a48a7a0f547e9609e7f03dd21959 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 2 Sep 2014 09:46:56 -0400 Subject: [PATCH 046/139] Bug 1061252 - Fix more bad implicit constructors in media code; r=roc --- content/media/gstreamer/GStreamerMozVideoBuffer.h | 2 +- content/media/gstreamer/GStreamerReader.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/media/gstreamer/GStreamerMozVideoBuffer.h b/content/media/gstreamer/GStreamerMozVideoBuffer.h index 28aab6f81250..e9295771edb9 100644 --- a/content/media/gstreamer/GStreamerMozVideoBuffer.h +++ b/content/media/gstreamer/GStreamerMozVideoBuffer.h @@ -40,7 +40,7 @@ GstMozVideoBufferData* gst_moz_video_buffer_get_data(const GstMozVideoBuffer* bu class GstMozVideoBufferData { public: - GstMozVideoBufferData(layers::PlanarYCbCrImage* aImage) : mImage(aImage) {} + explicit GstMozVideoBufferData(layers::PlanarYCbCrImage* aImage) : mImage(aImage) {} static void* Copy(void* aData) { return new GstMozVideoBufferData(reinterpret_cast(aData)->mImage); diff --git a/content/media/gstreamer/GStreamerReader.h b/content/media/gstreamer/GStreamerReader.h index 430fc3e07374..c2a14dc5a9f1 100644 --- a/content/media/gstreamer/GStreamerReader.h +++ b/content/media/gstreamer/GStreamerReader.h @@ -38,7 +38,7 @@ class GStreamerReader : public MediaDecoderReader typedef gfx::IntRect IntRect; public: - GStreamerReader(AbstractMediaDecoder* aDecoder); + explicit GStreamerReader(AbstractMediaDecoder* aDecoder); virtual ~GStreamerReader(); virtual nsresult Init(MediaDecoderReader* aCloneDonor); From f29810b0ab65f78e13da94a437a446521d201a13 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 2 Sep 2014 09:47:43 -0400 Subject: [PATCH 047/139] Bug 1061250 - Fix more bad implicit constructors in graphics; r=roc --- gfx/layers/basic/X11BasicCompositor.h | 2 +- gfx/layers/ipc/ShadowLayerUtilsX11.h | 2 +- gfx/thebes/gfxFT2Utils.h | 2 +- gfx/thebes/gfxFontconfigUtils.h | 10 +++++----- gfx/thebes/gfxPangoFonts.cpp | 4 ++-- gfx/thebes/gfxXlibSurface.cpp | 2 +- gfx/thebes/gfxXlibSurface.h | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gfx/layers/basic/X11BasicCompositor.h b/gfx/layers/basic/X11BasicCompositor.h index 1ee1bc34e4ec..b01192c29157 100644 --- a/gfx/layers/basic/X11BasicCompositor.h +++ b/gfx/layers/basic/X11BasicCompositor.h @@ -45,7 +45,7 @@ class X11BasicCompositor : public BasicCompositor { public: - X11BasicCompositor(nsIWidget *aWidget) : BasicCompositor(aWidget) {} + explicit X11BasicCompositor(nsIWidget *aWidget) : BasicCompositor(aWidget) {} virtual TemporaryRef CreateDataTextureSource(TextureFlags aFlags = TextureFlags::NO_FLAGS) MOZ_OVERRIDE; diff --git a/gfx/layers/ipc/ShadowLayerUtilsX11.h b/gfx/layers/ipc/ShadowLayerUtilsX11.h index a39101710316..2970b1489a78 100644 --- a/gfx/layers/ipc/ShadowLayerUtilsX11.h +++ b/gfx/layers/ipc/ShadowLayerUtilsX11.h @@ -31,7 +31,7 @@ struct SurfaceDescriptorX11 { SurfaceDescriptorX11() { } - SurfaceDescriptorX11(gfxXlibSurface* aSurf); + explicit SurfaceDescriptorX11(gfxXlibSurface* aSurf); SurfaceDescriptorX11(Drawable aDrawable, XID aFormatID, const gfx::IntSize& aSize); diff --git a/gfx/thebes/gfxFT2Utils.h b/gfx/thebes/gfxFT2Utils.h index cb5f79af8f56..c41d007c32b0 100644 --- a/gfx/thebes/gfxFT2Utils.h +++ b/gfx/thebes/gfxFT2Utils.h @@ -22,7 +22,7 @@ typedef struct FT_FaceRec_* FT_Face; class gfxFT2LockedFace { public: - gfxFT2LockedFace(gfxFT2FontBase *aFont) : + explicit gfxFT2LockedFace(gfxFT2FontBase *aFont) : mGfxFont(aFont), mFace(cairo_ft_scaled_font_lock_face(aFont->CairoScaledFont())) { } diff --git a/gfx/thebes/gfxFontconfigUtils.h b/gfx/thebes/gfxFontconfigUtils.h index 6e5e271d5308..588d919bcd45 100644 --- a/gfx/thebes/gfxFontconfigUtils.h +++ b/gfx/thebes/gfxFontconfigUtils.h @@ -173,7 +173,7 @@ public: // nullptr. The caller of PutEntry() must fill in mKey when nullptr. // This provides a mechanism for the caller of PutEntry() to determine // whether the entry has been initialized. - DepFcStrEntry(KeyTypePointer aName) + explicit DepFcStrEntry(KeyTypePointer aName) : mKey(nullptr) { } DepFcStrEntry(const DepFcStrEntry& toCopy) @@ -195,7 +195,7 @@ public: // The caller of PutEntry() must call InitKey() when IsKeyInitialized() // returns false. This provides a mechanism for the caller of // PutEntry() to determine whether the entry has been initialized. - CopiedFcStrEntry(KeyTypePointer aName) { + explicit CopiedFcStrEntry(KeyTypePointer aName) { mKey.SetIsVoid(true); } @@ -216,7 +216,7 @@ public: protected: class FontsByFcStrEntry : public DepFcStrEntry { public: - FontsByFcStrEntry(KeyTypePointer aName) + explicit FontsByFcStrEntry(KeyTypePointer aName) : DepFcStrEntry(aName) { } FontsByFcStrEntry(const FontsByFcStrEntry& toCopy) @@ -245,7 +245,7 @@ protected: // nullptr. The caller of PutEntry() is must fill in mKey when adding // the first font if the key is not derived from the family and style. // If the key is derived from family and style, a font must be added. - FontsByFullnameEntry(KeyTypePointer aName) + explicit FontsByFullnameEntry(KeyTypePointer aName) : DepFcStrEntry(aName) { } FontsByFullnameEntry(const FontsByFullnameEntry& toCopy) @@ -269,7 +269,7 @@ protected: class LangSupportEntry : public CopiedFcStrEntry { public: - LangSupportEntry(KeyTypePointer aName) + explicit LangSupportEntry(KeyTypePointer aName) : CopiedFcStrEntry(aName) { } LangSupportEntry(const LangSupportEntry& toCopy) diff --git a/gfx/thebes/gfxPangoFonts.cpp b/gfx/thebes/gfxPangoFonts.cpp index 4a031cb03d63..9bb70e5a70b8 100644 --- a/gfx/thebes/gfxPangoFonts.cpp +++ b/gfx/thebes/gfxPangoFonts.cpp @@ -124,7 +124,7 @@ public: } protected: - gfxFcFontEntry(const nsAString& aName) + explicit gfxFcFontEntry(const nsAString& aName) : gfxFontEntry(aName) { } @@ -326,7 +326,7 @@ gfxSystemFcFontEntry::ReleaseGrFace(gr_face* aFace) class gfxUserFcFontEntry : public gfxFcFontEntry { protected: - gfxUserFcFontEntry(const gfxProxyFontEntry &aProxyEntry) + explicit gfxUserFcFontEntry(const gfxProxyFontEntry &aProxyEntry) : gfxFcFontEntry(aProxyEntry.Name()) { mItalic = aProxyEntry.mItalic; diff --git a/gfx/thebes/gfxXlibSurface.cpp b/gfx/thebes/gfxXlibSurface.cpp index 393c212307dc..b954e6a2f623 100644 --- a/gfx/thebes/gfxXlibSurface.cpp +++ b/gfx/thebes/gfxXlibSurface.cpp @@ -331,7 +331,7 @@ private: class DisplayInfo { public: - DisplayInfo(Display* display) : mDisplay(display) { } + explicit DisplayInfo(Display* display) : mDisplay(display) { } Display* mDisplay; nsTArray mColormapEntries; }; diff --git a/gfx/thebes/gfxXlibSurface.h b/gfx/thebes/gfxXlibSurface.h index 1b1c111718d9..765777f8433d 100644 --- a/gfx/thebes/gfxXlibSurface.h +++ b/gfx/thebes/gfxXlibSurface.h @@ -32,7 +32,7 @@ public: gfxXlibSurface(Screen *screen, Drawable drawable, XRenderPictFormat *format, const gfxIntSize& size); - gfxXlibSurface(cairo_surface_t *csurf); + explicit gfxXlibSurface(cairo_surface_t *csurf); // create a new Pixmap and wrapper surface. // |relatedDrawable| provides a hint to the server for determining whether From be3d083f5a72229578572fbfa1c3e54ec982fc31 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 2 Sep 2014 09:48:27 -0400 Subject: [PATCH 048/139] Bug 1061274 - Do not pass a non-POD object to a variadic function in nsTextStore::MouseTracker::UnadviseSink; r=masayuki clang-cl treats this as a fatal error, but MSVC seems fine with it. --- widget/windows/nsTextStore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widget/windows/nsTextStore.cpp b/widget/windows/nsTextStore.cpp index 3902b1619e32..51b231b252b1 100644 --- a/widget/windows/nsTextStore.cpp +++ b/widget/windows/nsTextStore.cpp @@ -4827,7 +4827,7 @@ nsTextStore::MouseTracker::UnadviseSink() PR_LOG(sTextStoreLog, PR_LOG_DEBUG, ("TSF: 0x%p nsTextStore::MouseTracker::UnadviseSink(), " "mCookie=%d, mSink=0x%p, mStart=%d, mLength=%d", - this, mCookie, mSink, mStart, mLength)); + this, mCookie, mSink.get(), mStart, mLength)); mSink = nullptr; mStart = mLength = -1; } From 8662c739d1d248f40ed42160b7e504e38cce1141 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 2 Sep 2014 09:49:03 -0400 Subject: [PATCH 049/139] Bug 1060986 - Fix one bad implicit constructors in devtools; r=jryans --- toolkit/devtools/security/LocalCertService.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolkit/devtools/security/LocalCertService.cpp b/toolkit/devtools/security/LocalCertService.cpp index 7276ff16d901..05f52e50247b 100644 --- a/toolkit/devtools/security/LocalCertService.cpp +++ b/toolkit/devtools/security/LocalCertService.cpp @@ -25,7 +25,7 @@ namespace mozilla { class LocalCertTask : public CryptoTask { protected: - LocalCertTask(const nsACString& aNickname) + explicit LocalCertTask(const nsACString& aNickname) : mNickname(aNickname) { } From 052526d4791998a62ad11493a461ed58286ecdb1 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 2 Sep 2014 09:49:38 -0400 Subject: [PATCH 050/139] Bug 1061052 - Fix more bad implicit constructors in netwerk; r=mcmanus --- netwerk/cache2/CacheStorageService.cpp | 2 +- netwerk/streamconv/converters/nsMultiMixedConv.cpp | 4 ++-- netwerk/streamconv/converters/nsUnknownDecoder.h | 2 +- netwerk/test/TestProtocols.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/netwerk/cache2/CacheStorageService.cpp b/netwerk/cache2/CacheStorageService.cpp index d67bd8554a04..c140ef72a806 100644 --- a/netwerk/cache2/CacheStorageService.cpp +++ b/netwerk/cache2/CacheStorageService.cpp @@ -1621,7 +1621,7 @@ CacheStorageService::DoomStorageEntry(CacheStorage const* aStorage, class Callback : public nsRunnable { public: - Callback(nsICacheEntryDoomCallback* aCallback) : mCallback(aCallback) { } + explicit Callback(nsICacheEntryDoomCallback* aCallback) : mCallback(aCallback) { } NS_IMETHODIMP Run() { mCallback->OnCacheEntryDoomed(NS_ERROR_NOT_AVAILABLE); diff --git a/netwerk/streamconv/converters/nsMultiMixedConv.cpp b/netwerk/streamconv/converters/nsMultiMixedConv.cpp index a3694e1a156e..c68cfac0a374 100644 --- a/netwerk/streamconv/converters/nsMultiMixedConv.cpp +++ b/netwerk/streamconv/converters/nsMultiMixedConv.cpp @@ -460,7 +460,7 @@ class AutoFree public: AutoFree() : mBuffer(nullptr) {} - AutoFree(char *buffer) : mBuffer(buffer) {} + explicit AutoFree(char *buffer) : mBuffer(buffer) {} ~AutoFree() { free(mBuffer); @@ -488,7 +488,7 @@ nsMultiMixedConv::OnDataAvailable(nsIRequest *request, nsISupports *context, return NS_ERROR_FAILURE; nsresult rv = NS_OK; - AutoFree buffer = nullptr; + AutoFree buffer(nullptr); uint32_t bufLen = 0, read = 0; NS_ASSERTION(request, "multimixed converter needs a request"); diff --git a/netwerk/streamconv/converters/nsUnknownDecoder.h b/netwerk/streamconv/converters/nsUnknownDecoder.h index ed2f40bddf80..894a6dc20211 100644 --- a/netwerk/streamconv/converters/nsUnknownDecoder.h +++ b/netwerk/streamconv/converters/nsUnknownDecoder.h @@ -50,7 +50,7 @@ protected: class ConvertedStreamListener: public nsIStreamListener { public: - ConvertedStreamListener(nsUnknownDecoder *aDecoder); + explicit ConvertedStreamListener(nsUnknownDecoder *aDecoder); NS_DECL_ISUPPORTS NS_DECL_NSIREQUESTOBSERVER diff --git a/netwerk/test/TestProtocols.cpp b/netwerk/test/TestProtocols.cpp index 79a3ee1dd1fb..c87a2b5f4a9a 100644 --- a/netwerk/test/TestProtocols.cpp +++ b/netwerk/test/TestProtocols.cpp @@ -194,7 +194,7 @@ class URLLoadInfo : public nsISupports public: - URLLoadInfo(const char* aUrl); + explicit URLLoadInfo(const char* aUrl); // ISupports interface... NS_DECL_THREADSAFE_ISUPPORTS From 6f002e45f747944d04e475af0cecd79f4f05a7e8 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 2 Sep 2014 09:50:07 -0400 Subject: [PATCH 051/139] Bug 1060973 - Fix more bad implicit constructors in XPCOM; r=froydnj --- xpcom/glue/pldhash.h | 2 +- xpcom/threads/SyncRunnable.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xpcom/glue/pldhash.h b/xpcom/glue/pldhash.h index 47d0feedda69..c37aa30ad8eb 100644 --- a/xpcom/glue/pldhash.h +++ b/xpcom/glue/pldhash.h @@ -279,7 +279,7 @@ public: */ class Iterator { public: - Iterator(const PLDHashTable* aTable); + explicit Iterator(const PLDHashTable* aTable); Iterator(const Iterator& aIterator); ~Iterator(); bool HasMoreEntries() const; diff --git a/xpcom/threads/SyncRunnable.h b/xpcom/threads/SyncRunnable.h index f84cd218b86f..b0681a4fd54f 100644 --- a/xpcom/threads/SyncRunnable.h +++ b/xpcom/threads/SyncRunnable.h @@ -31,7 +31,7 @@ namespace mozilla { class SyncRunnable : public nsRunnable { public: - SyncRunnable(nsIRunnable* aRunnable) + explicit SyncRunnable(nsIRunnable* aRunnable) : mRunnable(aRunnable) , mMonitor("SyncRunnable") , mDone(false) From 198251b552607618a995dca01ee1c32565c9b7e3 Mon Sep 17 00:00:00 2001 From: Simon Montagu Date: Tue, 2 Sep 2014 17:05:58 +0300 Subject: [PATCH 052/139] Bug 1058021 patch 1: bring encoding/decoding tests in line with w3c tests and the Encoding Standard. r=annevk --- intl/uconv/tests/unit/test_decode_CP1250.js | 10 +++++----- intl/uconv/tests/unit/test_decode_CP1251.js | 10 +++++----- intl/uconv/tests/unit/test_decode_CP1252.js | 10 +++++----- intl/uconv/tests/unit/test_decode_CP1253.js | 10 +++++----- intl/uconv/tests/unit/test_decode_CP1254.js | 10 +++++----- intl/uconv/tests/unit/test_decode_CP1255.js | 10 +++++----- intl/uconv/tests/unit/test_decode_CP1256.js | 6 +++--- intl/uconv/tests/unit/test_decode_CP1257.js | 10 +++++----- intl/uconv/tests/unit/test_decode_CP1258.js | 10 +++++----- intl/uconv/tests/unit/test_decode_CP874.js | 10 +++++----- intl/uconv/tests/unit/test_encode_CP1250.js | 8 ++++---- intl/uconv/tests/unit/test_encode_CP1251.js | 10 +++++----- intl/uconv/tests/unit/test_encode_CP1252.js | 10 +++++----- intl/uconv/tests/unit/test_encode_CP1253.js | 8 ++++---- intl/uconv/tests/unit/test_encode_CP1254.js | 10 +++++----- intl/uconv/tests/unit/test_encode_CP1255.js | 10 +++++----- intl/uconv/tests/unit/test_encode_CP1256.js | 6 +++--- intl/uconv/tests/unit/test_encode_CP1257.js | 8 ++++---- intl/uconv/tests/unit/test_encode_CP1258.js | 8 ++++---- intl/uconv/tests/unit/test_encode_CP874.js | 10 +++++----- 20 files changed, 92 insertions(+), 92 deletions(-) diff --git a/intl/uconv/tests/unit/test_decode_CP1250.js b/intl/uconv/tests/unit/test_decode_CP1250.js index c179b6d57df7..6eff6d990d91 100644 --- a/intl/uconv/tests/unit/test_decode_CP1250.js +++ b/intl/uconv/tests/unit/test_decode_CP1250.js @@ -1,10 +1,10 @@ // Tests conversion from windows-1250 to Unicode - + load('CharsetConversionTests.js'); - -const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x82\x84\x85\x86\x87\x89\x8a\x8b\x8c\x8d\x8e\x8f\x91\x92\x93\x94\x95\x96\x97\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; - -const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u201a\u201e\u2026\u2020\u2021\u2030\u0160\u2039\u015a\u0164\u017d\u0179\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u2122\u0161\u203a\u015b\u0165\u017e\u017a\u00a0\u02c7\u02d8\u0141\u00a4\u0104\u00a6\u00a7\u00a8\u00a9\u015e\u00ab\u00ac\u00ad\u00ae\u017b\u00b0\u00b1\u02db\u0142\u00b4\u00b5\u00b6\u00b7\u00b8\u0105\u015f\u00bb\u013d\u02dd\u013e\u017c\u0154\u00c1\u00c2\u0102\u00c4\u0139\u0106\u00c7\u010c\u00c9\u0118\u00cb\u011a\u00cd\u00ce\u010e\u0110\u0143\u0147\u00d3\u00d4\u0150\u00d6\u00d7\u0158\u016e\u00da\u0170\u00dc\u00dd\u0162\u00df\u0155\u00e1\u00e2\u0103\u00e4\u013a\u0107\u00e7\u010d\u00e9\u0119\u00eb\u011b\u00ed\u00ee\u010f\u0111\u0144\u0148\u00f3\u00f4\u0151\u00f6\u00f7\u0159\u016f\u00fa\u0171\u00fc\u00fd\u0163\u02d9"; + +const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + +const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u0081\u201a\u0083\u201e\u2026\u2020\u2021\u0088\u2030\u0160\u2039\u015a\u0164\u017d\u0179\u0090\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u0098\u2122\u0161\u203a\u015b\u0165\u017e\u017a\u00a0\u02c7\u02d8\u0141\u00a4\u0104\u00a6\u00a7\u00a8\u00a9\u015e\u00ab\u00ac\u00ad\u00ae\u017b\u00b0\u00b1\u02db\u0142\u00b4\u00b5\u00b6\u00b7\u00b8\u0105\u015f\u00bb\u013d\u02dd\u013e\u017c\u0154\u00c1\u00c2\u0102\u00c4\u0139\u0106\u00c7\u010c\u00c9\u0118\u00cb\u011a\u00cd\u00ce\u010e\u0110\u0143\u0147\u00d3\u00d4\u0150\u00d6\u00d7\u0158\u016e\u00da\u0170\u00dc\u00dd\u0162\u00df\u0155\u00e1\u00e2\u0103\u00e4\u013a\u0107\u00e7\u010d\u00e9\u0119\u00eb\u011b\u00ed\u00ee\u010f\u0111\u0144\u0148\u00f3\u00f4\u0151\u00f6\u00f7\u0159\u016f\u00fa\u0171\u00fc\u00fd\u0163\u02d9"; const aliases = [ "windows-1250", "x-cp1250", "cp1250" ]; diff --git a/intl/uconv/tests/unit/test_decode_CP1251.js b/intl/uconv/tests/unit/test_decode_CP1251.js index 2c9f5449e2fc..186943b8f177 100644 --- a/intl/uconv/tests/unit/test_decode_CP1251.js +++ b/intl/uconv/tests/unit/test_decode_CP1251.js @@ -1,10 +1,10 @@ // Tests conversion from windows-1251 to Unicode - + load('CharsetConversionTests.js'); - -const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; - -const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0402\u0403\u201a\u0453\u201e\u2026\u2020\u2021\u20ac\u2030\u0409\u2039\u040a\u040c\u040b\u040f\u0452\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u2122\u0459\u203a\u045a\u045c\u045b\u045f\u00a0\u040e\u045e\u0408\u00a4\u0490\u00a6\u00a7\u0401\u00a9\u0404\u00ab\u00ac\u00ad\u00ae\u0407\u00b0\u00b1\u0406\u0456\u0491\u00b5\u00b6\u00b7\u0451\u2116\u0454\u00bb\u0458\u0405\u0455\u0457\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f"; + +const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + +const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0402\u0403\u201a\u0453\u201e\u2026\u2020\u2021\u20ac\u2030\u0409\u2039\u040a\u040c\u040b\u040f\u0452\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u0098\u2122\u0459\u203a\u045a\u045c\u045b\u045f\u00a0\u040e\u045e\u0408\u00a4\u0490\u00a6\u00a7\u0401\u00a9\u0404\u00ab\u00ac\u00ad\u00ae\u0407\u00b0\u00b1\u0406\u0456\u0491\u00b5\u00b6\u00b7\u0451\u2116\u0454\u00bb\u0458\u0405\u0455\u0457\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f"; const aliases = [ "windows-1251", "x-cp1251", "cp1251" ]; diff --git a/intl/uconv/tests/unit/test_decode_CP1252.js b/intl/uconv/tests/unit/test_decode_CP1252.js index 4c303360266d..bca21e81fba9 100644 --- a/intl/uconv/tests/unit/test_decode_CP1252.js +++ b/intl/uconv/tests/unit/test_decode_CP1252.js @@ -1,10 +1,10 @@ // Tests conversion from windows-1252 to Unicode - + load('CharsetConversionTests.js'); - -const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8e\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; - -const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\u017d\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\u017e\u0178\u00a0\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u00aa\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00ba\u00bb\u00bc\u00bd\u00be\u00bf\u00c0\u00c1\u00c2\u00c3\u00c4\u00c5\u00c6\u00c7\u00c8\u00c9\u00ca\u00cb\u00cc\u00cd\u00ce\u00cf\u00d0\u00d1\u00d2\u00d3\u00d4\u00d5\u00d6\u00d7\u00d8\u00d9\u00da\u00db\u00dc\u00dd\u00de\u00df\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5\u00e6\u00e7\u00e8\u00e9\u00ea\u00eb\u00ec\u00ed\u00ee\u00ef\u00f0\u00f1\u00f2\u00f3\u00f4\u00f5\u00f6\u00f7\u00f8\u00f9\u00fa\u00fb\u00fc\u00fd\u00fe\u00ff"; + +const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + +const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u0081\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\u008d\u017d\u008f\u0090\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\u009d\u017e\u0178\u00a0\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u00aa\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00ba\u00bb\u00bc\u00bd\u00be\u00bf\u00c0\u00c1\u00c2\u00c3\u00c4\u00c5\u00c6\u00c7\u00c8\u00c9\u00ca\u00cb\u00cc\u00cd\u00ce\u00cf\u00d0\u00d1\u00d2\u00d3\u00d4\u00d5\u00d6\u00d7\u00d8\u00d9\u00da\u00db\u00dc\u00dd\u00de\u00df\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5\u00e6\u00e7\u00e8\u00e9\u00ea\u00eb\u00ec\u00ed\u00ee\u00ef\u00f0\u00f1\u00f2\u00f3\u00f4\u00f5\u00f6\u00f7\u00f8\u00f9\u00fa\u00fb\u00fc\u00fd\u00fe\u00ff"; const aliases = [ "windows-1252", "x-cp1252", "cp1252" ]; diff --git a/intl/uconv/tests/unit/test_decode_CP1253.js b/intl/uconv/tests/unit/test_decode_CP1253.js index a4268ea4f03f..e68d966be973 100644 --- a/intl/uconv/tests/unit/test_decode_CP1253.js +++ b/intl/uconv/tests/unit/test_decode_CP1253.js @@ -1,10 +1,10 @@ // Tests conversion from windows-1253 to Unicode - + load('CharsetConversionTests.js'); - -const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x82\x83\x84\x85\x86\x87\x89\x8b\x91\x92\x93\x94\x95\x96\x97\x99\x9b\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe"; - -const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u2030\u2039\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u2122\u203a\u00a0\u0385\u0386\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u00ab\u00ac\u00ad\u00ae\u2015\u00b0\u00b1\u00b2\u00b3\u0384\u00b5\u00b6\u00b7\u0388\u0389\u038a\u00bb\u038c\u00bd\u038e\u038f\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9\u03aa\u03ab\u03ac\u03ad\u03ae\u03af\u03b0\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9\u03ca\u03cb\u03cc\u03cd\u03ce"; + +const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + +const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u0081\u201a\u0192\u201e\u2026\u2020\u2021\u0088\u2030\u008a\u2039\u008c\u008d\u008e\u008f\u0090\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u0098\u2122\u009a\u203a\u009c\u009d\u009e\u009f\u00a0\u0385\u0386\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\ufffd\u00ab\u00ac\u00ad\u00ae\u2015\u00b0\u00b1\u00b2\u00b3\u0384\u00b5\u00b6\u00b7\u0388\u0389\u038a\u00bb\u038c\u00bd\u038e\u038f\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\ufffd\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9\u03aa\u03ab\u03ac\u03ad\u03ae\u03af\u03b0\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9\u03ca\u03cb\u03cc\u03cd\u03ce\ufffd"; const aliases = [ "windows-1253", "x-cp1253", "cp1253" ]; diff --git a/intl/uconv/tests/unit/test_decode_CP1254.js b/intl/uconv/tests/unit/test_decode_CP1254.js index 232c7ea2617b..0654477ff2df 100644 --- a/intl/uconv/tests/unit/test_decode_CP1254.js +++ b/intl/uconv/tests/unit/test_decode_CP1254.js @@ -1,10 +1,10 @@ // Tests conversion from windows-1254 to Unicode - + load('CharsetConversionTests.js'); - -const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; - -const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\u0178\u00a0\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u00aa\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00ba\u00bb\u00bc\u00bd\u00be\u00bf\u00c0\u00c1\u00c2\u00c3\u00c4\u00c5\u00c6\u00c7\u00c8\u00c9\u00ca\u00cb\u00cc\u00cd\u00ce\u00cf\u011e\u00d1\u00d2\u00d3\u00d4\u00d5\u00d6\u00d7\u00d8\u00d9\u00da\u00db\u00dc\u0130\u015e\u00df\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5\u00e6\u00e7\u00e8\u00e9\u00ea\u00eb\u00ec\u00ed\u00ee\u00ef\u011f\u00f1\u00f2\u00f3\u00f4\u00f5\u00f6\u00f7\u00f8\u00f9\u00fa\u00fb\u00fc\u0131\u015f\u00ff"; + +const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + +const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u0081\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\u008d\u008e\u008f\u0090\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\u009d\u009e\u0178\u00a0\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u00aa\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00ba\u00bb\u00bc\u00bd\u00be\u00bf\u00c0\u00c1\u00c2\u00c3\u00c4\u00c5\u00c6\u00c7\u00c8\u00c9\u00ca\u00cb\u00cc\u00cd\u00ce\u00cf\u011e\u00d1\u00d2\u00d3\u00d4\u00d5\u00d6\u00d7\u00d8\u00d9\u00da\u00db\u00dc\u0130\u015e\u00df\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5\u00e6\u00e7\u00e8\u00e9\u00ea\u00eb\u00ec\u00ed\u00ee\u00ef\u011f\u00f1\u00f2\u00f3\u00f4\u00f5\u00f6\u00f7\u00f8\u00f9\u00fa\u00fb\u00fc\u0131\u015f\u00ff"; const aliases = [ "windows-1254", "x-cp1254", "cp1254" ]; diff --git a/intl/uconv/tests/unit/test_decode_CP1255.js b/intl/uconv/tests/unit/test_decode_CP1255.js index a3da6ec2c5be..ed81bea635eb 100644 --- a/intl/uconv/tests/unit/test_decode_CP1255.js +++ b/intl/uconv/tests/unit/test_decode_CP1255.js @@ -1,10 +1,10 @@ // Tests conversion from windows-1255 to Unicode - + load('CharsetConversionTests.js'); - -const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x82\x83\x84\x85\x86\x87\x88\x89\x8b\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9b\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfd\xfe"; - -const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u2039\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u203a\u00a0\u00a1\u00a2\u00a3\u20aa\u00a5\u00a6\u00a7\u00a8\u00a9\u00d7\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00f7\u00bb\u00bc\u00bd\u00be\u00bf\u05b0\u05b1\u05b2\u05b3\u05b4\u05b5\u05b6\u05b7\u05b8\u05b9\u05bb\u05bc\u05bd\u05be\u05bf\u05c0\u05c1\u05c2\u05c3\u05f0\u05f1\u05f2\u05f3\u05f4\u05d0\u05d1\u05d2\u05d3\u05d4\u05d5\u05d6\u05d7\u05d8\u05d9\u05da\u05db\u05dc\u05dd\u05de\u05df\u05e0\u05e1\u05e2\u05e3\u05e4\u05e5\u05e6\u05e7\u05e8\u05e9\u05ea\u200e\u200f"; + +const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + +const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u0081\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u008a\u2039\u008c\u008d\u008e\u008f\u0090\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u009a\u203a\u009c\u009d\u009e\u009f\u00a0\u00a1\u00a2\u00a3\u20aa\u00a5\u00a6\u00a7\u00a8\u00a9\u00d7\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00f7\u00bb\u00bc\u00bd\u00be\u00bf\u05b0\u05b1\u05b2\u05b3\u05b4\u05b5\u05b6\u05b7\u05b8\u05b9\ufffd\u05bb\u05bc\u05bd\u05be\u05bf\u05c0\u05c1\u05c2\u05c3\u05f0\u05f1\u05f2\u05f3\u05f4\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u05d0\u05d1\u05d2\u05d3\u05d4\u05d5\u05d6\u05d7\u05d8\u05d9\u05da\u05db\u05dc\u05dd\u05de\u05df\u05e0\u05e1\u05e2\u05e3\u05e4\u05e5\u05e6\u05e7\u05e8\u05e9\u05ea\ufffd\ufffd\u200e\u200f\ufffd"; const aliases = [ "windows-1255", "x-cp1255", "cp1255" ]; diff --git a/intl/uconv/tests/unit/test_decode_CP1256.js b/intl/uconv/tests/unit/test_decode_CP1256.js index 85e3e2f59d79..b41e6bc73846 100644 --- a/intl/uconv/tests/unit/test_decode_CP1256.js +++ b/intl/uconv/tests/unit/test_decode_CP1256.js @@ -1,9 +1,9 @@ // Tests conversion from windows-1256 to Unicode - + load('CharsetConversionTests.js'); - + const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; - + const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u067e\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0679\u2039\u0152\u0686\u0698\u0688\u06af\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u06a9\u2122\u0691\u203a\u0153\u200c\u200d\u06ba\u00a0\u060c\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u06be\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u061b\u00bb\u00bc\u00bd\u00be\u061f\u06c1\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062a\u062b\u062c\u062d\u062e\u062f\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u00d7\u0637\u0638\u0639\u063a\u0640\u0641\u0642\u0643\u00e0\u0644\u00e2\u0645\u0646\u0647\u0648\u00e7\u00e8\u00e9\u00ea\u00eb\u0649\u064a\u00ee\u00ef\u064b\u064c\u064d\u064e\u00f4\u064f\u0650\u00f7\u0651\u00f9\u0652\u00fb\u00fc\u200e\u200f\u06d2"; const aliases = [ "windows-1256", "x-cp1256", "cp1256" ]; diff --git a/intl/uconv/tests/unit/test_decode_CP1257.js b/intl/uconv/tests/unit/test_decode_CP1257.js index 098ea3ec2a87..d8a7ca1d4dfd 100644 --- a/intl/uconv/tests/unit/test_decode_CP1257.js +++ b/intl/uconv/tests/unit/test_decode_CP1257.js @@ -1,10 +1,10 @@ // Tests conversion from windows-1257 to Unicode - + load('CharsetConversionTests.js'); - -const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x82\x84\x85\x86\x87\x89\x8b\x8d\x8e\x8f\x91\x92\x93\x94\x95\x96\x97\x99\x9b\x9d\x9e\xa0\xa2\xa3\xa4\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; - -const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u201a\u201e\u2026\u2020\u2021\u2030\u2039\u00a8\u02c7\u00b8\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u2122\u203a\u00af\u02db\u00a0\u00a2\u00a3\u00a4\u00a6\u00a7\u00d8\u00a9\u0156\u00ab\u00ac\u00ad\u00ae\u00c6\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00f8\u00b9\u0157\u00bb\u00bc\u00bd\u00be\u00e6\u0104\u012e\u0100\u0106\u00c4\u00c5\u0118\u0112\u010c\u00c9\u0179\u0116\u0122\u0136\u012a\u013b\u0160\u0143\u0145\u00d3\u014c\u00d5\u00d6\u00d7\u0172\u0141\u015a\u016a\u00dc\u017b\u017d\u00df\u0105\u012f\u0101\u0107\u00e4\u00e5\u0119\u0113\u010d\u00e9\u017a\u0117\u0123\u0137\u012b\u013c\u0161\u0144\u0146\u00f3\u014d\u00f5\u00f6\u00f7\u0173\u0142\u015b\u016b\u00fc\u017c\u017e\u02d9"; + +const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + +const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u0081\u201a\u0083\u201e\u2026\u2020\u2021\u0088\u2030\u008a\u2039\u008c\u00a8\u02c7\u00b8\u0090\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u0098\u2122\u009a\u203a\u009c\u00af\u02db\u009f\u00a0\ufffd\u00a2\u00a3\u00a4\ufffd\u00a6\u00a7\u00d8\u00a9\u0156\u00ab\u00ac\u00ad\u00ae\u00c6\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00f8\u00b9\u0157\u00bb\u00bc\u00bd\u00be\u00e6\u0104\u012e\u0100\u0106\u00c4\u00c5\u0118\u0112\u010c\u00c9\u0179\u0116\u0122\u0136\u012a\u013b\u0160\u0143\u0145\u00d3\u014c\u00d5\u00d6\u00d7\u0172\u0141\u015a\u016a\u00dc\u017b\u017d\u00df\u0105\u012f\u0101\u0107\u00e4\u00e5\u0119\u0113\u010d\u00e9\u017a\u0117\u0123\u0137\u012b\u013c\u0161\u0144\u0146\u00f3\u014d\u00f5\u00f6\u00f7\u0173\u0142\u015b\u016b\u00fc\u017c\u017e\u02d9"; const aliases = [ "windows-1257", "x-cp1257", "cp1257" ]; diff --git a/intl/uconv/tests/unit/test_decode_CP1258.js b/intl/uconv/tests/unit/test_decode_CP1258.js index 33c214f5a530..99d386c65898 100644 --- a/intl/uconv/tests/unit/test_decode_CP1258.js +++ b/intl/uconv/tests/unit/test_decode_CP1258.js @@ -1,10 +1,10 @@ // Tests conversion from windows-1258 to Unicode - + load('CharsetConversionTests.js'); - -const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x82\x83\x84\x85\x86\x87\x88\x89\x8b\x8c\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9b\x9c\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; - -const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u2039\u0152\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u203a\u0153\u0178\u00a0\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u00aa\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00ba\u00bb\u00bc\u00bd\u00be\u00bf\u00c0\u00c1\u00c2\u0102\u00c4\u00c5\u00c6\u00c7\u00c8\u00c9\u00ca\u00cb\u0300\u00cd\u00ce\u00cf\u0110\u00d1\u0309\u00d3\u00d4\u01a0\u00d6\u00d7\u00d8\u00d9\u00da\u00db\u00dc\u01af\u0303\u00df\u00e0\u00e1\u00e2\u0103\u00e4\u00e5\u00e6\u00e7\u00e8\u00e9\u00ea\u00eb\u0301\u00ed\u00ee\u00ef\u0111\u00f1\u0323\u00f3\u00f4\u01a1\u00f6\u00f7\u00f8\u00f9\u00fa\u00fb\u00fc\u01b0\u20ab\u00ff"; + +const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + +const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u0081\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u008a\u2039\u0152\u008d\u008e\u008f\u0090\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u009a\u203a\u0153\u009d\u009e\u0178\u00a0\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u00aa\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00ba\u00bb\u00bc\u00bd\u00be\u00bf\u00c0\u00c1\u00c2\u0102\u00c4\u00c5\u00c6\u00c7\u00c8\u00c9\u00ca\u00cb\u0300\u00cd\u00ce\u00cf\u0110\u00d1\u0309\u00d3\u00d4\u01a0\u00d6\u00d7\u00d8\u00d9\u00da\u00db\u00dc\u01af\u0303\u00df\u00e0\u00e1\u00e2\u0103\u00e4\u00e5\u00e6\u00e7\u00e8\u00e9\u00ea\u00eb\u0301\u00ed\u00ee\u00ef\u0111\u00f1\u0323\u00f3\u00f4\u01a1\u00f6\u00f7\u00f8\u00f9\u00fa\u00fb\u00fc\u01b0\u20ab\u00ff"; const aliases = [ "windows-1258", "x-cp1258", "cp1258" ]; diff --git a/intl/uconv/tests/unit/test_decode_CP874.js b/intl/uconv/tests/unit/test_decode_CP874.js index 14a5b25eb393..1bf1f373d5bf 100644 --- a/intl/uconv/tests/unit/test_decode_CP874.js +++ b/intl/uconv/tests/unit/test_decode_CP874.js @@ -1,10 +1,10 @@ // Tests conversion from windows-874 to Unicode - + load('CharsetConversionTests.js'); - -const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x85\x91\x92\x93\x94\x95\x96\x97\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb"; - -const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u2026\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u00a0\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u0e4e\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\u0e5a\u0e5b"; + +const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + +const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u0081\u0082\u0083\u0084\u2026\u0086\u0087\u0088\u0089\u008a\u008b\u008c\u008d\u008e\u008f\u0090\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u0098\u0099\u009a\u009b\u009c\u009d\u009e\u009f\u00a0\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\ufffd\ufffd\ufffd\ufffd\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u0e4e\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\u0e5a\u0e5b\ufffd\ufffd\ufffd\ufffd"; const aliases = [ "windows-874", "dos-874" ]; diff --git a/intl/uconv/tests/unit/test_encode_CP1250.js b/intl/uconv/tests/unit/test_encode_CP1250.js index e1fe0a15875a..78bd6a947c08 100644 --- a/intl/uconv/tests/unit/test_encode_CP1250.js +++ b/intl/uconv/tests/unit/test_encode_CP1250.js @@ -1,10 +1,10 @@ // Tests conversion from Unicode to windows-1250 load('CharsetConversionTests.js'); - -const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u201a\u201e\u2026\u2020\u2021\u2030\u0160\u2039\u015a\u0164\u017d\u0179\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u2122\u0161\u203a\u015b\u0165\u017e\u017a\u00a0\u02c7\u02d8\u0141\u00a4\u0104\u00a6\u00a7\u00a8\u00a9\u015e\u00ab\u00ac\u00ad\u00ae\u017b\u00b0\u00b1\u02db\u0142\u00b4\u00b5\u00b6\u00b7\u00b8\u0105\u015f\u00bb\u013d\u02dd\u013e\u017c\u0154\u00c1\u00c2\u0102\u00c4\u0139\u0106\u00c7\u010c\u00c9\u0118\u00cb\u011a\u00cd\u00ce\u010e\u0110\u0143\u0147\u00d3\u00d4\u0150\u00d6\u00d7\u0158\u016e\u00da\u0170\u00dc\u00dd\u0162\u00df\u0155\u00e1\u00e2\u0103\u00e4\u013a\u0107\u00e7\u010d\u00e9\u0119\u00eb\u011b\u00ed\u00ee\u010f\u0111\u0144\u0148\u00f3\u00f4\u0151\u00f6\u00f7\u0159\u016f\u00fa\u0171\u00fc\u00fd\u0163\u02d9"; - -const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x82\x84\x85\x86\x87\x89\x8a\x8b\x8c\x8d\x8e\x8f\x91\x92\x93\x94\x95\x96\x97\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + +const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u0081\u201a\u0083\u201e\u2026\u2020\u2021\u0088\u2030\u0160\u2039\u015a\u0164\u017d\u0179\u0090\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u0098\u2122\u0161\u203a\u015b\u0165\u017e\u017a\u00a0\u02c7\u02d8\u0141\u00a4\u0104\u00a6\u00a7\u00a8\u00a9\u015e\u00ab\u00ac\u00ad\u00ae\u017b\u00b0\u00b1\u02db\u0142\u00b4\u00b5\u00b6\u00b7\u00b8\u0105\u015f\u00bb\u013d\u02dd\u013e\u017c\u0154\u00c1\u00c2\u0102\u00c4\u0139\u0106\u00c7\u010c\u00c9\u0118\u00cb\u011a\u00cd\u00ce\u010e\u0110\u0143\u0147\u00d3\u00d4\u0150\u00d6\u00d7\u0158\u016e\u00da\u0170\u00dc\u00dd\u0162\u00df\u0155\u00e1\u00e2\u0103\u00e4\u013a\u0107\u00e7\u010d\u00e9\u0119\u00eb\u011b\u00ed\u00ee\u010f\u0111\u0144\u0148\u00f3\u00f4\u0151\u00f6\u00f7\u0159\u016f\u00fa\u0171\u00fc\u00fd\u0163\u02d9"; + +const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; const aliases = [ "windows-1250", "x-cp1250", "cp1250" ]; diff --git a/intl/uconv/tests/unit/test_encode_CP1251.js b/intl/uconv/tests/unit/test_encode_CP1251.js index 565b674e0366..a8a755e2cd0d 100644 --- a/intl/uconv/tests/unit/test_encode_CP1251.js +++ b/intl/uconv/tests/unit/test_encode_CP1251.js @@ -1,10 +1,10 @@ // Tests conversion from Unicode to windows-1251 - + load('CharsetConversionTests.js'); - -const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0402\u0403\u201a\u0453\u201e\u2026\u2020\u2021\u20ac\u2030\u0409\u2039\u040a\u040c\u040b\u040f\u0452\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u2122\u0459\u203a\u045a\u045c\u045b\u045f\u00a0\u040e\u045e\u0408\u00a4\u0490\u00a6\u00a7\u0401\u00a9\u0404\u00ab\u00ac\u00ad\u00ae\u0407\u00b0\u00b1\u0406\u0456\u0491\u00b5\u00b6\u00b7\u0451\u2116\u0454\u00bb\u0458\u0405\u0455\u0457\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f"; - -const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + +const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u0402\u0403\u201a\u0453\u201e\u2026\u2020\u2021\u20ac\u2030\u0409\u2039\u040a\u040c\u040b\u040f\u0452\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u0098\u2122\u0459\u203a\u045a\u045c\u045b\u045f\u00a0\u040e\u045e\u0408\u00a4\u0490\u00a6\u00a7\u0401\u00a9\u0404\u00ab\u00ac\u00ad\u00ae\u0407\u00b0\u00b1\u0406\u0456\u0491\u00b5\u00b6\u00b7\u0451\u2116\u0454\u00bb\u0458\u0405\u0455\u0457\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f"; + +const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; const aliases = [ "windows-1251", "x-cp1251", "cp1251" ]; diff --git a/intl/uconv/tests/unit/test_encode_CP1252.js b/intl/uconv/tests/unit/test_encode_CP1252.js index 1f4e17c1a44c..d3c3441d62ad 100644 --- a/intl/uconv/tests/unit/test_encode_CP1252.js +++ b/intl/uconv/tests/unit/test_encode_CP1252.js @@ -1,10 +1,10 @@ // Tests conversion from Unicode to windows-1252 - + load('CharsetConversionTests.js'); - -const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\u017d\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\u017e\u0178\u00a0\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u00aa\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00ba\u00bb\u00bc\u00bd\u00be\u00bf\u00c0\u00c1\u00c2\u00c3\u00c4\u00c5\u00c6\u00c7\u00c8\u00c9\u00ca\u00cb\u00cc\u00cd\u00ce\u00cf\u00d0\u00d1\u00d2\u00d3\u00d4\u00d5\u00d6\u00d7\u00d8\u00d9\u00da\u00db\u00dc\u00dd\u00de\u00df\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5\u00e6\u00e7\u00e8\u00e9\u00ea\u00eb\u00ec\u00ed\u00ee\u00ef\u00f0\u00f1\u00f2\u00f3\u00f4\u00f5\u00f6\u00f7\u00f8\u00f9\u00fa\u00fb\u00fc\u00fd\u00fe\u00ff"; - -const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8e\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + +const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u0081\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\u008d\u017d\u008f\u0090\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\u009d\u017e\u0178\u00a0\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u00aa\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00ba\u00bb\u00bc\u00bd\u00be\u00bf\u00c0\u00c1\u00c2\u00c3\u00c4\u00c5\u00c6\u00c7\u00c8\u00c9\u00ca\u00cb\u00cc\u00cd\u00ce\u00cf\u00d0\u00d1\u00d2\u00d3\u00d4\u00d5\u00d6\u00d7\u00d8\u00d9\u00da\u00db\u00dc\u00dd\u00de\u00df\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5\u00e6\u00e7\u00e8\u00e9\u00ea\u00eb\u00ec\u00ed\u00ee\u00ef\u00f0\u00f1\u00f2\u00f3\u00f4\u00f5\u00f6\u00f7\u00f8\u00f9\u00fa\u00fb\u00fc\u00fd\u00fe\u00ff"; + +const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; const aliases = [ "windows-1252", "x-cp1252", "cp1252" ]; diff --git a/intl/uconv/tests/unit/test_encode_CP1253.js b/intl/uconv/tests/unit/test_encode_CP1253.js index 2885237308f4..ce75d220d301 100644 --- a/intl/uconv/tests/unit/test_encode_CP1253.js +++ b/intl/uconv/tests/unit/test_encode_CP1253.js @@ -1,10 +1,10 @@ // Tests conversion from Unicode to windows-1253 load('CharsetConversionTests.js'); - -const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u2030\u2039\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u2122\u203a\u00a0\u0385\u0386\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u00ab\u00ac\u00ad\u00ae\u2015\u00b0\u00b1\u00b2\u00b3\u0384\u00b5\u00b6\u00b7\u0388\u0389\u038a\u00bb\u038c\u00bd\u038e\u038f\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9\u03aa\u03ab\u03ac\u03ad\u03ae\u03af\u03b0\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9\u03ca\u03cb\u03cc\u03cd\u03ce"; - -const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x82\x83\x84\x85\x86\x87\x89\x8b\x91\x92\x93\x94\x95\x96\x97\x99\x9b\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe"; + +const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u0081\u201a\u0192\u201e\u2026\u2020\u2021\u0088\u2030\u008a\u2039\u008c\u008d\u008e\u008f\u0090\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u0098\u2122\u009a\u203a\u009c\u009d\u009e\u009f\u00a0\u0385\u0386\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u00ab\u00ac\u00ad\u00ae\u2015\u00b0\u00b1\u00b2\u00b3\u0384\u00b5\u00b6\u00b7\u0388\u0389\u038a\u00bb\u038c\u00bd\u038e\u038f\u0390\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9\u03aa\u03ab\u03ac\u03ad\u03ae\u03af\u03b0\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9\u03ca\u03cb\u03cc\u03cd\u03ce"; + +const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe"; const aliases = [ "windows-1253", "x-cp1253", "cp1253" ]; diff --git a/intl/uconv/tests/unit/test_encode_CP1254.js b/intl/uconv/tests/unit/test_encode_CP1254.js index 3a91caeadd60..d5fe1ac6a874 100644 --- a/intl/uconv/tests/unit/test_encode_CP1254.js +++ b/intl/uconv/tests/unit/test_encode_CP1254.js @@ -1,10 +1,10 @@ // Tests conversion from Unicode to windows-1254 - + load('CharsetConversionTests.js'); - -const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\u0178\u00a0\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u00aa\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00ba\u00bb\u00bc\u00bd\u00be\u00bf\u00c0\u00c1\u00c2\u00c3\u00c4\u00c5\u00c6\u00c7\u00c8\u00c9\u00ca\u00cb\u00cc\u00cd\u00ce\u00cf\u011e\u00d1\u00d2\u00d3\u00d4\u00d5\u00d6\u00d7\u00d8\u00d9\u00da\u00db\u00dc\u0130\u015e\u00df\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5\u00e6\u00e7\u00e8\u00e9\u00ea\u00eb\u00ec\u00ed\u00ee\u00ef\u011f\u00f1\u00f2\u00f3\u00f4\u00f5\u00f6\u00f7\u00f8\u00f9\u00fa\u00fb\u00fc\u0131\u015f\u00ff"; - -const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + +const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u0081\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\u008d\u008e\u008f\u0090\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\u009d\u009e\u0178\u00a0\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u00aa\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00ba\u00bb\u00bc\u00bd\u00be\u00bf\u00c0\u00c1\u00c2\u00c3\u00c4\u00c5\u00c6\u00c7\u00c8\u00c9\u00ca\u00cb\u00cc\u00cd\u00ce\u00cf\u011e\u00d1\u00d2\u00d3\u00d4\u00d5\u00d6\u00d7\u00d8\u00d9\u00da\u00db\u00dc\u0130\u015e\u00df\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5\u00e6\u00e7\u00e8\u00e9\u00ea\u00eb\u00ec\u00ed\u00ee\u00ef\u011f\u00f1\u00f2\u00f3\u00f4\u00f5\u00f6\u00f7\u00f8\u00f9\u00fa\u00fb\u00fc\u0131\u015f\u00ff"; + +const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; const aliases = [ "windows-1254", "x-cp1254", "cp1254" ]; diff --git a/intl/uconv/tests/unit/test_encode_CP1255.js b/intl/uconv/tests/unit/test_encode_CP1255.js index d1189e22bd00..09654b8b1c17 100644 --- a/intl/uconv/tests/unit/test_encode_CP1255.js +++ b/intl/uconv/tests/unit/test_encode_CP1255.js @@ -1,10 +1,10 @@ // Tests conversion from Unicode to windows-1255 - + load('CharsetConversionTests.js'); - -const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u2039\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u203a\u00a0\u00a1\u00a2\u00a3\u20aa\u00a5\u00a6\u00a7\u00a8\u00a9\u00d7\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00f7\u00bb\u00bc\u00bd\u00be\u00bf\u05b0\u05b1\u05b2\u05b3\u05b4\u05b5\u05b6\u05b7\u05b8\u05b9\u05bb\u05bc\u05bd\u05be\u05bf\u05c0\u05c1\u05c2\u05c3\u05f0\u05f1\u05f2\u05f3\u05f4\u05d0\u05d1\u05d2\u05d3\u05d4\u05d5\u05d6\u05d7\u05d8\u05d9\u05da\u05db\u05dc\u05dd\u05de\u05df\u05e0\u05e1\u05e2\u05e3\u05e4\u05e5\u05e6\u05e7\u05e8\u05e9\u05ea\u200e\u200f"; - -const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x82\x83\x84\x85\x86\x87\x88\x89\x8b\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9b\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfd\xfe"; + +const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u0081\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u008a\u2039\u008c\u008d\u008e\u008f\u0090\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u009a\u203a\u009c\u009d\u009e\u009f\u00a0\u00a1\u00a2\u00a3\u20aa\u00a5\u00a6\u00a7\u00a8\u00a9\u00d7\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00f7\u00bb\u00bc\u00bd\u00be\u00bf\u05b0\u05b1\u05b2\u05b3\u05b4\u05b5\u05b6\u05b7\u05b8\u05b9\u05bb\u05bc\u05bd\u05be\u05bf\u05c0\u05c1\u05c2\u05c3\u05f0\u05f1\u05f2\u05f3\u05f4\u05d0\u05d1\u05d2\u05d3\u05d4\u05d5\u05d6\u05d7\u05d8\u05d9\u05da\u05db\u05dc\u05dd\u05de\u05df\u05e0\u05e1\u05e2\u05e3\u05e4\u05e5\u05e6\u05e7\u05e8\u05e9\u05ea\u200e\u200f"; + +const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfd\xfe"; const aliases = [ "windows-1255", "x-cp1255", "cp1255" ]; diff --git a/intl/uconv/tests/unit/test_encode_CP1256.js b/intl/uconv/tests/unit/test_encode_CP1256.js index b876d27e5600..cd8ffb711881 100644 --- a/intl/uconv/tests/unit/test_encode_CP1256.js +++ b/intl/uconv/tests/unit/test_encode_CP1256.js @@ -1,9 +1,9 @@ // Tests conversion from Unicode to windows-1256 - + load('CharsetConversionTests.js'); - + const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u067e\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0679\u2039\u0152\u0686\u0698\u0688\u06af\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u06a9\u2122\u0691\u203a\u0153\u200c\u200d\u06ba\u00a0\u060c\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u06be\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u061b\u00bb\u00bc\u00bd\u00be\u061f\u06c1\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062a\u062b\u062c\u062d\u062e\u062f\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u00d7\u0637\u0638\u0639\u063a\u0640\u0641\u0642\u0643\u00e0\u0644\u00e2\u0645\u0646\u0647\u0648\u00e7\u00e8\u00e9\u00ea\u00eb\u0649\u064a\u00ee\u00ef\u064b\u064c\u064d\u064e\u00f4\u064f\u0650\u00f7\u0651\u00f9\u0652\u00fb\u00fc\u200e\u200f\u06d2"; - + const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; const aliases = [ "windows-1256", "x-cp1256", "cp1256" ]; diff --git a/intl/uconv/tests/unit/test_encode_CP1257.js b/intl/uconv/tests/unit/test_encode_CP1257.js index 17c52654b1dd..602c2cd94991 100644 --- a/intl/uconv/tests/unit/test_encode_CP1257.js +++ b/intl/uconv/tests/unit/test_encode_CP1257.js @@ -1,10 +1,10 @@ // Tests conversion from Unicode to windows-1257 load('CharsetConversionTests.js'); - -const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u201a\u201e\u2026\u2020\u2021\u2030\u2039\u00a8\u02c7\u00b8\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u2122\u203a\u00af\u02db\u00a0\u00a2\u00a3\u00a4\u00a6\u00a7\u00d8\u00a9\u0156\u00ab\u00ac\u00ad\u00ae\u00c6\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00f8\u00b9\u0157\u00bb\u00bc\u00bd\u00be\u00e6\u0104\u012e\u0100\u0106\u00c4\u00c5\u0118\u0112\u010c\u00c9\u0179\u0116\u0122\u0136\u012a\u013b\u0160\u0143\u0145\u00d3\u014c\u00d5\u00d6\u00d7\u0172\u0141\u015a\u016a\u00dc\u017b\u017d\u00df\u0105\u012f\u0101\u0107\u00e4\u00e5\u0119\u0113\u010d\u00e9\u017a\u0117\u0123\u0137\u012b\u013c\u0161\u0144\u0146\u00f3\u014d\u00f5\u00f6\u00f7\u0173\u0142\u015b\u016b\u00fc\u017c\u017e\u02d9"; - -const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x82\x84\x85\x86\x87\x89\x8b\x8d\x8e\x8f\x91\x92\x93\x94\x95\x96\x97\x99\x9b\x9d\x9e\xa0\xa2\xa3\xa4\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + +const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u0081\u201a\u0083\u201e\u2026\u2020\u2021\u0088\u2030\u008a\u2039\u008c\u00a8\u02c7\u00b8\u0090\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u0098\u2122\u009a\u203a\u009c\u00af\u02db\u009f\u00a0\u00a2\u00a3\u00a4\u00a6\u00a7\u00d8\u00a9\u0156\u00ab\u00ac\u00ad\u00ae\u00c6\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00f8\u00b9\u0157\u00bb\u00bc\u00bd\u00be\u00e6\u0104\u012e\u0100\u0106\u00c4\u00c5\u0118\u0112\u010c\u00c9\u0179\u0116\u0122\u0136\u012a\u013b\u0160\u0143\u0145\u00d3\u014c\u00d5\u00d6\u00d7\u0172\u0141\u015a\u016a\u00dc\u017b\u017d\u00df\u0105\u012f\u0101\u0107\u00e4\u00e5\u0119\u0113\u010d\u00e9\u017a\u0117\u0123\u0137\u012b\u013c\u0161\u0144\u0146\u00f3\u014d\u00f5\u00f6\u00f7\u0173\u0142\u015b\u016b\u00fc\u017c\u017e\u02d9"; + +const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa2\xa3\xa4\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; const aliases = [ "windows-1257", "x-cp1257", "cp1257" ]; diff --git a/intl/uconv/tests/unit/test_encode_CP1258.js b/intl/uconv/tests/unit/test_encode_CP1258.js index 60c86143968b..8a5945e30c6e 100644 --- a/intl/uconv/tests/unit/test_encode_CP1258.js +++ b/intl/uconv/tests/unit/test_encode_CP1258.js @@ -1,10 +1,10 @@ // Tests conversion from Unicode to windows-1258 load('CharsetConversionTests.js'); - -const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u2039\u0152\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u203a\u0153\u0178\u00a0\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u00aa\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00ba\u00bb\u00bc\u00bd\u00be\u00bf\u00c0\u00c1\u00c2\u0102\u00c4\u00c5\u00c6\u00c7\u00c8\u00c9\u00ca\u00cb\u0300\u00cd\u00ce\u00cf\u0110\u00d1\u0309\u00d3\u00d4\u01a0\u00d6\u00d7\u00d8\u00d9\u00da\u00db\u00dc\u01af\u0303\u00df\u00e0\u00e1\u00e2\u0103\u00e4\u00e5\u00e6\u00e7\u00e8\u00e9\u00ea\u00eb\u0301\u00ed\u00ee\u00ef\u0111\u00f1\u0323\u00f3\u00f4\u01a1\u00f6\u00f7\u00f8\u00f9\u00fa\u00fb\u00fc\u01b0\u20ab\u00ff"; - -const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x82\x83\x84\x85\x86\x87\x88\x89\x8b\x8c\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9b\x9c\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; + +const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u0081\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u008a\u2039\u0152\u008d\u008e\u008f\u0090\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u009a\u203a\u0153\u009d\u009e\u0178\u00a0\u00a1\u00a2\u00a3\u00a4\u00a5\u00a6\u00a7\u00a8\u00a9\u00aa\u00ab\u00ac\u00ad\u00ae\u00af\u00b0\u00b1\u00b2\u00b3\u00b4\u00b5\u00b6\u00b7\u00b8\u00b9\u00ba\u00bb\u00bc\u00bd\u00be\u00bf\u00c0\u00c1\u00c2\u0102\u00c4\u00c5\u00c6\u00c7\u00c8\u00c9\u00ca\u00cb\u0300\u00cd\u00ce\u00cf\u0110\u00d1\u0309\u00d3\u00d4\u01a0\u00d6\u00d7\u00d8\u00d9\u00da\u00db\u00dc\u01af\u0303\u00df\u00e0\u00e1\u00e2\u0103\u00e4\u00e5\u00e6\u00e7\u00e8\u00e9\u00ea\u00eb\u0301\u00ed\u00ee\u00ef\u0111\u00f1\u0323\u00f3\u00f4\u01a1\u00f6\u00f7\u00f8\u00f9\u00fa\u00fb\u00fc\u01b0\u20ab\u00ff"; + +const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"; const aliases = [ "windows-1258", "x-cp1258", "cp1258" ]; diff --git a/intl/uconv/tests/unit/test_encode_CP874.js b/intl/uconv/tests/unit/test_encode_CP874.js index 834c7a3ae9e3..113502388766 100644 --- a/intl/uconv/tests/unit/test_encode_CP874.js +++ b/intl/uconv/tests/unit/test_encode_CP874.js @@ -1,10 +1,10 @@ // Tests conversion from Unicode to windows-874 - + load('CharsetConversionTests.js'); - -const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u2026\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u00a0\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u0e4e\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\u0e5a\u0e5b"; - -const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x85\x91\x92\x93\x94\x95\x96\x97\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb"; + +const inString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u20ac\u0081\u0082\u0083\u0084\u2026\u0086\u0087\u0088\u0089\u008a\u008b\u008c\u008d\u008e\u008f\u0090\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u0098\u0099\u009a\u009b\u009c\u009d\u009e\u009f\u00a0\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u0e4e\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\u0e5a\u0e5b"; + +const expectedString = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb"; const aliases = [ "windows-874", "dos-874" ]; From 3809ea94b88e486d89d6c7b2bfee56e58670c11e Mon Sep 17 00:00:00 2001 From: Simon Montagu Date: Tue, 2 Sep 2014 17:05:58 +0300 Subject: [PATCH 053/139] Bug 1058021 patch 2: add more helpful output for encoding test failures. r=jfkthame --- .../tests/unit/CharsetConversionTests.js | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/intl/uconv/tests/unit/CharsetConversionTests.js b/intl/uconv/tests/unit/CharsetConversionTests.js index 6fb9951664c6..7c14d34ba50e 100644 --- a/intl/uconv/tests/unit/CharsetConversionTests.js +++ b/intl/uconv/tests/unit/CharsetConversionTests.js @@ -25,6 +25,17 @@ function checkDecode(converter, charset, inText, expectedText) } catch(e) { outText = "\ufffd"; } + + if (outText != expectedText) { + for (var i = 0; i < inText.length; ++i) { + var inn = inText[i]; + var out = outText[i]; + var expected = expectedText[i]; + if (out != expected) { + dump("Decoding error at position " + i + ": for input " + escape(inn) + " expected " + escape(expected) + " but got " + escape(out) + "\n"); + } + } + } do_check_eq(outText, expectedText); } @@ -38,6 +49,17 @@ function checkEncode(converter, charset, inText, expectedText) dump("testing encoding from Unicode to " + charset + "\n"); var outText = converter.ConvertFromUnicode(inText) + converter.Finish(); + + if (outText != expectedText) { + for (var i = 0; i < inText.length; ++i) { + var inn = inText[i]; + var out = outText[i]; + var expected = expectedText[i]; + if (out != expected) { + dump("Encoding error at position " + i + ": for input " + escape(inn) + " expected " + escape(expected) + " but got " + escape(out) + "\n"); + } + } + } do_check_eq(outText, expectedText); } From 4f33dd99441df244ae2183aae03b66bc875d6f66 Mon Sep 17 00:00:00 2001 From: Simon Montagu Date: Tue, 2 Sep 2014 17:05:58 +0300 Subject: [PATCH 054/139] Bug 1058021 patch 3: change the mapfile generator to pass thru undefined codepoints from 0x80-0x9F and update the comments. r=jfkthame --- intl/uconv/tools/umaptable.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/intl/uconv/tools/umaptable.c b/intl/uconv/tools/umaptable.c index 0dc976556593..8bc9a6d4775c 100644 --- a/intl/uconv/tools/umaptable.c +++ b/intl/uconv/tools/umaptable.c @@ -172,9 +172,9 @@ void gentable() printf(" The tool which used to generate this file is called umaptable.\n"); printf(" You can find this tool under mozilla/intl/uconv/tools/umaptable.c.\n"); - printf(" If you have any problem of this file. Please contact \n"); - printf(" Netscape Client International Team or \n"); - printf(" ftang@netscape \n"); + printf(" If you have any problems with this file, please file a bug\n"); + printf(" under the \"Internationalization\" component in\n"); + printf(" https://bugzilla.mozilla.org/enter_bug.cgi?product=Core\n"); printf("\n"); printf(" Table in Debug form \n"); @@ -433,11 +433,19 @@ void getinput() { if(buf[0]=='0' && buf[1] == 'x') { + u=-1; sscanf(buf,"%hx %hx",&c,&u); - if(bGenerateFromUnicodeTable) - SetMapValue(u, c); - else - SetMapValue(c, u); + if (u == -1 && 0x80 <= c && c <=0x9f) + { + u = c; + } + if (u != -1) + { + if(bGenerateFromUnicodeTable) + SetMapValue(u, c); + else + SetMapValue(c, u); + } } } } From d935fbfda666c1f3802be64acd32e28ca748924d Mon Sep 17 00:00:00 2001 From: Simon Montagu Date: Tue, 2 Sep 2014 17:05:58 +0300 Subject: [PATCH 055/139] Bug 1058021 patch 4: regenerated encoding mapfiles. r=jfkthame --- intl/uconv/ucvlatin/cp1250.uf | 127 +++++++++++---------- intl/uconv/ucvlatin/cp1250.ut | 25 +++-- intl/uconv/ucvlatin/cp1251.uf | 59 +++++----- intl/uconv/ucvlatin/cp1251.ut | 13 ++- intl/uconv/ucvlatin/cp1253.uf | 59 +++++----- intl/uconv/ucvlatin/cp1253.ut | 25 +++-- intl/uconv/ucvlatin/cp1254.uf | 155 +++++++++++++++----------- intl/uconv/ucvlatin/cp1254.ut | 25 +++-- intl/uconv/ucvlatin/cp1255.uf | 187 +++++++++++++++++-------------- intl/uconv/ucvlatin/cp1255.ut | 103 +++++++++-------- intl/uconv/ucvlatin/cp1256.uf | 6 +- intl/uconv/ucvlatin/cp1256.ut | 6 +- intl/uconv/ucvlatin/cp1257.uf | 155 ++++++++++++++------------ intl/uconv/ucvlatin/cp1257.ut | 25 +++-- intl/uconv/ucvlatin/cp1258.uf | 201 ++++++++++++++++++---------------- intl/uconv/ucvlatin/cp1258.ut | 22 ++-- intl/uconv/ucvlatin/cp874.uf | 90 +++++++++------ intl/uconv/ucvlatin/cp874.ut | 75 ++++++++----- 18 files changed, 750 insertions(+), 608 deletions(-) diff --git a/intl/uconv/ucvlatin/cp1250.uf b/intl/uconv/ucvlatin/cp1250.uf index 3e3ab12e0e8e..6a1fdb52fea2 100644 --- a/intl/uconv/ucvlatin/cp1250.uf +++ b/intl/uconv/ucvlatin/cp1250.uf @@ -5,10 +5,11 @@ /*======================================================== This is a Generated file. Please don't edit it. - The tool which used to generate this file is called fromu. - If you have any problem of this file. Please contact - Netscape Client International Team or - ftang@netscape + The tool which used to generate this file is called umaptable. + You can find this tool under mozilla/intl/uconv/tools/umaptable.c. + If you have any problems with this file, please file a bug + under the "Internationalization" component in + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core Table in Debug form Begin of Item 0000 @@ -20,33 +21,37 @@ End of Item 0000 Begin of Item 0001 Format 1 - srcBegin = 00A0 + srcBegin = 0081 srcEnd = 011B mappingOffset = 0000 Mapping = - 00A0 FFFD FFFD FFFD 00A4 FFFD 00A6 00A7 - 00A8 00A9 FFFD 00AB 00AC 00AD 00AE FFFD - 00B0 00B1 FFFD FFFD 00B4 00B5 00B6 00B7 - 00B8 FFFD FFFD 00BB FFFD FFFD FFFD FFFD - FFFD 00C1 00C2 FFFD 00C4 FFFD FFFD 00C7 - FFFD 00C9 FFFD 00CB FFFD 00CD 00CE FFFD - FFFD FFFD FFFD 00D3 00D4 FFFD 00D6 00D7 - FFFD FFFD 00DA FFFD 00DC 00DD FFFD 00DF - FFFD 00E1 00E2 FFFD 00E4 FFFD FFFD 00E7 - FFFD 00E9 FFFD 00EB FFFD 00ED 00EE FFFD - FFFD FFFD FFFD 00F3 00F4 FFFD 00F6 00F7 - FFFD FFFD 00FA FFFD 00FC 00FD FFFD FFFD - FFFD FFFD 00C3 00E3 00A5 00B9 00C6 00E6 - FFFD FFFD FFFD FFFD 00C8 00E8 00CF 00EF - 00D0 00F0 FFFD FFFD FFFD FFFD FFFD FFFD - 00CA 00EA 00CC 00EC + 0081 FFFD 0083 FFFD FFFD FFFD FFFD 0088 + FFFD FFFD FFFD FFFD FFFD FFFD FFFD 0090 + FFFD FFFD FFFD FFFD FFFD FFFD FFFD 0098 + FFFD FFFD FFFD FFFD FFFD FFFD FFFD 00A0 + FFFD FFFD FFFD 00A4 FFFD 00A6 00A7 00A8 + 00A9 FFFD 00AB 00AC 00AD 00AE FFFD 00B0 + 00B1 FFFD FFFD 00B4 00B5 00B6 00B7 00B8 + FFFD FFFD 00BB FFFD FFFD FFFD FFFD FFFD + 00C1 00C2 FFFD 00C4 FFFD FFFD 00C7 FFFD + 00C9 FFFD 00CB FFFD 00CD 00CE FFFD FFFD + FFFD FFFD 00D3 00D4 FFFD 00D6 00D7 FFFD + FFFD 00DA FFFD 00DC 00DD FFFD 00DF FFFD + 00E1 00E2 FFFD 00E4 FFFD FFFD 00E7 FFFD + 00E9 FFFD 00EB FFFD 00ED 00EE FFFD FFFD + FFFD FFFD 00F3 00F4 FFFD 00F6 00F7 FFFD + FFFD 00FA FFFD 00FC 00FD FFFD FFFD FFFD + FFFD 00C3 00E3 00A5 00B9 00C6 00E6 FFFD + FFFD FFFD FFFD 00C8 00E8 00CF 00EF 00D0 + 00F0 FFFD FFFD FFFD FFFD FFFD FFFD 00CA + 00EA 00CC 00EC End of Item 0001 Begin of Item 0002 Format 1 srcBegin = 0139 srcEnd = 017E - mappingOffset = 007C + mappingOffset = 009B Mapping = 00C5 00E5 FFFD FFFD 00BC 00BE FFFD FFFD 00A3 00B3 00D1 00F1 FFFD FFFD 00D2 00F2 @@ -69,7 +74,7 @@ Begin of Item 0004 Format 1 srcBegin = 02D8 srcEnd = 02DD - mappingOffset = 00C2 + mappingOffset = 00E1 Mapping = 00A2 00FF FFFD 00B2 FFFD 00BD End of Item 0004 @@ -78,7 +83,7 @@ Begin of Item 0005 Format 1 srcBegin = 2013 srcEnd = 203A - mappingOffset = 00C8 + mappingOffset = 00E7 Mapping = 0096 0097 FFFD FFFD FFFD 0091 0092 0082 FFFD 0093 0094 0084 FFFD 0086 0087 0095 @@ -122,44 +127,48 @@ End of Item 0007 /*-------------------------------------------------------*/ /* Offset=0x0007 Start of MapCell Array */ /* 0000 */ 0x0000, 0x007F, 0x0000, -/* 0001 */ 0x00A0, 0x011B, 0x0000, -/* 0002 */ 0x0139, 0x017E, 0x007C, +/* 0001 */ 0x0081, 0x011B, 0x0000, +/* 0002 */ 0x0139, 0x017E, 0x009B, /* 0003 */ 0x02C7, 0x0000, 0x00A1, -/* 0004 */ 0x02D8, 0x02DD, 0x00C2, -/* 0005 */ 0x2013, 0x203A, 0x00C8, +/* 0004 */ 0x02D8, 0x02DD, 0x00E1, +/* 0005 */ 0x2013, 0x203A, 0x00E7, /* 0006 */ 0x20AC, 0x0000, 0x0080, /* 0007 */ 0x2122, 0x0000, 0x0099, /*-------------------------------------------------------*/ /* Offset=0x001F Start of MappingTable */ -/* 0000 */ 0x00A0, 0xFFFD, 0xFFFD, 0xFFFD, 0x00A4, 0xFFFD, 0x00A6, 0x00A7, -/* 0008 */ 0x00A8, 0x00A9, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0xFFFD, -/* 0010 */ 0x00B0, 0x00B1, 0xFFFD, 0xFFFD, 0x00B4, 0x00B5, 0x00B6, 0x00B7, -/* 0018 */ 0x00B8, 0xFFFD, 0xFFFD, 0x00BB, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0020 */ 0xFFFD, 0x00C1, 0x00C2, 0xFFFD, 0x00C4, 0xFFFD, 0xFFFD, 0x00C7, -/* 0028 */ 0xFFFD, 0x00C9, 0xFFFD, 0x00CB, 0xFFFD, 0x00CD, 0x00CE, 0xFFFD, -/* 0030 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00D3, 0x00D4, 0xFFFD, 0x00D6, 0x00D7, -/* 0038 */ 0xFFFD, 0xFFFD, 0x00DA, 0xFFFD, 0x00DC, 0x00DD, 0xFFFD, 0x00DF, -/* 0040 */ 0xFFFD, 0x00E1, 0x00E2, 0xFFFD, 0x00E4, 0xFFFD, 0xFFFD, 0x00E7, -/* 0048 */ 0xFFFD, 0x00E9, 0xFFFD, 0x00EB, 0xFFFD, 0x00ED, 0x00EE, 0xFFFD, -/* 0050 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00F3, 0x00F4, 0xFFFD, 0x00F6, 0x00F7, -/* 0058 */ 0xFFFD, 0xFFFD, 0x00FA, 0xFFFD, 0x00FC, 0x00FD, 0xFFFD, 0xFFFD, -/* 0060 */ 0xFFFD, 0xFFFD, 0x00C3, 0x00E3, 0x00A5, 0x00B9, 0x00C6, 0x00E6, -/* 0068 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00C8, 0x00E8, 0x00CF, 0x00EF, -/* 0070 */ 0x00D0, 0x00F0, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0078 */ 0x00CA, 0x00EA, 0x00CC, 0x00EC, 0x00C5, 0x00E5, 0xFFFD, 0xFFFD, -/* 0080 */ 0x00BC, 0x00BE, 0xFFFD, 0xFFFD, 0x00A3, 0x00B3, 0x00D1, 0x00F1, -/* 0088 */ 0xFFFD, 0xFFFD, 0x00D2, 0x00F2, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0090 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00D5, 0x00F5, 0xFFFD, 0xFFFD, 0x00C0, -/* 0098 */ 0x00E0, 0xFFFD, 0xFFFD, 0x00D8, 0x00F8, 0x008C, 0x009C, 0xFFFD, -/* 00A0 */ 0xFFFD, 0x00AA, 0x00BA, 0x008A, 0x009A, 0x00DE, 0x00FE, 0x008D, -/* 00A8 */ 0x009D, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 00B0 */ 0xFFFD, 0x00D9, 0x00F9, 0x00DB, 0x00FB, 0xFFFD, 0xFFFD, 0xFFFD, -/* 00B8 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008F, 0x009F, 0x00AF, 0x00BF, -/* 00C0 */ 0x008E, 0x009E, 0x00A2, 0x00FF, 0xFFFD, 0x00B2, 0xFFFD, 0x00BD, -/* 00C8 */ 0x0096, 0x0097, 0xFFFD, 0xFFFD, 0xFFFD, 0x0091, 0x0092, 0x0082, -/* 00D0 */ 0xFFFD, 0x0093, 0x0094, 0x0084, 0xFFFD, 0x0086, 0x0087, 0x0095, -/* 00D8 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x0085, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 00E0 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0089, 0xFFFD, 0xFFFD, -/* 00E8 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008B, 0x009B, -/* End of table Total Length = 0x010F * 2 */ +/* 0000 */ 0x0081, 0xFFFD, 0x0083, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0088, +/* 0008 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0090, +/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0098, +/* 0018 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00A0, +/* 0020 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00A4, 0xFFFD, 0x00A6, 0x00A7, 0x00A8, +/* 0028 */ 0x00A9, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0xFFFD, 0x00B0, +/* 0030 */ 0x00B1, 0xFFFD, 0xFFFD, 0x00B4, 0x00B5, 0x00B6, 0x00B7, 0x00B8, +/* 0038 */ 0xFFFD, 0xFFFD, 0x00BB, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0040 */ 0x00C1, 0x00C2, 0xFFFD, 0x00C4, 0xFFFD, 0xFFFD, 0x00C7, 0xFFFD, +/* 0048 */ 0x00C9, 0xFFFD, 0x00CB, 0xFFFD, 0x00CD, 0x00CE, 0xFFFD, 0xFFFD, +/* 0050 */ 0xFFFD, 0xFFFD, 0x00D3, 0x00D4, 0xFFFD, 0x00D6, 0x00D7, 0xFFFD, +/* 0058 */ 0xFFFD, 0x00DA, 0xFFFD, 0x00DC, 0x00DD, 0xFFFD, 0x00DF, 0xFFFD, +/* 0060 */ 0x00E1, 0x00E2, 0xFFFD, 0x00E4, 0xFFFD, 0xFFFD, 0x00E7, 0xFFFD, +/* 0068 */ 0x00E9, 0xFFFD, 0x00EB, 0xFFFD, 0x00ED, 0x00EE, 0xFFFD, 0xFFFD, +/* 0070 */ 0xFFFD, 0xFFFD, 0x00F3, 0x00F4, 0xFFFD, 0x00F6, 0x00F7, 0xFFFD, +/* 0078 */ 0xFFFD, 0x00FA, 0xFFFD, 0x00FC, 0x00FD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0080 */ 0xFFFD, 0x00C3, 0x00E3, 0x00A5, 0x00B9, 0x00C6, 0x00E6, 0xFFFD, +/* 0088 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00C8, 0x00E8, 0x00CF, 0x00EF, 0x00D0, +/* 0090 */ 0x00F0, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00CA, +/* 0098 */ 0x00EA, 0x00CC, 0x00EC, 0x00C5, 0x00E5, 0xFFFD, 0xFFFD, 0x00BC, +/* 00A0 */ 0x00BE, 0xFFFD, 0xFFFD, 0x00A3, 0x00B3, 0x00D1, 0x00F1, 0xFFFD, +/* 00A8 */ 0xFFFD, 0x00D2, 0x00F2, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 00B0 */ 0xFFFD, 0xFFFD, 0x00D5, 0x00F5, 0xFFFD, 0xFFFD, 0x00C0, 0x00E0, +/* 00B8 */ 0xFFFD, 0xFFFD, 0x00D8, 0x00F8, 0x008C, 0x009C, 0xFFFD, 0xFFFD, +/* 00C0 */ 0x00AA, 0x00BA, 0x008A, 0x009A, 0x00DE, 0x00FE, 0x008D, 0x009D, +/* 00C8 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 00D0 */ 0x00D9, 0x00F9, 0x00DB, 0x00FB, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 00D8 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x008F, 0x009F, 0x00AF, 0x00BF, 0x008E, +/* 00E0 */ 0x009E, 0x00A2, 0x00FF, 0xFFFD, 0x00B2, 0xFFFD, 0x00BD, 0x0096, +/* 00E8 */ 0x0097, 0xFFFD, 0xFFFD, 0xFFFD, 0x0091, 0x0092, 0x0082, 0xFFFD, +/* 00F0 */ 0x0093, 0x0094, 0x0084, 0xFFFD, 0x0086, 0x0087, 0x0095, 0xFFFD, +/* 00F8 */ 0xFFFD, 0xFFFD, 0x0085, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0100 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0089, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0108 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008B, 0x009B, +/* End of table Total Length = 0x012E * 2 */ diff --git a/intl/uconv/ucvlatin/cp1250.ut b/intl/uconv/ucvlatin/cp1250.ut index 156b97ef2f15..d775f1729e56 100644 --- a/intl/uconv/ucvlatin/cp1250.ut +++ b/intl/uconv/ucvlatin/cp1250.ut @@ -5,10 +5,11 @@ /*======================================================== This is a Generated file. Please don't edit it. - The tool which used to generate this file is called fromu. - If you have any problem of this file. Please contact - Netscape Client International Team or - ftang@netscape + The tool which used to generate this file is called umaptable. + You can find this tool under mozilla/intl/uconv/tools/umaptable.c. + If you have any problems with this file, please file a bug + under the "Internationalization" component in + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core Table in Debug form Begin of Item 0000 @@ -24,10 +25,10 @@ Begin of Item 0001 srcEnd = 00FF mappingOffset = 0000 Mapping = - 20AC FFFD 201A FFFD 201E 2026 2020 2021 - FFFD 2030 0160 2039 015A 0164 017D 0179 - FFFD 2018 2019 201C 201D 2022 2013 2014 - FFFD 2122 0161 203A 015B 0165 017E 017A + 20AC 0081 201A 0083 201E 2026 2020 2021 + 0088 2030 0160 2039 015A 0164 017D 0179 + 0090 2018 2019 201C 201D 2022 2013 2014 + 0098 2122 0161 203A 015B 0165 017E 017A 00A0 02C7 02D8 0141 00A4 0104 00A6 00A7 00A8 00A9 015E 00AB 00AC 00AD 00AE 017B 00B0 00B1 02DB 0142 00B4 00B5 00B6 00B7 @@ -69,10 +70,10 @@ End of Item 0001 /*-------------------------------------------------------*/ /* Offset=0x000B Start of MappingTable */ -/* 0000 */ 0x20AC, 0xFFFD, 0x201A, 0xFFFD, 0x201E, 0x2026, 0x2020, 0x2021, -/* 0008 */ 0xFFFD, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179, -/* 0010 */ 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, -/* 0018 */ 0xFFFD, 0x2122, 0x0161, 0x203A, 0x015B, 0x0165, 0x017E, 0x017A, +/* 0000 */ 0x20AC, 0x0081, 0x201A, 0x0083, 0x201E, 0x2026, 0x2020, 0x2021, +/* 0008 */ 0x0088, 0x2030, 0x0160, 0x2039, 0x015A, 0x0164, 0x017D, 0x0179, +/* 0010 */ 0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, +/* 0018 */ 0x0098, 0x2122, 0x0161, 0x203A, 0x015B, 0x0165, 0x017E, 0x017A, /* 0020 */ 0x00A0, 0x02C7, 0x02D8, 0x0141, 0x00A4, 0x0104, 0x00A6, 0x00A7, /* 0028 */ 0x00A8, 0x00A9, 0x015E, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x017B, /* 0030 */ 0x00B0, 0x00B1, 0x02DB, 0x0142, 0x00B4, 0x00B5, 0x00B6, 0x00B7, diff --git a/intl/uconv/ucvlatin/cp1251.uf b/intl/uconv/ucvlatin/cp1251.uf index 94f80190a6d2..dc42f9b1186b 100644 --- a/intl/uconv/ucvlatin/cp1251.uf +++ b/intl/uconv/ucvlatin/cp1251.uf @@ -5,10 +5,11 @@ /*======================================================== This is a Generated file. Please don't edit it. - The tool which used to generate this file is called fromu. - If you have any problem of this file. Please contact - Netscape Client International Team or - ftang@netscape + The tool which used to generate this file is called umaptable. + You can find this tool under mozilla/intl/uconv/tools/umaptable.c. + If you have any problems with this file, please file a bug + under the "Internationalization" component in + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core Table in Debug form Begin of Item 0000 @@ -27,10 +28,11 @@ End of Item 0001 Begin of Item 0002 Format 1 - srcBegin = 00A0 + srcBegin = 0098 srcEnd = 00BB mappingOffset = 0000 Mapping = + 0098 FFFD FFFD FFFD FFFD FFFD FFFD FFFD 00A0 FFFD FFFD FFFD 00A4 FFFD 00A6 00A7 FFFD 00A9 FFFD 00AB 00AC 00AD 00AE FFFD 00B0 00B1 FFFD FFFD FFFD 00B5 00B6 00B7 @@ -41,7 +43,7 @@ Begin of Item 0003 Format 1 srcBegin = 0401 srcEnd = 040F - mappingOffset = 001C + mappingOffset = 0024 Mapping = 00A8 0080 0081 00AA 00BD 00B2 00AF 00A3 008A 008C 008E 008D FFFD 00A1 008F @@ -51,7 +53,7 @@ Begin of Item 0004 Format 1 srcBegin = 0451 srcEnd = 045F - mappingOffset = 002B + mappingOffset = 0033 Mapping = 00B8 0090 0083 00BA 00BE 00B3 00BF 00BC 009A 009C 009E 009D FFFD 00A2 009F @@ -61,7 +63,7 @@ Begin of Item 0005 Format 1 srcBegin = 0490 srcEnd = 0491 - mappingOffset = 003A + mappingOffset = 0042 Mapping = 00A5 00B4 End of Item 0005 @@ -70,7 +72,7 @@ Begin of Item 0006 Format 1 srcBegin = 2013 srcEnd = 203A - mappingOffset = 003C + mappingOffset = 0044 Mapping = 0096 0097 FFFD FFFD FFFD 0091 0092 0082 FFFD 0093 0094 0084 FFFD 0086 0087 0095 @@ -121,28 +123,29 @@ End of Item 0009 /* Offset=0x0007 Start of MapCell Array */ /* 0000 */ 0x0000, 0x007F, 0x0000, /* 0001 */ 0x0410, 0x044F, 0x00C0, -/* 0002 */ 0x00A0, 0x00BB, 0x0000, -/* 0003 */ 0x0401, 0x040F, 0x001C, -/* 0004 */ 0x0451, 0x045F, 0x002B, -/* 0005 */ 0x0490, 0x0491, 0x003A, -/* 0006 */ 0x2013, 0x203A, 0x003C, +/* 0002 */ 0x0098, 0x00BB, 0x0000, +/* 0003 */ 0x0401, 0x040F, 0x0024, +/* 0004 */ 0x0451, 0x045F, 0x0033, +/* 0005 */ 0x0490, 0x0491, 0x0042, +/* 0006 */ 0x2013, 0x203A, 0x0044, /* 0007 */ 0x20AC, 0x0000, 0x0088, /* 0008 */ 0x2116, 0x0000, 0x00B9, /* 0009 */ 0x2122, 0x0000, 0x0099, /*-------------------------------------------------------*/ /* Offset=0x0025 Start of MappingTable */ -/* 0000 */ 0x00A0, 0xFFFD, 0xFFFD, 0xFFFD, 0x00A4, 0xFFFD, 0x00A6, 0x00A7, -/* 0008 */ 0xFFFD, 0x00A9, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0xFFFD, -/* 0010 */ 0x00B0, 0x00B1, 0xFFFD, 0xFFFD, 0xFFFD, 0x00B5, 0x00B6, 0x00B7, -/* 0018 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00BB, 0x00A8, 0x0080, 0x0081, 0x00AA, -/* 0020 */ 0x00BD, 0x00B2, 0x00AF, 0x00A3, 0x008A, 0x008C, 0x008E, 0x008D, -/* 0028 */ 0xFFFD, 0x00A1, 0x008F, 0x00B8, 0x0090, 0x0083, 0x00BA, 0x00BE, -/* 0030 */ 0x00B3, 0x00BF, 0x00BC, 0x009A, 0x009C, 0x009E, 0x009D, 0xFFFD, -/* 0038 */ 0x00A2, 0x009F, 0x00A5, 0x00B4, 0x0096, 0x0097, 0xFFFD, 0xFFFD, -/* 0040 */ 0xFFFD, 0x0091, 0x0092, 0x0082, 0xFFFD, 0x0093, 0x0094, 0x0084, -/* 0048 */ 0xFFFD, 0x0086, 0x0087, 0x0095, 0xFFFD, 0xFFFD, 0xFFFD, 0x0085, -/* 0050 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0058 */ 0xFFFD, 0x0089, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0060 */ 0xFFFD, 0xFFFD, 0x008B, 0x009B, -/* End of table Total Length = 0x0089 * 2 */ +/* 0000 */ 0x0098, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0008 */ 0x00A0, 0xFFFD, 0xFFFD, 0xFFFD, 0x00A4, 0xFFFD, 0x00A6, 0x00A7, +/* 0010 */ 0xFFFD, 0x00A9, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0xFFFD, +/* 0018 */ 0x00B0, 0x00B1, 0xFFFD, 0xFFFD, 0xFFFD, 0x00B5, 0x00B6, 0x00B7, +/* 0020 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00BB, 0x00A8, 0x0080, 0x0081, 0x00AA, +/* 0028 */ 0x00BD, 0x00B2, 0x00AF, 0x00A3, 0x008A, 0x008C, 0x008E, 0x008D, +/* 0030 */ 0xFFFD, 0x00A1, 0x008F, 0x00B8, 0x0090, 0x0083, 0x00BA, 0x00BE, +/* 0038 */ 0x00B3, 0x00BF, 0x00BC, 0x009A, 0x009C, 0x009E, 0x009D, 0xFFFD, +/* 0040 */ 0x00A2, 0x009F, 0x00A5, 0x00B4, 0x0096, 0x0097, 0xFFFD, 0xFFFD, +/* 0048 */ 0xFFFD, 0x0091, 0x0092, 0x0082, 0xFFFD, 0x0093, 0x0094, 0x0084, +/* 0050 */ 0xFFFD, 0x0086, 0x0087, 0x0095, 0xFFFD, 0xFFFD, 0xFFFD, 0x0085, +/* 0058 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0060 */ 0xFFFD, 0x0089, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0068 */ 0xFFFD, 0xFFFD, 0x008B, 0x009B, +/* End of table Total Length = 0x0091 * 2 */ diff --git a/intl/uconv/ucvlatin/cp1251.ut b/intl/uconv/ucvlatin/cp1251.ut index 63da1125c5f0..dbfc8c907216 100644 --- a/intl/uconv/ucvlatin/cp1251.ut +++ b/intl/uconv/ucvlatin/cp1251.ut @@ -5,10 +5,11 @@ /*======================================================== This is a Generated file. Please don't edit it. - The tool which used to generate this file is called fromu. - If you have any problem of this file. Please contact - Netscape Client International Team or - ftang@netscape + The tool which used to generate this file is called umaptable. + You can find this tool under mozilla/intl/uconv/tools/umaptable.c. + If you have any problems with this file, please file a bug + under the "Internationalization" component in + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core Table in Debug form Begin of Item 0000 @@ -34,7 +35,7 @@ Begin of Item 0002 0402 0403 201A 0453 201E 2026 2020 2021 20AC 2030 0409 2039 040A 040C 040B 040F 0452 2018 2019 201C 201D 2022 2013 2014 - FFFD 2122 0459 203A 045A 045C 045B 045F + 0098 2122 0459 203A 045A 045C 045B 045F 00A0 040E 045E 0408 00A4 0490 00A6 00A7 0401 00A9 0404 00AB 00AC 00AD 00AE 0407 00B0 00B1 0406 0456 0491 00B5 00B6 00B7 @@ -72,7 +73,7 @@ End of Item 0002 /* 0000 */ 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021, /* 0008 */ 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F, /* 0010 */ 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, -/* 0018 */ 0xFFFD, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F, +/* 0018 */ 0x0098, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F, /* 0020 */ 0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7, /* 0028 */ 0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407, /* 0030 */ 0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7, diff --git a/intl/uconv/ucvlatin/cp1253.uf b/intl/uconv/ucvlatin/cp1253.uf index 7a558b12fd99..b26e0137ebea 100644 --- a/intl/uconv/ucvlatin/cp1253.uf +++ b/intl/uconv/ucvlatin/cp1253.uf @@ -5,10 +5,11 @@ /*======================================================== This is a Generated file. Please don't edit it. - The tool which used to generate this file is called fromu. - If you have any problem of this file. Please contact - Netscape Client International Team or - ftang@netscape + The tool which used to generate this file is called umaptable. + You can find this tool under mozilla/intl/uconv/tools/umaptable.c. + If you have any problems with this file, please file a bug + under the "Internationalization" component in + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core Table in Debug form Begin of Item 0000 @@ -41,14 +42,18 @@ End of Item 0003 Begin of Item 0004 Format 1 - srcBegin = 00A0 + srcBegin = 0081 srcEnd = 00BD mappingOffset = 0000 Mapping = - 00A0 FFFD FFFD FFFD FFFD FFFD FFFD FFFD - FFFD FFFD FFFD 00AB 00AC 00AD 00AE FFFD - 00B0 00B1 00B2 00B3 FFFD 00B5 00B6 00B7 - FFFD FFFD FFFD 00BB FFFD 00BD + 0081 FFFD FFFD FFFD FFFD FFFD FFFD 0088 + FFFD 008A FFFD 008C 008D 008E 008F 0090 + FFFD FFFD FFFD FFFD FFFD FFFD FFFD 0098 + FFFD 009A FFFD 009C 009D 009E 009F 00A0 + FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD + FFFD FFFD 00AB 00AC 00AD 00AE FFFD 00B0 + 00B1 00B2 00B3 FFFD 00B5 00B6 00B7 FFFD + FFFD FFFD 00BB FFFD 00BD End of Item 0004 Begin of Item 0005 @@ -61,7 +66,7 @@ Begin of Item 0006 Format 1 srcBegin = 0384 srcEnd = 038C - mappingOffset = 001E + mappingOffset = 003D Mapping = 00B4 00A1 00A2 FFFD 00B8 00B9 00BA FFFD 00BC @@ -71,7 +76,7 @@ Begin of Item 0007 Format 1 srcBegin = 2013 srcEnd = 203A - mappingOffset = 0027 + mappingOffset = 0046 Mapping = 0096 0097 00AF FFFD FFFD 0091 0092 0082 FFFD 0093 0094 0084 FFFD 0086 0087 0095 @@ -118,23 +123,27 @@ End of Item 0009 /* 0001 */ 0x00A3, 0x00A9, 0x00A3, /* 0002 */ 0x038E, 0x03A1, 0x00BE, /* 0003 */ 0x03A3, 0x03CE, 0x00D3, -/* 0004 */ 0x00A0, 0x00BD, 0x0000, +/* 0004 */ 0x0081, 0x00BD, 0x0000, /* 0005 */ 0x0192, 0x0000, 0x0083, -/* 0006 */ 0x0384, 0x038C, 0x001E, -/* 0007 */ 0x2013, 0x203A, 0x0027, +/* 0006 */ 0x0384, 0x038C, 0x003D, +/* 0007 */ 0x2013, 0x203A, 0x0046, /* 0008 */ 0x20AC, 0x0000, 0x0080, /* 0009 */ 0x2122, 0x0000, 0x0099, /*-------------------------------------------------------*/ /* Offset=0x0025 Start of MappingTable */ -/* 0000 */ 0x00A0, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0008 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0xFFFD, -/* 0010 */ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0xFFFD, 0x00B5, 0x00B6, 0x00B7, -/* 0018 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00BB, 0xFFFD, 0x00BD, 0x00B4, 0x00A1, -/* 0020 */ 0x00A2, 0xFFFD, 0x00B8, 0x00B9, 0x00BA, 0xFFFD, 0x00BC, 0x0096, -/* 0028 */ 0x0097, 0x00AF, 0xFFFD, 0xFFFD, 0x0091, 0x0092, 0x0082, 0xFFFD, -/* 0030 */ 0x0093, 0x0094, 0x0084, 0xFFFD, 0x0086, 0x0087, 0x0095, 0xFFFD, -/* 0038 */ 0xFFFD, 0xFFFD, 0x0085, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0040 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0089, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0048 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008B, 0x009B, -/* End of table Total Length = 0x0074 * 2 */ +/* 0000 */ 0x0081, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0088, +/* 0008 */ 0xFFFD, 0x008A, 0xFFFD, 0x008C, 0x008D, 0x008E, 0x008F, 0x0090, +/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0098, +/* 0018 */ 0xFFFD, 0x009A, 0xFFFD, 0x009C, 0x009D, 0x009E, 0x009F, 0x00A0, +/* 0020 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0028 */ 0xFFFD, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0xFFFD, 0x00B0, +/* 0030 */ 0x00B1, 0x00B2, 0x00B3, 0xFFFD, 0x00B5, 0x00B6, 0x00B7, 0xFFFD, +/* 0038 */ 0xFFFD, 0xFFFD, 0x00BB, 0xFFFD, 0x00BD, 0x00B4, 0x00A1, 0x00A2, +/* 0040 */ 0xFFFD, 0x00B8, 0x00B9, 0x00BA, 0xFFFD, 0x00BC, 0x0096, 0x0097, +/* 0048 */ 0x00AF, 0xFFFD, 0xFFFD, 0x0091, 0x0092, 0x0082, 0xFFFD, 0x0093, +/* 0050 */ 0x0094, 0x0084, 0xFFFD, 0x0086, 0x0087, 0x0095, 0xFFFD, 0xFFFD, +/* 0058 */ 0xFFFD, 0x0085, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0060 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x0089, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0068 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008B, 0x009B, +/* End of table Total Length = 0x0093 * 2 */ diff --git a/intl/uconv/ucvlatin/cp1253.ut b/intl/uconv/ucvlatin/cp1253.ut index 30d6e893e806..365fb16d19e8 100644 --- a/intl/uconv/ucvlatin/cp1253.ut +++ b/intl/uconv/ucvlatin/cp1253.ut @@ -5,10 +5,11 @@ /*======================================================== This is a Generated file. Please don't edit it. - The tool which used to generate this file is called fromu. - If you have any problem of this file. Please contact - Netscape Client International Team or - ftang@netscape + The tool which used to generate this file is called umaptable. + You can find this tool under mozilla/intl/uconv/tools/umaptable.c. + If you have any problems with this file, please file a bug + under the "Internationalization" component in + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core Table in Debug form Begin of Item 0000 @@ -45,10 +46,10 @@ Begin of Item 0004 srcEnd = 00BD mappingOffset = 0000 Mapping = - 20AC FFFD 201A 0192 201E 2026 2020 2021 - FFFD 2030 FFFD 2039 FFFD FFFD FFFD FFFD - FFFD 2018 2019 201C 201D 2022 2013 2014 - FFFD 2122 FFFD 203A FFFD FFFD FFFD FFFD + 20AC 0081 201A 0192 201E 2026 2020 2021 + 0088 2030 008A 2039 008C 008D 008E 008F + 0090 2018 2019 201C 201D 2022 2013 2014 + 0098 2122 009A 203A 009C 009D 009E 009F 00A0 0385 0386 FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD 00AB 00AC 00AD 00AE 2015 00B0 00B1 00B2 00B3 0384 00B5 00B6 00B7 @@ -85,10 +86,10 @@ End of Item 0004 /*-------------------------------------------------------*/ /* Offset=0x0015 Start of MappingTable */ -/* 0000 */ 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, -/* 0008 */ 0xFFFD, 0x2030, 0xFFFD, 0x2039, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0010 */ 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, -/* 0018 */ 0xFFFD, 0x2122, 0xFFFD, 0x203A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0000 */ 0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, +/* 0008 */ 0x0088, 0x2030, 0x008A, 0x2039, 0x008C, 0x008D, 0x008E, 0x008F, +/* 0010 */ 0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, +/* 0018 */ 0x0098, 0x2122, 0x009A, 0x203A, 0x009C, 0x009D, 0x009E, 0x009F, /* 0020 */ 0x00A0, 0x0385, 0x0386, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, /* 0028 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x2015, /* 0030 */ 0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x0384, 0x00B5, 0x00B6, 0x00B7, diff --git a/intl/uconv/ucvlatin/cp1254.uf b/intl/uconv/ucvlatin/cp1254.uf index b7f63dadf775..a26221edadad 100644 --- a/intl/uconv/ucvlatin/cp1254.uf +++ b/intl/uconv/ucvlatin/cp1254.uf @@ -5,10 +5,11 @@ /*======================================================== This is a Generated file. Please don't edit it. - The tool which used to generate this file is called fromu. - If you have any problem of this file. Please contact - Netscape Client International Team or - ftang@netscape + The tool which used to generate this file is called umaptable. + You can find this tool under mozilla/intl/uconv/tools/umaptable.c. + If you have any problems with this file, please file a bug + under the "Internationalization" component in + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core Table in Debug form Begin of Item 0000 @@ -48,90 +49,114 @@ End of Item 0004 Begin of Item 0005 Format 2 - srcBegin = 00FF - destBegin = 00FF + srcBegin = 0081 + destBegin = 0081 End of Item 0005 Begin of Item 0006 Format 1 - srcBegin = 011E - srcEnd = 011F + srcBegin = 008D + srcEnd = 0090 mappingOffset = 0000 Mapping = - 00D0 00F0 + 008D 008E 008F 0090 End of Item 0006 Begin of Item 0007 Format 1 - srcBegin = 0130 - srcEnd = 0131 - mappingOffset = 0002 + srcBegin = 009D + srcEnd = 009E + mappingOffset = 0004 Mapping = - 00DD 00FD + 009D 009E End of Item 0007 Begin of Item 0008 - Format 1 - srcBegin = 0152 - srcEnd = 0161 - mappingOffset = 0004 - Mapping = - 008C 009C FFFD FFFD FFFD FFFD FFFD FFFD - FFFD FFFD FFFD FFFD 00DE 00FE 008A 009A + Format 2 + srcBegin = 00FF + destBegin = 00FF End of Item 0008 Begin of Item 0009 - Format 2 - srcBegin = 0178 - destBegin = 009F + Format 1 + srcBegin = 011E + srcEnd = 011F + mappingOffset = 0006 + Mapping = + 00D0 00F0 End of Item 0009 Begin of Item 000A - Format 2 - srcBegin = 0192 - destBegin = 0083 + Format 1 + srcBegin = 0130 + srcEnd = 0131 + mappingOffset = 0008 + Mapping = + 00DD 00FD End of Item 000A Begin of Item 000B - Format 2 - srcBegin = 02C6 - destBegin = 0088 + Format 1 + srcBegin = 0152 + srcEnd = 0161 + mappingOffset = 000A + Mapping = + 008C 009C FFFD FFFD FFFD FFFD FFFD FFFD + FFFD FFFD FFFD FFFD 00DE 00FE 008A 009A End of Item 000B Begin of Item 000C Format 2 - srcBegin = 02DC - destBegin = 0098 + srcBegin = 0178 + destBegin = 009F End of Item 000C Begin of Item 000D + Format 2 + srcBegin = 0192 + destBegin = 0083 +End of Item 000D + +Begin of Item 000E + Format 2 + srcBegin = 02C6 + destBegin = 0088 +End of Item 000E + +Begin of Item 000F + Format 2 + srcBegin = 02DC + destBegin = 0098 +End of Item 000F + +Begin of Item 0010 Format 1 srcBegin = 2013 srcEnd = 203A - mappingOffset = 0014 + mappingOffset = 001A Mapping = 0096 0097 FFFD FFFD FFFD 0091 0092 0082 FFFD 0093 0094 0084 FFFD 0086 0087 0095 FFFD FFFD FFFD 0085 FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD 0089 FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD 008B 009B -End of Item 000D +End of Item 0010 -Begin of Item 000E +Begin of Item 0011 Format 2 srcBegin = 20AC destBegin = 0080 -End of Item 000E +End of Item 0011 -Begin of Item 000F +Begin of Item 0012 Format 2 srcBegin = 2122 destBegin = 0099 -End of Item 000F +End of Item 0012 ========================================================*/ /* Offset=0x0000 ItemOfList */ - 0x0010, + 0x0013, /*-------------------------------------------------------*/ /* Offset=0x0001 offsetToFormatArray */ 0x0004, @@ -140,15 +165,15 @@ End of Item 000F 0x0009, /*-------------------------------------------------------*/ /* Offset=0x0003 offsetToMappingTable */ - 0x0039, + 0x0042, /*-------------------------------------------------------*/ /* Offset=0x0004 Start of Format Array */ /* Total of Format 0 : 0x0005 */ -/* Total of Format 1 : 0x0004 */ -/* Total of Format 2 : 0x0007 */ +/* Total of Format 1 : 0x0006 */ +/* Total of Format 2 : 0x0008 */ /* Total of Format 3 : 0x0000 */ -0x0000, 0x1120, 0x2221, 0x2212, 0x0000, +0x0000, 0x1120, 0x1112, 0x2222, 0x0221, /*-------------------------------------------------------*/ /* Offset=0x0009 Start of MapCell Array */ /* 0000 */ 0x0000, 0x007F, 0x0000, @@ -156,26 +181,30 @@ End of Item 000F /* 0002 */ 0x00D1, 0x00DC, 0x00D1, /* 0003 */ 0x00DF, 0x00EF, 0x00DF, /* 0004 */ 0x00F1, 0x00FC, 0x00F1, -/* 0005 */ 0x00FF, 0x0000, 0x00FF, -/* 0006 */ 0x011E, 0x011F, 0x0000, -/* 0007 */ 0x0130, 0x0131, 0x0002, -/* 0008 */ 0x0152, 0x0161, 0x0004, -/* 0009 */ 0x0178, 0x0000, 0x009F, -/* 000A */ 0x0192, 0x0000, 0x0083, -/* 000B */ 0x02C6, 0x0000, 0x0088, -/* 000C */ 0x02DC, 0x0000, 0x0098, -/* 000D */ 0x2013, 0x203A, 0x0014, -/* 000E */ 0x20AC, 0x0000, 0x0080, -/* 000F */ 0x2122, 0x0000, 0x0099, +/* 0005 */ 0x0081, 0x0000, 0x0081, +/* 0006 */ 0x008D, 0x0090, 0x0000, +/* 0007 */ 0x009D, 0x009E, 0x0004, +/* 0008 */ 0x00FF, 0x0000, 0x00FF, +/* 0009 */ 0x011E, 0x011F, 0x0006, +/* 000A */ 0x0130, 0x0131, 0x0008, +/* 000B */ 0x0152, 0x0161, 0x000A, +/* 000C */ 0x0178, 0x0000, 0x009F, +/* 000D */ 0x0192, 0x0000, 0x0083, +/* 000E */ 0x02C6, 0x0000, 0x0088, +/* 000F */ 0x02DC, 0x0000, 0x0098, +/* 0010 */ 0x2013, 0x203A, 0x001A, +/* 0011 */ 0x20AC, 0x0000, 0x0080, +/* 0012 */ 0x2122, 0x0000, 0x0099, /*-------------------------------------------------------*/ -/* Offset=0x0039 Start of MappingTable */ +/* Offset=0x0042 Start of MappingTable */ -/* 0000 */ 0x00D0, 0x00F0, 0x00DD, 0x00FD, 0x008C, 0x009C, 0xFFFD, 0xFFFD, -/* 0008 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0010 */ 0x00DE, 0x00FE, 0x008A, 0x009A, 0x0096, 0x0097, 0xFFFD, 0xFFFD, -/* 0018 */ 0xFFFD, 0x0091, 0x0092, 0x0082, 0xFFFD, 0x0093, 0x0094, 0x0084, -/* 0020 */ 0xFFFD, 0x0086, 0x0087, 0x0095, 0xFFFD, 0xFFFD, 0xFFFD, 0x0085, -/* 0028 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0030 */ 0xFFFD, 0x0089, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0038 */ 0xFFFD, 0xFFFD, 0x008B, 0x009B, -/* End of table Total Length = 0x0075 * 2 */ +/* 0000 */ 0x008D, 0x008E, 0x008F, 0x0090, 0x009D, 0x009E, 0x00D0, 0x00F0, +/* 0008 */ 0x00DD, 0x00FD, 0x008C, 0x009C, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00DE, 0x00FE, +/* 0018 */ 0x008A, 0x009A, 0x0096, 0x0097, 0xFFFD, 0xFFFD, 0xFFFD, 0x0091, +/* 0020 */ 0x0092, 0x0082, 0xFFFD, 0x0093, 0x0094, 0x0084, 0xFFFD, 0x0086, +/* 0028 */ 0x0087, 0x0095, 0xFFFD, 0xFFFD, 0xFFFD, 0x0085, 0xFFFD, 0xFFFD, +/* 0030 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0089, +/* 0038 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0040 */ 0x008B, 0x009B, +/* End of table Total Length = 0x0084 * 2 */ diff --git a/intl/uconv/ucvlatin/cp1254.ut b/intl/uconv/ucvlatin/cp1254.ut index 407c09cffb7f..ba524dd798ff 100644 --- a/intl/uconv/ucvlatin/cp1254.ut +++ b/intl/uconv/ucvlatin/cp1254.ut @@ -5,10 +5,11 @@ /*======================================================== This is a Generated file. Please don't edit it. - The tool which used to generate this file is called fromu. - If you have any problem of this file. Please contact - Netscape Client International Team or - ftang@netscape + The tool which used to generate this file is called umaptable. + You can find this tool under mozilla/intl/uconv/tools/umaptable.c. + If you have any problems with this file, please file a bug + under the "Internationalization" component in + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core Table in Debug form Begin of Item 0000 @@ -52,10 +53,10 @@ Begin of Item 0005 srcEnd = 009F mappingOffset = 0000 Mapping = - 20AC FFFD 201A 0192 201E 2026 2020 2021 - 02C6 2030 0160 2039 0152 FFFD FFFD FFFD - FFFD 2018 2019 201C 201D 2022 2013 2014 - 02DC 2122 0161 203A 0153 FFFD FFFD 0178 + 20AC 0081 201A 0192 201E 2026 2020 2021 + 02C6 2030 0160 2039 0152 008D 008E 008F + 0090 2018 2019 201C 201D 2022 2013 2014 + 02DC 2122 0161 203A 0153 009D 009E 0178 End of Item 0005 Begin of Item 0006 @@ -123,9 +124,9 @@ End of Item 0009 /*-------------------------------------------------------*/ /* Offset=0x0025 Start of MappingTable */ -/* 0000 */ 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, -/* 0008 */ 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0010 */ 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, -/* 0018 */ 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0xFFFD, 0xFFFD, 0x0178, +/* 0000 */ 0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, +/* 0008 */ 0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x008D, 0x008E, 0x008F, +/* 0010 */ 0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, +/* 0018 */ 0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x009D, 0x009E, 0x0178, /* 0020 */ 0x0130, 0x015E, 0x0131, 0x015F, 0x00FF, /* End of table Total Length = 0x004A * 2 */ diff --git a/intl/uconv/ucvlatin/cp1255.uf b/intl/uconv/ucvlatin/cp1255.uf index 1420e1403fa0..7feb494ae5e3 100644 --- a/intl/uconv/ucvlatin/cp1255.uf +++ b/intl/uconv/ucvlatin/cp1255.uf @@ -5,10 +5,11 @@ /*======================================================== This is a Generated file. Please don't edit it. - The tool which used to generate this file is called fromu. - If you have any problem of this file. Please contact - Netscape Client International Team or - ftang@netscape + The tool which used to generate this file is called umaptable. + You can find this tool under mozilla/intl/uconv/tools/umaptable.c. + If you have any problems with this file, please file a bug + under the "Internationalization" component in + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core Table in Debug form Begin of Item 0000 @@ -20,95 +21,106 @@ End of Item 0000 Begin of Item 0001 Format 0 - srcBegin = 00AB - srcEnd = 00B9 - destBegin = 00AB + srcBegin = 009C + srcEnd = 00A3 + destBegin = 009C End of Item 0001 Begin of Item 0002 Format 0 - srcBegin = 05B0 - srcEnd = 05B9 - destBegin = 00C0 + srcBegin = 00AB + srcEnd = 00B9 + destBegin = 00AB End of Item 0002 Begin of Item 0003 Format 0 - srcBegin = 05BB - srcEnd = 05C3 - destBegin = 00CB + srcBegin = 05B0 + srcEnd = 05B9 + destBegin = 00C0 End of Item 0003 Begin of Item 0004 Format 0 - srcBegin = 05D0 - srcEnd = 05EA - destBegin = 00E0 + srcBegin = 05BB + srcEnd = 05C3 + destBegin = 00CB End of Item 0004 Begin of Item 0005 - Format 1 - srcBegin = 00A0 - srcEnd = 00A9 - mappingOffset = 0000 - Mapping = - 00A0 00A1 00A2 00A3 FFFD 00A5 00A6 00A7 - 00A8 00A9 + Format 0 + srcBegin = 05D0 + srcEnd = 05EA + destBegin = 00E0 End of Item 0005 Begin of Item 0006 Format 1 - srcBegin = 00BB - srcEnd = 00BF - mappingOffset = 000A + srcBegin = 0081 + srcEnd = 00A9 + mappingOffset = 0000 Mapping = - 00BB 00BC 00BD 00BE 00BF + 0081 FFFD FFFD FFFD FFFD FFFD FFFD FFFD + FFFD 008A FFFD 008C 008D 008E 008F 0090 + FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD + FFFD 009A FFFD FFFD FFFD FFFD FFFD FFFD + FFFD FFFD FFFD FFFD 00A5 00A6 00A7 00A8 + 00A9 End of Item 0006 Begin of Item 0007 - Format 2 - srcBegin = 00D7 - destBegin = 00AA + Format 1 + srcBegin = 00BB + srcEnd = 00BF + mappingOffset = 0029 + Mapping = + 00BB 00BC 00BD 00BE 00BF End of Item 0007 Begin of Item 0008 Format 2 - srcBegin = 00F7 - destBegin = 00BA + srcBegin = 00D7 + destBegin = 00AA End of Item 0008 Begin of Item 0009 Format 2 - srcBegin = 0192 - destBegin = 0083 + srcBegin = 00F7 + destBegin = 00BA End of Item 0009 Begin of Item 000A Format 2 - srcBegin = 02C6 - destBegin = 0088 + srcBegin = 0192 + destBegin = 0083 End of Item 000A Begin of Item 000B Format 2 - srcBegin = 02DC - destBegin = 0098 + srcBegin = 02C6 + destBegin = 0088 End of Item 000B Begin of Item 000C - Format 1 - srcBegin = 05F0 - srcEnd = 05F4 - mappingOffset = 000F - Mapping = - 00D4 00D5 00D6 00D7 00D8 + Format 2 + srcBegin = 02DC + destBegin = 0098 End of Item 000C Begin of Item 000D + Format 1 + srcBegin = 05F0 + srcEnd = 05F4 + mappingOffset = 002E + Mapping = + 00D4 00D5 00D6 00D7 00D8 +End of Item 000D + +Begin of Item 000E Format 1 srcBegin = 200E srcEnd = 203A - mappingOffset = 0014 + mappingOffset = 0033 Mapping = 00FD 00FE FFFD FFFD FFFD 0096 0097 FFFD FFFD FFFD 0091 0092 0082 FFFD 0093 0094 @@ -116,26 +128,26 @@ Begin of Item 000D 0085 FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD 0089 FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD 008B 009B -End of Item 000D - -Begin of Item 000E - Format 1 - srcBegin = 20AA - srcEnd = 20AC - mappingOffset = 0041 - Mapping = - 00A4 FFFD 0080 End of Item 000E Begin of Item 000F + Format 1 + srcBegin = 20AA + srcEnd = 20AC + mappingOffset = 0060 + Mapping = + 00A4 FFFD 0080 +End of Item 000F + +Begin of Item 0010 Format 2 srcBegin = 2122 destBegin = 0099 -End of Item 000F +End of Item 0010 ========================================================*/ /* Offset=0x0000 ItemOfList */ - 0x0010, + 0x0011, /*-------------------------------------------------------*/ /* Offset=0x0001 offsetToFormatArray */ 0x0004, @@ -144,43 +156,48 @@ End of Item 000F 0x0009, /*-------------------------------------------------------*/ /* Offset=0x0003 offsetToMappingTable */ - 0x0039, + 0x003C, /*-------------------------------------------------------*/ /* Offset=0x0004 Start of Format Array */ -/* Total of Format 0 : 0x0005 */ +/* Total of Format 0 : 0x0006 */ /* Total of Format 1 : 0x0005 */ /* Total of Format 2 : 0x0006 */ /* Total of Format 3 : 0x0000 */ -0x0000, 0x2110, 0x2222, 0x2111, 0x0000, +0x0000, 0x1100, 0x2222, 0x1112, 0x0002, /*-------------------------------------------------------*/ /* Offset=0x0009 Start of MapCell Array */ /* 0000 */ 0x0000, 0x007F, 0x0000, -/* 0001 */ 0x00AB, 0x00B9, 0x00AB, -/* 0002 */ 0x05B0, 0x05B9, 0x00C0, -/* 0003 */ 0x05BB, 0x05C3, 0x00CB, -/* 0004 */ 0x05D0, 0x05EA, 0x00E0, -/* 0005 */ 0x00A0, 0x00A9, 0x0000, -/* 0006 */ 0x00BB, 0x00BF, 0x000A, -/* 0007 */ 0x00D7, 0x0000, 0x00AA, -/* 0008 */ 0x00F7, 0x0000, 0x00BA, -/* 0009 */ 0x0192, 0x0000, 0x0083, -/* 000A */ 0x02C6, 0x0000, 0x0088, -/* 000B */ 0x02DC, 0x0000, 0x0098, -/* 000C */ 0x05F0, 0x05F4, 0x000F, -/* 000D */ 0x200E, 0x203A, 0x0014, -/* 000E */ 0x20AA, 0x20AC, 0x0041, -/* 000F */ 0x2122, 0x0000, 0x0099, +/* 0001 */ 0x009C, 0x00A3, 0x009C, +/* 0002 */ 0x00AB, 0x00B9, 0x00AB, +/* 0003 */ 0x05B0, 0x05B9, 0x00C0, +/* 0004 */ 0x05BB, 0x05C3, 0x00CB, +/* 0005 */ 0x05D0, 0x05EA, 0x00E0, +/* 0006 */ 0x0081, 0x00A9, 0x0000, +/* 0007 */ 0x00BB, 0x00BF, 0x0029, +/* 0008 */ 0x00D7, 0x0000, 0x00AA, +/* 0009 */ 0x00F7, 0x0000, 0x00BA, +/* 000A */ 0x0192, 0x0000, 0x0083, +/* 000B */ 0x02C6, 0x0000, 0x0088, +/* 000C */ 0x02DC, 0x0000, 0x0098, +/* 000D */ 0x05F0, 0x05F4, 0x002E, +/* 000E */ 0x200E, 0x203A, 0x0033, +/* 000F */ 0x20AA, 0x20AC, 0x0060, +/* 0010 */ 0x2122, 0x0000, 0x0099, /*-------------------------------------------------------*/ -/* Offset=0x0039 Start of MappingTable */ +/* Offset=0x003C Start of MappingTable */ -/* 0000 */ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0xFFFD, 0x00A5, 0x00A6, 0x00A7, -/* 0008 */ 0x00A8, 0x00A9, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, 0x00D4, -/* 0010 */ 0x00D5, 0x00D6, 0x00D7, 0x00D8, 0x00FD, 0x00FE, 0xFFFD, 0xFFFD, -/* 0018 */ 0xFFFD, 0x0096, 0x0097, 0xFFFD, 0xFFFD, 0xFFFD, 0x0091, 0x0092, -/* 0020 */ 0x0082, 0xFFFD, 0x0093, 0x0094, 0x0084, 0xFFFD, 0x0086, 0x0087, -/* 0028 */ 0x0095, 0xFFFD, 0xFFFD, 0xFFFD, 0x0085, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0030 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0089, 0xFFFD, -/* 0038 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008B, -/* 0040 */ 0x009B, 0x00A4, 0xFFFD, 0x0080, -/* End of table Total Length = 0x007D * 2 */ +/* 0000 */ 0x0081, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0008 */ 0xFFFD, 0x008A, 0xFFFD, 0x008C, 0x008D, 0x008E, 0x008F, 0x0090, +/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0018 */ 0xFFFD, 0x009A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0020 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00A5, 0x00A6, 0x00A7, 0x00A8, +/* 0028 */ 0x00A9, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF, 0x00D4, 0x00D5, +/* 0030 */ 0x00D6, 0x00D7, 0x00D8, 0x00FD, 0x00FE, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0038 */ 0x0096, 0x0097, 0xFFFD, 0xFFFD, 0xFFFD, 0x0091, 0x0092, 0x0082, +/* 0040 */ 0xFFFD, 0x0093, 0x0094, 0x0084, 0xFFFD, 0x0086, 0x0087, 0x0095, +/* 0048 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x0085, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0050 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0089, 0xFFFD, 0xFFFD, +/* 0058 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008B, 0x009B, +/* 0060 */ 0x00A4, 0xFFFD, 0x0080, +/* End of table Total Length = 0x009F * 2 */ diff --git a/intl/uconv/ucvlatin/cp1255.ut b/intl/uconv/ucvlatin/cp1255.ut index 363935391de0..8b56fdb550ee 100644 --- a/intl/uconv/ucvlatin/cp1255.ut +++ b/intl/uconv/ucvlatin/cp1255.ut @@ -5,10 +5,11 @@ /*======================================================== This is a Generated file. Please don't edit it. - The tool which used to generate this file is called fromu. - If you have any problem of this file. Please contact - Netscape Client International Team or - ftang@netscape + The tool which used to generate this file is called umaptable. + You can find this tool under mozilla/intl/uconv/tools/umaptable.c. + If you have any problems with this file, please file a bug + under the "Internationalization" component in + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core Table in Debug form Begin of Item 0000 @@ -20,76 +21,83 @@ End of Item 0000 Begin of Item 0001 Format 0 - srcBegin = 00AB - srcEnd = 00B9 - destBegin = 00AB + srcBegin = 009C + srcEnd = 00A3 + destBegin = 009C End of Item 0001 Begin of Item 0002 Format 0 - srcBegin = 00C0 - srcEnd = 00C9 - destBegin = 05B0 + srcBegin = 00AB + srcEnd = 00B9 + destBegin = 00AB End of Item 0002 Begin of Item 0003 Format 0 - srcBegin = 00CB - srcEnd = 00D3 - destBegin = 05BB + srcBegin = 00C0 + srcEnd = 00C9 + destBegin = 05B0 End of Item 0003 Begin of Item 0004 Format 0 - srcBegin = 00E0 - srcEnd = 00FA - destBegin = 05D0 + srcBegin = 00CB + srcEnd = 00D3 + destBegin = 05BB End of Item 0004 Begin of Item 0005 + Format 0 + srcBegin = 00E0 + srcEnd = 00FA + destBegin = 05D0 +End of Item 0005 + +Begin of Item 0006 Format 1 srcBegin = 0080 srcEnd = 00AA mappingOffset = 0000 Mapping = - 20AC FFFD 201A 0192 201E 2026 2020 2021 - 02C6 2030 FFFD 2039 FFFD FFFD FFFD FFFD - FFFD 2018 2019 201C 201D 2022 2013 2014 - 02DC 2122 FFFD 203A FFFD FFFD FFFD FFFD - 00A0 00A1 00A2 00A3 20AA 00A5 00A6 00A7 + 20AC 0081 201A 0192 201E 2026 2020 2021 + 02C6 2030 008A 2039 008C 008D 008E 008F + 0090 2018 2019 201C 201D 2022 2013 2014 + 02DC 2122 009A 203A FFFD FFFD FFFD FFFD + FFFD FFFD FFFD FFFD 20AA 00A5 00A6 00A7 00A8 00A9 00D7 -End of Item 0005 +End of Item 0006 -Begin of Item 0006 +Begin of Item 0007 Format 1 srcBegin = 00BA srcEnd = 00BF mappingOffset = 002B Mapping = 00F7 00BB 00BC 00BD 00BE 00BF -End of Item 0006 +End of Item 0007 -Begin of Item 0007 +Begin of Item 0008 Format 1 srcBegin = 00D4 srcEnd = 00D8 mappingOffset = 0031 Mapping = 05F0 05F1 05F2 05F3 05F4 -End of Item 0007 +End of Item 0008 -Begin of Item 0008 +Begin of Item 0009 Format 1 srcBegin = 00FD srcEnd = 00FE mappingOffset = 0036 Mapping = 200E 200F -End of Item 0008 +End of Item 0009 ========================================================*/ /* Offset=0x0000 ItemOfList */ - 0x0009, + 0x000A, /*-------------------------------------------------------*/ /* Offset=0x0001 offsetToFormatArray */ 0x0004, @@ -98,34 +106,35 @@ End of Item 0008 0x0007, /*-------------------------------------------------------*/ /* Offset=0x0003 offsetToMappingTable */ - 0x0022, + 0x0025, /*-------------------------------------------------------*/ /* Offset=0x0004 Start of Format Array */ -/* Total of Format 0 : 0x0005 */ +/* Total of Format 0 : 0x0006 */ /* Total of Format 1 : 0x0004 */ /* Total of Format 2 : 0x0000 */ /* Total of Format 3 : 0x0000 */ -0x0000, 0x1110, 0x0001, +0x0000, 0x1100, 0x0011, /*-------------------------------------------------------*/ /* Offset=0x0007 Start of MapCell Array */ /* 0000 */ 0x0000, 0x007F, 0x0000, -/* 0001 */ 0x00AB, 0x00B9, 0x00AB, -/* 0002 */ 0x00C0, 0x00C9, 0x05B0, -/* 0003 */ 0x00CB, 0x00D3, 0x05BB, -/* 0004 */ 0x00E0, 0x00FA, 0x05D0, -/* 0005 */ 0x0080, 0x00AA, 0x0000, -/* 0006 */ 0x00BA, 0x00BF, 0x002B, -/* 0007 */ 0x00D4, 0x00D8, 0x0031, -/* 0008 */ 0x00FD, 0x00FE, 0x0036, +/* 0001 */ 0x009C, 0x00A3, 0x009C, +/* 0002 */ 0x00AB, 0x00B9, 0x00AB, +/* 0003 */ 0x00C0, 0x00C9, 0x05B0, +/* 0004 */ 0x00CB, 0x00D3, 0x05BB, +/* 0005 */ 0x00E0, 0x00FA, 0x05D0, +/* 0006 */ 0x0080, 0x00AA, 0x0000, +/* 0007 */ 0x00BA, 0x00BF, 0x002B, +/* 0008 */ 0x00D4, 0x00D8, 0x0031, +/* 0009 */ 0x00FD, 0x00FE, 0x0036, /*-------------------------------------------------------*/ -/* Offset=0x0022 Start of MappingTable */ +/* Offset=0x0025 Start of MappingTable */ -/* 0000 */ 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, -/* 0008 */ 0x02C6, 0x2030, 0xFFFD, 0x2039, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0010 */ 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, -/* 0018 */ 0x02DC, 0x2122, 0xFFFD, 0x203A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0020 */ 0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AA, 0x00A5, 0x00A6, 0x00A7, +/* 0000 */ 0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, +/* 0008 */ 0x02C6, 0x2030, 0x008A, 0x2039, 0x008C, 0x008D, 0x008E, 0x008F, +/* 0010 */ 0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, +/* 0018 */ 0x02DC, 0x2122, 0x009A, 0x203A, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0020 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x20AA, 0x00A5, 0x00A6, 0x00A7, /* 0028 */ 0x00A8, 0x00A9, 0x00D7, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, /* 0030 */ 0x00BF, 0x05F0, 0x05F1, 0x05F2, 0x05F3, 0x05F4, 0x200E, 0x200F, -/* End of table Total Length = 0x005A * 2 */ +/* End of table Total Length = 0x005D * 2 */ diff --git a/intl/uconv/ucvlatin/cp1256.uf b/intl/uconv/ucvlatin/cp1256.uf index b368730a4c2f..8ea801c997cd 100644 --- a/intl/uconv/ucvlatin/cp1256.uf +++ b/intl/uconv/ucvlatin/cp1256.uf @@ -7,9 +7,9 @@ The tool which used to generate this file is called umaptable. You can find this tool under mozilla/intl/uconv/tools/umaptable.c. - If you have any problem of this file. Please contact - Netscape Client International Team or - ftang@netscape + If you have any problems with this file, please file a bug + under the "Internationalization" component in + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core Table in Debug form Begin of Item 0000 diff --git a/intl/uconv/ucvlatin/cp1256.ut b/intl/uconv/ucvlatin/cp1256.ut index 1d360d0c3da4..512474bb85c3 100644 --- a/intl/uconv/ucvlatin/cp1256.ut +++ b/intl/uconv/ucvlatin/cp1256.ut @@ -7,9 +7,9 @@ The tool which used to generate this file is called umaptable. You can find this tool under mozilla/intl/uconv/tools/umaptable.c. - If you have any problem of this file. Please contact - Netscape Client International Team or - ftang@netscape + If you have any problems with this file, please file a bug + under the "Internationalization" component in + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core Table in Debug form Begin of Item 0000 diff --git a/intl/uconv/ucvlatin/cp1257.uf b/intl/uconv/ucvlatin/cp1257.uf index 8f617e909619..09abd391b020 100644 --- a/intl/uconv/ucvlatin/cp1257.uf +++ b/intl/uconv/ucvlatin/cp1257.uf @@ -5,10 +5,11 @@ /*======================================================== This is a Generated file. Please don't edit it. - The tool which used to generate this file is called fromu. - If you have any problem of this file. Please contact - Netscape Client International Team or - ftang@netscape + The tool which used to generate this file is called umaptable. + You can find this tool under mozilla/intl/uconv/tools/umaptable.c. + If you have any problems with this file, please file a bug + under the "Internationalization" component in + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core Table in Debug form Begin of Item 0000 @@ -27,38 +28,42 @@ End of Item 0001 Begin of Item 0002 Format 1 - srcBegin = 00A0 + srcBegin = 0081 srcEnd = 017E mappingOffset = 0000 Mapping = - 00A0 FFFD 00A2 00A3 00A4 FFFD 00A6 00A7 - 008D 00A9 FFFD 00AB 00AC 00AD 00AE 009D - FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD - 008F 00B9 FFFD 00BB 00BC 00BD 00BE FFFD - FFFD FFFD FFFD FFFD 00C4 00C5 00AF FFFD - FFFD 00C9 FFFD FFFD FFFD FFFD FFFD FFFD - FFFD FFFD FFFD 00D3 FFFD 00D5 00D6 00D7 - 00A8 FFFD FFFD FFFD 00DC FFFD FFFD 00DF - FFFD FFFD FFFD FFFD 00E4 00E5 00BF FFFD - FFFD 00E9 FFFD FFFD FFFD FFFD FFFD FFFD - FFFD FFFD FFFD 00F3 FFFD 00F5 00F6 00F7 - 00B8 FFFD FFFD FFFD 00FC FFFD FFFD FFFD - 00C2 00E2 FFFD FFFD 00C0 00E0 00C3 00E3 - FFFD FFFD FFFD FFFD 00C8 00E8 FFFD FFFD - FFFD FFFD 00C7 00E7 FFFD FFFD 00CB 00EB - 00C6 00E6 FFFD FFFD FFFD FFFD FFFD FFFD - FFFD FFFD 00CC 00EC FFFD FFFD FFFD FFFD - FFFD FFFD 00CE 00EE FFFD FFFD 00C1 00E1 - FFFD FFFD FFFD FFFD FFFD FFFD 00CD 00ED - FFFD FFFD FFFD 00CF 00EF FFFD FFFD FFFD - FFFD 00D9 00F9 00D1 00F1 00D2 00F2 FFFD - FFFD FFFD FFFD FFFD 00D4 00F4 FFFD FFFD - FFFD FFFD FFFD FFFD FFFD FFFD 00AA 00BA - FFFD FFFD 00DA 00FA FFFD FFFD FFFD FFFD - 00D0 00F0 FFFD FFFD FFFD FFFD FFFD FFFD - FFFD FFFD 00DB 00FB FFFD FFFD FFFD FFFD - FFFD FFFD 00D8 00F8 FFFD FFFD FFFD FFFD - FFFD 00CA 00EA 00DD 00FD 00DE 00FE + 0081 FFFD 0083 FFFD FFFD FFFD FFFD 0088 + FFFD 008A FFFD 008C FFFD FFFD FFFD 0090 + FFFD FFFD FFFD FFFD FFFD FFFD FFFD 0098 + FFFD 009A FFFD 009C FFFD FFFD 009F 00A0 + FFFD 00A2 00A3 00A4 FFFD 00A6 00A7 008D + 00A9 FFFD 00AB 00AC 00AD 00AE 009D FFFD + FFFD FFFD FFFD FFFD FFFD FFFD FFFD 008F + 00B9 FFFD 00BB 00BC 00BD 00BE FFFD FFFD + FFFD FFFD FFFD 00C4 00C5 00AF FFFD FFFD + 00C9 FFFD FFFD FFFD FFFD FFFD FFFD FFFD + FFFD FFFD 00D3 FFFD 00D5 00D6 00D7 00A8 + FFFD FFFD FFFD 00DC FFFD FFFD 00DF FFFD + FFFD FFFD FFFD 00E4 00E5 00BF FFFD FFFD + 00E9 FFFD FFFD FFFD FFFD FFFD FFFD FFFD + FFFD FFFD 00F3 FFFD 00F5 00F6 00F7 00B8 + FFFD FFFD FFFD 00FC FFFD FFFD FFFD 00C2 + 00E2 FFFD FFFD 00C0 00E0 00C3 00E3 FFFD + FFFD FFFD FFFD 00C8 00E8 FFFD FFFD FFFD + FFFD 00C7 00E7 FFFD FFFD 00CB 00EB 00C6 + 00E6 FFFD FFFD FFFD FFFD FFFD FFFD FFFD + FFFD 00CC 00EC FFFD FFFD FFFD FFFD FFFD + FFFD 00CE 00EE FFFD FFFD 00C1 00E1 FFFD + FFFD FFFD FFFD FFFD FFFD 00CD 00ED FFFD + FFFD FFFD 00CF 00EF FFFD FFFD FFFD FFFD + 00D9 00F9 00D1 00F1 00D2 00F2 FFFD FFFD + FFFD FFFD FFFD 00D4 00F4 FFFD FFFD FFFD + FFFD FFFD FFFD FFFD FFFD 00AA 00BA FFFD + FFFD 00DA 00FA FFFD FFFD FFFD FFFD 00D0 + 00F0 FFFD FFFD FFFD FFFD FFFD FFFD FFFD + FFFD 00DB 00FB FFFD FFFD FFFD FFFD FFFD + FFFD 00D8 00F8 FFFD FFFD FFFD FFFD FFFD + 00CA 00EA 00DD 00FD 00DE 00FE End of Item 0002 Begin of Item 0003 @@ -71,7 +76,7 @@ Begin of Item 0004 Format 1 srcBegin = 02D9 srcEnd = 02DB - mappingOffset = 00DF + mappingOffset = 00FE Mapping = 00FF FFFD 009E End of Item 0004 @@ -80,7 +85,7 @@ Begin of Item 0005 Format 1 srcBegin = 2013 srcEnd = 203A - mappingOffset = 00E2 + mappingOffset = 0101 Mapping = 0096 0097 FFFD FFFD FFFD 0091 0092 0082 FFFD 0093 0094 0084 FFFD 0086 0087 0095 @@ -125,47 +130,51 @@ End of Item 0007 /* Offset=0x0007 Start of MapCell Array */ /* 0000 */ 0x0000, 0x007F, 0x0000, /* 0001 */ 0x00B0, 0x00B7, 0x00B0, -/* 0002 */ 0x00A0, 0x017E, 0x0000, +/* 0002 */ 0x0081, 0x017E, 0x0000, /* 0003 */ 0x02C7, 0x0000, 0x008E, -/* 0004 */ 0x02D9, 0x02DB, 0x00DF, -/* 0005 */ 0x2013, 0x203A, 0x00E2, +/* 0004 */ 0x02D9, 0x02DB, 0x00FE, +/* 0005 */ 0x2013, 0x203A, 0x0101, /* 0006 */ 0x20AC, 0x0000, 0x0080, /* 0007 */ 0x2122, 0x0000, 0x0099, /*-------------------------------------------------------*/ /* Offset=0x001F Start of MappingTable */ -/* 0000 */ 0x00A0, 0xFFFD, 0x00A2, 0x00A3, 0x00A4, 0xFFFD, 0x00A6, 0x00A7, -/* 0008 */ 0x008D, 0x00A9, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x009D, -/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0018 */ 0x008F, 0x00B9, 0xFFFD, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0xFFFD, -/* 0020 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00C4, 0x00C5, 0x00AF, 0xFFFD, -/* 0028 */ 0xFFFD, 0x00C9, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0030 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00D3, 0xFFFD, 0x00D5, 0x00D6, 0x00D7, -/* 0038 */ 0x00A8, 0xFFFD, 0xFFFD, 0xFFFD, 0x00DC, 0xFFFD, 0xFFFD, 0x00DF, -/* 0040 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00E4, 0x00E5, 0x00BF, 0xFFFD, -/* 0048 */ 0xFFFD, 0x00E9, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0050 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00F3, 0xFFFD, 0x00F5, 0x00F6, 0x00F7, -/* 0058 */ 0x00B8, 0xFFFD, 0xFFFD, 0xFFFD, 0x00FC, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0060 */ 0x00C2, 0x00E2, 0xFFFD, 0xFFFD, 0x00C0, 0x00E0, 0x00C3, 0x00E3, -/* 0068 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00C8, 0x00E8, 0xFFFD, 0xFFFD, -/* 0070 */ 0xFFFD, 0xFFFD, 0x00C7, 0x00E7, 0xFFFD, 0xFFFD, 0x00CB, 0x00EB, -/* 0078 */ 0x00C6, 0x00E6, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0080 */ 0xFFFD, 0xFFFD, 0x00CC, 0x00EC, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0088 */ 0xFFFD, 0xFFFD, 0x00CE, 0x00EE, 0xFFFD, 0xFFFD, 0x00C1, 0x00E1, -/* 0090 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00CD, 0x00ED, -/* 0098 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00CF, 0x00EF, 0xFFFD, 0xFFFD, 0xFFFD, -/* 00A0 */ 0xFFFD, 0x00D9, 0x00F9, 0x00D1, 0x00F1, 0x00D2, 0x00F2, 0xFFFD, -/* 00A8 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00D4, 0x00F4, 0xFFFD, 0xFFFD, -/* 00B0 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00AA, 0x00BA, -/* 00B8 */ 0xFFFD, 0xFFFD, 0x00DA, 0x00FA, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 00C0 */ 0x00D0, 0x00F0, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 00C8 */ 0xFFFD, 0xFFFD, 0x00DB, 0x00FB, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 00D0 */ 0xFFFD, 0xFFFD, 0x00D8, 0x00F8, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 00D8 */ 0xFFFD, 0x00CA, 0x00EA, 0x00DD, 0x00FD, 0x00DE, 0x00FE, 0x00FF, -/* 00E0 */ 0xFFFD, 0x009E, 0x0096, 0x0097, 0xFFFD, 0xFFFD, 0xFFFD, 0x0091, -/* 00E8 */ 0x0092, 0x0082, 0xFFFD, 0x0093, 0x0094, 0x0084, 0xFFFD, 0x0086, -/* 00F0 */ 0x0087, 0x0095, 0xFFFD, 0xFFFD, 0xFFFD, 0x0085, 0xFFFD, 0xFFFD, -/* 00F8 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0089, -/* 0100 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0108 */ 0x008B, 0x009B, -/* End of table Total Length = 0x0129 * 2 */ +/* 0000 */ 0x0081, 0xFFFD, 0x0083, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0088, +/* 0008 */ 0xFFFD, 0x008A, 0xFFFD, 0x008C, 0xFFFD, 0xFFFD, 0xFFFD, 0x0090, +/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0098, +/* 0018 */ 0xFFFD, 0x009A, 0xFFFD, 0x009C, 0xFFFD, 0xFFFD, 0x009F, 0x00A0, +/* 0020 */ 0xFFFD, 0x00A2, 0x00A3, 0x00A4, 0xFFFD, 0x00A6, 0x00A7, 0x008D, +/* 0028 */ 0x00A9, 0xFFFD, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x009D, 0xFFFD, +/* 0030 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008F, +/* 0038 */ 0x00B9, 0xFFFD, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0xFFFD, 0xFFFD, +/* 0040 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00C4, 0x00C5, 0x00AF, 0xFFFD, 0xFFFD, +/* 0048 */ 0x00C9, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0050 */ 0xFFFD, 0xFFFD, 0x00D3, 0xFFFD, 0x00D5, 0x00D6, 0x00D7, 0x00A8, +/* 0058 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00DC, 0xFFFD, 0xFFFD, 0x00DF, 0xFFFD, +/* 0060 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00E4, 0x00E5, 0x00BF, 0xFFFD, 0xFFFD, +/* 0068 */ 0x00E9, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0070 */ 0xFFFD, 0xFFFD, 0x00F3, 0xFFFD, 0x00F5, 0x00F6, 0x00F7, 0x00B8, +/* 0078 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00FC, 0xFFFD, 0xFFFD, 0xFFFD, 0x00C2, +/* 0080 */ 0x00E2, 0xFFFD, 0xFFFD, 0x00C0, 0x00E0, 0x00C3, 0x00E3, 0xFFFD, +/* 0088 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00C8, 0x00E8, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0090 */ 0xFFFD, 0x00C7, 0x00E7, 0xFFFD, 0xFFFD, 0x00CB, 0x00EB, 0x00C6, +/* 0098 */ 0x00E6, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 00A0 */ 0xFFFD, 0x00CC, 0x00EC, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 00A8 */ 0xFFFD, 0x00CE, 0x00EE, 0xFFFD, 0xFFFD, 0x00C1, 0x00E1, 0xFFFD, +/* 00B0 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00CD, 0x00ED, 0xFFFD, +/* 00B8 */ 0xFFFD, 0xFFFD, 0x00CF, 0x00EF, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 00C0 */ 0x00D9, 0x00F9, 0x00D1, 0x00F1, 0x00D2, 0x00F2, 0xFFFD, 0xFFFD, +/* 00C8 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x00D4, 0x00F4, 0xFFFD, 0xFFFD, 0xFFFD, +/* 00D0 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00AA, 0x00BA, 0xFFFD, +/* 00D8 */ 0xFFFD, 0x00DA, 0x00FA, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00D0, +/* 00E0 */ 0x00F0, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 00E8 */ 0xFFFD, 0x00DB, 0x00FB, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 00F0 */ 0xFFFD, 0x00D8, 0x00F8, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 00F8 */ 0x00CA, 0x00EA, 0x00DD, 0x00FD, 0x00DE, 0x00FE, 0x00FF, 0xFFFD, +/* 0100 */ 0x009E, 0x0096, 0x0097, 0xFFFD, 0xFFFD, 0xFFFD, 0x0091, 0x0092, +/* 0108 */ 0x0082, 0xFFFD, 0x0093, 0x0094, 0x0084, 0xFFFD, 0x0086, 0x0087, +/* 0110 */ 0x0095, 0xFFFD, 0xFFFD, 0xFFFD, 0x0085, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0118 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0089, 0xFFFD, +/* 0120 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008B, +/* 0128 */ 0x009B, +/* End of table Total Length = 0x0148 * 2 */ diff --git a/intl/uconv/ucvlatin/cp1257.ut b/intl/uconv/ucvlatin/cp1257.ut index 1d6b62d007e0..59bc9d18340a 100644 --- a/intl/uconv/ucvlatin/cp1257.ut +++ b/intl/uconv/ucvlatin/cp1257.ut @@ -5,10 +5,11 @@ /*======================================================== This is a Generated file. Please don't edit it. - The tool which used to generate this file is called fromu. - If you have any problem of this file. Please contact - Netscape Client International Team or - ftang@netscape + The tool which used to generate this file is called umaptable. + You can find this tool under mozilla/intl/uconv/tools/umaptable.c. + If you have any problems with this file, please file a bug + under the "Internationalization" component in + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core Table in Debug form Begin of Item 0000 @@ -31,10 +32,10 @@ Begin of Item 0002 srcEnd = 00FF mappingOffset = 0000 Mapping = - 20AC FFFD 201A FFFD 201E 2026 2020 2021 - FFFD 2030 FFFD 2039 FFFD 00A8 02C7 00B8 - FFFD 2018 2019 201C 201D 2022 2013 2014 - FFFD 2122 FFFD 203A FFFD 00AF 02DB FFFD + 20AC 0081 201A 0083 201E 2026 2020 2021 + 0088 2030 008A 2039 008C 00A8 02C7 00B8 + 0090 2018 2019 201C 201D 2022 2013 2014 + 0098 2122 009A 203A 009C 00AF 02DB 009F 00A0 FFFD 00A2 00A3 00A4 FFFD 00A6 00A7 00D8 00A9 0156 00AB 00AC 00AD 00AE 00C6 FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD @@ -77,10 +78,10 @@ End of Item 0002 /*-------------------------------------------------------*/ /* Offset=0x000E Start of MappingTable */ -/* 0000 */ 0x20AC, 0xFFFD, 0x201A, 0xFFFD, 0x201E, 0x2026, 0x2020, 0x2021, -/* 0008 */ 0xFFFD, 0x2030, 0xFFFD, 0x2039, 0xFFFD, 0x00A8, 0x02C7, 0x00B8, -/* 0010 */ 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, -/* 0018 */ 0xFFFD, 0x2122, 0xFFFD, 0x203A, 0xFFFD, 0x00AF, 0x02DB, 0xFFFD, +/* 0000 */ 0x20AC, 0x0081, 0x201A, 0x0083, 0x201E, 0x2026, 0x2020, 0x2021, +/* 0008 */ 0x0088, 0x2030, 0x008A, 0x2039, 0x008C, 0x00A8, 0x02C7, 0x00B8, +/* 0010 */ 0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, +/* 0018 */ 0x0098, 0x2122, 0x009A, 0x203A, 0x009C, 0x00AF, 0x02DB, 0x009F, /* 0020 */ 0x00A0, 0xFFFD, 0x00A2, 0x00A3, 0x00A4, 0xFFFD, 0x00A6, 0x00A7, /* 0028 */ 0x00D8, 0x00A9, 0x0156, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00C6, /* 0030 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, diff --git a/intl/uconv/ucvlatin/cp1258.uf b/intl/uconv/ucvlatin/cp1258.uf index 70b277266be3..902e87755d6f 100644 --- a/intl/uconv/ucvlatin/cp1258.uf +++ b/intl/uconv/ucvlatin/cp1258.uf @@ -7,9 +7,9 @@ The tool which used to generate this file is called umaptable. You can find this tool under mozilla/intl/uconv/tools/umaptable.c. - If you have any problem of this file. Please contact - Netscape Client International Team or - ftang@netscape + If you have any problems with this file, please file a bug + under the "Internationalization" component in + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core Table in Debug form Begin of Item 0000 @@ -55,10 +55,22 @@ Begin of Item 0005 End of Item 0005 Begin of Item 0006 + Format 1 + srcBegin = 0081 + srcEnd = 009E + mappingOffset = 0000 + Mapping = + 0081 FFFD FFFD FFFD FFFD FFFD FFFD FFFD + FFFD 008A FFFD FFFD 008D 008E 008F 0090 + FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD + FFFD 009A FFFD FFFD 009D 009E +End of Item 0006 + +Begin of Item 0007 Format 1 srcBegin = 00CD srcEnd = 0103 - mappingOffset = 0000 + mappingOffset = 001E Mapping = 00CD 00CE 00CF FFFD 00D1 FFFD 00D3 00D4 FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD @@ -67,115 +79,115 @@ Begin of Item 0006 00ED 00EE 00EF FFFD 00F1 FFFD 00F3 00F4 FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD 00FF FFFD FFFD 00C3 00E3 -End of Item 0006 - -Begin of Item 0007 - Format 1 - srcBegin = 0110 - srcEnd = 0111 - mappingOffset = 0037 - Mapping = - 00D0 00F0 End of Item 0007 Begin of Item 0008 Format 1 - srcBegin = 0152 - srcEnd = 0153 - mappingOffset = 0039 + srcBegin = 0110 + srcEnd = 0111 + mappingOffset = 0055 Mapping = - 008C 009C + 00D0 00F0 End of Item 0008 Begin of Item 0009 - Format 2 - srcBegin = 0178 - destBegin = 009F + Format 1 + srcBegin = 0152 + srcEnd = 0153 + mappingOffset = 0057 + Mapping = + 008C 009C End of Item 0009 Begin of Item 000A Format 2 - srcBegin = 0192 - destBegin = 0083 + srcBegin = 0178 + destBegin = 009F End of Item 000A Begin of Item 000B - Format 1 - srcBegin = 01A0 - srcEnd = 01A1 - mappingOffset = 003B - Mapping = - 00D5 00F5 + Format 2 + srcBegin = 0192 + destBegin = 0083 End of Item 000B Begin of Item 000C Format 1 - srcBegin = 01AF - srcEnd = 01B0 - mappingOffset = 003D + srcBegin = 01A0 + srcEnd = 01A1 + mappingOffset = 0059 Mapping = - 00DD 00FD + 00D5 00F5 End of Item 000C Begin of Item 000D - Format 2 - srcBegin = 02C6 - destBegin = 0088 + Format 1 + srcBegin = 01AF + srcEnd = 01B0 + mappingOffset = 005B + Mapping = + 00DD 00FD End of Item 000D Begin of Item 000E Format 2 - srcBegin = 02DC - destBegin = 0098 + srcBegin = 02C6 + destBegin = 0088 End of Item 000E Begin of Item 000F - Format 1 - srcBegin = 0300 - srcEnd = 0309 - mappingOffset = 003F - Mapping = - 00CC 00EC FFFD 00DE FFFD FFFD FFFD FFFD - FFFD 00D2 + Format 2 + srcBegin = 02DC + destBegin = 0098 End of Item 000F Begin of Item 0010 - Format 2 - srcBegin = 0323 - destBegin = 00F2 + Format 1 + srcBegin = 0300 + srcEnd = 0309 + mappingOffset = 005D + Mapping = + 00CC 00EC FFFD 00DE FFFD FFFD FFFD FFFD + FFFD 00D2 End of Item 0010 Begin of Item 0011 + Format 2 + srcBegin = 0323 + destBegin = 00F2 +End of Item 0011 + +Begin of Item 0012 Format 1 srcBegin = 2013 srcEnd = 203A - mappingOffset = 0049 + mappingOffset = 0067 Mapping = 0096 0097 FFFD FFFD FFFD 0091 0092 0082 FFFD 0093 0094 0084 FFFD 0086 0087 0095 FFFD FFFD FFFD 0085 FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD 0089 FFFD FFFD FFFD FFFD FFFD FFFD FFFD FFFD 008B 009B -End of Item 0011 - -Begin of Item 0012 - Format 1 - srcBegin = 20AB - srcEnd = 20AC - mappingOffset = 0071 - Mapping = - 00FE 0080 End of Item 0012 Begin of Item 0013 + Format 1 + srcBegin = 20AB + srcEnd = 20AC + mappingOffset = 008F + Mapping = + 00FE 0080 +End of Item 0013 + +Begin of Item 0014 Format 2 srcBegin = 2122 destBegin = 0099 -End of Item 0013 +End of Item 0014 ========================================================*/ /* Offset=0x0000 ItemOfList */ - 0x0014, + 0x0015, /*-------------------------------------------------------*/ /* Offset=0x0001 offsetToFormatArray */ 0x0004, @@ -184,15 +196,15 @@ End of Item 0013 0x000A, /*-------------------------------------------------------*/ /* Offset=0x0003 offsetToMappingTable */ - 0x0046, + 0x0049, /*-------------------------------------------------------*/ /* Offset=0x0004 Start of Format Array */ /* Total of Format 0 : 0x0006 */ -/* Total of Format 1 : 0x0008 */ +/* Total of Format 1 : 0x0009 */ /* Total of Format 2 : 0x0006 */ /* Total of Format 3 : 0x0000 */ -0x0000, 0x1100, 0x1221, 0x1221, 0x2112, 0x0000, +0x0000, 0x1100, 0x2211, 0x2211, 0x1121, 0x0002, /*-------------------------------------------------------*/ /* Offset=0x000A Start of MapCell Array */ /* 0000 */ 0x0000, 0x007F, 0x0000, @@ -201,36 +213,41 @@ End of Item 0013 /* 0003 */ 0x00D6, 0x00DC, 0x00D6, /* 0004 */ 0x00E4, 0x00EB, 0x00E4, /* 0005 */ 0x00F6, 0x00FC, 0x00F6, -/* 0006 */ 0x00CD, 0x0103, 0x0000, -/* 0007 */ 0x0110, 0x0111, 0x0037, -/* 0008 */ 0x0152, 0x0153, 0x0039, -/* 0009 */ 0x0178, 0x0000, 0x009F, -/* 000A */ 0x0192, 0x0000, 0x0083, -/* 000B */ 0x01A0, 0x01A1, 0x003B, -/* 000C */ 0x01AF, 0x01B0, 0x003D, -/* 000D */ 0x02C6, 0x0000, 0x0088, -/* 000E */ 0x02DC, 0x0000, 0x0098, -/* 000F */ 0x0300, 0x0309, 0x003F, -/* 0010 */ 0x0323, 0x0000, 0x00F2, -/* 0011 */ 0x2013, 0x203A, 0x0049, -/* 0012 */ 0x20AB, 0x20AC, 0x0071, -/* 0013 */ 0x2122, 0x0000, 0x0099, +/* 0006 */ 0x0081, 0x009E, 0x0000, +/* 0007 */ 0x00CD, 0x0103, 0x001E, +/* 0008 */ 0x0110, 0x0111, 0x0055, +/* 0009 */ 0x0152, 0x0153, 0x0057, +/* 000A */ 0x0178, 0x0000, 0x009F, +/* 000B */ 0x0192, 0x0000, 0x0083, +/* 000C */ 0x01A0, 0x01A1, 0x0059, +/* 000D */ 0x01AF, 0x01B0, 0x005B, +/* 000E */ 0x02C6, 0x0000, 0x0088, +/* 000F */ 0x02DC, 0x0000, 0x0098, +/* 0010 */ 0x0300, 0x0309, 0x005D, +/* 0011 */ 0x0323, 0x0000, 0x00F2, +/* 0012 */ 0x2013, 0x203A, 0x0067, +/* 0013 */ 0x20AB, 0x20AC, 0x008F, +/* 0014 */ 0x2122, 0x0000, 0x0099, /*-------------------------------------------------------*/ -/* Offset=0x0046 Start of MappingTable */ +/* Offset=0x0049 Start of MappingTable */ -/* 0000 */ 0x00CD, 0x00CE, 0x00CF, 0xFFFD, 0x00D1, 0xFFFD, 0x00D3, 0x00D4, -/* 0008 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0010 */ 0xFFFD, 0xFFFD, 0x00DF, 0x00E0, 0x00E1, 0x00E2, 0xFFFD, 0xFFFD, -/* 0018 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0020 */ 0x00ED, 0x00EE, 0x00EF, 0xFFFD, 0x00F1, 0xFFFD, 0x00F3, 0x00F4, +/* 0000 */ 0x0081, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0008 */ 0xFFFD, 0x008A, 0xFFFD, 0xFFFD, 0x008D, 0x008E, 0x008F, 0x0090, +/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0018 */ 0xFFFD, 0x009A, 0xFFFD, 0xFFFD, 0x009D, 0x009E, 0x00CD, 0x00CE, +/* 0020 */ 0x00CF, 0xFFFD, 0x00D1, 0xFFFD, 0x00D3, 0x00D4, 0xFFFD, 0xFFFD, /* 0028 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0030 */ 0xFFFD, 0xFFFD, 0x00FF, 0xFFFD, 0xFFFD, 0x00C3, 0x00E3, 0x00D0, -/* 0038 */ 0x00F0, 0x008C, 0x009C, 0x00D5, 0x00F5, 0x00DD, 0x00FD, 0x00CC, -/* 0040 */ 0x00EC, 0xFFFD, 0x00DE, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0048 */ 0x00D2, 0x0096, 0x0097, 0xFFFD, 0xFFFD, 0xFFFD, 0x0091, 0x0092, -/* 0050 */ 0x0082, 0xFFFD, 0x0093, 0x0094, 0x0084, 0xFFFD, 0x0086, 0x0087, -/* 0058 */ 0x0095, 0xFFFD, 0xFFFD, 0xFFFD, 0x0085, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0060 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0089, 0xFFFD, -/* 0068 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008B, -/* 0070 */ 0x009B, 0x00FE, 0x0080, -/* End of table Total Length = 0x00B9 * 2 */ +/* 0030 */ 0x00DF, 0x00E0, 0x00E1, 0x00E2, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0038 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00ED, 0x00EE, +/* 0040 */ 0x00EF, 0xFFFD, 0x00F1, 0xFFFD, 0x00F3, 0x00F4, 0xFFFD, 0xFFFD, +/* 0048 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0050 */ 0x00FF, 0xFFFD, 0xFFFD, 0x00C3, 0x00E3, 0x00D0, 0x00F0, 0x008C, +/* 0058 */ 0x009C, 0x00D5, 0x00F5, 0x00DD, 0x00FD, 0x00CC, 0x00EC, 0xFFFD, +/* 0060 */ 0x00DE, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00D2, 0x0096, +/* 0068 */ 0x0097, 0xFFFD, 0xFFFD, 0xFFFD, 0x0091, 0x0092, 0x0082, 0xFFFD, +/* 0070 */ 0x0093, 0x0094, 0x0084, 0xFFFD, 0x0086, 0x0087, 0x0095, 0xFFFD, +/* 0078 */ 0xFFFD, 0xFFFD, 0x0085, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0080 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0089, 0xFFFD, 0xFFFD, 0xFFFD, +/* 0088 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x008B, 0x009B, 0x00FE, +/* 0090 */ 0x0080, +/* End of table Total Length = 0x00DA * 2 */ diff --git a/intl/uconv/ucvlatin/cp1258.ut b/intl/uconv/ucvlatin/cp1258.ut index 38a29d2c4e58..df55a5de5931 100644 --- a/intl/uconv/ucvlatin/cp1258.ut +++ b/intl/uconv/ucvlatin/cp1258.ut @@ -7,9 +7,9 @@ The tool which used to generate this file is called umaptable. You can find this tool under mozilla/intl/uconv/tools/umaptable.c. - If you have any problem of this file. Please contact - Netscape Client International Team or - ftang@netscape + If you have any problems with this file, please file a bug + under the "Internationalization" component in + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core Table in Debug form Begin of Item 0000 @@ -60,10 +60,10 @@ Begin of Item 0006 srcEnd = 009F mappingOffset = 0000 Mapping = - 20AC FFFD 201A 0192 201E 2026 2020 2021 - 02C6 2030 FFFD 2039 0152 FFFD FFFD FFFD - FFFD 2018 2019 201C 201D 2022 2013 2014 - 02DC 2122 FFFD 203A 0153 FFFD FFFD 0178 + 20AC 0081 201A 0192 201E 2026 2020 2021 + 02C6 2030 008A 2039 0152 008D 008E 008F + 0090 2018 2019 201C 201D 2022 2013 2014 + 02DC 2122 009A 203A 0153 009D 009E 0178 End of Item 0006 Begin of Item 0007 @@ -115,10 +115,10 @@ End of Item 0007 /*-------------------------------------------------------*/ /* Offset=0x001F Start of MappingTable */ -/* 0000 */ 0x20AC, 0xFFFD, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, -/* 0008 */ 0x02C6, 0x2030, 0xFFFD, 0x2039, 0x0152, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0010 */ 0xFFFD, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, -/* 0018 */ 0x02DC, 0x2122, 0xFFFD, 0x203A, 0x0153, 0xFFFD, 0xFFFD, 0x0178, +/* 0000 */ 0x20AC, 0x0081, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021, +/* 0008 */ 0x02C6, 0x2030, 0x008A, 0x2039, 0x0152, 0x008D, 0x008E, 0x008F, +/* 0010 */ 0x0090, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, +/* 0018 */ 0x02DC, 0x2122, 0x009A, 0x203A, 0x0153, 0x009D, 0x009E, 0x0178, /* 0020 */ 0x0102, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, /* 0028 */ 0xFFFD, 0x0300, 0x00CD, 0x00CE, 0x00CF, 0x0110, 0x00D1, 0x0309, /* 0030 */ 0x00D3, 0x00D4, 0x01A0, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, diff --git a/intl/uconv/ucvlatin/cp874.uf b/intl/uconv/ucvlatin/cp874.uf index 850623d3c71e..a8ad2078effe 100644 --- a/intl/uconv/ucvlatin/cp874.uf +++ b/intl/uconv/ucvlatin/cp874.uf @@ -5,10 +5,11 @@ /*======================================================== This is a Generated file. Please don't edit it. - The tool which used to generate this file is called fromu. - If you have any problem of this file. Please contact - Netscape Client International Team or - ftang@netscape + The tool which used to generate this file is called umaptable. + You can find this tool under mozilla/intl/uconv/tools/umaptable.c. + If you have any problems with this file, please file a bug + under the "Internationalization" component in + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core Table in Debug form Begin of Item 0000 @@ -20,73 +21,92 @@ End of Item 0000 Begin of Item 0001 Format 0 - srcBegin = 0E01 - srcEnd = 0E3A - destBegin = 00A1 + srcBegin = 0086 + srcEnd = 0090 + destBegin = 0086 End of Item 0001 Begin of Item 0002 Format 0 - srcBegin = 0E3F - srcEnd = 0E5B - destBegin = 00DF + srcBegin = 0098 + srcEnd = 00A0 + destBegin = 0098 End of Item 0002 Begin of Item 0003 - Format 2 - srcBegin = 00A0 - destBegin = 00A0 + Format 0 + srcBegin = 0E01 + srcEnd = 0E3A + destBegin = 00A1 End of Item 0003 Begin of Item 0004 + Format 0 + srcBegin = 0E3F + srcEnd = 0E5B + destBegin = 00DF +End of Item 0004 + +Begin of Item 0005 + Format 1 + srcBegin = 0081 + srcEnd = 0084 + mappingOffset = 0000 + Mapping = + 0081 0082 0083 0084 +End of Item 0005 + +Begin of Item 0006 Format 1 srcBegin = 2013 srcEnd = 2026 - mappingOffset = 0000 + mappingOffset = 0004 Mapping = 0096 0097 FFFD FFFD FFFD 0091 0092 FFFD FFFD 0093 0094 FFFD FFFD FFFD FFFD 0095 FFFD FFFD FFFD 0085 -End of Item 0004 +End of Item 0006 -Begin of Item 0005 +Begin of Item 0007 Format 2 srcBegin = 20AC destBegin = 0080 -End of Item 0005 +End of Item 0007 ========================================================*/ /* Offset=0x0000 ItemOfList */ - 0x0006, + 0x0008, /*-------------------------------------------------------*/ /* Offset=0x0001 offsetToFormatArray */ 0x0004, /*-------------------------------------------------------*/ /* Offset=0x0002 offsetToMapCellArray */ - 0x0006, + 0x0007, /*-------------------------------------------------------*/ /* Offset=0x0003 offsetToMappingTable */ - 0x0018, + 0x001F, /*-------------------------------------------------------*/ /* Offset=0x0004 Start of Format Array */ -/* Total of Format 0 : 0x0003 */ -/* Total of Format 1 : 0x0001 */ -/* Total of Format 2 : 0x0002 */ +/* Total of Format 0 : 0x0005 */ +/* Total of Format 1 : 0x0002 */ +/* Total of Format 2 : 0x0001 */ /* Total of Format 3 : 0x0000 */ -0x2000, 0x0021, +0x0000, 0x2110, 0x0000, /*-------------------------------------------------------*/ -/* Offset=0x0006 Start of MapCell Array */ +/* Offset=0x0007 Start of MapCell Array */ /* 0000 */ 0x0000, 0x007F, 0x0000, -/* 0001 */ 0x0E01, 0x0E3A, 0x00A1, -/* 0002 */ 0x0E3F, 0x0E5B, 0x00DF, -/* 0003 */ 0x00A0, 0x0000, 0x00A0, -/* 0004 */ 0x2013, 0x2026, 0x0000, -/* 0005 */ 0x20AC, 0x0000, 0x0080, +/* 0001 */ 0x0086, 0x0090, 0x0086, +/* 0002 */ 0x0098, 0x00A0, 0x0098, +/* 0003 */ 0x0E01, 0x0E3A, 0x00A1, +/* 0004 */ 0x0E3F, 0x0E5B, 0x00DF, +/* 0005 */ 0x0081, 0x0084, 0x0000, +/* 0006 */ 0x2013, 0x2026, 0x0004, +/* 0007 */ 0x20AC, 0x0000, 0x0080, /*-------------------------------------------------------*/ -/* Offset=0x0018 Start of MappingTable */ +/* Offset=0x001F Start of MappingTable */ -/* 0000 */ 0x0096, 0x0097, 0xFFFD, 0xFFFD, 0xFFFD, 0x0091, 0x0092, 0xFFFD, -/* 0008 */ 0xFFFD, 0x0093, 0x0094, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x0095, -/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x0085, -/* End of table Total Length = 0x002C * 2 */ +/* 0000 */ 0x0081, 0x0082, 0x0083, 0x0084, 0x0096, 0x0097, 0xFFFD, 0xFFFD, +/* 0008 */ 0xFFFD, 0x0091, 0x0092, 0xFFFD, 0xFFFD, 0x0093, 0x0094, 0xFFFD, +/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x0095, 0xFFFD, 0xFFFD, 0xFFFD, 0x0085, +/* End of table Total Length = 0x0037 * 2 */ diff --git a/intl/uconv/ucvlatin/cp874.ut b/intl/uconv/ucvlatin/cp874.ut index c4f813b0ad7b..2d44eb8b3089 100644 --- a/intl/uconv/ucvlatin/cp874.ut +++ b/intl/uconv/ucvlatin/cp874.ut @@ -5,10 +5,11 @@ /*======================================================== This is a Generated file. Please don't edit it. - The tool which used to generate this file is called fromu. - If you have any problem of this file. Please contact - Netscape Client International Team or - ftang@netscape + The tool which used to generate this file is called umaptable. + You can find this tool under mozilla/intl/uconv/tools/umaptable.c. + If you have any problems with this file, please file a bug + under the "Internationalization" component in + https://bugzilla.mozilla.org/enter_bug.cgi?product=Core Table in Debug form Begin of Item 0000 @@ -20,40 +21,53 @@ End of Item 0000 Begin of Item 0001 Format 0 - srcBegin = 00A1 - srcEnd = 00DA - destBegin = 0E01 + srcBegin = 0086 + srcEnd = 0090 + destBegin = 0086 End of Item 0001 Begin of Item 0002 Format 0 - srcBegin = 00DF - srcEnd = 00FB - destBegin = 0E3F + srcBegin = 0098 + srcEnd = 00A0 + destBegin = 0098 End of Item 0002 Begin of Item 0003 + Format 0 + srcBegin = 00A1 + srcEnd = 00DA + destBegin = 0E01 +End of Item 0003 + +Begin of Item 0004 + Format 0 + srcBegin = 00DF + srcEnd = 00FB + destBegin = 0E3F +End of Item 0004 + +Begin of Item 0005 Format 1 srcBegin = 0080 srcEnd = 0085 mappingOffset = 0000 Mapping = - 20AC FFFD FFFD FFFD FFFD 2026 -End of Item 0003 + 20AC 0081 0082 0083 0084 2026 +End of Item 0005 -Begin of Item 0004 +Begin of Item 0006 Format 1 srcBegin = 0091 - srcEnd = 00A0 + srcEnd = 0097 mappingOffset = 0006 Mapping = - 2018 2019 201C 201D 2022 2013 2014 FFFD - FFFD FFFD FFFD FFFD FFFD FFFD FFFD 00A0 -End of Item 0004 + 2018 2019 201C 201D 2022 2013 2014 +End of Item 0006 ========================================================*/ /* Offset=0x0000 ItemOfList */ - 0x0005, + 0x0007, /*-------------------------------------------------------*/ /* Offset=0x0001 offsetToFormatArray */ 0x0004, @@ -62,26 +76,27 @@ End of Item 0004 0x0006, /*-------------------------------------------------------*/ /* Offset=0x0003 offsetToMappingTable */ - 0x0015, + 0x001B, /*-------------------------------------------------------*/ /* Offset=0x0004 Start of Format Array */ -/* Total of Format 0 : 0x0003 */ +/* Total of Format 0 : 0x0005 */ /* Total of Format 1 : 0x0002 */ /* Total of Format 2 : 0x0000 */ /* Total of Format 3 : 0x0000 */ -0x1000, 0x0001, +0x0000, 0x0110, /*-------------------------------------------------------*/ /* Offset=0x0006 Start of MapCell Array */ /* 0000 */ 0x0000, 0x007F, 0x0000, -/* 0001 */ 0x00A1, 0x00DA, 0x0E01, -/* 0002 */ 0x00DF, 0x00FB, 0x0E3F, -/* 0003 */ 0x0080, 0x0085, 0x0000, -/* 0004 */ 0x0091, 0x00A0, 0x0006, +/* 0001 */ 0x0086, 0x0090, 0x0086, +/* 0002 */ 0x0098, 0x00A0, 0x0098, +/* 0003 */ 0x00A1, 0x00DA, 0x0E01, +/* 0004 */ 0x00DF, 0x00FB, 0x0E3F, +/* 0005 */ 0x0080, 0x0085, 0x0000, +/* 0006 */ 0x0091, 0x0097, 0x0006, /*-------------------------------------------------------*/ -/* Offset=0x0015 Start of MappingTable */ +/* Offset=0x001B Start of MappingTable */ -/* 0000 */ 0x20AC, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x2026, 0x2018, 0x2019, -/* 0008 */ 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0xFFFD, 0xFFFD, 0xFFFD, -/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x00A0, -/* End of table Total Length = 0x002B * 2 */ +/* 0000 */ 0x20AC, 0x0081, 0x0082, 0x0083, 0x0084, 0x2026, 0x2018, 0x2019, +/* 0008 */ 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, +/* End of table Total Length = 0x0028 * 2 */ From 1b1d6ffebf1709c5c969d54d507decb560d22fcd Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Mon, 1 Sep 2014 18:26:43 -0400 Subject: [PATCH 056/139] Bug 1061023 - Fix more bad implicit constructors in DOM; r=baku --HG-- extra : rebase_source : c80c5f9d7ae28286513cdb52ad76b46c240bdd5d --- content/media/eme/MediaKeyMessageEvent.h | 2 +- .../webaudio/MediaStreamAudioSourceNode.h | 2 +- dom/activities/Activity.h | 2 +- dom/animation/AnimationEffect.h | 2 +- dom/archivereader/ArchiveEvent.h | 2 +- dom/archivereader/ArchiveRequest.cpp | 4 +-- dom/bindings/Codegen.py | 2 +- dom/bindings/Exceptions.cpp | 2 +- dom/bindings/test/TestCImplementedInterface.h | 2 +- dom/camera/AutoRwLock.h | 4 +-- dom/camera/CameraControlImpl.h | 2 +- dom/camera/CameraPreviewMediaStream.h | 2 +- dom/camera/CameraRecorderProfiles.h | 2 +- dom/camera/DOMCameraCapabilities.h | 2 +- dom/camera/DOMCameraControl.cpp | 2 +- dom/camera/DOMCameraControl.h | 2 +- dom/camera/DOMCameraControlListener.cpp | 4 +-- dom/camera/FallbackCameraControl.cpp | 2 +- dom/camera/ICameraControl.h | 2 +- dom/canvas/CanvasImageCache.cpp | 8 ++--- dom/canvas/CanvasRenderingContext2D.cpp | 4 +-- dom/canvas/TextMetrics.h | 2 +- dom/canvas/WebGLBuffer.h | 2 +- dom/canvas/WebGLContext.cpp | 6 ++-- dom/canvas/WebGLContextLossHandler.h | 2 +- dom/canvas/WebGLContextUtils.h | 2 +- dom/canvas/WebGLElementArrayCache.cpp | 4 +-- dom/canvas/WebGLExtensions.h | 8 ++--- dom/canvas/WebGLProgram.h | 2 +- dom/canvas/WebGLQuery.h | 2 +- dom/canvas/WebGLTexture.h | 2 +- dom/canvas/WebGLUniformInfo.h | 2 +- dom/canvas/WebGLValidateStrings.h | 8 ++--- dom/canvas/WebGLVertexArray.h | 2 +- dom/canvas/WebGLVertexArrayFake.h | 4 +-- dom/canvas/WebGLVertexArrayGL.h | 4 +-- dom/crypto/CryptoKeyPair.h | 2 +- dom/crypto/WebCryptoTask.cpp | 6 ++-- dom/datastore/DataStoreDB.cpp | 2 +- dom/devicestorage/nsDeviceStorage.cpp | 2 +- dom/events/ContentEventHandler.h | 2 +- dom/events/EventDispatcher.cpp | 2 +- dom/events/EventStateManager.cpp | 2 +- dom/events/IMEContentObserver.cpp | 4 +-- dom/events/IMEStateManager.cpp | 2 +- dom/events/PaintRequest.h | 4 +-- dom/filehandle/AsyncHelper.h | 2 +- dom/filehandle/FileHandle.cpp | 2 +- dom/filehandle/FileHandle.h | 2 +- dom/filehandle/FileService.h | 2 +- dom/filehandle/FileStreamWrappers.cpp | 4 +-- dom/filesystem/CreateFileTask.cpp | 2 +- dom/indexedDB/AsyncConnectionHelper.cpp | 2 +- dom/indexedDB/AsyncConnectionHelper.h | 2 +- dom/indexedDB/IDBCursor.cpp | 2 +- dom/indexedDB/IDBDatabase.cpp | 2 +- dom/indexedDB/IDBEvents.h | 2 +- dom/indexedDB/IDBFileRequest.h | 2 +- dom/indexedDB/TransactionThreadPool.cpp | 2 +- dom/indexedDB/TransactionThreadPool.h | 4 +-- dom/indexedDB/ipc/IndexedDBChild.cpp | 2 +- dom/mobilemessage/DeletedMessageInfo.h | 2 +- dom/mobilemessage/MmsMessage.h | 2 +- dom/mobilemessage/MobileMessageCallback.h | 2 +- dom/mobilemessage/MobileMessageThread.h | 2 +- dom/mobilemessage/SmsMessage.h | 2 +- dom/network/UDPSocket.cpp | 2 +- dom/notification/DesktopNotification.cpp | 4 +-- dom/notification/Notification.cpp | 2 +- dom/plugins/base/nsJSNPRuntime.cpp | 4 +-- dom/plugins/base/nsNPAPIPlugin.h | 8 ++--- dom/plugins/base/nsNPAPIPluginInstance.cpp | 4 +-- dom/plugins/base/nsPluginHost.cpp | 2 +- dom/plugins/base/nsPluginInstanceOwner.cpp | 2 +- .../base/nsPluginStreamListenerPeer.cpp | 2 +- dom/plugins/base/nsPluginStreamListenerPeer.h | 2 +- dom/plugins/base/nsPluginsDirDarwin.cpp | 4 +-- dom/plugins/ipc/PluginBackgroundDestroyer.h | 2 +- dom/plugins/ipc/PluginInstanceParent.cpp | 2 +- dom/plugins/ipc/PluginInterposeOSX.mm | 6 ++-- dom/plugins/ipc/PluginModuleParent.h | 2 +- dom/plugins/ipc/PluginProcessChild.h | 2 +- dom/plugins/ipc/PluginProcessParent.h | 2 +- .../ipc/PluginScriptableObjectParent.h | 2 +- dom/plugins/ipc/PluginScriptableObjectUtils.h | 2 +- dom/promise/Promise.cpp | 2 +- dom/quota/QuotaManager.cpp | 6 ++-- dom/quota/StorageMatcher.h | 2 +- dom/smil/nsSMILTimedElement.cpp | 12 +++---- dom/telephony/CallsList.h | 2 +- dom/telephony/Telephony.cpp | 2 +- dom/telephony/ipc/TelephonyChild.h | 2 +- dom/workers/DataStore.h | 4 +-- dom/workers/DataStoreCursor.h | 4 +-- dom/workers/Performance.h | 2 +- dom/workers/RuntimeService.cpp | 6 ++-- dom/workers/RuntimeService.h | 2 +- dom/workers/ServiceWorkerEvents.h | 4 +-- dom/workers/ServiceWorkerManager.cpp | 6 ++-- dom/workers/URL.cpp | 4 +-- dom/workers/WorkerPrivate.cpp | 33 ++++++++++--------- dom/workers/WorkerScope.h | 4 +-- dom/workers/XMLHttpRequest.cpp | 4 +-- dom/workers/XMLHttpRequest.h | 2 +- dom/workers/XMLHttpRequestUpload.h | 2 +- 105 files changed, 171 insertions(+), 170 deletions(-) diff --git a/content/media/eme/MediaKeyMessageEvent.h b/content/media/eme/MediaKeyMessageEvent.h index 26ad9c3f8419..b6d2970cd7a5 100644 --- a/content/media/eme/MediaKeyMessageEvent.h +++ b/content/media/eme/MediaKeyMessageEvent.h @@ -29,7 +29,7 @@ public: NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(MediaKeyMessageEvent, Event) protected: virtual ~MediaKeyMessageEvent(); - MediaKeyMessageEvent(EventTarget* aOwner); + explicit MediaKeyMessageEvent(EventTarget* aOwner); JS::Heap mMessage; nsString mDestinationURL; diff --git a/content/media/webaudio/MediaStreamAudioSourceNode.h b/content/media/webaudio/MediaStreamAudioSourceNode.h index d4edd448438b..5a587a9a9b0c 100644 --- a/content/media/webaudio/MediaStreamAudioSourceNode.h +++ b/content/media/webaudio/MediaStreamAudioSourceNode.h @@ -18,7 +18,7 @@ namespace dom { class MediaStreamAudioSourceNodeEngine : public AudioNodeEngine { public: - MediaStreamAudioSourceNodeEngine(AudioNode* aNode) + explicit MediaStreamAudioSourceNodeEngine(AudioNode* aNode) : AudioNodeEngine(aNode), mEnabled(false) {} bool IsEnabled() const { return mEnabled; } diff --git a/dom/activities/Activity.h b/dom/activities/Activity.h index 9a36bbce7db0..a657024b4637 100644 --- a/dom/activities/Activity.h +++ b/dom/activities/Activity.h @@ -39,7 +39,7 @@ public: return activity.forget(); } - Activity(nsPIDOMWindow* aWindow); + explicit Activity(nsPIDOMWindow* aWindow); protected: nsresult Initialize(nsPIDOMWindow* aWindow, diff --git a/dom/animation/AnimationEffect.h b/dom/animation/AnimationEffect.h index 2f25739e9847..d4228012da26 100644 --- a/dom/animation/AnimationEffect.h +++ b/dom/animation/AnimationEffect.h @@ -18,7 +18,7 @@ namespace dom { class AnimationEffect MOZ_FINAL : public nsWrapperCache { public: - AnimationEffect(Animation* aAnimation) + explicit AnimationEffect(Animation* aAnimation) : mAnimation(aAnimation) { SetIsDOMBinding(); diff --git a/dom/archivereader/ArchiveEvent.h b/dom/archivereader/ArchiveEvent.h index 392d5fa5885f..34e5d00acf2d 100644 --- a/dom/archivereader/ArchiveEvent.h +++ b/dom/archivereader/ArchiveEvent.h @@ -54,7 +54,7 @@ class ArchiveReaderEvent : public nsRunnable public: NS_DECL_NSIRUNNABLE - ArchiveReaderEvent(ArchiveReader* aArchiveReader); + explicit ArchiveReaderEvent(ArchiveReader* aArchiveReader); protected: virtual ~ArchiveReaderEvent(); diff --git a/dom/archivereader/ArchiveRequest.cpp b/dom/archivereader/ArchiveRequest.cpp index 3c68c1720b70..617d1e610003 100644 --- a/dom/archivereader/ArchiveRequest.cpp +++ b/dom/archivereader/ArchiveRequest.cpp @@ -23,8 +23,8 @@ class ArchiveRequestEvent : public nsRunnable public: NS_DECL_NSIRUNNABLE - ArchiveRequestEvent(ArchiveRequest* request) - : mRequest(request) + explicit ArchiveRequestEvent(ArchiveRequest* aRequest) + : mRequest(aRequest) { MOZ_COUNT_CTOR(ArchiveRequestEvent); } diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py index fcab604208f7..7bf5e5388ab8 100644 --- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -14544,7 +14544,7 @@ class CGEventClass(CGBindingImplClass): NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(${nativeType}, ${parentType}) protected: virtual ~${nativeType}(); - ${nativeType}(mozilla::dom::EventTarget* aOwner); + explicit ${nativeType}(mozilla::dom::EventTarget* aOwner); """, nativeType=self.descriptor.nativeType.split('::')[-1], diff --git a/dom/bindings/Exceptions.cpp b/dom/bindings/Exceptions.cpp index 5ae8c3a2e443..7c50eba8bf7d 100644 --- a/dom/bindings/Exceptions.cpp +++ b/dom/bindings/Exceptions.cpp @@ -269,7 +269,7 @@ public: StackFrame) // aStack must not be null. - JSStackFrame(JS::Handle aStack); + explicit JSStackFrame(JS::Handle aStack); static already_AddRefed CreateStack(JSContext* aCx, int32_t aMaxDepth = -1); diff --git a/dom/bindings/test/TestCImplementedInterface.h b/dom/bindings/test/TestCImplementedInterface.h index b64d33ebdf3a..c5462b714881 100644 --- a/dom/bindings/test/TestCImplementedInterface.h +++ b/dom/bindings/test/TestCImplementedInterface.h @@ -27,7 +27,7 @@ class TestCImplementedInterface2 : public nsISupports, public nsWrapperCache { public: - TestCImplementedInterface2(nsPIDOMWindow* aParent) + explicit TestCImplementedInterface2(nsPIDOMWindow* aParent) {} NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TestCImplementedInterface2) diff --git a/dom/camera/AutoRwLock.h b/dom/camera/AutoRwLock.h index 95b9cf3795cf..31c446d96126 100644 --- a/dom/camera/AutoRwLock.h +++ b/dom/camera/AutoRwLock.h @@ -11,7 +11,7 @@ class RwLockAutoEnterRead { public: - RwLockAutoEnterRead(PRRWLock* aRwLock) + explicit RwLockAutoEnterRead(PRRWLock* aRwLock) : mRwLock(aRwLock) { MOZ_ASSERT(mRwLock); @@ -30,7 +30,7 @@ protected: class RwLockAutoEnterWrite { public: - RwLockAutoEnterWrite(PRRWLock* aRwLock) + explicit RwLockAutoEnterWrite(PRRWLock* aRwLock) : mRwLock(aRwLock) { MOZ_ASSERT(mRwLock); diff --git a/dom/camera/CameraControlImpl.h b/dom/camera/CameraControlImpl.h index d357bf3ab099..6b6c1399306b 100644 --- a/dom/camera/CameraControlImpl.h +++ b/dom/camera/CameraControlImpl.h @@ -30,7 +30,7 @@ class RecorderProfileManager; class CameraControlImpl : public ICameraControl { public: - CameraControlImpl(uint32_t aCameraId); + explicit CameraControlImpl(uint32_t aCameraId); virtual void AddListener(CameraControlListener* aListener) MOZ_OVERRIDE; virtual void RemoveListener(CameraControlListener* aListener) MOZ_OVERRIDE; diff --git a/dom/camera/CameraPreviewMediaStream.h b/dom/camera/CameraPreviewMediaStream.h index 29776f3d05d0..2a5f8ef8f2fd 100644 --- a/dom/camera/CameraPreviewMediaStream.h +++ b/dom/camera/CameraPreviewMediaStream.h @@ -23,7 +23,7 @@ class CameraPreviewMediaStream : public MediaStream typedef mozilla::layers::Image Image; public: - CameraPreviewMediaStream(DOMMediaStream* aWrapper); + explicit CameraPreviewMediaStream(DOMMediaStream* aWrapper); virtual void AddAudioOutput(void* aKey) MOZ_OVERRIDE; virtual void SetAudioOutputVolume(void* aKey, float aVolume) MOZ_OVERRIDE; diff --git a/dom/camera/CameraRecorderProfiles.h b/dom/camera/CameraRecorderProfiles.h index 1ce19255aacd..92bc9e69796d 100644 --- a/dom/camera/CameraRecorderProfiles.h +++ b/dom/camera/CameraRecorderProfiles.h @@ -262,7 +262,7 @@ public: nsresult GetJsObject(JSContext* aCx, JSObject** aObject) const; protected: - RecorderProfileManager(uint32_t aCameraId); + explicit RecorderProfileManager(uint32_t aCameraId); virtual ~RecorderProfileManager(); uint32_t mCameraId; diff --git a/dom/camera/DOMCameraCapabilities.h b/dom/camera/DOMCameraCapabilities.h index 7427b3de3faf..9a5a2b7f8012 100644 --- a/dom/camera/DOMCameraCapabilities.h +++ b/dom/camera/DOMCameraCapabilities.h @@ -40,7 +40,7 @@ public: // Great Renaming proposed in bug 983177. static bool HasSupport(JSContext* aCx, JSObject* aGlobal); - CameraCapabilities(nsPIDOMWindow* aWindow); + explicit CameraCapabilities(nsPIDOMWindow* aWindow); // Populate the camera capabilities interface from the specific // camera control object. diff --git a/dom/camera/DOMCameraControl.cpp b/dom/camera/DOMCameraControl.cpp index 2f9f29b98ec5..64e1a86d6a7c 100644 --- a/dom/camera/DOMCameraControl.cpp +++ b/dom/camera/DOMCameraControl.cpp @@ -81,7 +81,7 @@ public: NS_DECL_ISUPPORTS NS_DECL_NSIDOMEVENTLISTENER - StartRecordingHelper(nsDOMCameraControl* aDOMCameraControl) + explicit StartRecordingHelper(nsDOMCameraControl* aDOMCameraControl) : mDOMCameraControl(aDOMCameraControl) { MOZ_COUNT_CTOR(StartRecordingHelper); diff --git a/dom/camera/DOMCameraControl.h b/dom/camera/DOMCameraControl.h index 00e577972fc8..236815ae94cd 100644 --- a/dom/camera/DOMCameraControl.h +++ b/dom/camera/DOMCameraControl.h @@ -145,7 +145,7 @@ protected: NS_INLINE_DECL_REFCOUNTING(DOMCameraConfiguration) DOMCameraConfiguration(); - DOMCameraConfiguration(const dom::CameraConfiguration& aConfiguration); + explicit DOMCameraConfiguration(const dom::CameraConfiguration& aConfiguration); // Additional configuration options that aren't exposed to the DOM uint32_t mMaxFocusAreas; diff --git a/dom/camera/DOMCameraControlListener.cpp b/dom/camera/DOMCameraControlListener.cpp index 78a7888b378a..ea71d99ec8ca 100644 --- a/dom/camera/DOMCameraControlListener.cpp +++ b/dom/camera/DOMCameraControlListener.cpp @@ -31,7 +31,7 @@ DOMCameraControlListener::~DOMCameraControlListener() class DOMCameraControlListener::DOMCallback : public nsRunnable { public: - DOMCallback(nsMainThreadPtrHandle aDOMCameraControl) + explicit DOMCallback(nsMainThreadPtrHandle aDOMCameraControl) : mDOMCameraControl(aDOMCameraControl) { MOZ_COUNT_CTOR(DOMCameraControlListener::DOMCallback); @@ -276,7 +276,7 @@ DOMCameraControlListener::OnShutter() class Callback : public DOMCallback { public: - Callback(nsMainThreadPtrHandle aDOMCameraControl) + explicit Callback(nsMainThreadPtrHandle aDOMCameraControl) : DOMCallback(aDOMCameraControl) { } diff --git a/dom/camera/FallbackCameraControl.cpp b/dom/camera/FallbackCameraControl.cpp index 2655ac957363..9f443a176496 100644 --- a/dom/camera/FallbackCameraControl.cpp +++ b/dom/camera/FallbackCameraControl.cpp @@ -22,7 +22,7 @@ namespace mozilla { class FallbackCameraControl : public CameraControlImpl { public: - FallbackCameraControl(uint32_t aCameraId) : CameraControlImpl(aCameraId) { } + explicit FallbackCameraControl(uint32_t aCameraId) : CameraControlImpl(aCameraId) { } virtual nsresult Set(uint32_t aKey, const nsAString& aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; } virtual nsresult Get(uint32_t aKey, nsAString& aValue) MOZ_OVERRIDE { return NS_ERROR_NOT_IMPLEMENTED; } diff --git a/dom/camera/ICameraControl.h b/dom/camera/ICameraControl.h index 3d33f831c21e..80445dae82e1 100644 --- a/dom/camera/ICameraControl.h +++ b/dom/camera/ICameraControl.h @@ -240,7 +240,7 @@ protected: class ICameraControlParameterSetAutoEnter { public: - ICameraControlParameterSetAutoEnter(ICameraControl* aCameraControl) + explicit ICameraControlParameterSetAutoEnter(ICameraControl* aCameraControl) : mCameraControl(aCameraControl) { mCameraControl->BeginBatchParameterSet(); diff --git a/dom/canvas/CanvasImageCache.cpp b/dom/canvas/CanvasImageCache.cpp index 00b3470ad1f9..293bdb0eb70e 100644 --- a/dom/canvas/CanvasImageCache.cpp +++ b/dom/canvas/CanvasImageCache.cpp @@ -35,7 +35,7 @@ struct ImageCacheEntryData { , mSourceSurface(aOther.mSourceSurface) , mSize(aOther.mSize) {} - ImageCacheEntryData(const ImageCacheKey& aKey) + explicit ImageCacheEntryData(const ImageCacheKey& aKey) : mImage(aKey.mImage) , mILC(nullptr) , mCanvas(aKey.mCanvas) @@ -61,8 +61,8 @@ public: typedef ImageCacheKey KeyType; typedef const ImageCacheKey* KeyTypePointer; - ImageCacheEntry(const KeyType *key) : - mData(new ImageCacheEntryData(*key)) {} + explicit ImageCacheEntry(const KeyType* aKey) : + mData(new ImageCacheEntryData(*aKey)) {} ImageCacheEntry(const ImageCacheEntry &toCopy) : mData(new ImageCacheEntryData(*toCopy.mData)) {} ~ImageCacheEntry() {} @@ -115,7 +115,7 @@ class ImageCacheObserver MOZ_FINAL : public nsIObserver public: NS_DECL_ISUPPORTS - ImageCacheObserver(ImageCache* aImageCache) + explicit ImageCacheObserver(ImageCache* aImageCache) : mImageCache(aImageCache) { RegisterMemoryPressureEvent(); diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderingContext2D.cpp index 2e2e5c34d3ce..d29543d1a2c1 100644 --- a/dom/canvas/CanvasRenderingContext2D.cpp +++ b/dom/canvas/CanvasRenderingContext2D.cpp @@ -298,7 +298,7 @@ class AdjustedTarget public: typedef CanvasRenderingContext2D::ContextState ContextState; - AdjustedTarget(CanvasRenderingContext2D *ctx, + explicit AdjustedTarget(CanvasRenderingContext2D* ctx, mgfx::Rect *aBounds = nullptr) : mCtx(nullptr) { @@ -438,7 +438,7 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(CanvasPattern, mContext) class CanvasRenderingContext2DUserData : public LayerUserData { public: - CanvasRenderingContext2DUserData(CanvasRenderingContext2D *aContext) + explicit CanvasRenderingContext2DUserData(CanvasRenderingContext2D *aContext) : mContext(aContext) { aContext->mUserDatas.AppendElement(this); diff --git a/dom/canvas/TextMetrics.h b/dom/canvas/TextMetrics.h index c01f024026ea..2a57e132f422 100644 --- a/dom/canvas/TextMetrics.h +++ b/dom/canvas/TextMetrics.h @@ -15,7 +15,7 @@ namespace dom { class TextMetrics MOZ_FINAL : public NonRefcountedDOMObject { public: - TextMetrics(float w) : width(w) + explicit TextMetrics(float aValue) : width(aValue) { MOZ_COUNT_CTOR(TextMetrics); } diff --git a/dom/canvas/WebGLBuffer.h b/dom/canvas/WebGLBuffer.h index 50054fe1befa..ebf391fa93ae 100644 --- a/dom/canvas/WebGLBuffer.h +++ b/dom/canvas/WebGLBuffer.h @@ -26,7 +26,7 @@ class WebGLBuffer MOZ_FINAL , public WebGLContextBoundObject { public: - WebGLBuffer(WebGLContext *context); + explicit WebGLBuffer(WebGLContext* aContext); void Delete(); diff --git a/dom/canvas/WebGLContext.cpp b/dom/canvas/WebGLContext.cpp index 543cd4e47f30..99e9b1023d09 100644 --- a/dom/canvas/WebGLContext.cpp +++ b/dom/canvas/WebGLContext.cpp @@ -1129,7 +1129,7 @@ namespace mozilla { class WebGLContextUserData : public LayerUserData { public: - WebGLContextUserData(HTMLCanvasElement *aContent) + explicit WebGLContextUserData(HTMLCanvasElement* aContent) : mContent(aContent) {} @@ -1510,8 +1510,8 @@ class UpdateContextLossStatusTask : public nsRunnable nsRefPtr mContext; public: - UpdateContextLossStatusTask(WebGLContext* context) - : mContext(context) + explicit UpdateContextLossStatusTask(WebGLContext* aContext) + : mContext(aContext) { } diff --git a/dom/canvas/WebGLContextLossHandler.h b/dom/canvas/WebGLContextLossHandler.h index bb41007653a7..7cff2337fe74 100644 --- a/dom/canvas/WebGLContextLossHandler.h +++ b/dom/canvas/WebGLContextLossHandler.h @@ -30,7 +30,7 @@ class WebGLContextLossHandler public: MOZ_DECLARE_REFCOUNTED_TYPENAME(WebGLContextLossHandler) - WebGLContextLossHandler(WebGLContext* webgl); + explicit WebGLContextLossHandler(WebGLContext* aWebgl); ~WebGLContextLossHandler(); void RunTimer(); diff --git a/dom/canvas/WebGLContextUtils.h b/dom/canvas/WebGLContextUtils.h index e12081d1d7c2..e63446e7fc48 100644 --- a/dom/canvas/WebGLContextUtils.h +++ b/dom/canvas/WebGLContextUtils.h @@ -36,7 +36,7 @@ struct GLComponents : mComponents(0) { } - GLComponents(GLenum format); + explicit GLComponents(GLenum aFormat); // Returns true iff other has all (or more) of // the components present in this GLComponents diff --git a/dom/canvas/WebGLElementArrayCache.cpp b/dom/canvas/WebGLElementArrayCache.cpp index b77837122021..6e0919b31271 100644 --- a/dom/canvas/WebGLElementArrayCache.cpp +++ b/dom/canvas/WebGLElementArrayCache.cpp @@ -144,8 +144,8 @@ public: // Constructor. Takes a reference to the WebGLElementArrayCache that is to be // the parent. Does not initialize the tree. Should be followed by a call // to Update() to attempt initializing the tree. - WebGLElementArrayCacheTree(WebGLElementArrayCache& p) - : mParent(p) + explicit WebGLElementArrayCacheTree(WebGLElementArrayCache& aValue) + : mParent(aValue) { } diff --git a/dom/canvas/WebGLExtensions.h b/dom/canvas/WebGLExtensions.h index af2d81a4d488..a5a3f5f205ea 100644 --- a/dom/canvas/WebGLExtensions.h +++ b/dom/canvas/WebGLExtensions.h @@ -23,7 +23,7 @@ class WebGLExtensionBase , public WebGLContextBoundObject { public: - WebGLExtensionBase(WebGLContext*); + explicit WebGLExtensionBase(WebGLContext* aValue); WebGLContext *GetParentObject() const { return Context(); @@ -288,7 +288,7 @@ class WebGLExtensionVertexArray : public WebGLExtensionBase { public: - WebGLExtensionVertexArray(WebGLContext*); + explicit WebGLExtensionVertexArray(WebGLContext* aValue); virtual ~WebGLExtensionVertexArray(); already_AddRefed CreateVertexArrayOES(); @@ -305,7 +305,7 @@ class WebGLExtensionInstancedArrays : public WebGLExtensionBase { public: - WebGLExtensionInstancedArrays(WebGLContext* context); + explicit WebGLExtensionInstancedArrays(WebGLContext* aContext); virtual ~WebGLExtensionInstancedArrays(); void DrawArraysInstancedANGLE(GLenum mode, GLint first, @@ -324,7 +324,7 @@ class WebGLExtensionBlendMinMax : public WebGLExtensionBase { public: - WebGLExtensionBlendMinMax(WebGLContext*); + explicit WebGLExtensionBlendMinMax(WebGLContext* aValue); virtual ~WebGLExtensionBlendMinMax(); static bool IsSupported(const WebGLContext*); diff --git a/dom/canvas/WebGLProgram.h b/dom/canvas/WebGLProgram.h index ddd2cb0f00d8..0a11b5938e2f 100644 --- a/dom/canvas/WebGLProgram.h +++ b/dom/canvas/WebGLProgram.h @@ -31,7 +31,7 @@ class WebGLProgram MOZ_FINAL , public WebGLContextBoundObject { public: - WebGLProgram(WebGLContext *context); + explicit WebGLProgram(WebGLContext* aContext); void Delete(); diff --git a/dom/canvas/WebGLQuery.h b/dom/canvas/WebGLQuery.h index 419f819dba95..e95635758a80 100644 --- a/dom/canvas/WebGLQuery.h +++ b/dom/canvas/WebGLQuery.h @@ -27,7 +27,7 @@ public: // ------------------------------------------------------------------------- // CONSTRUCTOR - WebGLQuery(WebGLContext *context); + explicit WebGLQuery(WebGLContext* aContext); // ------------------------------------------------------------------------- // MEMBER FUNCTIONS diff --git a/dom/canvas/WebGLTexture.h b/dom/canvas/WebGLTexture.h index a2be3d5b8ab9..dcbbc1330ec0 100644 --- a/dom/canvas/WebGLTexture.h +++ b/dom/canvas/WebGLTexture.h @@ -35,7 +35,7 @@ class WebGLTexture MOZ_FINAL , public WebGLFramebufferAttachable { public: - WebGLTexture(WebGLContext *context); + explicit WebGLTexture(WebGLContext* aContext); void Delete(); diff --git a/dom/canvas/WebGLUniformInfo.h b/dom/canvas/WebGLUniformInfo.h index aba30886f07d..9c341cb30ed2 100644 --- a/dom/canvas/WebGLUniformInfo.h +++ b/dom/canvas/WebGLUniformInfo.h @@ -15,7 +15,7 @@ struct WebGLUniformInfo { bool isArray; ShDataType type; - WebGLUniformInfo(uint32_t s = 0, bool a = false, ShDataType t = SH_NONE) + explicit WebGLUniformInfo(uint32_t s = 0, bool a = false, ShDataType t = SH_NONE) : arraySize(s), isArray(a), type(t) {} int ElementSize() const { diff --git a/dom/canvas/WebGLValidateStrings.h b/dom/canvas/WebGLValidateStrings.h index 38e034847130..e4f592783486 100644 --- a/dom/canvas/WebGLValidateStrings.h +++ b/dom/canvas/WebGLValidateStrings.h @@ -58,13 +58,13 @@ namespace mozilla { // implementations not expecting characters outside the GLSL ES set. class StripComments { public: - StripComments(const nsAString& str) + explicit StripComments(const nsAString& aStr) : m_parseState(BeginningOfLine) - , m_end(str.EndReading()) - , m_current(str.BeginReading()) + , m_end(aStr.EndReading()) + , m_current(aStr.BeginReading()) , m_position(0) { - m_result.SetLength(str.Length()); + m_result.SetLength(aStr.Length()); parse(); } diff --git a/dom/canvas/WebGLVertexArray.h b/dom/canvas/WebGLVertexArray.h index d86bfef0f5f4..bd35c00a9d74 100644 --- a/dom/canvas/WebGLVertexArray.h +++ b/dom/canvas/WebGLVertexArray.h @@ -74,7 +74,7 @@ public: // ----------------------------------------------------------------------------- // PROTECTED protected: - WebGLVertexArray(WebGLContext* context); + explicit WebGLVertexArray(WebGLContext* aContext); virtual ~WebGLVertexArray() { MOZ_ASSERT(IsDeleted()); diff --git a/dom/canvas/WebGLVertexArrayFake.h b/dom/canvas/WebGLVertexArrayFake.h index 49e4fe6d6ae2..898aa28632ed 100644 --- a/dom/canvas/WebGLVertexArrayFake.h +++ b/dom/canvas/WebGLVertexArrayFake.h @@ -19,8 +19,8 @@ public: virtual void GenVertexArray() MOZ_OVERRIDE { }; private: - WebGLVertexArrayFake(WebGLContext *context) - : WebGLVertexArray(context) + explicit WebGLVertexArrayFake(WebGLContext* aContext) + : WebGLVertexArray(aContext) { } ~WebGLVertexArrayFake() { diff --git a/dom/canvas/WebGLVertexArrayGL.h b/dom/canvas/WebGLVertexArrayGL.h index de839eaffec2..41c82a036509 100644 --- a/dom/canvas/WebGLVertexArrayGL.h +++ b/dom/canvas/WebGLVertexArrayGL.h @@ -19,8 +19,8 @@ public: virtual void GenVertexArray() MOZ_OVERRIDE; private: - WebGLVertexArrayGL(WebGLContext* context) - : WebGLVertexArray(context) + explicit WebGLVertexArrayGL(WebGLContext* aContext) + : WebGLVertexArray(aContext) { } ~WebGLVertexArrayGL() { diff --git a/dom/crypto/CryptoKeyPair.h b/dom/crypto/CryptoKeyPair.h index ce96d0e2ead1..788a68732227 100644 --- a/dom/crypto/CryptoKeyPair.h +++ b/dom/crypto/CryptoKeyPair.h @@ -24,7 +24,7 @@ public: NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CryptoKeyPair) public: - CryptoKeyPair(nsIGlobalObject* aGlobal) + explicit CryptoKeyPair(nsIGlobalObject* aGlobal) : mGlobal(aGlobal) , mPublicKey(new CryptoKey(aGlobal)) , mPrivateKey(new CryptoKey(aGlobal)) diff --git a/dom/crypto/WebCryptoTask.cpp b/dom/crypto/WebCryptoTask.cpp index b7ecd3f04b55..4c1b6d293b14 100644 --- a/dom/crypto/WebCryptoTask.cpp +++ b/dom/crypto/WebCryptoTask.cpp @@ -110,7 +110,7 @@ enum TelemetryAlgorithm { class ClearException { public: - ClearException(JSContext* aCx) + explicit ClearException(JSContext* aCx) : mCx(aCx) {} @@ -379,8 +379,8 @@ WebCryptoTask::CallCallback(nsresult rv) class FailureTask : public WebCryptoTask { public: - FailureTask(nsresult rv) { - mEarlyRv = rv; + explicit FailureTask(nsresult aRv) { + mEarlyRv = aRv; } }; diff --git a/dom/datastore/DataStoreDB.cpp b/dom/datastore/DataStoreDB.cpp index 398ae21f8799..56b9135c4ca7 100644 --- a/dom/datastore/DataStoreDB.cpp +++ b/dom/datastore/DataStoreDB.cpp @@ -31,7 +31,7 @@ class VersionChangeListener MOZ_FINAL : public nsIDOMEventListener public: NS_DECL_ISUPPORTS - VersionChangeListener(IDBDatabase* aDatabase) + explicit VersionChangeListener(IDBDatabase* aDatabase) : mDatabase(aDatabase) {} diff --git a/dom/devicestorage/nsDeviceStorage.cpp b/dom/devicestorage/nsDeviceStorage.cpp index 1147ebd3f8bb..61351ad30f91 100644 --- a/dom/devicestorage/nsDeviceStorage.cpp +++ b/dom/devicestorage/nsDeviceStorage.cpp @@ -1790,7 +1790,7 @@ public: NS_FORWARD_NSICONTENTPERMISSIONREQUEST(mCursor->); - DeviceStorageCursorRequest(nsDOMDeviceStorageCursor* aCursor) + explicit DeviceStorageCursorRequest(nsDOMDeviceStorageCursor* aCursor) : mCursor(aCursor) { } private: diff --git a/dom/events/ContentEventHandler.h b/dom/events/ContentEventHandler.h index f10818c57f43..a86e56eee71f 100644 --- a/dom/events/ContentEventHandler.h +++ b/dom/events/ContentEventHandler.h @@ -34,7 +34,7 @@ enum LineBreakType class MOZ_STACK_CLASS ContentEventHandler { public: - ContentEventHandler(nsPresContext* aPresContext); + explicit ContentEventHandler(nsPresContext* aPresContext); // NS_QUERY_SELECTED_TEXT event handler nsresult OnQuerySelectedText(WidgetQueryContentEvent* aEvent); diff --git a/dom/events/EventDispatcher.cpp b/dom/events/EventDispatcher.cpp index c80c5de3e978..16ec46a3d53f 100644 --- a/dom/events/EventDispatcher.cpp +++ b/dom/events/EventDispatcher.cpp @@ -71,7 +71,7 @@ private: class EventTargetChainItem { private: - EventTargetChainItem(EventTarget* aTarget); + explicit EventTargetChainItem(EventTarget* aTarget); public: EventTargetChainItem() : mFlags(0) diff --git a/dom/events/EventStateManager.cpp b/dom/events/EventStateManager.cpp index a87184f247a2..b914325dd7f7 100644 --- a/dom/events/EventStateManager.cpp +++ b/dom/events/EventStateManager.cpp @@ -3544,7 +3544,7 @@ EventStateManager::SetCursor(int32_t aCursor, imgIContainer* aContainer, class MOZ_STACK_CLASS ESMEventCB : public EventDispatchingCallback { public: - ESMEventCB(nsIContent* aTarget) : mTarget(aTarget) {} + explicit ESMEventCB(nsIContent* aTarget) : mTarget(aTarget) {} virtual void HandleEvent(EventChainPostVisitor& aVisitor) { diff --git a/dom/events/IMEContentObserver.cpp b/dom/events/IMEContentObserver.cpp index 74fd89cf8ea2..5620004d9fe4 100644 --- a/dom/events/IMEContentObserver.cpp +++ b/dom/events/IMEContentObserver.cpp @@ -386,7 +386,7 @@ IMEContentObserver::NotifySelectionChanged(nsIDOMDocument* aDOMDocument, class PositionChangeEvent MOZ_FINAL : public nsRunnable { public: - PositionChangeEvent(IMEContentObserver* aDispatcher) + explicit PositionChangeEvent(IMEContentObserver* aDispatcher) : mDispatcher(aDispatcher) { MOZ_ASSERT(mDispatcher); @@ -1037,7 +1037,7 @@ IMEContentObserver::MaybeNotifyIMEOfPositionChange() class AsyncMergeableNotificationsFlusher : public nsRunnable { public: - AsyncMergeableNotificationsFlusher(IMEContentObserver* aIMEContentObserver) + explicit AsyncMergeableNotificationsFlusher(IMEContentObserver* aIMEContentObserver) : mIMEContentObserver(aIMEContentObserver) { MOZ_ASSERT(mIMEContentObserver); diff --git a/dom/events/IMEStateManager.cpp b/dom/events/IMEStateManager.cpp index ee627bb1cb14..da434a2b6ed3 100644 --- a/dom/events/IMEStateManager.cpp +++ b/dom/events/IMEStateManager.cpp @@ -746,7 +746,7 @@ IMEStateManager::GetNewIMEState(nsPresContext* aPresContext, // Helper class, used for IME enabled state change notification class IMEEnabledStateChangedEvent : public nsRunnable { public: - IMEEnabledStateChangedEvent(uint32_t aState) + explicit IMEEnabledStateChangedEvent(uint32_t aState) : mState(aState) { } diff --git a/dom/events/PaintRequest.h b/dom/events/PaintRequest.h index e1415dad780f..b22a51ca074c 100644 --- a/dom/events/PaintRequest.h +++ b/dom/events/PaintRequest.h @@ -21,7 +21,7 @@ class PaintRequest MOZ_FINAL : public nsIDOMPaintRequest , public nsWrapperCache { public: - PaintRequest(nsIDOMEvent* aParent) + explicit PaintRequest(nsIDOMEvent* aParent) : mParent(aParent) { mRequest.mFlags = 0; @@ -59,7 +59,7 @@ class PaintRequestList MOZ_FINAL : public nsISupports, public nsWrapperCache { public: - PaintRequestList(nsIDOMEvent *aParent) : mParent(aParent) + explicit PaintRequestList(nsIDOMEvent *aParent) : mParent(aParent) { SetIsDOMBinding(); } diff --git a/dom/filehandle/AsyncHelper.h b/dom/filehandle/AsyncHelper.h index 1fc63278e10d..8d70f77c62b5 100644 --- a/dom/filehandle/AsyncHelper.h +++ b/dom/filehandle/AsyncHelper.h @@ -33,7 +33,7 @@ public: AsyncWork(nsIRequestObserver* aObserver, nsISupports* aCtxt); protected: - AsyncHelper(nsISupports* aStream) + explicit AsyncHelper(nsISupports* aStream) : mStream(aStream), mStatus(NS_OK) { } diff --git a/dom/filehandle/FileHandle.cpp b/dom/filehandle/FileHandle.cpp index 9b1f0ffaff92..752c29c1c833 100644 --- a/dom/filehandle/FileHandle.cpp +++ b/dom/filehandle/FileHandle.cpp @@ -152,7 +152,7 @@ private: class AsyncFlusher : public AsyncHelper { public: - AsyncFlusher(nsISupports* aStream) + explicit AsyncFlusher(nsISupports* aStream) : AsyncHelper(aStream) { } protected: diff --git a/dom/filehandle/FileHandle.h b/dom/filehandle/FileHandle.h index 30228293610e..886b488c06ed 100644 --- a/dom/filehandle/FileHandle.h +++ b/dom/filehandle/FileHandle.h @@ -256,7 +256,7 @@ public: NS_DECL_NSIRUNNABLE private: - FinishHelper(FileHandleBase* aFileHandle); + explicit FinishHelper(FileHandleBase* aFileHandle); ~FinishHelper() { } diff --git a/dom/filehandle/FileService.h b/dom/filehandle/FileService.h index 026ad6ce4276..86c2a5e2bf30 100644 --- a/dom/filehandle/FileService.h +++ b/dom/filehandle/FileService.h @@ -92,7 +92,7 @@ private: private: inline - FileHandleQueue(FileHandleBase* aFileHandle); + explicit FileHandleQueue(FileHandleBase* aFileHandle); ~FileHandleQueue(); diff --git a/dom/filehandle/FileStreamWrappers.cpp b/dom/filehandle/FileStreamWrappers.cpp index 130f6e00f115..124da638ca90 100644 --- a/dom/filehandle/FileStreamWrappers.cpp +++ b/dom/filehandle/FileStreamWrappers.cpp @@ -50,7 +50,7 @@ public: NS_DECL_THREADSAFE_ISUPPORTS NS_DECL_NSIRUNNABLE - CloseRunnable(FileHelper* aFileHelper) + explicit CloseRunnable(FileHelper* aFileHelper) : mFileHelper(aFileHelper) { } @@ -66,7 +66,7 @@ public: NS_DECL_THREADSAFE_ISUPPORTS NS_DECL_NSIRUNNABLE - DestroyRunnable(FileHelper* aFileHelper) + explicit DestroyRunnable(FileHelper* aFileHelper) : mFileHelper(aFileHelper) { } diff --git a/dom/filesystem/CreateFileTask.cpp b/dom/filesystem/CreateFileTask.cpp index 2f3ef2479e86..518f024e4d60 100644 --- a/dom/filesystem/CreateFileTask.cpp +++ b/dom/filesystem/CreateFileTask.cpp @@ -150,7 +150,7 @@ CreateFileTask::Work() class AutoClose { public: - AutoClose(nsIOutputStream* aStream) + explicit AutoClose(nsIOutputStream* aStream) : mStream(aStream) { MOZ_ASSERT(aStream); diff --git a/dom/indexedDB/AsyncConnectionHelper.cpp b/dom/indexedDB/AsyncConnectionHelper.cpp index e546d8a5a34d..5ee6b272d1e6 100644 --- a/dom/indexedDB/AsyncConnectionHelper.cpp +++ b/dom/indexedDB/AsyncConnectionHelper.cpp @@ -41,7 +41,7 @@ class MOZ_STACK_CLASS TransactionPoolEventTarget : public StackBasedEventTarget public: NS_DECL_NSIEVENTTARGET - TransactionPoolEventTarget(IDBTransaction* aTransaction) + explicit TransactionPoolEventTarget(IDBTransaction* aTransaction) : mTransaction(aTransaction) { } diff --git a/dom/indexedDB/AsyncConnectionHelper.h b/dom/indexedDB/AsyncConnectionHelper.h index 7ec764ce6984..e39a654a1ae8 100644 --- a/dom/indexedDB/AsyncConnectionHelper.h +++ b/dom/indexedDB/AsyncConnectionHelper.h @@ -47,7 +47,7 @@ public: } protected: - HelperBase(IDBRequest* aRequest) + explicit HelperBase(IDBRequest* aRequest) : mRequest(aRequest) { } diff --git a/dom/indexedDB/IDBCursor.cpp b/dom/indexedDB/IDBCursor.cpp index 79ba37abfe30..ec985566ff1b 100644 --- a/dom/indexedDB/IDBCursor.cpp +++ b/dom/indexedDB/IDBCursor.cpp @@ -43,7 +43,7 @@ namespace { class CursorHelper : public AsyncConnectionHelper { public: - CursorHelper(IDBCursor* aCursor) + explicit CursorHelper(IDBCursor* aCursor) : AsyncConnectionHelper(aCursor->Transaction(), aCursor->Request()), mCursor(aCursor), mActor(nullptr) { diff --git a/dom/indexedDB/IDBDatabase.cpp b/dom/indexedDB/IDBDatabase.cpp index 8b393757c5fc..7fb922b8d486 100644 --- a/dom/indexedDB/IDBDatabase.cpp +++ b/dom/indexedDB/IDBDatabase.cpp @@ -52,7 +52,7 @@ namespace { class NoRequestDatabaseHelper : public AsyncConnectionHelper { public: - NoRequestDatabaseHelper(IDBTransaction* aTransaction) + explicit NoRequestDatabaseHelper(IDBTransaction* aTransaction) : AsyncConnectionHelper(aTransaction, nullptr) { NS_ASSERTION(IndexedDatabaseManager::IsMainProcess(), "Wrong process!"); diff --git a/dom/indexedDB/IDBEvents.h b/dom/indexedDB/IDBEvents.h index c429923100ad..af942d286d79 100644 --- a/dom/indexedDB/IDBEvents.h +++ b/dom/indexedDB/IDBEvents.h @@ -134,7 +134,7 @@ public: } protected: - IDBVersionChangeEvent(mozilla::dom::EventTarget* aOwner) + explicit IDBVersionChangeEvent(mozilla::dom::EventTarget* aOwner) : Event(aOwner, nullptr, nullptr) { SetIsDOMBinding(); diff --git a/dom/indexedDB/IDBFileRequest.h b/dom/indexedDB/IDBFileRequest.h index d7939d9b6e1a..70624b34a90b 100644 --- a/dom/indexedDB/IDBFileRequest.h +++ b/dom/indexedDB/IDBFileRequest.h @@ -65,7 +65,7 @@ public: IMPL_EVENT_HANDLER(progress) private: - IDBFileRequest(nsPIDOMWindow* aWindow); + explicit IDBFileRequest(nsPIDOMWindow* aWindow); ~IDBFileRequest(); void diff --git a/dom/indexedDB/TransactionThreadPool.cpp b/dom/indexedDB/TransactionThreadPool.cpp index 9d746ede8a10..6a59f5b3d997 100644 --- a/dom/indexedDB/TransactionThreadPool.cpp +++ b/dom/indexedDB/TransactionThreadPool.cpp @@ -456,7 +456,7 @@ TransactionThreadPool::AbortTransactionsForDatabase(IDBDatabase* aDatabase) struct MOZ_STACK_CLASS TransactionSearchInfo { - TransactionSearchInfo(nsIOfflineStorage* aDatabase) + explicit TransactionSearchInfo(nsIOfflineStorage* aDatabase) : db(aDatabase), found(false) { } diff --git a/dom/indexedDB/TransactionThreadPool.h b/dom/indexedDB/TransactionThreadPool.h index 549e1f0f13fa..4e90cc186fda 100644 --- a/dom/indexedDB/TransactionThreadPool.h +++ b/dom/indexedDB/TransactionThreadPool.h @@ -62,7 +62,7 @@ protected: NS_DECL_THREADSAFE_ISUPPORTS NS_DECL_NSIRUNNABLE - TransactionQueue(IDBTransaction* aTransaction); + explicit TransactionQueue(IDBTransaction* aTransaction); void Unblock(); @@ -84,7 +84,7 @@ protected: struct TransactionInfo { - TransactionInfo(IDBTransaction* aTransaction) + explicit TransactionInfo(IDBTransaction* aTransaction) { MOZ_COUNT_CTOR(TransactionInfo); diff --git a/dom/indexedDB/ipc/IndexedDBChild.cpp b/dom/indexedDB/ipc/IndexedDBChild.cpp index 266b737ee452..5f2754cd9ce5 100644 --- a/dom/indexedDB/ipc/IndexedDBChild.cpp +++ b/dom/indexedDB/ipc/IndexedDBChild.cpp @@ -103,7 +103,7 @@ public: class IPCDeleteDatabaseHelper : public AsyncConnectionHelper { public: - IPCDeleteDatabaseHelper(IDBRequest* aRequest) + explicit IPCDeleteDatabaseHelper(IDBRequest* aRequest) : AsyncConnectionHelper(static_cast(nullptr), aRequest) { } diff --git a/dom/mobilemessage/DeletedMessageInfo.h b/dom/mobilemessage/DeletedMessageInfo.h index 34749db2a24c..ed42382c968c 100644 --- a/dom/mobilemessage/DeletedMessageInfo.h +++ b/dom/mobilemessage/DeletedMessageInfo.h @@ -21,7 +21,7 @@ public: NS_DECL_ISUPPORTS NS_DECL_NSIDELETEDMESSAGEINFO - DeletedMessageInfo(const DeletedMessageInfoData& aData); + explicit DeletedMessageInfo(const DeletedMessageInfoData& aData); DeletedMessageInfo(int32_t* aMessageIds, uint32_t aMsgCount, diff --git a/dom/mobilemessage/MmsMessage.h b/dom/mobilemessage/MmsMessage.h index ab6c5845ecf6..2705c007e55c 100644 --- a/dom/mobilemessage/MmsMessage.h +++ b/dom/mobilemessage/MmsMessage.h @@ -58,7 +58,7 @@ public: uint64_t aExpiryDate, bool aReadReportRequested); - MmsMessage(const mobilemessage::MmsMessageData& aData); + explicit MmsMessage(const mobilemessage::MmsMessageData& aData); static nsresult Create(int32_t aId, uint64_t aThreadId, diff --git a/dom/mobilemessage/MobileMessageCallback.h b/dom/mobilemessage/MobileMessageCallback.h index d599a1be65cf..c3f46d6d0a83 100644 --- a/dom/mobilemessage/MobileMessageCallback.h +++ b/dom/mobilemessage/MobileMessageCallback.h @@ -22,7 +22,7 @@ public: NS_DECL_ISUPPORTS NS_DECL_NSIMOBILEMESSAGECALLBACK - MobileMessageCallback(DOMRequest* aDOMRequest); + explicit MobileMessageCallback(DOMRequest* aDOMRequest); private: ~MobileMessageCallback(); diff --git a/dom/mobilemessage/MobileMessageThread.h b/dom/mobilemessage/MobileMessageThread.h index 695031c34b80..af57a3b9c612 100644 --- a/dom/mobilemessage/MobileMessageThread.h +++ b/dom/mobilemessage/MobileMessageThread.h @@ -31,7 +31,7 @@ public: uint64_t aUnreadCount, mobilemessage::MessageType aLastMessageType); - MobileMessageThread(const ThreadData& aData); + explicit MobileMessageThread(const ThreadData& aData); static nsresult Create(uint64_t aId, const JS::Value& aParticipants, diff --git a/dom/mobilemessage/SmsMessage.h b/dom/mobilemessage/SmsMessage.h index 35cca14302ff..44e842c5066d 100644 --- a/dom/mobilemessage/SmsMessage.h +++ b/dom/mobilemessage/SmsMessage.h @@ -35,7 +35,7 @@ public: uint64_t aDeliveryTimestamp, bool aRead); - SmsMessage(const mobilemessage::SmsMessageData& aData); + explicit SmsMessage(const mobilemessage::SmsMessageData& aData); static nsresult Create(int32_t aId, uint64_t aThreadId, diff --git a/dom/network/UDPSocket.cpp b/dom/network/UDPSocket.cpp index a01449630d81..2719fff31fd0 100644 --- a/dom/network/UDPSocket.cpp +++ b/dom/network/UDPSocket.cpp @@ -497,7 +497,7 @@ UDPSocket::Init(const nsString& aLocalAddress, class OpenSocketRunnable MOZ_FINAL : public nsRunnable { public: - OpenSocketRunnable(UDPSocket* aSocket) : mSocket(aSocket) + explicit OpenSocketRunnable(UDPSocket* aSocket) : mSocket(aSocket) { } NS_IMETHOD Run() MOZ_OVERRIDE diff --git a/dom/notification/DesktopNotification.cpp b/dom/notification/DesktopNotification.cpp index 9ce200df2311..9d9f729b2c30 100644 --- a/dom/notification/DesktopNotification.cpp +++ b/dom/notification/DesktopNotification.cpp @@ -33,8 +33,8 @@ public: NS_DECL_ISUPPORTS_INHERITED NS_DECL_NSICONTENTPERMISSIONREQUEST - DesktopNotificationRequest(DesktopNotification* notification) - : mDesktopNotification(notification) {} + explicit DesktopNotificationRequest(DesktopNotification* aNotification) + : mDesktopNotification(aNotification) {} NS_IMETHOD Run() MOZ_OVERRIDE { diff --git a/dom/notification/Notification.cpp b/dom/notification/Notification.cpp index 7fbabfa3186a..0117c756fb81 100644 --- a/dom/notification/Notification.cpp +++ b/dom/notification/Notification.cpp @@ -184,7 +184,7 @@ public: NS_DECL_ISUPPORTS NS_DECL_NSIOBSERVER - NotificationObserver(Notification* aNotification) + explicit NotificationObserver(Notification* aNotification) : mNotification(aNotification) {} protected: diff --git a/dom/plugins/base/nsJSNPRuntime.cpp b/dom/plugins/base/nsJSNPRuntime.cpp index 73bcde3ae970..c2312ed68207 100644 --- a/dom/plugins/base/nsJSNPRuntime.cpp +++ b/dom/plugins/base/nsJSNPRuntime.cpp @@ -101,8 +101,8 @@ NPObjectIsOutOfProcessProxy(NPObject *obj) class AutoJSExceptionReporter { public: - AutoJSExceptionReporter(JSContext *cx) - : mCx(cx) + explicit AutoJSExceptionReporter(JSContext* aCx) + : mCx(aCx) { } diff --git a/dom/plugins/base/nsNPAPIPlugin.h b/dom/plugins/base/nsNPAPIPlugin.h index 29edc92b0db8..835b1d2978b7 100644 --- a/dom/plugins/base/nsNPAPIPlugin.h +++ b/dom/plugins/base/nsNPAPIPlugin.h @@ -380,13 +380,13 @@ class MOZ_STACK_CLASS NPPAutoPusher : public NPPStack, protected PluginDestructionGuard { public: - NPPAutoPusher(NPP npp) - : PluginDestructionGuard(npp), + explicit NPPAutoPusher(NPP aNpp) + : PluginDestructionGuard(aNpp), mOldNPP(sCurrentNPP) { - NS_ASSERTION(npp, "Uh, null npp passed to NPPAutoPusher!"); + NS_ASSERTION(aNpp, "Uh, null aNpp passed to NPPAutoPusher!"); - sCurrentNPP = npp; + sCurrentNPP = aNpp; } ~NPPAutoPusher() diff --git a/dom/plugins/base/nsNPAPIPluginInstance.cpp b/dom/plugins/base/nsNPAPIPluginInstance.cpp index f3193010845d..16bd81d0fd8e 100644 --- a/dom/plugins/base/nsNPAPIPluginInstance.cpp +++ b/dom/plugins/base/nsNPAPIPluginInstance.cpp @@ -1153,7 +1153,7 @@ nsNPAPIPluginInstance::IsWindowless(bool* isWindowless) class MOZ_STACK_CLASS AutoPluginLibraryCall { public: - AutoPluginLibraryCall(nsNPAPIPluginInstance* aThis) + explicit AutoPluginLibraryCall(nsNPAPIPluginInstance* aThis) : mThis(aThis), mGuard(aThis), mLibrary(nullptr) { nsNPAPIPlugin* plugin = mThis->GetPlugin(); @@ -1669,7 +1669,7 @@ class CarbonEventModelFailureEvent : public nsRunnable { public: nsCOMPtr mContent; - CarbonEventModelFailureEvent(nsIContent* aContent) + explicit CarbonEventModelFailureEvent(nsIContent* aContent) : mContent(aContent) {} diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp index 2af95851f8e2..0a2cda477379 100644 --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -3634,7 +3634,7 @@ class nsPluginDestroyRunnable : public nsRunnable, public PRCList { public: - nsPluginDestroyRunnable(nsNPAPIPluginInstance *aInstance) + explicit nsPluginDestroyRunnable(nsNPAPIPluginInstance *aInstance) : mInstance(aInstance) { PR_INIT_CLIST(this); diff --git a/dom/plugins/base/nsPluginInstanceOwner.cpp b/dom/plugins/base/nsPluginInstanceOwner.cpp index a1edf28dd587..c32c55c346e0 100644 --- a/dom/plugins/base/nsPluginInstanceOwner.cpp +++ b/dom/plugins/base/nsPluginInstanceOwner.cpp @@ -102,7 +102,7 @@ class nsPluginDOMContextMenuListener : public nsIDOMEventListener virtual ~nsPluginDOMContextMenuListener(); public: - nsPluginDOMContextMenuListener(nsIContent* aContent); + explicit nsPluginDOMContextMenuListener(nsIContent* aContent); NS_DECL_ISUPPORTS NS_DECL_NSIDOMEVENTLISTENER diff --git a/dom/plugins/base/nsPluginStreamListenerPeer.cpp b/dom/plugins/base/nsPluginStreamListenerPeer.cpp index 844725ea28a5..26ed12fc8516 100644 --- a/dom/plugins/base/nsPluginStreamListenerPeer.cpp +++ b/dom/plugins/base/nsPluginStreamListenerPeer.cpp @@ -38,7 +38,7 @@ class nsPluginByteRangeStreamListener , public nsIInterfaceRequestor { public: - nsPluginByteRangeStreamListener(nsIWeakReference* aWeakPtr); + explicit nsPluginByteRangeStreamListener(nsIWeakReference* aWeakPtr); NS_DECL_ISUPPORTS NS_DECL_NSIREQUESTOBSERVER diff --git a/dom/plugins/base/nsPluginStreamListenerPeer.h b/dom/plugins/base/nsPluginStreamListenerPeer.h index c9e7ecf140b7..c940329676d4 100644 --- a/dom/plugins/base/nsPluginStreamListenerPeer.h +++ b/dom/plugins/base/nsPluginStreamListenerPeer.h @@ -30,7 +30,7 @@ class nsIChannel; class CachedFileHolder { public: - CachedFileHolder(nsIFile* cacheFile); + explicit CachedFileHolder(nsIFile* cacheFile); ~CachedFileHolder(); void AddRef(); diff --git a/dom/plugins/base/nsPluginsDirDarwin.cpp b/dom/plugins/base/nsPluginsDirDarwin.cpp index f33e233ccd60..67ed1c35f862 100644 --- a/dom/plugins/base/nsPluginsDirDarwin.cpp +++ b/dom/plugins/base/nsPluginsDirDarwin.cpp @@ -117,9 +117,9 @@ static char* CFStringRefToUTF8Buffer(CFStringRef cfString) class AutoCFTypeObject { public: - AutoCFTypeObject(CFTypeRef object) + explicit AutoCFTypeObject(CFTypeRef aObject) { - mObject = object; + mObject = aObject; } ~AutoCFTypeObject() { diff --git a/dom/plugins/ipc/PluginBackgroundDestroyer.h b/dom/plugins/ipc/PluginBackgroundDestroyer.h index 761c32cc5e9a..96d3c248be93 100644 --- a/dom/plugins/ipc/PluginBackgroundDestroyer.h +++ b/dom/plugins/ipc/PluginBackgroundDestroyer.h @@ -25,7 +25,7 @@ namespace plugins { */ class PluginBackgroundDestroyerParent : public PPluginBackgroundDestroyerParent { public: - PluginBackgroundDestroyerParent(gfxASurface* aDyingBackground); + explicit PluginBackgroundDestroyerParent(gfxASurface* aDyingBackground); virtual ~PluginBackgroundDestroyerParent(); diff --git a/dom/plugins/ipc/PluginInstanceParent.cpp b/dom/plugins/ipc/PluginInstanceParent.cpp index d4f771dac7af..d426bb3aca7a 100644 --- a/dom/plugins/ipc/PluginInstanceParent.cpp +++ b/dom/plugins/ipc/PluginInstanceParent.cpp @@ -349,7 +349,7 @@ PluginInstanceParent::AnswerNPN_SetValue_NPPVpluginUsesDOMForCursor( class NotificationSink : public CompositionNotifySink { public: - NotificationSink(PluginInstanceParent *aInstance) : mInstance(aInstance) + explicit NotificationSink(PluginInstanceParent* aInstance) : mInstance(aInstance) { } virtual void DidComposite() { mInstance->DidComposite(); } diff --git a/dom/plugins/ipc/PluginInterposeOSX.mm b/dom/plugins/ipc/PluginInterposeOSX.mm index f43192bbd6d4..c6f9b23aa0f2 100644 --- a/dom/plugins/ipc/PluginInterposeOSX.mm +++ b/dom/plugins/ipc/PluginInterposeOSX.mm @@ -743,10 +743,10 @@ void NotifyBrowserOfPopCursor() struct WindowInfo { uint32_t window_id; CGRect bounds; - WindowInfo(NSWindow* window) { - NSInteger window_num = [window windowNumber]; + explicit WindowInfo(NSWindow* aWindow) { + NSInteger window_num = [aWindow windowNumber]; window_id = window_num > 0 ? window_num : 0; - bounds = NSRectToCGRect([window frame]); + bounds = NSRectToCGRect([aWindow frame]); } }; diff --git a/dom/plugins/ipc/PluginModuleParent.h b/dom/plugins/ipc/PluginModuleParent.h index 621040c6a101..7d8a335add00 100644 --- a/dom/plugins/ipc/PluginModuleParent.h +++ b/dom/plugins/ipc/PluginModuleParent.h @@ -87,7 +87,7 @@ protected: public: // aFilePath is UTF8, not native! - PluginModuleParent(const char* aFilePath); + explicit PluginModuleParent(const char* aFilePath); virtual ~PluginModuleParent(); virtual void SetPlugin(nsNPAPIPlugin* plugin) MOZ_OVERRIDE diff --git a/dom/plugins/ipc/PluginProcessChild.h b/dom/plugins/ipc/PluginProcessChild.h index 66641e16dea5..c3a3b76aa50a 100644 --- a/dom/plugins/ipc/PluginProcessChild.h +++ b/dom/plugins/ipc/PluginProcessChild.h @@ -19,7 +19,7 @@ protected: typedef mozilla::ipc::ProcessChild ProcessChild; public: - PluginProcessChild(ProcessHandle parentHandle) : ProcessChild(parentHandle) + explicit PluginProcessChild(ProcessHandle aParentHandle) : ProcessChild(aParentHandle) { } virtual ~PluginProcessChild() diff --git a/dom/plugins/ipc/PluginProcessParent.h b/dom/plugins/ipc/PluginProcessParent.h index ce0cd092f2ad..3383621e301d 100644 --- a/dom/plugins/ipc/PluginProcessParent.h +++ b/dom/plugins/ipc/PluginProcessParent.h @@ -25,7 +25,7 @@ namespace plugins { class PluginProcessParent : public mozilla::ipc::GeckoChildProcessHost { public: - PluginProcessParent(const std::string& aPluginFilePath); + explicit PluginProcessParent(const std::string& aPluginFilePath); ~PluginProcessParent(); /** diff --git a/dom/plugins/ipc/PluginScriptableObjectParent.h b/dom/plugins/ipc/PluginScriptableObjectParent.h index 1e685e61f718..419ab9dacec5 100644 --- a/dom/plugins/ipc/PluginScriptableObjectParent.h +++ b/dom/plugins/ipc/PluginScriptableObjectParent.h @@ -36,7 +36,7 @@ class PluginScriptableObjectParent : public PPluginScriptableObjectParent friend class PluginInstanceParent; public: - PluginScriptableObjectParent(ScriptableObjectType aType); + explicit PluginScriptableObjectParent(ScriptableObjectType aType); virtual ~PluginScriptableObjectParent(); void diff --git a/dom/plugins/ipc/PluginScriptableObjectUtils.h b/dom/plugins/ipc/PluginScriptableObjectUtils.h index 8ae19a27dada..55917e81da77 100644 --- a/dom/plugins/ipc/PluginScriptableObjectUtils.h +++ b/dom/plugins/ipc/PluginScriptableObjectUtils.h @@ -258,7 +258,7 @@ template > class ProtectedActor { public: - ProtectedActor(ActorType* aActor) : mActor(aActor) + explicit ProtectedActor(ActorType* aActor) : mActor(aActor) { if (!Traits::Nullable()) { NS_ASSERTION(mActor, "This should never be null!"); diff --git a/dom/promise/Promise.cpp b/dom/promise/Promise.cpp index a7cd78520d10..b72a68bed667 100644 --- a/dom/promise/Promise.cpp +++ b/dom/promise/Promise.cpp @@ -41,7 +41,7 @@ NS_IMPL_ISUPPORTS0(PromiseNativeHandler) class PromiseTask MOZ_FINAL : public nsRunnable { public: - PromiseTask(Promise* aPromise) + explicit PromiseTask(Promise* aPromise) : mPromise(aPromise) { MOZ_ASSERT(aPromise); diff --git a/dom/quota/QuotaManager.cpp b/dom/quota/QuotaManager.cpp index 74813d55d1c0..26d2e3cb7f6d 100644 --- a/dom/quota/QuotaManager.cpp +++ b/dom/quota/QuotaManager.cpp @@ -341,7 +341,7 @@ class ResetOrClearRunnable MOZ_FINAL : public nsRunnable, public: NS_DECL_ISUPPORTS_INHERITED - ResetOrClearRunnable(bool aClear) + explicit ResetOrClearRunnable(bool aClear) : mCallbackState(Pending), mClear(aClear) { } @@ -412,7 +412,7 @@ class FinalizeOriginEvictionRunnable MOZ_FINAL : public nsRunnable }; public: - FinalizeOriginEvictionRunnable(nsTArray& aOrigins) + explicit FinalizeOriginEvictionRunnable(nsTArray& aOrigins) : mCallbackState(Pending) { mOrigins.SwapElements(aOrigins); @@ -504,7 +504,7 @@ bool gTestingEnabled = false; class WaitForTransactionsToFinishRunnable MOZ_FINAL : public nsRunnable { public: - WaitForTransactionsToFinishRunnable(SynchronizedOp* aOp) + explicit WaitForTransactionsToFinishRunnable(SynchronizedOp* aOp) : mOp(aOp), mCountdown(1) { NS_ASSERTION(mOp, "Why don't we have a runnable?"); diff --git a/dom/quota/StorageMatcher.h b/dom/quota/StorageMatcher.h index 69b3fff67ed9..663269bd28de 100644 --- a/dom/quota/StorageMatcher.h +++ b/dom/quota/StorageMatcher.h @@ -21,7 +21,7 @@ class StorageMatcher : public ValueType struct Closure { - Closure(SelfType& aSelf) + explicit Closure(SelfType& aSelf) : mSelf(aSelf), mPattern(EmptyCString()), mIndexes(nullptr) { } diff --git a/dom/smil/nsSMILTimedElement.cpp b/dom/smil/nsSMILTimedElement.cpp index 7f51987d3da2..7af56886988f 100644 --- a/dom/smil/nsSMILTimedElement.cpp +++ b/dom/smil/nsSMILTimedElement.cpp @@ -122,7 +122,7 @@ namespace class MOZ_STACK_CLASS nsSMILTimedElement::AutoIntervalUpdateBatcher { public: - AutoIntervalUpdateBatcher(nsSMILTimedElement& aTimedElement) + explicit AutoIntervalUpdateBatcher(nsSMILTimedElement& aTimedElement) : mTimedElement(aTimedElement), mDidSetFlag(!aTimedElement.mDeferIntervalUpdates) { @@ -160,7 +160,7 @@ private: class MOZ_STACK_CLASS nsSMILTimedElement::AutoIntervalUpdater { public: - AutoIntervalUpdater(nsSMILTimedElement& aTimedElement) + explicit AutoIntervalUpdater(nsSMILTimedElement& aTimedElement) : mTimedElement(aTimedElement) { } ~AutoIntervalUpdater() @@ -471,7 +471,7 @@ namespace class MOZ_STACK_CLASS RemoveByCreator { public: - RemoveByCreator(const nsSMILTimeValueSpec* aCreator) : mCreator(aCreator) + explicit RemoveByCreator(const nsSMILTimeValueSpec* aCreator) : mCreator(aCreator) { } bool operator()(nsSMILInstanceTime* aInstanceTime, uint32_t /*aIndex*/) @@ -1338,7 +1338,7 @@ namespace class MOZ_STACK_CLASS RemoveByFunction { public: - RemoveByFunction(nsSMILTimedElement::RemovalTestFunction aFunction) + explicit RemoveByFunction(nsSMILTimedElement::RemovalTestFunction aFunction) : mFunction(aFunction) { } bool operator()(nsSMILInstanceTime* aInstanceTime, uint32_t /*aIndex*/) { @@ -1416,7 +1416,7 @@ namespace class MOZ_STACK_CLASS RemoveReset { public: - RemoveReset(const nsSMILInstanceTime* aCurrentIntervalBegin) + explicit RemoveReset(const nsSMILInstanceTime* aCurrentIntervalBegin) : mCurrentIntervalBegin(aCurrentIntervalBegin) { } bool operator()(nsSMILInstanceTime* aInstanceTime, uint32_t /*aIndex*/) { @@ -1614,7 +1614,7 @@ namespace class MOZ_STACK_CLASS RemoveFiltered { public: - RemoveFiltered(nsSMILTimeValue aCutoff) : mCutoff(aCutoff) { } + explicit RemoveFiltered(nsSMILTimeValue aCutoff) : mCutoff(aCutoff) { } bool operator()(nsSMILInstanceTime* aInstanceTime, uint32_t /*aIndex*/) { // We can filter instance times that: diff --git a/dom/telephony/CallsList.h b/dom/telephony/CallsList.h index 0b3236b4a215..64e4993ec871 100644 --- a/dom/telephony/CallsList.h +++ b/dom/telephony/CallsList.h @@ -24,7 +24,7 @@ public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CallsList) - CallsList(Telephony* aTelephony, TelephonyCallGroup* aGroup = nullptr); + explicit CallsList(Telephony* aTelephony, TelephonyCallGroup* aGroup = nullptr); nsPIDOMWindow* GetParentObject() const; diff --git a/dom/telephony/Telephony.cpp b/dom/telephony/Telephony.cpp index 286fab477c23..8bacfb523432 100644 --- a/dom/telephony/Telephony.cpp +++ b/dom/telephony/Telephony.cpp @@ -39,7 +39,7 @@ public: NS_DECL_ISUPPORTS NS_FORWARD_SAFE_NSITELEPHONYLISTENER(mTelephony) - Listener(Telephony* aTelephony) + explicit Listener(Telephony* aTelephony) : mTelephony(aTelephony) { MOZ_ASSERT(mTelephony); diff --git a/dom/telephony/ipc/TelephonyChild.h b/dom/telephony/ipc/TelephonyChild.h index daa6a70d3480..7c05bae67d82 100644 --- a/dom/telephony/ipc/TelephonyChild.h +++ b/dom/telephony/ipc/TelephonyChild.h @@ -18,7 +18,7 @@ class TelephonyIPCService; class TelephonyChild : public PTelephonyChild { public: - TelephonyChild(TelephonyIPCService* aService); + explicit TelephonyChild(TelephonyIPCService* aService); protected: virtual ~TelephonyChild(); diff --git a/dom/workers/DataStore.h b/dom/workers/DataStore.h index 927d1cd8ab61..182c56336f60 100644 --- a/dom/workers/DataStore.h +++ b/dom/workers/DataStore.h @@ -33,7 +33,7 @@ class WorkerDataStore MOZ_FINAL : public DOMEventTargetHelper public: NS_DECL_ISUPPORTS_INHERITED - WorkerDataStore(WorkerGlobalScope* aScope); + explicit WorkerDataStore(WorkerGlobalScope* aScope); // WebIDL (internal functions) @@ -137,4 +137,4 @@ private: } //namespace dom } //namespace mozilla -#endif \ No newline at end of file +#endif diff --git a/dom/workers/DataStoreCursor.h b/dom/workers/DataStoreCursor.h index e34d8685e9c2..14114b5d2a0a 100644 --- a/dom/workers/DataStoreCursor.h +++ b/dom/workers/DataStoreCursor.h @@ -28,7 +28,7 @@ public: NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(WorkerDataStoreCursor) NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(WorkerDataStoreCursor) - WorkerDataStoreCursor(WorkerDataStore* aWorkerStore); + explicit WorkerDataStoreCursor(WorkerDataStore* aWorkerStore); // WebIDL (internal functions) @@ -65,4 +65,4 @@ private: } //namespace dom } //namespace mozilla -#endif \ No newline at end of file +#endif diff --git a/dom/workers/Performance.h b/dom/workers/Performance.h index d2e8ecf7e89e..d83f14886063 100644 --- a/dom/workers/Performance.h +++ b/dom/workers/Performance.h @@ -22,7 +22,7 @@ public: NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(Performance) NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(Performance) - Performance(WorkerPrivate* aWorkerPrivate); + explicit Performance(WorkerPrivate* aWorkerPrivate); private: ~Performance(); diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp index 96f4a583d59f..712ae1ac9b3a 100644 --- a/dom/workers/RuntimeService.cpp +++ b/dom/workers/RuntimeService.cpp @@ -918,7 +918,7 @@ class WorkerBackgroundChildCallback MOZ_FINAL : bool* mDone; public: - WorkerBackgroundChildCallback(bool* aDone) + explicit WorkerBackgroundChildCallback(bool* aDone) : mDone(aDone) { MOZ_ASSERT(!NS_IsMainThread()); @@ -955,7 +955,7 @@ class WorkerThreadPrimaryRunnable MOZ_FINAL : public nsRunnable nsRefPtr mThread; public: - FinishedRunnable(already_AddRefed aThread) + explicit FinishedRunnable(already_AddRefed aThread) : mThread(aThread) { MOZ_ASSERT(mThread); @@ -1034,7 +1034,7 @@ class RuntimeService::WorkerThread MOZ_FINAL : public nsThread WorkerPrivate* mWorkerPrivate; public: - Observer(WorkerPrivate* aWorkerPrivate) + explicit Observer(WorkerPrivate* aWorkerPrivate) : mWorkerPrivate(aWorkerPrivate) { MOZ_ASSERT(aWorkerPrivate); diff --git a/dom/workers/RuntimeService.h b/dom/workers/RuntimeService.h index 3f6597bd9fa6..205a744a24d0 100644 --- a/dom/workers/RuntimeService.h +++ b/dom/workers/RuntimeService.h @@ -78,7 +78,7 @@ private: WorkerPrivate* mWorkerPrivate; SharedWorkerInfo* mSharedWorkerInfo; - MatchSharedWorkerInfo(WorkerPrivate* aWorkerPrivate) + explicit MatchSharedWorkerInfo(WorkerPrivate* aWorkerPrivate) : mWorkerPrivate(aWorkerPrivate), mSharedWorkerInfo(nullptr) { } }; diff --git a/dom/workers/ServiceWorkerEvents.h b/dom/workers/ServiceWorkerEvents.h index 5fdfd4d34f32..ff366a33e5e0 100644 --- a/dom/workers/ServiceWorkerEvents.h +++ b/dom/workers/ServiceWorkerEvents.h @@ -28,7 +28,7 @@ class InstallPhaseEvent : public Event nsRefPtr mPromise; protected: - InstallPhaseEvent(mozilla::dom::EventTarget* aOwner); + explicit InstallPhaseEvent(mozilla::dom::EventTarget* aOwner); ~InstallPhaseEvent() {} public: @@ -80,7 +80,7 @@ class InstallEvent MOZ_FINAL : public InstallPhaseEvent nsRefPtr mActiveWorker; protected: - InstallEvent(mozilla::dom::EventTarget* aOwner); + explicit InstallEvent(mozilla::dom::EventTarget* aOwner); ~InstallEvent() {} public: diff --git a/dom/workers/ServiceWorkerManager.cpp b/dom/workers/ServiceWorkerManager.cpp index cce9aaf451fd..f098f30ae0bd 100644 --- a/dom/workers/ServiceWorkerManager.cpp +++ b/dom/workers/ServiceWorkerManager.cpp @@ -203,7 +203,7 @@ class FinishFetchOnMainThreadRunnable : public nsRunnable { nsMainThreadPtrHandle mUpdateInstance; public: - FinishFetchOnMainThreadRunnable + explicit FinishFetchOnMainThreadRunnable (const nsMainThreadPtrHandle& aUpdateInstance) : mUpdateInstance(aUpdateInstance) { } @@ -1213,7 +1213,7 @@ class FinishActivationRunnable : public nsRunnable nsMainThreadPtrHandle mRegistration; public: - FinishActivationRunnable(const nsMainThreadPtrHandle& aRegistration) + explicit FinishActivationRunnable(const nsMainThreadPtrHandle& aRegistration) : mRegistration(aRegistration) { MOZ_ASSERT(!NS_IsMainThread()); @@ -1300,7 +1300,7 @@ class FinishActivateHandler : public PromiseNativeHandler nsMainThreadPtrHandle mRegistration; public: - FinishActivateHandler(const nsMainThreadPtrHandle& aRegistration) + explicit FinishActivateHandler(const nsMainThreadPtrHandle& aRegistration) : mRegistration(aRegistration) { MOZ_ASSERT(!NS_IsMainThread()); diff --git a/dom/workers/URL.cpp b/dom/workers/URL.cpp index 9a44abb0fc8a..c35fe57733c5 100644 --- a/dom/workers/URL.cpp +++ b/dom/workers/URL.cpp @@ -31,7 +31,7 @@ class URLProxy MOZ_FINAL public: NS_INLINE_DECL_THREADSAFE_REFCOUNTING(URLProxy) - URLProxy(mozilla::dom::URL* aURL) + explicit URLProxy(mozilla::dom::URL* aURL) : mURL(aURL) { AssertIsOnMainThread(); @@ -265,7 +265,7 @@ public: class TeardownURLRunnable : public nsRunnable { public: - TeardownURLRunnable(URLProxy* aURLProxy) + explicit TeardownURLRunnable(URLProxy* aURLProxy) : mURLProxy(aURLProxy) { } diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index 5fca2d0c1d7d..7c4063d4d4b2 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -35,6 +35,7 @@ #include "js/OldDebugAPI.h" #include "js/MemoryMetrics.h" #include "mozilla/Assertions.h" +#include "mozilla/Attributes.h" #include "mozilla/ContentEvents.h" #include "mozilla/EventDispatcher.h" #include "mozilla/Likely.h" @@ -223,7 +224,7 @@ struct WindowAction nsPIDOMWindow* mWindow; bool mDefaultAction; - WindowAction(nsPIDOMWindow* aWindow) + MOZ_IMPLICIT WindowAction(nsPIDOMWindow* aWindow) : mWindow(aWindow), mDefaultAction(true) { } @@ -773,7 +774,7 @@ class TopLevelWorkerFinishedRunnable MOZ_FINAL : public nsRunnable WorkerPrivate* mFinishedWorker; public: - TopLevelWorkerFinishedRunnable(WorkerPrivate* aFinishedWorker) + explicit TopLevelWorkerFinishedRunnable(WorkerPrivate* aFinishedWorker) : mFinishedWorker(aFinishedWorker) { aFinishedWorker->AssertIsOnWorkerThread(); @@ -847,7 +848,7 @@ private: class CompileScriptRunnable MOZ_FINAL : public WorkerRunnable { public: - CompileScriptRunnable(WorkerPrivate* aWorkerPrivate) + explicit CompileScriptRunnable(WorkerPrivate* aWorkerPrivate) : WorkerRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount) { } @@ -874,7 +875,7 @@ private: class CloseEventRunnable MOZ_FINAL : public WorkerRunnable { public: - CloseEventRunnable(WorkerPrivate* aWorkerPrivate) + explicit CloseEventRunnable(WorkerPrivate* aWorkerPrivate) : WorkerRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount) { } @@ -1091,7 +1092,7 @@ private: class CloseRunnable MOZ_FINAL : public WorkerControlRunnable { public: - CloseRunnable(WorkerPrivate* aWorkerPrivate) + explicit CloseRunnable(WorkerPrivate* aWorkerPrivate) : WorkerControlRunnable(aWorkerPrivate, ParentThreadUnchangedBusyCount) { } @@ -1108,7 +1109,7 @@ private: class SuspendRunnable MOZ_FINAL : public WorkerControlRunnable { public: - SuspendRunnable(WorkerPrivate* aWorkerPrivate) + explicit SuspendRunnable(WorkerPrivate* aWorkerPrivate) : WorkerControlRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount) { } @@ -1123,7 +1124,7 @@ private: class ResumeRunnable MOZ_FINAL : public WorkerControlRunnable { public: - ResumeRunnable(WorkerPrivate* aWorkerPrivate) + explicit ResumeRunnable(WorkerPrivate* aWorkerPrivate) : WorkerControlRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount) { } @@ -1332,7 +1333,7 @@ private: class TimerRunnable MOZ_FINAL : public WorkerRunnable { public: - TimerRunnable(WorkerPrivate* aWorkerPrivate) + explicit TimerRunnable(WorkerPrivate* aWorkerPrivate) : WorkerRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount) { } @@ -1425,7 +1426,7 @@ class KillCloseEventRunnable MOZ_FINAL : public WorkerRunnable class KillScriptRunnable MOZ_FINAL : public WorkerControlRunnable { public: - KillScriptRunnable(WorkerPrivate* aWorkerPrivate) + explicit KillScriptRunnable(WorkerPrivate* aWorkerPrivate) : WorkerControlRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount) { } @@ -1453,7 +1454,7 @@ class KillCloseEventRunnable MOZ_FINAL : public WorkerRunnable }; public: - KillCloseEventRunnable(WorkerPrivate* aWorkerPrivate) + explicit KillCloseEventRunnable(WorkerPrivate* aWorkerPrivate) : WorkerRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount) { } @@ -1690,7 +1691,7 @@ class WorkerJSRuntimeStats : public JS::RuntimeStats const nsACString& mRtPath; public: - WorkerJSRuntimeStats(const nsACString& aRtPath) + explicit WorkerJSRuntimeStats(const nsACString& aRtPath) : JS::RuntimeStats(JsWorkerMallocSizeOf), mRtPath(aRtPath) { } @@ -1872,7 +1873,7 @@ class WorkerPrivateParent::EventTarget MOZ_FINAL nsCOMPtr mNestedEventTarget; public: - EventTarget(WorkerPrivate* aWorkerPrivate) + explicit EventTarget(WorkerPrivate* aWorkerPrivate) : mMutex("WorkerPrivateParent::EventTarget::mMutex"), mWorkerPrivate(aWorkerPrivate), mWeakNestedEventTarget(nullptr) { @@ -1963,7 +1964,7 @@ class WorkerPrivate::MemoryReporter MOZ_FINAL : public nsIMemoryReporter bool mAlreadyMappedToAddon; public: - MemoryReporter(WorkerPrivate* aWorkerPrivate) + explicit MemoryReporter(WorkerPrivate* aWorkerPrivate) : mMutex(aWorkerPrivate->mMutex), mWorkerPrivate(aWorkerPrivate), mAlreadyMappedToAddon(false) { @@ -2414,7 +2415,7 @@ WorkerPrivateParent::Suspend(JSContext* aCx, nsPIDOMWindow* aWindow) nsPIDOMWindow* mWindow; bool mAllSuspended; - Closure(nsPIDOMWindow* aWindow) + explicit Closure(nsPIDOMWindow* aWindow) : mWindow(aWindow), mAllSuspended(true) { AssertIsOnMainThread(); @@ -2498,7 +2499,7 @@ WorkerPrivateParent::Resume(JSContext* aCx, nsPIDOMWindow* aWindow) nsPIDOMWindow* mWindow; bool mAnyRunning; - Closure(nsPIDOMWindow* aWindow) + explicit Closure(nsPIDOMWindow* aWindow) : mWindow(aWindow), mAnyRunning(false) { AssertIsOnMainThread(); @@ -3249,7 +3250,7 @@ WorkerPrivateParent::CloseSharedWorkersForWindow( nsPIDOMWindow* mWindow; nsAutoTArray, 10> mSharedWorkers; - Closure(nsPIDOMWindow* aWindow) + explicit Closure(nsPIDOMWindow* aWindow) : mWindow(aWindow) { AssertIsOnMainThread(); diff --git a/dom/workers/WorkerScope.h b/dom/workers/WorkerScope.h index 3be02ad5752f..ea4918d5805b 100644 --- a/dom/workers/WorkerScope.h +++ b/dom/workers/WorkerScope.h @@ -36,7 +36,7 @@ class WorkerGlobalScope : public DOMEventTargetHelper, protected: WorkerPrivate* mWorkerPrivate; - WorkerGlobalScope(WorkerPrivate* aWorkerPrivate); + explicit WorkerGlobalScope(WorkerPrivate* aWorkerPrivate); virtual ~WorkerGlobalScope(); public: @@ -126,7 +126,7 @@ class DedicatedWorkerGlobalScope MOZ_FINAL : public WorkerGlobalScope ~DedicatedWorkerGlobalScope() { } public: - DedicatedWorkerGlobalScope(WorkerPrivate* aWorkerPrivate); + explicit DedicatedWorkerGlobalScope(WorkerPrivate* aWorkerPrivate); virtual JSObject* WrapGlobalObject(JSContext* aCx) MOZ_OVERRIDE; diff --git a/dom/workers/XMLHttpRequest.cpp b/dom/workers/XMLHttpRequest.cpp index 111d3046b096..bc94c7f60cf2 100644 --- a/dom/workers/XMLHttpRequest.cpp +++ b/dom/workers/XMLHttpRequest.cpp @@ -292,7 +292,7 @@ class AsyncTeardownRunnable MOZ_FINAL : public nsRunnable nsRefPtr mProxy; public: - AsyncTeardownRunnable(Proxy* aProxy) + explicit AsyncTeardownRunnable(Proxy* aProxy) : mProxy(aProxy) { MOZ_ASSERT(aProxy); @@ -868,7 +868,7 @@ class AutoUnpinXHR XMLHttpRequest* mXMLHttpRequestPrivate; public: - AutoUnpinXHR(XMLHttpRequest* aXMLHttpRequestPrivate) + explicit AutoUnpinXHR(XMLHttpRequest* aXMLHttpRequestPrivate) : mXMLHttpRequestPrivate(aXMLHttpRequestPrivate) { MOZ_ASSERT(aXMLHttpRequestPrivate); diff --git a/dom/workers/XMLHttpRequest.h b/dom/workers/XMLHttpRequest.h index 100f5fad1260..ae22ce54bbe5 100644 --- a/dom/workers/XMLHttpRequest.h +++ b/dom/workers/XMLHttpRequest.h @@ -260,7 +260,7 @@ public: } private: - XMLHttpRequest(WorkerPrivate* aWorkerPrivate); + explicit XMLHttpRequest(WorkerPrivate* aWorkerPrivate); ~XMLHttpRequest(); enum ReleaseType { Default, XHRIsGoingAway, WorkerIsGoingAway }; diff --git a/dom/workers/XMLHttpRequestUpload.h b/dom/workers/XMLHttpRequestUpload.h index 64d922c3a7f1..e1ca8b72a3d1 100644 --- a/dom/workers/XMLHttpRequestUpload.h +++ b/dom/workers/XMLHttpRequestUpload.h @@ -16,7 +16,7 @@ class XMLHttpRequestUpload MOZ_FINAL : public nsXHREventTarget { nsRefPtr mXHR; - XMLHttpRequestUpload(XMLHttpRequest* aXHR); + explicit XMLHttpRequestUpload(XMLHttpRequest* aXHR); ~XMLHttpRequestUpload(); From 60a140e1d7d13f76370b57884f6be075b13234c6 Mon Sep 17 00:00:00 2001 From: Luke Wagner Date: Tue, 2 Sep 2014 09:21:42 -0500 Subject: [PATCH 057/139] Bug 1054538 - Store the IonScript in AsmJSModule::ExitDatum for direct access in ~AsmJSModule (r=hannes) --HG-- extra : rebase_source : e4afb40b979f98a1195163ef3728386a88cd7266 --- js/src/asmjs/AsmJSModule.cpp | 21 +++++++++------------ js/src/asmjs/AsmJSModule.h | 5 ++++- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/js/src/asmjs/AsmJSModule.cpp b/js/src/asmjs/AsmJSModule.cpp index 3b6b38f39f0c..81d56f776d75 100644 --- a/js/src/asmjs/AsmJSModule.cpp +++ b/js/src/asmjs/AsmJSModule.cpp @@ -121,18 +121,11 @@ AsmJSModule::~AsmJSModule() if (code_) { for (unsigned i = 0; i < numExits(); i++) { AsmJSModule::ExitDatum &exitDatum = exitIndexToGlobalDatum(i); - if (!exitDatum.fun) - continue; - - if (!exitDatum.fun->hasScript()) - continue; - - JSScript *script = exitDatum.fun->nonLazyScript(); - if (!script->hasIonScript()) + if (!exitDatum.ionScript) continue; jit::DependentAsmJSModuleExit exit(this, i); - script->ionScript()->removeDependentAsmJSModule(exit); + exitDatum.ionScript->removeDependentAsmJSModule(exit); } DeallocateExecutableMemory(code_, pod.totalBytes_); @@ -536,7 +529,9 @@ TryEnablingIon(JSContext *cx, AsmJSModule &module, HandleFunction fun, uint32_t if (!ionScript->addDependentAsmJSModule(cx, DependentAsmJSModuleExit(&module, exitIndex))) return false; - module.exitIndexToGlobalDatum(exitIndex).exit = module.ionExitTrampoline(module.exit(exitIndex)); + AsmJSModule::ExitDatum &exitDatum = module.exitIndexToGlobalDatum(exitIndex); + exitDatum.exit = module.ionExitTrampoline(module.exit(exitIndex)); + exitDatum.ionScript = ionScript; return true; } @@ -737,8 +732,10 @@ AsmJSModule::staticallyLink(ExclusiveContext *cx) // Initialize global data segment for (size_t i = 0; i < exits_.length(); i++) { - exitIndexToGlobalDatum(i).exit = interpExitTrampoline(exits_[i]); - exitIndexToGlobalDatum(i).fun = nullptr; + AsmJSModule::ExitDatum &exitDatum = exitIndexToGlobalDatum(i); + exitDatum.exit = interpExitTrampoline(exits_[i]); + exitDatum.fun = nullptr; + exitDatum.ionScript = nullptr; } JS_ASSERT(isStaticallyLinked()); diff --git a/js/src/asmjs/AsmJSModule.h b/js/src/asmjs/AsmJSModule.h index 31432c46f956..ce765f6bb643 100644 --- a/js/src/asmjs/AsmJSModule.h +++ b/js/src/asmjs/AsmJSModule.h @@ -402,6 +402,7 @@ class AsmJSModule struct ExitDatum { uint8_t *exit; + jit::IonScript *ionScript; HeapPtrFunction fun; }; @@ -1339,7 +1340,9 @@ class AsmJSModule } void detachIonCompilation(size_t exitIndex) const { JS_ASSERT(isFinished()); - exitIndexToGlobalDatum(exitIndex).exit = interpExitTrampoline(exit(exitIndex)); + ExitDatum &exitDatum = exitIndexToGlobalDatum(exitIndex); + exitDatum.exit = interpExitTrampoline(exit(exitIndex)); + exitDatum.ionScript = nullptr; } /*************************************************************************/ From 1e46b74a3b20a4035d10c579418186e0c66edd04 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 2 Sep 2014 10:23:51 -0400 Subject: [PATCH 058/139] Bug 1061269 - Do not try to build the SkBlitRow assembly implementation with clang-cl; r=snorp clang-cl builds use ml.exe which is the MASM assembler, same as the one we use for MSVC builds. In that respect, clang-cl and gcc builds are quite different. --- gfx/skia/generate_mozbuild.py | 2 +- gfx/skia/moz.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/skia/generate_mozbuild.py b/gfx/skia/generate_mozbuild.py index 5790e426590a..2b8e4351e1cf 100755 --- a/gfx/skia/generate_mozbuild.py +++ b/gfx/skia/generate_mozbuild.py @@ -37,7 +37,7 @@ if not CONFIG['INTEL_ARCHITECTURE'] and CONFIG['CPU_ARCH'] == 'arm' and CONFIG[' 'trunk/src/opts/memset32_neon.S', ] -if CONFIG['INTEL_ARCHITECTURE'] and (CONFIG['GNU_CC'] or CONFIG['CLANG_CL']): +if CONFIG['INTEL_ARCHITECTURE'] and CONFIG['GNU_CC']: if CONFIG['CPU_ARCH'] == 'x86_64': SOURCES += [ 'trunk/src/opts/SkBlitRow_opts_SSE4_x64_asm.S', diff --git a/gfx/skia/moz.build b/gfx/skia/moz.build index f6cf57771518..2049b6ef88bf 100644 --- a/gfx/skia/moz.build +++ b/gfx/skia/moz.build @@ -869,7 +869,7 @@ if not CONFIG['INTEL_ARCHITECTURE'] and CONFIG['CPU_ARCH'] == 'arm' and CONFIG[' 'trunk/src/opts/memset32_neon.S', ] -if CONFIG['INTEL_ARCHITECTURE'] and (CONFIG['GNU_CC'] or CONFIG['CLANG_CL']): +if CONFIG['INTEL_ARCHITECTURE'] and CONFIG['GNU_CC']: if CONFIG['CPU_ARCH'] == 'x86_64': SOURCES += [ 'trunk/src/opts/SkBlitRow_opts_SSE4_x64_asm.S', From 228f2f2e113e190c9fc723481fd94fcc22445c26 Mon Sep 17 00:00:00 2001 From: Mark Banner Date: Tue, 2 Sep 2014 15:32:51 +0100 Subject: [PATCH 059/139] Bug 1061112 - test_app_rep.js fails when "browser.safebrowsing.downloads.enabled" is false or not set. r=gcp --- toolkit/components/downloads/test/unit/test_app_rep.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/toolkit/components/downloads/test/unit/test_app_rep.js b/toolkit/components/downloads/test/unit/test_app_rep.js index 2592525807d6..0ed46b72740f 100644 --- a/toolkit/components/downloads/test/unit/test_app_rep.js +++ b/toolkit/components/downloads/test/unit/test_app_rep.js @@ -64,8 +64,10 @@ function run_test() { // Ensure safebrowsing is enabled for this test, even if the app // doesn't have it enabled. Services.prefs.setBoolPref("browser.safebrowsing.malware.enabled", true); + Services.prefs.setBoolPref("browser.safebrowsing.downloads.enabled", true); do_register_cleanup(function() { Services.prefs.clearUserPref("browser.safebrowsing.malware.enabled"); + Services.prefs.clearUserPref("browser.safebrowsing.downloads.enabled"); }); // Set block and allow tables explicitly, since the allowlist is normally From a8cadf5ca3c8eabb623574eeb0c4eac591d6ad47 Mon Sep 17 00:00:00 2001 From: Jan-Ivar Bruaroey Date: Fri, 29 Aug 2014 20:38:09 -0400 Subject: [PATCH 060/139] Bug 1060708 - Detect user and environment cameras on Android. r=gcp,blassey,snorp --- dom/media/MediaManager.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dom/media/MediaManager.cpp b/dom/media/MediaManager.cpp index c177daa54b0a..6596dbb1809c 100644 --- a/dom/media/MediaManager.cpp +++ b/dom/media/MediaManager.cpp @@ -388,13 +388,27 @@ VideoDevice::VideoDevice(MediaEngineVideoSource* aSource) mFacingMode = dom::VideoFacingModeEnum::User; } #endif // MOZ_B2G_CAMERA +#if defined(ANDROID) && !defined(MOZ_WIDGET_GONK) + // Names are generated. Example: "Camera 0, Facing back, Orientation 90" + // + // See media/webrtc/trunk/webrtc/modules/video_capture/android/java/src/org/ + // webrtc/videoengine/VideoCaptureDeviceInfoAndroid.java + if (mName.Find(NS_LITERAL_STRING("Facing back")) != kNotFound) { + mHasFacingMode = true; + mFacingMode = dom::VideoFacingModeEnum::Environment; + } else if (mName.Find(NS_LITERAL_STRING("Facing front")) != kNotFound) { + mHasFacingMode = true; + mFacingMode = dom::VideoFacingModeEnum::User; + } +#endif // ANDROID +#ifdef XP_MACOSX // Kludge to test user-facing cameras on OSX. if (mName.Find(NS_LITERAL_STRING("Face")) != -1) { mHasFacingMode = true; mFacingMode = dom::VideoFacingModeEnum::User; } - +#endif mMediaSource = aSource->GetMediaSource(); } From 76f1571232109922a355fa64774714544942ab9a Mon Sep 17 00:00:00 2001 From: James Willcox Date: Tue, 2 Sep 2014 09:57:55 -0500 Subject: [PATCH 061/139] Bug 1056947 - Don't enable GLFeature::draw_buffers (and therefore WEBGL_draw_buffers) on GLES3 r=jgilbert --HG-- extra : rebase_source : b2ba97bf610bc414ab744ab08d788b740d518578 --- gfx/gl/GLContextFeatures.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/gl/GLContextFeatures.cpp b/gfx/gl/GLContextFeatures.cpp index e2d6069e1b7a..f3f38e53fdc5 100644 --- a/gfx/gl/GLContextFeatures.cpp +++ b/gfx/gl/GLContextFeatures.cpp @@ -87,7 +87,7 @@ static const FeatureInfo sFeatureInfoArr[] = { { "draw_buffers", 200, // OpenGL version - 300, // OpenGL ES version + 0, // Only enable when we have the extension on ES, bug 1056947 GLContext::Extension_None, { GLContext::ARB_draw_buffers, From 38d720c3fbe765b89089b6fc5f9586ffb354c3ca Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Fri, 29 Aug 2014 15:17:10 -0400 Subject: [PATCH 062/139] Bug 1060540 - declare nsIToolkitProfile and nsIProfileLock builtinclass; r=bsmedberg --- toolkit/profile/nsIToolkitProfile.idl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/toolkit/profile/nsIToolkitProfile.idl b/toolkit/profile/nsIToolkitProfile.idl index 8d0c07c51564..14aafc66297d 100644 --- a/toolkit/profile/nsIToolkitProfile.idl +++ b/toolkit/profile/nsIToolkitProfile.idl @@ -12,7 +12,7 @@ interface nsIProfileUnlocker; * Hold on to a profile lock. Once you release the last reference to this * interface, the profile lock is released. */ -[scriptable, uuid(7c58c703-d245-4864-8d75-9648ca4a6139)] +[builtinclass, scriptable, uuid(b1c2f328-de6e-45af-a53a-5ec7ce23166e)] interface nsIProfileLock : nsISupports { /** @@ -43,10 +43,8 @@ interface nsIProfileLock : nsISupports /** * A interface representing a profile. - * @note THIS INTERFACE SHOULD BE IMPLEMENTED BY THE TOOLKIT CODE ONLY! DON'T - * EVEN THINK ABOUT IMPLEMENTING THIS IN JAVASCRIPT! */ -[scriptable, uuid(7422b090-4a86-4407-972e-75468a625388)] +[builtinclass, scriptable, uuid(cc53f90b-d1a5-4524-a4db-dc929e656f6b)] interface nsIToolkitProfile : nsISupports { /** From a2b8fa55e7c111600dcf7d1507158e66a722405a Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 12:50:44 -0700 Subject: [PATCH 063/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/c3b248865a87 Author: Jan Jongboom Desc: Merge pull request #22513 from comoyo/bug1048792 Bug 1048792 - Don't autocorrect if first suggestion has different length (counting alpha chars) than input. r=djf ======== https://hg.mozilla.org/integration/gaia-central/rev/dd7451bbd952 Author: Jan Jongboom Desc: Bug 1048792 - Don't autocorrect if first suggestion has different length (counting alpha chars) than input --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index c624c4a4b6b0..e596af51e74c 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "14400ee07e836d74039e2317feebc0a13fcb60c8", + "revision": "c3b248865a87f280f89dfff74cb139be2968c3a0", "repo_path": "/integration/gaia-central" } From a520315db4d32a7ae9a90081ed207c841cc69628 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 12:52:29 -0700 Subject: [PATCH 064/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 62811d8fa283..dcf33efcbfca 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index bfbcce6d3fb7..85b1c24479ef 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index a9ab9a179972..32eed050fa72 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index aa692e4a947f..d1ee55e5ca32 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index bfbcce6d3fb7..85b1c24479ef 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 6a7e53c3c4ac..494189534502 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 50d72278824a..8c8af504dd37 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 1a072435d2e2..e1608f43afab 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 6d3ddcb11a11..e57cf1764231 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 293c7beff0d5..37ef5839b0a6 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 2aa0fb97bcc2..558ff11cd341 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 5c81891c74ddd524a3c8c7ba309a65f7c402c816 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 13:50:44 -0700 Subject: [PATCH 065/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/b19639804a92 Author: Jan Jongboom Desc: Merge pull request #23593 from comoyo/bug1053647-revert Revert "Bug 1053647: delete space when reverting an autocorrection and don't insert space when user selects a word suggestion" ======== https://hg.mozilla.org/integration/gaia-central/rev/2e4981c1e41a Author: Jan Jongboom Desc: Revert "Bug 1053647: delete space when reverting an autocorrection and don't insert space when user selects a word suggestion" This reverts commit c547fb031f27b28c1134f1d4c21e9d0b93f77c91. --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index e596af51e74c..f7c26628bc17 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "c3b248865a87f280f89dfff74cb139be2968c3a0", + "revision": "b19639804a928dccd0301bec7885ee96104a3204", "repo_path": "/integration/gaia-central" } From f04a0f14dbdb8f99b909082b2741178d2c1de196 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 13:52:29 -0700 Subject: [PATCH 066/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index dcf33efcbfca..201748ac7c21 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 85b1c24479ef..36691dcd57eb 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 32eed050fa72..1bea36b01fb0 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index d1ee55e5ca32..2008829c73f8 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 85b1c24479ef..36691dcd57eb 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 494189534502..acd4a7fe4786 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 8c8af504dd37..0b1674d82125 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index e1608f43afab..f007549a1b51 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index e57cf1764231..e349635151bb 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 37ef5839b0a6..21f8216efec8 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 558ff11cd341..765274f94355 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 36643e007d845529f0c2164cfd7d41c90afa5fca Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 14:35:43 -0700 Subject: [PATCH 067/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/1c2414eb1285 Author: Yura Zenevich Desc: Merge pull request #23501 from yzen/bug-1038698 Bug 1038698 - only start running system a11y visibility tests when the l... ======== https://hg.mozilla.org/integration/gaia-central/rev/da04456642c1 Author: Yura Zenevich Desc: Bug 1038698 - only start running system a11y visibility tests when the logo is completely hidden. --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index f7c26628bc17..5fa79b042bda 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "b19639804a928dccd0301bec7885ee96104a3204", + "revision": "1c2414eb128505e0201b72ba381cca2d6f3b28f7", "repo_path": "/integration/gaia-central" } From 07b64ff956bdb5c1b3baae7e81d73a599493354f Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 14:41:51 -0700 Subject: [PATCH 068/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 201748ac7c21..73dd96d48811 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 36691dcd57eb..9cfcc7870774 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 1bea36b01fb0..209e8e95a295 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 2008829c73f8..72a9fc0ae8b2 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 36691dcd57eb..9cfcc7870774 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index acd4a7fe4786..948f5aba8d3f 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 0b1674d82125..555b72f10fe6 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index f007549a1b51..61d14947c165 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index e349635151bb..d28936011f34 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 21f8216efec8..ed7505870107 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 765274f94355..c676b74ca251 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From bca1e987c0aef15e7e0d946c148ca6f8f927260f Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 15:40:45 -0700 Subject: [PATCH 069/139] Bumping gaia.json for 1 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/e4abe73da1d3 Author: Kevin Grandon Desc: Revert "Bug 1048792 - Don't autocorrect if first suggestion has different length (counting alpha chars) than input" This reverts commit ff96a8c41a26f99d7e887fa364d5d97af30a3e1c. --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 5fa79b042bda..536e8870da45 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "1c2414eb128505e0201b72ba381cca2d6f3b28f7", + "revision": "e4abe73da1d335334f2ae61196aa91848d4a0d9f", "repo_path": "/integration/gaia-central" } From 0c972c9f219750bf8db47fd5d54f107e630b159d Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 15:46:56 -0700 Subject: [PATCH 070/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 73dd96d48811..ca4fc7d1d966 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 9cfcc7870774..1d21329d4d24 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 209e8e95a295..31d044b48b6e 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 72a9fc0ae8b2..fa8e7a7aee08 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 9cfcc7870774..1d21329d4d24 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 948f5aba8d3f..bfda74332388 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 555b72f10fe6..54057e788f2f 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 61d14947c165..e0dee8ee018c 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index d28936011f34..0a5f9835347a 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index ed7505870107..fb7d12106e17 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index c676b74ca251..865f56b6cb21 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 07af6b4058ac25851cb79c6b59ce803f775c44fc Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 16:25:44 -0700 Subject: [PATCH 071/139] Bumping gaia.json for 4 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/785644e8fc33 Author: Guillaume C. Marty Desc: Merge pull request #23572 from gmarty/Bug-1038723-Utility-Tray-Visual-Refresh-2 Bug 1038723 - [Utility Tray] Visual Refresh (system app) ======== https://hg.mozilla.org/integration/gaia-central/rev/0823f8ea2a24 Author: Guillaume Marty Desc: Bug 1038723 - [Utility Tray] Visual Refresh (System) ======== https://hg.mozilla.org/integration/gaia-central/rev/caa52a902991 Author: Aleh Zasypkin Desc: Merge pull request #22734 from azasypkin/bug-1048845-refresh-subject Bug 1048845 - [Messages] Compose Panel refresh (subject behavior change). r=schung ======== https://hg.mozilla.org/integration/gaia-central/rev/b513495a24f0 Author: Aleh Zasypkin Desc: Bug 1048845 - [Messages] Compose Panel refresh (subject behavior change). r=schung --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 536e8870da45..99ce8b2e8806 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "e4abe73da1d335334f2ae61196aa91848d4a0d9f", + "revision": "785644e8fc33e5bf21dc1f2dd8e0968ee3387725", "repo_path": "/integration/gaia-central" } From 441a080112771b14b39b2db54082309b0f1dcb5e Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 16:27:30 -0700 Subject: [PATCH 072/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index ca4fc7d1d966..8531cea15d63 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 1d21329d4d24..11ce61c41510 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 31d044b48b6e..f58e6927a4ae 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index fa8e7a7aee08..820fa2510923 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 1d21329d4d24..11ce61c41510 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index bfda74332388..01e6237abd23 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 54057e788f2f..9fad3b2a2eaa 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index e0dee8ee018c..39569e9c762a 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 0a5f9835347a..eb3582091f53 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index fb7d12106e17..7bf2e0300255 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 865f56b6cb21..597b52360959 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From f5da008633c837352ab132d9e4b4b0b6c8f887ab Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 18:10:43 -0700 Subject: [PATCH 073/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/702526cfe584 Author: Sherman Chen Desc: Merge pull request #23545 from shamenchens/Bug1048804-FirefoxAccountDialogPosition Bug 1048804 - Fix Firefox account dialog position, r=alive ======== https://hg.mozilla.org/integration/gaia-central/rev/11ba0148c22a Author: Sherman Chen Desc: Bug 1048804 - Fix Firefox account dialog position --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 99ce8b2e8806..ae1a2c6a012d 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "785644e8fc33e5bf21dc1f2dd8e0968ee3387725", + "revision": "702526cfe5841441de4c92487805073b661cbcda", "repo_path": "/integration/gaia-central" } From e572fab742c72dd80e785a7d54d5f7ae04a5f951 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 18:17:15 -0700 Subject: [PATCH 074/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 8531cea15d63..5b261442e56d 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 11ce61c41510..bc1dcbfef9a7 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index f58e6927a4ae..b6d5741f1792 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 820fa2510923..2290aad87691 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 11ce61c41510..bc1dcbfef9a7 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 01e6237abd23..cdd670d22c6f 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 9fad3b2a2eaa..446a1c406768 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 39569e9c762a..9136a13d724a 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index eb3582091f53..2986d56daab2 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 7bf2e0300255..06f08a659abf 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 597b52360959..7075e0f56acc 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From e600824bba467a6819d980427aebf3bbe9da876a Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 19:55:22 -0700 Subject: [PATCH 075/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/777220fad4d2 Author: Kevin Grandon Desc: Merge pull request #23498 from KevinGrandon/bug_1059758_search_result_clear_timing Bug 1059758 - [Search] Do not clear results until we are ready to display a search ======== https://hg.mozilla.org/integration/gaia-central/rev/7fe3aaea4fc6 Author: Kevin Grandon Desc: Bug 1059758 - [Search] Do not clear results until we are ready to display a search ui-r=djabber r=kgrandon --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index ae1a2c6a012d..649be6dd30ed 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "702526cfe5841441de4c92487805073b661cbcda", + "revision": "777220fad4d22d245b13126d03c44a332f5628ce", "repo_path": "/integration/gaia-central" } From 9f9b7408fbb7b0467bf5a275a4142fd8da5b2a1d Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 20:00:40 -0700 Subject: [PATCH 076/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 5b261442e56d..1a2637058f19 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index bc1dcbfef9a7..e1562a912952 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index b6d5741f1792..85a72f6dcd9b 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 2290aad87691..7088cd0cb5c4 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index bc1dcbfef9a7..e1562a912952 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index cdd670d22c6f..6cb8dae3ad86 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 446a1c406768..245a08193978 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 9136a13d724a..28623a8aed91 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 2986d56daab2..d69b9544fa04 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 06f08a659abf..6c9a70f2459c 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 7075e0f56acc..80a738e0e3fb 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From a7fd9c57d422f81a978bdf90236db70d6f1f59e1 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 20:25:34 -0700 Subject: [PATCH 077/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/82b9599b1b5f Author: Timothy Guan-tin Chien Desc: Merge pull request #23534 from timdream/keyboard-sound Bug 1060879 - Make the first keyboard key audible, r=rudyl ======== https://hg.mozilla.org/integration/gaia-central/rev/033946b18ed5 Author: Timothy Guan-tin Chien Desc: Bug 1060879 - Make the first keyboard key audiable --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 649be6dd30ed..a2dca4e9dd22 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "777220fad4d22d245b13126d03c44a332f5628ce", + "revision": "82b9599b1b5f2c8444f82e6867e63b45a0667ac4", "repo_path": "/integration/gaia-central" } From 9cb9c5229367d369bae70bee8816283944419fdf Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 20:32:33 -0700 Subject: [PATCH 078/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 1a2637058f19..e7204e734717 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index e1562a912952..af817dd4d49d 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 85a72f6dcd9b..38b9321c9528 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 7088cd0cb5c4..3b7223407f30 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index e1562a912952..af817dd4d49d 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 6cb8dae3ad86..6766f09b5ec6 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 245a08193978..8d14a859228b 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 28623a8aed91..fe5921782090 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index d69b9544fa04..67a27e46d108 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 6c9a70f2459c..17839170c438 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 80a738e0e3fb..c3b2c6d05ef5 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From f088db93bebcce955c88f554da075f465c67f02b Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 20:40:28 -0700 Subject: [PATCH 079/139] Bumping gaia.json for 4 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/9fe452bb78c2 Author: evanxd Desc: Merge pull request #23599 from evanxd/bug-1061390 Bug 1061390 - Disable the test ======== https://hg.mozilla.org/integration/gaia-central/rev/dfa4d8b385bf Author: Evan Xd Desc: Bug 1061390 - Disable the test ======== https://hg.mozilla.org/integration/gaia-central/rev/f87a384f0971 Author: Yuren Ju Desc: Merge pull request #23562 from yurenju/BUILD_DEBUG Bug 1060187 - BUILD_DEBUG was removed from the object passed to JS in bug 1012568 r=gduan ======== https://hg.mozilla.org/integration/gaia-central/rev/8b20dd392728 Author: Yuren Ju Desc: Bug 1060187 - BUILD_DEBUG was removed from the object passed to JS in bug 1012568 r=gduan --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index a2dca4e9dd22..1440e3ef2704 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "82b9599b1b5f2c8444f82e6867e63b45a0667ac4", + "revision": "9fe452bb78c200817f106b56833e14efcf72e41c", "repo_path": "/integration/gaia-central" } From ba99a34b2b7dfc5ac2d5af9b5557b73b760e0601 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 20:47:38 -0700 Subject: [PATCH 080/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index e7204e734717..a6bf6a07c051 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index af817dd4d49d..1e251b057046 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 38b9321c9528..cf4a8668922f 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 3b7223407f30..94435e1bb4ae 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index af817dd4d49d..1e251b057046 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 6766f09b5ec6..f6effe7aa9a4 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 8d14a859228b..d8a86c38c3e0 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index fe5921782090..b70bd7b125ef 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 67a27e46d108..a28a658bc304 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 17839170c438..b75b39c6d517 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index c3b2c6d05ef5..edfa87f649ed 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 985a0a43bef9441ef0ba5d7a3ee845b3bb283de3 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 21:10:30 -0700 Subject: [PATCH 081/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/31de4f8fa28c Author: Zibi Braniecki Desc: Merge pull request #23157 from zbraniecki/1055328-embed-net_error-strings Bug 1055328 - Embed all l10n resources in net_error.html. r=yurenyu ======== https://hg.mozilla.org/integration/gaia-central/rev/4f883ab56e51 Author: Zbigniew Braniecki Desc: Bug 1055328 - Embed all l10n resources in net_error.html --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 1440e3ef2704..8deae2a117e6 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "9fe452bb78c200817f106b56833e14efcf72e41c", + "revision": "31de4f8fa28c7960164b03970fc86a56094b83f1", "repo_path": "/integration/gaia-central" } From 59c24e8008ef627c2d5986441ddf04ca4a021c76 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 21:19:53 -0700 Subject: [PATCH 082/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index a6bf6a07c051..2203014e5d41 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 1e251b057046..78991a2ae881 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index cf4a8668922f..44a3a7ebc968 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 94435e1bb4ae..276f35604921 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 1e251b057046..78991a2ae881 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index f6effe7aa9a4..3d7327536602 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index d8a86c38c3e0..a9f6e6fc725b 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index b70bd7b125ef..73df67f76d87 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index a28a658bc304..e4b9bc74518d 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index b75b39c6d517..682e517de219 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index edfa87f649ed..06ca8ecec81c 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From f8f8b499fefe220471318511b82202770911baf5 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 21:40:27 -0700 Subject: [PATCH 083/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/9a21926ccb0f Author: George Desc: Merge pull request #23406 from cctuan/1059093 Bug 1059093 - [NFC] The sharable content cannot be shared after viewing the received file from notification ======== https://hg.mozilla.org/integration/gaia-central/rev/e82de16b69c8 Author: cctuan Desc: Bug 1059093 - [NFC] The sharable content cannot be shared after viewing the received file from notification --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 8deae2a117e6..149ee4c13b17 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "31de4f8fa28c7960164b03970fc86a56094b83f1", + "revision": "9a21926ccb0f164559da65ead53cebee741d1cf2", "repo_path": "/integration/gaia-central" } From 466a168d58b409c2021de6d467f9834aebea1054 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 1 Sep 2014 21:52:36 -0700 Subject: [PATCH 084/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 2203014e5d41..69cb25ed82c0 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 78991a2ae881..96420549bbfa 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 44a3a7ebc968..7e604ddac9ec 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 276f35604921..9b3c35c68a1d 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 78991a2ae881..96420549bbfa 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 3d7327536602..0d16a4eabfe2 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index a9f6e6fc725b..95225ca3bda9 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 73df67f76d87..9cf7553e7c0c 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index e4b9bc74518d..4af4204c19f9 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 682e517de219..2ba71f25af0b 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 06ca8ecec81c..8f1a541633e0 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 4c816e79747eb873534427dd825bc9f96d6013fc Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 01:35:45 -0700 Subject: [PATCH 085/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/c448b6769528 Author: Pavel Ivanov Desc: Merge pull request #23604 from pivanov/bug-1059093 Bug 1046336 - (2.1-visual-refresh) System Sound Refresh r=timdream ======== https://hg.mozilla.org/integration/gaia-central/rev/fdb49c904318 Author: Pavel Ivanov Desc: Bug 1046336 - (2.1-visual-refresh) System Sound Refresh --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 149ee4c13b17..e9911b215316 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "9a21926ccb0f164559da65ead53cebee741d1cf2", + "revision": "c448b6769528224553863f701e9b572441b3b72b", "repo_path": "/integration/gaia-central" } From ae6cfca9fed0dce2af239c21f78acb3e0d88e8de Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 01:37:31 -0700 Subject: [PATCH 086/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 69cb25ed82c0..a85d44ed011c 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 96420549bbfa..81f3bcceb103 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 7e604ddac9ec..63f85f616199 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 9b3c35c68a1d..928402e2f42f 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 96420549bbfa..81f3bcceb103 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 0d16a4eabfe2..03a71e3bba78 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 95225ca3bda9..a01e8208cd17 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 9cf7553e7c0c..58f82f86268a 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 4af4204c19f9..a059be499f93 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 2ba71f25af0b..3b78f19645d0 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 8f1a541633e0..2483e85c7edf 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From ffdcffc24b7397ae42dd56be2a02ac313cf028d9 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 01:45:50 -0700 Subject: [PATCH 087/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/af5c9c6b6bf9 Author: Rudy Lu Desc: Merge pull request #23606 from RudyLu/keyboard/backout_tests_Bug1053647 Revert "Merge pull request #23343 from RudyLu/keyboard/Bug1053647" ======== https://hg.mozilla.org/integration/gaia-central/rev/13a92e91f9e6 Author: Rudy Lu Desc: Revert "Merge pull request #23343 from RudyLu/keyboard/Bug1053647" This reverts commit 39cad6c82122b964f12a66771bfbcc14fb342d9e, reversing changes made to bc9a482a98e16f011c82f40e3c42bababb159bf1. --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index e9911b215316..b626f36957dd 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "c448b6769528224553863f701e9b572441b3b72b", + "revision": "af5c9c6b6bf97967a2cdaf2c6807a668fd894597", "repo_path": "/integration/gaia-central" } From 7c364c5c7ae5fb0e615163fa96087f140d97cb01 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 01:57:00 -0700 Subject: [PATCH 088/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index a85d44ed011c..9bb06d7f7dfc 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 81f3bcceb103..f8105fb806ea 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 63f85f616199..b58bd40a17e6 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 928402e2f42f..eab676464aac 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 81f3bcceb103..f8105fb806ea 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 03a71e3bba78..cd864b829f23 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index a01e8208cd17..8dc52ec24fa6 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 58f82f86268a..252a835a1ba5 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index a059be499f93..95116b29e046 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 3b78f19645d0..e98dcb649b99 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 2483e85c7edf..c4ecf658c564 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 602ba35c63aa57c7690af63a90413c0302484708 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 02:00:45 -0700 Subject: [PATCH 089/139] Bumping gaia.json for 6 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/1eb1d0a6b911 Author: evanxd Desc: Merge pull request #23615 from evanxd/bug-1061458 Bug 1061458 - Intermittent failing test, TEST-UNEXPECTED-FAIL | /builds/slave/test/gaia/apps/verticalhome/test/marionette/collection_offline_test.js | Vertical - Collection create collection offline succeeds if response is cached ======== https://hg.mozilla.org/integration/gaia-central/rev/c7f0b922baff Author: Evan Xd Desc: Bug 1061458 - Intermittent failing test, TEST-UNEXPECTED-FAIL | /builds/slave/test/gaia/apps/verticalhome/test/marionette/collection_offline_test.js | Vertical - Collection create collection offline succeeds if response is cached ======== https://hg.mozilla.org/integration/gaia-central/rev/1da0293025ab Author: evanxd Desc: Merge pull request #23614 from evanxd/bug-1061457 Bug 1061457 - Intermittent failing test, TEST-UNEXPECTED-FAIL | /builds/slave/test/gaia/apps/verticalhome/test/marionette/collection_offline_test.js | Vertical - Collection create collection shows offline message if no server response ======== https://hg.mozilla.org/integration/gaia-central/rev/b8f690ceba0b Author: Evan Xd Desc: Bug 1061457 - Intermittent failing test, TEST-UNEXPECTED-FAIL | /builds/slave/test/gaia/apps/verticalhome/test/marionette/collection_offline_test.js | Vertical - Collection create collection shows offline message if no server response ======== https://hg.mozilla.org/integration/gaia-central/rev/e1e7b5642641 Author: Min-Zhong "John" Lu Desc: Merge pull request #23607 from mnjul/bug_1061432_remove_number_from_fr_ca_kb_layout Bug 1061432 - Remove "number" type in fr-CA.json keyboard layout. r=rudyl ======== https://hg.mozilla.org/integration/gaia-central/rev/1578d1e89d96 Author: John Lu [:mnjul] Desc: Bug 1061432 - Remove "number" type in fr-CA.json keyboard layout --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index b626f36957dd..0c03168f76db 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "af5c9c6b6bf97967a2cdaf2c6807a668fd894597", + "revision": "1eb1d0a6b91119c3b4b187123151676022eddf2e", "repo_path": "/integration/gaia-central" } From 8f6fcf1c30594e76c21579c8428d003b4d49f32f Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 02:06:51 -0700 Subject: [PATCH 090/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 9bb06d7f7dfc..9912959e777f 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index f8105fb806ea..31a1ff2fd1fb 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index b58bd40a17e6..14c17a2f73ca 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index eab676464aac..13a335dcfc0e 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index f8105fb806ea..31a1ff2fd1fb 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index cd864b829f23..4fadd85f23dd 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 8dc52ec24fa6..f86a3a9b2c5a 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 252a835a1ba5..d27cc76e76b0 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 95116b29e046..3d0ab1f7f99d 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index e98dcb649b99..5c92dd66ab47 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index c4ecf658c564..1beddbc5acf0 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From e2cb70ce658ca364b1623e7c40a5ed1951a358c0 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 02:25:44 -0700 Subject: [PATCH 091/139] Bumping gaia.json for 4 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/a5d3d79908c1 Author: Cristian Rodriguez Desc: Merge pull request #23461 from crdlc/bug-1059234 Bug 1059234 - Import sim contacts message not displayed on FTU after imp... ======== https://hg.mozilla.org/integration/gaia-central/rev/90b99649ad9c Author: crdlc Desc: Bug 1059234 - Import sim contacts message not displayed on FTU after importing contacts ======== https://hg.mozilla.org/integration/gaia-central/rev/076589e485ef Author: Etienne Segonzac Desc: Merge pull request #23557 from etiennesegonzac/bug-1060693 Bug 1060693 - Make sure isFullScreen()/isFullScreenLayout() always returns a boolean r=alive ======== https://hg.mozilla.org/integration/gaia-central/rev/b7d641edf4e8 Author: Etienne Segonzac Desc: Bug 1060693 - Make sure isFullScreen()/isFullScreenLayout() always returns a boolean. Since we're using the results to do some classList.toggle('', bool) --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 0c03168f76db..4a22b414be6a 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "1eb1d0a6b91119c3b4b187123151676022eddf2e", + "revision": "a5d3d79908c1590d1cdb9c463193ba18c23ae653", "repo_path": "/integration/gaia-central" } From 13af75260b4d288a65ace588926ba744e01bd687 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 02:31:55 -0700 Subject: [PATCH 092/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 9912959e777f..896be25b9858 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 31a1ff2fd1fb..d534ab2ee4fc 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 14c17a2f73ca..43e699684097 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 13a335dcfc0e..742026201d80 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 31a1ff2fd1fb..d534ab2ee4fc 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 4fadd85f23dd..92cbe74af260 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index f86a3a9b2c5a..079dfb273eb0 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index d27cc76e76b0..bddc062ec8c7 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 3d0ab1f7f99d..2b8929727002 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 5c92dd66ab47..a8c793e52be9 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 1beddbc5acf0..71c6c03e8f6d 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 62d5e80bfd419c79fd28bff3b2563e72b14a4d67 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 02:40:44 -0700 Subject: [PATCH 093/139] Bumping gaia.json for 1 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/0b8da8332338 Author: Gabriele Svelto Desc: Bug 942080 - Convert asynchronous activities to use promises and use the new functionality to update old notifications r=schung --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 4a22b414be6a..c2ef267fc8ac 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "a5d3d79908c1590d1cdb9c463193ba18c23ae653", + "revision": "0b8da833233837e4a79fe9a36d9f7479c08099a1", "repo_path": "/integration/gaia-central" } From 80fc53b2c0b8336c51956c11b3d82f5311aac98e Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 02:46:57 -0700 Subject: [PATCH 094/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 896be25b9858..d94ad7caa27a 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index d534ab2ee4fc..cf8912a48ef7 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 43e699684097..a7cfe3393827 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 742026201d80..1fbe19069aa6 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index d534ab2ee4fc..cf8912a48ef7 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 92cbe74af260..189b8bf46d7a 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 079dfb273eb0..44614b6bcb36 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index bddc062ec8c7..1fde2843c4fc 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 2b8929727002..8bee4924c9df 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index a8c793e52be9..8f9a175688d3 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 71c6c03e8f6d..9821ce245f4a 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From aa05445078d61fc00832524c30a6183a703cb3c0 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 03:20:43 -0700 Subject: [PATCH 095/139] Bumping gaia.json for 5 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/c94db58395fc Author: Timothy Guan-tin Chien Desc: Merge pull request #22970 from timdream/keyboard-inputcontext-events Bug 972210 - Have Pinyin and Zhuyin responsive to selectionchange, r=rudyl ======== https://hg.mozilla.org/integration/gaia-central/rev/e854ae6e0d5a Author: Timothy Guan-tin Chien Desc: Bug 972210 - (Part IV) Move Latin script tests to it's right place ======== https://hg.mozilla.org/integration/gaia-central/rev/e6c42df72067 Author: Timothy Guan-tin Chien Desc: Bug 972210 - (Part III) Move JSPinyin unit test to it's right place ======== https://hg.mozilla.org/integration/gaia-central/rev/617fc9550f3d Author: Timothy Guan-tin Chien Desc: Bug 972210 - (Part II) Have Pinyin and Zhuyin responsive to selectionchange ======== https://hg.mozilla.org/integration/gaia-central/rev/1e398a899126 Author: Timothy Guan-tin Chien Desc: Bug 972210 - (Part I) Stop exposing inputContext to IMEs --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index c2ef267fc8ac..bbdd81c2b262 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "0b8da833233837e4a79fe9a36d9f7479c08099a1", + "revision": "c94db58395fcfed57c6c76d4a02df3aa27257018", "repo_path": "/integration/gaia-central" } From 9bd7314dca57444f7151ba94dbacf033ffb60e6f Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 03:26:50 -0700 Subject: [PATCH 096/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index d94ad7caa27a..f10c8bb5bc1a 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index cf8912a48ef7..9eec3b9949ff 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index a7cfe3393827..d2ca9712ec35 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 1fbe19069aa6..abb7d02afc26 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index cf8912a48ef7..9eec3b9949ff 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 189b8bf46d7a..111dae6782f5 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 44614b6bcb36..fce325811224 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 1fde2843c4fc..2c8dbc0f17ab 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 8bee4924c9df..377d60e8a931 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 8f9a175688d3..1cbb52743466 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 9821ce245f4a..c012dce44c81 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 765250a67b30d44c7597c88b9e6941a24908e9f0 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 2 Sep 2014 12:33:05 +0200 Subject: [PATCH 097/139] Bug 1061219: Fix string conversion for A2DP connection states, r=shuang The C++ compiler for Flatfish lacks support for initialized arrays of C-string pointers. This patch fixes the problem by using a switch statement for the string conversion of A2DP connection states. --- .../bluedroid/BluetoothA2dpManager.cpp | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp b/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp index f82d6ae7cc59..25797252dfdc 100644 --- a/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp +++ b/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp @@ -105,17 +105,23 @@ BluetoothA2dpManager::Reset() static void AvStatusToSinkString(BluetoothA2dpConnectionState aState, nsAString& aString) { - static const nsLiteralString sString[] = { - [A2DP_CONNECTION_STATE_DISCONNECTED] = NS_LITERAL_STRING("disconnected"), - [A2DP_CONNECTION_STATE_CONNECTING] = NS_LITERAL_STRING("connecting"), - [A2DP_CONNECTION_STATE_CONNECTED] = NS_LITERAL_STRING("connected"), - [A2DP_CONNECTION_STATE_DISCONNECTING] = NS_LITERAL_STRING("disconnecting") - }; - if (aState >= MOZ_ARRAY_LENGTH(sString)) { - BT_WARNING("Unknown sink state %d", static_cast(aState)); - return; + switch (aState) { + case A2DP_CONNECTION_STATE_DISCONNECTED: + aString.AssignLiteral("disconnected"); + break; + case A2DP_CONNECTION_STATE_CONNECTING: + aString.AssignLiteral("connecting"); + break; + case A2DP_CONNECTION_STATE_CONNECTED: + aString.AssignLiteral("connected"); + break; + case A2DP_CONNECTION_STATE_DISCONNECTING: + aString.AssignLiteral("disconnecting"); + break; + default: + BT_WARNING("Unknown sink state %d", static_cast(aState)); + return; } - aString = sString[aState]; } #if ANDROID_VERSION > 17 From f17536cd4ad77c42a01028ad2c7540499666ae66 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 2 Sep 2014 12:33:05 +0200 Subject: [PATCH 098/139] Bug 1061219: Don't protect |ConvertAttributeString| by ANDROID_VERSION, r=shuang The function |ConvertAttributeString| doesn't depend on the Android version is is used by generic code in Gecko. Don't protect it by ANDROID_VERSION. --- dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp b/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp index 25797252dfdc..38dc7e0aab6b 100644 --- a/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp +++ b/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp @@ -36,7 +36,6 @@ namespace { #endif } // anonymous namespace -#if ANDROID_VERSION > 17 /* * This function maps attribute id and returns corresponding values */ @@ -72,7 +71,6 @@ ConvertAttributeString(BluetoothAvrcpMediaAttribute aAttrId, break; } } -#endif NS_IMETHODIMP BluetoothA2dpManager::Observe(nsISupports* aSubject, From fb1f7b12f236ca06b458777ea15f8725c9516f06 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 03:39:06 -0700 Subject: [PATCH 099/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/6a3ea6ba0554 Author: gitmai Desc: Merge pull request #23480 from lodr/bug-1058545-recover-header-for-topup Bug 1058545 - Incorrect visual screen in "Enter the top-up code" r=mai ======== https://hg.mozilla.org/integration/gaia-central/rev/2fab30cc36b7 Author: Salvador de la Puente Desc: Bug 1058545 - Incorrect visual screen in "Enter the top-up code" --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index bbdd81c2b262..72587d8f2e09 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "c94db58395fcfed57c6c76d4a02df3aa27257018", + "revision": "6a3ea6ba0554fa99e9e6bab222c6470a3f9900f8", "repo_path": "/integration/gaia-central" } From 15fac073ffe4cb0f7fdeb0d8fbb7a774a7f8557c Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 03:39:19 -0700 Subject: [PATCH 100/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index f10c8bb5bc1a..b33fa2183c59 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -127,7 +127,7 @@ - + From 063cdc9441e3deccd12e4ba6f708b60c865de9e2 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 2 Sep 2014 12:38:45 +0200 Subject: [PATCH 101/139] Bug 1054242: Add infrastructure for Bluetooth notifications (under bluetooth2/), r=btian This patch adds some runnable classes for running class methods on the main thread. This is the base of the upcomming notification mechanism for Bluetooth. --- .../bluedroid/BluetoothInterface.cpp | 445 ++++++++++++++++++ 1 file changed, 445 insertions(+) diff --git a/dom/bluetooth2/bluedroid/BluetoothInterface.cpp b/dom/bluetooth2/bluedroid/BluetoothInterface.cpp index 04dddf0bc54b..3c5ae885be79 100644 --- a/dom/bluetooth2/bluedroid/BluetoothInterface.cpp +++ b/dom/bluetooth2/bluedroid/BluetoothInterface.cpp @@ -646,6 +646,451 @@ private: Tin3 mArg3; }; +// +// Notification handling +// + +template +class BluetoothNotificationRunnable1 : public nsRunnable +{ +public: + typedef typename ObjectWrapper::ObjectType ObjectType; + typedef BluetoothNotificationRunnable1 SelfType; + + template + static already_AddRefed Create( + Res (ObjectType::*aMethod)(Arg1), const T1& aIn1) + { + nsRefPtr runnable(new SelfType(aMethod)); + + if (NS_FAILED(runnable->ConvertAndSet(aIn1))) { + return nullptr; + } + return runnable.forget(); + } + + template + static void + Dispatch(Res (ObjectType::*aMethod)(Arg1), const T1& aIn1) + { + nsRefPtr runnable = Create(aMethod, aIn1); + + if (!runnable) { + BT_WARNING("BluetoothNotificationRunnable1::Create failed"); + return; + } + nsresult rv = NS_DispatchToMainThread(runnable); + if (NS_FAILED(rv)) { + BT_WARNING("NS_DispatchToMainThread failed: %X", rv); + } + } + + NS_METHOD + Run() MOZ_OVERRIDE + { + MOZ_ASSERT(NS_IsMainThread()); + + ObjectType* obj = ObjectWrapper::GetInstance(); + + if (!obj) { + BT_WARNING("Notification handler not initialized"); + } else { + ((*obj).*mMethod)(mArg1); + } + return NS_OK; + } + +private: + BluetoothNotificationRunnable1(Res (ObjectType::*aMethod)(Arg1)) + : mMethod(aMethod) + { + MOZ_ASSERT(mMethod); + } + + template + nsresult + ConvertAndSet(const T1& aIn1) + { + nsresult rv = Convert(aIn1, mArg1); + if (NS_FAILED(rv)) { + return rv; + } + return NS_OK; + } + + Res (ObjectType::*mMethod)(Arg1); + Tin1 mArg1; +}; + +template +class BluetoothNotificationRunnable2 : public nsRunnable +{ +public: + typedef typename ObjectWrapper::ObjectType ObjectType; + typedef BluetoothNotificationRunnable2 SelfType; + + template + static already_AddRefed Create( + Res (ObjectType::*aMethod)(Arg1, Arg2), const T1& aIn1, const T2& aIn2) + { + nsRefPtr runnable(new SelfType(aMethod)); + + if (NS_FAILED(runnable->ConvertAndSet(aIn1, aIn2))) { + return nullptr; + } + return runnable.forget(); + } + + template + static void + Dispatch(Res (ObjectType::*aMethod)(Arg1, Arg2), + const T1& aIn1, const T2& aIn2) + { + nsRefPtr runnable = Create(aMethod, aIn1, aIn2); + + if (!runnable) { + BT_WARNING("BluetoothNotificationRunnable2::Create failed"); + return; + } + nsresult rv = NS_DispatchToMainThread(runnable); + if (NS_FAILED(rv)) { + BT_WARNING("NS_DispatchToMainThread failed: %X", rv); + } + } + + NS_METHOD + Run() MOZ_OVERRIDE + { + MOZ_ASSERT(NS_IsMainThread()); + + ObjectType* obj = ObjectWrapper::GetInstance(); + + if (!obj) { + BT_WARNING("Notification handler not initialized"); + } else { + ((*obj).*mMethod)(mArg1, mArg2); + } + return NS_OK; + } + +private: + BluetoothNotificationRunnable2(Res (ObjectType::*aMethod)(Arg1, Arg2)) + : mMethod(aMethod) + { + MOZ_ASSERT(mMethod); + } + + template + nsresult + ConvertAndSet(const T1& aIn1, const T2& aIn2) + { + nsresult rv = Convert(aIn1, mArg1); + if (NS_FAILED(rv)) { + return rv; + } + rv = Convert(aIn2, mArg2); + if (NS_FAILED(rv)) { + return rv; + } + return NS_OK; + } + + Res (ObjectType::*mMethod)(Arg1, Arg2); + Tin1 mArg1; + Tin2 mArg2; +}; + +template +class BluetoothNotificationRunnable3 : public nsRunnable +{ +public: + typedef typename ObjectWrapper::ObjectType ObjectType; + typedef BluetoothNotificationRunnable3 SelfType; + + template + static already_AddRefed Create( + Res (ObjectType::*aMethod)(Arg1, Arg2, Arg3), + const T1& aIn1, const T2& aIn2, const T3& aIn3) + { + nsRefPtr runnable(new SelfType(aMethod)); + + if (NS_FAILED(runnable->ConvertAndSet(aIn1, aIn2, aIn3))) { + return nullptr; + } + return runnable.forget(); + } + + template + static void + Dispatch(Res (ObjectType::*aMethod)(Arg1, Arg2, Arg3), + const T1& aIn1, const T2& aIn2, const T3& aIn3) + { + nsRefPtr runnable = Create(aMethod, aIn1, aIn2, aIn3); + + if (!runnable) { + BT_WARNING("BluetoothNotificationRunnable3::Create failed"); + return; + } + nsresult rv = NS_DispatchToMainThread(runnable); + if (NS_FAILED(rv)) { + BT_WARNING("NS_DispatchToMainThread failed: %X", rv); + } + } + + NS_METHOD + Run() MOZ_OVERRIDE + { + MOZ_ASSERT(NS_IsMainThread()); + + ObjectType* obj = ObjectWrapper::GetInstance(); + + if (!obj) { + BT_WARNING("Notification handler not initialized"); + } else { + ((*obj).*mMethod)(mArg1, mArg2, mArg3); + } + return NS_OK; + } + +private: + BluetoothNotificationRunnable3(Res (ObjectType::*aMethod)(Arg1, Arg2, Arg3)) + : mMethod(aMethod) + { + MOZ_ASSERT(mMethod); + } + + template + nsresult + ConvertAndSet(const T1& aIn1, const T2& aIn2, const T3& aIn3) + { + nsresult rv = Convert(aIn1, mArg1); + if (NS_FAILED(rv)) { + return rv; + } + rv = Convert(aIn2, mArg2); + if (NS_FAILED(rv)) { + return rv; + } + rv = Convert(aIn3, mArg3); + if (NS_FAILED(rv)) { + return rv; + } + return NS_OK; + } + + Res (ObjectType::*mMethod)(Arg1, Arg2, Arg3); + Tin1 mArg1; + Tin2 mArg2; + Tin3 mArg3; +}; + +template +class BluetoothNotificationRunnable4 : public nsRunnable +{ +public: + typedef typename ObjectWrapper::ObjectType ObjectType; + typedef BluetoothNotificationRunnable4 SelfType; + + template + static already_AddRefed Create( + Res (ObjectType::*aMethod)(Arg1, Arg2, Arg3, Arg4), + const T1& aIn1, const T2& aIn2, const T3& aIn3, const T4& aIn4) + { + nsRefPtr runnable(new SelfType(aMethod)); + + if (NS_FAILED(runnable->ConvertAndSet(aIn1, aIn2, aIn3, aIn4))) { + return nullptr; + } + return runnable.forget(); + } + + template + static void + Dispatch(Res (ObjectType::*aMethod)(Arg1, Arg2, Arg3, Arg4), + const T1& aIn1, const T2& aIn2, const T3& aIn3, const T4& aIn4) + { + nsRefPtr runnable = Create(aMethod, aIn1, aIn2, aIn3, aIn4); + + if (!runnable) { + BT_WARNING("BluetoothNotificationRunnable4::Create failed"); + return; + } + nsresult rv = NS_DispatchToMainThread(runnable); + if (NS_FAILED(rv)) { + BT_WARNING("NS_DispatchToMainThread failed: %X", rv); + } + } + + NS_METHOD + Run() MOZ_OVERRIDE + { + MOZ_ASSERT(NS_IsMainThread()); + + ObjectType* obj = ObjectWrapper::GetInstance(); + + if (!obj) { + BT_WARNING("Notification handler not initialized"); + } else { + ((*obj).*mMethod)(mArg1, mArg2, mArg3, mArg4); + } + return NS_OK; + } + +private: + BluetoothNotificationRunnable4( + Res (ObjectType::*aMethod)(Arg1, Arg2, Arg3, Arg4)) + : mMethod(aMethod) + { + MOZ_ASSERT(mMethod); + } + + template + nsresult + ConvertAndSet(const T1& aIn1, const T2& aIn2, + const T3& aIn3, const T4& aIn4) + { + nsresult rv = Convert(aIn1, mArg1); + if (NS_FAILED(rv)) { + return rv; + } + rv = Convert(aIn2, mArg2); + if (NS_FAILED(rv)) { + return rv; + } + rv = Convert(aIn3, mArg3); + if (NS_FAILED(rv)) { + return rv; + } + rv = Convert(aIn4, mArg4); + if (NS_FAILED(rv)) { + return rv; + } + return NS_OK; + } + + Res (ObjectType::*mMethod)(Arg1, Arg2, Arg3, Arg4); + Tin1 mArg1; + Tin2 mArg2; + Tin3 mArg3; + Tin4 mArg4; +}; + +template +class BluetoothNotificationRunnable5 : public nsRunnable +{ +public: + typedef typename ObjectWrapper::ObjectType ObjectType; + typedef BluetoothNotificationRunnable5 SelfType; + + template + static already_AddRefed Create( + Res (ObjectType::*aMethod)(Arg1, Arg2, Arg3, Arg4, Arg5), + const T1& aIn1, const T2& aIn2, const T3& aIn3, + const T4& aIn4, const T5& aIn5) + { + nsRefPtr runnable(new SelfType(aMethod)); + + if (NS_FAILED(runnable->ConvertAndSet(aIn1, aIn2, aIn3, aIn4, aIn5))) { + return nullptr; + } + return runnable.forget(); + } + + template + static void + Dispatch(Res (ObjectType::*aMethod)(Arg1, Arg2, Arg3, Arg4, Arg5), + const T1& aIn1, const T2& aIn2, const T3& aIn3, + const T4& aIn4, const T5& aIn5) + { + nsRefPtr runnable = Create(aMethod, + aIn1, aIn2, aIn3, aIn4, aIn5); + if (!runnable) { + BT_WARNING("BluetoothNotificationRunnable5::Create failed"); + return; + } + nsresult rv = NS_DispatchToMainThread(runnable); + if (NS_FAILED(rv)) { + BT_WARNING("NS_DispatchToMainThread failed: %X", rv); + } + } + + NS_METHOD + Run() MOZ_OVERRIDE + { + MOZ_ASSERT(NS_IsMainThread()); + + ObjectType* obj = ObjectWrapper::GetInstance(); + + if (!obj) { + BT_WARNING("Notification handler not initialized"); + } else { + ((*obj).*mMethod)(mArg1, mArg2, mArg3, mArg4, mArg5); + } + return NS_OK; + } + +private: + BluetoothNotificationRunnable5(Res (ObjectType::*aMethod)(Arg1, Arg2, Arg3, + Arg4, Arg5)) + : mMethod(aMethod) + { + MOZ_ASSERT(mMethod); + } + + template + nsresult + ConvertAndSet(const T1& aIn1, const T2& aIn2, const T3& aIn3, + const T4& aIn4, const T5& aIn5) + { + nsresult rv = Convert(aIn1, mArg1); + if (NS_FAILED(rv)) { + return rv; + } + rv = Convert(aIn2, mArg2); + if (NS_FAILED(rv)) { + return rv; + } + rv = Convert(aIn3, mArg3); + if (NS_FAILED(rv)) { + return rv; + } + rv = Convert(aIn4, mArg4); + if (NS_FAILED(rv)) { + return rv; + } + rv = Convert(aIn5, mArg5); + if (NS_FAILED(rv)) { + return rv; + } + return NS_OK; + } + + Res (ObjectType::*mMethod)(Arg1, Arg2, Arg3, Arg4, Arg5); + Tin1 mArg1; + Tin2 mArg2; + Tin3 mArg3; + Tin4 mArg4; + Tin5 mArg5; +}; + // // Socket Interface // From 3d6383e252827065fbfa8175847b66a47b19b449 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 2 Sep 2014 12:38:45 +0200 Subject: [PATCH 102/139] Bug 1054242: Add Bluetooth Core notifications (under bluetooth2/), r=btian A notification is a callback from the Bluetooth backend to inform Gecko about a event. Bluedroid uses function pointers for this, but in Gecko we use method calls instead. Gecko implements notification handlers for the Bluetooth backend. The backend converts incomming events to Gecko types and forwards them to the registered notification handler. --- dom/bluetooth2/BluetoothCommon.h | 95 ++++ .../bluedroid/BluetoothInterface.cpp | 530 ++++++++++++++++++ dom/bluetooth2/bluedroid/BluetoothInterface.h | 44 ++ 3 files changed, 669 insertions(+) diff --git a/dom/bluetooth2/BluetoothCommon.h b/dom/bluetooth2/BluetoothCommon.h index 08293b5c606e..6f7270b987b6 100644 --- a/dom/bluetooth2/BluetoothCommon.h +++ b/dom/bluetooth2/BluetoothCommon.h @@ -194,6 +194,101 @@ enum BluetoothStatus { STATUS_RMT_DEV_DOWN }; +enum BluetoothBondState { + BOND_STATE_NONE, + BOND_STATE_BONDING, + BOND_STATE_BONDED +}; + +enum BluetoothDeviceType { + DEVICE_TYPE_BREDR, + DEVICE_TYPE_BLE, + DEVICE_TYPE_DUAL +}; + +enum BluetoothPropertyType { + PROPERTY_BDNAME, + PROPERTY_BDADDR, + PROPERTY_UUIDS, + PROPERTY_CLASS_OF_DEVICE, + PROPERTY_TYPE_OF_DEVICE, + PROPERTY_SERVICE_RECORD, + PROPERTY_ADAPTER_SCAN_MODE, + PROPERTY_ADAPTER_BONDED_DEVICES, + PROPERTY_ADAPTER_DISCOVERY_TIMEOUT, + PROPERTY_REMOTE_FRIENDLY_NAME, + PROPERTY_REMOTE_RSSI, + PROPERTY_REMOTE_VERSION_INFO, + PROPERTY_REMOTE_DEVICE_TIMESTAMP +}; + +enum BluetoothScanMode { + SCAN_MODE_NONE, + SCAN_MODE_CONNECTABLE, + SCAN_MODE_CONNECTABLE_DISCOVERABLE +}; + +enum BluetoothSspVariant { + SSP_VARIANT_PASSKEY_CONFIRMATION, + SSP_VARIANT_PASSKEY_ENTRY, + SSP_VARIANT_CONSENT, + SSP_VARIANT_PASSKEY_NOTIFICATION +}; + +struct BluetoothUuid { + uint8_t mUuid[16]; +}; + +struct BluetoothServiceRecord { + BluetoothUuid mUuid; + uint16_t mChannel; + char mName[256]; +}; + +struct BluetoothRemoteInfo { + int mVerMajor; + int mVerMinor; + int mManufacturer; +}; + +struct BluetoothProperty { + /* Type */ + BluetoothPropertyType mType; + + /* Value + */ + + /* PROPERTY_BDNAME + PROPERTY_BDADDR + PROPERTY_REMOTE_FRIENDLY_NAME */ + nsString mString; + + /* PROPERTY_UUIDS */ + nsTArray mUuidArray; + + /* PROPERTY_ADAPTER_BONDED_DEVICES */ + nsTArray mStringArray; + + /* PROPERTY_CLASS_OF_DEVICE + PROPERTY_ADAPTER_DISCOVERY_TIMEOUT */ + uint32_t mUint32; + + /* PROPERTY_RSSI_VALUE */ + int32_t mInt32; + + /* PROPERTY_DEVICE_TYPE */ + BluetoothDeviceType mDeviceType; + + /* PROPERTY_SERVICE_RECORD */ + BluetoothServiceRecord mServiceRecord; + + /* PROPERTY_SCAN_MODE */ + BluetoothScanMode mScanMode; + + /* PROPERTY_REMOTE_VERSION_INFO */ + BluetoothRemoteInfo mRemoteInfo; +}; + enum BluetoothSocketType { RFCOMM = 1, SCO = 2, diff --git a/dom/bluetooth2/bluedroid/BluetoothInterface.cpp b/dom/bluetooth2/bluedroid/BluetoothInterface.cpp index 3c5ae885be79..8f6029c8da84 100644 --- a/dom/bluetooth2/bluedroid/BluetoothInterface.cpp +++ b/dom/bluetooth2/bluedroid/BluetoothInterface.cpp @@ -23,6 +23,8 @@ out_ #endif +#define MAX_UUID_SIZE 16 + BEGIN_BLUETOOTH_NAMESPACE template @@ -92,6 +94,23 @@ Convert(bool aIn, bt_scan_mode_t& aOut) return NS_OK; } + +static nsresult +Convert(bt_scan_mode_t aIn, BluetoothScanMode& aOut) +{ + static const BluetoothScanMode sScanMode[] = { + CONVERT(BT_SCAN_MODE_NONE, SCAN_MODE_NONE), + CONVERT(BT_SCAN_MODE_CONNECTABLE, SCAN_MODE_CONNECTABLE), + CONVERT(BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE, + SCAN_MODE_CONNECTABLE_DISCOVERABLE) + }; + if (aIn >= MOZ_ARRAY_LENGTH(sScanMode)) { + return NS_ERROR_ILLEGAL_VALUE; + } + aOut = sScanMode[aIn]; + return NS_OK; +} + struct ConvertNamedValue { ConvertNamedValue(const BluetoothNamedValue& aNamedValue) @@ -173,6 +192,24 @@ Convert(const nsAString& aIn, bt_ssp_variant_t& aOut) return NS_OK; } +static nsresult +Convert(const bt_ssp_variant_t& aIn, BluetoothSspVariant& aOut) +{ + static const BluetoothSspVariant sSspVariant[] = { + CONVERT(BT_SSP_VARIANT_PASSKEY_CONFIRMATION, + SSP_VARIANT_PASSKEY_CONFIRMATION), + CONVERT(BT_SSP_VARIANT_PASSKEY_ENTRY, SSP_VARIANT_PASSKEY_ENTRY), + CONVERT(BT_SSP_VARIANT_CONSENT, SSP_VARIANT_CONSENT), + CONVERT(BT_SSP_VARIANT_PASSKEY_NOTIFICATION, + SSP_VARIANT_PASSKEY_NOTIFICATION) + }; + if (aIn >= MOZ_ARRAY_LENGTH(sSspVariant)) { + return NS_ERROR_ILLEGAL_VALUE; + } + aOut = sSspVariant[aIn]; + return NS_OK; +} + static nsresult Convert(const bool& aIn, uint8_t& aOut) { @@ -193,6 +230,18 @@ Convert(const uint8_t aIn[16], bt_uuid_t& aOut) return NS_OK; } +static nsresult +Convert(const bt_uuid_t& aIn, BluetoothUuid& aOut) +{ + if (sizeof(aIn.uu) != sizeof(aOut.mUuid)) { + return NS_ERROR_ILLEGAL_VALUE; + } + + memcpy(aOut.mUuid, aIn.uu, sizeof(aOut.mUuid)); + + return NS_OK; +} + static nsresult Convert(const nsAString& aIn, bt_pin_code_t& aOut) { @@ -241,6 +290,166 @@ Convert(const bt_bdaddr_t& aIn, nsAString& aOut) return NS_OK; } +static nsresult +Convert(const bt_bdaddr_t* aIn, nsAString& aOut) +{ + if (!aIn) { + aOut.AssignLiteral(BLUETOOTH_ADDRESS_NONE); + return NS_OK; + } + return Convert(*aIn, aOut); +} + +static nsresult +Convert(bt_state_t aIn, bool& aOut) +{ + static const bool sState[] = { + CONVERT(BT_STATE_OFF, false), + CONVERT(BT_STATE_ON, true) + }; + if (aIn >= MOZ_ARRAY_LENGTH(sState)) { + return NS_ERROR_ILLEGAL_VALUE; + } + aOut = sState[aIn]; + return NS_OK; +} + +static nsresult +Convert(bt_property_type_t aIn, BluetoothPropertyType& aOut) +{ + static const BluetoothPropertyType sPropertyType[] = { + CONVERT(0, static_cast(0)), // invalid, required by gcc + CONVERT(BT_PROPERTY_BDNAME, PROPERTY_BDNAME), + CONVERT(BT_PROPERTY_BDADDR, PROPERTY_BDADDR), + CONVERT(BT_PROPERTY_UUIDS, PROPERTY_UUIDS), + CONVERT(BT_PROPERTY_CLASS_OF_DEVICE, PROPERTY_CLASS_OF_DEVICE), + CONVERT(BT_PROPERTY_TYPE_OF_DEVICE, PROPERTY_TYPE_OF_DEVICE), + CONVERT(BT_PROPERTY_SERVICE_RECORD, PROPERTY_SERVICE_RECORD), + CONVERT(BT_PROPERTY_ADAPTER_SCAN_MODE, PROPERTY_ADAPTER_SCAN_MODE), + CONVERT(BT_PROPERTY_ADAPTER_BONDED_DEVICES, + PROPERTY_ADAPTER_BONDED_DEVICES), + CONVERT(BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT, + PROPERTY_ADAPTER_DISCOVERY_TIMEOUT), + CONVERT(BT_PROPERTY_REMOTE_FRIENDLY_NAME, PROPERTY_REMOTE_FRIENDLY_NAME), + CONVERT(BT_PROPERTY_REMOTE_RSSI, PROPERTY_REMOTE_RSSI), + CONVERT(BT_PROPERTY_REMOTE_VERSION_INFO,PROPERTY_REMOTE_VERSION_INFO) + }; + if (aIn == BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP) { + /* This case is handled separately to not populate + * |sPropertyType| with empty entries. */ + aOut = PROPERTY_REMOTE_DEVICE_TIMESTAMP; + return NS_OK; + } + if (!aIn || aIn >= MOZ_ARRAY_LENGTH(sPropertyType)) { + return NS_ERROR_ILLEGAL_VALUE; + } + aOut = sPropertyType[aIn]; + return NS_OK; +} + +static nsresult +Convert(bt_discovery_state_t aIn, bool& aOut) +{ + static const bool sDiscoveryState[] = { + CONVERT(BT_DISCOVERY_STOPPED, false), + CONVERT(BT_DISCOVERY_STARTED, true) + }; + if (aIn >= MOZ_ARRAY_LENGTH(sDiscoveryState)) { + return NS_ERROR_ILLEGAL_VALUE; + } + aOut = sDiscoveryState[aIn]; + return NS_OK; +} + +static nsresult +Convert(const bt_bdname_t& aIn, nsAString& aOut) +{ + aOut = NS_ConvertUTF8toUTF16(reinterpret_cast(aIn.name)); + + return NS_OK; +} + +static nsresult +Convert(const bt_bdname_t* aIn, nsAString& aOut) +{ + if (!aIn) { + aOut.Truncate(); + return NS_OK; + } + return Convert(*aIn, aOut); +} + +static nsresult +Convert(bt_bond_state_t aIn, BluetoothBondState& aOut) +{ + static const BluetoothBondState sBondState[] = { + CONVERT(BT_BOND_STATE_NONE, BOND_STATE_NONE), + CONVERT(BT_BOND_STATE_BONDING, BOND_STATE_BONDING), + CONVERT(BT_BOND_STATE_BONDED, BOND_STATE_BONDED) + }; + if (aIn >= MOZ_ARRAY_LENGTH(sBondState)) { + return NS_ERROR_ILLEGAL_VALUE; + } + aOut = sBondState[aIn]; + return NS_OK; +} + +static nsresult +Convert(bt_acl_state_t aIn, bool& aOut) +{ + static const bool sAclState[] = { + CONVERT(BT_ACL_STATE_CONNECTED, true), + CONVERT(BT_ACL_STATE_DISCONNECTED, false) + }; + if (aIn >= MOZ_ARRAY_LENGTH(sAclState)) { + return NS_ERROR_ILLEGAL_VALUE; + } + aOut = sAclState[aIn]; + return NS_OK; +} + +static nsresult +Convert(bt_device_type_t aIn, BluetoothDeviceType& aOut) +{ + static const BluetoothDeviceType sDeviceType[] = { + CONVERT(0, static_cast(0)), // invalid, required by gcc + CONVERT(BT_DEVICE_DEVTYPE_BREDR, DEVICE_TYPE_BREDR), + CONVERT(BT_DEVICE_DEVTYPE_BLE, DEVICE_TYPE_BLE), + CONVERT(BT_DEVICE_DEVTYPE_DUAL, DEVICE_TYPE_DUAL) + }; + if (!aIn || aIn >= MOZ_ARRAY_LENGTH(sDeviceType)) { + return NS_ERROR_ILLEGAL_VALUE; + } + aOut = sDeviceType[aIn]; + return NS_OK; +} + +static nsresult +Convert(const bt_remote_version_t& aIn, BluetoothRemoteInfo& aOut) +{ + aOut.mVerMajor = aIn.version; + aOut.mVerMinor = aIn.sub_ver; + aOut.mManufacturer = aIn.manufacturer; + + return NS_OK; +} + +static nsresult +Convert(const bt_service_record_t& aIn, BluetoothServiceRecord& aOut) +{ + nsresult rv = Convert(aIn.uuid, aOut.mUuid); + if (NS_FAILED(rv)) { + return rv; + } + + aOut.mChannel = aIn.channel; + + MOZ_ASSERT(sizeof(aIn.name) == sizeof(aOut.mName)); + memcpy(aOut.mName, aIn.name, sizeof(aOut.mName)); + + return NS_OK; +} + static nsresult Convert(BluetoothSocketType aIn, btsock_type_t& aOut) { @@ -556,6 +765,101 @@ ConvertDefault(const Tin& aIn, const Tout& aDefault) return out; } +/* This implementation of |Convert| is a helper for copying the + * input value into the output value. It handles all cases that + * need no conversion. + */ +template +static nsresult +Convert(const T& aIn, T& aOut) +{ + aOut = aIn; + + return NS_OK; +} + +static nsresult +Convert(const bt_property_t& aIn, BluetoothProperty& aOut) +{ + /* type conversion */ + + nsresult rv = Convert(aIn.type, aOut.mType); + if (NS_FAILED(rv)) { + return rv; + } + + /* value conversion */ + + switch (aOut.mType) { + case PROPERTY_BDNAME: + /* fall through */ + case PROPERTY_REMOTE_FRIENDLY_NAME: + { + // We construct an nsCString here because bdname + // returned from Bluedroid is not 0-terminated. + aOut.mString = NS_ConvertUTF8toUTF16( + nsCString(static_cast(aIn.val), aIn.len)); + } + break; + case PROPERTY_BDADDR: + rv = Convert(*static_cast(aIn.val), aOut.mString); + break; + case PROPERTY_UUIDS: + { + size_t numUuids = aIn.len / MAX_UUID_SIZE; + ConvertArray array( + static_cast(aIn.val), numUuids); + aOut.mUuidArray.SetLength(numUuids); + rv = Convert(array, aOut.mUuidArray); + } + break; + case PROPERTY_CLASS_OF_DEVICE: + /* fall through */ + case PROPERTY_ADAPTER_DISCOVERY_TIMEOUT: + aOut.mUint32 = *static_cast(aIn.val); + break; + case PROPERTY_TYPE_OF_DEVICE: + rv = Convert(*static_cast(aIn.val), + aOut.mDeviceType); + break; + case PROPERTY_SERVICE_RECORD: + rv = Convert(*static_cast(aIn.val), + aOut.mServiceRecord); + break; + case PROPERTY_ADAPTER_SCAN_MODE: + rv = Convert(*static_cast(aIn.val), + aOut.mScanMode); + break; + case PROPERTY_ADAPTER_BONDED_DEVICES: + { + size_t numAddresses = aIn.len / BLUETOOTH_ADDRESS_BYTES; + ConvertArray array( + static_cast(aIn.val), numAddresses); + aOut.mStringArray.SetLength(numAddresses); + rv = Convert(array, aOut.mStringArray); + } + break; + case PROPERTY_REMOTE_RSSI: + aOut.mInt32 = *static_cast(aIn.val); + break; + case PROPERTY_REMOTE_VERSION_INFO: + rv = Convert(*static_cast(aIn.val), + aOut.mRemoteInfo); + break; + case PROPERTY_REMOTE_DEVICE_TIMESTAMP: + /* nothing to do */ + break; + default: + /* mismatch with type conversion */ + NS_NOTREACHED("Unhandled property type"); + break; + } + if (NS_FAILED(rv)) { + return rv; + } + return NS_OK; +} + // // Result handling // @@ -2430,6 +2734,232 @@ DispatchBluetoothResult(BluetoothResultHandler* aRes, return rv; } +// Notification handling +// + +BluetoothNotificationHandler::~BluetoothNotificationHandler() +{ } + +static BluetoothNotificationHandler* sNotificationHandler; + +struct BluetoothCallback +{ + class NotificationHandlerWrapper + { + public: + typedef BluetoothNotificationHandler ObjectType; + + static ObjectType* GetInstance() + { + MOZ_ASSERT(NS_IsMainThread()); + + return sNotificationHandler; + } + }; + + // Notifications + + typedef BluetoothNotificationRunnable1 + AdapterStateChangedNotification; + + typedef BluetoothNotificationRunnable3, + BluetoothStatus, int, + const BluetoothProperty*> + AdapterPropertiesNotification; + + typedef BluetoothNotificationRunnable4, + BluetoothStatus, const nsAString&, + int, const BluetoothProperty*> + RemoteDevicePropertiesNotification; + + typedef BluetoothNotificationRunnable2, + int, const BluetoothProperty*> + DeviceFoundNotification; + + typedef BluetoothNotificationRunnable1 + DiscoveryStateChangedNotification; + + typedef BluetoothNotificationRunnable3 + PinRequestNotification; + + typedef BluetoothNotificationRunnable5 + SspRequestNotification; + + typedef BluetoothNotificationRunnable3 + BondStateChangedNotification; + + typedef BluetoothNotificationRunnable3 + AclStateChangedNotification; + + typedef BluetoothNotificationRunnable3, + uint8_t, uint16_t, const uint8_t*> + DutModeRecvNotification; + + typedef BluetoothNotificationRunnable2 + LeTestModeNotification; + + // Bluedroid callbacks + + static const bt_property_t* + AlignedProperties(bt_property_t* aProperties, size_t aNumProperties, + nsAutoArrayPtr& aPropertiesArray) + { + // See Bug 989976: consider aProperties address is not aligned. If + // it is aligned, we return the pointer directly; otherwise we make + // an aligned copy. The argument |aPropertiesArray| keeps track of + // the memory buffer. + if (!(reinterpret_cast(aProperties) % sizeof(void*))) { + return aProperties; + } + + bt_property_t* properties = new bt_property_t[aNumProperties]; + memcpy(properties, aProperties, aNumProperties * sizeof(*properties)); + aPropertiesArray = properties; + + return properties; + } + + static void + AdapterStateChanged(bt_state_t aStatus) + { + AdapterStateChangedNotification::Dispatch( + &BluetoothNotificationHandler::AdapterStateChangedNotification, + aStatus); + } + + static void + AdapterProperties(bt_status_t aStatus, int aNumProperties, + bt_property_t* aProperties) + { + nsAutoArrayPtr propertiesArray; + + AdapterPropertiesNotification::Dispatch( + &BluetoothNotificationHandler::AdapterPropertiesNotification, + ConvertDefault(aStatus, STATUS_FAIL), aNumProperties, + ConvertArray( + AlignedProperties(aProperties, aNumProperties, propertiesArray), + aNumProperties)); + } + + static void + RemoteDeviceProperties(bt_status_t aStatus, bt_bdaddr_t* aBdAddress, + int aNumProperties, bt_property_t* aProperties) + { + nsAutoArrayPtr propertiesArray; + + RemoteDevicePropertiesNotification::Dispatch( + &BluetoothNotificationHandler::RemoteDevicePropertiesNotification, + ConvertDefault(aStatus, STATUS_FAIL), aBdAddress, aNumProperties, + ConvertArray( + AlignedProperties(aProperties, aNumProperties, propertiesArray), + aNumProperties)); + } + + static void + DeviceFound(int aNumProperties, bt_property_t* aProperties) + { + nsAutoArrayPtr propertiesArray; + + DeviceFoundNotification::Dispatch( + &BluetoothNotificationHandler::DeviceFoundNotification, + aNumProperties, + ConvertArray( + AlignedProperties(aProperties, aNumProperties, propertiesArray), + aNumProperties)); + } + + static void + DiscoveryStateChanged(bt_discovery_state_t aState) + { + DiscoveryStateChangedNotification::Dispatch( + &BluetoothNotificationHandler::DiscoveryStateChangedNotification, + aState); + } + + static void + PinRequest(bt_bdaddr_t* aRemoteBdAddress, + bt_bdname_t* aRemoteBdName, uint32_t aRemoteClass) + { + PinRequestNotification::Dispatch( + &BluetoothNotificationHandler::PinRequestNotification, + aRemoteBdAddress, aRemoteBdName, aRemoteClass); + } + + static void + SspRequest(bt_bdaddr_t* aRemoteBdAddress, bt_bdname_t* aRemoteBdName, + uint32_t aRemoteClass, bt_ssp_variant_t aPairingVariant, + uint32_t aPasskey) + { + SspRequestNotification::Dispatch( + &BluetoothNotificationHandler::SspRequestNotification, + aRemoteBdAddress, aRemoteBdName, aRemoteClass, + aPairingVariant, aPasskey); + } + + static void + BondStateChanged(bt_status_t aStatus, bt_bdaddr_t* aRemoteBdAddress, + bt_bond_state_t aState) + { + BondStateChangedNotification::Dispatch( + &BluetoothNotificationHandler::BondStateChangedNotification, + aStatus, aRemoteBdAddress, aState); + } + + static void + AclStateChanged(bt_status_t aStatus, bt_bdaddr_t* aRemoteBdAddress, + bt_acl_state_t aState) + { + AclStateChangedNotification::Dispatch( + &BluetoothNotificationHandler::AclStateChangedNotification, + aStatus, aRemoteBdAddress, aState); + } + + static void + ThreadEvt(bt_cb_thread_evt evt) + { + // This callback maintains internal state and is not exported. + } + + static void + DutModeRecv(uint16_t aOpcode, uint8_t* aBuf, uint8_t aLen) + { + DutModeRecvNotification::Dispatch( + &BluetoothNotificationHandler::DutModeRecvNotification, + aOpcode, ConvertArray(aBuf, aLen), aLen); + } + + static void + LeTestMode(bt_status_t aStatus, uint16_t aNumPackets) + { + LeTestModeNotification::Dispatch( + &BluetoothNotificationHandler::LeTestModeNotification, + aStatus, aNumPackets); + } +}; + +// Interface +// + /* returns the container structure of a variable; _t is the container's * type, _v the name of the variable, and _m is _v's field within _t */ diff --git a/dom/bluetooth2/bluedroid/BluetoothInterface.h b/dom/bluetooth2/bluedroid/BluetoothInterface.h index 3720e33e73e6..b95a1ceaf998 100644 --- a/dom/bluetooth2/bluedroid/BluetoothInterface.h +++ b/dom/bluetooth2/bluedroid/BluetoothInterface.h @@ -326,6 +326,50 @@ private: // Bluetooth Core Interface // +class BluetoothNotificationHandler +{ +public: + virtual ~BluetoothNotificationHandler(); + + virtual void AdapterStateChangedNotification(bool aState) { } + virtual void AdapterPropertiesNotification( + BluetoothStatus aStatus, int aNumProperties, + const BluetoothProperty* aProperties) { } + + virtual void RemoteDevicePropertiesNotification( + BluetoothStatus aStatus, const nsAString& aBdAddr, + int aNumProperties, const BluetoothProperty* aProperties) { } + + virtual void DeviceFoundNotification( + int aNumProperties, const BluetoothProperty* aProperties) { } + + virtual void DiscoveryStateChangedNotification(bool aState) { } + + virtual void PinRequestNotification(const nsAString& aRemoteBdAddr, + const nsAString& aBdName, uint32_t aCod) { } + virtual void SspRequestNotification(const nsAString& aRemoteBdAddr, + const nsAString& aBdName, + uint32_t aCod, + BluetoothSspVariant aPairingVariant, + uint32_t aPassKey) { } + + virtual void BondStateChangedNotification(BluetoothStatus aStatus, + const nsAString& aRemoteBdAddr, + BluetoothBondState aState) { } + virtual void AclStateChangedNotification(BluetoothStatus aStatus, + const nsAString& aRemoteBdAddr, + bool aState) { } + + virtual void DutModeRecvNotification(uint16_t aOpcode, + const uint8_t* aBuf, uint8_t aLen) { } + virtual void LeTestModeNotification(BluetoothStatus aStatus, + uint16_t aNumPackets) { } + +protected: + BluetoothNotificationHandler() + { } +}; + class BluetoothResultHandler { public: From 20b8e8fc6dbf7f2fcefc79480edbf4b6ddadb3c2 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 2 Sep 2014 12:38:45 +0200 Subject: [PATCH 103/139] Bug 1054242: Implement Bluetooth Core notifications (under bluetooth2/), r=btian This patch adds the Gecko-side of the Core notifications. The current implementation of the notification methods has been copied from the repsective Bluedroid callback methods, with only minor changes to adapt them to Gecko data types. --- .../bluedroid/BluetoothServiceBluedroid.cpp | 367 +++++++++++++++++- .../bluedroid/BluetoothServiceBluedroid.h | 42 ++ dom/bluetooth2/bluedroid/BluetoothUtils.cpp | 23 ++ dom/bluetooth2/bluedroid/BluetoothUtils.h | 3 + 4 files changed, 433 insertions(+), 2 deletions(-) diff --git a/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp b/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp index 42036e9c934a..8b9e7ee5b14c 100644 --- a/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp +++ b/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp @@ -20,7 +20,6 @@ #include "BluetoothA2dpManager.h" #include "BluetoothHfpManager.h" -#include "BluetoothInterface.h" #include "BluetoothOppManager.h" #include "BluetoothProfileController.h" #include "BluetoothReplyRunnable.h" @@ -342,7 +341,7 @@ public: /** * AdapterPropertiesCallback will be called after enable() but before - * AdapterStateChangeCallback is called. At that moment, both + * AdapterStateChangedCallback is called. At that moment, both * BluetoothManager/BluetoothAdapter does not register observer yet. */ static void @@ -1779,3 +1778,367 @@ void BluetoothServiceBluedroid::ToggleCalls(BluetoothReplyRunnable* aRunnable) { } + +// +// Bluetooth notifications +// + +void +BluetoothServiceBluedroid::AdapterStateChangedNotification(bool aState) +{ + MOZ_ASSERT(NS_IsMainThread()); + + BT_LOGR("BT_STATE: %d", aState); + + sAdapterEnabled = aState; + + if (!sAdapterEnabled && + NS_FAILED(NS_DispatchToMainThread(new CleanupTask()))) { + BT_WARNING("Failed to dispatch to main thread!"); + return; + } + + nsRefPtr runnable = + new BluetoothService::ToggleBtAck(sAdapterEnabled); + if (NS_FAILED(NS_DispatchToMainThread(runnable))) { + BT_WARNING("Failed to dispatch to main thread!"); + return; + } + + if (sAdapterEnabled && + NS_FAILED(NS_DispatchToMainThread(new SetupAfterEnabledTask()))) { + BT_WARNING("Failed to dispatch to main thread!"); + return; + } + + // Redirect to main thread to avoid racing problem + NS_DispatchToMainThread(new AdapterStateChangedCallbackTask()); +} + +/** + * AdapterPropertiesNotification will be called after enable() but + * before AdapterStateChangeNotification is called. At that moment, + * BluetoothManager and BluetoothAdapter, do not register observer + * yet. + */ +void +BluetoothServiceBluedroid::AdapterPropertiesNotification( + BluetoothStatus aStatus, int aNumProperties, + const BluetoothProperty* aProperties) +{ + MOZ_ASSERT(NS_IsMainThread()); + + InfallibleTArray propertiesArray; + + for (int i = 0; i < aNumProperties; i++) { + + const BluetoothProperty& p = aProperties[i]; + + if (p.mType == PROPERTY_BDADDR) { + sAdapterBdAddress = p.mString; + BT_APPEND_NAMED_VALUE(propertiesArray, "Address", sAdapterBdAddress); + + } else if (p.mType == PROPERTY_BDNAME) { + sAdapterBdName = p.mString; + BT_APPEND_NAMED_VALUE(propertiesArray, "Name", sAdapterBdName); + + } else if (p.mType == PROPERTY_ADAPTER_SCAN_MODE) { + sAdapterDiscoverable = + (p.mScanMode == SCAN_MODE_CONNECTABLE_DISCOVERABLE); + BT_APPEND_NAMED_VALUE(propertiesArray, "Discoverable", + sAdapterDiscoverable); + + } else if (p.mType == PROPERTY_ADAPTER_BONDED_DEVICES) { + // We have to cache addresses of bonded devices. Unlike BlueZ, + // Bluedroid would not send another PROPERTY_ADAPTER_BONDED_DEVICES + // event after bond completed. + BT_LOGD("Adapter property: BONDED_DEVICES. Count: %d", + p.mStringArray.Length()); + + nsTArray pairedDeviceAddresses; + for (size_t index = 0; index < p.mStringArray.Length(); index++) { + pairedDeviceAddresses.AppendElement(p.mStringArray[index]); + } + + BT_APPEND_NAMED_VALUE(propertiesArray, "PairedDevices", pairedDeviceAddresses); + + } else { + BT_LOGD("Unhandled adapter property type: %d", p.mType); + continue; + } + } + + NS_ENSURE_TRUE_VOID(propertiesArray.Length() > 0); + + BluetoothValue value(propertiesArray); + BluetoothSignal signal(NS_LITERAL_STRING("PropertyChanged"), + NS_LITERAL_STRING(KEY_ADAPTER), value); + nsRefPtr + t = new DistributeBluetoothSignalTask(signal); + if (NS_FAILED(NS_DispatchToMainThread(t))) { + BT_WARNING("Failed to dispatch to main thread!"); + } + + // Redirect to main thread to avoid racing problem + NS_DispatchToMainThread(new AdapterPropertiesCallbackTask()); +} + +/** + * RemoteDevicePropertiesNotification will be called + * + * (1) automatically by Bluedroid when BT is turning on, + * (2) as result of GetRemoteDeviceProperties, or + * (3) as result of GetRemoteServices. + */ +void +BluetoothServiceBluedroid::RemoteDevicePropertiesNotification( + BluetoothStatus aStatus, const nsAString& aBdAddr, + int aNumProperties, const BluetoothProperty* aProperties) +{ + MOZ_ASSERT(NS_IsMainThread()); + + InfallibleTArray propertiesArray; + + BT_APPEND_NAMED_VALUE(propertiesArray, "Address", nsString(aBdAddr)); + + for (int i = 0; i < aNumProperties; ++i) { + + const BluetoothProperty& p = aProperties[i]; + + if (p.mType == PROPERTY_BDNAME) { + BT_APPEND_NAMED_VALUE(propertiesArray, "Name", p.mString); + + } else if (p.mType == PROPERTY_CLASS_OF_DEVICE) { + uint32_t cod = p.mUint32; + BT_APPEND_NAMED_VALUE(propertiesArray, "Cod", cod); + + } else if (p.mType == PROPERTY_UUIDS) { + nsTArray uuids; + + // Construct a sorted uuid set + for (uint32_t index = 0; index < p.mUuidArray.Length(); ++index) { + nsAutoString uuid; + UuidToString(p.mUuidArray[index], uuid); + + if (!uuids.Contains(uuid)) { // filter out duplicate uuids + uuids.InsertElementSorted(uuid); + } + } + BT_APPEND_NAMED_VALUE(propertiesArray, "UUIDs", uuids); + + } else { + BT_LOGD("Other non-handled device properties. Type: %d", p.mType); + } + } + + // Redirect to main thread to avoid racing problem + NS_DispatchToMainThread( + new RemoteDevicePropertiesCallbackTask(propertiesArray, aBdAddr)); +} + +void +BluetoothServiceBluedroid::DeviceFoundNotification( + int aNumProperties, const BluetoothProperty* aProperties) +{ + MOZ_ASSERT(NS_IsMainThread()); + + BluetoothValue propertyValue; + InfallibleTArray propertiesArray; + + for (int i = 0; i < aNumProperties; i++) { + + const BluetoothProperty& p = aProperties[i]; + + if (p.mType == PROPERTY_BDADDR) { + BT_APPEND_NAMED_VALUE(propertiesArray, "Address", p.mString); + + } else if (p.mType == PROPERTY_BDNAME) { + BT_APPEND_NAMED_VALUE(propertiesArray, "Name", p.mString); + + } else if (p.mType == PROPERTY_CLASS_OF_DEVICE) { + BT_APPEND_NAMED_VALUE(propertiesArray, "Cod", p.mUint32); + + } else if (p.mType == PROPERTY_UUIDS) { + nsTArray uuids; + + // Construct a sorted uuid set + for (uint32_t index = 0; index < p.mUuidArray.Length(); ++index) { + nsAutoString uuid; + UuidToString(p.mUuidArray[index], uuid); + + if (!uuids.Contains(uuid)) { // filter out duplicate uuids + uuids.InsertElementSorted(uuid); + } + } + BT_APPEND_NAMED_VALUE(propertiesArray, "UUIDs", uuids); + + } else { + BT_LOGD("Not handled remote device property: %d", p.mType); + } + } + + BluetoothValue value = propertiesArray; + BluetoothSignal signal(NS_LITERAL_STRING("DeviceFound"), + NS_LITERAL_STRING(KEY_ADAPTER), value); + nsRefPtr + t = new DistributeBluetoothSignalTask(signal); + if (NS_FAILED(NS_DispatchToMainThread(t))) { + BT_WARNING("Failed to dispatch to main thread!"); + } +} + +void +BluetoothServiceBluedroid::DiscoveryStateChangedNotification(bool aState) +{ + MOZ_ASSERT(NS_IsMainThread()); + + sAdapterDiscovering = aState; + + // Redirect to main thread to avoid racing problem + NS_DispatchToMainThread(new DiscoveryStateChangedCallbackTask()); +} + +void +BluetoothServiceBluedroid::PinRequestNotification(const nsAString& aRemoteBdAddr, + const nsAString& aBdName, + uint32_t aCod) +{ + MOZ_ASSERT(NS_IsMainThread()); + + InfallibleTArray propertiesArray; + + BT_APPEND_NAMED_VALUE(propertiesArray, "address", nsString(aRemoteBdAddr)); + BT_APPEND_NAMED_VALUE(propertiesArray, "passkey", EmptyString()); + BT_APPEND_NAMED_VALUE(propertiesArray, "type", + NS_LITERAL_STRING(PAIRING_REQ_TYPE_ENTERPINCODE)); + + BluetoothSignal signal(NS_LITERAL_STRING("PairingRequest"), + NS_LITERAL_STRING(KEY_ADAPTER), + BluetoothValue(propertiesArray)); + + nsRefPtr task = + new DistributeBluetoothSignalTask(signal); + if (NS_FAILED(NS_DispatchToMainThread(task))) { + BT_WARNING("Failed to dispatch to main thread!"); + } +} + +void +BluetoothServiceBluedroid::SspRequestNotification( + const nsAString& aRemoteBdAddr, const nsAString& aBdName, uint32_t aCod, + BluetoothSspVariant aPairingVariant, uint32_t aPasskey) +{ + MOZ_ASSERT(NS_IsMainThread()); + + InfallibleTArray propertiesArray; + nsAutoString passkey; + nsAutoString pairingType; + + /** + * Assign pairing request type and passkey based on the pairing variant. + * + * passkey value based on pairing request type: + * 1) aPasskey: PAIRING_REQ_TYPE_CONFIRMATION and + * PAIRING_REQ_TYPE_DISPLAYPASSKEY + * 2) empty string: PAIRING_REQ_TYPE_CONSENT + */ + switch (aPairingVariant) { + case SSP_VARIANT_PASSKEY_CONFIRMATION: + pairingType.AssignLiteral(PAIRING_REQ_TYPE_CONFIRMATION); + passkey.AppendInt(aPasskey); + break; + case SSP_VARIANT_PASSKEY_NOTIFICATION: + pairingType.AssignLiteral(PAIRING_REQ_TYPE_DISPLAYPASSKEY); + passkey.AppendInt(aPasskey); + break; + case SSP_VARIANT_CONSENT: + pairingType.AssignLiteral(PAIRING_REQ_TYPE_CONSENT); + break; + default: + BT_WARNING("Unhandled SSP Bonding Variant: %d", aPairingVariant); + return; + } + + BT_APPEND_NAMED_VALUE(propertiesArray, "address", nsString(aRemoteBdAddr)); + BT_APPEND_NAMED_VALUE(propertiesArray, "passkey", passkey); + BT_APPEND_NAMED_VALUE(propertiesArray, "type", pairingType); + + BluetoothSignal signal(NS_LITERAL_STRING("PairingRequest"), + NS_LITERAL_STRING(KEY_ADAPTER), + BluetoothValue(propertiesArray)); + + nsRefPtr task = + new DistributeBluetoothSignalTask(signal); + if (NS_FAILED(NS_DispatchToMainThread(task))) { + BT_WARNING("Failed to dispatch to main thread!"); + } +} + +void +BluetoothServiceBluedroid::BondStateChangedNotification( + BluetoothStatus aStatus, const nsAString& aRemoteBdAddr, + BluetoothBondState aState) +{ + MOZ_ASSERT(NS_IsMainThread()); + + if (aState == BOND_STATE_BONDING) { + // No need to handle bonding state + return; + } + + bool bonded = (aState == BOND_STATE_BONDED); + + // Update attribute BluetoothDevice.paired + InfallibleTArray propertiesArray; + BT_APPEND_NAMED_VALUE(propertiesArray, "Paired", bonded); + + BluetoothSignal deviceSignal(NS_LITERAL_STRING("PropertyChanged"), + nsString(aRemoteBdAddr), + BluetoothValue(propertiesArray)); + NS_DispatchToMainThread(new DistributeBluetoothSignalTask(deviceSignal)); + + propertiesArray.Clear(); + + // Append signal properties and notify adapter. + BT_APPEND_NAMED_VALUE(propertiesArray, "Address", nsString(aRemoteBdAddr)); + BT_APPEND_NAMED_VALUE(propertiesArray, "Paired", bonded); + + nsString signalName = bonded ? NS_LITERAL_STRING(DEVICE_PAIRED_ID) + : NS_LITERAL_STRING(DEVICE_UNPAIRED_ID); + + BluetoothSignal adapterSignal(signalName, + NS_LITERAL_STRING(KEY_ADAPTER), + BluetoothValue(propertiesArray)); + NS_DispatchToMainThread(new DistributeBluetoothSignalTask(adapterSignal)); + + // Redirect to main thread to avoid racing problem + NS_DispatchToMainThread(new BondStateChangedCallbackTask(bonded)); +} + +void +BluetoothServiceBluedroid::AclStateChangedNotification( + BluetoothStatus aStatus, const nsAString& aRemoteBdAddr, bool aState) +{ + MOZ_ASSERT(NS_IsMainThread()); + + // FIXME: This will be implemented in the later patchset +} + +void +BluetoothServiceBluedroid::DutModeRecvNotification(uint16_t aOpcode, + const uint8_t* aBuf, + uint8_t aLen) +{ + MOZ_ASSERT(NS_IsMainThread()); + + // FIXME: This will be implemented in the later patchset +} + +void +BluetoothServiceBluedroid::LeTestModeNotification(BluetoothStatus aStatus, + uint16_t aNumPackets) +{ + MOZ_ASSERT(NS_IsMainThread()); + + // FIXME: This will be implemented in the later patchset +} diff --git a/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.h b/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.h index 29ee2ada1304..c94848992057 100644 --- a/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.h +++ b/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.h @@ -10,11 +10,13 @@ #include #include "BluetoothCommon.h" +#include "BluetoothInterface.h" #include "BluetoothService.h" BEGIN_BLUETOOTH_NAMESPACE class BluetoothServiceBluedroid : public BluetoothService + , public BluetoothNotificationHandler { public: static const bt_interface_t* GetBluetoothInterface(); @@ -155,6 +157,46 @@ public: virtual nsresult SendInputMessage(const nsAString& aDeviceAddresses, const nsAString& aMessage) MOZ_OVERRIDE; + + // + // Bluetooth notifications + // + + virtual void AdapterStateChangedNotification(bool aState) MOZ_OVERRIDE; + virtual void AdapterPropertiesNotification( + BluetoothStatus aStatus, int aNumProperties, + const BluetoothProperty* aProperties) MOZ_OVERRIDE; + + virtual void RemoteDevicePropertiesNotification( + BluetoothStatus aStatus, const nsAString& aBdAddr, + int aNumProperties, const BluetoothProperty* aProperties) MOZ_OVERRIDE; + + virtual void DeviceFoundNotification( + int aNumProperties, const BluetoothProperty* aProperties) MOZ_OVERRIDE; + + virtual void DiscoveryStateChangedNotification(bool aState) MOZ_OVERRIDE; + + virtual void PinRequestNotification(const nsAString& aRemoteBdAddr, + const nsAString& aBdName, + uint32_t aCod) MOZ_OVERRIDE; + virtual void SspRequestNotification(const nsAString& aRemoteBdAddr, + const nsAString& aBdName, + uint32_t aCod, + BluetoothSspVariant aPairingVariant, + uint32_t aPasskey) MOZ_OVERRIDE; + + virtual void BondStateChangedNotification( + BluetoothStatus aStatus, const nsAString& aRemoteBdAddr, + BluetoothBondState aState) MOZ_OVERRIDE; + virtual void AclStateChangedNotification(BluetoothStatus aStatus, + const nsAString& aRemoteBdAddr, + bool aState) MOZ_OVERRIDE; + + virtual void DutModeRecvNotification(uint16_t aOpcode, + const uint8_t* aBuf, + uint8_t aLen) MOZ_OVERRIDE; + virtual void LeTestModeNotification(BluetoothStatus aStatus, + uint16_t aNumPackets) MOZ_OVERRIDE; }; END_BLUETOOTH_NAMESPACE diff --git a/dom/bluetooth2/bluedroid/BluetoothUtils.cpp b/dom/bluetooth2/bluedroid/BluetoothUtils.cpp index 6d77bf760be5..dbde11720d89 100644 --- a/dom/bluetooth2/bluedroid/BluetoothUtils.cpp +++ b/dom/bluetooth2/bluedroid/BluetoothUtils.cpp @@ -72,6 +72,29 @@ UuidToString(bt_uuid_t* aUuid, nsAString& aString) { aString.AssignLiteral(uuidStr); } +void +UuidToString(const BluetoothUuid& aUuid, nsAString& aString) +{ + char uuidStr[37]; + uint32_t uuid0, uuid4; + uint16_t uuid1, uuid2, uuid3, uuid5; + + memcpy(&uuid0, &aUuid.mUuid[0], sizeof(uint32_t)); + memcpy(&uuid1, &aUuid.mUuid[4], sizeof(uint16_t)); + memcpy(&uuid2, &aUuid.mUuid[6], sizeof(uint16_t)); + memcpy(&uuid3, &aUuid.mUuid[8], sizeof(uint16_t)); + memcpy(&uuid4, &aUuid.mUuid[10], sizeof(uint32_t)); + memcpy(&uuid5, &aUuid.mUuid[14], sizeof(uint16_t)); + + sprintf(uuidStr, "%.8x-%.4x-%.4x-%.4x-%.8x%.4x", + ntohl(uuid0), ntohs(uuid1), + ntohs(uuid2), ntohs(uuid3), + ntohl(uuid4), ntohs(uuid5)); + + aString.Truncate(); + aString.AssignLiteral(uuidStr); +} + bool SetJsObject(JSContext* aContext, const BluetoothValue& aValue, diff --git a/dom/bluetooth2/bluedroid/BluetoothUtils.h b/dom/bluetooth2/bluedroid/BluetoothUtils.h index 84546230ee63..c7b6ab108fda 100644 --- a/dom/bluetooth2/bluedroid/BluetoothUtils.h +++ b/dom/bluetooth2/bluedroid/BluetoothUtils.h @@ -29,6 +29,9 @@ BdAddressTypeToString(bt_bdaddr_t* aBdAddressType, void UuidToString(bt_uuid_t* aUuid, nsAString& aString); +void +UuidToString(const BluetoothUuid& aUuid, nsAString& aString); + bool SetJsObject(JSContext* aContext, const BluetoothValue& aValue, From 0e8745814fa7ee360102adbf1060ad95635f5f74 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 2 Sep 2014 12:38:46 +0200 Subject: [PATCH 104/139] Bug 1054242: Use Bluetooth Core notifications (under bluetooth2/), r=btian This patch connects backend and Gecko side of the notification code. Gecko will now receive notifications instead of Bluedroid callbacks. --- .../bluedroid/BluetoothInterface.cpp | 29 +++++++++++++++++-- dom/bluetooth2/bluedroid/BluetoothInterface.h | 3 +- .../bluedroid/BluetoothServiceBluedroid.cpp | 3 +- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/dom/bluetooth2/bluedroid/BluetoothInterface.cpp b/dom/bluetooth2/bluedroid/BluetoothInterface.cpp index 8f6029c8da84..8a97516406ce 100644 --- a/dom/bluetooth2/bluedroid/BluetoothInterface.cpp +++ b/dom/bluetooth2/bluedroid/BluetoothInterface.cpp @@ -2948,6 +2948,7 @@ struct BluetoothCallback aOpcode, ConvertArray(aBuf, aLen), aLen); } +#if ANDROID_VERSION >= 18 static void LeTestMode(bt_status_t aStatus, uint16_t aNumPackets) { @@ -2955,6 +2956,7 @@ struct BluetoothCallback &BluetoothNotificationHandler::LeTestModeNotification, aStatus, aNumPackets); } +#endif // ANDROID_VERSION >= 18 }; // Interface @@ -3032,10 +3034,31 @@ BluetoothInterface::~BluetoothInterface() { } void -BluetoothInterface::Init(bt_callbacks_t* aCallbacks, +BluetoothInterface::Init(BluetoothNotificationHandler* aNotificationHandler, BluetoothResultHandler* aRes) { - int status = mInterface->init(aCallbacks); + static bt_callbacks_t sBluetoothCallbacks = { + sizeof(sBluetoothCallbacks), + BluetoothCallback::AdapterStateChanged, + BluetoothCallback::AdapterProperties, + BluetoothCallback::RemoteDeviceProperties, + BluetoothCallback::DeviceFound, + BluetoothCallback::DiscoveryStateChanged, + BluetoothCallback::PinRequest, + BluetoothCallback::SspRequest, + BluetoothCallback::BondStateChanged, + BluetoothCallback::AclStateChanged, + BluetoothCallback::ThreadEvt, + BluetoothCallback::DutModeRecv +#if ANDROID_VERSION >= 18 + , + BluetoothCallback::LeTestMode +#endif + }; + + sNotificationHandler = aNotificationHandler; + + int status = mInterface->init(&sBluetoothCallbacks); if (aRes) { DispatchBluetoothResult(aRes, &BluetoothResultHandler::Init, @@ -3052,6 +3075,8 @@ BluetoothInterface::Cleanup(BluetoothResultHandler* aRes) DispatchBluetoothResult(aRes, &BluetoothResultHandler::Cleanup, STATUS_SUCCESS); } + + sNotificationHandler = nullptr; } void diff --git a/dom/bluetooth2/bluedroid/BluetoothInterface.h b/dom/bluetooth2/bluedroid/BluetoothInterface.h index b95a1ceaf998..d018a1a7caaa 100644 --- a/dom/bluetooth2/bluedroid/BluetoothInterface.h +++ b/dom/bluetooth2/bluedroid/BluetoothInterface.h @@ -419,7 +419,8 @@ class BluetoothInterface public: static BluetoothInterface* GetInstance(); - void Init(bt_callbacks_t* aCallbacks, BluetoothResultHandler* aRes); + void Init(BluetoothNotificationHandler* aNotificationHandler, + BluetoothResultHandler* aRes); void Cleanup(BluetoothResultHandler* aRes); void Enable(BluetoothResultHandler* aRes); diff --git a/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp b/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp index 8b9e7ee5b14c..7884e6bdd259 100644 --- a/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp +++ b/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp @@ -922,7 +922,8 @@ StartGonkBluetooth() return NS_OK; } - sBtInterface->Init(&sBluetoothCallbacks, new InitResultHandler()); + sBtInterface->Init(reinterpret_cast(bs), + new InitResultHandler()); return NS_OK; } From dbd4ad533046cabe166cfb014375a3b6e55c76f0 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 2 Sep 2014 12:38:46 +0200 Subject: [PATCH 105/139] Bug 1054242: Integrate helper runnables into notification methods (under bluetooth2/), r=btian Bluedroid callbacks were usually called on a separate thread that was specific to this task. So Gecko's Bluetooth Core contained a number of runnables for executing callback operations on the main thread. Since all notifications always run on the main thread, the extra runnables are not required any longer. This patch integrates them into the notification methods where possible. --- .../bluedroid/BluetoothServiceBluedroid.cpp | 160 ++++++++++++------ 1 file changed, 106 insertions(+), 54 deletions(-) diff --git a/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp b/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp index 7884e6bdd259..0f2ee54c6696 100644 --- a/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp +++ b/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp @@ -1812,8 +1812,13 @@ BluetoothServiceBluedroid::AdapterStateChangedNotification(bool aState) return; } - // Redirect to main thread to avoid racing problem - NS_DispatchToMainThread(new AdapterStateChangedCallbackTask()); + // Resolve promise if existed + if (!sChangeAdapterStateRunnableArray.IsEmpty()) { + DispatchBluetoothReply(sChangeAdapterStateRunnableArray[0], + BluetoothValue(true), EmptyString()); + + sChangeAdapterStateRunnableArray.RemoveElementAt(0); + } } /** @@ -1871,17 +1876,16 @@ BluetoothServiceBluedroid::AdapterPropertiesNotification( NS_ENSURE_TRUE_VOID(propertiesArray.Length() > 0); - BluetoothValue value(propertiesArray); - BluetoothSignal signal(NS_LITERAL_STRING("PropertyChanged"), - NS_LITERAL_STRING(KEY_ADAPTER), value); - nsRefPtr - t = new DistributeBluetoothSignalTask(signal); - if (NS_FAILED(NS_DispatchToMainThread(t))) { - BT_WARNING("Failed to dispatch to main thread!"); - } + DistributeSignal(BluetoothSignal(NS_LITERAL_STRING("PropertyChanged"), + NS_LITERAL_STRING(KEY_ADAPTER), + BluetoothValue(propertiesArray))); - // Redirect to main thread to avoid racing problem - NS_DispatchToMainThread(new AdapterPropertiesCallbackTask()); + // Send reply for SetProperty + if (!sSetPropertyRunnableArray.IsEmpty()) { + DispatchBluetoothReply(sSetPropertyRunnableArray[0], + BluetoothValue(true), EmptyString()); + sSetPropertyRunnableArray.RemoveElementAt(0); + } } /** @@ -1932,9 +1936,56 @@ BluetoothServiceBluedroid::RemoteDevicePropertiesNotification( } } - // Redirect to main thread to avoid racing problem - NS_DispatchToMainThread( - new RemoteDevicePropertiesCallbackTask(propertiesArray, aBdAddr)); + // The order of operations below is + // + // (1) modify global state (i.e., the variables starting with 's'), + // (2) distribute the signal, and finally + // (3) send any pending Bluetooth replies. + // + // |DispatchBluetoothReply| creates its own internal runnable, which is + // always run after we completed the current method. This means that we + // can exchange |DistributeBluetoothReply| with other operations without + // changing the order of (1,2) and (3). + + // Update to registered BluetoothDevice objects + BluetoothSignal signal(NS_LITERAL_STRING("PropertyChanged"), + nsString(aBdAddr), propertiesArray); + + // FetchUuids task + if (!sFetchUuidsRunnableArray.IsEmpty()) { + // propertiesArray contains Address and Uuids only + DispatchBluetoothReply(sFetchUuidsRunnableArray[0], + propertiesArray[1].value() /* Uuids */, + EmptyString()); + sFetchUuidsRunnableArray.RemoveElementAt(0); + DistributeSignal(signal); + return; + } + + // GetDevices task + if (sRequestedDeviceCountArray.IsEmpty()) { + // This is possible because the callback would be called after turning + // Bluetooth on. + DistributeSignal(signal); + return; + } + + // Use address as the index + sRemoteDevicesPack.AppendElement( + BluetoothNamedValue(nsString(aBdAddr), propertiesArray)); + + if (--sRequestedDeviceCountArray[0] == 0) { + if (!sGetDeviceRunnableArray.IsEmpty()) { + DispatchBluetoothReply(sGetDeviceRunnableArray[0], + sRemoteDevicesPack, EmptyString()); + sGetDeviceRunnableArray.RemoveElementAt(0); + } + + sRequestedDeviceCountArray.RemoveElementAt(0); + sRemoteDevicesPack.Clear(); + } + + DistributeSignal(signal); } void @@ -1978,14 +2029,9 @@ BluetoothServiceBluedroid::DeviceFoundNotification( } } - BluetoothValue value = propertiesArray; - BluetoothSignal signal(NS_LITERAL_STRING("DeviceFound"), - NS_LITERAL_STRING(KEY_ADAPTER), value); - nsRefPtr - t = new DistributeBluetoothSignalTask(signal); - if (NS_FAILED(NS_DispatchToMainThread(t))) { - BT_WARNING("Failed to dispatch to main thread!"); - } + DistributeSignal(BluetoothSignal(NS_LITERAL_STRING("DeviceFound"), + NS_LITERAL_STRING(KEY_ADAPTER), + BluetoothValue(propertiesArray))); } void @@ -1995,8 +2041,21 @@ BluetoothServiceBluedroid::DiscoveryStateChangedNotification(bool aState) sAdapterDiscovering = aState; - // Redirect to main thread to avoid racing problem - NS_DispatchToMainThread(new DiscoveryStateChangedCallbackTask()); + // Fire PropertyChanged of Discovering + InfallibleTArray propertiesArray; + BT_APPEND_NAMED_VALUE(propertiesArray, "Discovering", sAdapterDiscovering); + + DistributeSignal(BluetoothSignal(NS_LITERAL_STRING("PropertyChanged"), + NS_LITERAL_STRING(KEY_ADAPTER), + BluetoothValue(propertiesArray))); + + // Reply that Promise is resolved + if (!sChangeDiscoveryRunnableArray.IsEmpty()) { + DispatchBluetoothReply(sChangeDiscoveryRunnableArray[0], + BluetoothValue(true), EmptyString()); + + sChangeDiscoveryRunnableArray.RemoveElementAt(0); + } } void @@ -2013,15 +2072,9 @@ BluetoothServiceBluedroid::PinRequestNotification(const nsAString& aRemoteBdAddr BT_APPEND_NAMED_VALUE(propertiesArray, "type", NS_LITERAL_STRING(PAIRING_REQ_TYPE_ENTERPINCODE)); - BluetoothSignal signal(NS_LITERAL_STRING("PairingRequest"), - NS_LITERAL_STRING(KEY_ADAPTER), - BluetoothValue(propertiesArray)); - - nsRefPtr task = - new DistributeBluetoothSignalTask(signal); - if (NS_FAILED(NS_DispatchToMainThread(task))) { - BT_WARNING("Failed to dispatch to main thread!"); - } + DistributeSignal(BluetoothSignal(NS_LITERAL_STRING("PairingRequest"), + NS_LITERAL_STRING(KEY_ADAPTER), + BluetoothValue(propertiesArray))); } void @@ -2064,15 +2117,9 @@ BluetoothServiceBluedroid::SspRequestNotification( BT_APPEND_NAMED_VALUE(propertiesArray, "passkey", passkey); BT_APPEND_NAMED_VALUE(propertiesArray, "type", pairingType); - BluetoothSignal signal(NS_LITERAL_STRING("PairingRequest"), - NS_LITERAL_STRING(KEY_ADAPTER), - BluetoothValue(propertiesArray)); - - nsRefPtr task = - new DistributeBluetoothSignalTask(signal); - if (NS_FAILED(NS_DispatchToMainThread(task))) { - BT_WARNING("Failed to dispatch to main thread!"); - } + DistributeSignal(BluetoothSignal(NS_LITERAL_STRING("PairingRequest"), + NS_LITERAL_STRING(KEY_ADAPTER), + BluetoothValue(propertiesArray))); } void @@ -2093,11 +2140,9 @@ BluetoothServiceBluedroid::BondStateChangedNotification( InfallibleTArray propertiesArray; BT_APPEND_NAMED_VALUE(propertiesArray, "Paired", bonded); - BluetoothSignal deviceSignal(NS_LITERAL_STRING("PropertyChanged"), - nsString(aRemoteBdAddr), - BluetoothValue(propertiesArray)); - NS_DispatchToMainThread(new DistributeBluetoothSignalTask(deviceSignal)); - + DistributeSignal(BluetoothSignal(NS_LITERAL_STRING("PropertyChanged"), + nsString(aRemoteBdAddr), + BluetoothValue(propertiesArray))); propertiesArray.Clear(); // Append signal properties and notify adapter. @@ -2107,13 +2152,20 @@ BluetoothServiceBluedroid::BondStateChangedNotification( nsString signalName = bonded ? NS_LITERAL_STRING(DEVICE_PAIRED_ID) : NS_LITERAL_STRING(DEVICE_UNPAIRED_ID); - BluetoothSignal adapterSignal(signalName, - NS_LITERAL_STRING(KEY_ADAPTER), - BluetoothValue(propertiesArray)); - NS_DispatchToMainThread(new DistributeBluetoothSignalTask(adapterSignal)); + DistributeSignal(BluetoothSignal(signalName, + NS_LITERAL_STRING(KEY_ADAPTER), + BluetoothValue(propertiesArray))); - // Redirect to main thread to avoid racing problem - NS_DispatchToMainThread(new BondStateChangedCallbackTask(bonded)); + if (bonded && !sBondingRunnableArray.IsEmpty()) { + DispatchBluetoothReply(sBondingRunnableArray[0], + BluetoothValue(true), EmptyString()); + sBondingRunnableArray.RemoveElementAt(0); + + } else if (!bonded && !sUnbondingRunnableArray.IsEmpty()) { + DispatchBluetoothReply(sUnbondingRunnableArray[0], + BluetoothValue(true), EmptyString()); + sUnbondingRunnableArray.RemoveElementAt(0); + } } void From 044199e66ad84ff4122a9b81bd3da57367de236b Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 2 Sep 2014 12:38:46 +0200 Subject: [PATCH 106/139] Bug 1054242: Cleanup |BluetoothServiceBluedroid| and related functions (under bluetooth2/), r=btian This patch removes unsued code from |BluetoothServiceBluedroid|, related functions, and cleans up the file. It * removes callbacks, * removes callback helper tasks, * removes helper functions, and * cleans up global variables. --- .../bluedroid/BluetoothServiceBluedroid.cpp | 574 +----------------- dom/bluetooth2/bluedroid/BluetoothUtils.cpp | 36 -- dom/bluetooth2/bluedroid/BluetoothUtils.h | 3 - 3 files changed, 3 insertions(+), 610 deletions(-) diff --git a/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp b/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp index 0f2ee54c6696..066fe0d69b23 100644 --- a/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp +++ b/dom/bluetooth2/bluedroid/BluetoothServiceBluedroid.cpp @@ -57,11 +57,12 @@ using namespace mozilla; using namespace mozilla::ipc; USING_BLUETOOTH_NAMESPACE -// TODO: Non thread-safe static variables static nsString sAdapterBdAddress; static nsString sAdapterBdName; +static bool sAdapterDiscoverable(false); +static bool sAdapterDiscovering(false); +static bool sAdapterEnabled(false); -// Static variables below should only be used on *main thread* static BluetoothInterface* sBtInterface; static nsTArray > sControllerArray; static InfallibleTArray sRemoteDevicesPack; @@ -74,42 +75,9 @@ static nsTArray > sFetchUuidsRunnableArray; static nsTArray > sBondingRunnableArray; static nsTArray > sUnbondingRunnableArray; -// Static variables below should only be used on *callback thread* - - -// Atomic static variables -static Atomic sAdapterDiscoverable(false); -static Atomic sAdapterDiscovering(false); -static Atomic sAdapterEnabled(false); -static Atomic sAdapterDiscoverableTimeout(0); - /** * Classes only used in this file */ -class DistributeBluetoothSignalTask MOZ_FINAL : public nsRunnable -{ -public: - DistributeBluetoothSignalTask(const BluetoothSignal& aSignal) : - mSignal(aSignal) - { - } - - NS_IMETHOD - Run() - { - MOZ_ASSERT(NS_IsMainThread()); - - BluetoothService* bs = BluetoothService::Get(); - NS_ENSURE_TRUE(bs, NS_ERROR_FAILURE); - - bs->DistributeSignal(mSignal); - - return NS_OK; - } - -private: - BluetoothSignal mSignal; -}; class SetupAfterEnabledTask MOZ_FINAL : public nsRunnable { @@ -264,542 +232,6 @@ PlayStatusStringToControlPlayStatus(const nsAString& aPlayStatus) return playStatus; } -class AdapterStateChangedCallbackTask MOZ_FINAL : public nsRunnable -{ -public: - NS_IMETHOD - Run() - { - MOZ_ASSERT(NS_IsMainThread()); - - // Resolve promise if existed - if (!sChangeAdapterStateRunnableArray.IsEmpty()) { - BluetoothValue values(true); - DispatchBluetoothReply(sChangeAdapterStateRunnableArray[0], - values, EmptyString()); - - sChangeAdapterStateRunnableArray.RemoveElementAt(0); - } - - return NS_OK; - } -}; - -/** - * Bluedroid HAL callback functions - * - * Several callbacks are dispatched to main thread to avoid racing issues. - */ -static void -AdapterStateChangeCallback(bt_state_t aStatus) -{ - MOZ_ASSERT(!NS_IsMainThread()); - - BT_LOGR("BT_STATE: %d", aStatus); - sAdapterEnabled = (aStatus == BT_STATE_ON); - - if (!sAdapterEnabled && - NS_FAILED(NS_DispatchToMainThread(new CleanupTask()))) { - BT_WARNING("Failed to dispatch to main thread!"); - return; - } - - nsRefPtr runnable = - new BluetoothService::ToggleBtAck(sAdapterEnabled); - if (NS_FAILED(NS_DispatchToMainThread(runnable))) { - BT_WARNING("Failed to dispatch to main thread!"); - return; - } - - if (sAdapterEnabled && - NS_FAILED(NS_DispatchToMainThread(new SetupAfterEnabledTask()))) { - BT_WARNING("Failed to dispatch to main thread!"); - return; - } - - // Redirect to main thread to avoid racing problem - NS_DispatchToMainThread(new AdapterStateChangedCallbackTask()); -} - -class AdapterPropertiesCallbackTask MOZ_FINAL : public nsRunnable -{ -public: - NS_IMETHOD - Run() - { - MOZ_ASSERT(NS_IsMainThread()); - - if (!sSetPropertyRunnableArray.IsEmpty()) { - DispatchBluetoothReply(sSetPropertyRunnableArray[0], - BluetoothValue(true), EmptyString()); - sSetPropertyRunnableArray.RemoveElementAt(0); - } - - return NS_OK; - } -}; - -/** - * AdapterPropertiesCallback will be called after enable() but before - * AdapterStateChangedCallback is called. At that moment, both - * BluetoothManager/BluetoothAdapter does not register observer yet. - */ -static void -AdapterPropertiesCallback(bt_status_t aStatus, int aNumProperties, - bt_property_t *aProperties) -{ - MOZ_ASSERT(!NS_IsMainThread()); - - BluetoothValue propertyValue; - InfallibleTArray props; - - for (int i = 0; i < aNumProperties; i++) { - bt_property_t p = aProperties[i]; - - if (p.type == BT_PROPERTY_BDADDR) { - BdAddressTypeToString((bt_bdaddr_t*)p.val, sAdapterBdAddress); - propertyValue = sAdapterBdAddress; - BT_APPEND_NAMED_VALUE(props, "Address", propertyValue); - } else if (p.type == BT_PROPERTY_BDNAME) { - // Construct nsCString here because Bd name returned from bluedroid - // is missing a null terminated character after SetProperty. - propertyValue = sAdapterBdName = NS_ConvertUTF8toUTF16( - nsCString((char*)p.val, p.len)); - BT_APPEND_NAMED_VALUE(props, "Name", propertyValue); - } else if (p.type == BT_PROPERTY_ADAPTER_SCAN_MODE) { - bt_scan_mode_t newMode = *(bt_scan_mode_t*)p.val; - propertyValue = sAdapterDiscoverable = - (newMode == BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE); - BT_APPEND_NAMED_VALUE(props, "Discoverable", propertyValue); - } else if (p.type == BT_PROPERTY_ADAPTER_BONDED_DEVICES) { - bt_bdaddr_t* deviceBdAddressTypes = (bt_bdaddr_t*)p.val; - int numOfAddresses = p.len / BLUETOOTH_ADDRESS_BYTES; - BT_LOGD("Adapter property: BONDED_DEVICES. Count: %d", numOfAddresses); - - nsTArray pairedDeviceAddresses; - for (int index = 0; index < numOfAddresses; index++) { - nsAutoString deviceBdAddress; - BdAddressTypeToString(deviceBdAddressTypes + index, deviceBdAddress); - pairedDeviceAddresses.AppendElement(deviceBdAddress); - } - - BT_APPEND_NAMED_VALUE(props, "PairedDevices", pairedDeviceAddresses); - } else { - BT_LOGD("Unhandled adapter property type: %d", p.type); - continue; - } - } - - NS_ENSURE_TRUE_VOID(props.Length() > 0); - - BluetoothValue value(props); - BluetoothSignal signal(NS_LITERAL_STRING("PropertyChanged"), - NS_LITERAL_STRING(KEY_ADAPTER), value); - nsRefPtr - t = new DistributeBluetoothSignalTask(signal); - if (NS_FAILED(NS_DispatchToMainThread(t))) { - BT_WARNING("Failed to dispatch to main thread!"); - } - - // Redirect to main thread to avoid racing problem - NS_DispatchToMainThread(new AdapterPropertiesCallbackTask()); -} - -class RemoteDevicePropertiesCallbackTask : public nsRunnable -{ - const InfallibleTArray mProps; - nsString mRemoteDeviceBdAddress; -public: - RemoteDevicePropertiesCallbackTask( - const InfallibleTArray& aProps, - const nsAString& aRemoteDeviceBdAddress) - : mProps(aProps) - , mRemoteDeviceBdAddress(aRemoteDeviceBdAddress) - { } - - NS_IMETHOD - Run() - { - MOZ_ASSERT(NS_IsMainThread()); - - - // Update to registered BluetoothDevice objects - BluetoothSignal signal(NS_LITERAL_STRING("PropertyChanged"), - mRemoteDeviceBdAddress, mProps); - nsRefPtr - t = new DistributeBluetoothSignalTask(signal); - if (NS_FAILED(NS_DispatchToMainThread(t))) { - BT_WARNING("Failed to dispatch to main thread!"); - return NS_OK; - } - - // FetchUuids task - if (!sFetchUuidsRunnableArray.IsEmpty()) { - // mProps contains Address and Uuids only - DispatchBluetoothReply(sFetchUuidsRunnableArray[0], - mProps[1].value() /* Uuids */, - EmptyString()); - sFetchUuidsRunnableArray.RemoveElementAt(0); - - return NS_OK; - } - - // GetDevices task - if (sRequestedDeviceCountArray.IsEmpty()) { - // This is possible because the callback would be called after turning - // Bluetooth on. - return NS_OK; - } - - // Use address as the index - sRemoteDevicesPack.AppendElement( - BluetoothNamedValue(mRemoteDeviceBdAddress, mProps)); - - if (--sRequestedDeviceCountArray[0] == 0) { - if (!sGetDeviceRunnableArray.IsEmpty()) { - DispatchBluetoothReply(sGetDeviceRunnableArray[0], - sRemoteDevicesPack, EmptyString()); - sGetDeviceRunnableArray.RemoveElementAt(0); - } - - sRequestedDeviceCountArray.RemoveElementAt(0); - sRemoteDevicesPack.Clear(); - } - - return NS_OK; - } -}; - -/** - * RemoteDevicePropertiesCallback will be called, as the following conditions: - * 1. When BT is turning on, bluedroid automatically execute this callback - * 2. When get_remote_device_properties() - * 3. When get_remote_services() - */ -static void -RemoteDevicePropertiesCallback(bt_status_t aStatus, bt_bdaddr_t *aBdAddress, - int aNumProperties, bt_property_t *aProperties) -{ - MOZ_ASSERT(!NS_IsMainThread()); - - InfallibleTArray props; - - nsString remoteDeviceBdAddress; - BdAddressTypeToString(aBdAddress, remoteDeviceBdAddress); - BT_APPEND_NAMED_VALUE(props, "Address", remoteDeviceBdAddress); - - for (int i = 0; i < aNumProperties; ++i) { - bt_property_t p = aProperties[i]; - - if (p.type == BT_PROPERTY_BDNAME) { - BluetoothValue propertyValue = NS_ConvertUTF8toUTF16((char*)p.val); - BT_APPEND_NAMED_VALUE(props, "Name", propertyValue); - } else if (p.type == BT_PROPERTY_CLASS_OF_DEVICE) { - uint32_t cod = *(uint32_t*)p.val; - BT_APPEND_NAMED_VALUE(props, "Cod", cod); - } else if (p.type == BT_PROPERTY_UUIDS) { - nsTArray uuids; - - // Construct a sorted uuid set - for (uint32_t j = 0; j < p.len / sizeof(bt_uuid_t); j++) { - nsAutoString uuid; - bt_uuid_t* pUuid = (bt_uuid_t*)p.val + j; - UuidToString(pUuid, uuid); - - if (!uuids.Contains(uuid)) { // filter out duplicate uuids - uuids.InsertElementSorted(uuid); - } - } - - BT_APPEND_NAMED_VALUE(props, "UUIDs", uuids); - } else { - BT_LOGD("Other non-handled device properties. Type: %d", p.type); - } - } - - // Redirect to main thread to avoid racing problem - NS_DispatchToMainThread( - new RemoteDevicePropertiesCallbackTask(props, remoteDeviceBdAddress)); -} - -static void -DeviceFoundCallback(int aNumProperties, bt_property_t *aProperties) -{ - MOZ_ASSERT(!NS_IsMainThread()); - - BluetoothValue propertyValue; - InfallibleTArray propertiesArray; - - for (int i = 0; i < aNumProperties; i++) { - bt_property_t p = aProperties[i]; - - if (p.type == BT_PROPERTY_BDADDR) { - nsString remoteDeviceBdAddress; - BdAddressTypeToString((bt_bdaddr_t*)p.val, remoteDeviceBdAddress); - propertyValue = remoteDeviceBdAddress; - - BT_APPEND_NAMED_VALUE(propertiesArray, "Address", propertyValue); - } else if (p.type == BT_PROPERTY_BDNAME) { - propertyValue = NS_ConvertUTF8toUTF16((char*)p.val); - BT_APPEND_NAMED_VALUE(propertiesArray, "Name", propertyValue); - } else if (p.type == BT_PROPERTY_CLASS_OF_DEVICE) { - uint32_t cod = *(uint32_t*)p.val; - propertyValue = cod; - BT_APPEND_NAMED_VALUE(propertiesArray, "Cod", cod); - } else if (p.type == BT_PROPERTY_UUIDS) { - nsTArray uuids; - - // Construct a sorted uuid set - for (uint32_t j = 0; j < p.len / sizeof(bt_uuid_t); j++) { - nsAutoString uuid; - bt_uuid_t* pUuid = (bt_uuid_t*)p.val + j; - UuidToString(pUuid, uuid); - - if (!uuids.Contains(uuid)) { // filter out duplicate uuids - uuids.InsertElementSorted(uuid); - } - } - - BT_APPEND_NAMED_VALUE(propertiesArray, "UUIDs", uuids); - } else { - BT_LOGD("Not handled remote device property: %d", p.type); - } - } - - BluetoothValue value = propertiesArray; - BluetoothSignal signal(NS_LITERAL_STRING("DeviceFound"), - NS_LITERAL_STRING(KEY_ADAPTER), value); - nsRefPtr - t = new DistributeBluetoothSignalTask(signal); - if (NS_FAILED(NS_DispatchToMainThread(t))) { - BT_WARNING("Failed to dispatch to main thread!"); - } -} - -class DiscoveryStateChangedCallbackTask MOZ_FINAL : public nsRunnable -{ -public: - NS_IMETHOD - Run() - { - MOZ_ASSERT(NS_IsMainThread()); - - // Return error if BluetoothService is unavailable - BluetoothService* bs = BluetoothService::Get(); - NS_ENSURE_TRUE(bs, NS_ERROR_FAILURE); - - // Fire PropertyChanged of Discovering - InfallibleTArray props; - BT_APPEND_NAMED_VALUE(props, "Discovering", sAdapterDiscovering); - - BluetoothSignal signal(NS_LITERAL_STRING("PropertyChanged"), - NS_LITERAL_STRING(KEY_ADAPTER), props); - bs->DistributeSignal(signal); - - // Reply that Promise is resolved - if (!sChangeDiscoveryRunnableArray.IsEmpty()) { - BluetoothValue values(true); - DispatchBluetoothReply(sChangeDiscoveryRunnableArray[0], - values, EmptyString()); - - sChangeDiscoveryRunnableArray.RemoveElementAt(0); - } - - return NS_OK; - } -}; - -static void -DiscoveryStateChangedCallback(bt_discovery_state_t aState) -{ - MOZ_ASSERT(!NS_IsMainThread()); - - sAdapterDiscovering = (aState == BT_DISCOVERY_STARTED); - - // Redirect to main thread to avoid racing problem - NS_DispatchToMainThread(new DiscoveryStateChangedCallbackTask()); -} - -static void -PinRequestCallback(bt_bdaddr_t* aRemoteBdAddress, - bt_bdname_t* aRemoteBdName, uint32_t aRemoteClass) -{ - MOZ_ASSERT(!NS_IsMainThread()); - - InfallibleTArray props; - nsAutoString deviceAddress; - BdAddressTypeToString(aRemoteBdAddress, deviceAddress); - - BT_APPEND_NAMED_VALUE(props, "address", deviceAddress); - BT_APPEND_NAMED_VALUE(props, "passkey", EmptyString()); - BT_APPEND_NAMED_VALUE(props, "type", - NS_LITERAL_STRING(PAIRING_REQ_TYPE_ENTERPINCODE)); - - BluetoothSignal signal(NS_LITERAL_STRING("PairingRequest"), - NS_LITERAL_STRING(KEY_ADAPTER), - BluetoothValue(props)); - - nsRefPtr task = - new DistributeBluetoothSignalTask(signal); - if (NS_FAILED(NS_DispatchToMainThread(task))) { - BT_WARNING("Failed to dispatch to main thread!"); - } -} - -static void -SspRequestCallback(bt_bdaddr_t* aRemoteBdAddress, bt_bdname_t* aRemoteBdName, - uint32_t aRemoteClass, bt_ssp_variant_t aPairingVariant, - uint32_t aPasskey) -{ - MOZ_ASSERT(!NS_IsMainThread()); - - InfallibleTArray props; - nsAutoString deviceAddress; - BdAddressTypeToString(aRemoteBdAddress, deviceAddress); - - nsAutoString passkey; - nsAutoString pairingType; - - /** - * Assign pairing request type and passkey based on the pairing variant. - * - * passkey value based on pairing request type: - * 1) aPasskey: PAIRING_REQ_TYPE_CONFIRMATION and - * PAIRING_REQ_TYPE_DISPLAYPASSKEY - * 2) empty string: PAIRING_REQ_TYPE_CONSENT - */ - switch (aPairingVariant) { - case BT_SSP_VARIANT_PASSKEY_CONFIRMATION: - pairingType.AssignLiteral(PAIRING_REQ_TYPE_CONFIRMATION); - passkey.AppendInt(aPasskey); - break; - case BT_SSP_VARIANT_PASSKEY_NOTIFICATION: - pairingType.AssignLiteral(PAIRING_REQ_TYPE_DISPLAYPASSKEY); - passkey.AppendInt(aPasskey); - break; - case BT_SSP_VARIANT_CONSENT: - pairingType.AssignLiteral(PAIRING_REQ_TYPE_CONSENT); - break; - default: - BT_WARNING("Unhandled SSP Bonding Variant: %d", aPairingVariant); - return; - } - - BT_APPEND_NAMED_VALUE(props, "address", deviceAddress); - BT_APPEND_NAMED_VALUE(props, "passkey", passkey); - BT_APPEND_NAMED_VALUE(props, "type", pairingType); - - BluetoothSignal signal(NS_LITERAL_STRING("PairingRequest"), - NS_LITERAL_STRING(KEY_ADAPTER), - BluetoothValue(props)); - - nsRefPtr task = - new DistributeBluetoothSignalTask(signal); - if (NS_FAILED(NS_DispatchToMainThread(task))) { - BT_WARNING("Failed to dispatch to main thread!"); - } -} - -class BondStateChangedCallbackTask : public nsRunnable -{ - bool mBonded; -public: - BondStateChangedCallbackTask(bool aBonded) - : mBonded(aBonded) - { } - - NS_IMETHOD - Run() - { - MOZ_ASSERT(NS_IsMainThread()); - - if (mBonded && !sBondingRunnableArray.IsEmpty()) { - DispatchBluetoothReply(sBondingRunnableArray[0], - BluetoothValue(true), EmptyString()); - - sBondingRunnableArray.RemoveElementAt(0); - } else if (!mBonded && !sUnbondingRunnableArray.IsEmpty()) { - DispatchBluetoothReply(sUnbondingRunnableArray[0], - BluetoothValue(true), EmptyString()); - - sUnbondingRunnableArray.RemoveElementAt(0); - } - - return NS_OK; - } -}; - -static void -BondStateChangedCallback(bt_status_t aStatus, bt_bdaddr_t* aRemoteBdAddress, - bt_bond_state_t aState) -{ - MOZ_ASSERT(!NS_IsMainThread()); - - if (aState == BT_BOND_STATE_BONDING) { - // No need to handle bonding state - return; - } - - nsAutoString remoteBdAddress; - BdAddressTypeToString(aRemoteBdAddress, remoteBdAddress); - - bool bonded = (aState == BT_BOND_STATE_BONDED); - - // Update attribute BluetoothDevice.paired - InfallibleTArray props; - BT_APPEND_NAMED_VALUE(props, "Paired", bonded); - - BluetoothSignal deviceSignal(NS_LITERAL_STRING("PropertyChanged"), - remoteBdAddress, - BluetoothValue(props)); - NS_DispatchToMainThread(new DistributeBluetoothSignalTask(deviceSignal)); - - props.Clear(); - - // Append signal properties and notify adapter. - BT_APPEND_NAMED_VALUE(props, "Address", remoteBdAddress); - BT_APPEND_NAMED_VALUE(props, "Paired", bonded); - - nsString signalName = bonded ? NS_LITERAL_STRING(DEVICE_PAIRED_ID) - : NS_LITERAL_STRING(DEVICE_UNPAIRED_ID); - - BluetoothSignal adapterSignal(signalName, - NS_LITERAL_STRING(KEY_ADAPTER), - BluetoothValue(props)); - NS_DispatchToMainThread(new DistributeBluetoothSignalTask(adapterSignal)); - - // Redirect to main thread to avoid racing problem - NS_DispatchToMainThread(new BondStateChangedCallbackTask(bonded)); -} - -static void -AclStateChangedCallback(bt_status_t aStatus, bt_bdaddr_t* aRemoteBdAddress, - bt_acl_state_t aState) -{ - //FIXME: This will be implemented in the later patchset -} - -static void -CallbackThreadEvent(bt_cb_thread_evt evt) -{ - //FIXME: This will be implemented in the later patchset -} - -bt_callbacks_t sBluetoothCallbacks = -{ - sizeof(sBluetoothCallbacks), - AdapterStateChangeCallback, - AdapterPropertiesCallback, - RemoteDevicePropertiesCallback, - DeviceFoundCallback, - DiscoveryStateChangedCallback, - PinRequestCallback, - SspRequestCallback, - BondStateChangedCallback, - AclStateChangedCallback, - CallbackThreadEvent -}; - /** * Static functions */ diff --git a/dom/bluetooth2/bluedroid/BluetoothUtils.cpp b/dom/bluetooth2/bluedroid/BluetoothUtils.cpp index dbde11720d89..f19d2f9c87a5 100644 --- a/dom/bluetooth2/bluedroid/BluetoothUtils.cpp +++ b/dom/bluetooth2/bluedroid/BluetoothUtils.cpp @@ -23,19 +23,6 @@ BEGIN_BLUETOOTH_NAMESPACE -void -StringToBdAddressType(const nsAString& aBdAddress, - bt_bdaddr_t *aRetBdAddressType) -{ - NS_ConvertUTF16toUTF8 bdAddressUTF8(aBdAddress); - const char* str = bdAddressUTF8.get(); - - for (int i = 0; i < 6; i++) { - aRetBdAddressType->address[i] = (uint8_t) strtoul(str, (char **)&str, 16); - str++; - } -} - void BdAddressTypeToString(bt_bdaddr_t* aBdAddressType, nsAString& aRetBdAddress) { @@ -49,29 +36,6 @@ BdAddressTypeToString(bt_bdaddr_t* aBdAddressType, nsAString& aRetBdAddress) aRetBdAddress = NS_ConvertUTF8toUTF16(bdstr); } -void -UuidToString(bt_uuid_t* aUuid, nsAString& aString) { - char uuidStr[37]; - - uint32_t uuid0, uuid4; - uint16_t uuid1, uuid2, uuid3, uuid5; - - memcpy(&uuid0, &(aUuid->uu[0]), sizeof(uint32_t)); - memcpy(&uuid1, &(aUuid->uu[4]), sizeof(uint16_t)); - memcpy(&uuid2, &(aUuid->uu[6]), sizeof(uint16_t)); - memcpy(&uuid3, &(aUuid->uu[8]), sizeof(uint16_t)); - memcpy(&uuid4, &(aUuid->uu[10]), sizeof(uint32_t)); - memcpy(&uuid5, &(aUuid->uu[14]), sizeof(uint16_t)); - - sprintf(uuidStr, "%.8x-%.4x-%.4x-%.4x-%.8x%.4x", - ntohl(uuid0), ntohs(uuid1), - ntohs(uuid2), ntohs(uuid3), - ntohl(uuid4), ntohs(uuid5)); - - aString.Truncate(); - aString.AssignLiteral(uuidStr); -} - void UuidToString(const BluetoothUuid& aUuid, nsAString& aString) { diff --git a/dom/bluetooth2/bluedroid/BluetoothUtils.h b/dom/bluetooth2/bluedroid/BluetoothUtils.h index c7b6ab108fda..2129c6139521 100644 --- a/dom/bluetooth2/bluedroid/BluetoothUtils.h +++ b/dom/bluetooth2/bluedroid/BluetoothUtils.h @@ -26,9 +26,6 @@ void BdAddressTypeToString(bt_bdaddr_t* aBdAddressType, nsAString& aRetBdAddress); -void -UuidToString(bt_uuid_t* aUuid, nsAString& aString); - void UuidToString(const BluetoothUuid& aUuid, nsAString& aString); From d9f896e9f7bf219a3e82a9bce1407503b1c249bf Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 03:44:31 -0700 Subject: [PATCH 107/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index b33fa2183c59..a5b00410b085 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 9eec3b9949ff..fa0777783d37 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index d2ca9712ec35..1c9d375e6177 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index abb7d02afc26..e2805ac460c7 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 9eec3b9949ff..fa0777783d37 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 111dae6782f5..58613ec1d1a9 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index fce325811224..9137c6a30de9 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 2c8dbc0f17ab..dbe3aee180cc 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 377d60e8a931..8750f1734e62 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 1cbb52743466..7c5d2ee1fb3f 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index c012dce44c81..46412564600a 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 46e6f7feba99a2cd03e0e069ba7f7155d31163c9 Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 2 Sep 2014 12:46:07 +0200 Subject: [PATCH 108/139] Bug 1061126: Add AVRCP_UID_SIZE to Bluetooth, r=shuang This constant AVRCP_UID_SIZE replaces the corresponding Bluedroid constant BTRC_UID_SIZE. --- dom/bluetooth/BluetoothCommon.h | 4 ++++ dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dom/bluetooth/BluetoothCommon.h b/dom/bluetooth/BluetoothCommon.h index 9667957694c7..037a9f9ef302 100644 --- a/dom/bluetooth/BluetoothCommon.h +++ b/dom/bluetooth/BluetoothCommon.h @@ -362,6 +362,10 @@ enum ControlPlayStatus { PLAYSTATUS_ERROR = 0xFF, }; +enum { + AVRCP_UID_SIZE = 8 +}; + enum BluetoothAvrcpMediaAttribute { AVRCP_MEDIA_ATTRIBUTE_TITLE, AVRCP_MEDIA_ATTRIBUTE_ARTIST, diff --git a/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp b/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp index 38dc7e0aab6b..cfb8be6b6e46 100644 --- a/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp +++ b/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp @@ -732,8 +732,8 @@ BluetoothA2dpManager::UpdateMetaData(const nsAString& aTitle, BluetoothAvrcpNotificationParam param; // convert to network big endian format // since track stores as uint8[8] - // 56 = 8 * (BTRC_UID_SIZE -1) - for (int i = 0; i < BTRC_UID_SIZE; ++i) { + // 56 = 8 * (AVRCP_UID_SIZE -1) + for (int i = 0; i < AVRCP_UID_SIZE; ++i) { param.mTrack[i] = (aMediaNumber >> (56 - 8 * i)); } mTrackChangedNotifyType = AVRCP_NTF_CHANGED; @@ -836,7 +836,7 @@ BluetoothA2dpManager::UpdateRegisterNotification(BluetoothAvrcpEvent aEvent, mTrackChangedNotifyType = AVRCP_NTF_INTERIM; // needs to convert to network big endian format since track stores // as uint8[8]. 56 = 8 * (BTRC_UID_SIZE -1). - for (int index = 0; index < BTRC_UID_SIZE; ++index) { + for (int index = 0; index < AVRCP_UID_SIZE; ++index) { // We cannot easily check if a track is selected, so whenever A2DP is // streaming, we assume a track is selected. if (mSinkState == BluetoothA2dpManager::SinkState::SINK_PLAYING) { From 10ae6712286393de61bdc016fdbed0edde63a72a Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 2 Sep 2014 12:46:07 +0200 Subject: [PATCH 109/139] Bug 1061126: Fix constants in Bluedroid HFP manager, r=shuang This patch replaces the remaining Bluedroid constants from Bluedroid's |BluetoothHfpManager| with Gecko constants. --- .../bluedroid/hfp/BluetoothHfpManager.cpp | 21 ++++++++++++------- .../bluedroid/hfp/BluetoothHfpManager.h | 6 +++--- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp b/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp index eceaeee076b9..18bcd0c62bdc 100644 --- a/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp +++ b/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp @@ -201,8 +201,8 @@ BluetoothHfpManager::Cleanup() mReceiveVgsFlag = false; mDialingRequestProcessed = true; - mConnectionState = BTHF_CONNECTION_STATE_DISCONNECTED; - mPrevConnectionState = BTHF_CONNECTION_STATE_DISCONNECTED; + mConnectionState = HFP_CONNECTION_STATE_DISCONNECTED; + mPrevConnectionState = HFP_CONNECTION_STATE_DISCONNECTED; mBattChg = 5; mService = HFP_NETWORK_STATE_NOT_AVAILABLE; mRoam = HFP_SERVICE_TYPE_HOME; @@ -217,7 +217,7 @@ BluetoothHfpManager::Reset() // Phone & Device CIND ResetCallArray(); // Clear Sco state - mAudioState = BTHF_AUDIO_STATE_DISCONNECTED; + mAudioState = HFP_AUDIO_STATE_DISCONNECTED; Cleanup(); } @@ -522,9 +522,9 @@ BluetoothHfpManager::NotifyConnectionStateChanged(const nsAString& aType) mListener->EnumerateCalls(); OnConnect(EmptyString()); - } else if (mConnectionState == BTHF_CONNECTION_STATE_DISCONNECTED) { + } else if (mConnectionState == HFP_CONNECTION_STATE_DISCONNECTED) { mDeviceAddress.AssignLiteral(BLUETOOTH_ADDRESS_NONE); - if (mPrevConnectionState == BTHF_CONNECTION_STATE_DISCONNECTED) { + if (mPrevConnectionState == HFP_CONNECTION_STATE_DISCONNECTED) { // Bug 979160: This implies the outgoing connection failure. // When the outgoing hfp connection fails, state changes to disconnected // state. Since bluedroid would not report connecting state, but only @@ -1114,13 +1114,13 @@ BluetoothHfpManager::DisconnectSco() bool BluetoothHfpManager::IsScoConnected() { - return (mAudioState == BTHF_AUDIO_STATE_CONNECTED); + return (mAudioState == HFP_AUDIO_STATE_CONNECTED); } bool BluetoothHfpManager::IsConnected() { - return (mConnectionState == BTHF_CONNECTION_STATE_SLC_CONNECTED); + return (mConnectionState == HFP_CONNECTION_STATE_SLC_CONNECTED); } void @@ -1433,13 +1433,18 @@ void BluetoothHfpManager::DialCallNotification(const nsAString& aNumber) void BluetoothHfpManager::CnumNotification() { + static const uint8_t sAddressType[] { + [HFP_CALL_ADDRESS_TYPE_UNKNOWN] = 0x81, + [HFP_CALL_ADDRESS_TYPE_INTERNATIONAL] = 0x91 // for completeness + }; + MOZ_ASSERT(NS_IsMainThread()); if (!mMsisdn.IsEmpty()) { nsAutoCString message("+CNUM: ,\""); message.Append(NS_ConvertUTF16toUTF8(mMsisdn).get()); message.AppendLiteral("\","); - message.AppendInt(BTHF_CALL_ADDRTYPE_UNKNOWN); + message.AppendInt(sAddressType[HFP_CALL_ADDRESS_TYPE_UNKNOWN]); message.AppendLiteral(",,4"); SendLine(message.get()); diff --git a/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.h b/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.h index 1bcb3d2e82d5..f69d126a41be 100644 --- a/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.h +++ b/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.h @@ -170,9 +170,9 @@ private: void SendLine(const char* aMessage); void SendResponse(BluetoothHandsfreeAtResponse aResponseCode); - int mConnectionState; - int mPrevConnectionState; - int mAudioState; + BluetoothHandsfreeConnectionState mConnectionState; + BluetoothHandsfreeConnectionState mPrevConnectionState; + BluetoothHandsfreeAudioState mAudioState; // Device CIND int mBattChg; BluetoothHandsfreeNetworkState mService; From 1234f00e911b672aeb895ff3c4e297838ec591fc Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 2 Sep 2014 12:46:07 +0200 Subject: [PATCH 110/139] Bug 1061126: Make Bluetooth AVRCP interface generally available, r=shuang The methods of |BluetoothAVRCPInterface| are now always available. On Android versions before 18, which don't support AVRCP, they always fail with STATUS_UNSUPPORTED. --- .../bluedroid/BluetoothInterface.cpp | 116 +++++++++++++++--- dom/bluetooth/bluedroid/BluetoothInterface.h | 11 +- 2 files changed, 105 insertions(+), 22 deletions(-) diff --git a/dom/bluetooth/bluedroid/BluetoothInterface.cpp b/dom/bluetooth/bluedroid/BluetoothInterface.cpp index 6a520b9f7e93..17e8feeb6985 100644 --- a/dom/bluetooth/bluedroid/BluetoothInterface.cpp +++ b/dom/bluetooth/bluedroid/BluetoothInterface.cpp @@ -4,11 +4,11 @@ * 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 "BluetoothInterface.h" #include #include #include #include "base/message_loop.h" -#include "BluetoothInterface.h" #include "nsAutoPtr.h" #include "nsThreadUtils.h" #include "nsXULAppAPI.h" @@ -2986,6 +2986,7 @@ struct interface_traits return BT_PROFILE_AV_RC_ID; } }; +#endif typedef BluetoothInterfaceRunnable0 @@ -3018,7 +3019,6 @@ DispatchBluetoothAvrcpResult( } return rv; } -#endif // Notification handling // @@ -3026,7 +3026,6 @@ DispatchBluetoothAvrcpResult( BluetoothAvrcpNotificationHandler::~BluetoothAvrcpNotificationHandler() { } -#if ANDROID_VERSION >= 18 static BluetoothAvrcpNotificationHandler* sAvrcpNotificationHandler; struct BluetoothAvrcpCallback @@ -3092,7 +3091,6 @@ struct BluetoothAvrcpCallback BluetoothAvrcpEvent, uint32_t> RegisterNotificationNotification; -#if ANDROID_VERSION >= 19 typedef BluetoothNotificationRunnable2 PassthroughCmdNotification; -#endif // ANDROID_VERSION >= 19 // Bluedroid AVRCP callbacks +#if ANDROID_VERSION >= 18 static void GetPlayStatus() { @@ -3181,6 +3179,7 @@ struct BluetoothAvrcpCallback &BluetoothAvrcpNotificationHandler::RegisterNotificationNotification, aEvent, aParam); } +#endif // ANDROID_VERSION >= 18 #if ANDROID_VERSION >= 19 static void @@ -3213,10 +3212,17 @@ struct BluetoothAvrcpCallback // BluetoothAvrcpInterface::BluetoothAvrcpInterface( - const btrc_interface_t* aInterface) +#if ANDROID_VERSION >= 18 + const btrc_interface_t* aInterface +#endif + ) +#if ANDROID_VERSION >= 18 : mInterface(aInterface) +#endif { +#if ANDROID_VERSION >= 18 MOZ_ASSERT(mInterface); +#endif } BluetoothAvrcpInterface::~BluetoothAvrcpInterface() @@ -3227,6 +3233,7 @@ BluetoothAvrcpInterface::Init( BluetoothAvrcpNotificationHandler* aNotificationHandler, BluetoothAvrcpResultHandler* aRes) { +#if ANDROID_VERSION >= 18 static btrc_callbacks_t sCallbacks = { sizeof(sCallbacks), #if ANDROID_VERSION >= 19 @@ -3247,10 +3254,15 @@ BluetoothAvrcpInterface::Init( BluetoothAvrcpCallback::PassthroughCmd #endif }; +#endif // ANDROID_VERSION >= 18 sAvrcpNotificationHandler = aNotificationHandler; +#if ANDROID_VERSION >= 18 bt_status_t status = mInterface->init(&sCallbacks); +#else + bt_status_t status = BT_STATUS_UNSUPPORTED; +#endif if (aRes) { DispatchBluetoothAvrcpResult(aRes, &BluetoothAvrcpResultHandler::Init, @@ -3261,7 +3273,9 @@ BluetoothAvrcpInterface::Init( void BluetoothAvrcpInterface::Cleanup(BluetoothAvrcpResultHandler* aRes) { +#if ANDROID_VERSION >= 18 mInterface->cleanup(); +#endif if (aRes) { DispatchBluetoothAvrcpResult(aRes, &BluetoothAvrcpResultHandler::Cleanup, @@ -3275,6 +3289,8 @@ BluetoothAvrcpInterface::GetPlayStatusRsp(ControlPlayStatus aPlayStatus, BluetoothAvrcpResultHandler* aRes) { bt_status_t status; + +#if ANDROID_VERSION >= 18 btrc_play_status_t playStatus = BTRC_PLAYSTATE_STOPPED; if (!(NS_FAILED(Convert(aPlayStatus, playStatus)))) { @@ -3282,6 +3298,9 @@ BluetoothAvrcpInterface::GetPlayStatusRsp(ControlPlayStatus aPlayStatus, } else { status = BT_STATUS_PARM_INVALID; } +#else + status = BT_STATUS_UNSUPPORTED; +#endif if (aRes) { DispatchBluetoothAvrcpResult( @@ -3296,6 +3315,8 @@ BluetoothAvrcpInterface::ListPlayerAppAttrRsp( BluetoothAvrcpResultHandler* aRes) { bt_status_t status; + +#if ANDROID_VERSION >= 18 ConvertArray pAttrsArray(aPAttrs, aNumAttr); nsAutoArrayPtr pAttrs; @@ -3304,6 +3325,9 @@ BluetoothAvrcpInterface::ListPlayerAppAttrRsp( } else { status = BT_STATUS_PARM_INVALID; } +#else + status = BT_STATUS_UNSUPPORTED; +#endif if (aRes) { DispatchBluetoothAvrcpResult( @@ -3316,7 +3340,11 @@ void BluetoothAvrcpInterface::ListPlayerAppValueRsp( int aNumVal, uint8_t* aPVals, BluetoothAvrcpResultHandler* aRes) { +#if ANDROID_VERSION >= 18 bt_status_t status = mInterface->list_player_app_value_rsp(aNumVal, aPVals); +#else + bt_status_t status = BT_STATUS_UNSUPPORTED; +#endif if (aRes) { DispatchBluetoothAvrcpResult( @@ -3331,6 +3359,8 @@ BluetoothAvrcpInterface::GetPlayerAppValueRsp( BluetoothAvrcpResultHandler* aRes) { bt_status_t status; + +#if ANDROID_VERSION >= 18 btrc_player_settings_t pVals; /* FIXME: you need to implement the missing conversion functions */ @@ -3341,6 +3371,9 @@ BluetoothAvrcpInterface::GetPlayerAppValueRsp( } else { status = BT_STATUS_PARM_INVALID; } +#else + status = BT_STATUS_UNSUPPORTED; +#endif if (aRes) { DispatchBluetoothAvrcpResult( @@ -3355,6 +3388,8 @@ BluetoothAvrcpInterface::GetPlayerAppAttrTextRsp( BluetoothAvrcpResultHandler* aRes) { bt_status_t status; + +#if ANDROID_VERSION >= 18 btrc_player_setting_text_t* aPAttrs; /* FIXME: you need to implement the missing conversion functions */ @@ -3365,6 +3400,9 @@ BluetoothAvrcpInterface::GetPlayerAppAttrTextRsp( } else { status = BT_STATUS_PARM_INVALID; } +#else + status = BT_STATUS_UNSUPPORTED; +#endif if (aRes) { DispatchBluetoothAvrcpResult( @@ -3379,6 +3417,8 @@ BluetoothAvrcpInterface::GetPlayerAppValueTextRsp( BluetoothAvrcpResultHandler* aRes) { bt_status_t status; + +#if ANDROID_VERSION >= 18 btrc_player_setting_text_t* pVals; /* FIXME: you need to implement the missing conversion functions */ @@ -3389,6 +3429,9 @@ BluetoothAvrcpInterface::GetPlayerAppValueTextRsp( } else { status = BT_STATUS_PARM_INVALID; } +#else + status = BT_STATUS_UNSUPPORTED; +#endif if (aRes) { DispatchBluetoothAvrcpResult( @@ -3403,6 +3446,8 @@ BluetoothAvrcpInterface::GetElementAttrRsp( BluetoothAvrcpResultHandler* aRes) { bt_status_t status; + +#if ANDROID_VERSION >= 18 ConvertArray pAttrsArray(aAttrs, aNumAttr); nsAutoArrayPtr pAttrs; @@ -3411,6 +3456,9 @@ BluetoothAvrcpInterface::GetElementAttrRsp( } else { status = BT_STATUS_PARM_INVALID; } +#else + status = BT_STATUS_UNSUPPORTED; +#endif if (aRes) { DispatchBluetoothAvrcpResult( @@ -3424,6 +3472,8 @@ BluetoothAvrcpInterface::SetPlayerAppValueRsp( BluetoothAvrcpStatus aRspStatus, BluetoothAvrcpResultHandler* aRes) { bt_status_t status; + +#if ANDROID_VERSION >= 18 btrc_status_t rspStatus = BTRC_STS_BAD_CMD; // silences compiler warning if (NS_SUCCEEDED(Convert(aRspStatus, rspStatus))) { @@ -3431,6 +3481,9 @@ BluetoothAvrcpInterface::SetPlayerAppValueRsp( } else { status = BT_STATUS_PARM_INVALID; } +#else + status = BT_STATUS_UNSUPPORTED; +#endif if (aRes) { DispatchBluetoothAvrcpResult( @@ -3445,8 +3498,10 @@ BluetoothAvrcpInterface::RegisterNotificationRsp( const BluetoothAvrcpNotificationParam& aParam, BluetoothAvrcpResultHandler* aRes) { - nsresult rv; bt_status_t status; + +#if ANDROID_VERSION >= 18 + nsresult rv; btrc_event_id_t event = { }; btrc_notification_type_t type = BTRC_NOTIFICATION_TYPE_INTERIM; btrc_register_notification_t param; @@ -3489,6 +3544,9 @@ BluetoothAvrcpInterface::RegisterNotificationRsp( } else { status = BT_STATUS_PARM_INVALID; } +#else + status = BT_STATUS_UNSUPPORTED; +#endif if (aRes) { DispatchBluetoothAvrcpResult( @@ -3513,7 +3571,6 @@ BluetoothAvrcpInterface::SetVolume(uint8_t aVolume, ConvertDefault(status, STATUS_FAIL)); } } -#endif // // Bluetooth Core Interface @@ -4292,14 +4349,8 @@ BluetoothInterface::LeTestMode(uint16_t aOpcode, uint8_t* aBuf, uint8_t aLen, template T* -BluetoothInterface::GetProfileInterface() +BluetoothInterface::CreateProfileInterface() { - static T* sBluetoothProfileInterface; - - if (sBluetoothProfileInterface) { - return sBluetoothProfileInterface; - } - typename interface_traits::const_interface_type* interface = reinterpret_cast::const_interface_type*>( mInterface->get_profile_interface(interface_traits::profile_id())); @@ -4315,7 +4366,36 @@ BluetoothInterface::GetProfileInterface() return nullptr; } - sBluetoothProfileInterface = new T(interface); + return new T(interface); +} + +#if ANDROID_VERSION < 18 +/* + * Bluedroid versions that don't support AVRCP will call this function + * to create an AVRCP interface. All interface methods will fail with + * the error constant STATUS_UNSUPPORTED. + */ +template <> +BluetoothAvrcpInterface* +BluetoothInterface::CreateProfileInterface() +{ + BT_WARNING("Bluetooth profile 'avrcp' is not supported"); + + return new BluetoothAvrcpInterface(); +} +#endif + +template +T* +BluetoothInterface::GetProfileInterface() +{ + static T* sBluetoothProfileInterface; + + if (sBluetoothProfileInterface) { + return sBluetoothProfileInterface; + } + + sBluetoothProfileInterface = CreateProfileInterface(); return sBluetoothProfileInterface; } @@ -4341,11 +4421,7 @@ BluetoothInterface::GetBluetoothA2dpInterface() BluetoothAvrcpInterface* BluetoothInterface::GetBluetoothAvrcpInterface() { -#if ANDROID_VERSION >= 18 return GetProfileInterface(); -#else - return nullptr; -#endif } END_BLUETOOTH_NAMESPACE diff --git a/dom/bluetooth/bluedroid/BluetoothInterface.h b/dom/bluetooth/bluedroid/BluetoothInterface.h index 677c57ff3ff5..6acfc20a2f8d 100644 --- a/dom/bluetooth/bluedroid/BluetoothInterface.h +++ b/dom/bluetooth/bluedroid/BluetoothInterface.h @@ -427,7 +427,6 @@ public: class BluetoothAvrcpInterface { -#if ANDROID_VERSION >= 18 public: friend class BluetoothInterface; @@ -473,10 +472,15 @@ public: void SetVolume(uint8_t aVolume, BluetoothAvrcpResultHandler* aRes); protected: - BluetoothAvrcpInterface(const btrc_interface_t* aInterface); + BluetoothAvrcpInterface( +#if ANDROID_VERSION >= 18 + const btrc_interface_t* aInterface +#endif + ); ~BluetoothAvrcpInterface(); private: +#if ANDROID_VERSION >= 18 const btrc_interface_t* mInterface; #endif }; @@ -657,6 +661,9 @@ protected: ~BluetoothInterface(); private: + template + T* CreateProfileInterface(); + template T* GetProfileInterface(); From fedc29b918970c2b158fa1ba7c274ff00addd4ea Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 2 Sep 2014 12:46:08 +0200 Subject: [PATCH 111/139] Bug 1061126: Cleanup ANDROID_VERSION from BluetoothA2DPManager, r=shuang All interfaces for Bluetooth profiles are now always available, so we don't have to check for specific versions of Bluedroid. Instead, we try to call the methods, and check their results. --- .../bluedroid/BluetoothA2dpManager.cpp | 68 +++++++------------ 1 file changed, 26 insertions(+), 42 deletions(-) diff --git a/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp b/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp index cfb8be6b6e46..45befe4b4128 100644 --- a/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp +++ b/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp @@ -31,9 +31,7 @@ namespace { StaticRefPtr sBluetoothA2dpManager; bool sInShutdown = false; static BluetoothA2dpInterface* sBtA2dpInterface; -#if ANDROID_VERSION > 17 static BluetoothAvrcpInterface* sBtAvrcpInterface; -#endif } // anonymous namespace /* @@ -122,7 +120,6 @@ AvStatusToSinkString(BluetoothA2dpConnectionState aState, nsAString& aString) } } -#if ANDROID_VERSION > 17 class InitAvrcpResultHandler MOZ_FINAL : public BluetoothAvrcpResultHandler { public: @@ -135,7 +132,15 @@ public: BT_WARNING("BluetoothAvrcpInterface::Init failed: %d", (int)aStatus); if (mRes) { - mRes->OnError(NS_ERROR_FAILURE); + if (aStatus == STATUS_UNSUPPORTED) { + /* Not all versions of Bluedroid support AVRCP. So if the + * initialization fails with STATUS_UNSUPPORTED, we still + * signal success. + */ + mRes->Init(); + } else { + mRes->OnError(NS_ERROR_FAILURE); + } } } @@ -149,7 +154,6 @@ public: private: nsRefPtr mRes; }; -#endif class InitA2dpResultHandler MOZ_FINAL : public BluetoothA2dpResultHandler { @@ -169,22 +173,20 @@ public: void Init() MOZ_OVERRIDE { -#if ANDROID_VERSION > 17 - /* Also init AVRCP if it's available, ... */ BluetoothInterface* btInf = BluetoothInterface::GetInstance(); - NS_ENSURE_TRUE_VOID(btInf); + if (NS_WARN_IF(!btInf)) { + mRes->OnError(NS_ERROR_FAILURE); + return; + } sBtAvrcpInterface = btInf->GetBluetoothAvrcpInterface(); - NS_ENSURE_TRUE_VOID(sBtAvrcpInterface); + if (NS_WARN_IF(!sBtAvrcpInterface)) { + mRes->OnError(NS_ERROR_FAILURE); + return; + } BluetoothA2dpManager* a2dpManager = BluetoothA2dpManager::Get(); sBtAvrcpInterface->Init(a2dpManager, new InitAvrcpResultHandler(mRes)); -#else - /* ...or signal success otherwise. */ - if (mRes) { - mRes->Init(); - } -#endif } private: @@ -282,7 +284,6 @@ BluetoothA2dpManager::Get() return sBluetoothA2dpManager; } -#if ANDROID_VERSION > 17 class CleanupAvrcpResultHandler MOZ_FINAL : public BluetoothAvrcpResultHandler { public: @@ -295,7 +296,15 @@ public: BT_WARNING("BluetoothAvrcpInterface::Cleanup failed: %d", (int)aStatus); if (mRes) { - mRes->OnError(NS_ERROR_FAILURE); + if (aStatus == STATUS_UNSUPPORTED) { + /* Not all versions of Bluedroid support AVRCP. So if the + * cleanup fails with STATUS_UNSUPPORTED, we still signal + * success. + */ + mRes->Deinit(); + } else { + mRes->OnError(NS_ERROR_FAILURE); + } } } @@ -310,7 +319,6 @@ public: private: nsRefPtr mRes; }; -#endif class CleanupA2dpResultHandler MOZ_FINAL : public BluetoothA2dpResultHandler { @@ -331,15 +339,8 @@ public: void Cleanup() MOZ_OVERRIDE { sBtA2dpInterface = nullptr; -#if ANDROID_VERSION > 17 - /* Cleanup AVRCP if it's available and initialized, ...*/ if (sBtAvrcpInterface) { sBtAvrcpInterface->Cleanup(new CleanupAvrcpResultHandler(mRes)); - } else -#endif - if (mRes) { - /* ...or simply signal success from here. */ - mRes->Deinit(); } } @@ -357,15 +358,8 @@ public: NS_IMETHOD Run() MOZ_OVERRIDE { sBtA2dpInterface = nullptr; -#if ANDROID_VERSION > 17 - /* Cleanup AVRCP if it's available and initialized, ...*/ if (sBtAvrcpInterface) { sBtAvrcpInterface->Cleanup(new CleanupAvrcpResultHandler(mRes)); - } else -#endif - if (mRes) { - /* ...or simply signal success from here. */ - mRes->Deinit(); } return NS_OK; @@ -722,7 +716,6 @@ BluetoothA2dpManager::UpdateMetaData(const nsAString& aTitle, { MOZ_ASSERT(NS_IsMainThread()); -#if ANDROID_VERSION > 17 NS_ENSURE_TRUE_VOID(sBtAvrcpInterface); // Send track changed and position changed if track num is not the same. @@ -756,7 +749,6 @@ BluetoothA2dpManager::UpdateMetaData(const nsAString& aTitle, mMediaNumber = aMediaNumber; mTotalMediaCount = aTotalMediaCount; mDuration = aDuration; -#endif } /* @@ -770,7 +762,6 @@ BluetoothA2dpManager::UpdatePlayStatus(uint32_t aDuration, { MOZ_ASSERT(NS_IsMainThread()); -#if ANDROID_VERSION > 17 NS_ENSURE_TRUE_VOID(sBtAvrcpInterface); // always update playstatus first sBtAvrcpInterface->GetPlayStatusRsp(aPlayStatus, aDuration, @@ -799,7 +790,6 @@ BluetoothA2dpManager::UpdatePlayStatus(uint32_t aDuration, mDuration = aDuration; mPosition = aPosition; mPlayStatus = aPlayStatus; -#endif } /* @@ -815,7 +805,6 @@ BluetoothA2dpManager::UpdateRegisterNotification(BluetoothAvrcpEvent aEvent, { MOZ_ASSERT(NS_IsMainThread()); -#if ANDROID_VERSION > 17 NS_ENSURE_TRUE_VOID(sBtAvrcpInterface); BluetoothAvrcpNotificationParam param; @@ -862,7 +851,6 @@ BluetoothA2dpManager::UpdateRegisterNotification(BluetoothAvrcpEvent aEvent, sBtAvrcpInterface->RegisterNotificationRsp(aEvent, AVRCP_NTF_INTERIM, param, nullptr); -#endif } void @@ -1056,10 +1044,8 @@ BluetoothA2dpManager::GetElementAttrNotification( attrs[i].mValue); } -#if ANDROID_VERSION >= 18 MOZ_ASSERT(sBtAvrcpInterface); sBtAvrcpInterface->GetElementAttrRsp(aNumAttrs, attrs, nullptr); -#endif // ANDROID_VERSION >= 18 } void @@ -1073,9 +1059,7 @@ BluetoothA2dpManager::RegisterNotificationNotification( return; } -#if ANDROID_VERSION >= 18 a2dp->UpdateRegisterNotification(aEvent, aParam); -#endif // ANDROID_VERSION >= 18 } /* This method is used to get CT features from the Feature Bit Mask. If From 7a3a7d5275f16c8144393598a2df9e36f34f71b8 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 03:55:44 -0700 Subject: [PATCH 112/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/d633f1dff644 Author: Pavel Ivanov Desc: Merge pull request #23611 from pivanov/bug-1046336-followup Bug 1046336 - (2.1-visual-refresh) System Sound Refresh | followup ======== https://hg.mozilla.org/integration/gaia-central/rev/2f09de91f916 Author: Pavel Ivanov Desc: Bug 1046336 - (2.1-visual-refresh) System Sound Refresh | followup --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 72587d8f2e09..aa483aec7809 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "6a3ea6ba0554fa99e9e6bab222c6470a3f9900f8", + "revision": "d633f1dff6441e90686068f1dd67d0792ba1b594", "repo_path": "/integration/gaia-central" } From d3e255df5a3426a67e443bf21f258757175a6e86 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 03:57:28 -0700 Subject: [PATCH 113/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index a5b00410b085..20d2df06baa4 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index fa0777783d37..003ec47159a2 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 1c9d375e6177..37db5306fb98 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index e2805ac460c7..8b6c8996604a 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index fa0777783d37..003ec47159a2 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 58613ec1d1a9..b64fdb0b0869 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 9137c6a30de9..8ae6e120a492 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index dbe3aee180cc..f92c76510196 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 8750f1734e62..ad2377f4b1fe 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 7c5d2ee1fb3f..20fcc695d1e5 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 46412564600a..3a200568b88a 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From c8732062225819c79e9ebcdf58d203bc8ecb7c9f Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 04:10:45 -0700 Subject: [PATCH 114/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/997af0291743 Author: Zac Desc: Merge pull request #23459 from viorelaioia/bug_1060236 Bug 1060236 - Fix failure in test_cards_view_with_two_apps.py ======== https://hg.mozilla.org/integration/gaia-central/rev/ccb85438faae Author: Viorela Ioia Desc: Bug 1060236 - Fix failure in test_cards_view_with_two_apps.py --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index aa483aec7809..95b5bb3b222a 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "d633f1dff6441e90686068f1dd67d0792ba1b594", + "revision": "997af0291743d851b7cc88204419e9e47739d26d", "repo_path": "/integration/gaia-central" } From 2fee3f7e2a10ab15f0a2047510f9d230b2107efb Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 04:16:56 -0700 Subject: [PATCH 115/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 20d2df06baa4..f0218a7e6e29 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 003ec47159a2..3afb1452a98f 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 37db5306fb98..b2c89296d2f0 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 8b6c8996604a..0c32883baa5b 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 003ec47159a2..3afb1452a98f 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index b64fdb0b0869..43dd2ac0c79a 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 8ae6e120a492..d51e10a33915 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index f92c76510196..3ce4aa19ff65 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index ad2377f4b1fe..683a25a81b52 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 20fcc695d1e5..ff4c195218bb 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 3a200568b88a..9532b8483473 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From dee81859b32cb21932f490730bb5d3b49f517f25 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 04:25:42 -0700 Subject: [PATCH 116/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/c37b329da48f Author: Dominic Kuo Desc: Merge pull request #23597 from dominickuo/bug-1032675-reland Bug 1032675 - [System] upgrade the new default tones for OTA, r=timdream ======== https://hg.mozilla.org/integration/gaia-central/rev/c7faf529bc62 Author: Dominic Kuo Desc: Bug 1032675 - [System] upgrade the new default tones for OTA --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 95b5bb3b222a..f9df705376b2 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "997af0291743d851b7cc88204419e9e47739d26d", + "revision": "c37b329da48fdb4ce15510683830ab6b07a58a92", "repo_path": "/integration/gaia-central" } From 534d3da27a01b1ccad5dba66627f1db6e6e3a521 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 04:27:27 -0700 Subject: [PATCH 117/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index f0218a7e6e29..5c40bd026d1b 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 3afb1452a98f..1d977dccf679 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index b2c89296d2f0..0b60ad52c55d 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 0c32883baa5b..f7c8e603427c 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 3afb1452a98f..1d977dccf679 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 43dd2ac0c79a..f38a5067a490 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index d51e10a33915..b2935ae8ec0f 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 3ce4aa19ff65..8a34d7609c10 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 683a25a81b52..b0f8741bae58 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index ff4c195218bb..8fc098de3c17 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 9532b8483473..cd812099c432 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 73d7bd596f6ad8122e3b3c5b0b0573fd4ae023f0 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 04:55:43 -0700 Subject: [PATCH 118/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ======== https://hg.mozilla.org/integration/gaia-central/rev/b629b7b189a1 Author: Cristian Rodriguez Desc: Merge pull request #23553 from ADLR-es/fix-bug-947352 Bug 947352 - [B2G][Contacts] Magnifying glass search icon on scroll list... ======== https://hg.mozilla.org/integration/gaia-central/rev/2061f35f308b Author: Adrián de la Rosa Desc: Bug 947352 - [B2G][Contacts] Magnifying glass search icon on scroll list in contacts app does not function --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index f9df705376b2..c1e7125a9215 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "c37b329da48fdb4ce15510683830ab6b07a58a92", + "revision": "b629b7b189a13abc76c71005aaa9b4600aae5096", "repo_path": "/integration/gaia-central" } From c6c364128d4764b36ddd0e9f0a58f3aa7259a7d5 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 04:57:29 -0700 Subject: [PATCH 119/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 5c40bd026d1b..b99f81c56c84 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 1d977dccf679..0684b469a7e7 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 0b60ad52c55d..5b5f504110ea 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index f7c8e603427c..7476f9078baa 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 1d977dccf679..0684b469a7e7 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index f38a5067a490..8233d687e872 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index b2935ae8ec0f..bd00d6db0909 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 8a34d7609c10..03cfe8a4b950 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index b0f8741bae58..1f5142e1798b 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 8fc098de3c17..4861c598833e 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index cd812099c432..1c9a20b6626c 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 9a5752949434c0b06c3794eb0e54cadf840436fb Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 05:25:44 -0700 Subject: [PATCH 120/139] Bumping gaia.json for 4 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/b1285c7e5745 Author: Carsten Book Desc: Merge pull request #23273 from tauzen/Bug1055446_debug_cleanup Bug 1055446 - NFC: log visibly errors in nfc relateded files, r=gweng ======== https://hg.mozilla.org/integration/gaia-central/rev/af9f1e0dc7dc Author: Krzysztof Mioduszewski Desc: Bug 1055446 - NFC: log visibly errors in nfc related files, r=gweng ======== https://hg.mozilla.org/integration/gaia-central/rev/7fb735fb644e Author: Carsten Book Desc: Merge pull request #23405 from oklang/bug_1055104_theme_switching_panel Bug 1055104 - Theme switching panel. r=ejchen ======== https://hg.mozilla.org/integration/gaia-central/rev/63f473233eba Author: Olle Klang Desc: Bug 1055104 - Theme switching panel This patch adds a Theme switching panel in the Settings app. --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index c1e7125a9215..b18129ab1dbe 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "b629b7b189a13abc76c71005aaa9b4600aae5096", + "revision": "b1285c7e5745e5bb7aa04c6e61ab929f290b2935", "repo_path": "/integration/gaia-central" } From b32f262972a64dd3bdbc139ef2b1d9f974207297 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 05:31:51 -0700 Subject: [PATCH 121/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index b99f81c56c84..0ea37039eaeb 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 0684b469a7e7..1a85495531d9 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 5b5f504110ea..634b2332b6dd 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 7476f9078baa..4ba4623a4e5d 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 0684b469a7e7..1a85495531d9 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 8233d687e872..2fc8188f0b99 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index bd00d6db0909..f8109db89974 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 03cfe8a4b950..fbbdc5f2e6e2 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 1f5142e1798b..0fe7d43ca18a 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 4861c598833e..d4d4c590d9d8 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 1c9a20b6626c..d2cadb88c275 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From b08c51fe320323ca01eb005d9c7bd84b8b3cef7f Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 05:55:43 -0700 Subject: [PATCH 122/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/ff4361871ef2 Author: Aleh Zasypkin Desc: Merge pull request #23570 from azasypkin/bug-1061150-outgoing-message-background Bug 1061150 - [Messages][Refresh] Change outgoing message background to #fff. r=schung ======== https://hg.mozilla.org/integration/gaia-central/rev/245909c17c77 Author: Aleh Zasypkin Desc: Bug 1061150 - [Messages][Refresh] Change outgoing message background to #fff. r=schung --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index b18129ab1dbe..41882607da2f 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "b1285c7e5745e5bb7aa04c6e61ab929f290b2935", + "revision": "ff4361871ef2d055c1c9afeca4e87f3256b032fc", "repo_path": "/integration/gaia-central" } From 3a11b1e22ec8c9ac6a5a0313a278f36e72e537fe Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 05:57:29 -0700 Subject: [PATCH 123/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 0ea37039eaeb..30dcb13ce44a 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 1a85495531d9..eaf7e3b477c1 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 634b2332b6dd..e114d4f2c74e 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 4ba4623a4e5d..fba11b0bec82 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 1a85495531d9..eaf7e3b477c1 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 2fc8188f0b99..484454f0da94 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index f8109db89974..b3a7620b1479 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index fbbdc5f2e6e2..64103f2ddaa1 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 0fe7d43ca18a..940eac0bd9ef 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index d4d4c590d9d8..03b49165f85e 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index d2cadb88c275..97d672cfe297 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 1a2ded73b7459b53dbc68bdcfd6a529d24564d3c Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 06:10:44 -0700 Subject: [PATCH 124/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/51b4fd78db4b Author: Min-Zhong "John" Lu Desc: Merge pull request #23399 from mnjul/bug_942309_email_url_keep_same_layout Bug 942309 - [keyboard] keyboard layout language changes for input type=url and type=email. r=rudyl. ui-r=ofeng ======== https://hg.mozilla.org/integration/gaia-central/rev/e28ee3f8e4c3 Author: John Lu [:mnjul] Desc: Bug 942309 - [keyboard] keyboard layout language changes for input type=url and type=email --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 41882607da2f..c7c41b7b60e3 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "ff4361871ef2d055c1c9afeca4e87f3256b032fc", + "revision": "51b4fd78db4b2965fbbad20f03140d0ff6cc956d", "repo_path": "/integration/gaia-central" } From 264f626e00a0bac20a7f1982460620c4c6fb3066 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 06:17:03 -0700 Subject: [PATCH 125/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 30dcb13ce44a..51ba83c7fe51 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index eaf7e3b477c1..407fba8dbf04 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index e114d4f2c74e..7de4767e1311 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index fba11b0bec82..4d427078acb5 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index eaf7e3b477c1..407fba8dbf04 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 484454f0da94..4b0f887569fa 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index b3a7620b1479..18e454798e21 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 64103f2ddaa1..6fc340888e5c 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 940eac0bd9ef..6a6948cb470a 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 03b49165f85e..7b89037b06ba 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 97d672cfe297..d0d0d4737824 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 5ef8718dfd2d7a3916f2e1863a724f4632264c5b Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 07:15:33 -0700 Subject: [PATCH 126/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/49d173267ac5 Author: Yura Zenevich Desc: Merge pull request #23489 from yzen/bug-1030390 Bug 1030390 - improved cards view and taks manager accessibility. r=alive ======== https://hg.mozilla.org/integration/gaia-central/rev/1bc4bf953d23 Author: Yura Zenevich Desc: Bug 1030390 - improved cards view and taks manager accessibility. r=alive --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index c7c41b7b60e3..e7a1030263f6 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "51b4fd78db4b2965fbbad20f03140d0ff6cc956d", + "revision": "49d173267ac537d6e1a23036614ea6fd2d29515b", "repo_path": "/integration/gaia-central" } From 86ff723f423838040489ec207a234640263985a1 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 07:23:58 -0700 Subject: [PATCH 127/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 51ba83c7fe51..3d4ed0de28e8 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 407fba8dbf04..f54286a82536 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 7de4767e1311..d5ef9520f78b 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 4d427078acb5..d8a27de91562 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 407fba8dbf04..f54286a82536 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 4b0f887569fa..375020ff3cbc 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 18e454798e21..a16544063370 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 6fc340888e5c..11cf74c14c2d 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 6a6948cb470a..b5035a7fc5b5 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 7b89037b06ba..aa639dc3ecb3 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index d0d0d4737824..3e2e2bdede0f 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From ef03c55f14660e09233c4c20eb26fb692e932bf8 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 07:30:20 -0700 Subject: [PATCH 128/139] Bumping gaia.json for 6 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/d107a7715d68 Author: Arthur Chen Desc: Merge pull request #23475 from crh0716/1046552 Bug 1046552 - List all possible strings for easier localization r=eragonj ======== https://hg.mozilla.org/integration/gaia-central/rev/313c79e5e84c Author: Arthur Chen Desc: Bug 1045662 - List all possible strings for easier localization ======== https://hg.mozilla.org/integration/gaia-central/rev/52c4b53298f6 Author: Arthur Chen Desc: Merge pull request #23470 from crh0716/1060274 Bug 1060274 - Fix l10n issues of apn settings r=eragonj ======== https://hg.mozilla.org/integration/gaia-central/rev/93912f3e42bc Author: Arthur Chen Desc: Bug 1060274 - Fix l10n issues of apn settings ======== https://hg.mozilla.org/integration/gaia-central/rev/fb18650d9396 Author: Zac Desc: Merge pull request #23369 from chirarobert/launch_browser_with_manifest Bug 1059224 - [v2.1] Update browser launch method to use manifest url in... ======== https://hg.mozilla.org/integration/gaia-central/rev/e0390165b5b9 Author: Robert Chira Desc: Bug 1059224 - [v2.1] Update browser launch method to use manifest url instead of app name --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index e7a1030263f6..24c55e8f2928 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "49d173267ac537d6e1a23036614ea6fd2d29515b", + "revision": "d107a7715d681a16e6f220f0a058d81d773f51b2", "repo_path": "/integration/gaia-central" } From 3e408b1b9dfe05f141cc827d7e8eb960ff6c9a14 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 07:41:07 -0700 Subject: [PATCH 129/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 3d4ed0de28e8..f4228056f8d8 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index f54286a82536..31a64fd0179d 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index d5ef9520f78b..e9ac28a5ddba 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index d8a27de91562..c3d53d007cc9 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index f54286a82536..31a64fd0179d 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 375020ff3cbc..81e8ed08a9ec 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index a16544063370..d9d23faf3636 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 11cf74c14c2d..fafa5d5de89c 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index b5035a7fc5b5..a28c4c71faa4 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index aa639dc3ecb3..19cafdbd62c9 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 3e2e2bdede0f..ebe8bcbe9f51 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From f5edd82118a3ffa56a07c28c8ae4892541755510 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 08:00:27 -0700 Subject: [PATCH 130/139] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/a5c22fd2faed Author: Alive.Kuo Desc: Merge pull request #23569 from alivedise/bugzilla/1061118/dismiss-keyboard-before-attention-window-opened Bug 1061118 - Dismiss keyboard on attention window requestopen or recove...,r=etienne ======== https://hg.mozilla.org/integration/gaia-central/rev/9d8005e3705a Author: Alive Kuo Desc: Bug 1061118 - Dismiss keyboard on attention window requestopen or recovering --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 24c55e8f2928..671bed32fb87 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "d107a7715d681a16e6f220f0a058d81d773f51b2", + "revision": "a5c22fd2faed558bd633a191e9db710b8080abca", "repo_path": "/integration/gaia-central" } From c0077fa5ed286401dd1d387c808fa8e32d088b76 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 08:09:30 -0700 Subject: [PATCH 131/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index f4228056f8d8..c56fd6e1c934 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 31a64fd0179d..4748358559ea 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index e9ac28a5ddba..8bfe24ddd765 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index c3d53d007cc9..e630dd1563ca 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 31a64fd0179d..4748358559ea 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 81e8ed08a9ec..8a1a7da4e982 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index d9d23faf3636..531a253765c3 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index fafa5d5de89c..5b0d29e894ea 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index a28c4c71faa4..e22e20f86a1a 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 19cafdbd62c9..b4885109d94e 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index ebe8bcbe9f51..a5166de6dead 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 697833b652e8c378d37da94191e49320a16ea11a Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Tue, 2 Sep 2014 08:28:24 -0700 Subject: [PATCH 132/139] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index c56fd6e1c934..a6a32cf89d5d 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 4748358559ea..fe0d17eec082 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -20,7 +20,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 8bfe24ddd765..4e5b48053994 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index e630dd1563ca..2075be9d58c1 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 4748358559ea..fe0d17eec082 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -20,7 +20,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 8a1a7da4e982..859571dee8c6 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 531a253765c3..5e5316fca1e6 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 5b0d29e894ea..aeae93aede77 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index e22e20f86a1a..8eb11b33d1c3 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -16,7 +16,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index b4885109d94e..ebadacb074a6 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index a5166de6dead..7cca083e69a1 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -18,7 +18,7 @@ - + From e6a258eb7bb41c6b0c907f7123ca3e6d177cdf48 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 2 Sep 2014 12:19:32 -0400 Subject: [PATCH 133/139] Bug 1061251 - Fix more bad implicit constructors in accessible; r=tbsaunde --- accessible/atk/RootAccessibleWrap.h | 2 +- accessible/atk/nsMaiHyperlink.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/accessible/atk/RootAccessibleWrap.h b/accessible/atk/RootAccessibleWrap.h index 0f632fc7c0a7..50a5a807ab04 100644 --- a/accessible/atk/RootAccessibleWrap.h +++ b/accessible/atk/RootAccessibleWrap.h @@ -23,7 +23,7 @@ typedef RootAccessible RootAccessibleWrap; class GtkWindowAccessible MOZ_FINAL : public DummyAccessible { public: - GtkWindowAccessible(AtkObject* aAccessible); + explicit GtkWindowAccessible(AtkObject* aAccessible); virtual ~GtkWindowAccessible(); }; diff --git a/accessible/atk/nsMaiHyperlink.h b/accessible/atk/nsMaiHyperlink.h index 156bf60bd30e..de179366d558 100644 --- a/accessible/atk/nsMaiHyperlink.h +++ b/accessible/atk/nsMaiHyperlink.h @@ -23,7 +23,7 @@ namespace a11y { class MaiHyperlink { public: - MaiHyperlink(Accessible* aHyperLink); + explicit MaiHyperlink(Accessible* aHyperLink); ~MaiHyperlink(); public: From 7df178ae1f7450bf8259f360cfe86079228cd0e3 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 2 Sep 2014 12:19:58 -0400 Subject: [PATCH 134/139] Bug 1061009 - Fix more bad implicit constructors in a11y; r=tbsaunde --- accessible/base/ARIAMap.h | 2 +- accessible/base/AccCollector.h | 2 +- accessible/base/AccIterator.h | 6 +++--- accessible/base/EventQueue.h | 2 +- accessible/base/NotificationController.h | 4 ++-- accessible/base/Relation.h | 4 ++-- accessible/base/TextAttrs.h | 6 +++--- accessible/base/nsAccessiblePivot.cpp | 4 ++-- accessible/base/nsAccessiblePivot.h | 2 +- accessible/xpcom/xpcAccessibleTable.h | 2 +- accessible/xpcom/xpcAccessibleTableCell.h | 2 +- accessible/xpcom/xpcAccessibleTextRange.h | 2 +- 12 files changed, 19 insertions(+), 19 deletions(-) diff --git a/accessible/base/ARIAMap.h b/accessible/base/ARIAMap.h index 089689aa671f..3b1c315fdf22 100644 --- a/accessible/base/ARIAMap.h +++ b/accessible/base/ARIAMap.h @@ -234,7 +234,7 @@ uint8_t AttrCharacteristicsFor(nsIAtom* aAtom); class AttrIterator { public: - AttrIterator(nsIContent* aContent) : + explicit AttrIterator(nsIContent* aContent) : mContent(aContent), mAttrIdx(0) { mAttrCount = mContent->GetAttrCount(); diff --git a/accessible/base/AccCollector.h b/accessible/base/AccCollector.h index 7cd1c5b74cf4..b62219761f76 100644 --- a/accessible/base/AccCollector.h +++ b/accessible/base/AccCollector.h @@ -81,7 +81,7 @@ public: protected: // Make sure it's used by Accessible class only. - EmbeddedObjCollector(Accessible* aRoot) : + explicit EmbeddedObjCollector(Accessible* aRoot) : AccCollector(aRoot, filters::GetEmbeddedObject) { } virtual void AppendObject(Accessible* aAccessible); diff --git a/accessible/base/AccIterator.h b/accessible/base/AccIterator.h index 79d3deebffc0..8fb761811c12 100644 --- a/accessible/base/AccIterator.h +++ b/accessible/base/AccIterator.h @@ -52,7 +52,7 @@ private: struct IteratorState { - IteratorState(Accessible* aParent, IteratorState* mParentState = nullptr); + explicit IteratorState(Accessible* aParent, IteratorState* mParentState = nullptr); Accessible* mParent; int32_t mIndex; @@ -254,7 +254,7 @@ private: class SingleAccIterator : public AccIterable { public: - SingleAccIterator(Accessible* aTarget): mAcc(aTarget) { } + explicit SingleAccIterator(Accessible* aTarget): mAcc(aTarget) { } virtual ~SingleAccIterator() { } virtual Accessible* Next(); @@ -274,7 +274,7 @@ private: class ItemIterator : public AccIterable { public: - ItemIterator(Accessible* aItemContainer) : + explicit ItemIterator(Accessible* aItemContainer) : mContainer(aItemContainer), mAnchor(nullptr) { } virtual ~ItemIterator() { } diff --git a/accessible/base/EventQueue.h b/accessible/base/EventQueue.h index a5457d5b0a5f..73ad154daf20 100644 --- a/accessible/base/EventQueue.h +++ b/accessible/base/EventQueue.h @@ -19,7 +19,7 @@ class DocAccessible; class EventQueue { protected: - EventQueue(DocAccessible* aDocument) : mDocument(aDocument) { } + explicit EventQueue(DocAccessible* aDocument) : mDocument(aDocument) { } /** * Put an accessible event into the queue to process it later. diff --git a/accessible/base/NotificationController.h b/accessible/base/NotificationController.h index e4fdb23d70c6..90b6dcb7b028 100644 --- a/accessible/base/NotificationController.h +++ b/accessible/base/NotificationController.h @@ -275,8 +275,8 @@ private: typedef T* KeyType; typedef const T* KeyTypePointer; - nsCOMPtrHashKey(const T* aKey) : mKey(const_cast(aKey)) {} - nsCOMPtrHashKey(const nsPtrHashKey &aToCopy) : mKey(aToCopy.mKey) {} + explicit nsCOMPtrHashKey(const T* aKey) : mKey(const_cast(aKey)) {} + explicit nsCOMPtrHashKey(const nsPtrHashKey &aToCopy) : mKey(aToCopy.mKey) {} ~nsCOMPtrHashKey() { } KeyType GetKey() const { return mKey; } diff --git a/accessible/base/Relation.h b/accessible/base/Relation.h index e81add9d3f27..1a9ac9cfed53 100644 --- a/accessible/base/Relation.h +++ b/accessible/base/Relation.h @@ -23,10 +23,10 @@ class Relation public: Relation() : mFirstIter(nullptr), mLastIter(nullptr) { } - Relation(AccIterable* aIter) : + explicit Relation(AccIterable* aIter) : mFirstIter(aIter), mLastIter(aIter) { } - Relation(Accessible* aAcc) : + explicit Relation(Accessible* aAcc) : mFirstIter(nullptr), mLastIter(nullptr) { AppendTarget(aAcc); } diff --git a/accessible/base/TextAttrs.h b/accessible/base/TextAttrs.h index 23d74bcfdb9d..1c5d54c25fa4 100644 --- a/accessible/base/TextAttrs.h +++ b/accessible/base/TextAttrs.h @@ -34,7 +34,7 @@ public: /** * Constructor. Used to expose default text attributes. */ - TextAttrsMgr(HyperTextAccessible* aHyperTextAcc) : + explicit TextAttrsMgr(HyperTextAccessible* aHyperTextAcc) : mOffsetAcc(nullptr), mHyperTextAcc(aHyperTextAcc), mOffsetAccIdx(-1), mIncludeDefAttrs(true) { } @@ -126,7 +126,7 @@ protected: class TTextAttr : public TextAttr { public: - TTextAttr(bool aGetRootValue) : mGetRootValue(aGetRootValue) {} + explicit TTextAttr(bool aGetRootValue) : mGetRootValue(aGetRootValue) {} // TextAttr virtual void Expose(nsIPersistentProperties* aAttributes, @@ -393,7 +393,7 @@ protected: { public: TextDecorValue() { } - TextDecorValue(nsIFrame* aFrame); + explicit TextDecorValue(nsIFrame* aFrame); nscolor Color() const { return mColor; } uint8_t Style() const { return mStyle; } diff --git a/accessible/base/nsAccessiblePivot.cpp b/accessible/base/nsAccessiblePivot.cpp index dcf9fcb3f78e..27d420332105 100644 --- a/accessible/base/nsAccessiblePivot.cpp +++ b/accessible/base/nsAccessiblePivot.cpp @@ -19,8 +19,8 @@ using namespace mozilla::a11y; class RuleCache { public: - RuleCache(nsIAccessibleTraversalRule* aRule) : mRule(aRule), - mAcceptRoles(nullptr) { } + explicit RuleCache(nsIAccessibleTraversalRule* aRule) : mRule(aRule), + mAcceptRoles(nullptr) { } ~RuleCache () { if (mAcceptRoles) nsMemory::Free(mAcceptRoles); diff --git a/accessible/base/nsAccessiblePivot.h b/accessible/base/nsAccessiblePivot.h index 5bdabca0eab2..c05b8022ea70 100644 --- a/accessible/base/nsAccessiblePivot.h +++ b/accessible/base/nsAccessiblePivot.h @@ -25,7 +25,7 @@ class nsAccessiblePivot MOZ_FINAL : public nsIAccessiblePivot public: typedef mozilla::a11y::Accessible Accessible; - nsAccessiblePivot(Accessible* aRoot); + explicit nsAccessiblePivot(Accessible* aRoot); NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsAccessiblePivot, nsIAccessiblePivot) diff --git a/accessible/xpcom/xpcAccessibleTable.h b/accessible/xpcom/xpcAccessibleTable.h index 0b7dfff5df0a..21d0d8e7472e 100644 --- a/accessible/xpcom/xpcAccessibleTable.h +++ b/accessible/xpcom/xpcAccessibleTable.h @@ -21,7 +21,7 @@ class TableAccessible; class xpcAccessibleTable { public: - xpcAccessibleTable(mozilla::a11y::TableAccessible* aTable) : mTable(aTable) { } + explicit xpcAccessibleTable(mozilla::a11y::TableAccessible* aTable) : mTable(aTable) { } nsresult GetCaption(nsIAccessible** aCaption); nsresult GetSummary(nsAString& aSummary); diff --git a/accessible/xpcom/xpcAccessibleTableCell.h b/accessible/xpcom/xpcAccessibleTableCell.h index 0936b5362474..7ac2fa3cb781 100644 --- a/accessible/xpcom/xpcAccessibleTableCell.h +++ b/accessible/xpcom/xpcAccessibleTableCell.h @@ -25,7 +25,7 @@ class TableCellAccessible; class xpcAccessibleTableCell { public: - xpcAccessibleTableCell(mozilla::a11y::TableCellAccessible* aTableCell) : + explicit xpcAccessibleTableCell(mozilla::a11y::TableCellAccessible* aTableCell) : mTableCell(aTableCell) { } nsresult GetTable(nsIAccessibleTable** aTable); diff --git a/accessible/xpcom/xpcAccessibleTextRange.h b/accessible/xpcom/xpcAccessibleTextRange.h index 8692de50fb49..480f80df52a3 100644 --- a/accessible/xpcom/xpcAccessibleTextRange.h +++ b/accessible/xpcom/xpcAccessibleTextRange.h @@ -61,7 +61,7 @@ public: NS_DECLARE_STATIC_IID_ACCESSOR(NS_ACCESSIBLETEXTRANGE_IMPL_IID) private: - xpcAccessibleTextRange(TextRange&& aRange) : + explicit xpcAccessibleTextRange(TextRange&& aRange) : mRange(Forward(aRange)) {} xpcAccessibleTextRange() {} From c382f0d21dbc232783ec98b93c3a608ca3d4b337 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 2 Sep 2014 12:20:24 -0400 Subject: [PATCH 135/139] Bug 1061047 - Fix some bad implicit constructors in imagelib; r=jrmuizel --- image/decoders/nsBMPDecoder.h | 2 +- image/decoders/nsGIFDecoder2.h | 2 +- image/decoders/nsICODecoder.h | 2 +- image/decoders/nsIconDecoder.h | 2 +- image/decoders/nsPNGDecoder.h | 2 +- image/src/Decoder.h | 2 +- image/src/DynamicImage.h | 2 +- image/src/FrameBlender.h | 2 +- image/src/FrozenImage.h | 2 +- image/src/Image.h | 2 +- image/src/ImageWrapper.h | 2 +- image/src/OrientedImage.cpp | 2 +- image/src/RasterImage.cpp | 2 +- image/src/RasterImage.h | 12 ++++++------ image/src/ScriptedNotificationObserver.h | 2 +- image/src/VectorImage.h | 4 ++-- image/src/imgFrame.h | 2 +- image/src/imgRequest.cpp | 2 +- image/src/imgRequestProxy.cpp | 2 +- image/src/imgStatusTracker.cpp | 2 +- image/src/imgStatusTracker.h | 2 +- 21 files changed, 27 insertions(+), 27 deletions(-) diff --git a/image/decoders/nsBMPDecoder.h b/image/decoders/nsBMPDecoder.h index f6019149428b..812565a2bc87 100644 --- a/image/decoders/nsBMPDecoder.h +++ b/image/decoders/nsBMPDecoder.h @@ -24,7 +24,7 @@ class nsBMPDecoder : public Decoder { public: - nsBMPDecoder(RasterImage &aImage); + explicit nsBMPDecoder(RasterImage &aImage); ~nsBMPDecoder(); // Specifies whether or not the BMP file will contain alpha data diff --git a/image/decoders/nsGIFDecoder2.h b/image/decoders/nsGIFDecoder2.h index 90cc71fc22c7..b000de707460 100644 --- a/image/decoders/nsGIFDecoder2.h +++ b/image/decoders/nsGIFDecoder2.h @@ -23,7 +23,7 @@ class nsGIFDecoder2 : public Decoder { public: - nsGIFDecoder2(RasterImage &aImage); + explicit nsGIFDecoder2(RasterImage &aImage); ~nsGIFDecoder2(); virtual void WriteInternal(const char* aBuffer, uint32_t aCount, DecodeStrategy aStrategy); diff --git a/image/decoders/nsICODecoder.h b/image/decoders/nsICODecoder.h index 73576b8036f8..b21cb61707ec 100644 --- a/image/decoders/nsICODecoder.h +++ b/image/decoders/nsICODecoder.h @@ -22,7 +22,7 @@ class nsICODecoder : public Decoder { public: - nsICODecoder(RasterImage &aImage); + explicit nsICODecoder(RasterImage &aImage); virtual ~nsICODecoder(); // Obtains the width of the icon directory entry diff --git a/image/decoders/nsIconDecoder.h b/image/decoders/nsIconDecoder.h index 4fcffcdd36bb..d04f846c602f 100644 --- a/image/decoders/nsIconDecoder.h +++ b/image/decoders/nsIconDecoder.h @@ -38,7 +38,7 @@ class nsIconDecoder : public Decoder { public: - nsIconDecoder(RasterImage &aImage); + explicit nsIconDecoder(RasterImage &aImage); virtual ~nsIconDecoder(); virtual void WriteInternal(const char* aBuffer, uint32_t aCount, DecodeStrategy aStrategy); diff --git a/image/decoders/nsPNGDecoder.h b/image/decoders/nsPNGDecoder.h index cfa211b779f1..ca7a227447a8 100644 --- a/image/decoders/nsPNGDecoder.h +++ b/image/decoders/nsPNGDecoder.h @@ -24,7 +24,7 @@ class RasterImage; class nsPNGDecoder : public Decoder { public: - nsPNGDecoder(RasterImage &aImage); + explicit nsPNGDecoder(RasterImage &aImage); virtual ~nsPNGDecoder(); virtual void InitInternal(); diff --git a/image/src/Decoder.h b/image/src/Decoder.h index 6527ca9b1866..dd500f9b945f 100644 --- a/image/src/Decoder.h +++ b/image/src/Decoder.h @@ -32,7 +32,7 @@ class Decoder { public: - Decoder(RasterImage& aImage); + explicit Decoder(RasterImage& aImage); virtual ~Decoder(); /** diff --git a/image/src/DynamicImage.h b/image/src/DynamicImage.h index 207f126e683a..f2f216ef5c60 100644 --- a/image/src/DynamicImage.h +++ b/image/src/DynamicImage.h @@ -25,7 +25,7 @@ public: NS_DECL_ISUPPORTS NS_DECL_IMGICONTAINER - DynamicImage(gfxDrawable* aDrawable) + explicit DynamicImage(gfxDrawable* aDrawable) : mDrawable(aDrawable) { MOZ_ASSERT(aDrawable, "Must have a gfxDrawable to wrap"); diff --git a/image/src/FrameBlender.h b/image/src/FrameBlender.h index 85fe191019e2..a7fc62f84691 100644 --- a/image/src/FrameBlender.h +++ b/image/src/FrameBlender.h @@ -32,7 +32,7 @@ public: * * If aSequenceToUse is not specified, it will be allocated automatically. */ - FrameBlender(FrameSequence* aSequenceToUse = nullptr); + explicit FrameBlender(FrameSequence* aSequenceToUse = nullptr); ~FrameBlender(); bool DoBlend(nsIntRect* aDirtyRect, uint32_t aPrevFrameIndex, diff --git a/image/src/FrozenImage.h b/image/src/FrozenImage.h index 32b0f4664085..c197f61c97a3 100644 --- a/image/src/FrozenImage.h +++ b/image/src/FrozenImage.h @@ -55,7 +55,7 @@ public: NS_IMETHOD_(float) GetFrameIndex(uint32_t aWhichFrame) MOZ_OVERRIDE; protected: - FrozenImage(Image* aImage) : ImageWrapper(aImage) { } + explicit FrozenImage(Image* aImage) : ImageWrapper(aImage) { } virtual ~FrozenImage() { } private: diff --git a/image/src/Image.h b/image/src/Image.h index 7579ef02ec33..711e1f89298a 100644 --- a/image/src/Image.h +++ b/image/src/Image.h @@ -179,7 +179,7 @@ public: virtual ImageURL* GetURI() MOZ_OVERRIDE { return mURI.get(); } protected: - ImageResource(ImageURL* aURI); + explicit ImageResource(ImageURL* aURI); // Shared functionality for implementors of imgIContainer. Every // implementation of attribute animationMode should forward here. diff --git a/image/src/ImageWrapper.h b/image/src/ImageWrapper.h index 071dbff72be2..820895ade42a 100644 --- a/image/src/ImageWrapper.h +++ b/image/src/ImageWrapper.h @@ -63,7 +63,7 @@ public: virtual ImageURL* GetURI() MOZ_OVERRIDE; protected: - ImageWrapper(Image* aInnerImage) + explicit ImageWrapper(Image* aInnerImage) : mInnerImage(aInnerImage) { NS_ABORT_IF_FALSE(aInnerImage, "Cannot wrap a null image"); diff --git a/image/src/OrientedImage.cpp b/image/src/OrientedImage.cpp index bec3a43fb1c4..b620e7faf73b 100644 --- a/image/src/OrientedImage.cpp +++ b/image/src/OrientedImage.cpp @@ -164,7 +164,7 @@ OrientedImage::GetImageContainer(LayerManager* aManager, ImageContainer** _retva struct MatrixBuilder { - MatrixBuilder(bool aInvert) : mInvert(aInvert) { } + explicit MatrixBuilder(bool aInvert) : mInvert(aInvert) { } gfxMatrix Build() { return mMatrix; } diff --git a/image/src/RasterImage.cpp b/image/src/RasterImage.cpp index a473ee42a881..1249518faa3e 100644 --- a/image/src/RasterImage.cpp +++ b/image/src/RasterImage.cpp @@ -294,7 +294,7 @@ public: class DrawRunner : public nsRunnable { public: - DrawRunner(ScaleRequest* request) + explicit DrawRunner(ScaleRequest* request) : mScaleRequest(request) {} diff --git a/image/src/RasterImage.h b/image/src/RasterImage.h index 7e3f5b55e5bc..6f4d1e4ed194 100644 --- a/image/src/RasterImage.h +++ b/image/src/RasterImage.h @@ -350,7 +350,7 @@ private: */ struct DecodeRequest { - DecodeRequest(RasterImage* aImage) + explicit DecodeRequest(RasterImage* aImage) : mImage(aImage) , mBytesToDecode(0) , mRequestStatus(REQUEST_INACTIVE) @@ -546,7 +546,7 @@ private: NS_IMETHOD Run(); private: /* methods */ - FrameNeededWorker(RasterImage* image); + explicit FrameNeededWorker(RasterImage* image); private: /* members */ @@ -780,7 +780,7 @@ private: // data NS_IMETHOD Run(); private: - HandleErrorWorker(RasterImage* aImage); + explicit HandleErrorWorker(RasterImage* aImage); nsRefPtr mImage; }; @@ -793,8 +793,8 @@ private: // data bool StoringSourceData() const; protected: - RasterImage(imgStatusTracker* aStatusTracker = nullptr, - ImageURL* aURI = nullptr); + explicit RasterImage(imgStatusTracker* aStatusTracker = nullptr, + ImageURL* aURI = nullptr); bool ShouldAnimate(); @@ -814,7 +814,7 @@ inline NS_IMETHODIMP RasterImage::GetAnimationMode(uint16_t *aAnimationMode) { class imgDecodeRequestor : public nsRunnable { public: - imgDecodeRequestor(RasterImage &aContainer) { + explicit imgDecodeRequestor(RasterImage &aContainer) { mContainer = &aContainer; } NS_IMETHOD Run() { diff --git a/image/src/ScriptedNotificationObserver.h b/image/src/ScriptedNotificationObserver.h index a08ede2e37d6..fccb3010b049 100644 --- a/image/src/ScriptedNotificationObserver.h +++ b/image/src/ScriptedNotificationObserver.h @@ -19,7 +19,7 @@ namespace image { class ScriptedNotificationObserver : public imgINotificationObserver { public: - ScriptedNotificationObserver(imgIScriptedNotificationObserver* aInner); + explicit ScriptedNotificationObserver(imgIScriptedNotificationObserver* aInner); NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_IMGINOTIFICATIONOBSERVER diff --git a/image/src/VectorImage.h b/image/src/VectorImage.h index a7d49bd99de1..fee70a703c2c 100644 --- a/image/src/VectorImage.h +++ b/image/src/VectorImage.h @@ -78,8 +78,8 @@ public: void OnSVGDocumentError(); protected: - VectorImage(imgStatusTracker* aStatusTracker = nullptr, - ImageURL* aURI = nullptr); + explicit VectorImage(imgStatusTracker* aStatusTracker = nullptr, + ImageURL* aURI = nullptr); virtual ~VectorImage(); virtual nsresult StartAnimation(); diff --git a/image/src/imgFrame.h b/image/src/imgFrame.h index 96eb659d8972..9db2e59a7a41 100644 --- a/image/src/imgFrame.h +++ b/image/src/imgFrame.h @@ -172,7 +172,7 @@ private: // data class AutoFrameLocker { public: - AutoFrameLocker(imgFrame* frame) + explicit AutoFrameLocker(imgFrame* frame) : mFrame(frame) , mSucceeded(NS_SUCCEEDED(frame->LockImageData())) {} diff --git a/image/src/imgRequest.cpp b/image/src/imgRequest.cpp index 7536861c736d..51030bf967b8 100644 --- a/image/src/imgRequest.cpp +++ b/image/src/imgRequest.cpp @@ -303,7 +303,7 @@ void imgRequest::ContinueCancel(nsresult aStatus) class imgRequestMainThreadEvict : public nsRunnable { public: - imgRequestMainThreadEvict(imgRequest *aImgRequest) + explicit imgRequestMainThreadEvict(imgRequest *aImgRequest) : mImgRequest(aImgRequest) { MOZ_ASSERT(!NS_IsMainThread(), "Create me off main thread only!"); diff --git a/image/src/imgRequestProxy.cpp b/image/src/imgRequestProxy.cpp index 967c01d331ae..17fbe76563dc 100644 --- a/image/src/imgRequestProxy.cpp +++ b/image/src/imgRequestProxy.cpp @@ -1050,7 +1050,7 @@ imgRequestProxy::GetOwner() const class StaticBehaviour : public ProxyBehaviour { public: - StaticBehaviour(mozilla::image::Image* aImage) : mImage(aImage) {} + explicit StaticBehaviour(mozilla::image::Image* aImage) : mImage(aImage) {} virtual already_AddRefed GetImage() const MOZ_OVERRIDE { diff --git a/image/src/imgStatusTracker.cpp b/image/src/imgStatusTracker.cpp index 0a9af6bb6b28..4000266ab596 100644 --- a/image/src/imgStatusTracker.cpp +++ b/image/src/imgStatusTracker.cpp @@ -23,7 +23,7 @@ using mozilla::WeakPtr; class imgStatusTrackerObserver : public imgDecoderObserver { public: - imgStatusTrackerObserver(imgStatusTracker* aTracker) + explicit imgStatusTrackerObserver(imgStatusTracker* aTracker) : mTracker(aTracker) { MOZ_ASSERT(aTracker); diff --git a/image/src/imgStatusTracker.h b/image/src/imgStatusTracker.h index e4e455b0e6ef..ef149e6bbf26 100644 --- a/image/src/imgStatusTracker.h +++ b/image/src/imgStatusTracker.h @@ -117,7 +117,7 @@ public: // aImage is the image that this status tracker will pass to the // imgRequestProxys in SyncNotify() and EmulateRequestFinished(), and must be // alive as long as this instance is, because we hold a weak reference to it. - imgStatusTracker(mozilla::image::Image* aImage); + explicit imgStatusTracker(mozilla::image::Image* aImage); // Image-setter, for imgStatusTrackers created by imgRequest::Init, which // are created before their Image is created. This method should only From 2647584aa5389de3b1a0218696e1a56db6fa67a1 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 2 Sep 2014 12:20:50 -0400 Subject: [PATCH 136/139] Bug 1060918 - Do not rely on two implicit conversions in GLContextProviderWGL.cpp for clang-cl compatibility; r=jrmuizel This works around http://llvm.org/PR20821. --- gfx/gl/GLContextProviderWGL.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/gl/GLContextProviderWGL.cpp b/gfx/gl/GLContextProviderWGL.cpp index 8e2cf087ab2c..a8c2124d6788 100644 --- a/gfx/gl/GLContextProviderWGL.cpp +++ b/gfx/gl/GLContextProviderWGL.cpp @@ -635,7 +635,7 @@ GLContextProviderWGL::CreateHeadless() return nullptr; } - nsRefPtr retGL = glContext; + nsRefPtr retGL = glContext.get(); return retGL.forget(); } From cb70f7d73481b8fc00241981dcdccd05d03a3973 Mon Sep 17 00:00:00 2001 From: ffxbld Date: Tue, 2 Sep 2014 12:52:28 -0400 Subject: [PATCH 137/139] No bug - Tagging mozilla-central c360f3d1c00d with FIREFOX_AURORA_34_BASE a=release DONTBUILD CLOSED TREE --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 83e9e78ca88f..516993416a5a 100644 --- a/.hgtags +++ b/.hgtags @@ -103,3 +103,4 @@ ba2cc1eda988a1614d8986ae145d28e1268409b9 FIREFOX_AURORA_29_BASE cfde3603b0206e119abea76fdd6e134b634348f1 FIREFOX_AURORA_31_BASE 16f3cac5e8fe471e12f76d6a94a477b14e78df7c FIREFOX_AURORA_32_BASE dc23164ba2a289a8b22902e30990c77d9677c214 FIREFOX_AURORA_33_BASE +c360f3d1c00d73b0c1fb0a2c0da525cb55e58b83 FIREFOX_AURORA_34_BASE From e1ad3b108d6cf105e38cba5b993fc0bf4293be1d Mon Sep 17 00:00:00 2001 From: ffxbld Date: Tue, 2 Sep 2014 12:54:33 -0400 Subject: [PATCH 138/139] Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release --- CLOBBER | 2 +- b2g/confvars.sh | 2 +- browser/config/version.txt | 2 +- config/milestone.txt | 2 +- mobile/android/confvars.sh | 2 +- services/sync/Makefile.in | 2 +- xpcom/components/Module.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CLOBBER b/CLOBBER index 27253369765e..d4cdfaff33de 100644 --- a/CLOBBER +++ b/CLOBBER @@ -22,4 +22,4 @@ # changes to stick? As of bug 928195, this shouldn't be necessary! Please # don't change CLOBBER for WebIDL changes any more. -dom/ flattening might need a CLOBBER. +Merge day clobber \ No newline at end of file diff --git a/b2g/confvars.sh b/b2g/confvars.sh index 307ecc4f29f1..9640cad993ea 100644 --- a/b2g/confvars.sh +++ b/b2g/confvars.sh @@ -5,7 +5,7 @@ MOZ_APP_BASENAME=B2G MOZ_APP_VENDOR=Mozilla -MOZ_APP_VERSION=34.0a1 +MOZ_APP_VERSION=35.0a1 MOZ_APP_UA_NAME=Firefox MOZ_UA_OS_AGNOSTIC=1 diff --git a/browser/config/version.txt b/browser/config/version.txt index bb12bf2e22bf..7277859118d9 100644 --- a/browser/config/version.txt +++ b/browser/config/version.txt @@ -1 +1 @@ -34.0a1 +35.0a1 diff --git a/config/milestone.txt b/config/milestone.txt index 1c88b7abded4..20513527ecaf 100644 --- a/config/milestone.txt +++ b/config/milestone.txt @@ -10,4 +10,4 @@ # hardcoded milestones in the tree from these two files. #-------------------------------------------------------- -34.0a1 +35.0a1 diff --git a/mobile/android/confvars.sh b/mobile/android/confvars.sh index 9cf882e4449f..32421aa92705 100644 --- a/mobile/android/confvars.sh +++ b/mobile/android/confvars.sh @@ -5,7 +5,7 @@ MOZ_APP_BASENAME=Fennec MOZ_APP_VENDOR=Mozilla -MOZ_APP_VERSION=34.0a1 +MOZ_APP_VERSION=35.0a1 MOZ_APP_UA_NAME=Firefox MOZ_BRANDING_DIRECTORY=mobile/android/branding/unofficial diff --git a/services/sync/Makefile.in b/services/sync/Makefile.in index fd81af5dea39..db91829774ba 100644 --- a/services/sync/Makefile.in +++ b/services/sync/Makefile.in @@ -3,7 +3,7 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Definitions used by constants.js. -weave_version := 1.36.0 +weave_version := 1.37.0 weave_id := {340c2bbc-ce74-4362-90b5-7c26312808ef} # Preprocess files. diff --git a/xpcom/components/Module.h b/xpcom/components/Module.h index 2d90cc23a571..0806eafce8ef 100644 --- a/xpcom/components/Module.h +++ b/xpcom/components/Module.h @@ -21,7 +21,7 @@ namespace mozilla { */ struct Module { - static const unsigned int kVersion = 34; + static const unsigned int kVersion = 35; struct CIDEntry; From 6f7938c36965fd2fdbcdf6c763468148a3c44c11 Mon Sep 17 00:00:00 2001 From: Rail Aliiev Date: Tue, 2 Sep 2014 13:21:28 -0400 Subject: [PATCH 139/139] Bug 1029851 - Tracking bug for 02-sep-2014 migration work. Bump B2G version. r=hwine IGNORE BROKEN CHANGESETS CLOSED TREE a=release ba=release --- b2g/confvars.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/confvars.sh b/b2g/confvars.sh index 9640cad993ea..7e23a96a5269 100644 --- a/b2g/confvars.sh +++ b/b2g/confvars.sh @@ -10,7 +10,7 @@ MOZ_APP_UA_NAME=Firefox MOZ_UA_OS_AGNOSTIC=1 -MOZ_B2G_VERSION=2.1.0.0-prerelease +MOZ_B2G_VERSION=2.2.0.0-prerelease MOZ_B2G_OS_NAME=Boot2Gecko MOZ_BRANDING_DIRECTORY=b2g/branding/unofficial