0ada91b0452e646a8e394e34f84fd3ad9160a2fc: Bug 1344629 - Part 7: Fix up a couple of pointers to literal strings. r=dbaron
David Major <dmajor@mozilla.com> - Tue, 14 Mar 2017 15:26:36 +1300 - rev 347436
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1344629 - Part 7: Fix up a couple of pointers to literal strings. r=dbaron These would fail to compile once nsTLiteralString stops inheriting from nsTString. MozReview-Commit-ID: DFvuESN8G5s
083304fcd6bd97d0822439f8f04a13a47f49bc26: Bug 1344629 - Part 6.5: Allow get() on nsLiteralStrings, excluding temporaries. r=dbaron
David Major <dmajor@mozilla.com> - Tue, 14 Mar 2017 15:26:36 +1300 - rev 347435
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1344629 - Part 6.5: Allow get() on nsLiteralStrings, excluding temporaries. r=dbaron This prevents the antipattern found in bug 1341513. MozReview-Commit-ID: JhxgC7aQDUA
53d7d1ce2c97a8a82f8422ddc70efac986f46318: Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron
David Major <dmajor@mozilla.com> - Tue, 14 Mar 2017 15:26:27 +1300 - rev 347434
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1344629 - Part 6: Rewrite unnecessary uses of nsLiteralString. r=dbaron There's an antipattern where nsLiteralString is used as an unnecessary intermediary in converting from CharT* to CharT*, e.g. CallAFunctionThatTakesACharPointer(NS_LITERAL_CSTRING("foo").get()); or NS_NAMED_LITERAL_STRING(foo, "abc"); CallAFunctionThatTakesACharPointer(foo.get()); This patch rewrites the callsites that can be trivially changed to use char*/char16_t*. I'd somewhat like to remove nsTLiteralString::get() altogether, but in code that's less straightforward than these examples, get() is useful enough to keep. MozReview-Commit-ID: Kh1rUziVllo
55eee7078ae4bc342710b9e3a7051a8aa177d872: Bug 1344629 - Part 5: Make string tuples work with nsTStringRepr. r=dbaron
David Major <dmajor@mozilla.com> - Tue, 14 Mar 2017 10:04:15 +1300 - rev 347433
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1344629 - Part 5: Make string tuples work with nsTStringRepr. r=dbaron This requires some adjustment to Equals(). Previously, when you wrote: fooString.Equals(barString + bazString) you'd get a tuple for the operator+, which implicitly converts to nsTSubstring, which resolves into nsTSubstring::Equals(const nsTSubstring&). Now that Equals has moved one level up: nsTStringRepr::Equals(const nsTStringRepr&) The compiler can't make the double-leap from nsTSubstringTuple -> nsTSubstring -> nsTStringRepr. So I implemented this manually. MozReview-Commit-ID: 5x8XhndOToJ
7d3c06b3eca939c10e6f37eae4efa686f874dc9c: Bug 1344629 - Part 4: Cleanup: make string tuples not think in terms of "substring". r=dbaron
David Major <dmajor@mozilla.com> - Tue, 14 Mar 2017 10:02:55 +1300 - rev 347432
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1344629 - Part 4: Cleanup: make string tuples not think in terms of "substring". r=dbaron In the next patch, tuples will work on nsTStringRepr rather than nsTSubstring, so the notions of TO_SUBSTRING and substring_type are not quite right. MozReview-Commit-ID: LpUwmGQAWVO
e5df14c3db61b8e434dcadee3db0ae8c3be22ab0: Bug 1344629 - Part 3: Move const accessors from nsTSubstring to nsTStringRepr. r=dbaron
David Major <dmajor@mozilla.com> - Tue, 14 Mar 2017 10:02:50 +1300 - rev 347431
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1344629 - Part 3: Move const accessors from nsTSubstring to nsTStringRepr. r=dbaron All nsTStringRepr methods must be const, so the mutators remain on nsTSubstring. I left a small number of const methods on nsTSubstring, e.g. Capacity(), the rationale being that you would only be interested in this method if you intend to mutate the string. I considered splitting up the typedefs block and leaving behind the ones related to mutation (e.g. nsWritingIterator) but I think it makes for clearer documentation to have them all in one place. MozReview-Commit-ID: 7dEaRgc8NLK
636095ff2815186ef647a7d05598ae75bf1ad6d8: Bug 1344629 - Part 2: Add nsTStringRepr as the new root of the string hierarchy. r=dbaron
David Major <dmajor@mozilla.com> - Tue, 14 Mar 2017 10:01:35 +1300 - rev 347430
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1344629 - Part 2: Add nsTStringRepr as the new root of the string hierarchy. r=dbaron I've named it after the similar ns(C)StringRepr in the rust bindings code. This is just the minimal definition of the structure. Bulk move of methods coming in next patch. MozReview-Commit-ID: 4aQrpIWRTm7
0be052ad24c1d058cf629ef490c48f7c5b2510bb: Bug 1344629 - Part 1: String class cleanup and dead code removal. r=dbaron
David Major <dmajor@mozilla.com> - Tue, 14 Mar 2017 09:28:49 +1300 - rev 347429
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1344629 - Part 1: String class cleanup and dead code removal. r=dbaron Cleanup in preparation for upcoming patches: - By using an accessor method, nsTPromiseFlatString no longer needs to be a friend. - The explicit uint32_t constructors are unused. - The abstract_string_type typedef is unused (and will be potentially confusing in the next patch, so removing). - The three-param ctor for nsTSubstring no longer needs to be public "for convenience". - friend class nsTObsoleteAStringThunk_CharT no longer exists. MozReview-Commit-ID: 4ibJLNzn13k
c4688144319f23332b7d90b486677c6e4acd5457: Bug 1346116 part 3 - a test case for not suspend not-in-tree videos; r=jwwang
Kaku Kuo <kaku@mozilla.com> - Sun, 12 Mar 2017 14:03:04 +0800 - rev 347428
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1346116 part 3 - a test case for not suspend not-in-tree videos; r=jwwang MozReview-Commit-ID: JooStwaUGcx
f7ca43d48a42b0f9b0e2b0e80d0aa820a6c2a0d7: Bug 1346116 part 2 - consider a video is in-tree or not in the suspend-video-decoding policy; r=jwwang
Kaku Kuo <kaku@mozilla.com> - Sun, 12 Mar 2017 14:02:04 +0800 - rev 347427
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1346116 part 2 - consider a video is in-tree or not in the suspend-video-decoding policy; r=jwwang We never suspend videos that is NOT in-tree because we found that, according to the Telemetry data, most (>70%) videos which are used as the argument of drawImage() are not in-tree. So, by preventing suspending not-in-tree videos, we should be able to alleviate the pain of not able to resume video decoders synchronously. MozReview-Commit-ID: 8eqs0pHZLIt
096a4818b8c7aa485e30946a6f045e01cfd3b90e: Bug 1346116 part 1 - initialize MediaDecoder::mIsDocumentVisible and MediaDecoder::mIsElementVisible at HTMLMediaElement::FinishDecoderSetup(); r=jwwang
Kaku Kuo <kaku@mozilla.com> - Sun, 12 Mar 2017 13:56:43 +0800 - rev 347426
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1346116 part 1 - initialize MediaDecoder::mIsDocumentVisible and MediaDecoder::mIsElementVisible at HTMLMediaElement::FinishDecoderSetup(); r=jwwang Initialize the MediaDecoder::mIsElementVisible to be "!aOwner->IsHidden()" at the MediaDecoder's constructor is wrong. Insted, we initialize both MediaDecoder::mIsDocumentVisible and MediaDecoder::mIsElementVisible to be false at the construtor, and then assign the HTMLMediaElement's real values to them at HTMLMediaElement::FinishDecoderSetup() via the the MediaDecoder::SetActiviyChangesToDecoder(). The initialization values of MediaDecoder::mIsDocumentVisible and MediaDecoder::mIsElementVisible (in the constructor) do not matter because the valuse are not read untile the first MediaDecoder::SetActiviyChangesToDecoder() method call. MozReview-Commit-ID: Cdovq5pG9Nv
0f25d813f75dd1367db99dcd433ad4a8eb760c36: Bug 1346498 part 9 - move all policy codes into MediaDecoder::UpdateVideoDecodeMode(); r=jwwang
Kaku Kuo <kaku@mozilla.com> - Sat, 11 Mar 2017 19:56:17 +0800 - rev 347425
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1346498 part 9 - move all policy codes into MediaDecoder::UpdateVideoDecodeMode(); r=jwwang Make HTMLMediaElement no longer has logic of deciding visibility, it just passes all information into MediaDecoder. MozReview-Commit-ID: ApVcEQfboO
2fbdf43912c4dcb25cae7ba61ecf85d72fb37370: Bug 1346498 part 8 - extract the HTMLMediaElement::NotifyDecoderActivityChanges() method; r=jwwang
Kaku Kuo <kaku@mozilla.com> - Sat, 11 Mar 2017 18:25:41 +0800 - rev 347424
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1346498 part 8 - extract the HTMLMediaElement::NotifyDecoderActivityChanges() method; r=jwwang Move all the policy rules into this method now, will then move the policies into MediaDecoder at next patch. MozReview-Commit-ID: ILAYLrTwCJy
d450a061b0bef2c56f7055c967530a12d168bb64: Bug 1346498 part 7 - remove outdated comments in HTMLMediaElement.cpp; r=jwwang
Kaku Kuo <kaku@mozilla.com> - Sat, 11 Mar 2017 16:33:50 +0800 - rev 347423
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1346498 part 7 - remove outdated comments in HTMLMediaElement.cpp; r=jwwang MDSM's dormant mechanism has nothing to do with the HTMLMediaElement's states now. MozReview-Commit-ID: 4RSHsexy7fi
f4fc110ccde19cdf2ed6c531c91503ad425fac7f: Bug 1346498 part 6 - remove mHasSuspendTaint cannonical-mirror pair; r=jwwang
Kaku Kuo <kaku@mozilla.com> - Sat, 11 Mar 2017 15:12:38 +0800 - rev 347422
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1346498 part 6 - remove mHasSuspendTaint cannonical-mirror pair; r=jwwang MozReview-Commit-ID: BqAfv9CSsv3
6cc263c1f298f543eea564eb014808c39c597754: Bug 1346498 part 5 - don't check mHasSuspendTaint in HandleVideoSuspendTimeout(); r=jwwang
Kaku Kuo <kaku@mozilla.com> - Sat, 11 Mar 2017 15:09:15 +0800 - rev 347421
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1346498 part 5 - don't check mHasSuspendTaint in HandleVideoSuspendTimeout(); r=jwwang If mHasSuspendTaint is set, the mVideoDecodeSuspendTimer should already be canceled so that HandleVideoSuspendTimeout() won't be invoked. MozReview-Commit-ID: BGwSucZtH4d
a42487bf567a382db80ffe2116324dd76daa7735: Bug 1346498 part 4 - remove mIsVisible cannonical-mirror pair; r=jwwang
Kaku Kuo <kaku@mozilla.com> - Sat, 11 Mar 2017 14:06:09 +0800 - rev 347420
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1346498 part 4 - remove mIsVisible cannonical-mirror pair; r=jwwang The role of MDSM::mIsVisible and MDSM::VisibilityChanged() have been replaced by the MDSM::mVideoDecodeMode and MDSM::VideoDecodeModeChanged() completely. MozReview-Commit-ID: 8sW0s8ilF1E
af2fd441e1b2e96ffa38ff7b3a194be9cd67c1cd: Bug 1346498 part 3 - implement the UpdateVideoDecodeMode() policy in MediaDecoder; r=jwwang
Kaku Kuo <kaku@mozilla.com> - Fri, 10 Mar 2017 16:52:03 +0800 - rev 347419
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1346498 part 3 - implement the UpdateVideoDecodeMode() policy in MediaDecoder; r=jwwang So, the MediaDecoder is the one who rules out the policy of suspending video decoder. We also extract all the policy rules into one single method, MediaDecoder::UpdateVideoDecodeMode(). MozReview-Commit-ID: IOQq6kFfkIs
caaa45f70bb7a7fd8077bdad3fe3b660aa4ca460: Bug 1346498 part 2 - implement the VideoDecodeMode mechanism in MDSM; r=jwwang
Kaku Kuo <kaku@mozilla.com> - Fri, 10 Mar 2017 16:17:46 +0800 - rev 347418
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1346498 part 2 - implement the VideoDecodeMode mechanism in MDSM; r=jwwang The MDSM::mVideoDecodeMode and MDSM::SetVideoDecodeMode() are merely a renaming of MDSM::mIsVisible and MDSM::VisibilityChanged(). However, the renaming explicitly reflects that MDSM provides mechanism only without participating in the policy decision. Will reremove the MDSM::mIsVisible and MDSM::VisibilityChanged() in following patches. MozReview-Commit-ID: JdMKQTgVCf3
1152ca4a710e803f0758bc19f32ff64bd0320b7f: Bug 1346498 part 1 - extract the MediaDecoder::NotifyCompositor() method; r=jwwang
Kaku Kuo <kaku@mozilla.com> - Fri, 10 Mar 2017 16:29:59 +0800 - rev 347417
Push 31496 by cbook@mozilla.com at Tue, 14 Mar 2017 13:21:57 +0000
Bug 1346498 part 1 - extract the MediaDecoder::NotifyCompositor() method; r=jwwang MozReview-Commit-ID: Hfw3FJUSVVe
(0) -300000 -100000 -30000 -10000 -3000 -1000 -300 -100 -50 -20 +20 +50 +100 +300 +1000 +3000 +10000 +30000 +100000 tip