Cameron McCormack
f89ddf5736
Bug 1329086 - Make Selection::ToString flush frames. r=bzbarsky
...
MozReview-Commit-ID: Au5taO6DYwi
2017-01-06 15:21:19 +08:00
Cameron McCormack
5f9911da79
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
3898f7d882
Bug 1326507, remove NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS, r=mccr8
2017-01-03 21:47:55 +02:00
Mats Palmgren
22cc1252db
Bug 1321623 - Implement DOM Selection.setBaseAndExtent(). r=smaug
2016-12-19 16:48:37 +01:00
Gerald Squelart
9a3fb4229e
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
2016-11-10 14:11:27 +11:00
Brad Werth
6c6d0f3e72
Bug 1314080 Part 1: Rename CollectClientRects method and add a new parameter for collecting text. r=smaug
...
MozReview-Commit-ID: KQPky6Fh8sG
2016-11-02 13:49:43 -07:00
Jorg K
82d11230ae
Bug 1263357 - When the caret is placed after visible line break, associate caret with frame on the next line instead. r=mats
2016-10-14 14:21:00 -04:00
Ehsan Akhgari
11e582734a
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
b5c9cc2cfa
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
7a3cd2abcc
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
22a5098249
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
c987b38274
Bug 1018486 - Part 4: Changes in layout/, r=bz
...
MozReview-Commit-ID: BsaKGHsoqOq
2016-09-07 10:50:40 -04:00
Jimmy Wang
a6f36a03ee
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
2016-08-03 19:08:33 -04:00
Jimmy Wang
706e10af7d
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
2016-07-27 16:05:37 -04:00
Jimmy Wang
54a377e8db
Bug 1261299 - Add method nsCopySupport::ClearSelectionTransferable() to clear the nsClipboard::sSelectionTransferable when you have no content selection. r=mstange
...
MozReview-Commit-ID: AjUe94N0Iiw
2016-06-08 14:11:39 -04:00
Jimmy Wang
e5ffcbb8c8
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
2016-06-03 12:04:22 -04:00
Masayuki Nakano
58f2b7d302
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
2016-07-09 11:42:33 +09:00
Xidorn Quan
e58ba38557
Bug 1281099 part 2 - Merge three bidi frame properties into one. r=jfkthame
...
MozReview-Commit-ID: CEJhM3c21KO
2016-06-21 17:53:10 +10:00
Xidorn Quan
e4b1698b6a
Bug 1281099 part 1 - Convert some macros to functions to help later change. r=jfkthame
...
MozReview-Commit-ID: 2OS5eIsNAYN
2016-06-21 17:21:09 +10:00
Masayuki Nakano
df276e50d4
Bug 1185307 part.2 Replace upcast from nsISelection to mozilla::dom::Selection with nsISelection::AsSelection() r=smaug
...
MozReview-Commit-ID: Gs3oiAgJFG9
2016-06-17 22:32:49 +09:00
Astley Chen
ca13d10ee9
Bug 1277131 : Part 1 - rename nsTableOuterFrame to nsTableWrapperFrame. r=heycam
...
MozReview-Commit-ID: KrSHLbmovTM
2016-06-16 13:14:08 +01:00
Masayuki Nakano
35646e4494
Bug 1278014 part.14 Rename SelectionType::SELECTION_URLSTRIKEOUT to SelectionType::eURLStrikeout r=smaug
...
MozReview-Commit-ID: 7AqeDbHxGE2
2016-06-09 20:58:56 +09:00
Masayuki Nakano
fdeb61aef7
Bug 1278014 part.13 Rename SelectionType::SELECTION_URLSECONDARY to SelectionType::eURLSecondary r=smaug
...
MozReview-Commit-ID: C2IW7nqjEkD
2016-06-09 20:47:48 +09:00
Masayuki Nakano
322b23236c
Bug 1278014 part.12 Rename SelectionType::SELECTION_FIND to SelectionType::eFind r=smaug
...
MozReview-Commit-ID: BZxBnCDBghi
2016-06-09 20:35:20 +09:00
Masayuki Nakano
7cd21418f1
Bug 1278014 part.11 Rename SelectionType::SELECTION_ACCESSIBILITY to SelectionType::eAccessibility r=smaug
...
MozReview-Commit-ID: 2nU4KQB5S7N
2016-06-09 20:32:36 +09:00
Masayuki Nakano
22e3897811
Bug 1278014 part.10 Rename SelectionType::SELECTION_IME_SELECTEDCONVERTEDTEXT to SelectionType::eIMESelectedClause r=smaug
...
MozReview-Commit-ID: 8v3mqcYorOI
2016-06-09 19:29:29 +09:00
Masayuki Nakano
89a66c2729
Bug 1278014 part.9 Rename SelectionType::SELECTION_IME_CONVERTEDTEXT to SelectionType::eIMEConvertedClause r=smaug
...
MozReview-Commit-ID: 5UNqhB2ZEcZ
2016-06-09 19:14:17 +09:00
Masayuki Nakano
2bd1f0507f
Bug 1278014 part.8 Rename SelectionType::SELECTION_IME_SELECTEDRAWTEXT to SelectionType::eIMESelectedRawClause r=smaug
...
MozReview-Commit-ID: DgprOxg87K6
2016-06-09 19:03:40 +09:00
Masayuki Nakano
52d14e77bb
Bug 1278014 part.7 Rename SelectionType::SELECTION_IME_RAWINPUT to SelectionType::eIMERawClause r=smaug
...
MozReview-Commit-ID: BRe10Lyx5mt
2016-06-09 18:51:49 +09:00
Masayuki Nakano
400a8761f1
Bug 1278014 part.6 Rename SelectionType::SELECTION_SPELLCHECK to SelectionType::eSpellCheck r=smaug
...
MozReview-Commit-ID: 4n2jEVax37O
2016-06-09 18:37:36 +09:00
Masayuki Nakano
09b74b02de
Bug 1278014 part.5 Rename SelectionType::SELECTION_NORMAL to SelectionType::eNormal r=smaug
...
MozReview-Commit-ID: AAdxTTKEvrk
2016-06-09 18:35:22 +09:00
Masayuki Nakano
ad13c60b69
Bug 1278014 part.4 Rename SelectionType::SELECTION_NONE to SelectionType::eNone r=smaug
...
MozReview-Commit-ID: BRfzs8sColP
2016-06-09 18:07:18 +09:00
Masayuki Nakano
4e5926428a
Bug 1278014 part.3 Define 2 constants for number of SelectionType and number of SelectionType except "none" r=smaug
...
This patch defines two constants kSelectionTypeCount and kPresentSelectionTypeCount. The former is same as nsISelectionController::NUM_SELECTIONTYPES. The latter is kSelectionTypeCount - 1 for excluding SELECTION_NONE. The latter is useful in some loops which handle all selection types except SELECTION_NONE.
Note that this patch fixes a bug of nsFrameSelection. That doesn't treat SELECTION_NONE as a selection (see the definition of index), however, it defines redundant item and doesn't use it actually. Additionally, it computes invalid selection type in each loop. Therefore, without this patch, debug build hits MOZ_ASSERT() in ToSelectionType(RawSelectionType).
Note that these constants are defined as anonymous enum because we cannot define as const (or static) even with extern. If we'd try to do it, it caused link error or not available in nsFrameSelection.cpp as constant value since they were not initialized if they were initialized in nsSelection.cpp. Therefore, these constants are defined as enum items but using "k" prefix.
MozReview-Commit-ID: H6sH7NBEXlE
2016-06-11 11:12:26 +09:00
Masayuki Nakano
4b3d1e8406
Bug 1278014 part.2 Define mozilla::SelectionType as an enum class and use it instead of RawSelectionType as far as possible r=smaug
...
This patch defines mozilla::SelectionType as an enum class. This is safer than nsISelectionController::SELECTION_* since setting illegal value to its variable is checked at build time. So, as far as possible, this should be used everywhere (but of course, this isn't available in scriptable interfaces).
And also this implements some useful methods for managing SelectionType and RawSelectionType which are implemented in layout/nsSelection.cpp because nsISelectionController is implemented by both PresShell and nsTextEditorState. Therefore, implementing one of them may make hard to find them. On the other hand, nsSelection.cpp is a better file name to look for them.
Note that this patch creates mozilla::Selection::RawType() for binding. Native code should keep using Selection::Type() but the binding code needs to use RawType() due to impossible to convert from SelectionType to RawSelectionType without explicit cast.
MozReview-Commit-ID: 81vX7A0hHQN
2016-06-11 11:06:37 +09:00
Masayuki Nakano
71befe7dcf
Bug 1278014 part.1 Rename SelectionType in nsISelectionController.idl to mozilla::RawSelectionType r=smaug
...
mozilla::SelectionType will be an enum class. Therefore, we need to rename SelectionType with a word "raw" since it's a type for raw nsISelectionController::SELECTION_*.
MozReview-Commit-ID: K8SO0bbpv0Y
2016-06-07 22:42:06 +09:00
Jet Villegas
da67789a60
Bug 1268736: An editable table cell means that both the cell and its contents are children of an editable node. r=mats
2016-06-04 03:23:56 -07:00
a98446d54a
Bug 1263288 - Make GetFrameForNodeOffset return a sibling frame for frameless content. r=mats
...
This fixes missing caret problems.
Also changed GetFrameForNodeOffset to be non recursive to prevent possibly of
large stack frame.
2016-05-11 15:28:45 -06:00
Masayuki Nakano
94e8c148d6
Bug 1259661 part.9 Rename WidgetMouseEvent::clickCount to WidgetMouseEvent::mClickCount r=smaug
...
MozReview-Commit-ID: 5tC8UqcfLek
2016-05-10 23:29:14 +09:00
Mats Palmgren
453d0a6863
Bug 623432 part 1 - When the target scroll point is at the screen edge and no scrolling occured, then try to scroll 10px in that direction anyway. r=tn
2016-04-26 14:43:55 +02:00
Xidorn Quan
4912a1a884
Bug 1097499 part 6 - Inherit move direction from parent for horizontal-in-vertical text. r=jfkthame
...
MozReview-Commit-ID: 28mBKQnYydp
2016-04-22 09:18:41 +10:00
Masayuki Nakano
4d73a7381d
Bug 1259658 Rename WidgetInputEvent::modifiers to WidgetInputEvent::mModifiers r=smaug
...
MozReview-Commit-ID: 7avEiqKfaHA
2016-03-31 17:03:00 +09:00
Mats Palmgren
75b3b8e1b9
Bug 1259949 - Set the CARET_ASSOCIATE_AFTER hint also when we collapse just after a text node that ends with a significant newline. r=ehsan
...
nsCaret::GetFrameAndOffset may return a text frame also when aParentNode
is the container of a text node and aOffset is just after it. In this
case we also want CARET_ASSOCIATE_AFTER if the text ends with
a significant newline. (follow-up from bug 1258308)
2016-04-01 02:08:15 +02:00
Mats Palmgren
997ee2085e
Bug 1258308 - Lookup the frame (continuation) associated with aParentNode/aOffset instead of assuming it's always the primary frame (follow-up from bug 1237236). r=ehsan
2016-03-22 22:49:57 +01:00
Mats Palmgren
c9141aff0a
Bug 1237236 - When collapsing the selection to the end of textframe that ends in a significant newline then set mHint to CARET_ASSOCIATE_AFTER so that the caret is rendered at the start of the next line if any. r=ehsan
2016-03-17 17:27:56 +01:00
Jonathan Kew
e84a991577
Bug 1248128 - The fallback caret-move handling from bug 1153237 should be more selective to avoid undesired side-effects. r=roc
2016-02-17 12:05:10 +00:00
Botond Ballo
55ad80cc3b
Bug 1238137 - Telemetry pings for main thread scrolling to bring the caret into view after moving it in response to keyboard input. r=ehsan
2016-02-03 20:36:24 -05:00
Botond Ballo
6e32604930
Bug 1238137 - Telemetry pings for main thread keyboard-driven scroll input methods. r=ehsan
...
Pings are sent in the implementations of the nsISelectionController methods
ScrollLine, ScrollPage, ScrollCharacter, and CompleteScroll. It is assumed
that these methods are triggered by keyboard input.
A small number of false positives can occur if these methods are called
in response to something other than keyboard input; this is considered
acceptable.
2016-02-03 19:51:03 -05:00
Jet Villegas
c22f778b30
Bug 974309: Fixes the IsEditable() logic for table cells. r=ehsan
2016-02-09 14:06:03 -08:00
Birunthan Mohanathas
bfee0fb40c
Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj
2016-02-02 17:36:30 +02:00
Phil Ringnalda
d871b9515f
Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
...
CLOSED TREE
Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00