Граф коммитов

53349 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano 2408130832 Bug 1286464 part.17 ContentEventHandler::OnQueryTextRect() should compute a line breaker's rect from the last text frame if the queried range starts with a block frame r=smaug
When queried range starts with a block frame, we cannot compute proper line breaker's rect at its open tag only with the frame's rect because the proper rect should be at the end of previous text frame.

Therefore, this patch makes SetRangeFromFlatTextOffset() return the last text node found at scanning the range. Then, OnQueryTextRect() can compute the first line breaker's rect with it (if there is at least one text node).

However, if the last text node is hidden by CSS or something, this patch won't work. We need to do something in another bug for hidden frame's issue, though. But note that IME typically doesn't request hidden text's rect because neither selection nor composition string is in such range.

MozReview-Commit-ID: 2FFzNoubJ1y

--HG--
extra : rebase_source : b9c4af40b8747f19da8e55434d580e29322c9601
2016-08-08 18:11:11 +09:00
Masayuki Nakano 7b45431d6c Bug 1286464 part.16 Rename ContentEventHandler::Get*FrameHavingFlatTextInRange() to ContentEventHandler::Get*FrameInRangeForTextRect() and make them treat a moz-<br> element as a normal <br> element because it doesn't cause text but needs to compute text rect in the last empty line r=smaug
In plain text editor, moz-<br> element is appended for a placeholder of empty line when the text ends with a line breaker. Therefore, when we compute text rects, we need to handle it same as a normal <br> element even though it doesn't cause any text.

MozReview-Commit-ID: 4IXLafU6o0W

--HG--
extra : rebase_source : 5db9c70e3acd40e4f47f35fcf293702ce0fb0295
2016-08-02 14:00:32 +09:00
Masayuki Nakano b933e7c9bb Bug 1286464 part.15 Rewrite ContentEventHandler::OnQueryTextRect() with new utilities like ContentEventHandler::OnQueryTextRectArray() r=smaug
Although, this patch is pretty big and complicated, but I have no idea to separate this since this rewrites all over the OnQueryTextRect() with new utility methods which are implemented for OnQueryTextRectArray().

Currently, OnQueryTextRect() doesn't support line breaks before block level elements. Therefore, in HTML editors, eQueryTextRect may not work fine if the range includes open tags of block level elements. This causes odd positioning of IME's candidate window in non-e10s mode.

This implements ContentEventHandler::GetLastFrameHavingFlatTextInRange() which scans the given range from last to first. However, this hits wrong NS_ASSERTION() in nsContentIterator::Last().  mLast can be nullptr if there is no content but Init() returns NS_OK even in such case.  I think that returning NS_OK is fine because it's not illegal case.  Therefore this patch fixes the wrong assertion.

MozReview-Commit-ID: E6OnIA1eMou

--HG--
extra : rebase_source : e44114b6fb0024c2ab7f9101b12335de4b5cc4aa
2016-08-12 14:11:33 +09:00
Masayuki Nakano 3734289fe2 Bug 1286464 part.14 When ContentEventHandler::OnQueryTextRectArray() reaches the end of query range, it should append caret rect at the end of the content r=smaug
When the loop in ContentEventHandler::OnQueryTextRectArray() reaches at the end of contents, it should append a caret rect at the end of the contents. That helps deciding popup position of IME when caret is at the end of the contents.

This patch guesses the caret rect with eQueryTextRect event (for avoiding the dependency of native caret position of eQueryCaretRect event handler).

MozReview-Commit-ID: 8cGeHpkzX9g

--HG--
extra : rebase_source : c7adc65ccf0fefa7cb1c3bd0b056dc04f8a85b3e
2016-08-05 16:51:49 +09:00
Masayuki Nakano 65203b7481 Bug 1286464 part.13 ContentEventHandler::OnQueryTextRectArray() should guess a line breaker's rect with previous character's rect if it's available r=smaug
This is hack for returning better rect for a line breaker caused by non-<br> element. E.g., if a block frame causes a line break, after the last visible character is the best position, i.e., there is |<p>ABC</p><p>DEF</p>| and the caret is after "C", querying next character's rect should be computed with "C"'s rect, rather than computed with next <p> element's border rect.

MozReview-Commit-ID: 7nXt74GGpNf

--HG--
extra : rebase_source : 14807e98cc9a6be22e6168570a299abf0ecaf267
2016-08-05 14:31:37 +09:00
Masayuki Nakano 0ee732da0b Bug 1286464 part.12 ContentEventHandler::GetFirstFrameHavingFlatTextInRange() should return only frames whose content causes text r=smaug
If it returns frames which don't cause text, the caller needs complicated loop. So, it should return only frames which causes some text.

MozReview-Commit-ID: 9gny0w1PUMa

--HG--
extra : rebase_source : 423c7b57355d659e1a5bd96dac35060cae38801c
2016-07-21 17:45:17 +09:00
Masayuki Nakano dd3468f808 Bug 1286464 part.10 ContentEventHandler::OnQueryTextRectArray() should append same rects for following characters of a line breaker in nsTextFrame r=smaug
If line breakers in a text node works as is, e.g., |white-space: pre;| is specified, we need to handle line breakers in text frames too.

This patch handles "\n" in text nodes same as line breakers caused by some elements.

MozReview-Commit-ID: JmXesusFxzR

--HG--
extra : rebase_source : dca28a6e4661eef3c8a102916c451e0f021bf6d5
2016-08-05 14:06:30 +09:00
Masayuki Nakano 2a4ac3b7fa Bug 1286464 part.9 ContentEventHandler::OnQueryTextRectArray() shouldn't append same rect for following character of a lien breaker when the query range starts from middle of the line breaker r=smaug
If the query range starts middle of a line breaker, i.e., "\r[\n", ContentEventHandler::OnQueryTextRectArray() does not need to (in other words, should not) append same rect anymore.

This patch checks if the range starts middle of a line breaker and in such case, skip to append same rect.

MozReview-Commit-ID: H5gdtAakGcP

--HG--
extra : rebase_source : 3afaca4d6e9f09e2054c4a6bd876635cfef6c58c
2016-08-05 13:53:08 +09:00
Masayuki Nakano 7826a090ce Bug 1286464 part.8 ContentEventHandler::OnQueryTextRectArray() should handle line break before a node r=smaug
Some elements causes a line break before itself. In such case, OnQueryTextRectArray() should append one or two rects for such line breakers.

This patch also implements GetLineBreakerRectBefore(). It computes line breaker rect for the given frame. Even if it's a <br> frame, we cannot use its rect because <br> frame height is computed with line height but we need text's height (i.e., font height) and both height and width are 0 if it's in quirks mode and in non-empty line.  Therefore, this patch computes it with frame's baseline, font's max-ascent and max-descent.

Although, this patch computes a line breaker rect caused by a open tag of a block level element with block frame's rect. However, it shouldn't be used actually as far as possible.  Following patches will kill the path to the hack.

MozReview-Commit-ID: 9cym04j9NH9

--HG--
extra : rebase_source : 3117d68f056dc69550a16f52adade82049ba8277
2016-08-05 13:36:22 +09:00
Masayuki Nakano 85f2cccc4f Bug 1286464 part.7 ContentEventHandler::OnQueryTextRect() should redirect the query event to OnQueryCaretRect() if its query range is empty r=smaug
When eQueryTextRect's query range length is 0 (this may be caused by native IME's bug), it should return caret rect. Therefore, it should redirect such query events to OnQueryCaretRect(). Such IME must want caret rect in such case.

MozReview-Commit-ID: JaUwhw1Cn5G

--HG--
extra : rebase_source : aef43e028fdf19b1e4977ce0d73e3fd700793ba9
2016-07-25 23:19:53 +09:00
Masayuki Nakano d170e03f6c Bug 1286464 part.6 ContentEventHandler::OnQueryCaretRect() should use eQueryTextRect event when it needs to guess the caret rect r=smaug
ContentEventHandler::OnQueryTextRect() is now too complicated. So, we shouldn't duplicate similar code in OnQueryCaretRect(). When it needs to guess a caret rect from a character rect, we shouldn't compute character rect by itself.

MozReview-Commit-ID: 5G4MzQJzmoV

--HG--
extra : rebase_source : 31f2ec578eeb2af82b8af2d938448eb42afd50ea
2016-07-29 00:37:09 +09:00
Masayuki Nakano 20e4c11caf Bug 1286464 part.5 Create ContentEventHandler::EnsureNonEmptyRect() for query various rect event handlers r=smaug
This can kill the duplicated code in a lot of places in ContentEventHandler.

MozReview-Commit-ID: BRpBkbXyeBs

--HG--
extra : rebase_source : 98021e68cd0150149e6417c5a8f91979f5baad76
2016-08-05 13:01:17 +09:00
Masayuki Nakano d8cc4e966b Bug 1286464 part.4 ContentEventHandler::SetRangeFromFlatTextOffset() should set end of the range to after a line break when the range is end between a set of native line breakers r=smaug
Currently, ContentEventHandler::SetRangeFromFlatTextOffset() sets end point to before a line breaker when the end of queried range is between a set of native line breakers (i.e., "\r]\n" on Windows). This causes unexpected empty range (e.g., "[]\n") when it queries a text rect at [\r]\n.

Therefore, it should select an XP line breaker in such case (i.e., the range should be "[\n]" when it queries "[\r]\n" or "\r[\n]").

Note that we don't need to do anything at setting selection start because it's always aligned to before the line breaker.

MozReview-Commit-ID: 6ht8QNAhibY

--HG--
extra : rebase_source : b7933554c2a5bf51b8faabe3a96d006971510e0a
2016-07-28 17:23:47 +09:00
Masayuki Nakano 92692b4cb4 Bug 1286464 part.3 Make static methods, AdjustTextRectNode() and GetFirstFrameInRange(), members of ContentEventHandler r=smaug
This patch makes the static methods members of ContentEventHandler because ContentEventHandler::NodePosition is useful for them.

* nsINode* AdjustTextRectNode(nsINode*, int32_t&) -> NodePosition GetNodeHavingFlatText(nsINode* int32_t)
* nsIFrame* GetFirstFrameInRange(nsRange*, int32_t&) -> FrameAndNodeOffset GetFirstFrameHavingFlatTextInRange(nsRange*)

So, this patch avoids unclear in/out arguments of them.

MozReview-Commit-ID: 7yWeIkRdGj

--HG--
extra : rebase_source : 635cec95ee9f3d73f619186925464ae17010e929
2016-08-05 12:43:40 +09:00
Masayuki Nakano 24e9e4a700 Bug 1286464 part.2 GetFirstFrameInRange() should return node offset since it may return different node's frame r=m_kato
GetFirstFrameInRange() uses AdjustTextRectNode() which may return different node before retrieving the result frame. Therefore, the caller may need offset in the new node.

MozReview-Commit-ID: 2AQU5WfahT9

--HG--
extra : rebase_source : c753d34dc2691da2ec25c9f5a6fe17d67af24a70
2016-07-14 22:57:00 +09:00
Masayuki Nakano bc5856516b Bug 1286464 part.1 Cleaning up ContentEventHandler::OnQueryTextRectArray() r=m_kato
MozReview-Commit-ID: BDLkQLrzoUI

--HG--
extra : rebase_source : c1b0074bde0580be466259f82d0756ff18e29f53
2016-07-14 22:46:37 +09:00
Dan Minor 37a83aa8e1 Bug 1113634 - Update mLastComputedValue in AudioEventTimeline when skipping events of same time; r=karlt
We need to update mLastComputedValue while processing events that occur at the
same time rather than just skipping over them.

MozReview-Commit-ID: LuxSK6PHFHv

--HG--
extra : rebase_source : be323da2a50ea32838aef322267115d153a14c3d
2016-08-08 16:00:35 -04:00
Masayuki Nakano 8a489e63dd Bug 1257446 part.2 ContentEventHandler::OnQueryTextRectArray() shouldn't set empty rect to the result r=m_kato
Returning empty rects for eQueryTextRectArray causes each dispatcher needing to check every rect. It doesn't make sense especially compared with eQueryTextRect.

So, it should ensure that empty rect won't be returned to dispatchers.

MozReview-Commit-ID: CpMqqihzSDf

--HG--
extra : rebase_source : 0343e2eecf5e25043d260157cf4d8b0874e0ceb6
2016-07-12 20:28:06 +09:00
Rob Wu 9069fff35f Bug 1197451 - Add clipboardWrite permission r=billm
MozReview-Commit-ID: 6d1mQSVWRPe

--HG--
extra : rebase_source : 2f19bab5c9d6db25c60b2b19c06c7027384a04ca
2016-07-08 17:19:17 -07:00
Sebastian Hengst 8c139b8da8 Backed out changeset 74b1d84ac6aa (bug 1113634) for failing Cpp unit test TestAudioEventTimeline. r=backout 2016-08-11 17:30:54 +02:00
Andrew McCreight 18b7a1fc2f Bug 1293666 - Add initializer_list ctor to AutoTArray. r=froydnj
MozReview-Commit-ID: 8ORBttWN2Rj

--HG--
extra : rebase_source : 9ad6ae8aff9cbc81c773297d0bb2f7478fb3516e
2016-08-09 07:21:26 -07:00
Jean-Yves Avenard ca9b247d0a Bug 1294398: Always calculate seekable attribute value. r=jwwang
MozReview-Commit-ID: 2CHJxPQdVEg

--HG--
extra : rebase_source : e7ca98136d7d954911683e66fcf39920aca24267
2016-08-11 20:35:59 +10:00
Dan Minor 540fbdb6bd Bug 1113634 - Update mLastComputedValue in AudioEventTimeline when skipping events of same time; r=karlt
MozReview-Commit-ID: LuxSK6PHFHv

--HG--
extra : rebase_source : 2f0a906e747f30a83aa7237850245c056e932bd6
2016-08-08 16:00:35 -04:00
Dan Glastonbury 323e627096 Bug 1294420 - Skip tests that use h264 on WinXP. r=gerald
Fix permafail for mda on WinXP which has no h264

MozReview-Commit-ID: 35tlO5vPTLD

--HG--
extra : rebase_source : 4d0edc219f75bd2107a3828a4df6419d7449657a
2016-08-11 21:24:12 +08:00
Jean-Yves Avenard c5b030a3f3 Bug 1293927: Always use MediaSource seekable range regardless of readyState. r=jwwang
MozReview-Commit-ID: 7ae467k5PSf

--HG--
extra : rebase_source : 96e79cc0ba99272d9573a427408e820cb496c106
2016-08-10 14:14:37 +10:00
JW Wang 623b729070 Bug 1294352 - Merge MDSM::InitiateSeek() and MDSM::InitiateDecodeRecoverySeek(). r=kaku
MozReview-Commit-ID: 8wgRY9QHOYg

--HG--
extra : rebase_source : 4f55c867d67a4103fea332393cb8e8c7e9cd02b0
2016-08-11 15:37:27 +08:00
JW Wang 3f872a940e Bug 1294345 - Remove the TrackSet parameter from MediaDecoderStateMachine::InitiateDecodeRecoverySeek(). r=kaku
MozReview-Commit-ID: 7iXecyVAIXq

--HG--
extra : rebase_source : e9648409896caac46863a401984820a8ac123118
2016-08-11 15:03:15 +08:00
JW Wang dc44fe89f0 Bug 1294324 - Remove MediaDecoderStateMachine::IsPausedAndDecoderWaiting. r=bechen
MozReview-Commit-ID: CepvbVjoN1k

--HG--
extra : rebase_source : 4abe0fc35b25a865f3909fdf7d74f54736da6c97
2016-08-11 11:40:53 +08:00
JW Wang 73fd41e53b Bug 1294320 - Remove MediaDecoderStateMachine::IsVideoDecodeSuspended() r=kaku
MozReview-Commit-ID: 9iTzmMhw686

--HG--
extra : rebase_source : 4ee1bec4155367dc66a136a4f14c9c83cbdd8dd5
2016-08-11 11:32:14 +08:00
Dan Glastonbury 888241afbc Bug 1284177 - P2: Video decode suspend mochitests. r=jwwang
Test:
- That video decode suspends when enabled and delay is reached.
- That video decode doesn't suspend when disabled.
- That video decode doesn't suspend when video finishes before suspend delay.

These tests need to run from content process to observe the suspend
notifications via nsIObserverService, but access to gBrowser is in
chrome process in e10s. Thus, the reason for loading
background_video_chrome.js into chrome process and invoking functions
via async messages.

MozReview-Commit-ID: 2eE97FEUMPu

--HG--
extra : rebase_source : e48cc4dab54648bf0830f59f346a09ab3fb73f6e
2016-07-04 12:35:25 +10:00
Dan Glastonbury f9a87adc92 Bug 1284177 - P1: Provide observable notification for video suspend. r=jwwang
To support mochitests, report change in video decode suspend state via
events mozentervideosuspend/mozexitvideosuspend.

MozReview-Commit-ID: EwMduLzcMVg

--HG--
extra : rebase_source : 5f1fed90964fae182f06d9fb480491728c5f1c97
2016-07-04 14:35:21 +10:00
Jean-Yves Avenard 88b7ec7f4b Bug 1293576: [MSE] P2. Fix mochitest. r=gerald
The mochitest relied that the video track was processed first. Additionally, change for the file with only a single video track as the previous video didn't have aligned segments, making the use of sequence mode useless.
We swap the segment around, which allow to more easily visually inspect the result (counter goes forward and then back)

MozReview-Commit-ID: 33PsrmRF1GL

--HG--
extra : rebase_source : e98a7714f81f5c7913091128b5ee04cf41c2d09b
2016-08-10 16:21:36 +10:00
Jean-Yves Avenard 38fa21c818 Bug 1293576: [MSE] P1. Always process the earliest frames first when in sequence mode. r=gerald
MozReview-Commit-ID: 2b3EyYCtNai

--HG--
extra : rebase_source : 41396c041ddfba75e381e656b2fa45d427e2a44f
2016-08-09 23:11:36 +10:00
Jean-Yves Avenard 58cb3ab298 Bug 1293646: [MSE] P2. Only reject a seek request with EOS if it's passed the explicit duration. r=gerald
With MSE, the actual duration is always exact as it is amended when data is added. We do not want to fire ended when we attempt to seek to unbuffered data once endOfStream has been called. Instead we will fire the waiting event.

MozReview-Commit-ID: Cl2uBLk2qRQ

--HG--
extra : rebase_source : 6763c6f5a6e15264e276e486fab4d39491ea7f1b
2016-08-10 15:30:12 +10:00
Jean-Yves Avenard aecc883033 Bug 1293646: [MSE] P1. Reject seeking attempt with EOS when the mediasource is ended. r=gerald
Otherwise, the ended event would never be fired should the decoder have reached the end of the stream prior endOfStream being called.

MozReview-Commit-ID: CbWCnzi3nxj

--HG--
extra : rebase_source : 729e25919fdb7f8a8918c4d5a9bcae17d8c8bdc5
2016-08-09 23:09:22 +10:00
JW Wang 60c4b69563 Bug 1293940 - fix uninitialized members. r=gerald
MozReview-Commit-ID: 8QRGKowJiYC

--HG--
extra : rebase_source : 0f38f004f22b1a5cf81b842c843c23fdec41e939
2016-08-10 15:04:39 +08:00
JW Wang 5b157f2095 Bug 1292453 - MDSM should enter dormant state when its reader is suspended. r=esawin
MozReview-Commit-ID: Fg7jBtGEHBy

--HG--
extra : rebase_source : 8674c24049e609ecd52f35bc225c693f62208431
2016-08-09 14:43:22 +08:00
JW Wang f18a46b384 Bug 1293572 - Flushing a decoder that is not initialized causes hang. Don't create decoders when the reader is suspened. r=jya
MozReview-Commit-ID: 7ylrYLrrwIS

--HG--
extra : rebase_source : 7421d6b0ee804f30cdfdba0ffda8d9c44d3d7ba5
2016-08-05 17:25:49 +08:00
JW Wang 296eb5268a Bug 1290318 - listen to "cacheservice:empty-cache" to clear media cache. r=mayhemer
MozReview-Commit-ID: 7t4FPCxOUYl

--HG--
extra : rebase_source : 3c10840d2559e7fb2db47cbb3c439a7a8ddc5792
2016-08-08 11:04:55 +08:00
Wes Kocher fa1a1180c4 Merge autoland to central, a=merge 2016-08-10 16:29:26 -07:00
Byron Campen [:bwc] e139ac74e7 Bug 1275461: Extend a timeout. r=drno
MozReview-Commit-ID: FEQ7aMo9UuD

--HG--
extra : rebase_source : 83133560e07780aebb5fb15c5db80f59488fe711
2016-08-09 10:29:10 -05:00
Carsten "Tomcat" Book 553a2da922 merge mozilla-inbound to mozilla-central a=merge 2016-08-10 15:54:26 +02:00
Sebastian Hengst 7fb9314ebd Bug 1210985 - More specific error message for "useCredentials" and wildcard allowing origin. r=browser-chrome-fix 2016-08-10 14:10:45 +02:00
Neil Rashbrook f78b2736a5 Bug 1292502 Fix mismatch between mModalStateDepth and mSuspendedDoc r=smaug 2016-08-10 11:39:54 +01:00
James Cheng 0593e89ea0 Bug 1293194 - Building with --disable-eme fails with GMPDecoderModule.cpp:15:30: fatal error: mozilla/EMEUtils.h: No such file or directory. r=cpearce
MozReview-Commit-ID: VUGdiaLqkV

--HG--
extra : rebase_source : 3439ba2f7a81ad80f9db514f21c6091cc3e5711a
2016-08-09 12:13:30 +08:00
Nicolas Silva ed272011eb Bug 1292545 - Don't skip clearing the canvas because of W(1) failures on Mac. 2016-08-10 17:00:25 +02:00
Nicholas Nethercote e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Bobby Holley cbb507cc3e Bug 1292278 - Zero-index the namespace manager URIs. r=bz
The current setup here tries to "save" an entry in the list by checking
for the "None" namespace everywhere and special-casing it. We can simplify
this a lot by just adding the empty atom to the beginning of the array,
which is the value that servo uses to represent "namespace none" anyway.
2016-08-09 15:28:41 -07:00
Jan Varga 410139beb7 Bug 1280216 - Remove nsIAboutModule::GetIndexedDBOriginPostfix(); r=bz 2016-08-09 20:47:29 +02:00
George Wright 288d758c6c Bug 1272878 - Fuzz test_bitmaprenderer.html because of differences in our two codepaths with antialiasing r=Morris 2016-08-09 14:15:34 -04:00