Commit Graph

329 Commits

Author SHA1 Message Date
Mats Palmgren
96a4296719 Bug 1118820 part 1 (style system part) - [css-grid] Implement the 'auto-fill' and 'auto-fit' keywords in the repeat() function. r=dholbert 2015-12-22 23:03:15 +01:00
Nicholas Nethercote
262f17feb6 Bug 1229458 - Remove SizeOfIncludingThisMustBeUnshared() from string classes. r=mccr8.
The patch changes all uses of SizeOfIncludingThisMustBeUnshared() to
SizeOfIncludingThisIfUnshared(). This incurs the (tiny) cost of an unnecessary
IsReadonly() check for guaranteed-unshared strings, but avoids the possible
assertion failures that would occur when MustBeUnshared() was used incorrectly
on shared strings, which is an easy mistake to make.
2015-12-01 15:36:26 -08:00
Xidorn Quan
0856abb2ea Bug 1040668 part 2 - Parse and compute text emphasis properties. r=dbaron 2015-11-28 11:56:33 +11:00
Daniel Holbert
ca2ca468f3 Bug 1227377: Change ImageRequest::mRequests hashtable to use more specific type in its key (s/nsISupports/nsIDocument/). r=khuey 2015-11-27 14:54:47 -08:00
Nicholas Nethercote
27264d547e Bug 1187144 (part 4) - Replace nsBaseHashtable::Enumerate() calls in layout/ with iterators. r=dholbert. 2015-11-22 21:12:49 -08:00
Mats Palmgren
3149757e26 Bug 1176782 part 6 - [css-align] Implement additional syntax and values for the 'align-content' property in the style system. r=cam 2015-11-03 15:18:06 +01:00
Mats Palmgren
623054f187 Bug 1176782 part 5 - [css-align] Implement additional syntax and values for the 'align-self' property in the style system. r=cam 2015-11-03 15:18:06 +01:00
Mats Palmgren
e0422d1e26 Bug 1176782 part 4 - [css-align] Implement additional syntax and values for the 'align-items' property in the style system. r=cam 2015-11-03 15:18:05 +01:00
Mats Palmgren
c3f3c9abcd Bug 1176782 part 3 - [css-align] Implement additional syntax and values for the 'justify-content' property in the style system. r=cam 2015-11-03 15:18:05 +01:00
Mats Palmgren
1b223d253e Bug 1176782 part 2 - [css-align] Implement the 'justify-self' property in the style system. r=SimonSapin 2015-11-03 15:18:05 +01:00
Mats Palmgren
f9f7acdb17 Bug 1176782 part 1 - [css-align] Implement the 'justify-items' property in the style system. r=SimonSapin 2015-11-03 15:18:05 +01:00
L. David Baron
65ca5daeb4 Bug 1215702 patch 1 - Remove the CSS properties that use CSS_PROP_BACKENDONLY (marks, orphans, page, size, widows), i.e., properties that were added in early Gecko days but never actually implemented. r=heycam
We're violating http://www.w3.org/TR/CSS/#partial by leaving this
implementation in when we don't actually support the properties.

We're also incorrectly parsing marks and size in style rules rather than
@page rules; they were only intended for @page rules.
2015-10-19 22:22:34 -07:00
Cameron McCormack
b5fd6acd46 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
4e6d8f6705 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
2015-10-18 01:24:48 -04:00
Cameron McCormack
8e34f7ce0d 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
bce6e5658b 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
a8d12e502b Bug 1207084 - keep sheet level on tokenstream for use in ruledata when resolving variables, to fix hcm issues with CSS variables, r=heycam 2015-09-26 23:51:42 +02:00
Nicholas Nethercote
37d91ed8fe 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.
2015-07-28 23:24:24 -07:00
Masatoshi Kimura
8a64f334be Backed out changeset acb7eb7f5ad4 (bug 1176496) for web compat problems 2015-07-15 23:37:22 +09:00
Birunthan Mohanathas
a29151dc87 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
99d4901bcb Bug 1176496 - Drop support for -moz-prefixed gradients. r=dbaron 2015-07-10 00:57:50 +09:00
Muhsin A. Steiman
2fd783c288 Bug 1172012 - Fixes a copy & paste error in nsCSSValue.cpp. r=heycam 2015-06-05 11:25:00 +02:00
Kyle Zentner
f45a2d8762 Bug 1170173 - Parse CSS 'contain' property. r=dholbert 2015-06-04 16:38:00 +02:00
Michael Layzell
643860aa12 Bug 1168158 - Make URLValue::mString a smart pointer. r=heycam 2015-05-28 08:54:00 -04:00
Kyle Zentner
2fa5c69ade Bug 1164953 - Update CSS grid <line-names> to use brackets instead of parens. r=dholbert 2015-05-19 15:20:00 -04:00
Ehsan Akhgari
51a401b5ed 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
57ea2d5d33 Bug 969756 - Add a code comment and a test. r=cam 2015-02-22 02:41:58 +00:00
Nicholas Nethercote
0247de46d8 Bug 1127201 (attempt 2, part 1) - Replace most NS_ABORT_IF_FALSE calls with MOZ_ASSERT. r=Waldo. 2015-02-09 14:34:50 -08:00
Andrew McCreight
e048a7df33 Back out Bug 1127201 (part 2) for various problems. 2015-02-06 15:04:32 -08:00
Nicholas Nethercote
40ab0270d5 Bug 1127201 (part 2) - Convert all NS_ABORT_IF_FALSE calls to MOZ_ASSERT. r=Waldo. 2015-02-04 20:05:36 -08:00
Xidorn Quan
99933f2774 Bug 1123917 part 2 - Make ruby-position only accept [over|under] instead of compound values. r=dholbert 2015-01-22 14:04:55 +11:00
Mats Palmgren
112eaa3daf 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
3410d5d6db Bug 1055665 part 1 - Add support for parsing & computing CSS property "ruby-position". r=dholbert 2014-12-09 17:47:18 +11:00
Dirk Schulze
cbf9adb5d4 Bug 1074528 - Implement parsing/computing of inset(). r=dbaron 2014-11-22 05:28:00 +01:00
Rik Cabanier
44a08ab2ac Bug 1074056 - Part 1 - Add support for interpolation hints to CSS gradients. r=dbaron 2014-10-22 14:24:00 +02:00
Mats Palmgren
fa96467143 Bug 1085701 - Report the allocation size to the OOM abort. r=roc 2014-10-21 15:42:24 +00:00
L. David Baron
be3d10e18f 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 2014-10-19 23:31:39 -04:00
Dirk Schulze
2fd2d32ccc Bug 1074522 - Implement ellipse()/circle() parsing and style computing. r=dbaron 2014-10-15 00:03:00 +02:00
Dirk Schulze
c3c99dcc17 Bug 1072894 - Implement polygon() parsing for clip-path. r=heycam 2014-09-28 01:56:00 +02:00
Xidorn Quan
8a90632dfd Bug 966168 - Implement symbols() CSS function. r=dbaron 2014-09-25 02:19:00 +02:00
Carsten "Tomcat" Book
55fcae0970 Backed out changeset d53b25dcf2d7 (bug 966168) for causing bustage 2014-09-25 09:40:40 +02:00
Xidorn Quan
188c5b8da6 Bug 966168 - Implement symbols() CSS function. r=dbaron 2014-09-24 15:32:00 +02:00
Daniel Holbert
fb91661d69 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
d6388d5ce5 bug 1028136 - Remove dangerous public destructor of FontFamilyList. r=jdaggett 2014-07-30 09:15:00 +01: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
John Daggett
348e0cd17d Bug 280443 p2 - parse font family lists into fontlist structs. r=heycam 2014-06-06 15:09:23 +09:00
Birunthan Mohanathas
9f41043f62 Bug 869836 - Part 3: Use Append('c') instead of AppendLiteral("c"). r=ehsan 2014-05-22 06:48:51 +03:00
Birunthan Mohanathas
1ebdb921a5 Bug 869836 - Part 2: Use AppendLiteral instead of Append(NS_LITERAL_STRING(...)). r=ehsan 2014-05-22 06:48:50 +03:00