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

1336 Коммитов

Автор SHA1 Сообщение Дата
Timothy Nikkel 3ca5249135 Bug 1364295. Simplify some code now that we don't create displayports during display list building. r=mstange 2017-10-02 16:00:16 -05:00
Timothy Nikkel b6711be167 Bug 1364295. Walk the frame tree looking for a scrollframe to add a displayport to, or one that already has a displayport before displaylist building. r=mstange
And stop creating displayports during display list building.

One thing we can investigate in the future is whether we should use the value of mHaveScrollableDisplayPort stored on the display list builder retained between paints. If it's true then we could potentially skip this pass. It would mean that if there are large changes to the page we wouldn't set a displayport. And we'd need to make sure the value is cleared when we load a new page.
2017-05-19 17:04:19 -05:00
Markus Stange 4b4d6f1561 Bug 1402498 - Add ScrollAnimationMSDPhysics, can be enabled using general.smoothScroll.msdPhysics.enabled. r=rhunt
MozReview-Commit-ID: fr8Q9iod5k

--HG--
extra : rebase_source : b9113d40081371872deff6aade13fd226b3e72a9
2017-09-26 20:55:35 -04:00
Markus Stange c2ed209689 Bug 1402498 - Separate out ScrollAnimationBezierPhysics and make ScrollAnimationPhysics an interface. r=rhunt
MozReview-Commit-ID: K3b8vjY5xaO

--HG--
rename : layout/generic/ScrollAnimationPhysics.cpp => layout/generic/ScrollAnimationBezierPhysics.cpp
extra : rebase_source : e112a02b0ce40438375ff48e5bd1911a8ad4da3b
2017-09-29 18:37:14 -04:00
Markus Stange c4ba4ac85d Bug 1402498 - Clean up ScrollAnimationPhysics code after the separation. r=rhunt
MozReview-Commit-ID: Ldm96zHxqWD

--HG--
extra : rebase_source : c5e18772e07425e07221541761af01c55f9db782
2017-09-22 15:08:39 -04:00
Markus Stange 488f43bd92 Bug 1402498 - Rename AsyncScrollBase to ScrollAnimationPhysics and use composition instead of inheritance. r=rhunt
MozReview-Commit-ID: 7UFf0mZsrEr

--HG--
rename : layout/generic/AsyncScrollBase.cpp => layout/generic/ScrollAnimationPhysics.cpp
rename : layout/generic/AsyncScrollBase.h => layout/generic/ScrollAnimationPhysics.h
extra : rebase_source : 66cc26ef54b31d5cfe498d8f23bc678862423aa5
2017-09-22 13:42:29 -04:00
Nicholas Nethercote dfd3b7e7aa Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.

These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.

- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>

- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
  - Count() --> Length()
  - ObjectAt() --> ElementAt()
  - AppendObject() --> AppendElement()
  - RemoveObjectAt() --> RemoveElementAt()

- ns*Hashtable<nsISupportsHashKey, ...> -->
  ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>

- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
  - This requires adding a Get() method to nsRefPtrHashtable that it lacks but
    nsInterfaceHashtable has.

- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
  - nsArrayBase::Create() --> nsTArray()
  - GetLength() --> Length()
  - do_QueryElementAt() --> operator[]

The patch also has some changes to Rust code that manipulates nsIAtom.

MozReview-Commit-ID: DykOl8aEnUJ

--HG--
extra : rebase_source : 254404e318e94b4c93ec8d4081ff0f0fda8aa7d1
2017-09-26 08:33:21 +10:00
Matt Woodrow 0b12597ec2 Bug 1402204 - Remove NS_SCROLLFRAME_INVALIDATE_CONTENTS_ON_SCROLL as it doesn't appear to be needed any more. r=mats 2017-09-20 13:12:37 +12:00
Ting-Yu Lin 2e869d8f3d Bug 1341009 - Add nsReflowStatus::IsEmpty() assertions to all nsIFrame::Reflow() methods and some reflow helpers, and remove unneeded Reset(). r=dholbert
nsReflowStatus::IsEmpty() assertions are added after DISPLAY_REFLOW in the
beginning of the Reflow().

A few Reflow() implementations have Reset() calls at the end which are left
in place by this patch (with an explanatory comment added to each). These
ending Reset()s are only needed for cases where a non-splittable frame
passes its own nsReflowStatus to a child's reflow method. Just in case the
child leaves a "not fully complete" value in the nsReflowStatus, the
non-splittable parent frame must clear out the nsReflowStatus before
returning, so that its own parent doesn't then try to split it.

MozReview-Commit-ID: 6Jj3jfMAqj4

--HG--
extra : rebase_source : e1fe6a775ad97e16a6d7cc224634ff962ccb0fbf
2017-09-13 18:00:25 +08:00
Miko Mynttinen c2f4528fa6 Bug 1399977 - Allocate some DisplayClipChains using nsDisplayListBuilder arena r=mattwoodrow
MozReview-Commit-ID: 9TB4S6G4rJR

--HG--
extra : rebase_source : ac7055146039ff9beeac1035adc323ce1d80c730
2017-09-14 11:37:15 -04:00
Ehsan Akhgari ebaa749322 Bug 1394191 - Remove unneeded nsContentList.h includes from layout; r=dholbert 2017-08-29 07:29:11 -04:00
Bobby Holley 8fb4fb3d6c Bug 1393791 - Stop unbinding native-anonymous content off a script runner. r=emilio
The failure mode in the attached crashtest is an inconsistency in the flattened
tree. Specifically, we null out mVideoControls in an nsVideoFrame, but defer
the UnbindFromTree call on that NAC element, which measn that its mParent still
points to the nsVideoFrame's mContent. Because all this stuff runs off of script
runners, and the anonymous content destroyer is not guaranteed to run before
other potential script runners, we end up running arbitrary script while the
tree mismatch exists. This script calls back into ProcessPendingRestyles, which
causes trouble.

We could build a separate deferral mechanism, but it's not clear that we actually
need to defer the unbind anymore. The deferred unbind was added in bug 489008,
which predated a lot of simplifications in layout/dom interaction.

MozReview-Commit-ID: 1JYAhiXKVJC
2017-08-27 15:29:36 -07:00
Bas Schouten a2109666bb Bug 1363922 - Part 1: Remember about the reference frame during BuildDisplayList for ScrollFrameHelper so GetScrolledRect can use it. r=mstange
MozReview-Commit-ID: 8GO6xuSH5xY
2017-08-17 15:45:30 +02:00
Botond Ballo ba4ac53b51 Bug 1340684 - Fire the scroll event before the style flush. r=mstange
This ensures that if the scroll event triggers style changes, they are
reflected on the same paint.

This is accomplished by having the refresh driver fire scroll events as
an explicit step after FlushType::Style observers and rAF callbacks, and
before the actual style flush.

MozReview-Commit-ID: 4kgauD5SgVo

--HG--
extra : rebase_source : 5f2c869c0749c1e1473797f2e202c075907a45fd
2017-08-09 21:08:38 -04:00
Bevis Tseng 6b5c329803 Bug 1390790 - Label ScrollFrameHelper::ScheduleSyntheticMouseMove. r=tnikkel 2017-08-16 17:10:36 +08:00
Matt Woodrow 781ec6ffa1 Bug 1388162 - Add a Destroy function to nsDisplayItem to use instead of manually invoking the destructor, this will allow us to recycle them in the future. r=mstange
* * *
[mq]: fix

MozReview-Commit-ID: LUXZAIL73BJ
2017-08-07 16:07:43 +12: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
Sebastian Hengst 7f85daeb2a Backed out changeset e9985564e081 (bug 1388162) for failing chrome's test_animation_performance_warning.html | preserve-3d transform. r=backout 2017-08-10 14:40:20 +02:00
Matt Woodrow 95f2e31f88 Bug 1388162 - Add a Destroy function to nsDisplayItem to use instead of manually invoking the destructor, this will allow us to recycle them in the future. r=mstange 2017-08-07 16:07:43 +12: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
Timothy Nikkel eb6908084a Bug 1356705 - Update range when an async smooth scroll is interrupted with a new scroll. r=kip
MozReview-Commit-ID: 3iU6oJz8O6O

--HG--
extra : rebase_source : 64b1394181560158036b54860bc68618393b7a43
2017-04-28 01:52:00 -04:00
Jonathan Watt bcaeb4d9e8 Bug 1379474 - Update various ReflowInput variable names to match the new type name. r=xidorn
MozReview-Commit-ID: 1pMLInpeMGY
2017-07-25 12:02:35 +01:00
Timothy Nikkel 5db4da69f6 Backed out changeset bc4c5281f2c2 (bug 1379887) for causing regressions. 2017-07-29 01:21:32 -05:00
Kartikaya Gupta 1fc595df29 Bug 1382682 - Update a param to be a const-ptr. r=mstange
MozReview-Commit-ID: 1bFolt83iaL

--HG--
extra : rebase_source : 4f9839f4accbe2b41b62a1ad36f8a9164fbae66e
2017-07-20 12:33:09 -04:00
Kartikaya Gupta 4b9801e41b Bug 1359808 - Don't do empty transactions for scroll updates if there are already pending transforms in the layer tree. r=mstange
The pending transforms must have been computed using the older scroll offset
values, which means that updating the scroll offsets without recomputing the
transforms will make them wrong. If we do an empty transaction for the scroll
offset updates, the transforms will not get computed. This patch catches this
scenario and schedules a full paint instead of the empty transaction instead.
The case where the scroll offset is modified *before* the transform is already
handled by code in nsIFrame::TryUpdateTransformOnly.

MozReview-Commit-ID: I5s5J7BS1ru

--HG--
extra : rebase_source : 63fec656440c8bee322f069a4466a311ebcd0f7d
2017-07-12 11:14:11 -04:00
Daniel Holbert 84d56b987a Bug 1380461 part 1: Clarify ancient code-comment about the helper-variables we use as AddRemoveScrollbar outparams. r=jfkthame
MozReview-Commit-ID: Fxzes2yuLHJ

--HG--
extra : rebase_source : 27207908b6bc703fb64e975316c68db0c4dfa1d1
2017-07-13 09:45:52 -07:00
Daniel Holbert ac96bfc73b Bug 1380461 part 0: Fix mis-indentation in nsXULScrollFrame::AddRemoveScrollbar. (whitespace-only) r=jfkthame
MozReview-Commit-ID: zJBPEUa4Po

--HG--
extra : rebase_source : 68506d3f0b6c6cf86a29b9c6d28b44386c029687
2017-07-13 09:45:44 -07:00
L. David Baron df36211f4f Bug 1380521 - Fix spelling of mSuppressScrollbarUpdate member variable. r=dholbert
MozReview-Commit-ID: 6i2cz2Flwtb
2017-07-12 19:37:11 -07:00
L. David Baron 57368ff4e7 Bug 1379334 - Make XULScrollFrame test for needing a vertical scrollbar because of the size of the horizontal scrollbar. r=dholbert
This fixes an incremental layout bug, where the number of times we
reflow the frame affects its layout.  This is because we make the
decisions about the vertical scrollbar before the horizontal scrollbar
(and, when making the decision, adjust mHelper.mScrollPort for the size
of the scrollbar).  Thus, in order to avoid a situation where reflowing
the scrollframe once leads us to have no vertical scrollbar, but
reflowing it a second time leads us to add that scrollbar, we need to
retest for the need for a vertical scrollbar after we add the horizontal
one.

(It's possible there are some other missing cases here, but this is the
one that (a) already existed in the code and (b) is needed to fix the
reftest failure on Windows that I got on bug 1308876, in
layout/reftests/text-overflow/xulscroll.html .

The reftest here shows the bug even without bug 1308876 (though I
confirmed that only by loading the test and reference in a nightly
build, not in the reftest harness).  I did test that, in combination
with bug 1308876, the test fails without the patch and passes with the
patch.

MozReview-Commit-ID: LhMi7LbmB6J
2017-07-12 19:37:11 -07:00
L. David Baron 5381103fc6 Bug 1379334 - Convert mis-indented code to 2-space indent, plus bracing and logical operator position fixes when reindenting. r=dholbert
MozReview-Commit-ID: ElsSNF40LZQ
2017-07-12 19:37:11 -07:00
Timothy Nikkel 96e0c1cbc6 Bug 1379887. Don't clobber the value of mWillBuildScrollableLayer when we are building a display list for event handling. r=mstange
ScrollFrameHelper::DecideScrollableLayer doesn't get the actual value of usingDisplayPort/wasUsingDisplayPort if we are not painting to the window. It then sets mWillBuildScrollableLayer to usingDisplayPort. mWillBuildScrollableLayer is the value that determines if we are active and hence an ASR, we don't want to change that between paint display lists for an event handling display list.

We then want to condition uses of mWillBuildScrollableLayer and the return value of DecideScrollableLayer on if we want painting to the window so we get the same behaviour as before when not painting to the window.
2017-07-11 15:30:04 -05:00
Botond Ballo 60d852855e Bug 1326686 - Only use the most recent refresh time as the start time of an AsyncScroll when the refresh driver is under test control. r=kip
MozReview-Commit-ID: FkyJfbaPPVl

--HG--
extra : rebase_source : 58ea615484a54b74b76f17e859136cf371b7c05f
2017-01-20 19:28:29 -05:00
Carsten "Tomcat" Book 6121e5b902 Backed out changeset 31c43a9ffa8b (bug 1379474) for bustage 2017-07-10 08:06:30 +02:00
Jonathan Watt b4ab3914e7 Bug 1379474 - Update various ReflowInput variable names to match the new type name. r=xidorn
MozReview-Commit-ID: 1pMLInpeMGY
2017-06-13 11:45:17 +01: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
Mats Palmgren 7271bffe14 Bug 1377713 - Use an AutoTArray in GetScrollPortSizeExcludingHeadersAndFooters to avoid malloc/free in most cases. r=tn
MozReview-Commit-ID: 61rJb3cFNio
2017-07-05 02:04:15 +02:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Alexis Beingessner adb013669b Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-13 11:00:10 -04:00
Nicholas Nethercote 0be77baa96 Bug 1370329 (part 1) - Clean up the profiler's RAII classes. r=mstange.
This patch does the following renamings, which increase consistency.

- GeckoProfilerInitRAII -> AutoProfilerInit
- GeckoProfilerThread{Sleep,Wake}RAII -> AutoProfilerThread{Sleep,Wake}
- GeckoProfilerTracingRAII -> AutoProfilerTracing
- AutoProfilerRegister -> AutoProfilerRegisterThread
- ProfilerStackFrameRAII -> AutoProfilerLabel
- nsJSUtils::mProfilerRAII -> nsJSUtils::mAutoProfilerLabel

Plus a few other minor ones (e.g. local variables).

The patch also add MOZ_GUARD_OBJECT macros to all the profiler RAII classes
that lack them, and does some minor whitespace reformatting.

--HG--
extra : rebase_source : 47e298fdd6f6b4af70e3357ec0b7b0580c0d0f50
2017-06-07 12:33:19 +10:00
Sebastian Hengst f3bf820bfd Backed out changeset 3d1ce85e6348 (bug 1088760) for bustage, at least on Android at layout/generic/nsPluginFrame.cpp:1612. r=backout 2017-06-13 00:30:03 +02:00
Alexis Beingessner c75211cb95 Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
MozReview-Commit-ID: K1WUIOnvazF
2017-06-12 17:32:48 -04:00
Mats Palmgren a254b64145 Bug 1364805 part 4 - Remove the now unused LayoutFrameType values from the ctors. r=jfkthame
MozReview-Commit-ID: 1RSDoc3pQXf
2017-05-26 12:11:11 +02:00
Mats Palmgren 1242172259 Bug 1364805 part 2 - Add a nsIFrame::mClass field and propagate the concrete class' value up the ctor chain. r=jfkthame
nsIFrame::mClass is of type enum class nsQueryFrame::ClassID which is
a strict subset of the nsQueryFrame::FrameIID values.  For a concrete
frame class, its FrameIID is the same numeric value as its ClassID.

MozReview-Commit-ID: 1N0AkCGo1ol
2017-05-26 12:11:11 +02:00
Botond Ballo 81d91f5996 Bug 1363219 - Try harder to pre-render offscreen portions of scrollbar thumbs. r=mstange
In bug 1359868 we started to do this, but we bounded the pre-render region for
the entire scrollbar by the widget bounds, which is not helpful for tall
scrollframes with short thumbs.

This time, we are bounding the pre-render region of the thumb only, so a small
thumb will always be completely painted.

MozReview-Commit-ID: 5LuP5Lfahdm

--HG--
extra : rebase_source : 3ab45f979160d7991aec71020cf57c9a1e57d1ce
2017-05-08 18:28:26 -04:00
Botond Ballo e509fc4068 Bug 1359868 - Try to pre-render offscreen portions of scrollbar thumbs. r=mstange
MozReview-Commit-ID: K3TPswpjh3O
2017-05-01 20:32:07 -04:00