Commit Graph

38967 Commits

Author SHA1 Message Date
Cameron McCormack
02059bc249 Bug 773296 - Part 7: Add a field to nsStyleVariables to store computed variable values. r=dbaron
This defines a class CSSVariableValues which is used to store
computed variable values.  We store them a bit differently from
CSSVariableDeclarations -- here we have a hash table of variable names
to integer IDs, and then an array of variables where the array index
is the ID.  This is because later on we'll want a stable order for the
variables to return from DOM APIs.

In addition to the string value of the variable, we store the type
of the first and last token of the variable value.  This information
will be used when resolving entire variable reference containing
values, to determine when to insert "/**/" before and after a resolved
var(blah) token.

We add a CSSVariableValues member to nsStyleVariables.
2013-12-12 13:09:41 +11:00
Cameron McCormack
274a25e67e Bug 773296 - Part 6: Add enum to represent types of CSS tokens involved in serialization. r=dbaron
This adds an enum to nsCSSScanner.h that represents the types of tokens
we need to consider when pasting together two adjacent tokens during
serialization or variable resolution.  For example with:

  var-a:orange;
  var-b:red;
  color:var(a)var(b);

we need to generate the string "orange/**/red" to parse for the value of
'color'.
2013-12-12 13:09:41 +11:00
Cameron McCormack
64924811c6 Bug 773296 - Part 5: Map variables on a Declaration to nsRuleData. r=dbaron
This adds a CSSVariableDeclarations object to nsRuleData and adds a
MapRuleInfoInto function to CSSVariableDeclarations so the can copy
variable declarations into a nsRuleData's object.  We call that from
Declaration::Map{Normal,Important}RuleInfoInto.

We make HasImportantData return true if we have important variables
but no important non-custom properties on a declaration, since that
is used to determine whether we have a rule node for important
declarations.  This means MapImportantRuleInfoInto can no longer
assume that mImportantData is non-null.
2013-12-12 13:09:41 +11:00
Cameron McCormack
81af48d662 Bug 773296 - Part 4: Add style struct to store CSS variables. r=dbaron
This adds an nsStyleVariables on which computed variable values
will be stored.  We don't actually have any properties assigned to
nsStyleVariables; eCSSPropertyExtra_Variables which we added earlier
isn't a real property.  To avoid compiler errors for gVariableFlags
being a zero length array, we stick a dummy entry in there.

nsRuleNode::ComputeVariablesData does nothing for the moment.

nsStyleVariable nsChangeHint calculations always return 0, as later
we will compare the actual properties that reference variables to
see what changes are required for them.
2013-12-12 13:09:40 +11:00
Cameron McCormack
dd8ce60c6d Bug 773296 - Part 3: Allow more than 27 style structs. r=dbaron
This bumps up nsStyleContext::mBits to a uint64_t so that it can fit
another style struct.  If we're going to need to keep at least 27 style
structs, it might be better to split mBits up into two uint32_ts: one
for the flags and one for the style struct bits.
2013-12-12 13:09:40 +11:00
Cameron McCormack
a8cf86e4b7 Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron
Patch co-authored by Emmanuele Bassi <ebassi@gmail.com>

This defines a CSSVariableDeclarations class that holds a set of
variable declarations.  This is at the specified value stage, so values
can either be 'initial', 'inherit' or a token stream (which is what you
normally have).  The variables are stored in a hash table.  Although
it's a bit of a hack, we store 'initial' and 'inherit' using special
string values that can't be valid token streams (we use "!" and ";").

Declaration objects now can have two CSSVariableDeclarations objects
on them, to store normal and !important variable declarations.  So that
we keep preserving the order of declarations on the object, we inflate
mOrder to store uint32_ts, where values from eCSSProperty_COUNT onwards
represent custom properties.  mVariableOrder stores the names of the
variables corresponding to those entries in mOrder.

We also add a new nsCSSProperty value, eCSSPropertyExtra_variable, which
is used to represent any custom property name.
nsCSSProps::LookupProperty can return this value.

The changes to nsCSSParser are straightforward.  Custom properties
are parsed and checked for syntactic validity (e.g. "var(a,)" being
invalid) and stored on the Declaration.  We use nsCSSScanner's
recording ability to grab the unparsed CSS string corresponding to
the variable's value.
2013-12-12 13:09:40 +11:00
Emmanuele Bassi
5f3aef17a0 Bug 773296 - Part 1: Add a preference for CSS variables. r=dbaron 2013-12-12 13:09:40 +11:00
Cameron McCormack
d6d7eb4f8b Bug 909170 - Add some tests for @supports conditions with tokens after a declaration's priority. r=dbaron 2013-12-12 13:09:39 +11:00
Bobby Holley
3140797fe1 Bug 937317 - Remove unnecessary AutoSystemCaller usage. r=bz
See bug 937317 comment 38.
2013-12-11 17:51:58 -08:00
Bobby Holley
07df154678 Bug 937317 - Replace all instance of null cx pushing with AutoSystemCaller. r=bz
This is an easy bonus chunk of the work to phase out cx pushing in the browser.
2013-12-11 17:51:58 -08:00
Benoit Girard
54c319677f Bug 948531 - Layerize elements with transition or animation immediately. r=mattwoodrow 2013-12-11 15:48:06 -05:00
Ryan VanderMeulen
4b3380c3ec Backed out changeset d8fb025ca7d2 (bug 948531) for suspicion of causing OSX 10.6 debug mochitest-5 orange.
CLOSED TREE
2013-12-11 18:47:03 -05:00
Benoit Girard
cb5a23fdc9 Bug 948531 - Layerize elements with transition or animation immediately. r=mattwoodrow
--HG--
extra : rebase_source : 06725514680d5041c547149f6ecd758061936a4e
2013-12-11 15:48:06 -05:00
Matt Woodrow
478e3354a1 Bug 948221 - Part 7: Convert SurfaceFromElement to Moz2D. r=roc,Bas,bjacob 2013-12-12 10:05:27 +13:00
Matt Woodrow
4bd8a376ba Bug 948221 - Part 2: Remove SFE_WANT_NEW_SURFACE since it's never used. r=roc 2013-11-27 14:05:02 +13:00
Xidorn Quan
ebbea77fc0 Bug 946895 - Add missing values of list-style-type for property_database.js 2013-12-11 12:55:43 -08:00
Adam Casey
bba057ef66 Bug 874919 - Added a check to DoGetWidth/Height so the width/height properties of getComputedStyle now return correct values on inline SVG elements. r=bz 2013-12-11 14:13:48 -05:00
Ryan VanderMeulen
f88ec242eb Merge inbound to m-c. 2013-12-11 13:32:11 -05:00
Ryan VanderMeulen
464d00d6ad Merge b2g-inbound to m-c. 2013-12-11 13:24:26 -05:00
Henri Sivonen
c007e66c29 Bug 946647 - Remove bidi options from nsIMarkupDocumentViewer as dead code. r=smontagu. 2013-12-11 15:47:50 +02:00
Alexander Surkov
6eaf68e1f9 Bug 559761 - make <input type=number> accessible, r=tbsaunde, smaug
--HG--
rename : accessible/tests/mochitest/value/test_range.html => accessible/tests/mochitest/value/test_number.html
2013-12-10 22:19:26 -05:00
Jonathan Watt
df02daef15 Bug 946184 - Make sure that we reframe the nsIAnonymousContentCreator if any nsIAnonymousContentCreator::ContentInfo created content needs reframing. r=bz 2013-12-11 11:41:51 +00:00
Jonathan Watt
db7a522d08 Bug 948475 - Implement HTMLInputElement.select() for <input type=number> (contrary to the HTML5 spec) since content needs it. r=smaug 2013-12-11 11:41:51 +00:00
Daniel Holbert
e407ed515a Bug 948654: Uncomment lines to make 'align-content' and 'flex-wrap' inherit through scroll frames to scrolled flex containers. r=mats
--HG--
rename : layout/reftests/w3c-css/submitted/flexbox/flexbox-overflow-horiz-3-ref.html => layout/reftests/w3c-css/submitted/flexbox/flexbox-overflow-horiz-4-ref.html
rename : layout/reftests/w3c-css/submitted/flexbox/flexbox-overflow-horiz-3.html => layout/reftests/w3c-css/submitted/flexbox/flexbox-overflow-horiz-4.html
rename : layout/reftests/w3c-css/submitted/flexbox/flexbox-overflow-horiz-3-ref.html => layout/reftests/w3c-css/submitted/flexbox/flexbox-overflow-horiz-5-ref.html
rename : layout/reftests/w3c-css/submitted/flexbox/flexbox-overflow-horiz-3.html => layout/reftests/w3c-css/submitted/flexbox/flexbox-overflow-horiz-5.html
rename : layout/reftests/w3c-css/submitted/flexbox/flexbox-overflow-vert-3-ref.html => layout/reftests/w3c-css/submitted/flexbox/flexbox-overflow-vert-4-ref.html
rename : layout/reftests/w3c-css/submitted/flexbox/flexbox-overflow-vert-3.html => layout/reftests/w3c-css/submitted/flexbox/flexbox-overflow-vert-4.html
rename : layout/reftests/w3c-css/submitted/flexbox/flexbox-overflow-vert-3-ref.html => layout/reftests/w3c-css/submitted/flexbox/flexbox-overflow-vert-5-ref.html
rename : layout/reftests/w3c-css/submitted/flexbox/flexbox-overflow-vert-3.html => layout/reftests/w3c-css/submitted/flexbox/flexbox-overflow-vert-5.html
2013-12-10 22:31:38 -08:00
Cameron McCormack
485f2e52fa Bug 947082 - List parent style context in frame tree dumps. r=mats 2013-12-11 17:13:20 +11:00
Jonathan Watt
3c34ed2d2f Bug 948549 - Make <input type=number> behave and look disabled when the 'disabled' attribute is set or it's inside a disabled fieldset. r=smaug 2013-12-11 02:13:06 +00:00
Wes Kocher
be8274049e Merge m-c to b2g-inbound 2013-12-10 17:14:14 -08:00
Ryan VanderMeulen
7a6613cc88 Merge m-c to inbound. 2013-12-10 15:48:16 -05:00
Ryan VanderMeulen
2b53da578d Merge b2g-inbound to m-c. 2013-12-10 15:38:44 -05:00
Ryan VanderMeulen
9035fd618a Bug 933264 - Add fuzz to the reftest on OSX 10.6. r=tn
CLOSED TREE
2013-12-10 15:21:46 -05:00
Daniel Holbert
2540348889 (no bug) fix typo in comment within reftest reference case 'flexbox-overflow-vert-3-ref.html'. DONTBUILD because comment-only 2013-12-10 16:59:28 -08:00
Nicholas Cameron
c9131de1bb Bug 946958 part 2. Remove methods which just forward to compositor. r=mattwoodrow 2013-12-09 14:40:59 +13:00
Ehsan Akhgari
e004ec8ac0 Bug 947736 - Build modules/libpref/ in unified mode; r=bsmedberg 2013-12-10 18:10:01 -05:00
Kartikaya Gupta
6a13913a77 Bug 814435 - Prevent scrollbars from fading out while user is scrolling. r=botond 2013-12-09 22:14:55 -05:00
Kartikaya Gupta
ae10b7fb73 Bug 814435 - Always layerize overlay scrollbars on B2G. r=tn 2013-12-09 22:14:54 -05:00
Kartikaya Gupta
2b78585247 Bug 814435 - Annotate layers for scrollbars as such. r=tn, BenWa 2013-12-09 22:14:53 -05:00
Dan Minor
b001881df6 Bug 945273 - Update reftest manifests for pandaboards; r=gbrown 2013-12-06 14:56:37 -05:00
Gijs Kruitbosch
e95041d4a0 Bug 943217 - fix moz-document error message, r=dbaron 2013-11-26 10:36:52 +01:00
Nicholas Cameron
fd076867c8 Bug 945088. Use the correct device offset in gfxContext. r=mattwoodrow 2013-12-09 21:04:44 +13:00
Birunthan Mohanathas
3440613a39 Bug 713082 - Part 2: Rename Util.h to ArrayUtils.h. r=Waldo
--HG--
rename : mfbt/Util.h => mfbt/ArrayUtils.h
2013-12-08 21:52:54 -05:00
Birunthan Mohanathas
68b00083fd Bug 713082 - Part 1: Remove unnecessary Util.h includes. r=Waldo 2013-12-08 21:52:33 -05:00
Phil Ringnalda
74b2dea823 Backed out 7 changesets (bug 946958, bug 865033)
Backed out changeset 6dd0a6cb9ab3 (bug 946958)
Backed out changeset 498152aec5b1 (bug 946958)
Backed out changeset 7d035322f51d (bug 946958)
Backed out changeset 99f8ad7561ef (bug 946958)
Backed out changeset 4639c5abea80 (bug 946958)
Backed out changeset 9d1a4d83eccf (bug 865033)
Backed out changeset 41839e4026bc (bug 865033)
2013-12-08 18:43:45 -08:00
Nicholas Cameron
8996a6fb5c Bug 946958 part 2. Remove methods which just forward to compositor. r=mattwoodrow 2013-12-09 14:40:59 +13:00
Phil Ringnalda
d673d7e6ed Merge m-c to m-i 2013-12-08 17:32:55 -08:00
Jonathan Watt
2851981a72 Bug 947728 part 2 - Make |-moz-appearance:number-input| the UA style sheet default for <input type=number>, and make the value 'textfield' hide the spinner. r=roc 2013-12-08 23:26:07 +00:00
Jonathan Watt
57fa4cd151 Bug 947728 part 1 - Introduce a new 'number-input' value for -moz-appearance that behaves exactly as 'textfield' does. r=roc 2013-12-08 23:23:28 +00:00
Jonathan Watt
4bde6cfc06 Bug 947718 - Work around bug 946184 for Aurora. r=bz 2013-12-08 21:27:28 +00:00
Jonathan Watt
6757d5bd14 Bug 940760 - Make the CSS pseudo-class :focus apply to <input type=number>, fixing B2G forms styling. r=smaug 2013-12-08 21:26:42 +00:00
Mats Palmgren
8187c0ae71 Bug 942017 - Reftest. 2013-12-08 01:11:50 +00:00
Mats Palmgren
99419ff1d6 Bug 942017 - Only let the bullet frame affect the line height when line-height:normal. r=jfkthame 2013-12-08 01:11:50 +00:00