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

7026 Коммитов

Автор SHA1 Сообщение Дата
L. David Baron b522eb1aa3 Bug 996796 patch 14 - Fix the aElementForAnimation passed from ResolveStyleWithReplacement. r=heycam 2014-08-02 19:37:45 -07:00
L. David Baron 8c67fdad83 Bug 996796 patch 13 - Fix the pseudo element information created by ResolveStyleWithReplacement. r=heycam
Note that we're not yet using this code for style contexts that have
pseudo-elements, since we don't run transitions or animations on
pseudo-elements on the compositor thread.  But bug 960465 will (with
some more work) start doing so.
2014-08-02 19:37:45 -07:00
L. David Baron a5f4dcf547 Bug 996796 patch 12 - Fix the visited rule node handling in ResolveStyleWithReplacement. r=heycam
The added test passes locally on Linux with OMT compositing and OMT
animations enabled.  However, it also passes without the patch because
the calls to FlushAnimations and FlushTransitions from
PresShell::FlushPendingNotifications cover up the damage done by bugs in
the animation-only style flush.

Unfortunately due to lack of global history on B2G and not running OMT
animations tests on any other platforms, the new test won't actually run
in automation right now.
2014-08-02 19:37:45 -07:00
L. David Baron 65f9ff29a5 Bug 996796 patch 11 - Fix the visited flag handling in ResolveStyleWithReplacement. r=heycam
This does the same thing as ReparentStyleContext (which thanks to the
patch to bug 1031149 deals with aNewParentStyleContext being null).
2014-08-02 19:37:44 -07:00
L. David Baron aa56e78e07 Bug 996796 patch 10 - Separate the rule node replacement code from the style context handling so that we can make visited handling correct. r=heycam 2014-08-02 19:37:44 -07:00
L. David Baron 807e67eeb1 Bug 996796 patch 9 - Make nsStyleSet::ResolveStyleWithReplacement handle changing between having and not having animation or transition rules, make it set IsImportantRule on rule nodes correctly, and merge the bogus ResolveStyleForRules into it. r=heycam
ResolveStyleForRules had various problems:  it failed to set importance
correctly and really only handled replacing a path in the rule tree
since it didn't handle creating important rules.  (Possibly more.)
2014-08-02 19:37:44 -07:00
L. David Baron 7e242b4acd Bug 996796 patch 8 - Pass the replacements through to ResolveStyleWithReplacement. r=heycam
This means ResolveStyleWithReplacement will replace only the rules in
the nsRestyleHint rather than always replacing both the animations rule
and the transitions rule.  (This will become even more useful later when
we add the ability to replace the style attribute rule.)
2014-08-02 19:37:44 -07:00
L. David Baron 29e1f8c013 Bug 996796 patch 5 - Move the guts of UpdateThrottledStyle into nsStyleSet, where it can be reused. r=heycam 2014-08-02 19:37:43 -07:00
L. David Baron f402ea6beb Bug 1031149 - Consistently pass correct aRelevantLinkVisited to nsStyleContext::FindChildWithRules. r=heycam
I believe this will fix some cache misses in the FindChildWithRules
lookup when restyling.  I don't think it will fix any correctness bugs
because the RelevantLinkVisited() bit will always end up set to true
anyway as the non-link descendant of a visited link style context, and
link descendants shouldn't be able to share styles with non-link
descendants due to matching rules in the UA style sheet.
2014-08-02 19:37:42 -07:00
Daniel Holbert 3c8c24351c Bug 1039826: Make changes to 'order' property trigger a repaint (even if reflow doesn't change position). r=dbaron 2014-08-01 11:13:28 -07:00
Ryan VanderMeulen 908eceaa30 Backed out 9 changesets (bug 1016184) for frequent OSX Gip timeouts.
Backed out changeset 0893f2ef4b9a (bug 1016184)
Backed out changeset 93587ce1162b (bug 1016184)
Backed out changeset a52c9d674927 (bug 1016184)
Backed out changeset ca2fd0f41a12 (bug 1016184)
Backed out changeset 84dacf014e39 (bug 1016184)
Backed out changeset 16854e321f23 (bug 1016184)
Backed out changeset 8acd5e707c83 (bug 1016184)
Backed out changeset d0513eae0c97 (bug 1016184)
Backed out changeset 0d03cd217c64 (bug 1016184)
2014-07-31 13:29:30 -04:00
Jeff Muizelaar cc643f47c6 Bug 1045251. Use the concrete type imgRequestProxy in nsStyleImage. r=seth
--HG--
extra : rebase_source : de67e22ac03d213ee54ab63693c932b4abf12ce9
2014-07-29 10:56:39 -04:00
Ting-Yu Lin 401d4812df Bug 1016184 - part 3h - Fix horizontal scroll bar appears. r=roc
The touch caret frame is initialized at (0, 0). When <html> or <body>
has dir="rtl", "margin-left: -15px" (in ua.css) makes the horizontal
scroll bar appear even if the touch caret is invisible.

To compensate this, make width, height, and margin be 0px when the touch
caret is invisible.
2014-07-28 21:40:00 +02:00
Jonathan Kew 2f49b70d25 bug 1028136 - Remove dangerous public destructor of FontFamilyList. r=jdaggett 2014-07-30 09:15:00 +01:00
Mike Hommey 5f6ba110e6 Bug 1043802 - Remove TOOLS_DIRS and TEST_TOOLS_DIRS. r=gps 2014-07-29 08:55:55 +09:00
Susanna Bowen 3f093640d6 Bug 1043706 - Wrap ruby-specific rules in ua.css in a "@supports" clause (to avoid spamming parse errors when ruby is disabled). r=dholbert 2014-07-25 15:53:00 +02:00
Cameron McCormack ad622ef4c6 Bug 1043461 - Make test_bug657143.html resilient to custom properties from the UA style sheet. r=dholbert 2014-07-26 11:01:45 +10:00
Alexandros Chronopoulos 29aaf180d6 Bug 751939 - make url( followed by EOF valid. r=dbaron 2014-07-23 00:14:16 +03:00
Cameron McCormack f46facbdcc Bug 1043713 - Expose custom property names on computed style objects with their "--" prefix. r=bzbarsky 2014-07-25 16:14:33 +10:00
L. David Baron 364d06998b Bug 996796 patch 3 - Move the knowledge of when we last updated main-thread-suppressed animation styles into the restyle manager rather than have two separate but always equal timestamps for animations and transitions. r=birtles 2014-07-24 21:35:34 -07:00
L. David Baron b7a521a812 Bug 996796 patch 1 - Perform a miniflush on both animations and transitions before processing restyles. r=birtles
This affects the correctness of transitions that take over from a
running animation.  (In the current code this can happen on a single
element; once the cascading changes in bug 960465 are complete it can
only happen via inheritance.)

This version of the patch changes to do the test using opacity rather
than transform, since testing using transforms encountered issues
related to bug 1031688:  the presence of phantom transitions due to the
interaction of the computed value rules for transforms distinguishing
between values that the interpolation rules consider identical.  (These
problems only appear after patch 24 in this bug changes the coalescing
order between a parent with animations and a child with transitions so
that the parent is handled before the child, instead of transitions
being handled before animations.)

The final two added tests fail without the patch and pass with the patch.
(With the opacity version, the third to last test also fails without the
patch, probably due to the value not having yet been sent to the layer.
This was not an issue pre-patch with the original test using transform,
though.  I haven't tested that this happened with patch 0, though, so it
might have been the issue patch 0 fixes.)
2014-07-24 21:35:33 -07:00
L. David Baron f4ad325e9a Bug 996796 patch 0 - Fix test_animations_omta_start.html so that additional tests will involve onscreen layers. r=birtles
This removes each test element when we're done with it so that each
successive test element isn't 100px lower.  This is required to keep the
third test element (added in the next patch) onscreen when running tests
on the B2G emulator (other than when running a single test at a time).
This, in turn, is required to get animations in that test properly
shipped to the compositor thread, which is required for the test to
pass.
2014-07-24 21:35:33 -07:00
Cameron McCormack c97ec4f1ac Bug 1043181 - Copy mValues and mGeneration in the nsCSSCounterStyleRule copy constructor. r=dbaron 2014-07-25 11:50:24 +10:00
L. David Baron d81472cee7 Bug 1041075 - Request longer timeout for test_value_storage.html. r=dholbert
I think this has become needed due to changes in the configuration of
the VMs on which we're running tests.

--HG--
extra : transplant_source : %83%CE%27M%CF2%0E%A9%0B%B4%9E%BC%AB%E45g%C9J%D4%17
2014-07-24 15:02:21 -07:00
William Chen fc2b3b5598 Bug 1041880 - Use GetParentElementCrossingShadowRoot() when initializing style scopes. r=heycam 2014-07-24 01:12:38 -07:00
Brian Birtles fb9a1a8fb3 Bug 1002332 - Make AnimationTimeline record the last refresh time and use that when there is no refresh driver; r=bz
A document that belongs to an iframe that is display:none as no associated pres
context from which to get a refresh driver. However, in this case
document.timeline.currentTime should still never go backwards (since document
timelines are supposed to be monotonically increasing).

This patch makes AnimationTimeline record the last value returned for the
current time so that if the document becomes display:none we can still return
the most recently used time.
2014-07-24 13:37:38 +09:00
Alexandre Poirot 7ea4dd517f Bug 1027242 - Blacklist mulet's failing tests + expose 'mulet' to ini files; fix previous bustage on a CLOSED TREE, r=ahal 2014-07-02 15:40:56 -07:00
Carsten "Tomcat" Book acae829094 merge mozilla-inbound to mozilla-central a=merge 2014-07-23 15:50:58 +02:00
Susanna Bowen 2b29530598 Bug 1021952 - Ensure that direct children of ruby elements are inline. r=bz 2014-07-22 19:08:13 -07:00
Susanna Bowen bf06af5d74 Bug 1021952 - Generate anonymous boxes to preserve proper ruby structure r=bz 2014-07-22 19:08:08 -07:00
Susanna Bowen a3e95afeef Bug 1021952 - Add ruby display values and ruby frames. r=dholbert,bz 2014-07-22 19:08:01 -07:00
Cameron McCormack f7f51e7111 Bug 1031206 - Part 2: Split out creation of font faces in nsUserFontSet. r=jdaggett 2014-07-23 15:05:50 +10:00
Cameron McCormack d134a8e4ee Bug 1031206 - Part 1: Split out creation and addition of font faces in gfxUserFontSet. r=jdaggett 2014-07-23 15:05:50 +10:00
Brian Birtles b846442afc Bug 1037316 part 2 - When updating animations, match existing animations one-by-one starting from the beginning of each list; r=dbaron
This patch changes the order in which we look for matches when updating existing
animations. Previously we would iterate through new animations in a forwards
direction but match old animations by going through the list of animations
backwards.

This patch makes us iterate through both lists in a backwards direction. That
means that if we have:

  animation: anim 100s

and later we make it

  animation: anim 100s, anim 100s

Then the new animation will be added to the *start* of the list, i.e. prepended,
and the resulting animation will not restart.
2014-07-23 10:51:12 +09:00
Brian Birtles 8e8054d839 Bug 1037316 part 1 - Return the same object when updating animations; r=dbaron
Previously when updating animations we'd generate a new list of animation
objects then try to match up animations from the existing list and copy across
state such as start times and notification flags. However, this means that from
the API we end up returning different objects.

This patch makes us maintain the same object identity when updating an existing
animation. It does this by looking for matching animations in both lists. If it
finds a match it copies the necessary information from the *new* animation to
the *existing* animation (but preserving the start time, last notification
etc.). Then, finally, it puts the *existing* animation in the list of *new*
animations and removes the corresponding *new* animation. The existing
animation is also removed from the list of existing animations so that it only
matches once.

The method used for matching is probably not intuitive but this is addressed in
a subsequent patch in this series.
2014-07-23 10:51:12 +09:00
Daniel Holbert c8994e5a15 Bug 984711 part 9: Rename file_flexbox_min_size_auto.html to test_flexbox_min_size_auto.html, now that its obsolete wrapper is gone. (no review)
--HG--
rename : layout/style/test/file_flexbox_min_size_auto.html => layout/style/test/test_flexbox_min_size_auto.html
2014-07-22 08:24:36 -07:00
Daniel Holbert 8ef16d75fb Bug 984711 part 8: Remove pref-setting mochitest wrapper for min-[size]:auto mochitest. (no review; tweaking existing test) 2014-07-22 08:24:35 -07:00
Daniel Holbert f9efd30d2e Bug 984711 part 7: Add back mochitest for min-[size]:auto. (no review; just an unbitrotted backout)
This reverts changeset edd98255e81d from bug 848539.
2014-07-22 08:24:35 -07:00
Daniel Holbert eaec3c09b3 Bug 984711 part 6: Add back special handling for min-width:auto in nsHTMLReflowState & getComputedStyle. (no review; just an unbitrotted backout)
This reverts changeset 1eae876d6c3a from bug 848539.
2014-07-22 08:24:35 -07:00
Daniel Holbert 5e5bbcdeba Bug 984711 part 4: Add back handling for nsStylePosition::mMinHeight having "eStyleUnit_Auto" in style system & general layout code. (no review; just an unbitrotted backout)
This reverts changeset 5db313632268 from bug 848539.
2014-07-22 08:24:35 -07:00
Daniel Holbert 54db21c8c7 Bug 984711 part 3: Add back handling for nsStylePosition::mMinWidth having "eStyleUnit_Auto" in style system & general layout code. (no review; just an unbitrotted backout)
This reverts changeset f8b5090d02e5 from bug 848539.
2014-07-22 08:24:34 -07:00
Daniel Holbert c254eb4d6f Bug 984711 part 2: Add back min-width:auto & min-height:auto in the parser and as default value (just computing to '0' for now). (no review; just an unbitrotted backout)
This reverts changeset e7a9e30409eb from bug 848539.
2014-07-22 08:24:34 -07:00
Jonathan Griffin 1c5d8636ac Backed out changeset 64586374a208 on a CLOSED TREE 2014-07-22 18:29:57 -07:00
Susanna Bowen 088ac60470 Bug 1038928 - Mochitests for CSS 2.1 9.7. r=bz 2014-07-21 18:28:04 -07:00
Geoff Brown 129db347c4 Bug 1041017 - Skip test_animations_omta_start.html on b2g desktop; r=trivial 2014-07-21 16:10:53 -06:00
Brian Grinstead 4d00eac785 Bug 1037519 - Allow matching pseudo-elements in inIDOMUtils.selectorMatchesElement. r=bz 2014-07-18 14:30:00 -04:00
Alexandre Poirot 98afd25e0d Bug 1027242 - Blacklist mulet's failing tests + expose 'mulet' to ini files; fix previous bustage on a CLOSED TREE, r=ahal 2014-07-02 15:40:56 -07:00
Jonathan Griffin 38f79ff899 Backout 4f6d9db92389 for bustage on a CLOSED TREE 2014-07-22 17:55:50 -07:00
Mike Hommey bc5d6801bb Bug 1041860 - Avoid setting FINAL_LIBRARY to libraries that further use a FINAL_LIBRARY. r=mshal 2014-07-23 08:37:51 +09:00
Alexandre Poirot 37506aa45c Bug 1027242 - Blacklist mulet's failing tests + expose 'mulet' to ini files. r=ahal 2014-07-02 15:40:56 -07:00
L. David Baron 759eebe6d2 Bug 1040386: Fix hopefully-harmless CSS syntax error in isOMTAWorking(). r=birtles
I noticed this in the logs of a B2G emulator mochitest run.
2014-07-18 21:22:20 -07:00
L. David Baron 374118e754 Bug 1041060: Use AllocateByObjectID/FreeByObjectID for nsInheritedStyleData and nsResetStyleData. r=heycam
This is similar to bug 1038488, which did the same for style structs.
This means the entire path from frame to style struct should be
allocated using frame IDs or object IDs.
2014-07-18 21:22:20 -07:00
Michael Ratcliffe 5191e86267 Bug 1035106 - Add new APIs to DOMUtils: colorToRGBA, isValidCSSColor & cssPropertyIsValid r=bz 2014-07-17 15:08:07 +01:00
Ahmed Kachkach 4b03d2c025 Bug 886570 - Initial integration of structured logs in mochitest; r=ahal,Ms2ger 2014-07-17 09:02:00 +02:00
Brian Birtles ef118ad7fc Bug 1038032 part 2 - Add test case for overflowing TimeDuration; r=dholbert 2014-07-18 10:31:18 +09:00
Brian Birtles 42b7639448 Bug 1038032 part 1 - Add temporary workaround to avoid overflow when calculating the active end of an animation; r=dholbert 2014-07-18 10:31:17 +09:00
Chris Lord e999475d51 Bug 1038781 - Don't reflow/repaint frame when clip changes. r=roc
If an element's existing clip changes, just update overflow areas and let
DLBI handle invalidation.
2014-07-16 13:28:50 +02:00
Brian Birtles f06a4c0c17 Bug 1037314 - Include animation-play-state in animation shorthand; r=dbaron
This patch is basically a reversal of attachment 530792 from bug 654890.
2014-07-17 10:04:56 +09:00
L. David Baron 6b85a58773 Bug 1038488 patch 3 - Use AllocateByObjectID/FreeByObjectID for style structs. r=heycam 2014-07-15 22:27:13 -07:00
L. David Baron a084fec891 Bug 1038488 patch 2 - Remove memset from the operator new of the 4 style structs that have it. r=heycam
This also moves those 4 operator new methods to be inline to match the
style of all of the others.

I audited that all the members of these structs are initialized by all
their constructors (see patch 1).
2014-07-15 22:27:12 -07:00
L. David Baron 8e7821b091 Bug 1038488 patch 1 - Explicitly initialize nsStyleMargin::mCachedMargin and nsStylePadding::mCachedPadding so that it is clear all members of nsStyleFont, nsStyleMargin, nsStylePadding, and nsStyleBorder are explicitly initialized. r=heycam
While nsMargin does 0-initialize, it's not necessarily obvious that it
does, and I think it's worth making explicit.
2014-07-15 22:27:12 -07:00
L. David Baron 76273a1316 Bug 1030604 - Use nsChangeHint_UpdateOverflow for clip-path and mask changes so we update the PreEffectsBBoxProperty and run the effect on the correct area. r=roc
The testcase is a slight simplification of dholbert's testcase 2
(attachment 8456312) in the bug.  It fails in the reftest harness
without the patch, and passes in the reftest harness with the patch.
2014-07-15 22:27:12 -07:00
Cameron McCormack fbd6b8f0f4 Bug 1039151 - Replace space-wasting use of DebugOnly<> in CSSVariableResolver with #ifdef DEBUG. r=dbaron 2014-07-16 15:24:04 +10:00
Brian Birtles 59bf2039e1 Bug 1036300 - Expose AnimationPlayer.timeline; r=bz 2014-07-16 09:02:33 +09:00
Brian Birtles a7a1177af7 Bug 1036287 part 6 - Add a GetComputedTiming shortcut that uses the current animation timeline time; r=dholbert
This patch introduces a method GetComputedTiming that calls GetComputedTimingAt
supplying the current time of the animation's timeline.

We still keep the GetComputedTimingAt static method since it is used for
off-main thread animation. Furthermore, we keep the second argument to
GetComputedTiming--the animation's timing properties--since on some occasions we
want to override those properties (ElementPropertyTransition::ValuePortionFor
does this). We could also add another overload that also supplies the
animation's timing properties but that can happen as a separate step.
2014-07-16 09:02:33 +09:00
Brian Birtles 7aff661646 Bug 1036287 part 5 - Drop aTime param from IsRunning(At) and IsCurrent(At), since they now use the current timeline time; r=dholbert 2014-07-16 09:02:33 +09:00
Brian Birtles f7c2a452ed Bug 1036287 part 4 - Make GetLocalTime(At) get the current time automatically from the timeline; r=dholbert
This patch changes ElementAnimation::GetLocalTimeAt so that instead of taking
the current time as input, it uses the animation's mTimeline member to look up
the current time of the associated timeline. As a result of this, it is possible
to remove a few instances of querying the refresh driver for the current time.
Further instances are removed in subsequent patches.

Furthermore, in order to keep the use of time sources consistent, the mStartTime
of new transitions and animations is initialized with the current time from the
animation's timeline rather than with the latest refresh driver tick.
Since this time could, in future, be null, GetLocalTime(At) is updated to check
for a null start time.

GetLocalTimeAt is also renamed to GetLocalTime in the process.
2014-07-16 09:02:32 +09:00
Brian Birtles 8a61f8ccfa Bug 1036287 part 3 - Make GetLocalTimeAt return a nullable time duration; r=dholbert
Once we support arbitrary timelines which can return null current time values,
the local time of an animation can also become null so this patch updates
ElementAnimation::GetLocalTimeAt to return a Nullable<TimeDuration>.
Doing this also allows us to pass the result of GetLocalTimeAt directly to
GetComputedTimingAt.
2014-07-16 09:02:32 +09:00
Brian Birtles a3a8900375 Bug 1036287 part 2 - Make GetComputedTimingAt take a nullable local time; r=dholbert
As part of supporting arbitrary timelines, we'd like to pass null times to the
function that calculates computed timing. Incidentally, this also provides
a means for evaluating calculating timing parameters that are independent of the
current time (currently only the active duration) without requiring a valid
time.

This patch updates the signature of ElementAnimation::GetComputedTimingAt to
take a nullable time duration.

We use the Nullable wrapper to represent null TimeDurations since, unlike,
TimeStamp, TimeDuration does not include a null state.
2014-07-16 09:02:32 +09:00
Brian Birtles 34ac24b42a Bug 1036287 part 1 - Add a null animation phase; r=dholbert
In order to support arbitrary timelines which may provide a "null" current time,
we need a suitable value to return from GetComputedTimingAt for the animation's
phase when the timeline time is null.

This patch introduces a null animation phase for this purpose.
2014-07-16 09:02:32 +09:00
Brian Birtles 4a5b988a87 Bug 1032573 part 5 - Add GetAnimationPlayers to Element; r=bz
This patch adds the WebIDL definitions and implementation of
getAnimationPlayers on Element.

It does not include the full definition of AnimationPlayer but only readonly
versions of the currentTime and startTime attributes since these are easy
to implement and enable identifying the different animations that are returned
for the sake of testing.

Web Animations defines getAnimationPlayers as only returning the animations that
are either running or will run in the future (known as "current" animations).
This will likely change since it seems desirable to be able query animations
that have finished but are applying a forwards fill. For now, however, this
patch makes us only return animations that have not finished.

This patch also removes an assertion in ElementAnimation::GetLocalTime that
would fail if called on a finished transition. This assertion is no longer
necessary since an earlier patch in this series removed the overloading of
the animation start time that meant calling this on a finished transition
was unsafe. Furthermore, this assertion, if it were not removed, would fail
if script holds onto a transition and queries its start time after it
completed.
2014-07-16 09:02:31 +09:00
Brian Birtles 9454e09015 Bug 1032573 part 2 - Add a timeline member to ElementAnimations; r=dbaron
When we expose ElementAnimation objects to script they need to have a parent
object so they can be associated with a Window.

This patch adds a pointer from an ElementAnimation to its AnimationTimeline.
2014-07-16 09:02:30 +09:00
Brian Birtles 881f90e9a2 Bug 1032573 part 1 - Don't overload start time for marking finished transitions; r=dbaron
When transitions finish, we keep them around for one additional throttle-able
tick to provide correct behavior for subsequent transitions that may be
triggered. Prior to this patch we did this by overloading the start time of the
animation and setting it to null in this case.

However, if we begin returning ElementAnimation objects to script, script can
hold on to those objects and query their start time even after they are
finished. Therefore we need another means of marking finished transitions that
doesn't clobber the start time field.

This patch introduces a new boolean member for marking such transitions.

While we're touching IsFinishedTransition we also take the chance to tidy up one
of the call sites, namely IsCurrentAt, to make the logic a little easier to
follow.
2014-07-16 09:02:29 +09:00
Bobby Holley cdd8e663e7 Bug 987678 - Stop doing all the crazy stuff in xbl-marquee. r=bz 2014-07-15 12:23:43 -07:00
Ting-Yu Lin 3b1816e239 Bug 1021527 - Fix blurry carets by using svg image. r=roc
* Replace png images with svg images for touch caret and selection
  carets.
* Fix touch caret is enlarged on high resolution device due to
  background-size was not set.
2014-07-14 23:08:00 +02:00
Gabriel Luong 9d0c3f489e Bug 591303 - Part 3: Set line and column number for all rules in nsCSSParser. r=bz 2014-07-14 15:57:54 -07:00
Birunthan Mohanathas a7d5f55774 Bug 591303 - Part 2: Add getCSSRule function to nsIDOMCSSRule. r=bz 2014-07-14 15:57:46 -07:00
Gabriel Luong c0ea3ed948 Bug 591303 - Part 1: Move mLineNumber, mColumnNumber, and mWasMatched from StyleRule to Rule. r=bz
Also, pass the line/column number through the constructor rather than through a separate function.
2014-07-14 15:57:02 -07:00
Mats Palmgren d4a41f8618 Bug 637242, patch 3 of 3: crashtest. r=dbaron 2014-07-13 13:01:44 +00:00
Mats Palmgren 6b3fa1ca1c Bug 637242, patch 2 of 3: Make nsRuleNode::Sweep nonrecursive to avoid stack exhaustion crashes. r=dbaron 2014-07-13 13:01:44 +00:00
Mats Palmgren 270cd1ba97 Bug 637242, patch 1 of 3: Fix ref-counting bug. r=dbaron 2014-07-13 13:01:43 +00:00
Carsten "Tomcat" Book ce57787693 Backed out changeset cf85693280c7 (bug 886570) frequent mochitest-3 errors on windows 2014-07-11 14:15:29 +02:00
Ahmed Kachkach 50db9012f6 Bug 886570 - Initial integration of structured logs in mochitest. r=ahal,Ms2ger 2014-07-10 13:33:00 +02:00
Boris Zbarsky 11bc3578c0 Bug 965413 part 11. Use a LoadInfo as needed for loading stylesheets. r=smaug 2014-07-10 02:56:38 -04:00
Cameron McCormack e369e9f112 Bug 1031187 - Part 2: Use family name from proxy rather than gfxMixedFontFamily when logging. r=jdaggett 2014-07-09 17:08:55 +10:00
Cameron McCormack 66e53076a0 Bug 1031199 - Followup to fix style constant typo. 2014-07-09 17:08:45 +10:00
Tom Schuster 4794be7af6 Bug 1024707 - Test. r=bz 2014-07-09 11:43:33 +02:00
Carsten "Tomcat" Book e1a52fe23e Backed out changeset 37683ae1953f (bug 1031199) for crashtest bustage on Linux Opt on a CLOSED TREE 2014-07-09 13:44:42 +02:00
Carsten "Tomcat" Book e338c2088b Backed out changeset dc4ff3a5afd1 (bug 1031187) 2014-07-09 13:44:11 +02:00
Carsten "Tomcat" Book 09a3eb0e72 Backed out changeset f213b3135312 (bug 1024707) 2014-07-09 13:18:47 +02:00
Cameron McCormack a5140bd518 Bug 1031187 - Part 2: Use family name from proxy rather than gfxMixedFontFamily when logging. r=jdaggett 2014-07-09 21:04:14 +10:00
Cameron McCormack 352c25c3b0 Bug 1031199 - Followup to fix style constant typo. 2014-07-09 21:03:19 +10:00
Tom Schuster 5220ddff89 Bug 1024707 - Test. r=bz 2014-07-09 11:43:33 +02:00
Brian Birtles d8a37d7c4d Bug 1033881 part 1 - Don't generate animations when the animation-name doesn't match; r=dbaron
When animation-name does not match a keyframes rule, we should not dispatch
animation events as per:

  "Any animation for which both a valid keyframe rule and a non-zero duration
  are defined will run and generate events; this includes animations with empty
  keyframe rules."
  http://dev.w3.org/csswg/css-animations/#events

Since bug 1004377, however, we started dispatching events in this case because
we no longer ignore animations whose set of keyframes is empty.

This patch checks for a matching keyframes rule in BuildAnimations and if one is
not found, no corresponding animation is generated.
2014-07-09 09:13:33 +09:00
Benoit Jacob 487ba5e6bf Bug 1035394 - Fix dangerous public destructors in layout - r=dbaron 2014-07-08 17:23:18 -04:00
Cameron McCormack c3fc13b59f Bug 1034803 - Treat local(serif) as an invalid value in descriptor_database.js. r=dbaron 2014-07-08 10:17:19 +10:00
Cameron McCormack ecfcc4d944 Bug 1031153 - Move unicode-range descriptor serialization to nsStyleUtil. r=dbaron 2014-07-04 11:19:33 +10:00
Robert Longson f80c37ea97 Bug 556441 - Interpolation fails for stroke-width and stroke-dashoffset when animating between unitless values & values with units. r=dbaron 2014-07-03 20:05:43 +01:00
Brian Birtles ea77abec71 Bug 1010067 - Whitespace fix to nsTransitionManager::FlushTransitions. No review.
This change was suggested in bug 1010067 comment 22 but somehow ended up in the
wrong patch when pushing.
2014-07-03 09:04:35 +09:00
Brian Birtles a71e7fd445 Bug 1031319 part 2 - Add tests for animation-name:none handling; r=dbaron 2014-07-03 09:04:31 +09:00
Brian Birtles a2d236894b Bug 1031319 part 1 - Don't generate element animations when animation-name is "none"; r=dbaron
This patch causes animations whose corresponding animation-name is "none" to be
dropped from the list of generated ElementAnimation objects. This means we avoid
generating events for these animations.
2014-07-03 09:04:16 +09:00
Brian Birtles a28f62b5ce Bug 1032014 - Remove extra call to AppendElement when generating animations; r=dbaron 2014-07-03 09:02:48 +09:00
Ms2ger c79888f908 Bug 1032118 - Remove the nsresult return value from nsMediaList::SetStyleSheet; r=dbaron
It is never checked, and only ever returns NS_OK.
2014-07-02 12:53:41 +02:00
Ms2ger 05a41fb85e Bug 1032116 - Outparamdel nsIStyleSheetLinkingElement::GetStyleSheet; r=dbaron 2014-07-02 12:53:40 +02:00
Cameron McCormack f165b1356e Bug 1031967 - Make mozilla::css::Loader cycle collected and traverse its observer array. r=bzbarsky 2014-07-02 08:37:09 +10:00
Cameron McCormack 8bf79a894b Bug 1031205 - Make gfxUserFontSet methods take already-parsed language override values. r=jdaggett 2014-06-30 14:25:21 +10:00
Cameron McCormack 364e126c76 Bug 1031199 - Disallow aWeight = 0 when calling gfxUserFontSet::AddFontFace. r=jdaggett 2014-06-30 14:25:11 +10:00
Mats Palmgren 3ffa9baecc Bug 1028460 - part 3, Change the return type for Get*SkipSides(). r=roc 2014-06-28 10:13:13 +00:00
Mats Palmgren fa241a7997 Bug 1031444 - Add missing COMPUTED_STYLE_PROP declaration for 'box-decoration-break'. r=roc 2014-06-29 13:13:29 +00:00
Phil Ringnalda 811c3783d4 Back out 5 changesets (bug 1028460, bug 1031444) for somehow breaking asmjscache/test/test_cachingBasic.html on Android 2.2
Backed out changeset 0b5918ec6521 (bug 1031444)
Backed out changeset 663ff18cd4a1 (bug 1028460)
Backed out changeset ae01b3919c8c (bug 1028460)
Backed out changeset 316c8dfeca9b (bug 1028460)
Backed out changeset e237b2c61ea2 (bug 1028460)
2014-06-28 22:01:28 -07:00
Mats Palmgren 439cf74afc Bug 1031444 - Add missing COMPUTED_STYLE_PROP declaration for 'box-decoration-break'. r=roc 2014-06-28 10:13:14 +00:00
Mats Palmgren 4e879335f7 Bug 1028460 - part 3, Change the return type for Get*SkipSides(). r=roc 2014-06-28 10:13:13 +00:00
Seth Fowler f7b120fcb7 Bug 997010 (Part 1) - Support dynamic changes to the image-orientation property. r=dbaron 2014-06-27 20:50:26 -07:00
Andrew McCreight 0bc4897b14 Backout the temp patch in bug 1011391 for not helping. r=bz
This may have also caused a spike in CC time.
2014-06-27 10:09:10 -07:00
Brian Birtles 8480c917d7 Bug 1029969 - Make compositor animation (OMTA) tests ignore floating-point differences; r=dzbarsky 2014-06-27 11:28:51 +09:00
Brian Birtles 25fb32b91e Bug 1010067 part 8 - Rename ElementData methods and members in CommonAnimationManager to ElementCollection; r=dbaron 2014-06-27 08:57:13 +09:00
Brian Birtles 19d210c918 Bug 1010067 part 7 - Rename instances of ElementAnimationCollection; r=dbaron 2014-06-27 08:57:13 +09:00
Brian Birtles d8a8a8df73 Bug 1010067 part 6 - Rename mozilla::css::CommonElementAnimationData to mozilla::ElementAnimationCollection; r=dbaron 2014-06-27 08:57:12 +09:00
Brian Birtles ed3adcf998 Bug 1010067 part 5 - Move ElementPropertyTransition to mozilla namespace; r=dbaron 2014-06-27 08:57:12 +09:00
Brian Birtles 165ce1f807 Bug 1010067 part 4 - Rename nsTransition to mozilla::StyleTransition; r=dbaron 2014-06-27 08:57:12 +09:00
Brian Birtles 45a81560cb Bug 1010067 part 3 - Rename nsAnimation to mozilla::StyleAnimation; r=dbaron 2014-06-27 08:57:11 +09:00
Andrew McCreight 24f0e69eda Bug 1029139 - Make the destructor of nsDOMCSSValueList private. r=bz 2014-06-26 09:29:06 -07:00
Andrew McCreight 71a661fbb5 Bug 1029137 - Make the destructor of nsComputedDOMStyle private. r=bz 2014-06-26 09:29:06 -07:00
Andrew McCreight cbe6fbf039 Bug 1029140 - Make the destructor of nsROCSSPrimitiveValue private. r=bz 2014-06-26 09:29:05 -07:00
Andrew McCreight bc19f68ef0 Bug 1029869, part 3 - Convert nsLayoutStylesheetCache::gStyleCache to a StaticRefPtr. r=bz 2014-06-26 09:29:05 -07:00
Andrew McCreight ee852b0083 Bug 1029869, part 2 - Make SheetLoadData::mParentData into an nsRefPtr. r=bz 2014-06-26 09:29:05 -07:00
Andrew McCreight 28ab01d5c3 Bug 1029869, part 1 - Make SheetLoadData::mLoader into an nsRefPtr. r=bz 2014-06-26 09:29:05 -07:00
Andrew McCreight 844759f440 Bug 1026033, part 2 - Make StyleRule::mImportantRule into an nsRefPtr. r=bz 2014-06-26 09:29:04 -07:00
Andrew McCreight d0c431f013 Bug 1026033, part 1 - Make StyleRule::mDOMRule into an nsRefPtr. r=bz 2014-06-26 09:29:04 -07:00
Andrew McCreight 46ae53435c Bug 1029157 - Eliminate sCachedComputedDOMStyle. r=bz 2014-06-26 09:29:04 -07:00
Jan Beich 2e22bb3467 Bug 1029927 - Unbreak non-SPS build after bug 1026302. r=birtles 2014-06-24 18:13:00 +02:00
John Schoenick 38d3a3deea Bug 870022 - Part 2 - Add ParseSourceSizeList to CSS parser for <picture sizes> grammar. r=bz 2014-06-25 11:47:46 -07:00
Jim Blandy 7e20285e70 Bug 914753: Make Emacs file variable header lines correct, or at least consistent. DONTBUILD r=ehsan
The -*- file variable lines -*- establish per-file settings that Emacs will
pick up. This patch makes the following changes to those lines (and touches
nothing else):

 - Never set the buffer's mode.

   Years ago, Emacs did not have a good JavaScript mode, so it made sense
   to use Java or C++ mode in .js files. However, Emacs has had js-mode for
   years now; it's perfectly serviceable, and is available and enabled by
   default in all major Emacs packagings.

   Selecting a mode in the -*- file variable line -*- is almost always the
   wrong thing to do anyway. It overrides Emacs's default choice, which is
   (now) reasonable; and even worse, it overrides settings the user might
   have made in their '.emacs' file for that file extension. It's only
   useful when there's something specific about that particular file that
   makes a particular mode appropriate.

 - Correctly propagate settings that establish the correct indentation
   level for this file: c-basic-offset and js2-basic-offset should be
   js-indent-level. Whatever value they're given should be preserved;
   different parts of our tree use different indentation styles.

 - We don't use tabs in Mozilla JS code. Always set indent-tabs-mode: nil.
   Remove tab-width: settings, at least in files that don't contain tab
   characters.

 - Remove js2-mode settings that belong in the user's .emacs file, like
   js2-skip-preprocessor-directives.
2014-06-24 22:12:07 -07:00
Brian Birtles f81da87711 Bug 1029370 part 3 - Add a comment explaining the relationship between ComputedTiming and GetComputedTimingAt; r=dholbert
Review for this patch granted as part of bug 1029370 comment 4 (at the end).
2014-06-25 09:42:19 +09:00
Brian Birtles 70aef15145 Bug 1029370 part 2 - Make nsTransitionManager::FlushTransitions reuse GetComputedTimingAt; r=dholbert
This patch removes some redundant calculation of timing phases in
FlushTransitions by calling GetComputedTiming and using the definitions there.
2014-06-25 09:42:19 +09:00
Brian Birtles c5a2510c5f Bug 1029370 part 1 - Move active duration calculation to GetComputedTimingAt; r=dholbert
This patch makes the active duration a property of the ComputedTiming struct and
returns this as part of calculating GetComputedTimingAt. GetComputedTimingAt was
already calling the method to calculate the ActiveDuration and the only other
callers of ActiveDuration() were also calling GetComputedTimingAt so this
doesn't make us do any unnecessary calculation.

I've left ActiveDuration as a public method on ElementAnimation for now since
it's a struct and just about everything there is public. At some point in the
future we'll probably make this more class-like to hide some details but that
can happen as a separate step. This patch does, however, move the definition of
ActiveDuration inside the .cpp file.

In tidying up GetComputedTimingAt we also replace all the references to
TimeDuration() and TimeDuration(0) with a single local variable representing
zero duration. This should be easier to read and possibly a little faster.

We don't use a function static variable since this method is called from
different threads and the initialization of function statics is not guaranteed
to be thread-safe until C++0x.
2014-06-25 09:42:19 +09:00
Brian Birtles 51cf0526d8 Bug 1028514 - Check for integer overflow when converting from floating-point number milliseconds; r=froydnj
In TimeStamp_windows.cpp and TimeStamp_darwin.cpp, in
TimeStamp::FromMilliseconds we cast the floating-point number of ticks to
a 64-bit integer before passing to TimeStamp::FromTicks(int64_t).
This means that we skip the check for integer overflow performed by
TimeStamp::FromTicks(double).

This patch simply removes that cast so that we perform overflow checking.

It also adds an assertion to ElementAnimation since this is one place where
the lack of overflow checking was producing a negative value where it should
not.
2014-06-25 09:42:18 +09:00
Daniel Holbert b18c859bba Bug 1029180: Give nsStyleContext a private destructor & MOZ_FINAL, to make it less likely to be freed by anything other than refcounting. r=heycam 2014-06-24 11:00:57 -07:00
David Major e390b7e97c Bug 576435 - Use the clamping variant of NSToCoordRound to avoid rounding nscoord_MAX. r=roc 2014-06-24 15:47:02 +12:00
Brian Birtles 4798898a62 Bug 1026315 - Remove PercentageHashKey; r=dbaron 2014-06-24 15:29:54 +09:00
Brian Birtles 6bc9caf270 Bug 1010067 part 2 - Rename nsStyleAnimation.{h,cpp} to StyleAnimationValue.{h,cpp}; r=dbaron
--HG--
rename : layout/style/nsStyleAnimation.cpp => layout/style/StyleAnimationValue.cpp
rename : layout/style/nsStyleAnimation.h => layout/style/StyleAnimationValue.h
2014-06-24 15:29:54 +09:00
Brian Birtles 65c7f861cb Bug 1010067 part 1 - Rename nsStyleAnimation::Value to mozilla::StyleAnimationValue; r=dbaron
This patch also moves the static methods defined on nsStyleAnimation so that
they are part of StyleAnimationValue class.

Renaming nsStyleAnimation.h to StyleAnimationValue.h is performed in a separate
patch to simplify the diff (since some tools may not handle file renames
elegantly).
2014-06-24 15:29:54 +09:00
Brian Birtles e7abcde95d Bug 1026302 part 5 - Make a common property dtor for CommonElementAnimationData; r=dbaron
This patch takes the two static methods ElementAnimationsPropertyDtor and
ElementTransitionsPropertyDtor and replaces them with a class static on
CommonElementAnimationData.
2014-06-24 15:29:53 +09:00
Brian Birtles d30c6f0f93 Bug 1026302 part 4 - Remove ElementAnimations; r=dbaron
This patch removes ElementAnimations and replaces all references to
ElementAnimations with references to CommonElementAnimationData.

We don't bother to rename variables like 'ea' or methods like
GetElementAnimations to correspond with the data type
(CommonElementAnimationData) since CommonElementAnimationData will soon be
renamed in bug 1010067 and we'll rename these things then.

The ElementAnimationsPropertyDtor function is renamed and merged in a subsequent
patch in this series.
2014-06-24 15:29:53 +09:00
Brian Birtles 4f5c10b649 Bug 1026302 part 3 - Move GetEventsAt to nsAnimationManager; r=dbaron
In order to unify ElementAnimations with CommonElementAnimationData we need to
find another home for GetEventsAt which is specific to queueing CSS Animation
events. For now nsAnimationManager seems an appropriate place and corresponds
more closely to the arrangement for transitions (where nsTransitionManager is
responsible for queueing the events by iterating over the list of animations).

In future we may reintroduce a subclass of animation specific to CSS Animations
that does this event queueing but for now nsAnimationManager seems to be a
suitable place.

This patch simply moves the code and replaces references to "mAnimation" with
"eEA->mAnimation". There are no functional changes.
2014-06-24 15:29:53 +09:00
Benoit Jacob e1b7dbca34 Bug 1028588 - Fix dangerous public destructors in layout/ - r=dbaron 2014-06-23 18:40:01 -04:00
Brian Birtles c455b34df0 Bug 1026323 - Add a test for a transition with a delay running on the compositor; r=dzbarsky
This patch adds a test for transitions with a delay that run on the compositor.
Currently animations (including transitions) are not sent to the compositor
until they reach the end of their delay phase introducing the possibility that
the behavior might differ for animations with or without delays.

This patch adds a simple test for a transition with a delay. It also fixes an
existing bug in the opacity test. Also, it moves the step where the "transition"
property is removed to the end of the test sequence rather than the end of the
opacity test (which previously happened to occur at the end of the test
sequence).
2014-06-23 14:10:19 +09:00
Brian Birtles fd31104744 Bug 1026302 part 2 - Move PostRestyleForAnimation to CommonElementAnimationData; r=dbaron
This patch moves PostRestyleForAnimation from ElementAnimations to the base
class CommonElementAnimationData and makes use of it within nsTransitionManager.
2014-06-23 14:10:19 +09:00
Brian Birtles 69e56c645b Bug 1026302 part 1 - Move IsForElement and PseudoElement from ElementAnimations to CommonElementAnimationData; r=dbaron
IsForElement and PseudoElement are currently only defined on ElementAnimations
but could be used for transitions. This patch moves these methods to the common
base class CommonElementAnimationData and also makes use of PseudoElement within
nsTransitionManager.
2014-06-23 14:10:18 +09:00
Brian Birtles 516d813bbb Backing out bug 1026302 for build bustage changesets 3e719e2cc1bd and 7a2b642bf77a 2014-06-23 11:26:59 +09:00
Brian Birtles d01a278fc3 Bug 1026302 part 2 - Move PostRestyleForAnimation to CommonElementAnimationData; r=dbaron
This patch moves PostRestyleForAnimation from ElementAnimations to the base
class CommonElementAnimationData and makes use of it within nsTransitionManager.
2014-06-23 10:48:01 +09:00
Brian Birtles 00e736ff46 Bug 1026302 part 1 - Move IsForElement and PseudoElement from ElementAnimations to CommonElementAnimationData; r=dbaron
IsForElement and PseudoElement are currently only defined on ElementAnimations
but could be used for transitions. This patch moves these methods to the common
base class CommonElementAnimationData and also makes use of PseudoElement within
nsTransitionManager.
2014-06-23 10:48:01 +09:00
Jonathan Watt cf11dda286 Bug 1016345 - Add memory reporting for nsHTMLCSSStyleSheet's nsDataHashtable's buffer and the buffers of its nsString keys. r=dbaron 2014-06-22 23:02:05 +01:00
Jan Beich e8a0a3bf5b Bug 1028036 - Unbreak clang build on BSD after bug 1025709, using the proper namespace declaration. r=birtles 2014-06-22 22:23:59 +02:00
Xidorn Quan 9dd8319d1b Bug 1028512 - Remove {lower,upper}-{roman,alpha} from CSS keywords. r=jfkthame 2014-06-22 13:28:51 +01:00
Ms2ger bad4ca4d29 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
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
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
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
Andrew McCreight 368491119e Bug 990160 - Cycle collect nsCSSRuleProcessor. r=bz 2014-06-19 14:36:53 -07: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 Jacob 15b208d7f3 Bug 1027251 - Fix or whitelist dangerous public destructors in layout/ - r=dbaron 2014-06-18 22:28:59 -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
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
Jonathan Watt 2586dd3cb2 Bug 1025553, part 1 - Change the names of the members of gfxMatrix to match the names of the members of Moz2D's Matrix. r=Bas 2014-06-17 18:35:51 +01:00
Josiah Bruner 0036c7d280 Bug 1021309 - Add "mac-yosemite-theme" CSS system metric. r=mstange 2014-06-05 18:02:46 -04:00
Susanna Bowen 64b0116f8b Bug 1025308 - Rename the variables associated with skipping style fixups for children element's based on parent display value. r=mats 2014-06-16 09:55:00 -04:00
Wes Kocher abf9a45351 Backed out 2 changesets (bug 727125) for reftest bustage on an otherwise CLOSED TREE
Backed out changeset 443361e2724a (bug 727125)
Backed out changeset 16c8d78df86e (bug 727125)
2014-06-16 13:34:50 -07:00
Susanna Bowen dc169c8b48 Bug 727125 - Update overflow areas for text frames on text-decoration change to ensure text-decoration on hover is visible. r=dbaron 2014-06-16 11:58:29 -07:00
Neil Deakin 5504409f46 Bug 994117, add method to check if an element has current animations, r=bbirtles 2014-06-16 14:43:04 -04:00
Xidorn Quan b0f48b5c88 Bug 1025359 - Correct -moz-tamil according to Predefined Counter Styles. r=jfkthame 2014-06-13 17:01:00 +02:00
Xidorn Quan a84079e422 Bug 985825 - Unprefix -moz-ethiopic-numeric. r=jfkthame 2014-06-13 17:37:00 +02:00
Xidorn Quan 603c17d06a Bug 982355 - Support disclosure-{open,closed} counter styles. r=jfkthame 2014-06-13 17:34:00 +02:00
Mats Palmgren e5d483a47c Bug 427928 - part 1, Treat outline:auto as outline:solid. r=roc 2014-06-14 12:48:07 +00:00
John Daggett c0051b7e8a Bug 1022481 - handle -moz-fixed in the no doc fonts case correctly. r=heycam 2014-06-13 10:32:27 +09:00
Ryan VanderMeulen 6ad0691f7e Backed out changesets d0ee7053aaf3 and c83f17cd74be (bug 727125) for B2G reftest failures.
CLOSED TREE
2014-06-12 14:45:40 -04:00
Daniel Holbert 901461ddb7 Bug 1024084: Clean up forward declarations and #includes in nsFrameManager.h and nsFrameManagerBase.h. r=jwatt 2014-06-12 10:09:31 -07:00
Susanna Bowen bfe9ba9d94 Bug 727125 - Update overflow areas for text frames on text-decoration change to ensure text-decoration on hover is visible. r=dbaron 2014-06-09 15:00:00 -04:00
Xidorn Quan 5b17a8fc75 Bug 966166 - Part 6: Tests for @counter-style. r=jfkthame, r=davidb 2014-06-11 21:14:00 -04:00
Xidorn Quan 1f715fcecd Bug 966166 - Part 5: Move computation code with minor changes. r=dbaron
In addition to moving the code, this patch also:
* changes the square character from U+25AA to U+25FE to match the spec
* changes all the generating functions from using append to using assign
* removes negative handling from CJKIdeographicToText since it is no longer used there
* fixes indentation and naming conventions
* changes buffer size in DecimalToText
2014-06-11 21:13:00 -04:00
Xidorn Quan a711bc7355 Bug 966166 - Part 4: Rewrite some builtin counter styles. r=dbaron 2014-06-11 21:12:00 -04:00