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

648 Коммитов

Автор SHA1 Сообщение Дата
Ting-Yu Lin d477595b16 Bug 1221459 - Remove TouchCaret and SelectionCarets. r=mtseng, r=roc
All the files modified are straightforward deletion except TouchManager
and ZoomConstraintsClient. I add some includes and wrap TouchManager by
mozilla namespace to fix build errors due to the removal of TouchCaret.
2015-12-22 14:14:12 +08:00
Nigel Babu fd9c9b233f Backed out changeset 9f30d3caa231 (bug 1221459) 2015-12-22 14:03:21 +05:30
Ting-Yu Lin 0fd840e0d8 Bug 1221459 - Remove TouchCaret and SelectionCarets. r=mtseng,roc
All the files modified are straightforward deletion except TouchManager
and ZoomConstraintsClient. I add some includes and wrap TouchManager by
mozilla namespace to fix build errors due to the removal of TouchCaret.

--HG--
extra : rebase_source : b31db322130f665e7dda53d1061cfc40f81ce411
2015-12-22 14:14:12 +08:00
Mark Capella e7b070ed41 Bug 1215959 - (GeckoCaret2) Upgrade Core and AccessibleCaret, r=smaug 2015-12-01 15:25:06 -05:00
Chris Peterson bfeb9f1127 Bug 1224951 - Part 2: Fix -Wunreachable-code warnings in layout. r=dholbert
layout/base/nsCSSFrameConstructor.cpp:12067:12: warning: will never be executed [-Wunreachable-code]
layout/base/nsPresContext.cpp:2861:10: warning: will never be executed [-Wunreachable-code]
layout/generic/nsFrameSetFrame.cpp:730:11: warning: will never be executed [-Wunreachable-code]
layout/generic/nsFrameSetFrame.cpp:725:11: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:268:62: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:269:66: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:270:68: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:271:75: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:272:73: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:273:81: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:274:69: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:275:60: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:276:68: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:277:68: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:279:18: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:290:62: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:291:66: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:292:68: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:293:75: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:294:73: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:295:81: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:296:69: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:297:60: warning: will never be executed [-Wunreachable-code]
layout/generic/nsSelection.cpp:5657:7: warning: will never be executed [-Wunreachable-code]
layout/mathml/nsMathMLmrootFrame.cpp:405:5: warning: will never be executed [-Wunreachable-code]
2015-11-14 00:06:58 -08:00
Simon Montagu 3457b582d2 Bug 1216096: restore previous RTL caret behaviour by backout of bug 1164963, bug 1177505, and bug 1180417. r=jfkthame 2015-11-10 04:42:23 -08: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 2aa752dd26 Bug 1199288 - Rename mApplyUserSelectStyle to mUserInitiated, r=smaug 2015-09-23 23:28:36 -04:00
Ehsan Akhgari 3228eca502 Bug 1204291 - Null check the argument of AutoHideSelectionChanges::AutoHideSelectionChanges() 2015-09-12 22:58:46 -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
Michael Layzell fe31896607 Bug 571294 - Part 1: Implement selection events behind the dom.select_events.enabled pref, r=smaug 2015-09-12 17:56:44 -04:00
Michael Layzell 0097c41e01 Bug 1201190 - Part 3: Mark every consumer of GUARD_OBJECT as MOZ_RAII, r=ehsan 2015-09-12 16:53:33 -04:00
Masayuki Nakano 6ecfef2cde Bug 895274 part.5 Rename NS_EVENT_NULL to eVoidEvent r=smaug 2015-08-29 08:58:26 +09:00
Masayuki Nakano 0d22745cda Bug 895274 part.3 Make the enum of event messages a named enum IGNORE IDL r=smaug 2015-08-26 21:56:59 +09:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Neil Deakin bf46cf123d Bug 1132518, add a flag to nsIFrameTraversal to skip the popup checks, r=mats 2015-07-13 06:07:49 -04:00
Tim Taubert 90b163c879 Bug 834830 - Add nsISelectionController.SELECTION_URLSTRIKEOUT to enable striking out parts of the URL in the URL bar r=roc 2015-07-08 15:45:21 +02:00
Ted Clancy b1d966b6e0 Bug 1164693 - Part 1: Directional caret should point in caret direction in bidi paragraphs. r=smontagu 2015-06-05 21:44:54 -04:00
Ted Clancy f21a8865d4 Bug 1067788 - Part 5: Fix for parts of test_bug496275.html. r=smontagu 2015-05-30 00:22:53 -04:00
Ted Clancy be8a64fc3b Bug 1067788 - Part 4: Update test_bug496275.html. Add setCaretBidiLevel method to Selection. r=smontagu r=ehsan 2015-05-22 00:37:16 -04:00
Ting-Yu Lin da5ef9e181 Bug 1110039 - Part 4 - Hook new classes into the system. r=roc
The necessary modifications are the same as SelectionCarets. For
convenience, Touch/SelectionCarets will be disabled whenever
AccessibleCaret preference is enabled.
2015-04-24 02:08:00 +02:00
Boris Zbarsky 1540774b0c Bug 1157898 part 1. Make code of the form "return rv.ErrorCode();" where rv is an ErrorResult use StealNSResult instead. r=peterv
This patch was generated with the following command:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 's/return ([a-zA-Z0-9]+)\.ErrorCode\(\);/return \1.StealNSResult();/'
2015-04-27 09:18:51 -04:00
Mike Hommey b077d9624d Bug 1134920 - Use moz_xmalloc/moz_xrealloc/free instead of nsMemory::Alloc/Realloc/Free. r=nfroyd 2015-04-01 13:51:45 +09:00
Morris Tseng b2cd13bc1c Bug 1140625 - Recursive call GetFrameForNodeOffset if text node has no frame. r=roc 2015-03-19 02:47:00 -04:00
Jeremy Chen 2f598d90a4 Bug 1140625 - Part 1: Add recursive call in GetFrameForNodeOffset. r=roc 2015-03-24 01:15:00 -04: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
Boris Zbarsky dc24477d79 Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 10:13:33 -04:00
Ting-Yu Lin b79c10f9e3 Bug 1140238 - Part 2: Adjust ranges after changing selection direction. r=mats
When dragging the second caret (eDirNext) over non-selectable elements,
the last range is not generated. Therefore when dragging the first
caret, we will change the selection direction to eDirPrevious, the last
range will be excluded by AutoPrepareFocusRange.

We add a new function to adjust generated bit and anchor focus range
after changing selection direction.

--HG--
extra : rebase_source : 1622818b9cbbc82e02188ec7ea8ac7951ba6f634
2015-03-18 03:26:00 -04:00
Xidorn Quan 4407f03467 Bug 1130891 part 3 - Add param to HTMLCopy to allow copy with ruby annotation. r=smaug
--HG--
extra : source : 57de10711eec392abda832e0df2b4186881180b0
2015-03-10 17:11:55 +11:00
Andrea Marchesini 3a19be88f5 Bug 1134280 - Get rid of Tag() - patch 2.7 - layout/generic - 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
Ting-Yu Lin eacb4adcf8 Bug 1136065 - Remove GetRangeCount() in Selection.h. r=ehsan
We replace GetRangeCount() with the identical function RangeCount() to
avoid any confusion.
2015-02-25 17:08:00 +01:00
Mats Palmgren ef6dcefc77 Bug 1128722 - part 1, Call SetDirection as soon as we decide it needs to change. r=smaug 2015-02-21 04:27:59 +00:00
Mats Palmgren 04fed0b7a5 Bug 1129078 - part 4, Add AutoPrepareFocusRange stack objects on paths to TakeFocus that sets up mAnchorFocusRange (and possibly removes mIsGenerated ranges) based on what operation the user is performing. r=smaug 2015-02-21 04:27:59 +00:00
Mats Palmgren bd4f1d7ffe Bug 1129078 - part 3, Add a mIsGenerated bit to ranges that ExcludeNonSelectableNodes created due to user-select:none. Also, return the index to the range we want to be the new mAnchorFocusRange, based on the Selection direction. r=smaug 2015-02-21 04:27:59 +00:00
Mats Palmgren 47968fcda0 Bug 1129078 - part 2, Refactor nsFrameSelection::MoveCaret slightly. r=smaug 2015-02-21 04:27:59 +00:00
Mats Palmgren fe6b8e52d4 Bug 1129078 - part 1, Remove the chunk that bug 739396 added to Selection::Extend. r=smaug 2015-02-21 04:27:59 +00:00
Wes Kocher 88f34ca973 Backed out 8 changesets (bug 1129078, bug 1128722) for mochitest-5 failures
Backed out changeset f7eff607655a (bug 1128722)
Backed out changeset 801b3abc0de8 (bug 1128722)
Backed out changeset 275d27c2dba0 (bug 1129078)
Backed out changeset 9830ab1a2028 (bug 1129078)
Backed out changeset ce5cb876af9a (bug 1129078)
Backed out changeset c199ff86c77f (bug 1129078)
Backed out changeset 38b1b039f14d (bug 1129078)
Backed out changeset c8a99ee97313 (bug 1129078)
2015-02-20 12:24:25 -08:00
Mats Palmgren 7c8decc2c6 Bug 1128722 - part 1, Call SetDirection as soon as we decide it needs to change. r=smaug 2015-02-20 17:34:21 +00:00
Mats Palmgren fc4bb2216e Bug 1129078 - part 4, Add AutoPrepareFocusRange stack objects on paths to TakeFocus that sets up mAnchorFocusRange (and possibly removes mIsGenerated ranges) based on what operation the user is performing. r=smaug 2015-02-20 17:34:21 +00:00
Mats Palmgren a895b6ecaf Bug 1129078 - part 3, Add a mIsGenerated bit to ranges that ExcludeNonSelectableNodes created due to user-select:none. Also, return the index to the range we want to be the new mAnchorFocusRange, based on the Selection direction. r=smaug 2015-02-20 17:34:21 +00:00
Mats Palmgren da07886215 Bug 1129078 - part 2, Refactor nsFrameSelection::MoveCaret slightly. r=smaug 2015-02-20 17:34:21 +00:00
Mats Palmgren c4f38570ce Bug 1129078 - part 1, Remove the chunk that bug 739396 added to Selection::Extend. r=smaug 2015-02-20 17:34:21 +00:00
Morris Tseng d729431099 Bug 1120316 - Part 1: Move SelectionBatcher to Selection.h. r=roc
--HG--
extra : rebase_source : e17ae33bc017fa1d460b611d251d3dbf29de37b1
2015-02-04 21:34:00 +01:00
Mats Palmgren ad6e4bdcbe Bug 1123067 - part 1, Add the range even if it's inside a user-select:none region in case it's inside an editable node (it represents the caret). r=smaug 2015-02-03 23:54:31 +00:00
Wes Kocher 249a7cc50c Backed out 2 changesets (bug 1123067) for mochitest-1 bustage on a CLOSED TREE
Backed out changeset d35d83e9c9f2 (bug 1123067)
Backed out changeset ea4ea5299409 (bug 1123067)
2015-02-02 17:32:28 -08:00
Mats Palmgren 1510c3582a Bug 1123067 - part 1, Add the range even if it's inside a user-select:none region in case it's inside an editable node (it represents the caret). r=smaug 2015-02-02 22:34:17 +00:00
Ehsan Akhgari 4d42b88e0b Bug 989012 - Part 1: Stop after passing over a non-selectable frame if one is found during the frame traversal; r=roc
The caret movement code already handles unselectable text frames if we
happen to land in the middle of one in nsTextFrame::PeekOffsetCharacter/Word.
However, when performing frame traversal to find the next frame to jump
to, we don't remember if we skipped over an unselectable frame, which causes
us to jump one offset too much when the caret is on the boundary of
selectable and unselectable content.  The test cases demonstrate the
scenario.  Note that an <img alt=foo> is implemented by adding a
generated content to the inline frame representing it, so as far as
the caret movement code is concerned, both test cases are treated similarly.

Note that we need to do this only when moving the selection, and not
when extending it.  We are adding an aExtend argument to
nsPeekOffsetStruct's constructor in order to be able to special case
that.
2015-01-27 23:11:26 -05:00
Ehsan Akhgari fa44e7387c Backed out 2 changesets (bug 989012) because of test failure on Linux32 opt mochitest-a11y on a CLOSED TREE
Backed out changeset 9698f6f3f72e (bug 989012)
Backed out changeset 22fb05349a10 (bug 989012)
2015-01-27 16:40:30 -05:00
Ehsan Akhgari 084e7e0b3c Bug 989012 - Part 1: Stop after passing over a non-selectable frame if one is found during the frame traversal; r=roc
The caret movement code already handles unselectable text frames if we
happen to land in the middle of one in nsTextFrame::PeekOffsetCharacter/Word.
However, when performing frame traversal to find the next frame to jump
to, we don't remember if we skipped over an unselectable frame, which causes
us to jump one offset too much when the caret is on the boundary of
selectable and unselectable content.  The test cases demonstrate the
scenario.  Note that an <img alt=foo> is implemented by adding a
generated content to the inline frame representing it, so as far as
the caret movement code is concerned, both test cases are treated similarly.

Note that we need to do this only when moving the selection, and not
when extending it.  We are adding an aExtend argument to
nsPeekOffsetStruct's constructor in order to be able to special case
that.
2015-01-27 15:35:32 -05:00