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

55 Коммитов

Автор SHA1 Сообщение Дата
L. David Baron ce547cd6f5 Bug 1566945 - Add a parameter to nsContainerFrame::InsertFrames for aPrevFrame's line box. r=dholbert
For now, always pass null, except when passing it through from one
overload to another.

Differential Revision: https://phabricator.services.mozilla.com/D38389

--HG--
extra : moz-landing-system : lando
2019-07-17 23:34:45 +00:00
Masayuki Nakano 780b285e68 Bug 1543315 - part 15: Mark PresShell::ScrollFrameRectIntoView() as MOZ_CAN_RUN_SCRIPT r=smaug
Unfortunately, `EventChainVisitor` does not grab the `nsPresContext` with
`RefPtr` by itself.  Therefore, there is no guarantee of the lifetime without
checking the origin when its subclasses are instantiated.  This patch changes
it and subclasses to `MOZ_STACK_CLASS` since only `EventDispatcher::Dispatch()`
creates them in the stack with given `nsPresContext`.  Additionally, it's
already been marked as MOZ_CAN_RUN_SCRIPT_BOUNDARY`.  Therefore, the
`nsPresContext` instance has already been guaranteed its lifetime by the
caller.  For making this fact stronger, this patch marks their constructors
as `MOZ_CAN_RUN_SCRIPT`.  Therefore, nobody can create those instances without
guaranteeing the lifetime of `nsPresContext` and `dom::Event`.  Note that
it may look like that `mPresContext` of `EventChainPostVisitor` is not
guaranteed.  However, `EventChainPreVisitor` which gives `nsPresContext` to it
is also a stack only class.  So, it won't be deleted before
`EventChainPostVisitor` instance.

Differential Revision: https://phabricator.services.mozilla.com/D30010

--HG--
extra : moz-landing-system : lando
2019-05-06 13:57:46 +00:00
Masayuki Nakano 2f9688c14e Bug 1544343 - part 2: Make factory methods take mozilla::PresShell instead of nsIPresShell r=emilio
Additionally, this patch makes `nsFrame.h` stop including `nsIPresShell.h`
and makes each users include `mozilla/PresShell.h` instead.  So, this improves
rebuild performance of `nsIPresShell.h` (and `mozilla/PresShell.h` in the
future).

Note that due to `nsIFrame::PresShell()`, `mozilla::` prefix is necessary for
`PresShell` in a lot of classes which are derived from `nsIFrame` even in
`.cpp` files.

Differential Revision: https://phabricator.services.mozilla.com/D27476

--HG--
extra : moz-landing-system : lando
2019-04-16 07:24:49 +00:00
Emilio Cobos Álvarez 12867b1a3f Bug 1525371 - Kill ComputedStyle::mPresContext, move the pointer to the frame instead. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D18734
2019-02-07 11:15:36 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Kartikaya Gupta c7c9b39313 Bug 1503029 - Ensure the slider frame is notified of APZ drag initiation. r=botond
This adds a notification from APZ to the scrollbar's slider frame to
inform it of APZ starting an async scrollbar drag. This is useful
because APZ can start a scrollbar drag and even change the scroll
position before the scrollbar frame even handles the mousedown event. In
such a case, the mousedown can land on where the scrollthumb *used to
be* before it was dragged away. This can result in scroll-to-click
behavior getting triggered and the scrollthumb glitching.

With this patch, the new notification follows the same path as the
request-repaint message, and so is guaranteed to arrive at the scrollbar
before any request-repaint messages. It sets some state that can be used
to correct the behaviour described above.

Differential Revision: https://phabricator.services.mozilla.com/D12364

--HG--
extra : moz-landing-system : lando
2018-11-22 18:00:49 +00:00
Botond Ballo 08a635ccc8 Bug 1482825 - Only prevent dispatching mouse-move events targeted at a slider frame to web content, if the scrollbar is being dragged. r=smaug
Otherwise, if the mouse is just moving over the scrollbar, mouse-move
events are dispatched to web content.

Differential Revision: https://phabricator.services.mozilla.com/D4800

--HG--
extra : moz-landing-system : lando
2018-09-01 15:00:31 +00:00
Daniel Holbert 53cb368be9 Bug 1468663 part 1: Fill in missing mozilla:: namespaces in layout headers that are referenced by files in layout/generic. r=emilio
This fixes some of the build-bustage that occurs when we disable unification in layout/generic.

Differential Revision: https://phabricator.services.mozilla.com/D1649
2018-06-15 16:14:29 +00:00
Boris Zbarsky b198cf2c31 Bug 1455055 part 2. Clean up HandleEvent implementations in layout/xul. r=masayuki
They take Event now so we can simplify some things.

MozReview-Commit-ID: HUbn7QWqRAQ
2018-04-20 00:49:29 -04:00
Boris Zbarsky 2b6097ae6d Bug 1455055 part 1. Convert nsIDOMEventListener to taking an Event, not an nsIDOMEvent. r=masayuki
This does no cleanup other than what's needed to compile.  Cleanup coming up in
later patches.

MozReview-Commit-ID: 3sOnkj71n09
2018-04-20 00:49:29 -04:00
Emilio Cobos Álvarez e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez 5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
Mats Palmgren 25cd0c37f7 Bug 1400618 part 1 - Collect NAC / generated content and call DestroyAnonymousContent / UnbindFromTree on those after the frames are destroyed. r=bz
MozReview-Commit-ID: 2trDgeJPw25
2017-11-07 01:20:33 +01:00
Daniel Holbert 680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -07:00
Timothy Nikkel 52d23be2f4 Bug 1409215. Don't change scroll thumbs into AGRs during display list building. r=mstange
Find the scrollframe for a scrollbar thumb and use it to determine if the scrollthumb is an AGR, instead of recording if the associated scrollframe is active on a frame property during display list building.
2017-05-19 17:04:19 -05:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Matt Woodrow 40f5b92e3b Bug 1388161 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList. r=mstange 2017-08-07 14:23:35 +12:00
Sebastian Hengst 8257b2d113 Backed out changeset 8f2dd8f13b53 (bug 1388161) for failing chrome's test_animation_performance_warning.html | preserve-3d transform. r=backout 2017-08-10 14:40:21 +02:00
Matt Woodrow a3a130b6ff Bug 1388161 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList. r=mstange 2017-08-07 14:23:35 +12:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Botond Ballo 52ab6c0bae Bug 1365761 - Do not dispatch mouse-move events targeted as a slider frame to web content. r=smaug
MozReview-Commit-ID: Cpi7orSO7dS

--HG--
extra : rebase_source : 30bd643922409f47eb2318938a07e7543337d625
2017-06-05 15:05:47 -04:00
Mats Palmgren ec6b1ef065 Bug 1364805 part 1 - Make every concrete frame class be a NS_DECL_QUERYFRAME_TARGET. r=jfkthame
MozReview-Commit-ID: Gy9gcEYupeY
2017-05-26 12:11:11 +02:00
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
KuoE0 4f17947f0f Bug 1348738 - (Part 4) Add a nsIDocument arg to nsRepeatService::Start to get the event target from it. r=dholbert
In the new architecture of Quantum DOM, all timer callback need a
specified event target. So, we add the new document arg to Start
function to get the event target from it. And update all callers.

MozReview-Commit-ID: a482mukqGc

--HG--
extra : rebase_source : 36f9d47a4afd7c7113adf3f274656b694b8d0943
2017-03-29 16:40:05 +08:00
KuoE0 5f42875bfd Bug 1348738 - (Part 3) Add a string-label arg to nsRepeatService::Start and upgrade to InitWithNamedFuncCallback from InitWithFuncCallback. r=dholbert
In the new architecture of Quantum DOM, all runnables need a name label.
So, we add the new string-label arg to Start function, and update all
callers.

MozReview-Commit-ID: G9LXFjtFcQv

--HG--
extra : rebase_source : a19b605013be56d01780c831d2a48ada8825b1c7
2017-03-29 16:32:52 +08:00
Botond Ballo a98321305e Bug 1328658 - Notify main thread of a failed attempt to start an APZ scrollbar drag. r=kats,tnikkel
MozReview-Commit-ID: ERm1sVNfoKL

--HG--
extra : rebase_source : 0b57987a2a15533fad577dd2d363ec386f6bfeae
2017-01-27 18:02:22 -05:00
Kevin Wern a63c8b29a7 Bug 1324581 - check event handled by apz in nsSliderFrame::StartAPZDrag r=botond
test_scroll_snapping_scrollbars.html is failing when apz.drag.enabled
is true because synthesizeMouse does not route events through APZ,
meaning that the drag is never handled by APZ or Gecko.

Resolve this by adding a check that mHandledByApz flag is true for
WidgetGUIEvent, and handle in Gecko if that is not the case.

MozReview-Commit-ID: IrxVLxqs64V

--HG--
extra : rebase_source : c76e9fed3dcab806b17e85740c94339ac0e7ccca
2016-12-23 03:49:38 -05:00
L. David Baron 1fff16a212 Bug 1053986 - Rename nsBox::DoLayout to DoXULLayout. r=dholbert
Written purely with sed, over .h and .cpp files in layout/.

(While this wasn't explicitly reviewed, I'm considering it as r=dholbert
based on the request in comment 47 in the bug.)

MozReview-Commit-ID: 6Q0F4ViOyjJ
2016-04-20 21:28:35 -07:00
L. David Baron c760cfbbb8 Bug 1053986 - Rename nsIFrame::GetMaxSize to GetXULMaxSize, and related methods. r=dholbert
Written purely with sed, over .h and .cpp files in layout/.

MozReview-Commit-ID: 39fYXMz7kqR
2016-04-20 21:28:31 -07:00
L. David Baron 87a69b43fb Bug 1053986 - Rename nsIFrame::GetPrefSize to GetXULPrefSize, and related methods. r=dholbert
Written purely with sed, over .h and .cpp files in layout/.

MozReview-Commit-ID: yvcAZ8rndu
2016-04-20 21:28:31 -07:00
L. David Baron 814003bbcc Bug 1053986 - Rename nsIFrame::GetMinSize to GetXULMinSize, and related methods. r=dholbert
Written purely with sed, over .h and .cpp files in layout/.

MozReview-Commit-ID: Jhe3o3kIOe0
2016-04-20 21:28:31 -07:00
Benoit Girard 65e8237702 Bug 1257369 - Suppress the DisplayPort when scrolling via nsSliderFrame. r=kats
MozReview-Commit-ID: 8I3UfWlkdPq

--HG--
extra : rebase_source : 25b496ff5f3be9187cb8727982eaa094f85a0d1f
2016-03-18 14:46:54 -04:00
Nicholas Nethercote a96e4ed3ee Bug 1231256 (part 10) - Remove unused parameters from StartAPZDrag(). r=roc.
--HG--
extra : rebase_source : 32d54af512560923390228365801f2823cdea351
2015-12-08 20:05:13 -08:00
Benoit Girard 698006ddf9 Bug 1211612 - Add DragInputBlock for async scrollbars. r=kats
--HG--
extra : commitid : Grx9aF2UvH2
extra : rebase_source : ea2601a2a3ac2870383fa86d8e7bd90342424ce1
2015-10-26 16:06:49 -04: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
Benoit Girard b3c2569202 Bug 1199885 - Part 13: Let nsSliderFrame trigger async scrolling via StartScrollbarDrag. r=kats
--HG--
extra : commitid : LMXLmzjgQ4
2015-09-28 17:00:25 -04:00
Andrea Marchesini 085da9302a Bug 1156632 - Remove unused forward class declarations - patch 5 - rdf, parser, layout and something else, r=ehsan 2015-04-22 08:29:22 +02:00
David Anderson e8a7d33638 Scrollbar thumbs can overlap scrollbar arrows during APZ scrolling. (bug 1152469, r=botond,mstange) 2015-04-12 23:03:02 -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
Mats Palmgren 2e240075ec Bug 1116753 - Remove the nsIPresShell* param from remaining frame ctors that still have it. r=roc 2015-01-06 09: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
Miranda Emery 43c4d9fdf2 Bug 957445: Part 1 - Scrolling moved from nsScrollbarButtonFrame and nsSliderFrame into nsIScrollbarMediator, r=mats 2014-02-05 14:30:34 +13: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
Alexander Seleznev 48ef864e62 Bug 1048178 - Don't let scrollbar dragging get stuck when the user right-clicks at the wrong time. r=mstange 2014-08-04 12:00:00 +07:00
Benoit Jacob e1b7dbca34 Bug 1028588 - Fix dangerous public destructors in layout/ - r=dbaron 2014-06-23 18:40:01 -04:00
Mats Palmgren 6ae2bb8863 Bug 1015781 - part 3, Fix whitespace and comments, and move some SetInitialChildList/AppendFrames/InsertFrames/RemoveFrame methods so that they are together in the file. r=roc 2014-05-28 19:36:58 +00:00
Mats Palmgren f08f841973 Bug 1015781 - part 1+2, Make the SetInitialChildList/AppendFrames/InsertFrames/RemoveFrame methods return void (scripted change). Remove code handling the return values. r=roc 2014-05-28 19:36:58 +00:00
Mats Palmgren 399be41768 Bug 508665 - part 5, Make nsIFrame::Init require a nsContainerFrame* for the parent frame param. r=roc 2014-05-24 22:20:40 +00:00
Daniel Holbert 3146c96a56 Bug 919806 followup: Reindent method declarations affected by NS_IMETHOD-removal. (whitespace-only; no review) DONTBUILD 2014-02-18 00:36:33 -08:00