Emilio Cobos Álvarez
e44543aad4
Bug 1360241: Devirtualize nsIFrame::GetType. r=heycam
...
MozReview-Commit-ID: 5Nzhyta5Hle
--HG--
extra : rebase_source : c2e9d4bfb9239f5e851d110cd7dff98c1e1a8d8b
2017-04-30 17:30:08 +02:00
Aryeh Gregor
aec49bff0f
Bug 1359453 - Use standard exception for selection.removeRange() r=masayuki
...
The test change is already upstream:
https://github.com/w3c/web-platform-tests/pull/5686
The spec change has not officially been accepted yet as of this writing,
possibly delayed for IPR review:
https://github.com/w3c/selection-api/pull/87
MozReview-Commit-ID: 3auwvwP4X72
--HG--
extra : rebase_source : 0396cd7c454b234598d77427bc20c6ea0645dc2e
2017-04-26 15:50:36 +03:00
Aryeh Gregor
1d730f1c5d
Bug 1359371 - Update Selection.webidl to match spec r=smaug
...
Practical changes:
1) Some additional method arguments are nullable or optional, which
matches Chrome/WebKit. They make more sense non-nullable and
non-optional, but Chrome is afraid of the compat impact of changing.
2) Added [CEReactions] to deleteFromDocument().
MozReview-Commit-ID: Kg9EDubnEui
--HG--
extra : rebase_source : 1d47ee0b12b0b719159c326f789dd6e6b6000c8e
2017-04-25 14:55:31 +03:00
Masayuki Nakano
09c6c60b8a
Bug 1343642 - Ensure to grab nsFrameSelection before calling its methods unless calling only const methods. r=smaug
...
MozReview-Commit-ID: 9GKujCcrhly
2017-04-06 13:11:52 +09:00
Mats Palmgren
b3478c6ec2
Bug 1343795 - Hold a strong ref on the Selection while calling ScrollIntoView with SCROLL_DO_FLUSH. r=smaug
...
MozReview-Commit-ID: 5C10dmT0bI9
2017-03-21 02:12:41 +01:00
Sebastian Hengst
af455321f5
Backed out changeset b4e95d147909 (bug 1343795) for bustage in layout/generic/nsSelection.cpp. r=backout
2017-03-20 23:41:44 +01:00
Mats Palmgren
69a981c64a
Bug 1343795 - Hold a strong ref on the Selection while calling ScrollIntoView with SCROLL_DO_FLUSH. r=smaug
...
--HG--
extra : rebase_source : d2bd613d69ac59244818dbe2403e2f7b18deca35
2017-03-20 18:21:00 -04:00
Jeremy Chen
e6c42c1a7b
Bug 1348236 - label nsAutoScrollTimer for nsSelection. r=heycam
...
MozReview-Commit-ID: pUfQwRsecx
--HG--
extra : rebase_source : 1ff474affc0bfd5c8911731badc6b87815d434ff
2017-03-19 00:40:30 +08:00
Jeremy Chen
7a35c86351
Bug 1348236 - coding style fixes for nsAutoScrollTimer and its uses in nsSelection. r=heycam
...
MozReview-Commit-ID: GlfYK7NpTWX
--HG--
extra : rebase_source : 16e94c14269f8684b6eb3dfb4a2f408ec3763230
2017-03-19 00:40:30 +08:00
Mats Palmgren
4ef842400f
Bug 1348222 - Assign 'mScrollEvent' while 'ev' still has a non-null value. r=smaug
...
MozReview-Commit-ID: 3OsNlgHFEzM
2017-03-17 20:55:24 +01:00
Masayuki Nakano
0ef47eccb5
Bug 1347809 Set Selection::mCalledByJS to false before moving focus in NotifySelectionListeners() because non-*JS() methods don't set it to false r=smaug
...
Currently, Selection::NotifySelectionListeners() moves focus before setting mCalledByJS to false. Therefore, if moving focus causes some calls of internal Selection methods, it may cause moving focus due to mCalledByJS being still true. So, mCalledByJS should be set to false before moving focus in NotifySelectionListeners().
MozReview-Commit-ID: F879bOmhZlv
--HG--
extra : rebase_source : 80790d24f1c78d9aeb20e5735e0c7c45111e69b3
2017-03-16 17:15:20 +09:00
Jeremy Chen
6034613c83
Bug 1347820 - Label ScrollSelectionIntoViewEvent for nsSelection. r=heycam
...
Since GetParentObject has a chance returning nullptr, we keep the original
code path as a fallback.
MozReview-Commit-ID: LCJefr1ZH6t
--HG--
extra : rebase_source : 16b791d9555e9d3fb6e00233868249cbd08d944f
2017-03-16 15:33:00 +08: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
Masayuki Nakano
a959abd5c5
Bug 1318312 part.2 Mark Selection as "called by JS" when every Selection API which may cause changing selection is called by JS r=smaug
...
Selection needs to be able to distinguish if every selection change is caused by JS (i.e., via Selection API) or the others.
This patch maps some methods of Range and Selection to *JS(). Each of them marks its instance as "used by JS" and calls corresponding method.
With this change, Selection::NotifySelectionListeners() can move focus only when it's caused by Selection API.
MozReview-Commit-ID: 1GoLHiIJ10Y
--HG--
extra : rebase_source : 02d497f9e55b3325a2e01c3041cadb90881dccb8
2017-03-10 16:55:12 +09:00
Mats Palmgren
d13aaf9ce0
Bug 1340771 part 1 - Rename nsWeakFrame to AutoWeakFrame (automated change). r=tn
...
MozReview-Commit-ID: 8pl4nyeGEkr
2017-03-01 18:03:14 +01:00
Mats Palmgren
f33f3cd648
Bug 1341137 part 2 - Provide a way to add ranges to Selection objects that aren't associated with a shell/nsFrameSelection. r=smaug
2017-02-25 11:33:34 +01:00
Mats Palmgren
876c9a7854
Bug 1341137 part 1 - Make Selection::addRange silently reject ranges that have a different root. r=smaug
2017-02-25 11:33:34 +01:00
Wes Kocher
2391738b66
Backed out 3 changesets (bug 1341137) for wpt failures in addRange-00.html a=backout
...
Backed out changeset 343d11a33afe (bug 1341137)
Backed out changeset ac44e1e713e1 (bug 1341137)
Backed out changeset 6f32de880c77 (bug 1341137)
MozReview-Commit-ID: 26CQIfTXLRI
2017-02-24 16:28:17 -08:00
Mats Palmgren
867bc229d0
Bug 1341137 part 2 - Provide a way to add ranges to Selection objects that aren't associated with a shell/nsFrameSelection. r=smaug
2017-02-25 00:26:18 +01:00
Mats Palmgren
51817b4c94
Bug 1341137 part 1 - Make Selection::addRange silently reject ranges that have a different root. r=smaug
2017-02-25 00:26:18 +01:00
Ting-Yu Lin
55aa51e408
Bug 1332105 Part 2 - Make Selection::LookUpSelection() return UniquePtr. r=dholbert
...
Selection::LookUpSelection()'s only caller,
nsFrameSelection::LookUpSelection(), doesn't check the return value. Let's
make it return UniquePtr directly like nsFrameSelection::LookUpSelection().
Rename aReturnDetails to aDetailsHead so that its role is clearer.
aDetailsHead is of type UniquePtr<SelectionDetails> instead of
UniquePtr<SelectionDetails>&& because the caller always wants to transfer
the ownership of SelectionDetails into the function.
MozReview-Commit-ID: 89Y7X1LTKON
--HG--
extra : rebase_source : 730d601ccb87eb2b616c0a021129752ed5301a3a
2017-01-20 23:28:02 +08:00
Ting-Yu Lin
f1d19f16fb
Bug 1332105 Part 1 - Convert SelectionDetails and related functions to use UniquePtr. r=dholbert
...
For the non-owning pointer usage like iterating SelectionDetails's linked
list, it's sufficient to use SelectionDetails*.
MozReview-Commit-ID: 7PCFhD6Iz8j
--HG--
extra : rebase_source : 2d26edd513a402384e26719b3c0b5362d7a4ebb8
2017-01-20 17:39:57 +08:00
Cameron McCormack
b54b74578c
Bug 1329086 - Make Selection::ToString flush frames. r=bzbarsky
...
MozReview-Commit-ID: Au5taO6DYwi
2017-01-06 15:21:19 +08:00
Cameron McCormack
babad063ff
Bug 1328832
- Part 2: Rename mozFlushType to mozilla::FlushType and make it an enum class. r=bzbarsky
...
MozReview-Commit-ID: D3fIngSHSsl
2017-01-05 15:31:56 +08:00
Olli Pettay
0364dbc792
Bug 1326507, remove NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS, r=mccr8
...
--HG--
extra : rebase_source : 3ae1207308de120b7299b13ecaa95dd1612b3459
2017-01-03 21:47:55 +02:00
Mats Palmgren
a028cc0e46
Bug 1321623 - Implement DOM Selection.setBaseAndExtent(). r=smaug
2016-12-19 16:48:37 +01:00
Gerald Squelart
0affeb4ab0
Bug 1316432 - Fix nsCOMPtr constructions&assignments from 0 - r=froydnj
...
Giving '0' (literal zero) to nsCOMPtr is now ambiguous, as both
nsCOMPtr(decltype(nullptr)) and nsCOMPtr(T*) could be used.
In any case, our coding standards mandate the use of 'nullptr' for pointers.
So I'm changing all zeroes into nullptr's where necessary.
MozReview-Commit-ID: LXiZTu87Ck6
--HG--
extra : rebase_source : f9dcc6b06e9ebf9c30a576f9319f76a51b6dc26f
2016-11-10 14:11:27 +11:00
Brad Werth
1e29a9cf1c
Bug 1314080 Part 1: Rename CollectClientRects method and add a new parameter for collecting text. r=smaug
...
MozReview-Commit-ID: KQPky6Fh8sG
--HG--
extra : rebase_source : 33bce65c1752aeb7a2225a981f2dadf7e2ce5916
2016-11-02 13:49:43 -07:00
Jorg K
4bb58198d9
Bug 1263357 - When the caret is placed after visible line break, associate caret with frame on the next line instead. r=mats
...
--HG--
extra : amend_source : a0068b0c841189204e07cc6c0a19f83d5dac8da3
2016-10-14 14:21:00 -04:00
Ehsan Akhgari
13850f4183
Bug 1309628 - Hide support for dispatching selection events on the contents of text controls behind a pref; r=mystor
...
This patch adds a pref to control whether we dispatch the selection
events for changes in the contents of input and textarea text controls.
The spec for this feature hasn't been written yet, and we need to exclude
this part of the selection API from the part we want to ship.
2016-10-13 16:52:07 -04:00
Michael Layzell
7f30ef3465
Bug 1231923 - Enable selection events for documents with the System Principal, r=ehsan
...
MozReview-Commit-ID: J9UoI9Pdu48
2016-10-13 13:07:17 -04:00
Jonathan Kew
3cc319fde5
Bug 924851 - patch 1 - Move definition of nsBidiLevel/nsBidiDirection and frame bidi properties from nsBidi.h to nsIFrame.h, in preparation for removal of nsBidi. r=xidorn
2016-10-06 09:49:14 +01:00
Kartikaya Gupta
435b8ac3fc
Bug 1300905 - When long-pressing on a selection, don't dismiss the selection and start a new one. Show the context menu instead. r=TYLin,mats
...
MozReview-Commit-ID: J0e9DqIDwnC
2016-09-30 09:36:10 -04:00
Michael Layzell
118a8b7507
Bug 1018486 - Part 4: Changes in layout/, r=bz
...
MozReview-Commit-ID: BsaKGHsoqOq
2016-09-07 10:50:40 -04:00
Jimmy Wang
6d8584507f
Bug 1261299 - Only update nsClipboard::sSelectionCache in nsSelection.cpp when the selection listener is on the same process as the focused window where the selection occured or became active. r=smaug
...
MozReview-Commit-ID: KARKdc8G0nI
--HG--
extra : rebase_source : 1a5bc0fcb4ea607c46916df04199fda5161d64ab
2016-08-03 19:08:33 -04:00
Jimmy Wang
a2bf6b970a
Bug 1261299 - Update the selection cache on repaint to handle when a pre-existing selection becomes active aka the current selection. r=smaug
...
MozReview-Commit-ID: HrTQnHd12rg
--HG--
extra : rebase_source : bd727de70576a39da3cd3fab1754330c41add768
2016-07-27 16:05:37 -04:00
Jimmy Wang
271a7cfaa2
Bug 1261299 - Add method nsCopySupport::ClearSelectionTransferable() to clear the nsClipboard::sSelectionTransferable when you have no content selection. r=mstange
...
MozReview-Commit-ID: AjUe94N0Iiw
--HG--
extra : rebase_source : bf1bf642212add9227c185a6cfa3f8f94a7f0248
2016-06-08 14:11:39 -04:00
Jimmy Wang
6c6d5a3ec1
Bug 1261299 - Add new clipboard kSelectionCache to cache the current selection for OSX service menu. Add a constructor to nsAutoCopyListener which sets the clipboard to copy to. Pass in kSelectionCache for OSX or kSelectionClipboard for linux. r=mstange
...
MozReview-Commit-ID: B9mzVnJxUjl
--HG--
extra : rebase_source : 5329f87a958dcb372d552b6aa17442ea7f9b9762
2016-06-03 12:04:22 -04:00
Masayuki Nakano
9b6e26f0bb
Bug 1260651 part.56 Rename nsHTMLEditor to mozilla::HTMLEditor and related stuff r=mccr8
...
This patch renames classes/structs as:
nsHTMLEditor -> mozilla::HTMLEditor
nsHTMLEditor::BlobReader -> mozilla::HTMLEditor::BlobReader
SetSelectionAfterTableEdit -> mozilla::AutoSelectionSetterAfterTableEdit
nsHTMLEditor.h -> HTMLEditor.h (exposed as mozilla/editor/HTMLEditor.h)
nsHTMLAbsPosition.cpp -> HTMLAbsPositionEditor.cpp
nsHTMLAnonymousUtils.cpp -> HTMLAnonymousNodeEditor.cpp
nsHTMLDataTransfer.cpp -> HTMLEditorDataTransfer.cpp
nsHTMLEditorStyle.cpp -> HTMLStyleEditor.cpp
nsHTMLInlineTableEditor.cpp -> HTMLInlineTableEditor.cpp
nsHTMLObjectResizer.cpp -> HTMLEditorObjectResizer.cpp
nsTableEditor.cpp -> HTMLTableEditor.cpp
These new file names are clearer names which related to HTMLEditor than old names.
MozReview-Commit-ID: DTWaoFvy0DF
--HG--
rename : editor/libeditor/nsHTMLAbsPosition.cpp => editor/libeditor/HTMLAbsPositionEditor.cpp
rename : editor/libeditor/nsHTMLAnonymousUtils.cpp => editor/libeditor/HTMLAnonymousNodeEditor.cpp
rename : editor/libeditor/nsHTMLEditor.cpp => editor/libeditor/HTMLEditor.cpp
rename : editor/libeditor/nsHTMLEditor.h => editor/libeditor/HTMLEditor.h
rename : editor/libeditor/nsHTMLDataTransfer.cpp => editor/libeditor/HTMLEditorDataTransfer.cpp
rename : editor/libeditor/nsHTMLObjectResizer.cpp => editor/libeditor/HTMLEditorObjectResizer.cpp
rename : editor/libeditor/nsHTMLInlineTableEditor.cpp => editor/libeditor/HTMLInlineTableEditor.cpp
rename : editor/libeditor/nsHTMLEditorStyle.cpp => editor/libeditor/HTMLStyleEditor.cpp
rename : editor/libeditor/nsTableEditor.cpp => editor/libeditor/HTMLTableEditor.cpp
2016-07-09 11:42:33 +09:00
Xidorn Quan
05dcd227c5
Bug 1281099 part 2 - Merge three bidi frame properties into one. r=jfkthame
...
MozReview-Commit-ID: CEJhM3c21KO
--HG--
extra : rebase_source : 9e21c098692429ad3b35b2230887faf85c967ce8
2016-06-21 17:53:10 +10:00
Xidorn Quan
c81ed5494f
Bug 1281099 part 1 - Convert some macros to functions to help later change. r=jfkthame
...
MozReview-Commit-ID: 2OS5eIsNAYN
--HG--
extra : rebase_source : 345e33f986aa950eb122c1cc7451c7a59a8f84cb
2016-06-21 17:21:09 +10:00
Masayuki Nakano
13d4f396fe
Bug 1185307 part.2 Replace upcast from nsISelection to mozilla::dom::Selection with nsISelection::AsSelection() r=smaug
...
MozReview-Commit-ID: Gs3oiAgJFG9
--HG--
extra : rebase_source : a136405d99ff3361a595157986b3a33026bcd5f5
2016-06-17 22:32:49 +09:00
Astley Chen
1fcb0ee95d
Bug 1277131 : Part 1 - rename nsTableOuterFrame to nsTableWrapperFrame. r=heycam
...
MozReview-Commit-ID: KrSHLbmovTM
--HG--
rename : layout/tables/nsTableOuterFrame.cpp => layout/tables/nsTableWrapperFrame.cpp
rename : layout/tables/nsTableOuterFrame.h => layout/tables/nsTableWrapperFrame.h
extra : rebase_source : 730a73b8439f1f5c5ccdb32b241deda5224c321c
2016-06-16 13:14:08 +01:00
Masayuki Nakano
9fdc31aea3
Bug 1278014 part.14 Rename SelectionType::SELECTION_URLSTRIKEOUT to SelectionType::eURLStrikeout r=smaug
...
MozReview-Commit-ID: 7AqeDbHxGE2
--HG--
extra : rebase_source : 2dada2c98e1186aa7f5699b8d11033eae50ba2c6
2016-06-09 20:58:56 +09:00
Masayuki Nakano
a0eb51f54d
Bug 1278014 part.13 Rename SelectionType::SELECTION_URLSECONDARY to SelectionType::eURLSecondary r=smaug
...
MozReview-Commit-ID: C2IW7nqjEkD
--HG--
extra : rebase_source : a64cd80650fe51dbc5586511ad8c3287a0ec3225
2016-06-09 20:47:48 +09:00
Masayuki Nakano
ebf3bc1862
Bug 1278014 part.12 Rename SelectionType::SELECTION_FIND to SelectionType::eFind r=smaug
...
MozReview-Commit-ID: BZxBnCDBghi
--HG--
extra : rebase_source : 099d1043c7e69f3c49a2d4e34190cbd7c4532107
2016-06-09 20:35:20 +09:00
Masayuki Nakano
61a6a5f987
Bug 1278014 part.11 Rename SelectionType::SELECTION_ACCESSIBILITY to SelectionType::eAccessibility r=smaug
...
MozReview-Commit-ID: 2nU4KQB5S7N
--HG--
extra : rebase_source : 8bb098b292fa92833e86fd65be62819844e0829e
2016-06-09 20:32:36 +09:00
Masayuki Nakano
10f047dba5
Bug 1278014 part.10 Rename SelectionType::SELECTION_IME_SELECTEDCONVERTEDTEXT to SelectionType::eIMESelectedClause r=smaug
...
MozReview-Commit-ID: 8v3mqcYorOI
--HG--
extra : rebase_source : a6823273c161eabbfa9e49e689154e547c14a106
2016-06-09 19:29:29 +09:00
Masayuki Nakano
aa3d2a6ce9
Bug 1278014 part.9 Rename SelectionType::SELECTION_IME_CONVERTEDTEXT to SelectionType::eIMEConvertedClause r=smaug
...
MozReview-Commit-ID: 5UNqhB2ZEcZ
--HG--
extra : rebase_source : 74d41ddf5496bdc50306bf916251df4f8d65a65b
2016-06-09 19:14:17 +09:00
Masayuki Nakano
ff86f10a4c
Bug 1278014 part.8 Rename SelectionType::SELECTION_IME_SELECTEDRAWTEXT to SelectionType::eIMESelectedRawClause r=smaug
...
MozReview-Commit-ID: DgprOxg87K6
--HG--
extra : rebase_source : 2f655353845292c4e8028f6e43f0dbbbfea11b68
2016-06-09 19:03:40 +09:00