Commit Graph

4598 Commits

Author SHA1 Message Date
Boris Zbarsky
d4b3d66986 Bug 1019191 part 15. Remove now-dead DOMCI_DATA bits. r=peterv 2014-10-22 11:40:49 -04:00
Mats Palmgren
762157a2e0 Bug 1085701 - Report the allocation size to the OOM abort. r=roc 2014-10-21 15:42:24 +00:00
Kearwood (Kip) Gilbert
a103599e64 Bug 1010538 - Part 1 - Style support for scroll-behavior. r=mstange
- Implemented boilerplate to add the scroll-behavior CSS property.
- Added layout.css.scroll-behavior.property-enabled preference to
  allow the scroll-behavior CSS property to be enabled independently
  of the CSSOM-View DOM scrolling api extensions for smooth scrolling.
2014-09-15 12:29:58 -07:00
Xidorn Quan
cf8e303b70 Bug 1077718 - Switch dynamic CounterStyle objects to use arena allocation. r=mats 2014-10-16 16:10:00 -04:00
Jonathan Watt
134efbf1e5 Bug 1085167, part 2 - Get rid of nsRenderingContext's DeviceContext and any need for it to know about app-units-per-device-pixel. r=mattwoodrow
--HG--
extra : rebase_source : d8fb804f03a1cc4635d6acd7f66f5f21962de6d3
2014-10-20 10:55:49 +01:00
Brian Birtles
a9caeb7c14 Bug 1078122 part 9 - Move queuing of CSS animation events to CSSAnimationPlayer; r=dholbert
This patch moves the code for queuing CSS animation events from
nsAnimationManager to CSSAnimationPlayer. In doing so, it also moves the
mLastNotification member and associated enum values.
2014-10-20 13:55:47 +09:00
Brian Birtles
2a97ceb537 Bug 1078122 part 5 - Move CSSAnimationPlayer to nsAnimationManager; r=dholbert
This patch takes the CSSAnimationPlayer object, currently defined in
dom/animation/AnimationPlayer.{cpp,h}, and moves it to
layout/style/nsAnimationManager.{cpp,h} where the rest of the CSS
Animations-specific code lives.

At the same time it extends the scope of the mozilla namespace block in
nsAnimationManager.h to also include the AnimationEventInfo and EventArray types
since these classes, which don't have an ns* prefix, probably should be in the
mozilla namespace anyway.
2014-10-20 13:55:46 +09:00
Brian Birtles
3458ab6540 Bug 1078122 part 3 - Move animation value building down to the Animation objects; r=dholbert
This patch extracts the logic for calculating animation styles from
AnimationPlayerCollection and puts the bulk of it into the Animation objects.
Some of the initial logic surrounding the animation player state (e.g. is it
paused or not, etc.) is put into AnimationPlayer.

In future we may shift this logic even further down to the AnimationEffect
objects but currently we don't create such objects unless necessary.
2014-10-20 13:55:46 +09:00
Brian Birtles
b46fbc6e51 Bug 1078122 part 2 - Encapsulate mIsRunningOnCompositor in AnimationPlayer; r=dholbert 2014-10-20 13:55:46 +09:00
Brian Birtles
75670f2118 Bug 1078122 part 1 - Move checks for animation throttling to AnimationPlayer; r=dholbert
This patch moves code from AnimationPlayerCollection to AnimationPlayer.

However, there is one subtle change in logic involved. Previously, we would test
if the player had finished by getting the computed time of its source content
and checking if it was in the after phase or not. In this patch, however, we
simply check the play state to see if it is finished or not.

These two approaches differ in the case where an animation is paused after it
has finished. The animation phase approach will indicate the player has
finished, but the play state approach will indicate the player has paused (since
the "paused" state trumps the "finished" state). This, however, should not
produce any observable effect because when an animation is paused
mIsRunningOnCompositor will be false (we don't put paused animations on the
compositor).
2014-10-20 13:55:45 +09:00
Brian Birtles
3727776b2f Bug 1078119 - Rename AnimationTimeline/AnimationPlayer GetCurrentTimeDuration; r=bz
This patch performs the following renaming:

  AnimationPlayer::GetCurrentTime -> GetCurrentTimeAsDouble
  AnimationPlayer::GetCurrentTimeDuration -> GetCurrentTime
  AnimationTimeline::GetCurrentTime -> GetCurrentTimeAsDouble
  AnimationTimeline::GetCurrentTimeDuration -> GetCurrentTime
2014-10-20 13:55:45 +09:00
Brian Birtles
50a57c0182 Bug 1070745 part 9 - Tests for play/pause behavior; r=dholbert 2014-10-20 13:55:45 +09:00
Brian Birtles
7191337b01 Bug 1070745 part 8 - Use play/pause from nsAnimationManager; r=dholbert
This patch uses the PlayFromStyle/PauseFromStyle methods on CSSAnimationPlayer
to perform play/pause control. (This allows us to encapsulate mHoldTime and
mPaused. We will encapsulate mStartTime etc. in subsequent bugs.

The override behavior of play()/pause() with regard to animation-play-state is:
* pause()/play() override the current animation-play-state
* pause() causes the player to remain paused until play() is called regardless
  of changes to animation-play-state
(* Calling play() will override the animation-play-state but won't "stick". i.e.
   subsequently setting animation-play-state: paused will pause the animation.)

These different permutations are tested in the next patch in this series.

This interaction will probably become more complicated once we introduce
finishing behavior (since we might not want animations to restart when
setting animation-play-state: running).
2014-10-20 13:55:44 +09:00
David Zbarsky
2844b05d95 Bug 1070745 part 3 - Convert AnimationPlayer mPlayState to an mPaused bool; r=birtles
We only need to store if an animation is paused or not, hence a bool is
sufficient. Furthermore, the convenience of using the same type as the specified
style of animation-play-state will disappear once pausing behavior is wrapped up
behind Play() and Pause() methods.
2014-10-20 13:55:43 +09:00
Brian Birtles
b5cac727ee Bug 1070745 part 1 - Factor out new_div etc. to animation_utils.js; r=dholbert
We use new_div, check_events etc. in a number of animation-related mochitests
and with this bug we'll want to use them in a few more. This patch factors them
out into animation_utils.js and tidies them up a little.
2014-10-20 13:55:43 +09:00
L. David Baron
97baf5507c Bug 1083461 - Convert nsCSSValue{,Pair}List::operator== back to a static Equal method so that it can be validly called on null pointers. r=bzbarsky
--HG--
extra : transplant_source : %CD%5D%9BE%FE%DE%A4%F2%B8%CF%D7%AE%84%90%3B%E8%A0d%D7%2B
2014-10-19 23:31:39 -04:00
Bruno Peres
18da7e0c5a Bug 949651 - Serialize all pseudo-elements with the two-colon syntax, even those that allow one colon. r=dbaron 2014-10-18 17:01:58 -04:00
Rik Cabanier
57c626bf2b Bug 1077872 - Implement parsing of isolation CSS property. r=dbaron 2014-10-15 14:13:00 +02:00
Daniel Holbert
d6d86645b4 Bug 1084039: Clean up AnimationPlayerCollection::PseudoElement(). r=birtles 2014-10-16 22:14:02 -07:00
John Daggett
0e18b0145b Bug 1083599 - fixup small problem with userfont logging. r=m_kato 2014-10-17 09:15:29 +09:00
Ryan VanderMeulen
8f43c9c71d Backed out changesets 3012ee3c0083 and a5108055f652 (bug 1077872) for reftest asserts.
CLOSED TREE
2014-10-16 11:50:37 -04:00
Rik Cabanier
f7b9796a1a Bug 1077872 - Implement parsing of isolation CSS property. r=dbaron 2014-10-15 14:13:00 -04:00
Jonathan Watt
f440265515 Bug 1082483, part 2 - Convert Mozilla code to use the new Matrix4x4::PreTranslate/PreScale method names. r=Bas 2014-10-16 10:51:12 +01:00
Christoph Kerschbaumer
faccbd4747 Bug 1041180: Remove deprecated nsIChannelPolicy (r=sstamm,jduell,jst) 2014-10-15 19:11:45 -07:00
Ryan VanderMeulen
146137bfcf Backed out changeset f7e1426249f2 (bug 949651) for mochitest-5 failures. 2014-10-15 18:58:56 -04:00
Bruno Peres
989a28438a Bug 949651 - Serialize all pseudo-elements with the two-colon syntax, even those that allow one colon. r=dbaron 2014-10-15 14:50:58 -07:00
Dirk Schulze
00b2902abf Bug 1074522 - Implement ellipse()/circle() parsing and style computing. r=dbaron 2014-10-15 00:03:00 +02:00
Dirk Schulze
9277664a6f Bug 1081350 - Fix leak in clip-path computed style code. r=bz 2014-10-12 13:14:00 +02:00
Mihaita Ghiorghe
185dfb6cf6 Bug 1081013 - Removed unused parameter in AnimationPlayerCollection constructor. r=dholbert 2014-10-12 00:37:22 -07:00
Dirk Schulze
7b2da36d28 Bug 1077388 - Fix parsing/computing issue with polygon(). r=dbaron 2014-10-10 02:10:00 -04:00
Jonathan Kew
c26c3eecbe Bug 1080174 - Do not send Accept-Encoding:gzip,deflate when requesting WOFF or WOFF2 webfonts. r=mcmanus 2014-10-09 08:42:51 +01:00
Jonathan Kew
e4ddb4a006 Bug 1077312 - Clean up Accept headers on @font-face HTTP requests. r=mcmanus 2014-10-09 08:42:02 +01:00
John Daggett
6ff4a89a00 Bug 1079422 - eliminate the ptr to FontFace within @font-face rules. r=heycam 2014-10-09 16:03:56 +09:00
John Daggett
c81b96f1eb Bug 1079422 - backout changeset 7fceb8bf84d2. r=heycam 2014-10-09 16:03:28 +09:00
Eric Rahm
96050f224f Bug 806819 - Part 4: Add files that were excluded from unified builds back in. r=ehsan 2014-10-08 13:19:14 -07:00
Eric Rahm
f6bb65afb3 Bug 806819 - Part 3: Remove redundant FORCE_PR_LOG entries. r=ehsan 2014-10-08 13:17:32 -07:00
Morris Tseng
96fbe2149f Bug 1062468 - Reset transform-style when entering fullscreen mode. r=bz 2014-10-06 02:46:00 +02:00
Ehsan Akhgari
d4770c5e54 Bug 1079324 - Fix some more bad implicit constructors in layout; r=dholbert 2014-09-24 09:16:53 -04:00
Peter Van der Beken
9254096129 Bug 1078744 - Replace SetIsDOMBinding with SetIsNonDOMBinding, remove nsWrapperCache::SetIsDOMBinding. r=bz.
--HG--
extra : rebase_source : 89c476cd9436530b2df5acc903909e34188417a0
2014-10-07 11:44:49 +02:00
Wes Kocher
5d7f3c7007 Backed out 5 changesets (bug 806819) for WinXP test failures on a CLOSED TREE
Backed out changeset 009ae35b0c67 (bug 806819)
Backed out changeset 5a57f87f5061 (bug 806819)
Backed out changeset f06cd735b5b3 (bug 806819)
Backed out changeset e25a2a8d4af4 (bug 806819)
Backed out changeset 70a167982c3f (bug 806819)
2014-10-06 16:32:50 -07:00
Eric Rahm
e523216532 Bug 806819 - Part 4: Add files that were excluded from unified builds back in. r=ehsan
--HG--
extra : rebase_source : 49a3f57d94fc94702f1604175c4e206091b67197
2014-10-06 13:11:24 -07:00
Eric Rahm
baf96b6e07 Bug 806819 - Part 3: Remove redundant FORCE_PR_LOG entries. r=ehsan
--HG--
extra : rebase_source : c96eea1c12ea8c19314393f0e8b4b57a4316a61d
2014-10-06 13:08:20 -07:00
Cameron McCormack
1c9e875ae3 Bug 1076803 - Disable subtest 18 in test_font_loading_api.html for intermittent timeouts. r=philor 2014-10-06 10:17:06 +11:00
Cameron McCormack
fbde91a62d Bug 1077746 - Move FontFace pointer from nsCSSFontFaceRule to a table on FontFaceSet. r=jdaggett 2014-10-06 15:29:35 +11:00
Trevor Saunders
8319244622 no bug - fix nullptr to bool conversion in FontFaceSet.cpp r=themaid 2014-10-04 11:06:21 -04:00
Jonathan Kew
1b4072d000 Bug 1064737 pt 2 - Support for WOFF2 as a webfont format. r=jdaggett 2014-10-04 11:36:05 +01:00
Ryan VanderMeulen
87ff7c3868 Backed out changeset cb3fd4a4b7c5 (bug 771043) for Android mochitest-8 failures.
CLOSED TREE
2014-10-03 15:26:06 -04:00
Boris Zbarsky
502afc718e Bug 771043. Move MediaQueryList tracking from the prescontext to the document, so they will correctly outlive prescontext changes. r=dbaron 2014-10-03 14:15:25 -04:00
Max Vujovic
bcb10ff796 Bug 913990 - Test 'feed:' filter URL as crashtest instead of computed style test. r=dbaron 2014-10-03 10:06:07 -07:00
Ed Morley
f34acba2a8 Backed out changeset a2192165100c (bug 1041180) for xpcshell failures; CLOSED TREE 2014-10-03 10:12:53 +01:00
Christoph Kerschbaumer
0bacef12a1 Bug 1041180: Remove deprecated nsIChannelPolicy (r=sstamm,jduell,jst) 2014-10-02 23:34:30 -07:00
L. David Baron
25df7c71fc Bug 1075137 patch 6 - Convert remaining IsProcessingAnimationStyleChange calls to call the method on the RestyleManager. r=birtles 2014-10-02 21:53:24 -07:00
L. David Baron
14a1bf93dc Bug 1075137 patch 4 - Convert callers from IsProcessingRestyles/IsProcessingAnimationStyleChange to SkipAnimationRules/PostAnimationRestyles. r=birtles 2014-10-02 21:53:24 -07:00
L. David Baron
288801f4fa Bug 1075137 patch 3 - Add PresContext() method to nsRuleWalker. r=birtles 2014-10-02 21:53:23 -07:00
L. David Baron
5e24ca3286 Bug 1075082 patch 2 - Add assertion in destructor of style contexts that should have been destroyed earlier. r=birtles 2014-10-02 21:53:23 -07:00
L. David Baron
b5edb04125 Bug 1075082 patch 1 - Add a helper function for the root of the rule tree. r=birtles 2014-10-02 21:53:22 -07:00
Xidorn Quan
a8aeeace85 Bug 1075336 - Fix lifetime management of CounterStyle. r=dbaron
--HG--
extra : rebase_source : c9fe6b023024c11147372cd4a9d7f25fdfaabed8
2014-10-02 14:29:04 -04:00
David Zbarsky
7546b0c638 Bug 1067701 - Implement Animation.target; r=birtles, r=bz 2014-10-02 15:14:15 +09:00
Brian Birtles
6f723f8f19 Bug 1046055 part 3 - Add AnimationPlayerCollection::HasCurrentAnimationsForProperty; r=dbaron
This patch adds another method to AnimationPlayerCollection alongside
HasCurrentAnimations that returns true if there is a player in the collection
with current source content that targets the specified property.

At the same time it also makes the original HasCurrentAnimations a const method.
2014-10-02 15:14:13 +09:00
Brian Birtles
2349318ce3 Bug 1046055 part 2 - Rename AnimationPlayer::IsCurrent to HasCurrentSource; r=dbaron
It's not the player that's "current" (a Web Animations term for an animation
that hasn't yet finished), but its source content, if any. This patch renames
the method on AnimationPlayer accordingly.

At the same time this patch moves the method to the header file since it's
quite simple and could possibly benefit from inlining.
2014-10-02 15:14:13 +09:00
Brian Birtles
5bc3dbc321 Bug 1074651 - Detect integer overflow in BaseTimeDuration::TicksFromMilliseconds; r=bz 2014-10-02 15:14:12 +09:00
Boris Zbarsky
7158f29c71 Bug 1075617 followup to fix crash when rule is null. 2014-10-02 02:06:39 -04:00
Boris Zbarsky
34de660675 Bug 1075617. Log the correct file/line for the @font-face rule for font errors. r=jfkthame 2014-10-02 00:23:53 -04:00
Cameron McCormack
59693e845e Bug 1028497 - Part 27: Rename some things. r=jdaggett 2014-10-02 12:32:10 +10:00
Cameron McCormack
a407bc6d95 Bug 1028497 - Part 26: Tests. r=jdaggett 2014-10-02 12:32:09 +10:00
Cameron McCormack
86a29bc786 Bug 1028497 - Part 25: Support loading of fonts from ArrayBuffer{,View}s. r=bzbarsky,jdaggett 2014-10-02 12:32:09 +10:00
Cameron McCormack
df92baa4c2 Bug 1028497 - Part 24: Implement FontFaceSet.{ready,status} and dispatch events. r=jdaggett,bzbarsky 2014-10-02 12:32:09 +10:00
Cameron McCormack
3b650df41c Bug 1028497 - Part 23: Implement FontFaceSet.{add,clear,delete,has}. r=jdaggett
Implementing Add, Delete and Clear involves shuffling FontFace objects
between mOtherFaces and mUnavailableFaces.
2014-10-02 12:32:09 +10:00
Cameron McCormack
4c1b32886a Bug 1028497 - Part 22: Make FontFace.load() work for unconnected FontFace objects. r=jdaggett
The same DoLoad() call works with both CSS-connected and unconnected
FontFaces.
2014-10-02 12:32:09 +10:00
Cameron McCormack
cf813511c5 Bug 1028497 - Part 21: Implement the FontFace constructor's parsing of descriptors. r=bzbarsky,jdaggett
This implements the bulk of the FontFace JS constructor, which parses
the descriptors passed in. We need a notion now of whether a FontFace is
"initialized", since the spec requires us to go through the event loop
before parsing the 'src' descriptor. So a couple of places now have to
check whether the FontFace is fully initialized, and we have a method to
inform the FontFaceSet when a FontFace becomes initialized, in case we
added it to the FontFaceSet before it was initialized (easy to do with
|document.fonts.add(new FontFace(...))|.
2014-10-02 12:32:09 +10:00
Cameron McCormack
0142b816a6 Bug 1028497 - Part 20: Add storage for unconnected FontFace objects and create user font entries for them. r=jdaggett,bzbarsky
We add a third array on FontFaceSet, mOtherFaces, which stores
unconnected FontFace objects that have been added to the FontFaceSet. We
reflect them in the indexed properties and also create user font entries
for them.

Part 23 will actually allow us to add some of these FontFaces to
mOtherFaces.
2014-10-02 12:32:08 +10:00
Cameron McCormack
4ddb800587 Bug 1028497 - Part 19: Support disconnecting FontFaces that reflect @font-face rules. r=jdaggett,bzbarsky
This adds support for a CSS-connected FontFace to be disconnected from
its rule. This causes it to get its own copy of the descriptors on the
nsCSSFontFaceStyleDecl, and for the pointers between the FontFace and
the nsCSSFontFaceRule to be nulled out.

We start tracking now whether a given FontFace is in the FontFaceSet
(in the sense that it will appear on the DOM FontFaceSet object if we
inspect it with script). All FontFace objects created though, whether
they are currently "in" the FontFaceSet or not, are still tracked by the
FontFaceSet. We use the new mUnavailableFaces array on the FontFaceSet
for that.

We need to track these FontFaces that aren't in the FontFaceSet as
that's where we store their user font entry -- important if we call
load() on a FontFace before adding it to the FontFaceSet.
2014-10-02 12:32:08 +10:00
Cameron McCormack
fccff046d0 Bug 1028497 - Part 18: Create user font entries from FontFaces rather than nsCSSFontFaceRules. r=jdaggett
This changes InsertRule, which looked at the descriptors on an
nsCSSFontFaceRule to create a user font entry and add it to a family,
into InsertConnectedFontFace, which can do the same but for the FontFace
that reflects the rule.
2014-10-02 12:32:08 +10:00
Cameron McCormack
563288238a Bug 1028497 - Part 17: Factor out FontFace family-name getting. r=jdaggett 2014-10-02 12:32:08 +10:00
Cameron McCormack
31eedc22b4 Bug 1028497 - Part 15.1: Store user font entries in FontFace objects. r=jdaggett 2014-10-02 12:32:08 +10:00
Cameron McCormack
d42d427d94 Bug 1028497 - Part 15: Store FontFace objects on the FontFaceSet rather than nsCSSFontFaceRules. r=jdaggett,bzbarsky
Here we change FontFaceSet's records array to associate gfxUserFontEntry
pointers with FontFace pointers, rather than with nsCSSFontFaceRule
pointers.  This will make it more uniform to handle both CSS-connected
and unconnected FontFace objects when rebuilding the user font entries
under UpdateRules.
2014-10-02 12:32:07 +10:00
Cameron McCormack
05b2c9ef9c Bug 1028497 - Part 14: Rename some methods to talk about UserFontEntry instead of FontFace. r=jdaggett
How that we have a class named "FontFace", it's a bit confusing for some
of the gfxUserFontSet methods to have "FontFace" in their names, so I'm
renaming them to mention "UserFontEntry" instead.
2014-10-02 12:32:07 +10:00
Cameron McCormack
21a470ab25 Bug 1028497 - Part 13: Implement FontFace.load(). r=jdaggett 2014-10-02 12:32:07 +10:00
Cameron McCormack
c82125e2b6 Bug 1028497 - Part 12: Implement FontFace.loaded. r=jdaggett,bzbarsky 2014-10-02 12:32:07 +10:00
Cameron McCormack
b5e3edf931 Bug 1028497 - Part 11: Implement FontFace descriptor setters. r=jdaggett
These set the descriptors, but don't cause anything to update, just
like setting descriptors on an @font-face rule's style declaration
doesn't do anything yet.
2014-10-02 12:32:07 +10:00
Cameron McCormack
a054426121 Bug 1028497 - Part 10: Implement FontFace descriptor getters. r=jdaggett
We add an mDescriptors that will be used to store the descriptor values
of an unconnected FontFace object.  For CSS-connected FontFace objects,
the descriptors are stored in the nsCSSFontFaceRule::mDecl.mDescriptors.
(Both of these use the same type, though, CSSFontFaceDescriptors.)

Ideally we could have the descriptors always stored on the FontFace,
and for the nsCSSFontFaceStyleDecl go and fetch them from the FontFace,
but it turned out to be impossible to ensure that a FontFace could be
created whenever a nsCSSFontFaceStyleDecl was cloned, since it needs
access to the window object to create the FontFace's promise objects!
2014-10-02 12:32:07 +10:00
Cameron McCormack
1449ebdb0a Bug 1028497 - Part 9: Implement FontFace.status. r=jdaggett
We make gfxUserFontEntry::SetLoadState virtual so that we can hook into
changes and update FontFace::mStatus.  We can't just reflect the
gfxUserFontEntry's value in FontFace::Status() since the spec has
requirements about when exactly the status is set.
2014-10-02 12:32:06 +10:00
Cameron McCormack
407073516d Bug 1028497 - Part 8: Implement Length and array access on FontFaceSet. r=jfkthame
This is a temporary measure until we support iterators on the
FontFaceSet; the spec does not expose FontFaces as indexed properties on
the FontFaceSet.
2014-10-02 12:32:06 +10:00
Cameron McCormack
3691030343 Bug 1028497 - Part 7: Add ability to create a FontFace for a @font-face rule; store it on the nsCSSFontFaceRule. r=jdaggett,bzbarsky
Every nsCSSFontFaceRule that is used will get a FontFace object to
reflect it in the FontFaceSet.  Here we add storage on the
nsCSSFontFaceRule for its FontFace, although it will be the
FontFaceSet's responsibility to set it.  We also add a static
constructor function on FontFace to create one that reflects a rule.
2014-10-02 12:32:06 +10:00
Cameron McCormack
7b8f969720 Bug 1028497 - Part 6: Have a FontFace::Entry class extending gfxUserFontEntry that can inform the FontFaceSet about loading. r=jdaggett
We can't make FontFace inherit from gfxUserFontEntry, since the former
is cycle collected.  So instead, we have a small class that inherits
from it that will override its virtual methods and forward things on to
the FontFace object.

We make gfxUserFontSet::CreateFontFace virtual so we can override it to
produce instances of our gfxUserFontEntry subclass.
2014-10-02 12:32:06 +10:00
Cameron McCormack
1ab9074459 Bug 1028497 - Part 4: Move the nsUserFontSet object into FontFaceSet. r=jdaggett
This (a) moves ownership of the gfxUserFontSet into FontFaceSet, (b) moves
nearly all of the functionality of nsUserFontSet into FontFaceSet, and (c)
adds a class that inherits from gfxUserFontSet so that we can override some
of its virtual functions and delegate them to the FontFaceSet.
2014-10-02 12:32:05 +10:00
Cameron McCormack
57b587aadd Bug 1028497 - Part 3: Add skeleton implementations of CSSFontFaceLoadEvent, FontFace, FontFaceSet and FontFaceSource. r=jdaggett 2014-10-02 12:32:05 +10:00
Cameron McCormack
f449c11e35 Bug 1072724 - Support showing more information about style structs in restyle logs. r=dbaron
The MOZ_DEBUG_RESTYLE_STRUCTS environment variable can be set to a comma-
separated list of style struct names.  When restyle logging is enabled,
this will cause the style context tree -- showing cached style struct
pointers for those structs specified -- to be logged before each
individual restyle is processed.  It will also show the struct pointer
values involved when swapping structs between style contexts.

For example, set MOZ_DEBUG_RESTYLE_STRUCTS=Font,UserInterface to show
the cached nsStyleFont and nsStyleUserInterface pointers on the style
contexts involved in the restyle process.
2014-10-01 09:13:57 +10:00
Jonathan Kew
840d8b0fd5 Bug 1065002 pt 2 - Add an orientation field to nsFontMetrics. r=jdaggett 2014-09-30 07:38:35 +01:00
Jonathan Kew
9407713a2b Bug 1065002 pt 1.3 - Add an Orientation parameter to gfxFont::GetMetrics and dispatch to horizontal or vertical as needed. r=jdaggett 2014-09-30 07:38:26 +01:00
Robert Longson
88bb2519fb Bug 1073924 - Hovering over links in SVG does not cause cursor to change. r=jwatt 2014-09-29 09:20:22 +01:00
Dirk Schulze
92372d8ff6 Bug 1072894 - Implement polygon() parsing for clip-path. r=heycam 2014-09-28 01:56:00 +02:00
Xidorn Quan
4e5e3db472 Bug 966168 - Implement symbols() CSS function. r=dbaron 2014-09-25 02:19:00 +02:00
Phil Ringnalda
dd7ebaded4 Back out 693507b38116 (bug 1041180) since it doesn't like compiling without its friend
CLOSED TREE
2014-09-25 21:18:01 -07:00
Christoph Kerschbaumer
0de2d98100 Bug 1041180: Remove deprecated nsIChannelPolicy (r=sstamm,jduell,jst) 2014-09-25 16:10:28 -07:00
Carsten "Tomcat" Book
f3c13bbb4e Backed out changeset d53b25dcf2d7 (bug 966168) for causing bustage 2014-09-25 09:40:40 +02:00
Xidorn Quan
7d95f8bd04 Bug 966168 - Implement symbols() CSS function. r=dbaron 2014-09-24 15:32:00 +02:00
Cameron McCormack
40fb431145 Bug 979133 - Add facility to log the restyle process. r=dbaron
Set the MOZ_DEBUG_RESTYLE environment variable and every restyle will have
detailed logging printed to stderr. By default, restyles for animations are
not logged; you can include them by also setting MOZ_DEBUG_RESTYLE_ANIMATIONS.

If you wish to limit restyle logging to a particular change, you can call
nsPresContext::StartRestyleLogging() and nsPresContext::StopRestyleLogging()
at appropriate points. (You might want to add a couple of helper methods
temporarily on nsIDocument and then expose them to your page with Web IDL
to make them easier to call.) You do not need to have set MOZ_DEBUG_RESTYLE
for this to work.
2014-09-25 15:45:36 +10:00
Brian Birtles
6673d589fa Bug 1039924 part 6 - Use StickyTimeDuration for timing calculations; r=dholbert
This patch takes the StickyTimeDuration defined in the previous patch and
uses it within the calculation of animation timing for parameters that are
expected to be +/- Forever.
2014-09-25 14:25:50 +09:00
Phil Ringnalda
14f9d99fc1 Back out c0c410aed86f (bug 979133) for -wError bustage
CLOSED TREE
2014-09-24 21:06:22 -07:00
John Daggett
6fb8e38803 Bug 998869 part 5 - lazily load userfonts (non-linux). r=jfkthame 2014-09-25 12:16:54 +09:00
John Daggett
ec86ee2a35 Bug 998869 part 3 - rename userfont class methods. r=heycam 2014-09-25 12:16:53 +09:00
John Daggett
8d40c31973 Bug 998869 part 2 - switch to GetFontAt(0) to GetFirstValidFont(). r=jfkthame 2014-09-25 12:16:53 +09:00
Cameron McCormack
3483fb3f51 Bug 979133 - Add facility to log the restyle process. r=dbaron
Set the MOZ_DEBUG_RESTYLE environment variable and every restyle will have
detailed logging printed to stderr.  By default, restyles for animations are
not logged; you can include them by also setting MOZ_DEBUG_RESTYLE_ANIMATIONS.

If you wish to limit restyle logging to a particular change, you can call
nsPresContext::StartRestyleLogging() and nsPresContext::StopRestyleLogging()
at appropriate points.  (You might want to add a couple of helper methods
temporarily on nsIDocument and then expose them to your page with Web IDL
to make them easier to call.)  You do not need to have set MOZ_DEBUG_RESTYLE
for this to work.
2014-09-25 13:13:14 +10:00
Cameron McCormack
e37d13c897 Bug 1070316 - Factor out descriptor storage from nsCSSFontFaceStyleDecl. r=dbaron 2014-09-25 09:25:40 +10:00
Rik Cabanier
3d7133f4e1 Bug 1072100 - mix-blend-mode doesn't work when set in JS. r=dbaron 2014-09-24 09:48:00 -04:00
Carsten "Tomcat" Book
bb6b27d528 Backed out changeset 4bb508b6f0c5 (bug 1041180) for XPCshell test failures 2014-09-24 13:13:20 +02:00
Christoph Kerschbaumer
72c6a44018 Bug 1041180: Remove deprecated nsIChannelPolicy (r=sstamm,jduell,jst) 2014-09-24 01:01:07 -07:00
Tim Nguyen
1a26e37638 Bug 1070657 - Simplify input[type=range] pseudo element CSS. r=dholbert 2014-09-23 11:37:00 +02:00
Cameron McCormack
0fe3c039e0 Bug 1070260 - Add public nsCSSParser function for parsing @font-face descriptors. r=jdaggett 2014-09-24 15:49:02 +10:00
Wes Kocher
0300f6d4af Backed out 2 changesets (bug 1041180) for build bustage on a CLOSED TREE
Backed out changeset 1cfb645267a4 (bug 1041180)
Backed out changeset afc9903ff28f (bug 1041180)
2014-09-23 16:26:49 -07:00
Christoph Kerschbaumer
5453719121 Bug 1041180: Remove deprecated nsIChannelPolicy (r=sstamm,jduell,jst) 2014-09-23 09:46:54 -07:00
Daniel Holbert
1cc5671011 Bug 1066089: add crashtest. (test-only) 2014-09-23 14:12:54 -07:00
Christoph Kerschbaumer
58b0ee2e6c Bug 1038756: Callsites creating a channel in /layout/style/ (r=dbaron) 2014-09-21 09:41:26 -07:00
Xidorn Quan
7d3a54f5b0 Bug 1069716 - Fix deficient CalcDifference of nsStyleList. r=heycam 2014-09-20 03:43:00 +02:00
Cameron McCormack
a2eb916c20 Bug 1069761 - Move AppendSerializedFontSrc to nsStyleUtil. r=jdaggett 2014-09-22 10:32:58 +10:00
Boris Zbarsky
0e72d84ed9 Bug 958887 part 4. Generate property accessors on the CSS2Properties interface for the dashed-named CSS properties and float that use their actual property names. r=peterv 2014-09-19 22:58:27 -04:00
Cameron McCormack
9fdb2d1e99 Bug 1069065 - Cycle collect ImportRule. r=bzbarsky 2014-09-19 11:12:31 +10:00
Markus Stange
31a78ec715 Bug 944836 - Add CSS property -moz-window-dragging: drag | no-drag. r=dbaron 2014-09-18 10:52:25 +02:00
Daniel Holbert
883faaa78e Bug 1063775, part 2: Document nsCSSValue*List::Clone() as being infallible, and remove null-checks on its result. r=dbaron 2014-09-17 22:04:20 -07:00
Daniel Holbert
0932ccb58a Bug 1063775, part 1: Remove unnecessary null-checks after 'new' in StyleAnimationValue.cpp. r=dbaron 2014-09-17 22:04:17 -07:00
Daniel Holbert
392a8ec031 Bug 1065766 followup: add whitespace between @supports and open-paren, to address review comment. DONTBUILD because whitespace-only 2014-09-17 09:26:22 -07:00
Daniel Holbert
a2631eee53 Bug 1065766: Add UA stylesheet rule to preserve <video> centering-by-default behavior, using "object-fit: contain". r=heycam 2014-09-16 23:19:59 -07:00
Daniel Holbert
af148676ec Bug 1067634: Wrap "will-change" decl in @supports rule, to prevent browser console spam while it's disabled by default. r=heycam 2014-09-16 23:19:58 -07:00
Daniel Holbert
23d30ae6d3 Bug 1066089: Clear dependent data from CustomCounterStyle when it gets dropped from table. f=xidorn r=dbaron 2014-09-16 15:05:04 -07:00
Daniel Holbert
1c392baed1 (no bug) Tweak a comment about eContain & eCover to explicitly mention their specified-style equivalents, for better mxr searchability. comment-only, DONTBUILD 2014-09-16 10:55:13 -07:00
Jonathan Kew
79f0e0881f bug 1057329 - update the values of text-orientation to match current css-writing-modes draft (omitting use-glyph-orientation and [for now] sideways and sideways-left). r=jdaggett 2014-09-16 11:12:00 +01:00
Cameron McCormack
9b086dd079 Bug 1065868 - Make nsStyleMargin::MaxDifference return the right bits. r=dbaron 2014-09-16 16:54:33 +10:00
Gijs Kruitbosch
aa2496c90a Bug 1044595 - fix default/active button text on OS X 10.10, r=mstange,jaws
--HG--
extra : rebase_source : c558491822fc158d44a127cfd5014bd5338d05f1
2014-09-12 00:31:15 +01:00
L. David Baron
be858c5567 Bug 575675 - Remove assertion about aRelevantLinkVisited that isn't needed, and assumes that all link elements are styled with a style sheet that has :visited rules. r=bzbarsky 2014-09-13 06:17:37 -07:00
L. David Baron
9e53a17632 Bug 977991 patch 6 - Use the faster eRestyle_StyleAttribute path for style attribute changes. r=birtles 2014-09-13 06:17:37 -07:00
L. David Baron
3357a00e3a Bug 977991 patch 5 - Add eRestyle_ChangeAnimationPhase to switch between the with-animation and without-animation styles. r=birtles
This is an additional bit on nsRestyleHint that says that the restyling
operation should also perform all the work needed to switch between
style-without-animation and style-with-animation (based on
nsPresContext::IsProcessingAnimationStyleChange).  These concepts will
go away in bug 960465.

Note that we don't want this behavior for the animation-only style
update code (bug 996796, etc.), and I wanted to make this explicit so
that it was clear when it was happening, and so that it was clear what
code should be removed when we git rid of it.

This is the workaround needed to land bug 977991 prior to bug 960465.
(I think there's also a minor dependency in the other direction, so we
need a workaround one way or the other.)

Note that this depends on bug 1057231.
2014-09-13 06:17:37 -07:00
L. David Baron
5e262a47d8 Bug 977991 patch 3 - Add ability for RuleNodeWithReplacement to replace the style attribute rule and its important rule. r=birtles
This allows posting a restyle that says that only the rule(s) from the
StyleAttrSheet cascade level will be replaced, which avoids running
selector matching.

Part 4 will ensure that we only invoke this code for element styles (and
not pseudo-element or anonymous box styles).  Despite that, I prefer
having the runtime check here as well given that it's a very simple way
to ensure we don't do something silly that might have security
implications.
2014-09-13 06:17:36 -07:00
L. David Baron
b4d8a65955 Bug 977991 patch 2 - Add mCheckForImportantRules to the information nsStyleSet::RuleNodeWithReplacement keeps about cascade levels. r=birtles
This is needed to support doing replacements of levels that can contain
important rules, which will happen in patch 3.
2014-09-13 06:17:36 -07:00
L. David Baron
133a7fac65 Bug 977991 patch 1 - Expose variant of RulesMatching on nsHTMLCSSStyleSheet that is less work to call. r=birtles
This allows nsStyleSet::RuleNodeWithReplacement to call it without
constructing an entire (and unnecessary) ElementRuleProcessorData, which
will happen in patch 3.
2014-09-13 06:17:36 -07:00
L. David Baron
e5f6879ca0 Bug 1058346 patch 2 - Add eRestyle_SVGAttrAnimations and support it in nsStyleSet::RuleNodeWithReplacement. r=birtles
This allows posting a restyle that says that only the rule(s) from the
SVGAttrAnimationSheet cascade level will be replaced, which avoids running
selector matching.

This is needed to land bug 977991 prior to landing bug 960465, since
that requires replacing all levels that contain animations.

(I'll rename this to match the name determined in bug 1057231.)
2014-09-13 06:17:35 -07:00
L. David Baron
755d0056e6 Bug 1058346 patch 1 - Expose a simpler variant of RulesMatching from SVGAttrAnimationRuleProcessor. r=birtles
This allows nsStyleSet::RuleNodeWithReplacement to call it without
constructing an entire (and unnecessary) ElementRuleProcessorData, which
will happen in patch 2.
2014-09-13 06:17:35 -07:00
L. David Baron
f5ec865c19 Bug 1057231 patch 4 - Move SVG Attribute Animation rules from the pres hint level to their own cascade level. r=dholbert
This is only a very slight reordering of their position in the cascade,
since they were previously walked at the end of
nsSVGElement::WalkContentStyleRules, which was called near the end of
nsHTMLStyleSheet::RulesMatching.  So the only change should be that they
now take priority over the xml:lang rule added by nsHTMLStyleSheet, a
rule with which they do not interact.
2014-09-13 06:17:35 -07:00
L. David Baron
877da49af1 Bug 1057231 patch 3 - Add new cascade level for rules from SMIL Animation of SVG attributes to the style set. r=dholbert
I will fix the indentation of gCascadeLevels in bug 977991 patch 2,
which adds a member to each element of the array.

Note that this bumps the maximum sheetType from 8 to 9 (and number of
them from 9 to 10), which does not require updating
NS_RULE_NODE_LEVEL_MASK, since NS_RULE_NODE_LEVEL_MASK currently has 4
bits and allows a maximum of 15.
2014-09-13 06:17:35 -07:00
L. David Baron
9842f42ffb Bug 1057231 patch 1 - Add a rule processor class for rules from SMIL Animation of SVG attributes. r=dholbert
This patch series (to move SVG Animation rules to their own level of the
cascade) is needed so that they can participate in the mechanism for
updating only animation styles to the present time without touching any
other styles.

In theory, this should have been done as part of 996796 or even as part
of prior work on off main thread animations, except that it doesn't seem
possible to have SVG Animations and CSS Transitions interacting on the
same element and have that element's style out of date, which means it
wasn't necessary for the existing code to update only animation styles.

However, bug 960465 will use this similar mechanism as the new mechanism
for making sure transitions start in a reasonable way (replacing the
mechanism of phases, going from style without animation to style with
animation via nsPresContext::IsProcessingAnimationStyleChange).  This
will require that, for SVG Animations to continue interacting correctly
with CSS Transitions, that they have their own cascade level so that
they can participate in RestyleManager::UpdateOnlyAnimationStyles.

Additionally, this is needed even sooner, for bug 977991, which needs
(temporarily, until bug 960465 lands) a mechanism for updating the style
attribute style *and* all animation-phase-dependent styles.

Yes, it's a little bit annoying to have to have another class, and
another object per-document for this, but that's currently what comes
with being a level of the cascade.  But it's one class and one object
per document, and I believe there will be substantial benefits to having
all rule processor levels be only-animation-related or
not-animation-related (except for the style attribute level, which is
simple enough that it isn't needed yet).
2014-09-13 06:17:34 -07:00
L. David Baron
fb077873cf Bug 1066911 - Allow eRestyle_Force{,Descendants} in RuleNodeWithReplacement. r=heycam
This is fine since the assertion is just checking that we're not calling
RuleNodeWithReplacement in cases when stronger restyling (i.e.,
restyling that does more work) is needed; the new eRestyle_Force and
eRestyle_ForceDescendants flags control whether we restyle at all.

This probably should have been done in bug 931668 (since bug 996796
landed before bug 931668, although not before the patches were written),
but it doesn't actually show up in our test suite until bug 977991 (or
maybe slightly earlier in bug 1057231 or bug 1058346).
2014-09-13 06:17:34 -07:00
Cameron McCormack
737d1f11ae Bug 1065257 - Assorted cleanups in nsLayoutStyleSheetCache. r=bzbarsky 2014-09-12 07:41:35 +10:00
Makoto Kato
ea5d044e00 Bug 1065261 - SectionCaret might not appears if 2.25dppx or higher. r=mtseng 2014-09-11 15:44:54 +09:00
Daniel Holbert
41bce9ed30 Bug 1065141: Clarify language in mochitest messages about whether OMTA is working. r=birtles 2014-09-09 22:31:56 -07:00
Nathan Froyd
b22d96e512 Bug 1061794 - move -Wshadow flags additions in layout/style/ to moz.build; r=mshal 2014-07-28 11:26:16 -04:00
Robert O'Callahan
bf35c76776 Bug 1063052. NS_RUNTIMEABORT if a builtin stylesheet fails to load. r=heycam 2014-09-10 13:10:18 +12:00
Daniel Holbert
fe4e8d9647 Bug 1055285 part 4: Extend test_transitions_per_property.html with a few more scenarios for background-position & object-position transitions. (no review) 2014-09-09 18:09:32 -07:00
Daniel Holbert
8829bbabc7 Bug 1055285 part 3: Implement animation for 'object-position' property. r=heycam 2014-09-09 18:09:32 -07:00
Daniel Holbert
471ab7f102 Bug 1055285 part 2: Implement CSS parsing & computation (but not animation) for 'object-position' property. r=heycam 2014-09-09 18:09:32 -07:00
Daniel Holbert
751fe17d2f Bug 1055285 part 1: Implement CSS parsing & computation for 'object-fit' property. r=heycam 2014-09-09 18:09:32 -07:00