Commit Graph

41127 Commits

Author SHA1 Message Date
Ms2ger
451c7edf83 Backout revision 308e51eae10c for build bustage.
--HG--
rename : layout/style/CSSStyleSheet.cpp => layout/style/nsCSSStyleSheet.cpp
rename : layout/style/CSSStyleSheet.h => layout/style/nsCSSStyleSheet.h
2014-06-20 13:00:08 +02:00
Ms2ger
9fb7f507f0 Bug 1022855 - Rename nsCSSStyleSheet to mozilla::CSSStyleSheet; r=heycam
--HG--
rename : layout/style/nsCSSStyleSheet.cpp => layout/style/CSSStyleSheet.cpp
rename : layout/style/nsCSSStyleSheet.h => layout/style/CSSStyleSheet.h
2014-06-20 12:32:49 +02:00
Simon Montagu
82f2df73ba Bug 789096 patch 8: use logical coordinates in nsBlockReflowState. r=jfkthame 2014-06-20 02:55:35 -07:00
Jonathan Watt
ef224664db Bug 1027645 - Eliminate all nsRenderingContext::AppUnitsPerDevPixel() callers and all non-propagating nsRenderingContext::DeviceContext() callers. r=roc 2014-06-20 07:42:30 +01:00
Timothy Nikkel
fd868e10b6 Bug 977831. Store layer event regions on thebes layer data in appunits relative to the reference frame until we finalize the thebes layer and then convert to layer coordinates. r=roc
Event regions weren't in a workable state prior to this. They were already stored relative to the reference frame, but in layer pixels.

Inside inactive layer managers the scale is always 1 regardless of the scale on the containing thebes layer (which is the scale it will actually be drawn at), and so the event regions did not take into account scale in this situation.

Storing the regions in appunits relative to the reference frame means we can just transform to the new reference frame (if it is different) when passing event regions up and out of inactive layer managers. The proper scale will be applied when we apply the event regions to the layer.
2014-06-19 22:56:36 -05:00
Brian Birtles
06035eb4a8 Bug 1025709 part 13 - Simplify ComputeSuitableScaleForAnimation; r=heycam
Now that animations and transitions are largely treated alike, we can remove
some redundant code in the processing of transform animations in
ComputeSuitableScaleForAnimation.
2014-06-20 12:39:26 +09:00
Brian Birtles
5c1ec8e2f7 Bug 1025709 part 12 - Remove ElementTransitions; r=heycam
This patch replaces all references to ElementTransitions (now that it is empty)
with references to the base class, CommonElementAnimationData. It also takes the
opportunity to tidy up some of the call sites in nsLayoutUtils since they no
longer need to differentiate between animations and transitions.
2014-06-20 12:39:26 +09:00
Brian Birtles
7463593a9c Bug 1025709 part 11 - Make ElementPropertyTransition::ValuePortionFor reuse GetComputedTimingAt; r=heycam
In order to remove redundant code and generally make transitions less special,
this patch reworks ValuePortionFor to reuse the existing code for calculation
the fractional distance of within the animation interval.
2014-06-20 12:39:26 +09:00
Brian Birtles
9d2caa34ca Bug 1025709 part 10 - Move active layer notification out of CanPerformOnCompositorThread to call sites; r=heycam
A previous patch moved CanPerformOnCompositorThread to
CommonElementAnimationData including a FIXME saying that active layer
notification should happen at call sites. Now that the code for
GetAnimationsForCompositor is common, we can do the active layer notification
there.
2014-06-20 12:39:26 +09:00
Brian Birtles
a722f517b1 Bug 1025709 part 9 - Move heavy lifting of GetAnimationsForCompositor from ElementAnimations/ElementTransitions to base class; r=heycam
This patch still leaves ElementAnimations|
ElementTransitions::GetAnimationsForCompositor as shortcuts
for the method now defined on CommonElementAnimationData.
2014-06-20 12:39:25 +09:00
Brian Birtles
67a80bcb08 Bug 1025709 part 8 - Move CanPerformOnCompositorThread from ElementAnimations/ElementTransitions to the base class; r=heycam 2014-06-20 12:39:25 +09:00
Brian Birtles
f4c56d0897 Bug 1025709 part 7 - Move HasAnimationOfProperty from ElementAnimations/ElementTransitions to base class; r=heycam
This patch moves HasAnimationOfProperty to CommonElementAnimationData. It also
takes the chance to start removing some redundancy from nsLayoutUtils
/ ActiveLayerTracker. Some of this should never have been added in the first
place and some could have been removed earlier on but while we're fixing up
HasAnimationOfProperty it seems like an appropriate time to fix up its call
sites too.

Also, since HasAnimationOrTransition actually returns an object, not a bool, we
this patch renames it to GetAnimationsOrTransitions.
2014-06-20 12:39:25 +09:00
Brian Birtles
e8729cc7fd Bug 1025709 part 6 - Reuse nsAnimationManager::EnsureStyleRuleFor; r=heycam
In a number of places in nsAnimationManager we have the following sequence of
calls:

  CommonElementAnimationData::EnsureStyleRuleFor
  ElementAnimations::GetEventsAt
  nsAnimationManager::CheckNeedsRefresh

nsAnimationManager::EnsureStyleRuleFor already does exactly that so we should
just reuse it.

At the same time we rename EnsureStyleRuleFor to UpdateStyleAndEvents since
that's a bit more accurate. It's also confusing to have two methods of the same
name (but on different objects) that don't exactly correspond in terms of
the scope of what they do.
2014-06-20 12:39:25 +09:00
Brian Birtles
95c414f550 Bug 1025709 part 5 - Replace aIsThrottled bool value with an enum; r=heycam 2014-06-20 12:39:25 +09:00
Brian Birtles
0833cb3100 Bug 1025709 part 4 - Move EnsureStyleRuleFor from ElementTransitions and ElementAnimations to CommonElementAnimationData; r=heycam
Both ElementAnimations and ElementTransitions have an EnsureStyleRuleFor method.
The ElementAnimations version is a more general of the ElementTransitions one
with the exception that the ElementTransitions version checks for finished
transitions. This patch moves the code from ElementAnimations to
CommonElementAnimationData with one minor change: adding the checks for finished
transitions. The ElementTransitions version is removed.

Since the ElementAnimations version contains a second parameter, aIsThrottled,
callers of ElementTransitions must include this extra parameter. In
a subsequent patch we add an enum for this parameter to make call sites easier
to read.

The ElementAnimations version also sets the mNeedsRefreshes member so at the
same time we move mNeedsRefreshes to CommonElementAnimationData. Furthermore,
since the ElementAnimations version which we have adopted returns early if
mNeedsRefreshes is false, this patch ensures that when we call
EnsureStyleRuleFor from ElementTransitions::WalkTransitionRule, we set
mNeedsRefreshes to true first.

Another difference to account for is that the ElementTransitions version of
EnsureStyleRuleFor *always* sets mStyleRule (even if it doesn't add anything to
it) where as the ElementAnimations version only creates the rule when necessary
so we need to add a check to ElementTransitions::WalkTransitionRule that
mStyleRule is actually set before using it.
2014-06-20 12:39:24 +09:00
Brian Birtles
55944f4c7c Bug 1025709 part 3 - Move delay calculation to GetComputedTimingAt; r=heycam
Now that an animation's delay is part of AnimationTiming--the struct we pass to
GetComputedTimingAt--it makes sense to act on it in GetComputedTimingAt.

This also happens to bring the procedures here closer to the algorithm
definitions in Web Animations.

As part of this refactoring, this patch converts ElementAnimation::IsRunningAt
to use GetComputedTiming since the previous approach no longer works now that
GetLocalTimeAt (nee ElapsedDurationAt) no longer handles delays. This also
removes duplicated logic.

Also, previously ElapsedDurationAt would assert if called on a finished
transition since TimeDuration's - operator wouldn't like the null mStartTime.
This patch adds an assertion for this case to GetLocalTimeAt to ease debugging.
2014-06-20 12:39:24 +09:00
Brian Birtles
5c00d7239f Bug 1025709 part 2 - Add IsFinished() to ElementAnimation; r=heycam
One of the main differences in handling a list of transitions vs a list of
regular animations is that when we are dealing with a list of transitions we
need to check for transitions that have finished and are about to be discarded
but need to be retained temporarily to provide correct triggering of subsequent
transitions. Such transitions are marked as "removed sentinels" and are ignored
for most operations.

This patch moves the methods for setting and checking such transitions to the
base class ElementAnimation so that we can treat animations and transitions
alike without having to downcast or do obscure checks for mStartTime.IsNull()
(which equates to checking if the animation is a "removed sentinel" but is not
particularly clear).

In the process, this patch renames said methods to Is/SetFinishedTransition
since hopefully that is a little easier to understand at a glance.
2014-06-20 12:39:24 +09:00
Brian Birtles
5bb2caab0a Bug 1025709 part 1 - Move mDelay to AnimationTiming; r=heycam
This patch is the first part in preparing the way to merge ElementTransitions
with CommonElementAnimationData (which we'll eventually rename to something
nicer).

Here we move mTiming from CommonElementAnimationData to the AnimationTiming
struct. While this is not strictly necessary in order to do the later
refactoring it makes it simpler since it:

- Divides time calculation into calculation based on dynamic play state (the
  responsibility of animation players in Web Animations terms) and static
  author-specified timing parameters (a property of animations in Web Animations
  terms).
- In future we will probably put animations on the compositor during their
  delay phase so we will want the delay to be present in the AnimationTiming
  struct then.
- Makes AnimationTiming line up with the dictionary of the same name in Web
  Animations.
2014-06-20 12:39:23 +09:00
Daniel Holbert
240f4e7f0d Bug 1024328: Remove unnecessary #includes of nsFrameManager.h. r=jwatt 2014-06-19 22:07:46 -04:00
Kyle Huey
b1e3198eed Bug 737976: Remove nsINodeInfo. r=smaug
--HG--
rename : content/base/src/nsNodeInfo.cpp => dom/base/NodeInfo.cpp
rename : content/base/public/nsINodeInfo.h => dom/base/NodeInfo.h
rename : content/base/src/nsNodeInfo.h => dom/base/NodeInfoInlines.h
2014-06-19 19:01:40 -07:00
Wes Kocher
960e3291d5 Merge m-c to inbound despite the CLOSED TREE 2014-06-19 18:29:15 -07:00
Wes Kocher
af6ad08f86 Merge inbound to m-c a=merge 2014-06-19 18:07:43 -07:00
Ed Morley
798f1d2efc Merge mozilla-central and b2g-inbound 2014-06-19 17:20:14 +01:00
Mike Habicher
7b53c87c00 Bug 990122 - move prefs used by camera to CameraPreferences, r=ehsan 2014-06-19 09:20:49 -04:00
James Kitchener
15ceabeb5c Bug 330964 - Mark tablespacing tests as failing for B2G. r=karlt 2014-06-18 06:51:00 -04:00
James Kitchener
b6938e5896 Bug 330964 - Tests for mtable row/column/framespacing. r=fredw
--HG--
rename : layout/reftests/mathml/dir-6-ref.html => layout/reftests/mathml/dir-6a-ref.html
rename : layout/reftests/mathml/dir-6.html => layout/reftests/mathml/dir-6a.html
2014-06-18 06:49:00 -04:00
James Kitchener
71979bbdd5 Bug 330964 - Add rowspacing/columnspacing/framespacing to MathML mtable. r=fredw 2014-06-18 06:57:00 -04:00
James Kitchener
ca00cc5665 Bug 330964 - Make nsTableFrame::GetCellSpacing[XY] take an argument. r=roc 2014-06-18 06:47:00 -04:00
Jonathan Kew
0d022079d1 bug 871453 - part 4 - reftests for the font-synthesis property. r=jdaggett 2014-06-19 08:09:24 +01:00
Benoit Girard
bab551040d backout d4bf4c76854e for causing mochitest-other failures 2014-06-19 00:35:54 -04:00
Andrew McCreight
715e4aad6a Bug 1011391 - Clear rule cascades in nsCSSStyleSheet's Unlink. r=bz 2014-06-18 15:33:30 -07:00
Cameron McCormack
c700a52d2a Bug 1026903 - Make nsStyleContext members private. r=dbaron 2014-06-19 13:19:39 +10:00
Cameron McCormack
ab79bfe830 Bug 1026345 - Remove the now unused nsStyleContext allocation functions. r=dbaron 2014-06-19 13:19:11 +10:00
Cameron McCormack
5a3e19e62c Bug 1026344 - Part 4: Make nsStyleCoord::Calc refcounted and introduce a non-refcounted nsStyleCoord::CalcValue. r=dbaron
This means that style structs holding computed calc() values are now able to be
stored in the rule tree.
2014-06-19 13:18:03 +10:00
Cameron McCormack
06cbf2ee81 Bug 1026344 - Part 3: Rename CalcValue to PixelCalcValue. r=dbaron 2014-06-19 13:17:56 +10:00
Cameron McCormack
916d111a71 Bug 1026344 - Part 2: Make nsStyleUnit a uint8_t-sized enum so we can use it on nsStyle{Sides,Corners}. r=dbaron 2014-06-19 13:17:10 +10:00
Cameron McCormack
94d86f7148 Bug 1026344 - Part 1: Don't use memcpy to copy style structs. r=dbaron
This is in preparation for nsStyleCoords becoming non-POD types.  The
use of memcpy is a bit of a trap when modifying the style structs, and
it likely has marginal value now that anything with an nsStyleCoord
can't be memcpy-initialized.
2014-06-19 13:17:10 +10:00
Birunthan Mohanathas
bc0233fe47 Bug 1026535 - Fix mismatched class/struct tags. r=ehsan 2014-06-18 17:57:51 -07:00
Benoit Girard
502934023e Bug 1027380 - Don't paint flash for inactive layer manager. r=mattwoodrow
--HG--
extra : rebase_source : 29238270960b22c3391c59e68d3cced748984650
2014-06-18 21:22:54 -04:00
Benoit Girard
fd2dfb49c6 Bug 1027433 - Reported throttled transaction to the profiler. r=mattwoodrow
--HG--
extra : rebase_source : 348571e878f4068247f8adfda284233b61b610b0
2014-06-18 21:21:39 -04:00
Benoit Jacob
15b208d7f3 Bug 1027251 - Fix or whitelist dangerous public destructors in layout/ - r=dbaron 2014-06-18 22:28:59 -04:00
Andrew Halberstadt
e60605718c Bug 997244 - Move emulator.py out of marionette and into mozrunner, r=wlach,mdas,jgriffin 2014-06-19 14:17:26 -04:00
Nicholas Nethercote
aaf6fb2124 Bug 1010064 - Allow memory reports to be anonymized. r=bsmedberg.
--HG--
extra : rebase_source : 5eb756b17a97e751deb0f47e909fdb35533cb23b
2014-05-20 23:06:54 -07:00
L. David Baron
cc63c0810a Bug 1026768 - Pass the restyle hint through from ProcessOneRestyle to ComputeStyleChangeFor rather than converting it to a boolean and back. r=heycam
This was originally bug 996796 patch 6, but it's also needed bug 931668,
so I'm moving it into its own bug.
2014-06-18 17:07:26 -07:00
L. David Baron
a13b5c1919 Bug 996798 - Add a typedef to make it easier to change the size of nsWrapperCache/nsINode flags. r=bzbarsky 2014-06-18 17:07:26 -07:00
Wes Kocher
e34177291e Backed out changeset 81a51de30a2a (bug 997244) for breaking b2g emulator mochitests on an otherwise CLOSED TREE 2014-06-18 14:15:48 -07:00
Susanna Bowen
58e46a1570 Bug 727125 - Update overflow areas for text frames on text-decoration change to ensure text-decoration on hover is visible. r=dbaron 2014-06-17 10:32:00 -04:00
Susanna Bowen
b85550ce86 Bug 727125 - Lazily compute LineBaselineOffset when needed so it is present after a dynamic change of 'text-decoration'. r=dbaron
This fixes the positioning of underlines set on a block or its ancestor
when drawn on children of a block that have a vertical-align !=
baseline.

The lazy computation is done all at once for all children of a block to
avoid O(N^2) searches for the line containing a frame.
2014-06-18 12:55:00 -04:00
Andrew Halberstadt
7704c45325 Bug 997244 - Pull emulator.py out of marionette and into mozrunner, r=wlach,mdas,jgriffin 2014-06-18 13:30:12 -04:00
Seth Fowler
ba4e3dddeb Bug 1023618 - Ensure that win.document.documentElement exists before using it. r=roc 2014-06-16 20:57:35 -07:00