L. David Baron
8ff298d446
Make nsCachedStyleData store arrays of nsStyleStruct*, and use style struct IDs for faster access to those arrays. (Bug 639231, patch 3) r=bzbarsky
2011-03-17 20:14:32 -07:00
L. David Baron
52152cb738
Fix indentation. (Bug 639231, patch 2) r=bzbarsky
2011-03-17 20:14:32 -07:00
L. David Baron
c50f6e81a4
Keep reset and inherited style struct IDs separate. (Bug 639231, patch 1) r=bzbarsky
2011-03-17 20:14:31 -07:00
L. David Baron
401e3dc9b6
Add poisoning for nsRuleData::mValueOffsets. (Bug 636039, patch 19) r=bzbarsky
...
I tested manually that after:
(a) removing the |ruleData.mValueOffsets[aSID] = 0;| in
nsRuleNode::WalkRuleTree
(b) removing the NS_ABORT_IF_FALSE(aRuleData->mValueOffsets[aSID] == 0,
...) from nsRuleNode::CheckSpecifiedProperties and
UnsetPropertiesWithoutFlags
that we crash dereferencing the poison address in a SetCoord call inside
nsRuleNode::ComputeTextResetData
2011-03-17 20:14:31 -07:00
L. David Baron
c12115ab74
Make test_property_database.html give all the errors rather than throwing an exception for the first missing longhand property. (Bug 636039, patch 18) r=bzbarsky
...
The main fix is in the first of the three for loops modified, but the
new structure of that one seems like an improvement worth applying to
the other two.
2011-03-17 20:14:31 -07:00
L. David Baron
a71cf7e9a9
Remove now unused nsRuleData* structs. (Bug 636039, patch 17) r=bzbarsky
2011-03-17 20:14:31 -07:00
L. David Baron
71d08383cb
Remove Moz prefixes from names of subproperty tables. (Bug 636039, patch 16) r=bzbarsky
...
This fixes the FIXME introduced in patch 4.
2011-03-17 20:14:31 -07:00
L. David Baron
ec0055aa6b
Instead of stack-allocating nsRuleData* structs in separate methods for each style struct, allocate an array of nsCSSValue using alloca. (Bug 636039, patch 15) r=bzbarsky
2011-03-17 20:14:31 -07:00
L. David Baron
fce790e6bb
Add index and count data for the properties that need to be computed for each style struct. (Bug 636039, patch 14) r=bzbarsky
...
This adds a second occurrence of the ugliest pattern of nsCSSPropList.h
inclusion.
2011-03-17 20:14:31 -07:00
L. David Baron
032ddb90c8
Make the three CSS_PROP_INCLUDE_NOT_CSS properties much more like normal CSS properties, and (importantly) give them property IDs in the longhand range. Replace CSS_PROP_INCLUDE_NOT_CSS with CSS_PROP_STUB_NOT_CSS for callers that need stubs. (Bug 636039, patch 13) r=bzbarsky
2011-03-17 20:14:31 -07:00
L. David Baron
ed2a690b21
Remove now-unneeded parameters to COMPUTE_START_{INHERITED,RESET}. (Bug 636039, patch 12) r=bzbarsky
2011-03-17 20:14:31 -07:00
L. David Baron
eaaf37ca08
Convert nsRuleNode::Compute*Data to property getters instead of accessing struct members. (Bug 636039, patch 11) r=bzbarsky
2011-03-17 20:14:31 -07:00
L. David Baron
ec99680d49
Correct checks that were for the wrong pseudo-property (script-level vs. script-size-multiplier). (Bug 636039, patch 10) r=bzbarsky
2011-03-17 20:14:31 -07:00
L. David Baron
612e7dd7b0
Remove unused *AtOffset methods. (Bug 636039, patch 9) r=bzbarsky
2011-03-17 20:14:31 -07:00
L. David Baron
ad7b7cc2ed
Convert custom style rules to property getters instead of accessing struct members. (Bug 636039, patch 8) r=bzbarsky
2011-03-17 20:14:31 -07:00
L. David Baron
3a63faa598
Add nsRuleData::ValueForBackgroundColor, etc., methods for each CSS property. (Bug 636039, patch 5) r=bzbarsky
2011-03-17 20:14:30 -07:00
L. David Baron
49daed21e9
Allow the method field in nsCSSPropList.h to be used with or without prefixes. (Bug 636039, patch 4) r=bzbarsky
2011-03-17 20:14:30 -07:00
L. David Baron
f9e49f5a38
Don't bloat nsCSSTable for members that only need to exist in nsRuleDataTable. (Bug 636039, patch 3) r=bzbarsky
2011-03-17 20:14:30 -07:00
L. David Baron
982559da8c
Correct comment describing nsRuleData::ValueFor. (Bug 636039, patch 2) r=bzbarsky
...
nsRuleData::ValueFor does not return null; it checks conditions that
would cause it to do so with NS_ABORT_IF_FALSE. Callers are required to
check mSIDs.
2011-03-17 20:14:30 -07:00
Boris Zbarsky
e11dc52475
Bug 641856. column-rule needs to work even when overflow is not visible. r=roc
2011-03-17 13:41:52 -04:00
Craig Topper
cc19a1ceb0
Bug 577002 Part 3: Make various ImportRule functions non-virtual and cleanup some return types. r=bzbarsky
2011-03-17 13:41:52 -04:00
Craig Topper
f73d0bfb43
Bug 577002 Part 2: Remove nsICSSImportRule. r=bzbarsky
...
--HG--
rename : layout/style/nsICSSImportRule.h => layout/style/ImportRule.h
2011-03-17 13:41:52 -04:00
Craig Topper
7028de1f22
Bug 577002 Part 1: Rename CSSImportRuleImpl to mozilla::css::ImportRule. r=bzbarsky
2011-03-17 13:41:52 -04:00
Craig Topper
5046fee8c2
Bug 576877 Part 3: De-virtualize methods in NameSpaceRule. r=bzbarsky
2011-03-17 13:41:52 -04:00
Craig Topper
5fd4236789
Bug 576877 Part 2: Remove nsICSSNameSpaceRule. r=bzbarsky
...
--HG--
rename : layout/style/nsICSSNameSpaceRule.h => layout/style/NameSpaceRule.h
2011-03-17 13:41:52 -04:00
Craig Topper
5e8ebdc87a
Bug 576877 Part 1: Rename CSSNameSpaceRuleImpl to mozilla::css::NameSpaceRule. r=bzbarsky
2011-03-17 13:41:52 -04:00
L. David Baron
6f8a7f7e04
Include the opening "url(" in URL and Bad_URL tokens (though the latter do not have a close paren), and make tokenization of url() function be noncontextual, as required by CSS. (Bug 604179, patch 7) r=bzbarsky
...
Note that tokenization of url-prefix() and domain() remains contextual.
Needed to help CSS 2.1 meet Proposed Recommendation entrance criteria.
2011-03-11 11:29:45 -06:00
L. David Baron
276bc2fc4e
Include the close parenthesis in the URL token and make quoted URLs produce URL tokens rather than string tokens. (Bug 604179, patch 6) r=bzbarsky
2011-03-11 11:29:45 -06:00
L. David Baron
5c5dffb84a
Disallow control characters less than space inside unquoted url(), per spec. (Bug 604179, patch 5) r=bzbarsky
2011-03-11 11:29:44 -06:00
L. David Baron
5602457863
Fix incorrect indentation in nsCSSScanner::NextURL. (Bug 604179, patch 4) r=bzbarsky
2011-03-11 11:29:44 -06:00
L. David Baron
7366e14023
Move the consumption of beginning whitespace (for all forms) and ending whitespace (for the string form) inside url() into the tokenizer. (Bug 604179, patch 3) r=bzbarsky
2011-03-11 11:29:44 -06:00
L. David Baron
34a94f8d55
Rename CSS tokens to be closer to the names of newly-added tokens (BAD_STRING, BAD_URI) in the CSS 2.1 tokenization. (Bug 604179, patch 2) r=bzbarsky
2011-03-11 11:29:44 -06:00
L. David Baron
3ec2ecbf58
Use GatherURL in ParseNameSpaceRule and ParseImageRect, and rename GatherURL to ParseURLOrString for clarity. (Bug 604179, patch 1) r=bzbarsky
...
Note that this adds a missing UngetToken(), which affects the other
consumer of GatherURL, parsing of @import rules.
2011-03-11 11:29:44 -06:00
Craig Topper
c96353bbd5
Bug 576831 part 6. DeCOMtaminate some StyleRule method signatures. r=bzbarsky.
2011-03-10 21:50:20 -05:00
Craig Topper
3bf4843751
Bug 576831 part 5. Make some methods that used to be virtual non-virtual. r=bzbarsky
2011-03-10 21:50:12 -05:00
Craig Topper
678b9c7c11
Bug 576831 part 4. Remove nsICSSStyleRule and use mozilla::css::StyleRule instead. r=bzbarsky
...
--HG--
rename : layout/style/nsCSSStyleRule.cpp => layout/style/StyleRule.cpp
rename : layout/style/nsICSSStyleRule.h => layout/style/StyleRule.h
2011-03-10 21:48:57 -05:00
Craig Topper
952a977004
Bug 576831 part 3. Rename CSSImportantRule to mozilla::css::ImportantRule. r=bzbarsky
2011-03-10 21:48:26 -05:00
Craig Topper
d5233e065b
Bug 576831 part 2. Rename DOMCSSStyleRuleImpl to mozilla::css::DOMCSSStyleRule. r=bzbarsky
2011-03-10 21:47:52 -05:00
Craig Topper
1f6006c1f6
Bug 576831 part 1. Rename CSSStyleRuleImpl to mozilla::css::StyleRule. r=bzbarsky
2011-03-10 21:47:08 -05:00
Boris Zbarsky
a5dd83ec8b
Bug 608759. Stop calling ContentEnumFunc through a function pointer; just call it directly. r=dbaron
2011-03-07 12:45:25 -05:00
L. David Baron
949c14cb64
Use ParseSingleValueProperty for the components inside the 'transition' shorthand as well. (Bug 636029) r=bzbarsky
2011-03-05 09:58:33 -08:00
L. David Baron
0f0c809126
Make generic mechanism for parsing lists of single values with ParseVariant. (Bug 636029) r=bzbarsky
2011-03-05 09:58:33 -08:00
L. David Baron
9b37832256
Drive the ParseVariant calls in ParseSingleValueProperty from data rather than a big switch. (Bug 636029) r=bzbarsky
2011-03-05 09:58:33 -08:00
L. David Baron
2f73995ced
Fix keyword table entries in nsCSSPropList and code in nsRuleNode to match those used in the parser. (Bug 636029) r=bzbarsky
2011-03-05 09:58:33 -08:00
L. David Baron
08ab704b49
Add 'parsevariant_' parameter to CSS_PROP macro, with all properties initially zero. (Bug 636029) r=bzbarsky
2011-03-05 09:58:33 -08:00
L. David Baron
92c4c1e812
Separate properties that are parsed in ParseSingleValueProperty with something other than ParseVariant. (Bug 636029) r=bzbarsky
2011-03-05 09:58:33 -08:00
L. David Baron
1b6756da8d
Separate the non-property parsed in ParseSingleValueProperty. (Bug 636029) r=bzbarsky
2011-03-05 09:58:33 -08:00
L. David Baron
43d08d340f
Disable parsing of 'marker', 'run-in', and 'compact' in a less hacky way. (Bug 636029) r=bzbarsky
...
This simply removes all the code for the values. This removes a
special-case that would otherwise need to become more complicated in a
later patch in this series.
2011-03-05 09:58:33 -08:00
L. David Baron
2167602644
Add parse types for CSS properties so we don't parse them in one huge switch. (Bug 636029) r=bzbarsky
...
With this patch, every CSS property is required to have one of the parse
type values (CSS_PROPERTY_PARSE_{FUNCTION,VALUE,INACCESSIBLE}) in its
flag bits. This avoids needing a switch in
CSSParserImpl::ParseProperty(nsCSSProperty).
Note that this reserves more space in CSS_PROPERTY_PARSE_PROPERTY_MASK
than appears to be necessary; that space will be used in a later patch
in this series.
2011-03-05 09:58:33 -08:00
L. David Baron
a9819c7c68
Make sure all properties in nsCSSPropList.h have useful values for the method_ field. (Bug 636039) r=bzbarsky
...
Note that these are unprefixed to be consistent with the similar
existing methods for other logical box properties. Prefixing doesn't
matter for the dom property field of CSS_PROP_LIST_EXCLUDE_INTERNAL
properties, since dom property field of such properties is not exposed
to the Web.
2011-03-05 09:58:33 -08:00