Commit Graph

147 Commits

Author SHA1 Message Date
Randell Jesup
29ac5c0b8c Bug 773151: Convert nsCAutoString->nsAutoCString CLOSED TREE r=bsmedberg 2012-09-01 22:35:17 -04:00
Raphael Catolino
e0f22a3469 Bug 781313 - Move the euclidGcd and lcm algos form nsStyleAnimation.cpp to mfbt/MathAlgorithms.h r=dbaron,luke 2012-08-26 22:58:23 -03:00
Kyle Huey
0cae034974 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
8c296bbcd4 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
David Zbarsky
bde306fdca Bug 755084 Part 2: Perform CSS animations of transform and opacity on the compositor r=roc, dbaron 2012-07-31 10:28:21 -07:00
Aryeh Gregor
4fc090c08b Bug 734953 - Restore transform: skew() support; r=dbaron 2012-07-30 16:48:02 +03:00
Mark Finkle
a4d33f44cf Backout 169ff207ed19, a34baed70c1b, f9ccdd490bd7, 39550ed860e6, 2194a2dd66b2, 908eb2e26843, a76e0a267f26 due to mobile viewport bustage (bug 778580) 2012-07-30 14:36:12 -04:00
Aryeh Gregor
57c0ad57fb Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
David Zbarsky
c76cb082e0 Bug 755084 Part 2: Perform CSS animations of transform and opacity on the compositor r=roc, dbaron 2012-07-27 13:23:44 -07:00
Ed Morley
0981437de6 Backout 1244b8a8e57a (bug 755084), 32d16d0f87c9 (bug 706179), 8548e016d4a9 (bug 768440), 697f5b87eae9 (bug 768440), 808fc2bd4e8c (bug 755084), 54b1484cd125 (bug 755084), 876726b632c0 (bug 706179) for xul android R3 failures 2012-07-25 16:37:04 +01:00
David Zbarsky
bb16aa6296 Bug 755084 Part 2: Perform CSS animations of transform and opacity on the compositor r=roc, dbaron 2012-07-25 01:48:09 -07:00
Matt Brubeck
091f852d76 Back out f4f5189b1d0c, 3b4f0606c547, b8a5a1ab8a5f, 5078933d6954, 7e0260c45de9 (bug 768440, bug 755084, bug 706179) because of reftest failures 2012-07-23 20:25:51 -07:00
David Zbarsky
730141f891 Bug 755084 Part 2: Perform CSS animations of transform and opacity on the compositor r=roc, dbaron 2012-07-23 17:34:46 -07:00
David Zbarsky
6c02265ed9 Bug 773500 Part 2: nsStyleAnimation should null check z-component of nsCSSValueTriplet r=dbaron 2012-07-21 19:48:33 -04:00
David Zbarsky
b4d3e9c048 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
David Zbarsky
ef0b4d3387 Bug 769193 - Interpolate between transform functions that share common primitives rather than forcing them to fall back to matrix decomposition. r=dbaron 2012-07-20 14:08:37 -04:00
Ehsan Akhgari
f9aca3179f Backout changeset e62e0d2137b6 (bug 773500) because of mochitest-4 bustage 2012-07-13 16:02:06 -04:00
David Zbarsky
e813dc2a38 [Bug 773500] nsStyleAnimation checks for common units of nsCSSValuePair/Triplet are screwy r=dbaron 2012-07-13 11:49:31 -07:00
Daniel Holbert
240b1f795a Bug 696253, patch 6: implement parsing/computation for CSS properties 'flex-grow' and 'flex-shrink'. r=dbaron 2012-07-06 17:06:22 -07:00
Daniel Holbert
ddeaa7a0d3 Bug 696253, patch 2: implement parsing/computation for CSS property 'order'. r=dbaron 2012-07-06 17:06:19 -07:00
Gervase Markham
87620f5676 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Ms2ger
d2344a53dc Bug 745523 - Part a: prepare for unprefixing transforms by removing the prefix from internal APIs; r=dbaron 2012-05-05 11:00:04 +02:00
Aryeh Gregor
38268f4f4e Bug 734953 - Remove skew() transformation function; r=dbaron 2012-03-20 13:39:57 -04:00
Zack Weinberg
dc30af584b Bug 729142 - Convert layout/style to MOZ_STATIC_ASSERT. r=dbaron 2012-02-23 08:19:00 -08:00
Lazar Sumar
7aecc893d8 Bug 729126 - Make NS_ABORT_IF_FALSE fire on failure for only some callers of AddCSSValuePixelPercentCalc (the existing ones, and not the new ones added in bug 522607). r=dbaron 2012-02-23 11:40:41 +13:00
Lazar Sumar
5958307819 Bug 522607 - New css3-background background-position syntax. r=dbaron 2012-02-20 13:14:42 +13:00
Nicholas Nethercote
33730101c6 Bug 711908 - Fix a bunch of GCC warnings in layout. r=dbaron. 2011-12-19 19:46:39 -08:00
Ali Juma
07a5d3eb28 Bug 586863 - Eliminate #ifdef GFX_HAS_INVERT blocks since GFX_HAS_INVERT is never defined. r=dbaron 2011-12-09 14:18:05 -05:00
Daniel Holbert
5675a6d0da Bug 696188 followup: Add assertions and functional test for transitioning away from a transform-list. r=bz 2011-10-27 15:58:05 -07:00
Boris Zbarsky
3f42e0dcfa Bug 696188. Fix leak when adding different transform lists for animation. r=dholbert 2011-10-25 12:58:35 -04:00
Olli Pettay
a86b1a4d43 Bug 682420 - Rename nsINode::GetOwnerDoc to nsINode::OwnerDoc, part 1, r=jst
--HG--
extra : rebase_source : baf1a25cdea68d499a7673fdf96e27b5a12dc83c
2011-10-18 13:53:36 +03:00
Ehsan Akhgari
2a602a5685 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
Jeff Walden
b7753477cf Bug 693469 - Implement mozilla::ArrayLength and mozilla::ArrayEnd, and replace uses of NS_ARRAY_LENGTH whenever possible. (Exceptions: assigning to static initializers, use in static assertions, as template parameters, etc. These will go away when the relevant compilers have C++11 constexpr support.) r=cjones
--HG--
extra : rebase_source : b4bae9a0f85abf2feb828609b50e756916b99a6f
2011-10-10 22:50:08 -07:00
Jeff Walden
eb2cb918a4 Back out everything since 5435ee09cf7b. Tinderbox compilers hate me. r=epic-fail 2011-10-12 12:21:53 -07:00
Jeff Walden
77ebbde4ab Bug 639469 - Implement mozilla::ArrayLength and mozilla::ArrayEnd, and replace uses of NS_ARRAY_LENGTH whenever possible. r=cjones
--HG--
extra : rebase_source : 860a8271bf7e51cde358f2a4185c410de1fc2960
2011-10-10 22:50:08 -07:00
Ms2ger
a7d1f467b5 Bug 693155 - Add parens to clarify operator precedence in TransformFunctionsMatch (nsStyleAnimation.cpp); r=dbaron 2011-10-09 20:23:19 +02:00
Michael Wu
d8e503c38b 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
Matt Woodrow
5e8876e4df Bug 505115 - Part 16 - Implement transitions/animations for 3d transforms. r=dbaron, derf 2011-09-27 10:53:33 +13:00
Brian Birtles
b1f72bbd99 Bug 562815 part 6 - Check if property is cached in rule tree; r=dbaron
--HG--
extra : rebase_source : 9a7d2388bd00e2c8177cebc9d2a1339626cdd3ab
2011-08-23 08:34:12 +09:00
Brian Birtles
cc60dabff6 Bug 562815 part 5 - Split StyleWithDeclarationAdded; r=dbaron
--HG--
extra : rebase_source : 25e3f4591866e1438eca99f83c6ca3597508344f
2011-08-23 08:34:07 +09:00
Jeff Muizelaar
cb92f6ff06 Bug 660662. Eliminate NS_(ceil|floor). r=roc
These just called the system versions.
2011-05-30 15:08:55 -04:00
Matt Woodrow
c296cab4d8 Bug 675470 - Handle eCSSKeyword_interpolatematrix in AddTransformLists. r=dbaron 2011-08-04 14:08:37 +12:00
Matt Woodrow
f015e13bb5 Bug 505115 - Part 12a - Implement -moz-perspective-origin style property. r=dbaron 2011-08-03 15:04:24 +12:00
Matt Woodrow
ab8f7fa56f 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
f00688318f Bug 505115 - Part 3 - Convert nsStyleTransformMatrix to be backed by a 4x4 matrix. r=dbaron 2011-07-23 10:28:07 +12:00
L. David Baron
468f347283 Don't assert when interpolating font-weight to a result less than 100. (Bug 664927) r=bzbarsky 2011-06-29 14:39:21 -07:00
Dominic Fandrey
0ab2f46136 Bug 645398 - Substitute PR_(MAX|MIN|ABS|ROUNDUP) macro calls; r=roc 2011-06-02 14:56:50 +02:00
Ed Morley
9e71e5b9ac Bug 614515 - Remove MOZ_SVG conditions. r=roc 2011-05-30 09:34:50 +02:00
Boris Zbarsky
c9cdbb76ff Bug 647885 part 2. Keep better track of whether our computed background-size was specified with percentages. r=dbaron a=sheriff 2011-05-23 16:36:18 -04:00
Boris Zbarsky
27927f6eb3 Bug 647885 part 1. Keep better track of whether our computed background-position was specified with percentages. r=dbaron 2011-05-23 16:36:18 -04:00