Commit Graph

23095 Commits

Author SHA1 Message Date
Cameron McCormack
277b40478a Bug 1028497 - Part 28: Reftests. r=jdaggett 2014-10-02 12:32:10 +10: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
e561bc26bf Bug 1028497 - Part 16: Don't destroy the user font set if there are no @font-face rules. r=jfkthame
We can no longer call FontFaceSet::DestroyUserFontSet (what used to be
nsUserFontSet::Destroy) in nsPresContext::FlushUserFontSet, since we
need to keep tracking FontFace objects even if the list of @font-face
rules is empty.
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
Jonathan Kew
60f9199f96 Bug 902762 pt 7 - Draw caret appropriately for vertical textruns. r=smontagu 2014-10-01 20:25:50 +01:00
Jonathan Kew
c917261bbb Bug 902762 pt 6 - Handle vertical textruns for mouse click in nsTextFrame. r=smontagu 2014-10-01 20:25:50 +01:00
Jonathan Kew
792d2f95f7 Bug 902762 pt 5 - Handle vertical textruns when painting text in nsTextFrame. r=smontagu 2014-10-01 20:25:49 +01:00
Jonathan Kew
315fe696fe Bug 902762 pt 1 - Pass a 'vertical' flag to font shapers, and support vertical shaping through harfbuzz. r=jdaggett 2014-10-01 20:25:48 +01:00
Bas Schouten
fd8e9f69f2 Bug 902952 - Part 1: Add a slight amount of fuzz for radial gradient tests. r=jrmuizel 2014-10-01 19:50:25 +02:00
Jeff Muizelaar
05d4c288be Bug 1074615. Remove DRAW_SNAPPED. r=mwoodrow
This doesn't seem to be necessary and doesn't really make sense to me. This
will help us moving region clipping into Moz2D

--HG--
extra : rebase_source : 4a5987ce2a95eaba44a69233d1b7f461f5ec16ea
2014-10-01 01:25:25 -04: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
Andrew McCreight
332647cd60 Bug 1068276, part 1 - Allow configuring which type of processes we complain about when there's no leak log. r=jmaher
Then don't warn for missing logs from tab and geckomediaplugin processes, or default processes on B2G.
2014-09-30 14:17:27 -07:00
Simon Montagu
aa39cde189 Bug 1069941 patch 3: Pass the frame physical width, not inline size, to the inner loop of RepositionFrame, plus cosmetic fixes, r=jfkthame 2014-09-30 10:59:14 -07:00
Simon Montagu
0630596f4c Bug 1069941 patch 2: reset the start coordinate of the inline frames before ReorderFrames so that the margin doesn't get added twice, r=jfkthame 2014-09-30 10:59:13 -07:00
Simon Montagu
15ed53bcf1 Bug 1069941 patch 1: be more accurate when identifying the first and last frames on the line and applying margin/border/padding, r=jfkthame 2014-09-30 10:59:13 -07:00
Simon Montagu
4d9fcff764 Tests for bug 1069941, one by jfkthame, r=smontagu; the other by smontagu, r=jfkthame 2014-09-30 10:59:12 -07:00
Jonathan Watt
28965a1a08 Bug 1074820 - Refactor nsSVGPatternFrame, part 1. r=longsonr 2014-09-30 18:08:14 +01:00
Jonathan Watt
abf51da9fb Bug 1074807 - Remove nsSVGUtils::TransformOuterSVGPointToChildFrame. r=longsonr 2014-09-30 18:08:14 +01:00
Jonathan Watt
aee9c12e6a Bug 1074594 - Stop inverting the transform in nsSVGUtils::GetStrokeTransform, give it a more performant signature, and a better name. r=longsonr 2014-09-30 18:08:14 +01:00
Jonathan Watt
575724162a Bug 1074294, part 2 - Convert nsSVGPathGeometryFrame::Render() to render directly using the Moz2D DrawTarget. r=longsonr 2014-09-30 18:08:13 +01:00
Jonathan Watt
c1ec1dac12 Bug 1074294, part 1 - Convert SVGAutoRenderState to act on a Moz2D DrawTarget. r=longsonr 2014-09-30 18:08:13 +01:00
Andrew McCreight
b41400dfe4 Bug 1067664, part 1 - Allow different leak thresholds for different types of processes. r=jmaher 2014-09-30 09:54:25 -07: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
Jonathan Kew
3ff7b19ff8 Bug 727276 - Reftests for emoji-style variation selectors. r=roc 2014-09-30 07:28:28 +01:00
Jonathan Kew
21d25f9507 Bug 727276 - Use emoji-style variation selector to help GetCommonFallbackFonts make an appropriate choice. r=roc 2014-09-30 07:27:55 +01:00
Jim Mathies
ad73cb6c28 Bug 1072417 - Remove the browser.tabs.remote pref and turn everything it controls on by default. r=felipe 2014-09-29 16:11:08 -05:00
Ryan VanderMeulen
c9810a7fcf Merge m-c to inbound. a=merge 2014-09-29 16:00:57 -04:00