Commit Graph

56 Commits

Author SHA1 Message Date
Boris Zbarsky
1aa9d15695 Bug 795221 part 1. Implement cycle collection for nsCSSStyleSheet objects, so we don't leak through them. r=smaug,dbaron
Each nsCSSStyleSheet has a pointer to a nsCSSStyleSheetInner.  The
nsCSSStyleSheetInner is shared across multiple stylesheets, in
general.  The nsCSSStyleSheetInner owns the rules and the child
stylesheets.

What this means is that a given rule object is effectively owned by
multiple sheets.  However, cycles can only form through rule objects
that have been JS-wrapped, and if we're JS-wrapping a rule object that
means we have ensured that it's owned by only one stylesheet.
Therefore, we only traverse and unlink mInner if it's uniquely owned
by our sheet.

Similarly, if our child sheets or any of their rules have been
JS-wrapped, that means that we must have an mInner that we own
outright.
2012-10-07 22:39:08 -04:00
Arnaud Sourioux
815396c1bb Bug 733186: Annotate ~1000 methods with MOZ_OVERRIDE in /layout r=dholbert r=dbaron 2012-09-14 09:10:08 -07:00
Boris Zbarsky
a06f2bdfbe Bug 732209 part 6. Allow web pages to access cross-origin stylesheets if the CORS headers say so. r=dbaron,sicking
When gaining such access, the web page resets the stylesheet to its principal, because it can now edit the sheet.
2012-08-28 13:10:09 -04:00
Boris Zbarsky
ccd4da9732 Bug 732209 part 4. Propagate the CORS state throughout the CSS loading process. r=sicking,dbaron 2012-08-28 13:10:08 -04: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
Boris Zbarsky
ab8c73b485 Bug 753517 part 1. Make GetParentObject() on CSS declarations return a useful nsINode if possible. r=peterv,dbaron 2012-08-05 22:14:52 -04:00
Ms2ger
391cca2e24 Bug 777293 - Remove NS_NewCSSStyleSheet; r=dbaron 2012-08-04 09:44:01 +02:00
Ed Morley
bba173e66e Revert inbound to 3d5d1daa2505 to stop OS X M5 failures (backout not clean/could have been a bad merge) on a CLOSED TREE 2012-08-04 18:05:15 +01:00
Ms2ger
eacd737410 Bug 777293 - Remove NS_NewCSSStyleSheet; r=dbaron 2012-08-04 09:44:01 +02:00
Cedric Vivier
3f0c09d4b0 Bug 727834 - Add an API to (re)parse a style sheet in place. r=bz
---
 layout/inspector/public/inIDOMUtils.idl          |   12 ++-
 layout/inspector/src/inDOMUtils.cpp              |   11 +++
 layout/inspector/tests/chrome/Makefile.in        |    2 +
 layout/inspector/tests/chrome/test_bug727834.css |    7 ++
 layout/inspector/tests/chrome/test_bug727834.xul |   88 +++++++++++++++++++
 layout/style/nsCSSStyleSheet.cpp                 |   99 +++++++++++++++++++---
 layout/style/nsCSSStyleSheet.h                   |    2 +
 7 files changed, 207 insertions(+), 14 deletions(-)
 create mode 100644 layout/inspector/tests/chrome/test_bug727834.css
 create mode 100644 layout/inspector/tests/chrome/test_bug727834.xul
2012-06-03 12:54:38 -04:00
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Nicholas Nethercote
2806f8e46a Bug 671299 (part 3) - Add style sheet memory reporters. r=dbaron. 2012-01-02 18:19:14 -08:00
Bobby Holley
9fb9ba7af0 Bug 713747 - Remove usage of UniversalFoo in gecko. r=bz 2011-12-30 09:35:39 -08:00
Jeff Walden
f16def0c00 Bug 704687 - Mark final classes as MOZ_FINAL, now that nsDerivedSafe no longer exists again. r=dbaron
--HG--
extra : rebase_source : f6a25c06275e4fbb2e69462118f242d380bdce03
2011-12-19 13:48:15 -05:00
Jeff Walden
19f38bafe5 Bug 704127 - Implement MOZ_FINAL as a modifier for classes and virtual member functions. r=cjones
--HG--
extra : rebase_source : d95a3b3e726f810f299314358ba8c5e23557698e
2011-11-20 22:21:16 -08:00
Mark Banner
cbd25443a2 Bug 693949 - Drop nsCStringArray. r=bsmedberg 2011-10-28 08:35:45 +01: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
Mihai Sucan
726b8bb058 Bug 670896 - Add inner window ID and timestamp to nsIScriptError2; r=bzbarsky 2011-08-24 23:44:35 +03:00
Craig Topper
cc15a2a6e3 Bug 648925 - Part 1: Change uses of nsICSSRule to css::Rule. r=bzbarsky 2011-04-07 18:23:46 -07:00
L. David Baron
b149cd157b Clean up handling of CSSOM modifications to rules that are non-child descendants of a sheet. (Bug 435442, patch 3) r=bzbarsky
This fixes handling of a number of cases:
 1. Modifications to a style rule inside a group rule now trigger
    GetRuleCascades.
 2. A sheet that has been (potentially) modified is reliably marked as
    such, and thus never cloned.
2011-04-11 23:18:43 -07:00
Craig Topper
c601a2e51b Bug 577974 - Part 2: Remove nsICSSGroupRule, r=bzbarsky
--HG--
rename : layout/style/nsICSSGroupRule.h => layout/style/GroupRule.h
2010-08-07 22:28:33 -07:00
Craig Topper
51c51ac5d7 Bug 577002 Part 2: Remove nsICSSImportRule. r=bzbarsky
--HG--
rename : layout/style/nsICSSImportRule.h => layout/style/ImportRule.h
2011-03-17 13:41:52 -04:00
Mihai Sucan
215e61a4b2 Bug 606498 - Make sure the new nsIScriptError2 is used in all possible places- part 3; r=bzbarsky,dbaron,mrbkap sr=jst a=blocking2.0 2010-12-20 12:21:59 -04:00
Chris Jones
28d67e6217 Bug 550611: Make nsTArray optionally infallible. sr=bsmedberg a=blocking
--HG--
rename : xpcom/glue/nsTArray.cpp => xpcom/glue/nsTArray-inl.h
2010-11-08 20:48:59 -06:00
Craig Topper
3e0e604d67 Convert some callers of methods that changed from returning already_AddRefed<T> to returning T* away from using unneeded nsCOMPtrs. (Bug 239008) r=dbaron 2010-05-17 21:00:40 -07:00
Craig Topper
58622d8961 Change some nsIStyleSheet methods from returning AddRef-ed to un-AddRef-ed pointers, and some other cleanup. (Bug 239008) r=dbaron 2010-05-17 21:00:39 -07:00
Craig Topper
9528e9a5c6 Rename nsIStyleSheet::GetApplicable to IsApplicable and GetComplete to IsComplete. (Bug 239008) r=dbaron 2010-05-14 12:05:14 -07:00
Craig Topper
d02574b6b4 DeCOMtaminate nsIStyleSheet method signatures. (Bug 239008) r=dbaron 2010-05-12 13:18:47 -07:00
L. David Baron
7a1b0dad9f Restore comments and formatting from nsICSSStyleSheet.h that was lost in 5329c2d9c968. (Bug 239008) 2010-05-11 13:59:25 -07:00
Craig Topper
b241293325 Make most of the methods in nsCSSStyleSheet non-virtual. (Bug 239008) r=dbaron 2010-05-11 13:41:48 -07:00
Craig Topper
35e0c06e8d Inline a few methods in nsCSSStyleSheet. (Bug 239008) r=dbaron 2010-05-11 13:41:47 -07:00
Craig Topper
cb8187eff9 Remove nsICSSStyleSheet and replace all uses with nsCSSStyleSheet. (Bug 239008) r=dbaron 2010-05-11 13:41:47 -07:00
Craig Topper
da6721cdc6 DeCOMtaminate CSSStyleSheet method signatures. (Bug 239008) r=dbaron 2010-05-11 13:41:47 -07:00
Craig Topper
771eede254 Bug 557416: Remove unnecessary includes and forward declarations of nsPresContext. r=roc 2010-04-10 16:10:12 -04:00
Zack Weinberg
8a88b3f08f Eliminate NS_HIDDEN and NS_HIDDEN_ from layout/style/. Search-and-replace plus formatting fixes. rs=bzbarsky, no bug. 2010-04-06 14:52:17 -07:00
L. David Baron
fe71055816 Make members of nsCSSStyleSheetInner private. (Bug 239008) r=bzbarsky 2010-01-07 08:51:16 -05:00
L. David Baron
1d3abc0523 Add method to nsStyleSet to call EnsureUniqueInner on all CSS sheets. (Bug 536379) r=bzbarsky 2009-12-31 10:56:33 -05:00
L. David Baron
175e61cedf Make EnsureUniqueInner return a tri-state result that says whether it needed to do any cloning. (Bug 536379) r=bzbarsky 2009-12-31 10:56:33 -05:00
Boris Zbarsky
6df71d93aa Bug 493968. Correctly keep track of all the kids of a cloned sheet, not just the last one. r=roc, r+sr=dbaron pending. 2009-05-26 15:40:49 -04:00
Arpad Borsos
5b33bf7a38 Bug 492531 - Optimize some CSS and Reflow classes for memory usage; r+sr=dbaron 2009-05-13 10:26:48 +02:00
Boris Zbarsky
e70f4fe5fa Bug 480065. Make chrome registry not mess with inline stylesheets. r=bsmedberg, sr=dbaron 2009-03-10 09:52:23 -04:00
Arpad Borsos
829f9f024a Bug 474369 - get rid of nsVoidArray; layout part; r+sr=roc 2009-02-03 15:42:18 +01:00
Boris Zbarsky
70c50466ec Bug 454578. Load the quirk stylesheet separately from the general UA stylesheet, so it can be sensibly enabled/disabled in style sets. r+sr=dbaron 2008-11-02 21:29:51 -05:00
Boris Zbarsky
249662589d No need to have virtual methods on nsCSSStyleSheetInner. There's only one such class. r+sr=dbaron 2008-10-15 16:24:45 -04:00
Boris Zbarsky
e4ee9e31f8 Bug 458381. The empty string should represent the null namespace even for the default @namespace rule (no prefix case). r+sr=dbaron 2008-10-15 16:23:21 -04:00
L. David Baron
4259ea23ac Fix warnings about CascadeSheetRulesInto being declared but not defined. (Bug 458813) r+sr=bzbarsky 2008-10-07 15:10:19 -07:00
Boris Zbarsky
0e3727f2be Bug 183348 followup: rename the args in the header too. 2008-09-09 14:32:27 -04:00
Boris Zbarsky
c9c0698d6a Bug 183348. Fix cloning of sheets with @import rules. Also fixes bug 290018, bug 436261, bug 444723, bug 445415. r+sr=dbaron 2008-09-09 14:08:11 -04:00
Boris Zbarsky
ecd6b938cf Bug 452238. Remove unused imports collection code. r+sr=dbaron 2008-09-05 21:10:35 -04:00