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

317 Коммитов

Автор SHA1 Сообщение Дата
Cameron McCormack 2f1046d287 Bug 1216043 - Rename nsStyleSheet::sheetType and make it an enum class. r=dbaron
The only substantive change here, apart from a few variables changing in
size from uint16_t to uint8_t, is FontFaceSet's use of SheetType::Unknown
(0xFF) instead of 0 for FontFaceRecords for script-created FontFaces.
2015-10-20 10:16:20 +11:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Cameron McCormack e441526821 Bug 1198708 - Part 4: Don't include start/end keyword in serialized specified {transition,animation}-timing-function value if it was omitted. r=birtles
When inspecting the specified value of {transition,animation}-timing-
function on a declaration, we should omit the start/end keyword in a
steps() value if it was omitted in the style sheet.
2015-09-29 12:20:14 +10:00
Cameron McCormack 9293060eef Bug 1198708 - Part 1: Store exact timing-function type on nsTimingFunction and ComputedTimingFunction. r=birtles
Since Keyframe.easing should reflect the {transition,animation}-timing-
function value relevant to each keyframe, we'll need to store on
nsTimingFunction the specific timing function value that was used, and
copy it down into ComputedTimingFunction for
KeyframeEffectReadOnly.getFrames() to access.  This includes storing
whether the optional start/end keyword in a steps() function was
specified.
2015-09-29 12:20:13 +10:00
Gijs Kruitbosch 8884b0618e Bug 1207084 - keep sheet level on tokenstream for use in ruledata when resolving variables, to fix hcm issues with CSS variables, r=heycam
--HG--
extra : commitid : LOEulYWs1jS
extra : rebase_source : b9741e3bc6a4a762a2f6295d8d81069aca66745f
extra : amend_source : 13dd115d63546f57127fe65163c2aaacf8c6b043
2015-09-26 23:51:42 +02:00
Nicholas Nethercote 87b80f8c66 Bug 1188745 - Rename nsTArray::SizeOfExcludingThis() as ShallowSizeOfExcludingThis(). r=froydnj.
This makes it clearer that, unlike how SizeOf*() functions usually work, this
doesn't measure any children hanging off the array.

And do likewise for nsTObserverArray.

--HG--
extra : rebase_source : 6a8c8d8ffb53ad51b5773afea77126cdd767f149
2015-07-28 23:24:24 -07:00
Masatoshi Kimura 52428897a6 Backed out changeset acb7eb7f5ad4 (bug 1176496) for web compat problems 2015-07-15 23:37:22 +09:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Masatoshi Kimura 6c8654865c Bug 1176496 - Drop support for -moz-prefixed gradients. r=dbaron 2015-07-10 00:57:50 +09:00
Muhsin A. Steiman 396e117958 Bug 1172012 - Fixes a copy & paste error in nsCSSValue.cpp. r=heycam 2015-06-05 11:25:00 +02:00
Kyle Zentner 95a87c9836 Bug 1170173 - Parse CSS 'contain' property. r=dholbert
--HG--
extra : rebase_source : 73e15a3049f7e69fdecd7b45157df25fca949b0c
2015-06-04 16:38:00 +02:00
Michael Layzell 4a41f5a065 Bug 1168158 - Make URLValue::mString a smart pointer. r=heycam 2015-05-28 08:54:00 -04:00
Kyle Zentner c02e8d6ecf Bug 1164953 - Update CSS grid <line-names> to use brackets instead of parens. r=dholbert
--HG--
extra : rebase_source : 97b67ed32a193d376ac6bd7f652c98b8576293a7
2015-05-19 15:20:00 -04:00
Ehsan Akhgari c7febd7a07 Bug 1158540 - Don't repeat the mRefCnt member of URLValue in ImageValue; r=dbaron
Even after this patch, it's not OK to AddRef an ImageValue and then call
Release on its base pointer (URLValue) since URLValue refcounting methods
are not virtual, so it would confuse the leak checker, but at least it
wouldn't cause UAF issues since we'd still be looking at the same mRefCnt
member.
2015-04-25 18:38:24 -04:00
Mats Palmgren 7bb4ebd804 Bug 969756 - Add a code comment and a test. r=cam 2015-02-22 02:41:58 +00:00
Nicholas Nethercote 242708cf72 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 d3826daa16 Back out Bug 1127201 (part 2) for various problems. 2015-02-06 15:04:32 -08:00
Nicholas Nethercote d34f0301b8 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
Xidorn Quan a9545c0e64 Bug 1123917 part 2 - Make ruby-position only accept [over|under] instead of compound values. r=dholbert
--HG--
extra : rebase_source : fe13f96fe7bc771dfd899bd7ac391f565899d26d
extra : source : 480c409240940afd5e4e6ce4cf995e5e1a26e640
2015-01-22 14:04:55 +11:00
Mats Palmgren 0c2e9247ec Bug 1117538 part 1 - [css-grid] Remove 'grid-auto-flow: stack'. r=dholbert
Because it has been removed from the spec per:
http://lists.w3.org/Archives/Public/www-style/2014Dec/0321.html
2015-01-05 22:20:56 +00:00
Xidorn Quan d04c336024 Bug 1055665 part 1 - Add support for parsing & computing CSS property "ruby-position". r=dholbert
--HG--
extra : source : 2fd75789fe00d972d78a5b189f1ac50f6b2a385f
2014-12-09 17:47:18 +11:00
Dirk Schulze 123849abdb Bug 1074528 - Implement parsing/computing of inset(). r=dbaron 2014-11-22 05:28:00 +01:00
Rik Cabanier 85aa244222 Bug 1074056 - Part 1 - Add support for interpolation hints to CSS gradients. r=dbaron 2014-10-22 14:24:00 +02:00
Mats Palmgren f2d23931c0 Bug 1085701 - Report the allocation size to the OOM abort. r=roc 2014-10-21 15:42:24 +00:00
L. David Baron 87f367b612 Bug 1083461 - Convert nsCSSValue{,Pair}List::operator== back to a static Equal method so that it can be validly called on null pointers. r=bzbarsky
--HG--
extra : transplant_source : %CD%5D%9BE%FE%DE%A4%F2%B8%CF%D7%AE%84%90%3B%E8%A0d%D7%2B
2014-10-19 23:31:39 -04:00
Dirk Schulze 62628a69a2 Bug 1074522 - Implement ellipse()/circle() parsing and style computing. r=dbaron 2014-10-15 00:03:00 +02:00
Dirk Schulze a028173cff Bug 1072894 - Implement polygon() parsing for clip-path. r=heycam 2014-09-28 01:56:00 +02:00
Xidorn Quan f69d6b2935 Bug 966168 - Implement symbols() CSS function. r=dbaron 2014-09-25 02:19:00 +02:00
Carsten "Tomcat" Book 84fa1ee595 Backed out changeset d53b25dcf2d7 (bug 966168) for causing bustage 2014-09-25 09:40:40 +02:00
Xidorn Quan e94396781f Bug 966168 - Implement symbols() CSS function. r=dbaron 2014-09-24 15:32:00 +02:00
Daniel Holbert 5a3b69a27a Bug 1063775, part 2: Document nsCSSValue*List::Clone() as being infallible, and remove null-checks on its result. r=dbaron 2014-09-17 22:04:20 -07:00
Jonathan Kew 2f49b70d25 bug 1028136 - Remove dangerous public destructor of FontFamilyList. r=jdaggett 2014-07-30 09:15:00 +01:00
Ms2ger bad4ca4d29 Bug 1022855 - Rename nsCSSStyleSheet to mozilla::CSSStyleSheet; r=heycam
--HG--
rename : layout/style/nsCSSStyleSheet.cpp => layout/style/CSSStyleSheet.cpp
rename : layout/style/nsCSSStyleSheet.h => layout/style/CSSStyleSheet.h
2014-06-20 12:32:49 +02:00
Ms2ger 451c7edf83 Backout revision 308e51eae10c for build bustage.
--HG--
rename : layout/style/CSSStyleSheet.cpp => layout/style/nsCSSStyleSheet.cpp
rename : layout/style/CSSStyleSheet.h => layout/style/nsCSSStyleSheet.h
2014-06-20 13:00:08 +02:00
Ms2ger 9fb7f507f0 Bug 1022855 - Rename nsCSSStyleSheet to mozilla::CSSStyleSheet; r=heycam
--HG--
rename : layout/style/nsCSSStyleSheet.cpp => layout/style/CSSStyleSheet.cpp
rename : layout/style/nsCSSStyleSheet.h => layout/style/CSSStyleSheet.h
2014-06-20 12:32:49 +02:00
John Daggett 861e272110 Bug 280443 p2 - parse font family lists into fontlist structs. r=heycam 2014-06-06 15:09:23 +09:00
Birunthan Mohanathas 0e6f3a6562 Bug 869836 - Part 3: Use `Append('c')` instead of `AppendLiteral("c")`. r=ehsan 2014-05-22 06:48:51 +03:00
Birunthan Mohanathas 19bebbc68d Bug 869836 - Part 2: Use AppendLiteral instead of `Append(NS_LITERAL_STRING(...))`. r=ehsan 2014-05-22 06:48:50 +03:00
Mats Palmgren 34134aa78b Bug 1005567 - Remove the obsolete 'grid-auto-position' property. r=simon.sapin 2014-05-06 09:45:13 +00:00
Mats Palmgren 5cd647db72 Bug 994592 - Make 'row' the initial value for 'grid-auto-flow' and remove 'none' as a valid value. And add the 'stack' variants. r=simon.sapin 2014-05-06 09:45:13 +00:00
Eric Rahm 047f25416e Bug 1003479 - Fix incorrect usage of SizeOfIncludingThis and SizeOfExcludingThis functions. r=njn
--HG--
extra : rebase_source : 2d51e1fc1b642b0efa60cb4e25e8b142577e93d3
2014-05-01 10:37:54 -07:00
Maksim Lebedev 8d457861b8 Bug 979345 - Implement "touch-action: manipulation" CSS value for Pointer Events. r=kats,botond,dbaron,mbrubeck 2014-04-23 09:56:46 -04:00
John Daggett 89d63e9b46 Bug 997006 - rename text-combine-horizontal to text-combine-upright. r=dholbert 2014-04-17 09:15:18 +09:00
Simon Sapin 5584e3271c Bug 989755: Fix up serialization of the grid-template shorthand. r=dholbert
* Refuse to serialize some combinations of values that the shorthand
  can not represent: 'grid-template-areas: (not none)' combined with
  'grid-template-rows: subgrid' or 'grid-template-columns: subgrid'.
  (The former used to cause an assertion failure.)
* Remove an extraneous trailing space that occured when a <track-list>
  was last. (ie. followed by an omitted <line-names>)
* Add tests for the result of this serialization.
2014-03-31 13:31:00 +02:00
Simon Sapin 40a44c4767 Bug 983175 - Part 2: Add style system support for 'subgrid' in the grid-template* properties. r=dholbert
http://dev.w3.org/csswg/css-grid/#subgrids
2014-03-27 11:54:40 -04:00
Simon Sapin 6f19092d3e Bug 984760 part 2: Use GridTemplateAreasValue though nsRefPtr pointers. r=dholbert 2014-03-21 23:06:16 +08:00
Simon Sapin 98db16b1af Bug 984760 part 1: Rename nsCSSValueGridTemplateAreas to css::GridTemplateAreasValue. r=dholbert 2014-03-21 23:06:13 +08:00
Simon Sapin 9034f0f8ec Bug 981752 part 2c: Add the grid-template shorthand. r=dholbert 2014-03-21 23:06:12 +08:00
Cameron McCormack 1e049545bb Bug 984739 - Make nsCSSValue::StartImageLoad assume |new ImageValue| is infallible. r=dbaron 2014-03-18 16:49:51 +11:00
Kyle Huey fe6c4e28d6 Bug 967364: Rename already_AddRefed::get to take. r=bsmedberg 2014-03-15 12:00:15 -07:00
Simon Sapin 948f9516ef Bug 976787 part 5: Add grid-{column,row}-{start,end} and grid-auto-position to the style system. r=dholbert 2014-03-10 15:54:17 -07:00
Simon Sapin 96600c54b0 Bug 976787 part 4: Add the grid-auto-flow property to the style system. r=dholbert 2014-03-10 15:54:16 -07:00
Simon Sapin 27ad62a36d Bug 976787 part 2: Add the grid-template-areas property to the style system. r=dholbert 2014-03-10 15:54:14 -07:00
Simon Sapin 12935dcb17 Bug 976787 part 1: Add the grid-template-{columns,rows} properties to the style system. r=dholbert 2014-03-10 15:54:13 -07:00
Mats Palmgren 98f2cf5d46 Bug 969756. r=cam 2014-02-15 17:40:38 +00:00
Nick Lebedev 8f48b7bbc6 Bug 795567 - Part 1: Add touch-action css property to the style system. r=dbaron 2014-01-15 10:03:15 -05:00
Ehsan Akhgari 1b83407ce9 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 946cd13ff6 Bug 731271 - Part 5: Add support for serializing colors in nsCSSValue in their original syntactic form. r=dbaron 2013-09-16 09:35:49 +10:00
Cameron McCormack 6564f6830a Bug 731271 - Part 4: Add ability for nsCSSValues to serialize themselves in their original syntactic form. r=dbaron 2013-09-16 09:35:49 +10:00
Cameron McCormack b3b6726cef Bug 731271 - Part 2: Add new nsCSSValue units to store colors in their original syntactic form. r=dbaron 2013-09-16 09:35:48 +10:00
Cameron McCormack e93885019c Bug 731271 - Part 1: Rename eCSSUnit_Color to eCSSUnit_RGBAColor. r=dbaron 2013-09-16 09:35:48 +10: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 ae655160b2 Bug 773296 - Part 16: Add a ref-counted list nsCSSValue unit and use it for tranform lists; hold a strong reference to one on nsStyleDisplay. r=dbaron
This adds a new eCSSUnit_SharedList type for nsCSSValue, which is a
reference counted object that contains an nsCSSValueList.  We need this
so that nsStyleDisplay::mSpecifiedTransform can hold a strong reference
to a specified transform list value.  When 'transform' is specified
using a variable reference, the resulting nsCSSValue does not stick
around in the Declaration object, so we wouldn't be guaranteed that
it lives long enough for nsStyleDisplay to keep referencing it.
2013-12-12 13:09:44 +11:00
Cameron McCormack c17ac6135c Bug 773296 - Part 10: Add a new eCSSUnit_TokenStream type for storing unparsed CSS values. p=ebassi,heycam r=dbaron
Patch co-authored by Emmanuele Bassi <ebassi@gmail.com>

This adds a new nsCSSValue unit type to represent an unparsed
stream of CSS tokens as a specified value.  This is what properties
that have a variable reference get as their specified value.

On the nsCSSValueTokenStream object that is used when mUnit ==
eCSSUnit_TokenStream, we store two property IDs: first, the property
ID for the longhand that this token stream value is the value for.  We
pass this back in to nsCSSParser::ParseProperty at computed value time,
when we need to re-parse the property.  Second is the shorthand property
ID, if we used a variable reference in a shorthand.  In such a case, we
store the token stream value for each of the corresponding longhand
properties.  This is because shorthands don't actually get any storage
in an nsRuleData, and because any of the longhands might be overwritten
by subsequent declarations, we need to keep the token stream somewhere.

We also store other information on the nsCSSValueTokenStream required by
the CSS parser (base URI, etc.).
2013-12-12 13:09:42 +11:00
John Daggett 1c72ffaa67 Bug 913264 - add none value to font-variant-ligatures. r=dbaron 2013-11-19 13:30:25 +09:00
Ehsan Akhgari 35ff0cae16 Bug 938123 - Build layout/style in unified mode; r=roc 2013-11-14 21:42:57 -05:00
Cameron McCormack 48fc905829 Bug 921731 - Part 1: Add new eCSSUnit_Unset unit for nsCSSValues. r=bzbarsky 2013-10-04 04:49:17 +10:00
Ehsan Akhgari 3c5faf2f1e Bug 919355 - Part 2: Don't #include nsDeviceContext.h in Units.h; r=roc 2013-09-23 07:55:35 -04:00
Ehsan Akhgari 6ada2899b2 Bug 916610 - Minimize the #includes in layout/style; r=roc 2013-09-15 21:06:52 -04:00
Robert O'Callahan 03e7828db2 Bug 910989. Remove nsTHashtable::Init, fallible allocation, and MT hashtables. r=ehsan,bsmedberg
--HG--
extra : rebase_source : 0787130b1814c74bfb38dc178de94022f0b2e64e
2013-09-02 20:41:57 +12:00
Daniel Holbert 736bd407f4 Bug 907547: Update nsCSSValue::BufferFromString documentation to indicate that it's infallible, and remove callers' unneeded null-checks. r=bz 2013-08-21 12:31:38 -07:00
John Daggett 03504b2684 Bug 875250 - implement CSS parsing of text-orientation, text-combine-horizontal properties. r=dholbert 2013-08-19 19:26:44 +09:00
Ms2ger 1a5ae526d9 Bug 901323 - Don't include nsContentUtils.h unnecessarily; r=jlebar 2013-08-14 08:56:21 +02:00
Ehsan Akhgari 2824b29025 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
Catalin Iacob 6f4758d23e Bug 798914 (part 5) - Use newly introduced mozilla::MallocSizeOf instead of nsMallocSizeOfFun. r=njn.
--HG--
extra : rebase_source : fc472490dd978d165f02f77ed37f07aed6e5bb61
2013-06-23 14:03:39 +02:00
L. David Baron 41eb1ebd96 Bug 511803 patch 2: Convert all eCSSUnit_Function storage to use nsCSSKeyword. This leads to one behavior change, which is case canonicalization for font-variant-alternates function values. r=bzbarsky
--HG--
rename : layout/style/test/test_bug721136.html => layout/style/test/test_specified_value_serialization.html
2013-05-23 09:08:29 +08: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 3fdc406a01 Bug 549861. Changes based on review comments for parsing of font-variant-alternates. r=dbaron 2013-05-13 18:45:38 +09:00
John Daggett 6f990b3fc6 Bug 549861. Implement CSS parsing of font-variant-alternates. r=dbaron 2013-05-13 18:45:37 +09:00
John Daggett fb6fb8df81 Bug 549861. Parse simple font-variant subproperties. r=dbaron 2013-05-13 18:45:36 +09:00
Nathan Froyd 7ceff1cbc9 Bug 858131 - rewrite FloatingPoint.h to be C++-only instead of C-compatible C++; r+original-author=Waldo 2013-05-01 16:55:13 -04:00
Aryeh Gregor b8a4c64af3 Bug 859817 - Make nsStringBuffer::Alloc return already_AddRefed; r=bz 2013-04-22 14:13:22 +03:00
Ms2ger 4f5fca99bc Bug 845374 - Part l: Stop including nsIDocument.h in nsContentUtils.h and fix two nits; r=khuey 2013-03-17 08:55:15 +01:00
Kyle Huey 0660c18b2f Bug 816498: Fix some things about background attribute handling that are still broken. r=bz
As filed the bug is about table backgrounds failing to print.  The root cause of this is that we load images from the original document, because print/print-preview documents (which are static clones of the original) cannot do loads.  This results in an entry in the css::ImageValue's request table under the original document, but entry under the printing document.  Then we do layout, try to get the request, and fail, and nothing is displayed.  The solution to this is to force us to clone the request for the printing document if we're loading off the original document.  I manually verified that this does not regress Bug 560235.

While writing a test for this, we discovered another problem.  The reftest print code does not actually use the printing codepath.  Instead it takes an existing document, tears down its presshell, and creates a new presshell for printing.  Fixing the above bug did not make the reftest print test pass because ImageLoader does not deal properly with presshell destruction/recreation.  It assumes that when the presshell is destroyed all of the css::ImageValues can be cleared of their entries for that document.  This fails for ImageValues for mapped attributes because they are held alive by the content tree.  When a new presshell for this document is then created there is no entry for the document and thus no image request to paint.  The fix for this is to only clear the frame to request and request to frame mapping hashtables and not to clear the document's entry on the ImageValue when the presshell is destroyed.  The destruction of the ImageLoader (which is held from a strong reference on the document) is when those entries are removed.  The final change is to change css::ImageValue's hashtable from holding a strong reference to the keys (which are documents) to holding raw pointer references.  This is safe because we clear the relevant entry when the corresponding ImageLoader dies, and is needed to prevent a reference cycle that was being broken by presshell destruction.

--HG--
rename : layout/reftests/backgrounds/table-background-ref.html => layout/reftests/backgrounds/table-background-print-ref.html
rename : layout/reftests/backgrounds/table-background.html => layout/reftests/backgrounds/table-background-print.html
2013-02-23 06:59:43 -08:00
Cameron McCormack bc2d799592 Bug 828805 - Implement SVG paint-order property. r=bz,roc 2013-01-13 10:27:53 +11:00
Jeff Muizelaar 47c921e73e Bug 801061. Switch from imgIRequest to imgRequestProxy. r=joe
This doesn't switch all of the users yet, but is a step in the right
direction.

--HG--
extra : rebase_source : 91b4fef3f67586179c119208d000cf7629e04963
2012-10-12 08:43:01 -04:00
Jet Villegas 1958bd71d6 Bug 806068 part 1: Add support for unprefixed "initial" keyword in CSS (retaining prefixed keyword as an alias, for now). r=dholbert 2012-10-30 16:40:33 +01:00
Jacek Szpot 761b11160f Bug 792180 - Replace NS_{UN,}LIKELY with MOZ_{UN,}LIKELY; r=ehsan 2012-10-26 15:32:10 +02:00
Mats Palmgren 3b1169b70e Bug 798853, style system. r=roc,dbaron 2012-10-22 15:53:31 +02:00
Seth Fowler ed0c222ddd Bug 503720: Implement vw/vh/vmin/vmax. r=dbaron 2012-10-19 16:21:06 -07:00
Randell Jesup 65539ef89c Bug 773151: Convert nsCAutoString->nsAutoCString CLOSED TREE r=bsmedberg 2012-09-01 22:35:17 -04:00
Kyle Huey 8443a7a8f1 Bug 783162: Make mapped attributes hold the image alive. r=bz
The nsCSSValue in nsGenericHTMLElement::MapBackgroundInto is a temporary.  This causes a problem after Bug 697230 landed, because the nsCSSValue::Image we put into that value is destroyed once we're done doing style stuff.  Previously the nsImageLoader would grab the request off the nsCSSValue::Image and hold it alive.  Bug 697230 changed the behavior here; now when the nsCSSValue::Image is destroyed it tells the image loader to drop the request.  The result is that all the references to the request are dropped and the frame is never told it has a background.

The solution is to keep the nsCSSValue::Image alive longer.  This patch adds two new types of nsAttrValue.  The first is an nsCSSValue::URL.  A ParseBackgroundAttribute method is added on nsGenericHTMLElement that the relevant elements (body/td/th/table/tr/tbody/thead/tfoot) call that parses background into an nsCSSValue::URL.  The second is an nsCSSValue::Image.  nsGenericHTMLElement::MapBackgroundInto attempts to convert the nsCSSValue::URL into an nsCSSValue::Image by kicking off the image load.  The result is that image loads are only started when the element is actually visible.  This also mirrors the way background-image works.  This also allows us to fix two longstanding bugs in this code.  Since MapBackgroundInto doesn't have a pointer to the actual element, it relied on grabbing the principal of the document.  Now we can grab the principal of the node in ParseBackgroundAttribute.  MapBackgroundInto also has no way to get at the element's base URI (to honor xml:base), which is now possible in ParseBackgroundAttribute.

nsCSSValue::[Image|URL] have also been moved to be mozilla::css::[Image|URL]Value.  nsAttrValue.h is included in external linkage code, so it can't include nsCSSValue.h to get the declarations of nsCSSValue::[Image|URL], and nested classes can't be forward declared.  Moving the classes to a namespace solves the problem.

Finally some old inoperative quirks mode code was removed.  This code has done nothing since Bug 273078 was landed in 2004.
2012-08-24 10:50:49 -07:00
Ehsan Akhgari e368dc9c85 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
Kyle Huey 2e07e6f8c2 Bug 697230: Part 1 - Centralize style image observers. r=bz 2012-08-13 15:04:19 -07:00
Simon Montagu 5d272daa1b Implement the new CSS property value unicode-bidi: isolate-override. Bug 774335, r=dbaron 2012-08-07 01:42:46 -07:00
Aryeh Gregor d0ad5a7d0c Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
David Zbarsky 71ad884431 Bug 773500 Part 1:Store z-component of transform-origin as 0 rather than null when it is omitted. r=dbaron 2012-07-21 19:48:19 -04:00
Masatoshi Kimura 364cab6dd4 Bug 752187 - Part 11: Implement serializing unprefixed gradients. r=dbaron 2012-07-07 10:27:09 -04:00
Masatoshi Kimura 2a19870d92 Bug 752187 - Part 9: Implement unprefixed radial-gradient parsing. r=dbaron 2012-07-07 10:27:08 -04:00
Masatoshi Kimura 63ae4a505b Bug 752187 - Part 6: Rename mIsToCorner to mIsLegacySyntax. r=dbaron 2012-07-07 10:27:08 -04:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Mats Palmgren 002ab4cc2a Bug 615112 - Use correct type for a string length. r=bz 2012-05-04 02:14:01 +02:00
John Daggett 4984947d00 Bug 718539. Update font-feature-settings to latest spec syntax. r=dbaron 2012-04-26 15:24:26 +09:00
Kyle Huey 5e3fddb58d Back out Bug 679230 due to Android reftest failures. 2012-04-07 10:36:49 -07:00
Kyle Huey dd495263dd Bug 697230: Part 1 - Centralize style image observers. r=bz 2012-04-07 08:58:41 -07:00
Zack Weinberg f4fb4a1991 Bug 729142 - Convert layout/style to MOZ_STATIC_ASSERT. r=dbaron 2012-02-23 08:19:00 -08:00
Jesse Ruderman 56efad1b1d Bug 726465 - Add eCSSUnit_Turn case to nsCSSValue::SizeOfExcludingThis. r=bz 2012-02-12 17:51:58 -08:00
Boris Zbarsky e0c4316236 Bug 716628. Implement support for 'turn' unit in CSS. r=dbaron 2012-02-04 00:01:23 -05:00
Nicholas Nethercote 0709e1673b Bug 671299 (part 3) - Add style sheet memory reporters. r=dbaron. 2012-01-02 18:19:14 -08:00
William Chen e1ff790f8b Bug 497995: Part 1 - Implement border-image revisions in latest css3-background spec. r=dbaron
--HG--
extra : rebase_source : 5a6cdac6a4b1353170f23f39dd2a209374e72531
2011-12-22 18:34:45 -05:00
Masatoshi Kimura 270439fd7b Bug 685400 - add "to" syntax and "magic corner" feature to CSS linear gradient. r=dbaron
--HG--
rename : layout/reftests/css-gradients/linear-ref.html => layout/reftests/css-gradients/linear-1-ref.html
rename : layout/reftests/css-gradients/linear.html => layout/reftests/css-gradients/linear-1b.html
rename : layout/reftests/css-gradients/linear-diagonal-1-ref.html => layout/reftests/css-gradients/linear-diagonal-1c.html
rename : layout/reftests/css-gradients/linear-diagonal-2-ref.html => layout/reftests/css-gradients/linear-diagonal-2c.html
rename : layout/reftests/css-gradients/linear-diagonal-3-ref.html => layout/reftests/css-gradients/linear-diagonal-3c.html
rename : layout/reftests/css-gradients/linear-diagonal-4-ref.html => layout/reftests/css-gradients/linear-diagonal-4c.html
rename : layout/reftests/css-gradients/linear-keywords-ref.html => layout/reftests/css-gradients/linear-keywords-1-ref.html
rename : layout/reftests/css-gradients/linear-keywords.html => layout/reftests/css-gradients/linear-keywords-1b.html
2011-10-22 21:41:11 +02:00
Zack Weinberg 954dd90cef Bug 659963: consistently use infallible malloc in the CSS parser. r=dbaron 2011-05-28 15:38:48 -07:00
Simon Montagu 738e432597 Support for unicode-bidi: -moz-isolate and -moz-plaintext in style system. Bug 613149, r=dbaron 2011-10-18 14:51:57 +02:00
Ehsan Akhgari 92064e6d3f Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Michael Wu d2b70213ac Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Neil Rashbrook e626e8ff0c Bug 611503 Constructing an nsTDependentString from an nsTAString makes no sense r=dbaron,dwitte 2011-09-15 08:40:17 +01:00
Neil Rashbrook 396ec9d7bf Backout of bug 611503 because Android has some weird string code 2011-09-14 21:14:57 +01:00
Neil Rashbrook 12e76a497d Bug 611503 Constructing an nsTDependentString from an nsTAString makes no sense r=dbaron,dwitte 2011-09-14 20:21:20 +01:00
Matt Woodrow 236f72943c Bug 505115 - Part 11a - Add nsCSSValueTriplet and optionally read a z component to -moz-transform-origin. r=dbaron 2011-08-03 15:04:23 +12:00
Matt Woodrow 5afc317166 Bug 505115 - Part 3 - Convert nsStyleTransformMatrix to be backed by a 4x4 matrix. r=dbaron 2011-07-23 10:28:07 +12:00
Mats Palmgren c67e539503 Bug 645142 - "ABORT: negative lengths and percents should be rejected by parser" with huge font size. r=dbaron 2011-05-11 18:49:57 +02:00
Boris Zbarsky d034eefa80 Bug 597291. Create nsIURI objects lazily for nsCSSValue::URL, so that we don't pay the cost of creating the ones we don't actually need. r=dbaron
In the new setup, the mURL member of nsCSSValue::URL stores either the actual URI pointed to or the base URI; a boolean flag keeps track of which is stored.  Consumers use GetURI() to get the URI instead of raw access to mURI, and GetURI calls NS_NewURI as needed.
2011-05-11 11:28:53 -04:00
Masayuki Nakano 1adf21f3e7 Bug 647421 -moz-text-decoration-color and -moz-text-decoration-style should be reset by text-decoration r=dbaron, sr=bzbarsky 2011-04-23 14:16:41 +09:00
L. David Baron 72447213b1 Remove parsing and storage code for CSS 2.0 aural properties. (Bug 649119) r=bzbarsky 2011-04-21 20:17:32 -07:00
L. David Baron 7bee896472 Implement step-start, step-end, and steps() timing functions. (Bug 435442, patch 0) r=bzbarsky 2011-04-11 23:18:42 -07:00
L. David Baron 90eaa47be4 Move nsCSSCornerSizes from nsCSSStruct.h/cpp to nsCSSValue.h/cpp. (Bug 645620, patch 3) r=bzbarsky 2011-03-28 16:07:26 -07:00
Daniel Holbert 0a34a22927 Bug 615977: Make nsCSSValue::BufferFromString() return an already_AddRefed pointer. r=dbaron a=roc
--HG--
extra : rebase_source : b4048d8fbde522f05a01df693887e0e26a5afb97
2010-12-05 13:17:29 +00:00
Boris Zbarsky dab4af6147 Bug 608914 part 2. Get rid of some temporary strings now that we can AppendFloat to an nsAString. r=dbaron 2010-11-30 13:18:15 -05:00
Dave Townsend f322fea87c Backing out bug 614058, bug 609272, bug 478445, bug 499628, bug 605296, bug 608914 and bug 614724 due to potentially causing bug 615736 CLOSED TREE. a=backout 2010-12-01 11:01:56 -08:00
Boris Zbarsky 3fe2b9b4bb Bug 608914 part 2. Get rid of some temporary strings now that we can AppendFloat to an nsAString. r=dbaron 2010-11-30 13:18:15 -05:00
Olli Pettay cb1c9c5737 Bug 560235 - background image in print-specific style sheet not printed and not displayed in print preview, r=dbaron, a=blocking 2010-10-09 13:03:06 +03:00
L. David Baron 8e923adf2c Remove support for min() and max() in calc(): remove support for parsing and storage. (Bug 363249) r=bzbarsky a2.0=blocking2.0:beta6 2010-09-11 09:27:12 -07:00
Zack Weinberg 2b0421048a Bug 576044 (11/12): Make all assertions fatal in Declaration.h, Declaration.cpp, nsCSSDataBlock.h, nsCSSDataBlock.cpp, nsCSSValue.h, nsCSSValue.cpp, nsCSSProps.h, and nsCSSProps.cpp. r=dbaron a2.0=dbaron 2010-08-19 15:33:44 -04:00
Zack Weinberg ca47f883ec Bug 576044 (5/12): eliminate ValueList as a storage type. r=dbaron a2.0=dbaron 2010-08-19 15:33:44 -04:00
Zack Weinberg 69b647977d Bug 576044 (4/12): eliminate ValuePairList as a storage type. r=dbaron a2.0=dbaron 2010-08-19 15:33:44 -04:00
Zack Weinberg 124282380a Bug 576044 (3/12): eliminate Rect as a storage type. r=dbaron a2.0=dbaron 2010-08-19 15:33:44 -04:00
Zack Weinberg c95db1a5f9 Bug 576044 (2/12): eliminate ValuePair as a storage type. r=dbaron a2.0=dbaron 2010-08-19 15:33:44 -04:00
Zack Weinberg 565ea99bfc Bug 576044 (1/12): Move all the CSS 'storage types' (rect, value pair, etc) to nsCSSValue.h and their code to nsCSSValue.cpp. r=dbaron a2.0=dbaron 2010-08-19 15:33:43 -04:00
Robert O'Callahan 3133bff6c6 Bug 537890. Part 10: Fix nsPresContext and nsIDeviceContext unit-conversion methods to be explicit about using CSS logical units instead of physical units. r=dbaron 2010-08-13 21:58:04 +12:00
Robert O'Callahan ff8ac74b16 Bug 537890. Part 5: Make pc, in, mm and cm be a fixed number of CSS pixels. r=dbaron 2010-08-13 21:58:02 +12:00
Robert O'Callahan 049e9fe833 Bug 537890. Part 4.5: Create 'mozmm' unit for physical millimeters on screen devices. r=dbaron 2010-08-13 21:58:02 +12:00
Robert O'Callahan c0a3a641e0 Bug 537890. Part 4: Make points be a fixed number of CSS pixels. r=dbaron 2010-08-13 21:58:01 +12:00
Robert O'Callahan 25324c072d Backing out bug 584282 and bug 537890 2010-08-14 02:35:06 +12:00
Markus Stange fae48f3bbd Bug 506826 - Parsing for background-image: -moz-element(#elementID). r=dbaron 2010-08-13 15:33:37 +02:00
Zack Weinberg b0de4806b7 Bug 569719 part 6: Move Declaration::AppendCSSValueToString into nsCSSValue. r=dbaron 2010-07-23 11:00:27 -07:00
Robert O'Callahan 339b3340da Bug 537890. Part 10: Fix nsPresContext and nsIDeviceContext unit-conversion methods to be explicit about using CSS logical units instead of physical units. r=dbaron 2010-08-13 21:58:04 +12:00
Robert O'Callahan 4e69a7ecad Bug 537890. Part 5: Make pc, in, mm and cm be a fixed number of CSS pixels. r=dbaron 2010-08-13 21:58:02 +12:00
Robert O'Callahan 46ae2ef8d0 Bug 537890. Part 4.5: Create 'mozmm' unit for physical millimeters on screen devices. r=dbaron 2010-08-13 21:58:02 +12:00
Robert O'Callahan fd75e64333 Bug 537890. Part 4: Make points be a fixed number of CSS pixels. r=dbaron 2010-08-13 21:58:01 +12:00