Commit Graph

368 Commits

Author SHA1 Message Date
Jonathan Kew
40f8726544 bug 804644 - convert Cocoa points to _un_scaled device pixels for system font sizes. r=roc 2012-10-23 21:09:23 +01:00
Seth Fowler
f07bf4e48c Bug 503720: Implement vw/vh/vmin/vmax. r=dbaron 2012-10-19 16:21:06 -07:00
Yu-Sian (Thomasy) Liu
49b91a54ac Bug 594935: Add calc to parser, do calc in PaintGradient and add stop point to HasCalc(). r=bz 2012-10-03 22:31:56 -07:00
Jonathan Kew
2c2d5f0ecf bug 674373 pt 4 - pass device-to-CSS pixel ratio to LookAndFeel code when requesting a font style. r=roc 2012-09-29 12:35:08 +01:00
Edwin Flores
8a6015cf0d Bug 719286 - Add support for -moz-objectValue keyword to CSS parser for SVG glyphs r=dbaron 2012-09-06 16:58:47 +12:00
Edwin Flores
582af889e5 Bug 719286 - Add support for -moz-objectFillOpacity and -moz-objectStrokeOpacity to CSS parser for SVG glyphs r=dbaron 2012-09-06 16:58:46 +12:00
Edwin Flores
32d64789ec Bug 719286 - Add support for objectfill and objectstroke values to CSS parser r=dbaron 2012-09-06 16:58:46 +12:00
Daniel Holbert
ac23760ca2 Bug 763689 patch 3: Support min-height:auto in computed style, and add special cases as necessary wherever it's read. r=dbaron 2012-09-04 16:26:11 -07:00
Daniel Holbert
cb09d97d7e Bug 763689 patch 2: Support min-width:auto in computed style, and add special cases as necessary wherever it's read. r=dbaron 2012-09-04 16:26:10 -07:00
Kyle Huey
1a68eab98d 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
0fd9123eac 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
L. David Baron
1eef1584d8 Track whether nsStyleVisibility::mLanguage came from explicit information in the document. (Bug 702121, patch 1) r=jfkthame 2012-08-20 19:23:32 -07:00
Kyle Huey
0cc1c18795 Bug 697230: Part 1 - Centralize style image observers. r=bz 2012-08-13 15:04:19 -07:00
Jonathan Kew
83a0c3a21a bug 721750 - support text-shadow property on ::-moz-selection. r=dbaron 2012-08-04 19:52:21 +01:00
Cameron McCormack
ba7efb66ff Bug 655877 - Part 15: Don't treat SVG text frames as being positioned. r=roc 2012-08-02 21:38:50 +10:00
Scott Johnson
79055c4778 Bug 764567: Implement column-fill part of CSS3 multicol spec, now with regression fixes [r=roc]. 2012-07-31 11:21:19 -05:00
Aryeh Gregor
e806eeab4f Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Cameron McCormack
e6e89e5e75 Bug 774968 - line-height percentage value not computed accurately. r=dbaron
--HG--
extra : rebase_source : 93885c1b2ef72d673a935c135f89cc06bc58136d
2012-07-20 07:03:35 +10:00
Boris Zbarsky
43d45b95b9 Bug 771594. Allow preference control over what CSS properties we parse. r=dbaron,dholbert 2012-07-13 19:59:05 -04:00
Masatoshi Kimura
b63f5083a9 Bug 752187 - Part 10: Implement rendering unprefixed gradients. r=dbaron 2012-07-07 10:27:08 -04:00
Masatoshi Kimura
162441c196 Bug 752187 - Part 9: Implement unprefixed radial-gradient parsing. r=dbaron 2012-07-07 10:27:08 -04:00
Masatoshi Kimura
05280fd9ca Bug 752187 - Part 6: Rename mIsToCorner to mIsLegacySyntax. r=dbaron 2012-07-07 10:27:08 -04:00
Daniel Holbert
fc1301da05 Bug 696253, patch 7: implement parsing/computation for CSS property 'flex-basis'. r=dbaron 2012-07-06 17:06:23 -07:00
Daniel Holbert
1a2b565ce1 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
905f2b0773 Bug 696253, patch 5: implement parsing/computation for CSS property 'align-self'. r=dbaron 2012-07-06 17:06:21 -07:00
Daniel Holbert
307261d50e Bug 696253, patch 4: implement parsing/computation for CSS property 'align-items'. r=dbaron 2012-07-06 17:06:21 -07:00
Daniel Holbert
a64d2dea9d Bug 696253, patch 3: implement parsing/computation for CSS property 'flex-direction'. r=dbaron 2012-07-06 17:06:20 -07:00
Daniel Holbert
83ce4b75fe Bug 696253, patch 2: implement parsing/computation for CSS property 'order'. r=dbaron 2012-07-06 17:06:19 -07:00
Daniel Holbert
772477aae8 Bug 696253, patch 1: implement parsing/computation for CSS property 'justify-content'. r=dbaron 2012-07-06 17:06:19 -07:00
Daniel Holbert
348d6c9a3d Bug 666041 patch 2: Add "-moz-flex" & "-moz-inline-flex" values for "display" property. r=bz 2012-06-26 15:11:38 -07:00
Scott Johnson
2332c9b000 Bug 733614: Backout changes from bug 695222 for mozilla 16 branch [r=dbaron]. 2012-06-13 11:00:56 -05:00
Daniel Holbert
12f6753057 Bug 763689: Add "auto" keyword for min-height and min-width, which for now just computes to 0. r=bz 2012-06-12 10:48:20 -07:00
Nathan Froyd
df08b6c5cc Bug 674922 - report on most common objects allocated in a PresShell's arena; r=roc,njn 2012-06-06 13:35:40 -04:00
Ms2ger
19f060907a Bug 629882 - Support currentColor in the 2D canvas context; r=dbaron
This changes nsCSSParser::ParseColorString to fill in an nsCSSValue instead
of an nscolor, and exposes nsRuleNode::ComputeColor to turn this nsCSSValue
into an nscolor.

Because gradients can be used with different canvas elements in different
documents, these cannot pass useful values for nsRuleNode::ComputeColor's
aPresContext and aStyleContext arguments. This patch also changes SetColor
to deal with those parameters being null.
2012-06-06 09:36:38 +02:00
Shriram Kunchanapalli
8e90a26e8d Bug 219767: Move font size functions in nsStyleUtil into nsRuleNode. r=dbaron 2012-05-31 10:09:46 +05:30
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Robert Longson
3ca6774243 Bug 528332 - Implement non-scaling-stroke vector-effect. Part 1 - style system changes r=dbaron 2012-05-18 09:33:40 +01:00
Boris Zbarsky
389a77894c Bug 753397. Add a field to nsCSSPropList for a preference that controls the property. r=dbaron
The actual controlling is not hooked up yet; that will happen in bug 753522 for
the DOM reflections of properties.
2012-05-09 21:29:37 -04:00
Makoto Kato
ae4279cc0e Bug 249159 - Part 2 Implement CSS3 Text word-break property. r=dbaron, smontagu 2012-05-07 12:18:23 -07:00
L. David Baron
898620de06 Examine parentBorder only when parentContext is non-null. (Bug 749860) r=bzbarsky 2012-04-27 21:56:31 -07:00
John Daggett
127ee0627d Bug 718539. Update font-feature-settings to latest spec syntax. r=dbaron 2012-04-26 15:24:26 +09:00
Patrick Wong
30fd6e9e6a Bug 745659 - Removed the nsPrintfCString constructor which takes a length and all corresponding instances that call that particular constructor. This is accomplished by removing the length component from the instantiation. r=jlebar 2012-04-24 14:43:00 -04:00
Kyle Huey
50f43dd111 Back out Bug 679230 due to Android reftest failures. 2012-04-07 10:36:49 -07:00
Kyle Huey
7a78607b88 Bug 697230: Part 1 - Centralize style image observers. r=bz 2012-04-07 08:58:41 -07:00
Nathan Froyd
72e8d1d540 Bug 731615 - Eliminate duplicate headers in layout. rs=smontagu 2012-02-29 10:57:47 -05:00
Lazar Sumar
da2c684917 Bug 548375 - Implement css3-background background-repeat property two value syntax. r=dbaron 2012-02-24 21:23:14 -08:00
Zack Weinberg
15a9a210d0 Bug 729142 - Convert layout/style to MOZ_STATIC_ASSERT. r=dbaron 2012-02-23 08:19:00 -08:00
Zack Weinberg
58cb765cfa Bug 96971: Move GetSystemFont from nsDeviceContext to mozilla::LookAndFeel. r=roc 2012-02-20 15:19:48 -08:00
Lazar Sumar
1396c14469 Bug 522607 - New css3-background background-position syntax. r=dbaron 2012-02-20 13:14:42 +13:00
Jonathan Watt
8178523710 Bug 416581, part 2 - Pay attention to the 'lang' attribute when fetching the user's font prefs for the CSS cascade. r=dbaron. 2012-01-25 23:52:26 +00:00