Commit Graph

107 Commits

Author SHA1 Message Date
Cameron McCormack
0c81f7a62c Bug 1147766 - Part 2: Replace FixedStyleStructArray with mozilla::RangedArray. r=dbaron 2015-05-23 12:50:44 +10:00
Cameron McCormack
a996e7cdac Backed out changeset a6fa096f9853 and ec1c41143ff6 (bug 1147766) since I messed up the warning fix. 2015-05-23 15:51:14 +10:00
Cameron McCormack
7c4cebfc02 Bug 1147766 - Part 2: Replace FixedStyleStructArray with mozilla::RangedArray. r=dbaron 2015-05-23 12:50:44 +10:00
Phil Ringnalda
7a5f1ade1f Back out 2 changesets (bug 1147766) for -Werror bustage
CLOSED TREE

Backed out changeset 10d6fcd9a4e0 (bug 1147766)
Backed out changeset 5754455de846 (bug 1147766)
2015-05-22 20:24:08 -07:00
Cameron McCormack
a44fbe7e65 Bug 1147766 - Part 2: Replace FixedStyleStructArray with mozilla::RangedArray. r=dbaron 2015-05-23 12:50:44 +10:00
Nicholas Nethercote
901ac4faf5 Bug 1166586 (part 1) - Remove all uses of PL_NewDHashTable() and PL_DHashTableDestroy(). r=froydnj.
They're not needed now that there is (temporarily) PLDHashTable2, which has an
initializing constructor and a destructor.
2015-05-04 22:59:24 -07:00
David Major
f21a131062 Bug 1155836: Template on aComputeData in the DoGetStyle* helpers. r=dbaron f=bz 2015-04-15 10:55:56 +12:00
Andrea Marchesini
b75af49c46 Bug 1156632 - Remove unused forward class declarations - patch 5 - rdf, parser, layout and something else, r=ehsan 2015-04-22 08:29:22 +02:00
L. David Baron
c490cf5044 Bug 847287 patch 4 - Add a method to nsRuleNode that reports the properties overriding a CSS animation. r=birtles
This is used in patch 6.
2015-03-31 15:05:54 -07:00
Nicholas Nethercote
6ee3666899 Bug 1127201 (attempt 2, part 1) - Replace most NS_ABORT_IF_FALSE calls with MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 488e401ff87e31a2074c4108c4df0572d9536667
2015-02-09 14:34:50 -08:00
Andrew McCreight
8413cc973c Back out Bug 1127201 (part 2) for various problems. 2015-02-06 15:04:32 -08:00
Nicholas Nethercote
3629781b69 Bug 1127201 (part 2) - Convert all NS_ABORT_IF_FALSE calls to MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 99182e70335d2b5ff95f8c528ae992d37294be3a
2015-02-04 20:05:36 -08:00
Cameron McCormack
fcc6ac77b1 Bug 649142 - Part 6: Remove support for shorthand-implemented logical properties. r=dbaron
This includes removing:

* the box property directional source constants
* the CSS_PROPERTY_DIRECTIONAL_SOURCE property flag
* the CSS_PROPERTY_REPORT_OTHER_NAME property flag
* nsCSSProps::OtherNameFor
* methods on the CSS parser to parse directional box properties and set
  the old *-source and *-value properties
* the resolution of logical and physical properties in nsRuleNode during
  style computation, since that's now done as part of the cascade in
  nsCSSExpandedDataBlock::MapRuleInfoInto
2015-01-17 15:16:02 +11:00
Phil Ringnalda
5cc5a1f24c Back out 9 changesets (bug 649142)
Backed out changeset 936703c75200 (bug 649142)
Backed out changeset b0252d2620d8 (bug 649142)
Backed out changeset 69ddb2036c50 (bug 649142)
Backed out changeset 67748675e669 (bug 649142)
Backed out changeset 15ed55c61f4e (bug 649142)
Backed out changeset 35c42cd138e1 (bug 649142)
Backed out changeset 1335630cf287 (bug 649142)
Backed out changeset b5725cd39a31 (bug 649142)
Backed out changeset b0eb691d6695 (bug 649142)
2014-12-30 20:04:20 -08:00
Cameron McCormack
26febeb99d Bug 649142 - Part 6: Remove support for shorthand-implemented logical properties. r=dbaron
This includes removing:

* the box property directional source constants
* the CSS_PROPERTY_DIRECTIONAL_SOURCE property flag
* the CSS_PROPERTY_REPORT_OTHER_NAME property flag
* nsCSSProps::OtherNameFor
* methods on the CSS parser to parse directional box properties and set
  the old *-source and *-value properties
* the resolution of logical and physical properties in nsRuleNode during
  style computation, since that's now done as part of the cascade in
  nsCSSExpandedDataBlock::MapRuleInfoInto
2014-12-31 12:18:16 +11: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
Dirk Schulze
92372d8ff6 Bug 1072894 - Implement polygon() parsing for clip-path. r=heycam 2014-09-28 01:56:00 +02:00
Cameron McCormack
98f625db89 Bug 931668 - Part 3: Add a style context bit to represent whether it depends on style data from its grandparent or higher ancestor. r=dbaron
--HG--
extra : rebase_source : 64deabb466cfaaeae220a00024cd05d8e87832bc
2014-09-05 13:48:44 +10:00
Nicholas Nethercote
8c60d14a1a Bug 1050009 - Initialize pldhash tables with a length, not a capacity. r=roc.
* * *
imported patch rm-dummy-params

--HG--
extra : rebase_source : c25987eb11bae197218d5fc53b77def19afa36ac
2014-08-06 06:31:21 -07:00
Susanna Bowen
a573f478da Bug 1021952 - Ensure that direct children of ruby elements are inline. r=bz 2014-07-22 19:08:13 -07:00
L. David Baron
e2cf09f168 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
Mats Palmgren
94e0905223 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
Daniel Holbert
5a79caf967 Bug 985336: Remove unnecessary #includes from headers in layout/style. r=dbaron 2014-05-09 08:23:14 -07:00
Daniel Holbert
02424d78e9 Bug 969460 part 1: Give EnsureBlockDisplay a second parameter, to determine whether it converts 'display:list-item' to block. r=bz 2014-02-15 10:42:35 -08:00
Cameron McCormack
9ee3123e5b Bug 773296 - Part 17: Resolve property values that have variable references at computed value time. r=dbaron
This re-parses property values at computed value time if
they had a specified value that was a token stream.  We add
a function nsRuleNode::ResolveVariableReferences that looks
at all the values in the nsRuleData and calls in to a new
nsCSSParser::ParsePropertyWithVariableReferences function if they have a
token stream value.

We add a nsCSSExpandedDataBlock::MapRuleInfoInto function that will
take the re-parsed property value and copy it back into the nsRuleData.

nsRuleNode::ResolveVariableReferences returns whether any variables
were attempted to be resolved, so that nsRuleNode::WalkRuleTree wil
recompute the rule detail in case any became 'inherit'.
2013-12-12 13:09:44 +11:00
Cameron McCormack
8a80d29205 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
52ae26eb58 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
ffeb2c1ba4 Bug 945580 - Add nsRuleNode::IsInherited helper function. r=dbaron 2013-12-03 14:42:09 +11:00
Nathan Froyd
4c7f87dd5b Bug 940170 - part 1 - constify PLDHashTableOps in layout/; r=bz 2013-11-18 21:51:48 -05:00
Max Vujovic
b725bd88af Bug 913990 - When encountering bogus URI during style computation for filter, fall back to initial value. r=dholbert 2013-10-17 14:37:57 -04:00
Dirk Schulze
5c53edbb51 Bug 898361 - Implement parsing for drop-shadow. r=heycam 2013-08-05 17:02:27 +10:00
Ms2ger
569fc183c6 Backout changeset a58abd7408bf for mochitest and crashtest crashes. 2013-08-04 12:21:17 +02:00
Dirk Schulze
e8982c8472 Bug 898361 - Implement drop-shadow parsing for the filter property. r=heycam 2013-08-04 18:58:28 +10:00
Ehsan Akhgari
9854ac6166 Bug 872127 - Part 2: Replace mozilla/StandardInteger.h with stdint.h; r=Waldo,ted 2013-07-30 10:25:31 -04:00
Cameron McCormack
9cda9d27bf Bug 856879 - Remove constructor arguments argument from style struct macros. r=dbaron 2013-04-02 12:45:48 +11:00
David Zbarsky
2c3499b66c [Bug 847110] Fix up includes in layout/style r=dbaron 2013-03-02 19:31:48 -05:00
L. David Baron
e1162bb557 Bug 781360 patch 2: Rename nsRuleNode::GetPresContext to PresContext, since it can never return null. r=dholbert 2013-02-16 13:04:54 -08:00
Cameron McCormack
a357d10fde Bug 508725 - Part 2: Record on nsCSSStyleSheets whether they are for a <style scoped>. r=dbaron 2013-01-09 10:25:47 +11:00
Cameron McCormack
26873544a3 Backout bug 508725 (d267bb4b58b5, 50f71edffeb9, 6aec8e22fe60, e62e1f33958a, 0f146c435249, eb959b9f4862, 2b0ee42f3aa0, 02db01cd6796, 2ef0e517d43d, b650588e05c9 and a3c916829d56) for build failure on a CLOSED TREE. 2013-01-08 19:36:21 +11:00
Cameron McCormack
f8c50ba688 Bug 508725 - Part 2: Record on nsCSSStyleSheets whether they are for a <style scoped>. r=dbaron 2013-01-08 19:09:22 +11:00
L. David Baron
addb318e8f Bug 572200, part 3: Cache data that lives in the rule tree on every relevant rule node that has a style context directly pointing to it directly. r=bzbarsky 2012-11-07 11:55:53 -08:00
L. David Baron
4689079952 Bug 572200, part 1: Make rule nodes know whether they're used directly by a style context. r=bzbarsky 2012-11-07 11:55:53 -08:00
Daniel Holbert
bf91bdf97d Bug 783415 part 1: Make "display" value of flex items compute to their blockified forms. r=dbaron 2012-11-07 11:28:59 -08:00
Ehsan Akhgari
0fd9123eac Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Aryeh Gregor
e806eeab4f Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Ms2ger
19f060907a Bug 629882 - Support currentColor in the 2D canvas context; r=dbaron
This changes nsCSSParser::ParseColorString to fill in an nsCSSValue instead
of an nscolor, and exposes nsRuleNode::ComputeColor to turn this nsCSSValue
into an nscolor.

Because gradients can be used with different canvas elements in different
documents, these cannot pass useful values for nsRuleNode::ComputeColor's
aPresContext and aStyleContext arguments. This patch also changes SetColor
to deal with those parameters being null.
2012-06-06 09:36:38 +02:00
Shriram Kunchanapalli
8e90a26e8d Bug 219767: Move font size functions in nsStyleUtil into nsRuleNode. r=dbaron 2012-05-31 10:09:46 +05:30
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Kyle Huey
5fdc27fddf Bug 718539: Followup to fix MSVC warnings. r=me 2012-05-04 12:45:03 -07:00
John Daggett
127ee0627d Bug 718539. Update font-feature-settings to latest spec syntax. r=dbaron 2012-04-26 15:24:26 +09:00