Commit Graph

113 Commits

Author SHA1 Message Date
Ehsan Akhgari
80d135155d Bug 907883 - Minimize #includes in layout/generic; r=roc
--HG--
extra : rebase_source : 5e87b764a12b05aff477c71547e2131be67ca93b
2013-08-22 14:32:52 -04:00
Cameron McCormack
692234d456 Bug 899900 - Avoid null checking result of NS_NewBlahFrame. r=dbaron 2013-08-03 14:11:06 +10:00
Ms2ger
78f9e66db8 Bug 896251 - Make nsEvent::{refPoint, lastRefPoint} LayoutDeviceIntPoints; r=smaug+kats 2013-08-02 09:05:16 +02:00
Mats Palmgren
796a090f34 Bug 866785 - Move repeated nsIFrame::List implementations code to a new method, ListGeneric, for re-use. Cleanup and improve the code a bit. r=roc
Specifically:
* move all the frame dump methods to nsIFrame. Especially nsFrame::ListTag
  was annoying, often requiring a cast to nsFrame*.
* print common values in the same order for all types of frames
* print fluid continuations as "next-in-flow=%p" and non-fluid as
  "next-continuation=%p" (as before)
* print the style-context more compactly, e.g.
  "[sc=0x7faa6b60e0a0] pst=:first-line" becomes
  "[sc=0x7faa6b60e0a0:first-line]"
* suppress printing visual/scroll-overflow rects when they are identical
  to mRect and do the same for nsLineBox::List where it was especially
  hard to see which lines actually had real overflow
* fix a bug that printed the child list name at the far right when the
  principal list was empty (making it hard to see)
* print the address of child lists (other than the principal list) to
  help debug frame list property bugs
* s/NS_IMETHODIMP/void/
2013-04-30 20:38:52 +02:00
Robert O'Callahan
6651accbe4 Bug 841192. Part 1: Make <frame> elements behave more like <iframe>s, in particular supporting padding and borders (but not border-radius). r=mats
--HG--
extra : rebase_source : b49a430b7a54bc0579f4f109afa001634a2b8930
2013-04-03 00:03:03 +13:00
Mats Palmgren
b6c309ad4c Bug 856243 - Add missing do_QueryFrame support and fix typo that caused most MathML frames to not QueryFrame to nsIMathMLFrame. Add static assertions to prevent those kinds of errors in the future. r=dholbert 2013-04-04 01:35:07 +02:00
Mats Palmgren
5a7645d0da Backout 5104a8653170 (bug 856243). r=me 2013-04-01 19:10:37 +02:00
Mats Palmgren
21f60f38dd Bug 856243 - Add missing do_QueryFrame support. r=dholbert 2013-04-01 18:45:19 +02:00
Mats Palmgren
a98c0cde58 Backout rev 85397e0a6dba - wrong patch. r=me 2013-03-23 21:45:53 +01:00
Mats Palmgren
56ef5c292e Bug 851847 - Optimize nsBlockFrame::StealFrame when removing a normal flow child. r=bzbarsky 2013-03-23 21:10:34 +01:00
Boris Zbarsky
f1589419f5 Bug 852428 part 2. Make nsIFrame::Init infallible. r=dholbert 2013-03-19 21:47:48 -04:00
L. David Baron
822b2ca3bc Bug 781360 patch 3: Rename {nsIFrame,nsStyleContext,nsComputedDOMStyle}::GetStyle* to Style*, since they can never return null. r=dholbert
Except for the changes in:
  layout/generic/nsIFrame.h (part)
  layout/style/nsComputedDOMStyle.h (all)
  layout/style/nsRuleNode.cpp (part)
  layout/style/nsStyleContext.cpp (part)
  layout/style/nsStyleContext.h (part)
(see patch 3b in the bug), this patch was written with the sed script:
s/\<GetStyle\(Font\|Color\|List\|Text\|Visibility\|Quotes\|UserInterface\|TableBorder\|SVG\|Background\|Position\|TextReset\|Display\|Content\|UIReset\|Table\|Margin\|Padding\|Border\|Outline\|XUL\|SVGReset\|Column\)\>/Style\1/g
2013-02-16 13:51:02 -08:00
Robert O'Callahan
d9665619b9 Bug 840902. Part 2: Remove nsresults from various display list methods. r=mattwoodrow
--HG--
extra : rebase_source : de498510bf8d85d9b0b2fab0137ef3be01c9adfa
2013-02-15 00:12:27 +13:00
Robert O'Callahan
59dfd955a1 Bug 840902. Part 1: Stop checking the results of various display list methods. r=mattwoodrow
--HG--
extra : rebase_source : 50a3d6809ef76a25a3d02d91f2873d9ba11fdc56
2013-02-15 00:08:08 +13:00
Daniel Holbert
242e2346fa Bug 836957 part 2: Remove unnecessary nsIFrame::GetSkipSides() overrides whose implementations are in .cpp files. r=mats 2013-02-04 08:17:20 -08:00
Robert O'Callahan
85884b1a4b Bug 826632. Part 1: Merge nsIViewManager into nsViewManager. r=tnikkel
--HG--
rename : view/public/nsIViewManager.h => view/public/nsViewManager.h
extra : rebase_source : d00947c925b17f860fcdc0e12b1ec3cc31b7c630
2013-01-05 16:12:24 +13:00
Phil Ringnalda
408fbe5931 Back out 5e76dfb1d426 (bug 826635) and 0df74b1a4543:20df426b6111 (bug 826632) for bustage
CLOSED TREE
2013-01-04 21:30:14 -08:00
Robert O'Callahan
b56cdd701e Bug 826632. Part 1: Merge nsIViewManager into nsViewManager. r=tnikkel
--HG--
rename : view/public/nsIViewManager.h => view/public/nsViewManager.h
extra : rebase_source : 85587555e1f202809cd39fe899570644e6ca4eb3
2013-01-05 16:12:24 +13:00
Robert O'Callahan
f9b9491b81 Bug 825866. Part 8: Mass-rename of nsIView to nsView. r=tnikkel
This was autogenerated by basically replacing all occurrences of the word "nsIView" with nsView.

--HG--
rename : view/public/nsIView.h => view/public/nsView.h
2013-01-04 02:23:11 +13:00
Peter Van der Beken
6b82e32e41 Fix for bug 824007 (Convert HTMLBodyElement, HTMLDataListElement, HTMLFontElement, HTMLFrameSetElement and HTMLLabelElement to new DOM bindings) - move some HTML element classes to mozilla::dom. r=bz.
--HG--
rename : content/html/content/src/nsHTMLBodyElement.cpp => content/html/content/src/HTMLBodyElement.cpp
rename : content/html/content/src/nsHTMLDataListElement.cpp => content/html/content/src/HTMLDataListElement.cpp
rename : content/html/content/src/nsHTMLDivElement.cpp => content/html/content/src/HTMLDivElement.cpp
rename : content/html/content/src/nsHTMLDivElement.h => content/html/content/src/HTMLDivElement.h
rename : content/html/content/src/nsHTMLElement.cpp => content/html/content/src/HTMLElement.cpp
rename : content/html/content/src/nsHTMLFontElement.cpp => content/html/content/src/HTMLFontElement.cpp
rename : content/html/content/src/nsHTMLFrameSetElement.cpp => content/html/content/src/HTMLFrameSetElement.cpp
rename : content/html/content/src/nsHTMLFrameSetElement.h => content/html/content/src/HTMLFrameSetElement.h
rename : content/html/content/src/nsHTMLLabelElement.cpp => content/html/content/src/HTMLLabelElement.cpp
rename : content/html/content/src/nsHTMLLabelElement.h => content/html/content/src/HTMLLabelElement.h
rename : content/html/content/src/nsHTMLUnknownElement.cpp => content/html/content/src/HTMLUnknownElement.cpp
rename : content/html/content/src/nsHTMLUnknownElement.h => content/html/content/src/HTMLUnknownElement.h
extra : rebase_source : 99a2b1764bfd34db1375939b967f816dc2a42a91
2012-12-21 15:06:50 +01:00
Jeff Walden
7146c23e80 Bug 820570 - Move mozilla::DebugOnly into DebugOnly.h to pare down the grab-baggish Util.h. r=Ms2ger 2012-12-14 18:58:45 -05:00
Daniel Holbert
a3e52c5d43 Bug 817744: Fix whitespace issues in nsFrameSetFrame.cpp. whitespace-only, DONTBUILD 2012-12-03 11:47:10 -08:00
Paul Adenot
b82ab109c9 Bug 817404 - Compilation error in layout/generic/nsFrameSetFrame.cpp with gcc 4.7. r=ehsan 2012-12-03 15:44:26 +01:00
Mats Palmgren
a4582c2dca Bug 814995. r=roc 2012-12-01 03:28:02 +01:00
L. David Baron
0f4a543158 Bug 809533, patch 2: Don't null-check inside NS_New*Frame. r=roc 2012-11-07 11:55:53 -08:00
Jacek Szpot
0b35b0e3d8 Bug 792180 - Replace NS_{UN,}LIKELY with MOZ_{UN,}LIKELY; r=ehsan 2012-10-26 15:32:10 +02:00
Daniel Holbert
89ff8f3754 Bug 799199: Use IndentBy() instead of looped "fputs" in nsHTMLFramesetBlankFrame's and nsLineBox's List() methods. r=bz 2012-10-08 13:06:04 -07:00
Daniel Holbert
bb610b95ae Bug 799196: Update signature for nsHTMLFramesetBlankFrame::List(). r=bz 2012-10-08 12:58:54 -07:00
Kyle Huey
e5eb83ac5a Bug 760331: Coalesce data for inline style across nodes. r=bz
This patch enables sharing of an nsAttrValue's MiscContainer between nodes for style rules.  MiscContainers of type eCSSStyleRule are now refcounted (with some clever struct packing to ensure that the amount of memory allocated for MiscContainer remains unchanged on 32 and 64 bit).  This infrastructure can be used to share most MiscContainer types in the future if we find advantages to sharing other types than just eCSSStyleRuley.  A cache mapping strings to MiscContainers has been added to nsHTMLCSSStyleSheet.  MiscContainers can be shared between nsAttrValues when one nsAttrValue is SetTo another nsAttrValue or when there is a cache hit in this cache.  This patch also adds the ability to tell a style rule that it belongs to an nsHTMLCSSStyleSheet, with appropriate accessor functions to separate that from the existing case of belonging to an nsCSSStyleSheet.

The primary use case is to reduce memory use for pages that have lots of inline style attributes with the same value.  This can happen easily with large pages that are automatically generated.  An (admittedly pathological) testcase in Bug 686975 sees over 250 MB of memory savings with this change.  Reusing the same MiscContainer for multiple nodes saves the overhead of maintaining separate copies of the string containing the serialized value of the style attribute and of creating separate style rules for each node.  Eliminating duplicate style rules enables further savings in layout through style context sharing.  The testcase sees the amount of memory used by style contexts go from over 250 MB to 10 KB.

Because the cache is based on the text value of the style attribute, it will not handle attributes that have different text values but are parsed into identical style rules.  We also do not attempt to share MiscContainers when the node's base URI differs from the document URI.  The effect of these limitations is expected to be low.
2012-09-30 09:40:24 -07:00
Isaac Aggrey
997db4d142 Bug 791906: Replace NSPR integer limit constants with stdint ones; r=ehsan 2012-09-28 01:57:33 -05: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
Ms2ger
3f950b5744 Bug 780387 - Part b: Stop using PRIntn; r=bsmedberg 2012-08-09 09:09:40 +02: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
Cameron McCormack
f41c8a5fe8 Bug 655877 - Part 14: Ignore float in SVG text frames. r=roc 2012-08-02 21:38:49 +10:00
Aryeh Gregor
e806eeab4f Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Nathan Froyd
72e8d1d540 Bug 731615 - Eliminate duplicate headers in layout. rs=smontagu 2012-02-29 10:57:47 -05:00
Markus Stange
cb70f28632 Bug 598482 part 7 - Remove NS_VMREFRESH_* flags. NS_VMREFRESH_NO_SYNC is now the unchangable default. r=roc 2011-12-23 22:52:22 -05:00
Mats Palmgren
9cc6cc3865 Bug 515530 - Remove nsHTMLContainerFrame. r=roc 2011-12-27 21:18:48 +01:00
Phil Ringnalda
3f8c5b26b0 Back out 1ac4cb2e7c32 to c631f9c3e9a9 (bug 598482) for Android reftest failures 2011-12-23 22:21:58 -08:00
Markus Stange
4ef3f032b5 Bug 598482 part 7 - Remove NS_VMREFRESH_* flags. NS_VMREFRESH_NO_SYNC is now the unchangable default. r=roc 2011-12-23 22:52:22 -05: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
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
Atul Aggarwal
e8bda8ae4b Bug 653295 - Fixing warning of comparision between signed and unsigned integer expressions in nsFrameSetFrame.cpp. r=bz 2011-09-26 01:47:43 +05:30
Masayuki Nakano
d9869bfccf Bug 669028 part.13 layout should use mozilla::LookAndFeel rather than nsILookAndFeel r=roc 2011-09-09 11:27:13 +09:00
Mats Palmgren
6894179e71 Bug 653649 - New way of getting child lists from frames. (part 4/5) r=roc
Remove the nsIAtom* child list names and use child list ID enum instead.
2011-08-24 22:54:30 +02:00
Sebastian Kromp
1052ad8280 Bug 578564. Remove nsIFrameSetElement and just use nsHTMLFrameSetElement instead. r=bzbarsky
--HG--
rename : content/html/content/public/nsIFrameSetElement.h => content/html/content/src/nsHTMLFrameSetElement.h
2011-06-08 12:04:10 -07:00
Masayuki Nakano
85c451e309 Bug 660121 Remove all pref related methods from nsContentUtils r=roc 2011-05-29 08:42:57 +09:00
Masayuki Nakano
060287addd Bug 659533 Replace nsContentUtils::GetBoolPref() with Preferences::GetBool() r=roc 2011-05-25 15:31:59 +09:00
Jan Küchler
5ef6bf26cf Bug 266236 part 3: Mechanical rename of nsIRenderingContext and nsThebesRenderingContext to nsRenderingContext. Mechanical substitution of nsRefPtr<nsRenderingContext> for nsCOMPtr<nsRenderingContext>.
--HG--
rename : gfx/src/nsThebesRenderingContext.cpp => gfx/src/nsRenderingContext.cpp
extra : rebase_source : 34884bfcafd885feaf73300bc7246cd192062a48
2011-04-07 18:04:40 -07:00