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

51 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano 7436f01057 Bug 564411 Move all methods/attributes of nsIEditorIMESupport to nsIEditor r=smaug
Doing QI from nsIEditor to nsIEditorIMESupport doesn't make sense because editor should always support all methods and attributes of nsIEditorIMESupport (it does NOT mean that all nsIEditor implementation need to support IME).

This patch moves all of them to nsIEditor for avoiding redundant QIs.

MozReview-Commit-ID: DzIKuGHG4iy

--HG--
extra : rebase_source : cc5e9a6ae4572ebe461d9770ffa5c23d33dc8526
2016-12-20 21:47:31 +09:00
Botond Ballo 1a3f01bf7e Bug 1320200 - Propagate scroll-behavior on a text input to the anonymous scrollable <div> inside it. r=tnikkel
MozReview-Commit-ID: Cur3x41wAfU

--HG--
extra : rebase_source : 0db4979a2717d54da258dbd83c6be31fdb6c1537
2016-11-25 19:39:17 -05:00
Michael Layzell c47fca1cd7 Bug 1018486 - Part 1: Changes in dom/, r=baku
MozReview-Commit-ID: 4tCUM4KRe81
2016-09-07 10:50:35 -04:00
Bobby Holley c2cbbe5f56 Bug 1295370 - Stop lazily creating the root node in nsTextEditorState::GetRootFrame. r=ehsan
AFAICT this doesn't change behavior, since all the callers of GetRootNode should
occur after we've already called BindToFrame. However, it makes it easier for
future static analysis to see that we don't trigger node creation from
nsTextControlFrame::AppendAnonymousContentTo.
2016-08-17 12:46:53 -07:00
Decky Coss 08a416fd4e Bug 1283915 - Preserve input selection properties after type change. r=smaug
MozReview-Commit-ID: 7xJKc3vIpTY

--HG--
extra : rebase_source : 6fa36a607efb1e8eec1cc8efbb174d622aa0281f
2016-07-27 11:04:53 -04: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
Thomas Wisniewski 30ab766837 Bug 613019 - Track whether the last input/textarea change was done interactively, and enable the commented-out maxLength tracking code. r=mrbkap
--HG--
extra : rebase_source : 59c0986d6184f09f79fcda848de9d822949aa47b
2016-08-06 11:59:08 -04:00
Decky Coss b69450d2ea Bug 1287655 - place textarea/input cursor at end of text when initialized; r=smaug
MozReview-Commit-ID: 2srGXFmla07

--HG--
extra : transplant_source : %3Cn%D30%86%24%82%90%29%191%9C%8A%EB%0D%5D%E2%20%22%E5
2016-07-21 14:52:49 -04:00
Masayuki Nakano 94713accb3 Bug 1260651 part.49 Rename nsTextEditRules to mozilla::TextEditRules (and also their file names) r=mccr8
MozReview-Commit-ID: DzNeLcT1r1e

--HG--
rename : editor/libeditor/nsTextEditRules.cpp => editor/libeditor/TextEditRules.cpp
rename : editor/libeditor/nsTextEditRules.h => editor/libeditor/TextEditRules.h
rename : editor/libeditor/nsTextEditRulesBidi.cpp => editor/libeditor/TextEditRulesBidi.cpp
2016-07-09 11:34:41 +09:00
Masayuki Nakano d960ef26d5 Bug 1278014 part.5 Rename SelectionType::SELECTION_NORMAL to SelectionType::eNormal r=smaug
MozReview-Commit-ID: AAdxTTKEvrk

--HG--
extra : rebase_source : 82e10db6b8b17d4f571625e34bb3c8f1905ef58a
2016-06-09 18:35:22 +09:00
Masayuki Nakano 00591135a4 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

--HG--
extra : rebase_source : d9f88e217c713c60d1c2578ce6421c73ccba8650
2016-06-11 11:06:37 +09:00
Masayuki Nakano 17f667a2e2 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

--HG--
extra : rebase_source : 56e3ac852657ef4795d718d2da09b16903c2e66c
2016-06-07 22:42:06 +09:00
Ben Tian 1d3df2ccde Bug 1261499 - Make nsContentUtils::AddScriptRunner return void, r=khuey 2016-05-06 16:09:03 +08:00
Kyle Huey c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Masayuki Nakano 07b6f24132 Bug 1259657 Rename WidgetGUIEvent::widget to WidgetGUIEvent::mWidget r=smaug
MozReview-Commit-ID: 167PQWJDEHW

--HG--
extra : rebase_source : 6cd44095b9f33e03190972f043087786cbd772f2
2016-04-14 17:03:14 +09:00
Nathan Froyd 64fe772d2f Bug 1132499 - part 2 - convert nsTextEditorState::mValue to be an nsString; r=ehsan
I don't know the full history here; roc asked about this exact thing in
bug 534785 when reviewing the creation of nsTextEditorState.  The answer
then was "historical reasons" (the original code is hg@1)...maybe to try
and save some space?  Regardless, since the only thing we do here is
convert from/to incoming/outgoing nsStrings, which at least sometimes
appear to be causing OOMs, we might as well hold it as an nsString all
the time.  This change will ideally eliminate allocations, as we'll be
able to use nsString's buffer sharing underneath the hood.
2016-03-04 10:29:01 -05:00
Nathan Froyd f0c8d767c9 Bug 1132499 - part 1 - convert nsTextEditorState::mValue to use Maybe instead of heap allocation; r=ehsan
This change is just a minor tidying; we need to distinguish between
"have a value" and "don't have a value" in nsTextEditorState::GetValue,
but we can do better than heap-allocating the string.
2016-03-04 09:56:13 -05:00
Botond Ballo 45d03919dc Bug 1238137 - Telemetry pings for main thread scrolling to bring the caret into view after moving it in response to keyboard input. r=ehsan
--HG--
extra : commitid : 6E0SPxaKbMl
extra : rebase_source : ca82cafc8b462318ffc5030319546731d9e7a540
extra : histedit_source : 63c1e103a3aaf2ce340b1b4f2276763c16ac2237
2016-02-03 20:36:24 -05:00
Botond Ballo 51957870b3 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.

--HG--
extra : commitid : JDXW8ptuXkF
extra : rebase_source : c45fe2b16484ad370edb852d8eafbc76ca7d0bac
extra : amend_source : b4af21228768221211a42c11a2ff306a6f2bb402
extra : histedit_source : 7cdc4b4df3579682fad194ddfc04c7a5d02c0d3e
2016-02-03 19:51:03 -05:00
Aidin Gharibnavaz 6863090c8a Bug 1235830 - Renaming GetInternalNSEvent to WidgetEvent, in nsIDOMEvent r=smaug
MozReview-Commit-ID: Hm8Owq17KXn

--HG--
extra : transplant_source : 2%82%D5%89%19%94%7C%E7%CA1%99%B5%24%1F5%E1%C0%1F%DE%07
2016-02-12 19:10:07 +03:30
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Ting-Yu Lin 1889f6bc41 Bug 1227927 Part 2 - Remove nsIFrame::GetFirstPrincipalChild(). r=mats
--HG--
extra : commitid : 5qtaK1nS8RC
extra : rebase_source : dcc98f423b2446269beb6fa6a9d092ae8213f38e
2016-01-29 22:42:14 +08:00
Masayuki Nakano b6593edc11 Bug 1240336 Setting same value to either <input> or <textarea> shouldn't cause committing existing composition r=ehsan 2016-01-21 16:52:27 +09:00
Mark Capella caaac41610 Bug 1215959 - (GeckoCaret2) Remove experimental bits added to Touch/Selection carets, r=tylin 2015-12-01 15:25:06 -05:00
Mark Capella 83e7fad573 Bug 1218072 - crash in nsTextEditorState::FinishedRestoringSelection, r=smaug 2015-11-28 11:44:54 -05:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Michael Layzell fc03111ce2 Bug 1196479 - Fire selectstart and selectionchange events on the input node when the selection in that editor changes. r=ehsan 2015-09-12 17:56:46 -04:00
Masayuki Nakano 2586c79eb1 Bug 895274 part.66 Rename NS_FORM_SELECTED to eFormSelect r=smaug 2015-09-02 15:08:00 +09:00
Masayuki Nakano d311a11cc1 Bug 895274 part.9 Rename NS_KEY_PRESS to eKeyPress r=smaug 2015-08-29 08:58:27 +09:00
Masayuki Nakano 66f2c27305 Bug 895274 part.1 Rename WidgetEvent::message to WidgetEvent::mMessage r=smaug 2015-08-22 10:34:51 +09:00
Masayuki Nakano ecdd7a7f0f Bug 549674 part.1 Commit composition string at setting value of <input> or <textarea> r=smaug 2015-06-18 23:56:20 +09:00
Jorg K 1f63317347 Bug 1169996 - Don't lose eEditorMailMask; r=ehsan 2015-06-01 17:42:49 +02:00
Ehsan Akhgari 4ed74e49ed Bug 1166932 - Part 2: Make sure that nsTextInputListener doesn't try to perform edit actions if it has been disconnected from the editor object; r=roc 2015-05-23 09:59:50 -04:00
Mark Capella b470913851 Bug 988143 - Enable Gecko Touch in Fennec, SelectionController mods, r=ehsan 2015-05-14 22:06:12 -04:00
Andrew McCreight 9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Ehsan Akhgari e7830328c1 Bug 1154336 - Convert nsTextEditorState::mRestoringSelection into a strong reference; r=baku 2015-04-14 15:13:35 -04:00
Andrea Marchesini e6f385fb3d Bug 1148527 - Indentation fix after bug 1145631, r=ehsan 2015-03-27 18:52:19 +00:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Ehsan Akhgari 3cf3794589 Bug 1125963 - Part 1: Fix serialization of the pre-wrap elements that Thunderbird relies on; r=bzbarsky
This ensures that the plaintext serializer doesn't use the preformatted
text code path if we have encountered a pre-wrap element that
Thunderbird uses (which means setting white-space: pre-wrap and width:
NNch on the body element.)

It also ensures that we use 0 as the wrap column number passed down to
the plaintext serializer, instead of -1, which this code seems to be
unable to handle properly.
2015-03-04 00:50:17 -05:00
Andrea Marchesini 76dd8edccb Bug 1134280 - Get rid of Tag() - patch 2.8 - dom/html - Fix all the occurrences, m=smaug, r=surkov 2015-03-03 11:09:00 +00:00
Andrea Marchesini 2c4f63331f Bug 1134280 - Get rid of Tag() - patch 1 - Is{HTML,XUL,MathML,SVG}Element and IsAnyOf{HTML,XUL,MathML,SVG}Elements, r=smaug 2015-03-03 11:08:59 +00:00
Nicholas Nethercote 242708cf72 Bug 1127201 (attempt 2, part 1) - Replace most NS_ABORT_IF_FALSE calls with MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 488e401ff87e31a2074c4108c4df0572d9536667
2015-02-09 14:34:50 -08:00
Andrew McCreight d3826daa16 Back out Bug 1127201 (part 2) for various problems. 2015-02-06 15:04:32 -08:00
Nicholas Nethercote d34f0301b8 Bug 1127201 (part 2) - Convert all NS_ABORT_IF_FALSE calls to MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 99182e70335d2b5ff95f8c528ae992d37294be3a
2015-02-04 20:05:36 -08:00
Mike Hommey a35dbaeebf Bug 1126593 - Add a global fallible instance, so that using fallible works directly, everywhere. r=njn
--HG--
rename : memory/mozalloc/fallible.h => memory/fallible/fallible.h
2015-02-02 09:56:13 +09:00
Ehsan Akhgari 2e58c3092f Bug 1122786 - Make nsTextEditorState::mTextListener an nsRefPtr; r=roc 2015-01-22 23:18:56 -05:00
Ehsan Akhgari 56a443b1c1 Bug 1097452 - Use fallible allocation when setting the value of an <input> or <textarea> element; r=jst,froydnj
This patch handles most of the call sites for these allocations except
for a few where I added TODO comments with some information.  Handling
those places may require reworking lots of code, so I prefer to not do
that here.
2015-01-14 17:31:41 -05:00
Ehsan Akhgari abb0b24062 Bug 1118424 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/html; r=baku 2015-01-06 23:33:50 -05:00
pchang 040f9d3add Bug 1090008 -Part 1 - Refactor the logic to dispatch selectionchange to TextDialog, r=roc 2014-11-28 05:35:00 +01:00
Jonathan Kew 74d961eaf3 Bug 1077515 - part 6 - Create a new nsISelectionController::PhysicalMove command. r=roc 2014-11-22 14:39:03 +00:00