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

7607 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano c75983c507 Bug 1347092 part.3 Make EditorBase::CreateTxnForDeleteSelection() return already_AddRefed<EditAggregateTransaction> r=m_kato
MozReview-Commit-ID: DEeRPbH9JJK

--HG--
extra : rebase_source : ea8bf90ca8d807884c5642d6df22bb7148949ac6
2017-03-15 14:35:43 +09:00
Masayuki Nakano 566d8c8f39 Bug 1347092 part.2 Make EditorBase::CreateTxnForDeleteInsertionPoint() return already_AddRefed<EditTransactionBase> r=m_kato
EditorBase::CreateTxnForDeleteInsertionPoint() appends DeleteTextTransaction or DeleteNodeTransaction to the given EditAggregateTransaction.  For consistency with other CreateTxnFor*() methods, this should just create a transaction and return it.  Then, the caller should append the transaction to EditAggregateTransaction.

MozReview-Commit-ID: 6sqEijicFHE

--HG--
extra : rebase_source : 1443b3d9c8e90044994ad87965a26d76926e2c72
2017-03-14 22:01:36 +09:00
Masayuki Nakano 3f530e2fd9 Bug 1347092 part.1 Make EditorBase::CreateTxnForDeleteNode() return already_AddRefed<DeleteNodeTransaction> r=m_kato
MozReview-Commit-ID: CyvzpoZmRoO

--HG--
extra : rebase_source : 4015efbcb08fff55eae0d09385d96af771f1e8e1
2017-03-14 20:50:24 +09:00
David Major ed12ea611f Bug 1346078: Remove nsAString_internal and just use the nsAString name directly. r=bsmedberg
MozReview-Commit-ID: DWDEDMIVKm7

--HG--
extra : rebase_source : 7fe8dc07c816dca234c67761e61cdee372a87e97
2017-03-10 15:17:23 +13:00
Makoto Kato c6bd345380 Bug 1347367 - Remove unimplemented FindUserSelectAllNode. r=masayuki
After bug 769967, FindUserSelectAllNode always returns nullptr.  So we get rid of this method.  Also, AreaRestriction is used by this, so it is unnecessary now.

MozReview-Commit-ID: HTc8PUCQmy5

--HG--
extra : rebase_source : 11b19a1976f6696e0d872c9020b90701dd22c8c0
2017-03-15 13:40:23 +09:00
David Major 96a4158a43 Bug 1344629 - Part 8: Make nsTLiteralString inherit from nsTStringRepr. r=dbaron
This is the patch that all the others have been leading up to: by inheriting from nsTStringRepr, nsTLiteralString loses its destructor (previously suppplied by nsTSubstring).

I included an AsString() cast as an escape hatch for a few pieces of code that couldn't easily accommodate the new hierarchy, but I'm pretty pleased with how little it was necessary.

MozReview-Commit-ID: 2zGkaw1sMUp

--HG--
extra : rebase_source : 68bbdc893850e4b6073d6fc2f036e53853b8927e
2017-03-14 15:26:36 +13:00
Masayuki Nakano 6449c8aac8 Bug 1318312 part.3 Selection should move focus at every selection change when it's called by JS r=smaug
Selection may be changed by methods of Selection or methods of Range retrieved by Selection.getRangeAt().  Selection::NotifySelectionListeners() is called after every selection change of each of them, so, this method must be a good point to move focus.

If new common ancestor of all ranges is editable and in an editing host, we should move focus to it.  Otherwise, if an editing host has focus but new common ancestor is not editable, we should move focus from the editing host.

For consistency with the other browsers, this patch doesn't move focus to other focusable element.

MozReview-Commit-ID: 6sNsuzwqECX

--HG--
extra : rebase_source : 9ba52ab0bd1249abded81019847c85182ca1926e
2017-03-14 10:36:21 +09:00
Iris Hsiao 5cece96e1c Backed out 12 changesets (bug 1344629) for stylo build bustage
Backed out changeset cf4273d3ac30 (bug 1344629)
Backed out changeset a96390e044e0 (bug 1344629)
Backed out changeset d9b330f9bc24 (bug 1344629)
Backed out changeset 2b460fe020af (bug 1344629)
Backed out changeset 0ada91b0452e (bug 1344629)
Backed out changeset 083304fcd6bd (bug 1344629)
Backed out changeset 53d7d1ce2c97 (bug 1344629)
Backed out changeset 55eee7078ae4 (bug 1344629)
Backed out changeset 7d3c06b3eca9 (bug 1344629)
Backed out changeset e5df14c3db61 (bug 1344629)
Backed out changeset 636095ff2815 (bug 1344629)
Backed out changeset 0be052ad24c1 (bug 1344629)
2017-03-14 11:52:24 +08:00
David Major e7336ecc95 Bug 1344629 - Part 8: Make nsTLiteralString inherit from nsTStringRepr. r=dbaron
This is the patch that all the others have been leading up to: by inheriting from nsTStringRepr, nsTLiteralString loses its destructor (previously suppplied by nsTSubstring).

I included an AsString() cast as an escape hatch for a few pieces of code that couldn't easily accommodate the new hierarchy, but I'm pretty pleased with how little it was necessary.

MozReview-Commit-ID: 2zGkaw1sMUp

--HG--
extra : rebase_source : 68bbdc893850e4b6073d6fc2f036e53853b8927e
2017-03-14 15:26:36 +13:00
Carsten "Tomcat" Book c1edc7067d merge mozilla-inbound to mozilla-central a=merge 2017-03-13 15:22:26 +01:00
Wes Kocher 77632ccd1b Merge m-c to inbound, a=merge
MozReview-Commit-ID: JXQqoTEXxwz
2017-03-10 17:22:54 -08:00
Masayuki Nakano 63c152d62f Bug 1345690 part.4 Rename JoinNodeTransaction::CheckValidity() to JoinNodeTransaction::CanDoIt() for consistency with other transaction classes r=m_kato
MozReview-Commit-ID: 3a5QXiofEL2

--HG--
extra : rebase_source : 40425f274eb69deea3e65cf1cdd35d2630fe4011
2017-03-10 13:46:27 +09:00
Masayuki Nakano 566c4af32a Bug 1345690 part.3 Rename DeleteTextTransaction::Init() to DeleteTextTransaction::CanDoIt() since it does not initialize anything and just checking if the text node is editable r=m_kato
MozReview-Commit-ID: EyqHjHF3Q8G

--HG--
extra : rebase_source : 8004a067bf7fb8aedef8dc67d9ebb72ce5f89755
2017-03-10 13:38:28 +09:00
Masayuki Nakano 22a5d6332f Bug 1345690 part.2 Make the constructor of DeleteRangeTransaction initialize all members instead of Init() r=m_kato
Similar to DeleteNodeTransaction, DeleteRangeTransaction should take all necessary information as its arguments.  However, different from DeleteNodeTransaction, this doesn't need to implement CanDoIt() since nobody checks the state.

MozReview-Commit-ID: 2Z9fNtGeJ9c

--HG--
extra : rebase_source : fe3f75126a8975a0edb00a6c0709134b0a0f4d87
2017-03-09 11:19:39 +09:00
Masayuki Nakano 579b4d1fcb Bug 1345690 part.1 Make the constructor of DeleteNodeTransaction initialize all necessary members instead of Init() r=m_kato
I'd like to make mNodeToDelete an owning-non-null member, but it's not cycle collector aware.  Therefore, this patch only changes mEditorBase from pointer to reference.

MozReview-Commit-ID: H3wxmN1t92s

--HG--
extra : rebase_source : ca9984b47c9d242f82e395773a9a7f534e60c022
2017-03-10 13:23:40 +09:00
Andreas Farre 85536fcfc4 Bug 1337392 - Update test cases to match new cursor behavior. r=smaug
MozReview-Commit-ID: 4BdZyeqTBAx
2017-03-08 16:41:42 +01:00
Carsten "Tomcat" Book f6885163cd Merge mozilla-central to mozilla-inbound 2017-03-08 14:28:34 +01:00
Florian Quèze 9d62681259 Bug 1345253 - Use element.firstChild.remove() instead of element.removeChild(element.firstChild), r=jaws. 2017-03-08 10:17:52 +01:00
Masayuki Nakano 21c9475ab2 Bug 1344149 EditorEventListener shouldn't handle odd focus/blur events which may be created in chrome script r=smaug
EditorEventListener listens any trusted focus/blur events which may be synthesized by JS without proper event class. Then, editor will setup selection limitation.  This may cause odd behavior.  Therefore, EditorEventListener should stop handling focus/blur events which do not come from nsFocusManager.

MozReview-Commit-ID: 7SlfIRgArkr

--HG--
extra : rebase_source : ade7009f1b87fbc629de32b6f22a85c87c72107f
2017-03-08 15:24:55 +09:00
Michael Layzell 165c0a9513 Bug 1317322 - Part 1: Activate `paste` in menus when within <textarea> controls, r=ehsan
MozReview-Commit-ID: 7YD8qtsC3u6
2017-03-06 14:37:39 -05:00
Boris Zbarsky f80dd7a663 Bug 1345237. Propagate uint32_t deeper into the editor state and text control frame code. r=mystor
MozReview-Commit-ID: KeUo8My6eBJ
2017-03-09 14:44:45 -05:00
Masayuki Nakano 0c1872f92e Bug 1345763 part.2 Implement AsHTMLEditor() in EditorBase and its subclasses and replace casts with it r=smaug
MozReview-Commit-ID: CUYV0tMjQHH

--HG--
extra : rebase_source : 44559913e3df50a3ad33074b2955cce03601bf8b
2017-03-09 18:38:41 +09:00
Masayuki Nakano e794313540 Bug 1345763 part.1 Implement AsTextEditor() in EditorBase and its subclasses and replace casts with it r=smaug
MozReview-Commit-ID: 3ZyBefyc45N

--HG--
extra : rebase_source : 0af0607849b9a19859b73b327887c895ae08036b
2017-03-10 14:05:37 +09:00
Wes Kocher 6aeb8acc68 merge graphics branch to m-c a=merge
MozReview-Commit-ID: 5GYHFV8IsKo
2017-03-03 11:23:31 -08:00
Kartikaya Gupta 48fb1c4b1e Merge m-c to graphics
MozReview-Commit-ID: GK8bGynKhO5

--HG--
rename : browser/components/extensions/ext-theme.js => toolkit/components/extensions/ext-theme.js
rename : browser/components/extensions/schemas/theme.json => toolkit/components/extensions/schemas/theme.json
rename : browser/components/extensions/test/browser/browser_ext_themes_chromeparity.js => toolkit/components/extensions/test/browser/browser_ext_themes_chromeparity.js
rename : browser/components/extensions/test/browser/browser_ext_themes_dynamic_updates.js => toolkit/components/extensions/test/browser/browser_ext_themes_dynamic_updates.js
rename : browser/components/extensions/test/browser/browser_ext_themes_lwtsupport.js => toolkit/components/extensions/test/browser/browser_ext_themes_lwtsupport.js
2017-03-03 08:28:21 -05:00
aceman 9bbb2bd7c7 Bug 1326494 - Remove an outdated reference to nsISupportsArray in libeditor. r=erahm DONTBUILD a=tomcat
--HG--
extra : amend_source : 30dd120499f06d2b3394645a5fc2e0c3dd054fce
2017-03-01 16:17:00 +01:00
Makoto Kato 2c1a2f9f2c Bug 1344116 - Clean up HTMLEditRules::RemoveAlignment. r=masayuki
Before I will fix some justify* command's bug, I would like to clean up HTMLEditRules::RemoveAlignment to get rid of nsIDOM* into this method.

MozReview-Commit-ID: 4UATycS5iBl

--HG--
extra : rebase_source : 7079a774b4b8359aeffbdbdf2efe0b45bd92c173
2017-03-03 13:13:21 +09:00
Kartikaya Gupta c60e79b7bf Bug 1342934 - Allow an assertion in non-e10s mode as well, if webrender is enabled. r=rhunt
MozReview-Commit-ID: 5Spf2sHdPUp
2017-02-27 11:15:11 -05:00
Masatoshi Kimura 7be7b11a1c Bug 1342144 - Remove version parameter from the type attribute of script elements. r=jmaher
This patch is generated by the following sed script:
find . ! -wholename '*/.hg*' -type f \( -iname '*.html' -o -iname '*.xhtml' -o -iname '*.xul' -o -iname '*.js' \) -exec sed -i -e 's/\(\(text\|application\)\/javascript\);version=1.[0-9]/\1/g' {} \;

MozReview-Commit-ID: AzhtdwJwVNg

--HG--
extra : rebase_source : e8f90249454c0779d926f87777f457352961748d
2017-02-23 06:10:07 +09:00
Boris Zbarsky a16891fa05 Reenable some more stylo reftests. No bug. r=bzbarsky
MozReview-Commit-ID: BbRlPC60tvt
2017-02-24 10:49:37 -05:00
Carsten "Tomcat" Book e6b82618f4 merge mozilla-inbound to mozilla-central a=merge 2017-02-23 14:59:37 +01:00
Makoto Kato d2b6ed15ad Bug 833889 - Part 1. Remove CSS properties even if it is default value. r=masayuki
When selected nodes are <span style="font-weight: normal;">A</span>, toggle bold inserts new span element into parent node like <span style="font-weight: bold;"><span style="font-weight: normal;">A</span><span>.  So bold isn't applied correctly.

IsCSSEquivalentToHTMLInlineStyleSet might return false even if style is applied.  Because it returns true that style isn't default value.  Since "font-weight: normal" is default property, it isn't removed.

So when style is already applied even if it is default value, we should remove it.

MozReview-Commit-ID: LgImkHRp9Ff

--HG--
extra : rebase_source : dd4d894495754a81abaf5a2aede1132056920beb
extra : histedit_source : 72d196cd9f90296eb00b97c1538704c714cc871c
2017-02-23 17:10:27 +09:00
Makoto Kato 2dcf7753c2 Bug 1327798 - Part 1. PasteNoFormatting shouldn't set text/html to clipboard event on paste. r=enndeakin
MozReview-Commit-ID: 8VMudiPiXcK

--HG--
extra : rebase_source : 2476f69296a60f6978f97da2daef021b90350dbf
2017-02-22 18:34:45 +09:00
Boris Zbarsky a11bfd53bd Bug 1341988. Reenable a bunch of stylo reftests that were disabled for reasons that are not relevant anymore. r=bz
MozReview-Commit-ID: CLqLHexhBX3

--HG--
extra : rebase_source : 07dfb89d0651240362395494fdd7ee94363430b6
2017-02-23 02:09:57 -05:00
Andrea Marchesini d32aa97041 Bug 1285898 - [e10s-multi] Localstorage "storage" event is not fired with multiple content processes. r=asuth
--HG--
extra : rebase_source : 724b38c52139dee1c6f746152fefff05333dfc24
extra : intermediate-source : e56108122b9088555f29a28e6086d4d117a68c4e
extra : source : 6681b50c1f6d0d2d22d5f631234402e020c0b78a
2017-02-19 22:16:48 -05:00
Kartikaya Gupta 3d5856468f Bug 1331357 - Expand number of allowed assertions during a reftest, because in QR builds we sometimes get two. r=masayuki
MozReview-Commit-ID: LvHxTtdLDjD

--HG--
extra : rebase_source : 25f722524b6bc1a91f560ec4ae1253c5f07b19ee
2017-02-15 11:05:35 -05:00
Masayuki Nakano 99d0a9c9a4 Bug 1338451 Editor should commit composition first at handling mousedown event r=m_kato
Editor may need to create some new transaction during handling a mousedown event.  Therefore, editor needs to finish pending composition transaction.  So, mousedown event handler should commit composition first.

MozReview-Commit-ID: 2BaoYwB7wLS

--HG--
extra : rebase_source : 1babc2fd37ff08a1316a62943adc2a7a36d8ca53
2017-02-10 16:51:59 +09:00
Xidorn Quan 95c1b23bd9 Bug 1339341- Downgrade several stylo errors to warnings. r=heycam
MozReview-Commit-ID: 2Sa8dS8uSo5

--HG--
extra : rebase_source : c6809309bbef5faf458b56018b964619ff386238
2017-02-14 18:26:10 +11:00
Makoto Kato 2d7d8e1271 Bug 1270235 - Part 2. Add test. r=masayuki
MozReview-Commit-ID: BV7Dc6YiNM6

--HG--
extra : rebase_source : 935515f86b8a59844f3f57bb011629d1f9f53b3b
2017-02-13 15:46:15 +09:00
Makoto Kato e1cb496376 Bug 1270235 - Part 1. Check parent node is null in RemoveEmptyNodes. r=masayuki
RemoveEmptyNodes doesn't check whether parent node is null.  So we shouldn't add null to skip list.

Also, although this crash depends on clang, if debug build, it will hit the assertion on all compiler.

MozReview-Commit-ID: GgiczVExlIn

--HG--
extra : rebase_source : 5ec0119a80d86dfeac5e970cdf540997cca24c34
2017-02-13 15:46:09 +09:00
Masayuki Nakano b30dc0891e Bug 1337718 part.10 Make EditorEventListener::MouseClick() and EditorEventListener::HandleMiddleClickPaste() use WidgetMouseEvent as far as possible r=m_kato
MozReview-Commit-ID: EMFevpq9ftM

--HG--
extra : rebase_source : bc2074cf119b8ea698f3eed809b43d4a93d49168
2017-02-08 22:55:54 +09:00
Masayuki Nakano fa85dc8ad8 Bug 1337718 part.9 Make IMEStateManager::OnClickInEditor() take const WidgetMouseEvent* instead of nsIDOMMouseEvent* r=m_kato
MozReview-Commit-ID: KdoMcxW8lkT

--HG--
extra : rebase_source : a03316e3a6ca7daf937032f32e00f2a4b2fd23fc
2017-02-08 22:29:14 +09:00
Masayuki Nakano a6bd2cc214 Bug 1337718 part.8 Make EditorEventListener::NotifyIMEOfMouseButtonEvent() take WidgetMouseEvent* instead of nsIDOMMouseEvent* r=m_kato
MozReview-Commit-ID: A53lxmDXLMb

--HG--
extra : rebase_source : 4b022a38c45d68563fcd89b9e8c504cb52f7fab0
2017-02-08 22:19:14 +09:00
Masayuki Nakano cee96a2b9a Bug 1337718 part.7 Make IMEStateManager::OnMouseButtonEventInEditor() take WidgetMouseEvent* instead of nsIDOMMouseEvent r=m_kato
MozReview-Commit-ID: FDselwSymZq

--HG--
extra : rebase_source : 211e4f91075d0a93bf10fd82273856010957b3ee
2017-02-08 22:02:49 +09:00
Masayuki Nakano 3e94f4acb9 Bug 1337718 part.6 Make EditorEventListener::KeyDown() take const WidgetKeyboardEvent* instead of nsIDOMKeyEvent* r=m_kato
MozReview-Commit-ID: 6gST8uULwSb

--HG--
extra : rebase_source : 1428e1d24b0b8295a3d57764535651f221fcf637
2017-02-08 21:30:27 +09:00
Masayuki Nakano b66e2b2e6e Bug 1337718 part.5 Make IsCtrlShiftPressed() take const WidgetKeyboardEvent* instead of nsIDOMKeyEvent* r=m_kato
Additionally, this patch removes unnecessary name space wrapper of IsCtrlShiftPressed().  Perhaps, it was necessary when mozilla::EditorEventListener was nsEditorEventListener.

MozReview-Commit-ID: EHzt7aRtYgQ

--HG--
extra : rebase_source : d38d73226de8f5563ad66de10f8f8ed701d766a1
2017-02-08 20:05:12 +09:00
Masayuki Nakano c58f95a48b Bug 1337718 part.4 Make EditorEventListener::KeyUp() take const WidgetKeyboardEvent* instead of nsIDOMKeyEvent* r=m_kato
MozReview-Commit-ID: K9zCJsYgfbL

--HG--
extra : rebase_source : 77941f0fe5be600a61576706968f25ff13d218c7
2017-02-08 20:22:57 +09:00
Masayuki Nakano 2f6ff9d325 Bug 1337718 part.3 Make EditorEventListener::KeyPress() take WidgetKeyboardEvent* instead of nsIDOMKeyEvent* r=m_kato
MozReview-Commit-ID: 49fcZXPSsQ4

--HG--
extra : rebase_source : f0e3791c0067c580cb4f134d3ff9c1f5f504aaa2
2017-02-08 19:50:50 +09:00
Masayuki Nakano 87c78a5bfb Bug 1337718 part.2 Make EditorEventListener::ShouldHandleNativeKeyBindings() take WidgetKeyboardEvent* instead of nsIDOMKeyEvent* r=m_kato
MozReview-Commit-ID: 4JS2yJ6iXgY

--HG--
extra : rebase_source : 30cbcab74da7731e446329a3263dd82cd16fdfab
2017-02-08 19:47:05 +09:00
Masayuki Nakano c4cea9a380 Bug 1337718 part.1 Make EditorBase::HandleKeyPressEvent() take WidgetKeyboardEvent* instead of nsIDOMKeyEvent* r=m_kato
MozReview-Commit-ID: 8QUiHPRf9AH

--HG--
extra : rebase_source : d9a531248f4e72dfb501146976af7efd64d1e122
2017-02-08 20:18:17 +09:00