Commit Graph

7701 Commits

Author SHA1 Message Date
Wes Kocher
959de6c3e8 Backed out 9 changesets (bug 1340627) for graphical glitches a=backout
Backed out changeset 0b1371055c7f (bug 1340627)
Backed out changeset f152be1fadb7 (bug 1340627)
Backed out changeset c691e2ab6a0c (bug 1340627)
Backed out changeset 3cb4bceb8d79 (bug 1340627)
Backed out changeset 026aadd76d06 (bug 1340627)
Backed out changeset fdbd5d281287 (bug 1340627)
Backed out changeset 75fb0d9858a9 (bug 1340627)
Backed out changeset 0d4ec7d38a00 (bug 1340627)
Backed out changeset af6f19870b2a (bug 1340627)

MozReview-Commit-ID: 9dHr7xMZezY

--HG--
rename : gfx/skia/skia/src/core/SkBlitRow.h => gfx/skia/skia/include/core/SkBlitRow.h
rename : gfx/skia/skia/src/effects/SkGaussianEdgeShader.h => gfx/skia/skia/include/effects/SkGaussianEdgeShader.h
rename : gfx/skia/skia/src/xml/SkXMLParser.h => gfx/skia/skia/include/xml/SkXMLParser.h
rename : gfx/skia/skia/include/private/SkMessageBus.h => gfx/skia/skia/src/core/SkMessageBus.h
rename : gfx/skia/skia/src/gpu/ops/GrAAConvexPathRenderer.h => gfx/skia/skia/src/gpu/batches/GrAAConvexPathRenderer.h
rename : gfx/skia/skia/src/gpu/ops/GrAAConvexTessellator.h => gfx/skia/skia/src/gpu/batches/GrAAConvexTessellator.h
rename : gfx/skia/skia/src/gpu/ops/GrAAHairLinePathRenderer.h => gfx/skia/skia/src/gpu/batches/GrAAHairLinePathRenderer.h
rename : gfx/skia/skia/src/gpu/ops/GrAALinearizingConvexPathRenderer.h => gfx/skia/skia/src/gpu/batches/GrAALinearizingConvexPathRenderer.h
rename : gfx/skia/skia/src/gpu/ops/GrPathStencilSettings.h => gfx/skia/skia/src/gpu/batches/GrPathStencilSettings.h
rename : gfx/skia/skia/src/gpu/ops/GrStencilAndCoverPathRenderer.h => gfx/skia/skia/src/gpu/batches/GrStencilAndCoverPathRenderer.h
rename : gfx/skia/skia/include/private/GrGLSL_impl.h => gfx/skia/skia/src/gpu/glsl/GrGLSL_impl.h
extra : source : 761b3f55f10f3df16601ce62e4d15b0c558c0cfb
2017-05-10 10:01:18 -07:00
Carsten "Tomcat" Book
d66b9f27d5 merge mozilla-inbound to mozilla-central a=merge 2017-05-10 15:07:28 +02:00
Lee Salzman
8c18901f07 Bug 1340627 - part 8 - reftest fuzzing for update to Skia m59. r=mchang
MozReview-Commit-ID: LN29P1I4EsW
2017-05-09 22:31:07 -04:00
Masayuki Nakano
4376a0cf61 Bug 1325281 Get rid of nsIEditorIMESupport r=m_kato
MozReview-Commit-ID: KGJnho4uy1s

--HG--
extra : rebase_source : 1755ad59ed625076fbadb05db9bb5d4a1fea07cb
2017-05-09 15:21:22 +09:00
Carsten "Tomcat" Book
76ca853e3e Merge mozilla-central to mozilla-inbound 2017-05-09 14:40:11 +02:00
Yoshi Huang
df0da41d1c Bug 1361641 - Part 2: convert mochitest plain tests in editor/ to use srcdoc. r=smaug 2017-05-09 10:25:23 +08:00
Makoto Kato
6a08daf67d Bug 1352799 - Part 2. Add test for changing maxlength dynamically. r=masayuki
MozReview-Commit-ID: 4DiE33eyBar

--HG--
extra : rebase_source : 38f57dbf55c8ed769ba5aab1e36ce91fb35cbad4
2017-04-20 10:23:38 +09:00
Wes Kocher
6d6d039d43 Backed out 4 changesets (bug 1358297) for hazard build failures a=backout
Backed out changeset 95211a496191 (bug 1358297)
Backed out changeset 3c1b426a5cce (bug 1358297)
Backed out changeset 9201d345a1d5 (bug 1358297)
Backed out changeset c926817dea60 (bug 1358297)

MozReview-Commit-ID: 874DF43K7Dp
2017-05-05 12:45:46 -07:00
Milan Sreckovic
196fb1a3bc Bug 1358297: Part 3. Create special case for stripping CR and LF on TSubstring, and use it in all the places that it is called. Use ASCIIMask to make it fast. r=froydnj
MozReview-Commit-ID: 3p97cCGfy6i

--HG--
extra : rebase_source : a91d9a5e6e61495cfe78b06959b200e48ca16535
2017-05-05 13:37:13 -04:00
Masayuki Nakano
d04632f559 Bug 1342552 - IMEStateManager should cache nsIWidget for sPresContext and use it. r=smaug
IMEStateManager should cache nsIWidget for sPresContext at caching sPresContext.  Then, even if sPresContext has gone, IMEStateManager can clean up with the nsIWidget cache.

Unfortunately, editor has some bugs about calling IMEStateManager::UpdateIMEState().  That is, calling it *before* IMEStateManager::OnFocusChange().  In such case, this patch makes UpdateIMEState() ignore the call.

MozReview-Commit-ID: 1cydI03WyB8
2017-04-20 13:43:50 +09:00
Shing Lyu
c46f5d5baf Bug 1351548 - Remove reftest-stylo.lists. r=bholley
MozReview-Commit-ID: 8LoQ9xNnDnj
2017-04-28 11:15:58 +08:00
Shing Lyu
435db45b79 Bug 1351548 - Add stylo-vs-gecko expectations to reftest.lists. r=bholley
MozReview-Commit-ID: GOUGBsd05cn
2017-04-28 11:15:50 +08:00
Makoto Kato
60ccf10a30 Bug 1360137 - Part 2. Reduce QueryInterface by NativeInit. r=masayuki
nsIDocumentEncoder has nativeInit for nsIDocumnet, we should use it to reduce QueryInterface.

MozReview-Commit-ID: Ffn19yf9jra

--HG--
extra : rebase_source : 37c8b27cc0eddd4f0501ec1e61ea27d74ee1e6f3
2017-04-27 17:41:26 +09:00
Makoto Kato
ea65a415ff Bug 1360137 - Part 1. Use LowerCaseEqualsLiteral instead of ToLowerCase. r=masayuki
From profiling TextEditor::OutputToString, most of WillOutputText is ToLowerCase.  So, we should use LowerCaseEqualsLiteral instead.  It can reduce string copy.

MozReview-Commit-ID: LwqZtxIJTbW

--HG--
extra : rebase_source : 94da785d8288dfd93666a3dcb2d374874c79db89
2017-04-27 17:40:19 +09:00
Wes Kocher
5e8bdb175d Merge inbound to m-c a=merge
MozReview-Commit-ID: A85cs7Yriqj
2017-04-25 13:53:00 -07:00
Christoph Kerschbaumer
7711007990 Bug 1359092 - Extend loadURI within nsIWebNavigation.idl by a triggeringPrincipal argument. r=bz 2017-04-25 12:22:25 +02:00
Makoto Kato
bba54a63e6 Bug 1359008 - Don't use nsIDOM* in TextEditRules's member. r=masayuki
To clean up TextEditRules, I would like to replace nsIDOMNode with nsINode and nsIContent in TextEditRules.

GetTopEnclosingPre is unused define, so I also remove it.

MozReview-Commit-ID: 6LraexH5t4m

--HG--
extra : rebase_source : 1037dcfd949d544282dc30360bd43773f21fd929
2017-04-24 19:40:12 +09:00
Emilio Cobos Álvarez
d2f3dc13ec Bug 1357142: Kill PresShell::RecreateFramesFor. r=bz
It's not only inefficient, but also prone to buggyness. Since styles may not be
up-to-date when it happens.

Post a reconstruct instead, which ensures a style flush happens before running
frame construction.

MozReview-Commit-ID: DrakHsJv5fY
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>

--HG--
extra : rebase_source : 11900af908654336cc2391ab9480542c5474e38f
2017-04-17 18:01:37 +02:00
Makoto Kato
1b58ce0000 Bug 1335880 - Adjust mouse position for dragstart. r=masayuki
On Ubuntu 16.04 TLS, test_dragdrop.html due to control margin.  So we should adjust the point of dragstart.

MozReview-Commit-ID: EPW2UnaIWRt

--HG--
extra : rebase_source : a97c66dc36328563497130aa7a3829bc8a9eb204
2017-05-08 14:06:29 +09:00
Kartikaya Gupta
1e6be2a645 Bug 1362424 - Skip a spellchecking reftest that is now permafailing on QuantumRender builds. r=jrmuizel
This test is failing intermittently even on non-QuantumRender builds, and bug
1361820 is tracking that issue. Once that is fixed we should be able to re-enable
this test.

MozReview-Commit-ID: HANsz08bujB

--HG--
extra : rebase_source : 4500022a5ffbac6bbd4de3e61c3dc3bba3881b1f
2017-05-08 17:08:34 -04:00
Aryeh Gregor
3a32e91a42 Bug 1355792 - Consider invisible nodes to be editable; r=masayuki
We can't depend on information from layout to be correct unless we've
flushed pending notifications, which we can't do at every editability
check.  So let's forget about layout.  Nobody knows why editability ever
depended on visibility in the first place.

This allows us to revert the additions from bug 795418 as well.

The original test-case submitted on the bug report was very big and
complicated, so I have a minimal test-case instead.  This might not
exactly correspond to the originally reported bug, but this fix works for
both the original and minimal test case.

MozReview-Commit-ID: LOKjlgiAEOT

--HG--
extra : rebase_source : 5aaeae87fdc0dd78cb6f1060399c09d2945f8e08
2017-04-19 16:53:24 +03:00
Aryeh Gregor
fdf415af45 Bug 1357998 - Make editing tests independent of default defaultParagraphSeparator; r=masayuki
Now that this is a pref that is different in different versions, tests
have to work no matter what the pref's value is.  For tests that
actually tested line-breaking-related behavior, I made them test all
three separator values.  For tests that tested something else and only
incidentally depend on the default paragraph separator, I set
defaultParagraphSeparator to "div".

MozReview-Commit-ID: 8m7eoFRXpEy

--HG--
extra : rebase_source : dc664e87f7ce4f621aa48639cef6e754793e8ab4
2017-04-20 21:10:23 +03:00
Manish Goregaokar
ff68276c10 Bug 1349417 - Part 9: stylo: Update test expectations; r=xidorn
MozReview-Commit-ID: 5SGrYUIhHOQ
2017-04-21 15:40:49 -07:00
Carsten "Tomcat" Book
d32c8f24cc Backed out changeset 49c8dc08ff64 (bug 1349417) 2017-04-19 08:31:48 +02:00
Manish Goregaokar
f1cf1ffa2a Bug 1349417 - Part 9: stylo: Update test expectations; r=xidorn
MozReview-Commit-ID: 5SGrYUIhHOQ
2017-04-18 21:36:48 -07:00
Iris Hsiao
2f57ea5bb4 Backed out 3 changesets (bug 1349417) for build bustage
Backed out changeset e6a9aaf8c102 (bug 1349417)
Backed out changeset fbdddabe4c8d (bug 1349417)
Backed out changeset c1ead1f0ab71 (bug 1349417)
2017-04-19 11:03:13 +08:00
Manish Goregaokar
cb05d3003e Bug 1349417 - Part 9: stylo: Update test expectations; r=xidorn
MozReview-Commit-ID: 5SGrYUIhHOQ
2017-04-18 19:31:07 -07:00
Aryeh Gregor
bf0619d365 Bug 1354060 - Put defaultParagraphSeparator default change behind pref; r=masayuki
This is regression-prone, so dev.platform discussion concluded we want
it behind a pref.  We might turn the pref off for beta and/or release
for now as well.

MozReview-Commit-ID: 2H2et3RElZx

--HG--
extra : rebase_source : baf7e679ca1ee16016666d7697990c4f64ecf83e
2017-04-06 15:02:42 +03:00
Aryeh Gregor
47530382e3 Bug 1353695 - Sometimes Enter is ignored in editor; r=masayuki
When defaultParagraphSeparator is not "br", and we hit Enter on a line
that is not contained in any block element, we first create a new <div>
(or <p>) wrapper to hold the line's contents.  If creating this wrapper
fails for some reason, we go ahead and insert a <br> instead.

In some cases, we would get confused and think we didn't create the
block element when really we did.  We would insert a <br>, and
afterwards something would get rid of the empty block element.  In a
corner case where the line only consisted of a <br> to start with, this
would result in nothing happening, because the original <br> was removed
when creating the block element, and only one <br> was inserted to
replace it.

The correct fix is to just not get confused!

MozReview-Commit-ID: 1U8KHC71bfw

--HG--
extra : rebase_source : 50640615a3a652c3a74c1aef5412eb82daf8c5fb
2017-04-05 20:40:13 +03:00
Makoto Kato
0410282e88 Bug 1352882 - Part 3. Cache nsIDocumentEncoder into TextEditor. r=masayuki
All editor code gets nsIDocumentEncoder from TextEditor::GetAndInitDocEncoder(), so we can have a cache into TextEditor, then return cached object.

MozReview-Commit-ID: IEoOvz7BG7T

--HG--
extra : rebase_source : 1b30325c99fbc43dc77453325e97e88b439285e2
2017-04-17 17:29:46 +09:00
Makoto Kato
b24e38d3fc Bug 1356496 - Don't use nsIDOM* in ConfirmSelectionInBody. r=masayuki
ConfirmSelectionInBody uses a lot of QI and TextEditUtils::IsBody call to check body element.  So we shouldn't use nsIDOM* to avoid QI and EditorBase::GetTag().

Also, if did not found body element, it calls collapse to set caret.  If collapse is successful, we might not have to check end selection...  How do you think?

MozReview-Commit-ID: F7FhPrlEpCc

--HG--
extra : rebase_source : 85b5c99be0085dd579a9b650207c876cd17a2410
2017-04-14 14:54:03 +09:00
Florian Queze
37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst
a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Florian Queze
95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Xidorn Quan
d8c29760a1 Bug 1355734 - Remove text-decoration-line: -moz-anchor-decoration. r=heycam,masayuki
MozReview-Commit-ID: 4TmVncV1K5G

--HG--
extra : rebase_source : 568218d415642f1088c82d4b2e03d5885067b162
2017-04-13 16:17:03 +08:00
Makoto Kato
a8f8cbc728 Bug 1056322 - Don't run DictionaryFetcher when spllchecker isn't initialized. r=masayuki
When CanSpellCheck isn't called yet, mSpellChecker won't be initialized.  So we should check it before running DictionaryFetcher.

I think that UpdateCurrentDictionary is called by OnFocus as long as nsEditorSpellCheck::InitSpellChecker isn't called.  But I cannot find test case to reproduce this...

MozReview-Commit-ID: 5H1pJ0AnX5X

--HG--
extra : rebase_source : 5f2a59261c67a7f8f363588c7596e68f6debff9e
2017-04-12 17:43:51 +09:00
Dan Banner
cdf987089d Bug 1107904 - Remove packed.js and references to it as it is unused. r=standard8
MozReview-Commit-ID: K5TLF92pHq4

--HG--
extra : rebase_source : 295bf325a07fa8ec4c55a8babf5418588308dca6
2017-04-12 11:10:00 +01:00
Makoto Kato
6ed44d9df6 Bug 1330912 - Part 4. Update some tests to wait updating dictionary. r=masayuki
Since Part 2 improves foucs performance, these tests will be failed because spellchecker works later.  So using UpdateCurrentDictionary, dictionary is updated before test.


MozReview-Commit-ID: 69aC1rQd4LY

--HG--
extra : rebase_source : 50e0449b727352ff2f8e2a08605cc3f9d933d6d9
2017-04-10 14:44:49 +09:00
Makoto Kato
c61434ef9b Bug 1330912 - Part 3. Don't update dictionary during onfocus when spellcheck is unnecessary. r=masayuki
Such as <input type=password>, focused element doesn't use spellchecker, we should not call UpdateCurrentDictionary.  Also, when the attribute is changed, we should call UpdateCurrentDictionary if uninitialized.

MozReview-Commit-ID: LSfDTAszviE

--HG--
extra : rebase_source : a3fe944099c625b7f525d33eae06a7b8e8992729
2017-04-11 16:51:04 +09:00
Makoto Kato
694268f807 Bug 1330912 - Part 2. Use async version on UpdateCurrentDictionary. r=masayuki
Now, mozInlineSpellChecker::UpdateCurrentDictionary will use sync IPC messages via nsEditorSpellCheck::DictionaryFetched.

Part 1 adds async API to set current dictionary.  So we should use it on nsEditorSpellCheck::DictionaryFetched instead of sync API.

MozReview-Commit-ID: 5gl2eQpzKm1

--HG--
extra : rebase_source : 1fabc4abdd170494f1804ad875a181e652ea66a0
2017-04-11 17:05:19 +09:00
Makoto Kato
55e9044079 Bug 1330912 - Part 1. Add async version of SetCurrentDictionary using list. r=Ehsan
Now, mozInlineSpellChecker::UpdateCurrentDictionary uses several sync IPC message to update spellcheck dictionary.  So I want async IPC to set dictionary.

Also, since nsEditorSpellCheck::DictionaryFetched calls SetCurrentDictionary several times (max: 6 times), so to reduce calls, we should use list of dictionary.

MozReview-Commit-ID: EVMAJxpMT2X

--HG--
extra : rebase_source : 5a1ed28bd6eb1dd9d3a6a634a286531b7ebb32c7
2017-04-10 18:29:16 +09:00
Brian Birtles
33041d1214 Bug 1315874 - Drop 'ForElement' from GetStyleContextForElementXXX methods; r=heycam
In the next patch we want to add a method called
GetUnanimatedStyleContextForElementNoFlush but that's much too long. Instead it
seems better to just drop 'ForElement' from all these methods since it should be
fairly obvious we are getting the style context for an element given that the
first argument is an element.

MozReview-Commit-ID: JQKaEuCKV2F

--HG--
extra : rebase_source : 3ba51f3b00d1ec7bc91102629d9c0abb88992fef
2017-04-05 14:39:23 +09:00
Wes Kocher
bceaacd2b8 Merge inbound to central, a=merge 2017-04-04 11:25:13 -07:00
Aryeh Gregor
a334ab0dad Bug 1297414 - Change default paragraph separator to <div>; r=masayuki
This matches Blink/WebKit, and is more similar to Edge than before, but
may cause compat problems for Gecko-only code or code paths.  Sites can
revert to old behavior with:
document.execCommand("defaultparagraphseparator", false, "br").

This regresses test_bug430392.html on one test ("adding returns") and I
don't know why.  The test involves embedded non-editable content and we
already have a lot of todos in that file, so I think it's tolerable.

MozReview-Commit-ID: Dml0bXxgu87
2017-04-04 13:49:38 +03:00
Aryeh Gregor
3611697a7f Bug 1297414 - Support <div> separator in ReturnIn(Header|ListItem); r=masayuki
MozReview-Commit-ID: EkvFpyTmXDc
2017-04-04 13:49:38 +03:00
Aryeh Gregor
7c603e0235 Bug 1297414 - Support <div>/<p> separators in WillInsertBreak; r=masayuki
*aHandled was previously always set to true in WillMakeBasicBlock, which
was probably a bug but is not addressed in this commit.

MozReview-Commit-ID: 41JSmptVc0l
2017-04-04 13:49:38 +03:00
Aryeh Gregor
a7ed0e7cf4 Bug 1297414 - formatBlock should move non-editable nodes; r=masayuki
Before this change, if you did formatBlock on "a<span
contenteditable=false>b</span>c", it would become "acb", because the "a"
and "c" would be moved to the front of the node, and the "b" would be
left alone at the end because the editing code doesn't want to move it.
Now we will move the "b" as well, even though it's not editable, so that
the node remains "abc".  The rule is that a non-editable element cannot
have its attributes or children changed, but it can have its parent
changed, so there's nothing wrong with moving it here.

On the way, I fixed an exception in insert*List if there was an
uneditable inline node around.  I don't intend to fix all the todo's in
the test, but now it should have better coverage, at least.

MozReview-Commit-ID: 3okcGq4an3f
2017-04-04 13:47:28 +03:00
Aryeh Gregor
e3c9b3f2de Bug 1297414 - Treat <div> like <p> for break insertion; r=masayuki
I don't personally agree with this behavior (although I did spec it some
years ago), but it's the behavior of all other UAs, so we should do it
anyway.

MozReview-Commit-ID: IiIg41kMJIU
2017-04-04 13:47:28 +03:00
Aryeh Gregor
c442eea5f2 Bug 1297414 - Support execCommand("defaultParagraphSeparator"); r=masayuki
Later commits will add the actual functionality.

MozReview-Commit-ID: 6Ac9V6MjZpa
2017-04-04 13:47:28 +03:00
Aryeh Gregor
5575caf994 Bug 1297414 - Send eTypedBR in plaintext mode too; r=masayuki
This is what test_htmleditor_keyevent_handling.html expects.  It
historically made no difference in the case tested there, because we
inserted a <br> either way, but now it will make a difference.  I don't
know what an HTML editor in plaintext mode even means, so I don't know
if this change is actually the intended behavior.

MozReview-Commit-ID: 64w6bb9Q1pD
2017-04-04 13:44:53 +03:00