Commit Graph

10 Commits

Author SHA1 Message Date
Jared Wein
9d98424d64 Bug 1211479 - Errors when parsing substituting variables should include the generated string to help diagnose the issue. r=bz 2015-10-05 14:04:00 +02:00
Ms2ger
7f901a51fa Bug 1022855 - Rename nsCSSStyleSheet to mozilla::CSSStyleSheet; r=heycam 2014-06-20 12:32:49 +02:00
Ms2ger
78134e6fa1 Backout revision 308e51eae10c for build bustage. 2014-06-20 13:00:08 +02:00
Ms2ger
f747edc3e4 Bug 1022855 - Rename nsCSSStyleSheet to mozilla::CSSStyleSheet; r=heycam 2014-06-20 12:32:49 +02:00
Ehsan Akhgari
68bfe70f09 Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc
This patch was automatically generated by the following script:

#!/bin/bash
# Command to convert PRUnichar to char16_t

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*modules/libmar*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name prtypes.h \
       ! -name Char16.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 PRUnichar char16_t
2014-01-04 10:02:17 -05:00
Cameron McCormack
84782ff7eb 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
Joshua Cranmer
697498ab75 Bug 856108 - Port static analyses to clang, part 2e: use MOZ_STACK_CLASS in layout. r=mats 2013-04-11 22:20:45 -05:00
Zack Weinberg
92eae2fea1 Bug 413958: report the text of the offending line in CSS error messages. r=dbaron 2013-01-11 12:27:43 -05:00
Zack Weinberg
811234489f Bug 455839: simplify the CSS error reporting API. r=dbaron 2012-11-15 11:36:15 -05:00
Zack Weinberg
24e58411e8 Bug 516091: Split CSS error reporting to its own file and class. Allows CSS scanner to become a stack object. r=dbaron 2012-11-15 11:36:15 -05:00