Граф коммитов

106 Коммитов

Автор SHA1 Сообщение Дата
Dirk Schulze 62628a69a2 Bug 1074522 - Implement ellipse()/circle() parsing and style computing. r=dbaron 2014-10-15 00:03:00 +02:00
Dirk Schulze 1d1b7d9234 Bug 1077388 - Fix parsing/computing issue with polygon(). r=dbaron 2014-10-10 02:10:00 -04:00
Dirk Schulze a028173cff Bug 1072894 - Implement polygon() parsing for clip-path. r=heycam 2014-09-28 01:56:00 +02:00
John Schoenick 38d3a3deea Bug 870022 - Part 2 - Add ParseSourceSizeList to CSS parser for <picture sizes> grammar. r=bz 2014-06-25 11:47:46 -07:00
Xidorn Quan 96a68ed4e1 Bug 966166 - Part 1: Parse @counter-style rule. r=dbaron, r=bz 2014-06-11 21:10:00 -04:00
Boris Zbarsky 900ca9c9b2 Bug 998356. Don't completely fail out of the parser if we can't format one of our string error messages. r=hsivonen 2014-05-23 17:32:37 -04:00
Seth Fowler 874e445c7b Bug 63895 (Part 2) - Support table parts as absolute containing blocks. r=dbaron 2014-03-10 15:41:17 -07:00
Chris Peterson f6f08af0a0 Bug 965693 - Remove annoying "Printing XUL documents is not supported" error dialog. r=roc 2014-01-29 20:40:34 -08:00
Henri Sivonen 9cc02fab98 Bug 213517 part 1 - Interpret x-user-defined as windows-1252 in <meta> for compatibility with other browsers. r=smontagu.
--HG--
rename : parser/htmlparser/tests/mochitest/file_bug672453_meta_utf16.html => parser/htmlparser/tests/mochitest/file_bug672453_meta_userdefined.html
2014-01-02 09:18:19 +02:00
Cameron McCormack 3a3a7216b5 Bug 773296 - Part 18: Add error reporting for invalid variable references. r=dbaron
This adds CSS parser error reporting for parsing of custom properties
and normal properties that have variable references.

When re-parsing a normal property that had a variable reference, we
report any parse error to be at the beginning of the property value.
This is because it is difficult to keep track of where exactly each
variable substitution came from to point to the particular value
that would have caused the parse error.  For example, with this:

  :root {
    var-a: 1px 2px;
    var-b: 3px var(a);
  }
  p {
    margin: var(a) var(b);
  }

we would end up resolving the value of 'margin' to:

  "  1px 2px  3px  1px 2px"

In this string, the parse error occurs when we encounter the final
"2px", but by this point we don't know where that value came from.
So instead we just point to the line on which 'margin' was declared.

We extend ErrorReporter with an OutputError overload that takes the
specific line and column number to use in the error report to get this
right, and we store the line and column number for each token stream
we parse on the nsCSSValueTokenStream object.
2013-12-12 13:09:44 +11:00
Cameron McCormack 7eb5d97a49 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 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
Gijs Kruitbosch e95041d4a0 Bug 943217 - fix moz-document error message, r=dbaron 2013-11-26 10:36:52 +01:00
Cameron McCormack c568af0049 Bug 945048 - Correctly check for the CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE flag when parsing pseudo-classes after pseudo-elements. r=bz 2013-12-02 13:06:20 +11:00
Cameron McCormack b5a8e4c2eb Bug 944493 - Rename PEPseudoSelTrailing because of a string change. r=flod 2013-11-30 12:17:51 +11:00
Cameron McCormack 417805594e Bug 922669 - Part 1: Parse selectors with user action pseudo-classes after pseudo-elements. r=bz 2013-11-28 17:46:38 +11:00
aceman 92e1c50aa8 Bug 677912 - Follow-up to bug 136556 - change the string ID for localizers. r=bz 2013-09-04 12:52:25 -04:00
Theo Chevalier 23ef27ee11 Bug 905933 - Improve plural form for AndXMoreFiles string, r=enndeakin 2013-08-20 11:18:03 +02:00
Jonathan Watt c76062a817 Bug 902234 - Cap the number of files that we include in the tooltip for <input type=file>. r=enndeakin 2013-08-07 00:11:54 +01:00
Max Vujovic 0bd2b965c3 Bug 895182 - [CSS Filters] Implement parsing for blur, brightness, contrast, grayscale, invert, opacity, saturate, sepia. Co-authored with Dirk Schulze (krit). r=heycam 2013-07-22 15:08:33 -07:00
Ed Morley ef5715c092 Backed out changeset f24d81b85929 (bug 895182) for Windows build failures on a CLOSED TREE 2013-07-23 16:36:45 +01:00
Max Vujovic 0117d6e2f8 Bug 895182 - [CSS Filters] Implement parsing for blur, brightness, contrast, grayscale, invert, opacity, saturate, sepia. Co-authored with Dirk Schulze (krit). r=heycam 2013-07-23 10:47:16 -04:00
Mounir Lamouri 588db75b27 Bug 885996 - 1/2 - Interaction between nsIColorPicker and content. r=smaug 2013-07-08 15:12:18 -04:00
L. David Baron 4cb93c7005 Bug 757554: Reject uses of reserved 'not', 'only', 'and', and 'or' as a media type. r=heycam 2013-06-17 14:26:08 -07:00
John Daggett 0eae803e8f Bug 549861 - reland font-variant subproperties with DOM-peer review. r=khuey 2013-05-20 11:59:20 +09:00
Ms2ger 7786ea6954 Backout bug 549861 (changesets 27fb48df15ce:7ecd4e3863b4) for insufficient review. 2013-05-19 20:23:19 +02:00
John Daggett 5b570d8745 Bug 549861. Implement support for @font-feature-values rule. r=dbaron 2013-05-13 18:45:37 +09:00
Mounir Lamouri 55392b2677 Bug 838704 - Show "X files selected" when there are more than one selected file. r=sicking 2013-02-07 13:58:05 +00:00
Mounir Lamouri 8a01249a9f Bug 345195 - Replace the anonymous <input type='text'> in <input type='file'> by a xul:label. r=bz 2013-02-09 14:57:30 +00:00
Mounir Lamouri 68c0f2cae5 Bug 838354 - Remove all capture button references from nsFileControlFrame. r=bz 2013-03-22 17:10:13 +00:00
Zack Weinberg 98f3b4f04f Bug 849633: change entity names for messages changed in bug 847181. r=tchevalier,ehsan 2013-03-26 10:21:34 -04:00
Zack Weinberg b3e07ad975 Bug 847181: prune unused printing-related nsresult codes, make printing error codes available in Components.results, and improve English of printing error messages. r=smaug 2013-03-08 21:45:14 -05:00
L. David Baron 9f0532a6a2 Bug 841983: Require whitespace around 'not', 'and', and 'or' keywords in @supports rules. r=heycam
Matches spec change in https://dvcs.w3.org/hg/csswg/rev/34b185ae3bac .
2013-02-16 21:29:38 -08:00
L. David Baron a6ce971075 Bug 765599: Make CSS insertRule methods throw SYNTAX_ERR when given an empty rule or more than one rule. r=bzbarsky
This implements the proposed spec clarification in
http://lists.w3.org/Archives/Public/www-style/2013Feb/0229.html which
makes us compatible with WebKit on the insertRule tests in this patch.

I confirmed that the test reports 7 failures without the patch, but
passes with the patch.  (I'm a little disturbed by the way our
testharness.js integration elides runs of successive passes.)
2013-02-09 22:56:49 -08:00
Cameron McCormack 6550289df6 Bug 814566 - Allow invalid syntax (with balanced parentheses) inside @supports conditions. (v1.1.1) r=dbaron 2012-12-23 13:30:55 +11:00
Masatoshi Kimura d0b455915b Bug 801402 - Use FindEncodingForLabel from HTML parser. r=hsivonen 2012-11-07 18:04:22 -05:00
Simon Montagu 7b0bd7bf8b Bug 562169. Add support for :dir(ltr/rtl) CSS selector, layout/style part, r=bz 2012-08-09 20:37:58 -07:00
Matt Brubeck 3cfaa1db23 Back out bug 562169 because of Dromaeo DOM regressions
Backed out changeset 841cd6e1e585 (bug 562169)
Backed out changeset e226e413dd27 (bug 562169)
Backed out changeset 9c24b7287c5b (bug 562169)
2012-08-08 08:14:48 -07:00
Simon Montagu aed3f621eb Add support for :dir(ltr/rtl) CSS selector, layout/style part. Bug 562159, r=bz 2012-08-07 21:44:24 -07:00
Henri Sivonen d3209cdece Bug 768138 - s/must to be/must be/ in a parser error message. r=smaug. 2012-08-05 16:28:48 +03:00
Cameron McCormack 1528758ac5 Bug 649740 - Implement @supports. r=dbaron,bz 2012-08-02 10:32:12 +10:00
Arnaud Bienner 256941c07d Bug 565274 - Implement the accept attribute for the form and file upload controls for custom MIME types; r=sicking,mounir 2012-06-06 14:16:58 +02:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Ed Morley 1c884a9386 Backout 5a0fe30e6b1a (bug 565274) for M4 test_bug377624.html failures on a CLOSED TREE 2012-05-03 12:32:49 +01:00
Arnaud Bienner 1596d5df6d Bug 565274 - Implement the accept attribute for the form and file upload controls for custom MIME types. r=sicking 2012-05-03 00:49:24 +02:00
Henri Sivonen 342883de53 Bug 672453 - Whine to console about various character encoding declaration-related authoring errors. r=smaug.
--HG--
rename : extensions/universalchardet/tests/bug631751be_text.html => parser/htmlparser/tests/mochitest/file_bug672453_bomless_utf16.html
2012-03-24 13:34:42 +02:00
Henri Sivonen 18384e3ee5 Bug 708620 - Whine to console when a form is submitted in an encoding that cannot represent all of Unicode. r=smaug. 2012-01-02 16:18:30 +02:00
Jet Villegas 825b966f51 Bug 511909. Allow @-rules to nest when parsing CSS. In particular, allow them inside @media and @-moz-document. r=dbaron 2011-12-14 23:42:15 -05:00
Henri Sivonen 793696bfe8 Bug 705473 - Fix typos in the View Source error reporting strings. r=smaug. 2011-11-29 08:55:09 +02:00
Henri Sivonen ca8ad33a73 Bug 699753 - Remove duplicate copy of errNcrControlChar from htmlparser.properties. r=smaug. 2011-11-07 11:29:18 +02:00