Commit Graph

279 Commits

Author SHA1 Message Date
Robert O'Callahan
70770254da Bug 968118. Make nsCSSProps keyword tables be int16_t instead of int32_t for a small space win. r=heycam
--HG--
extra : rebase_source : 94cf09d0d96dd3c8e2a9528f5d242e36e85fcf75
2014-02-06 00:10:44 +13:00
Nick Lebedev
5df6a34bc1 Bug 795567 - Part 1: Add touch-action css property to the style system. r=dbaron 2014-01-15 10:03:15 -05:00
Frédéric Wang
7173c75ff7 Bug 838506 - Part 1: Add a -moz-math-display property. r=heycam 2014-01-14 09:39:50 -05:00
Cameron McCormack
b6a267e600 Bug 773296 - Part 14: Add an nsCSSProps::IsInherited function. r=dbaron
Add a helper function to nsCSSProps to look up whether a given
nsCSSProperty lives in a style struct for inherited properties.
2013-12-12 13:09:43 +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
5edbefbd77 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
Birunthan Mohanathas
759ab69b0a 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
Jonathan Watt
83950e2b2e 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
Daniel Holbert
c18f9c69ce Bug 939905: Add support for CSS "flex-flow" shorthand property. r=heycam 2013-12-05 10:57:51 -08:00
Daniel Holbert
0ddb39c806 Bug 702508 part 2: Support parsing/computing the CSS property "align-content". r=dbaron 2013-12-05 10:57:50 -08:00
Daniel Holbert
99dab87905 Bug 702508 part 1: Support parsing/computing the CSS property "flex-wrap". r=dbaron 2013-12-05 10:57:50 -08:00
Xidorn Quan
68e4d23fbf Bug 934072 - Part 3: Implement complex CJK ideographic counter styles. r=jfkthame 2013-12-02 12:51:26 -05:00
Xidorn Quan
8dbe908ce9 Bug 934072 - Part 2: Add counter style cjk-decimal. r=jfkthame 2013-12-02 12:51:26 -05:00
James Kitchener
deb5493772 Bug 114365 - Add CSS properties for -moz-math-variant. r=heycam 2013-12-02 11:49:00 -05:00
John Daggett
dfda06fba9 Bug 913264 - add none value to font-variant-ligatures. r=dbaron 2013-11-19 13:30:25 +09:00
Gijs Kruitbosch
d283ec620c Merge m-c to ux 2013-11-18 13:44:32 +01:00
Gijs Kruitbosch
081b5f4b6b Merge mozilla-central and ux 2013-11-11 09:29:29 +01:00
Daniel Holbert
120abc396f Bug 936100 part 5: Remove usage of flexbox pref from C++ code. r=mats 2013-11-09 07:53:14 -08:00
Ehsan Akhgari
4ff4da4197 Bug 938123 - Build layout/style in unified mode; r=roc 2013-11-14 21:42:57 -05:00
Gijs Kruitbosch
940ab43e16 Merge m-c to ux 2013-10-28 10:18:27 +01:00
Mats Palmgren
115c33a3a9 Bug 929991 - Put 'text-align: true X' support behind a preference (disabled by default). r=heycam 2013-10-27 20:56:32 +00:00
Mats Palmgren
980b7e6b0a Bug 929991 - Style system implementation of 'text-align: true X'. r=heycam 2013-10-27 20:56:32 +00:00
Mats Palmgren
1a8127e873 Bug 914432 - Add support for multiple prefs to enable/disable values in the same property keyword table. r=dbaron 2013-10-27 20:56:32 +00:00
Gijs Kruitbosch
8539a04699 Merge mozilla-central and ux 2013-10-04 07:51:17 +02:00
Cameron McCormack
01163bc21b Bug 842329 - Part 1: Add "all" shorthand property. r=bzbarsky 2013-10-04 04:49:19 +10:00
Gijs Kruitbosch
07d7d08613 Merge mozilla-central and ux 2013-09-30 19:26:47 +02:00
Cameron McCormack
55bb09ead5 Bug 921797 - Make nsCSSProps::BuildShorthandsContainingTable support -moz-appearance being a shorthand subproperty. r=bzbarsky 2013-09-30 13:23:43 +10:00
Gijs Kruitbosch
495e7495d1 Merge mozilla-central and ux 2013-09-26 10:26:16 +02:00
Gijs Kruitbosch
240869fd9c Merge mozilla-central and ux 2013-09-17 11:58:14 +02:00
Ehsan Akhgari
86a457baf2 Bug 916610 - Minimize the #includes in layout/style; r=roc 2013-09-15 21:06:52 -04:00
stefanh@inbox.com
5160c3c352 Bug 916491 - Remove -moz-mac-alternateprimaryhighlight. r=mstange. 2013-09-15 00:44:50 +02:00
Gijs Kruitbosch
f55435100e Merge m-c to ux 2013-09-15 19:30:19 +02:00
Matthew Noorenberghe
1f8ae35067 Merge mozilla-central to UX 2013-09-06 17:54:20 -07:00
Gijs Kruitbosch
9ffae9f766 Merge mozilla-central and ux 2013-08-29 15:30:00 +02:00
Seth Fowler
bcd260ddfc Bug 825771 (Part 1) - Add CSS support for the image-orientation property. r=dbaron 2013-08-28 15:39:06 -07:00
Corey Ford
6ec5cfd903 Bug 886646 - Part 1: Support position:sticky in the CSS parser, enabled by a preference. r=heycam 2013-09-05 15:47:08 -07:00
Gijs Kruitbosch
d129b430ff Merge m-c to ux 2013-08-20 10:49:07 +02:00
Matthew Noorenberghe
f84d7b3761 Merge mozilla-central to UX 2013-08-19 14:49:03 -07:00
John Daggett
fd57425fcc Bug 904263 - check pref settings more efficiently. r=dbaron 2013-08-19 13:49:49 +09:00
Mike Conley
fcea860595 Automated merge with https://hg.mozilla.org/mozilla-central 2013-08-12 17:07:53 -04:00
Gijs Kruitbosch
f6ec1e3db6 Merge m-c to UX 2013-08-07 21:09:10 +02:00
Rik Cabanier
f1d4f25d93 Bug 901375 - Implement support in CSS for mix-blend-mode; r=heycam 2013-08-07 16:59:10 +09:00
Matthew Noorenberghe
7d6ff1cecf Merge mozilla-central to UX 2013-08-06 23:06:26 -07:00
Masayuki Nakano
8ea1abaca9 Bug 812995 Support 'blink' value at -moz-text-decoration-line and drop -moz-text-blink r=dbaron 2013-08-06 23:02:34 +09:00
Matthew Noorenberghe
d79cbda60c Merge mozilla-central to UX 2013-07-30 19:16:50 -07:00
Gijs Kruitbosch
211b357473 Merge m-c to UX 2013-07-30 20:27:46 +02:00
Max Vujovic
e4f9873c6f Bug 898175 - Refactor filter parsing to use a keyword lookup table for filter function names. r=dbaron 2013-08-06 17:53:30 +10:00
Matthew Noorenberghe
7f2fedf98a Merge mozilla-central to UX 2013-07-23 23:40:52 -07:00
Ehsan Akhgari
5ee21d6d3f Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo
This patch was mostly generated by running the following scripts on the codebase, with some
manual changes made afterwards:

# static_assert.sh
#!/bin/bash
# Command to convert an NSPR integer type to the equivalent standard integer type

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 "*.cc" \
         -o -iname "*.mm" \) | \
    xargs -n 1 `dirname $0`/assert_replacer.py #sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_STATIC_ASSERT static_assert
hg rev --no-backup mfbt/Assertions.h \
                   media/webrtc/signaling/src/sipcc/core/includes/ccapi.h \
                   modules/libmar/src/mar_private.h \
                   modules/libmar/src/mar.h


# assert_replacer.py
#!/usr/bin/python

import sys
import re

pattern = re.compile(r"\bMOZ_STATIC_ASSERT\b")

def replaceInPlace(fname):
  print fname
  f = open(fname, "rw+")
  lines = f.readlines()
  for i in range(0, len(lines)):
    while True:
      index = re.search(pattern, lines[i])
      if index != None:
        index = index.start()
        lines[i] = lines[i][0:index] + "static_assert" + lines[i][index+len("MOZ_STATIC_ASSERT"):]
        for j in range(i + 1, len(lines)):
          if lines[j].find("                 ", index) == index:
            lines[j] = lines[j][0:index] + lines[j][index+4:]
          else:
            break
      else:
        break
  f.seek(0, 0)
  f.truncate()
  f.write("".join(lines))
  f.close()

argc = len(sys.argv)
for i in range(1, argc):
  replaceInPlace(sys.argv[i])

--HG--
extra : rebase_source : 4b4a4047d82f2c205b9fad8d56dfc3f1afc0b045
2013-07-18 13:59:53 -04:00
John Daggett
4e3a388690 Bug 875250 - implement CSS parsing of text-orientation, text-combine-horizontal properties. r=dholbert 2013-08-19 19:26:44 +09:00