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

627 Коммитов

Автор SHA1 Сообщение Дата
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
Simon Montagu abb9d80805 Bug 1067796: make SelectionLanguageChange cache the language direction on mFrameSelection and return early if the language hasn't changed, r=roc 2015-01-09 11:39:38 +02:00
Jonathan Kew 74d961eaf3 Bug 1077515 - part 6 - Create a new nsISelectionController::PhysicalMove command. r=roc 2014-11-22 14:39:03 +00:00
Jonathan Kew 9a00763a7b Bug 1077515 - part 3 - Change desiredX (nscoord) to desiredPos (nsPoint) in nsPeekOffsetStruct, to support maintaining either vertical or horizontal position on inter-line moves. r=roc 2014-11-22 14:39:03 +00:00
Jonathan Kew d4bd3503ab Bug 1077515 - part 1 - Eliminate use of keyCode parameters and values in nsFrameSelection. r=roc 2014-11-22 14:39:02 +00:00
Simon Montagu 2f9f1b57d2 Bug 1100071 patch 3: don't pass around bidi levels when we only need the direction, r=dholbert 2014-11-20 12:45:23 +02:00
Simon Montagu ad766a1fcb Bug 1100071 patch 2: add macros for common tests whether bidi level is odd and whether two bidi levels have the same parity, r=dholbert 2014-11-20 12:45:22 +02:00
Simon Montagu aafee71bb6 Bug 1100071 patch 1: change uint8_t to nsBidiLevel in a few more places, r=dholbert 2014-11-20 12:45:22 +02:00
Aryeh Gregor 5f90f032e4 Bug 1055722 - Remove spammy warning; r=smaug 2014-10-22 15:45:30 +03:00
Morris Tseng 27ecf9f1b4 Bug 1062735 - Part 1: Remove GetHintForPosition. r=roc 2014-09-28 23:48:00 +02:00
Peter Van der Beken dcda2ba9bb Bug 1078744 - Replace SetIsDOMBinding with SetIsNonDOMBinding, remove nsWrapperCache::SetIsDOMBinding. r=bz.
--HG--
extra : rebase_source : 89c476cd9436530b2df5acc903909e34188417a0
2014-10-07 11:44:49 +02:00
Ehsan Akhgari f483e5ee19 Bug 1068058 - Update Selection.containsNode according to the spec; r=smaug
Specifically, this makes the first argument non-nullable.
2014-09-16 15:11:52 -04:00
Mats Palmgren 1ae9903d62 Bug 739396, part 1 - Split a range (that are to be added to the Selection as a result of a user action) into multiple ranges that excludes any non-selectable (-moz-user-select:none) sub-trees. 2014-09-10 17:07:36 +00:00
Ryan VanderMeulen 0e562f96b9 Backed out 3 changesets (bug 739396) for Mulet perma-fail on a CLOSED TREE.
Backed out changeset 299911e6983b (bug 739396)
Backed out changeset de11af3e0964 (bug 739396)
Backed out changeset e274cb276cc5 (bug 739396)
2014-09-10 12:21:58 -04:00
Mats Palmgren 4530d16e45 Bug 739396, part 1 - Split a range (that are to be added to the Selection as a result of a user action) into multiple ranges that excludes any non-selectable (-moz-user-select:none) sub-trees. 2014-09-10 13:07:43 +00:00
Mats Palmgren 2c38b0b6b7 Bug 1061468 - Notify the editor when removing the focused element is its ancestor limiter. r=ehsan 2014-09-09 23:27:56 +00:00
Ehsan Akhgari 60360fc645 Bug 1060985 - Fix more bad implicit constructors in layout; r=roc 2014-08-31 23:36:37 -04:00
Mats Palmgren 8ed74d7d51 Bug 1059888 - Fix a few DEBUG_TABLE_SELECTION compile errors, NPOTB. r=dholbert 2014-08-28 10:07:00 -04:00
Trevor Saunders fd5e9d1fcc bug 1047696 - mark a number of classes MOZ_FINAL to get compilers to devirtualize more r=froydnj 2014-08-05 13:33:55 -04:00
Robert O'Callahan 0a6d04586e Bug 1048752. Part 17: Rename Get/SetCaretDOMSelection to Get/SetSelection. r=tn
The forward declaration of Selection in nsCaret.h will be used in later patches.

--HG--
extra : rebase_source : d1b749adac983c04d3365bb6bfb76a50101beeb5
2014-08-06 17:19:27 +12:00
Robert O'Callahan 2489dc1f01 Bug 1048752. Part 16: Move nsFrameSelection::HINT to CaretAssociationHint.h. r=tn
This patch started an attempt to remove nsFrameSelection.h from nsCaret.h
and metastasized into a rather large refactoring patch that removed it
from some other header files as well, and changed nsFrameSelection::HINT
into a global-scope enum with better names. I also converted bools
into CaretAssociationHint in a few places where that was appropriate,
but there are still some more places (GetChildFrameContainingOffset)
where bools need to be converted. I figured this patch was big enough already.

--HG--
extra : rebase_source : cc618ef60e707e1360644340a2648de389383da0
2014-08-06 17:19:27 +12:00
Robert O'Callahan b4ed20d441 Bug 1048752. Part 14: Split GetGeometry into a static and a non-static version. r=tn
GetGeometry is used in two different ways. Sometimes it's used to get
information about a particular caret. Sometimes it's used to get
information about a particular selection that's not associated with
a caret. Splitting GetGeometry into a non-static version for the former
and a static version for the latter makes this more clear. Also it saves
code since for the latter version we don't have to get an nsCaret first.

--HG--
extra : rebase_source : b7730dac56b308a82b79b175749234c9a92b6f59
2014-08-06 17:19:26 +12:00