Граф коммитов

103 Коммитов

Автор SHA1 Сообщение Дата
L. David Baron a511f77fef Bug 978833 patch 18 - Eliminate StyleRule::RuleMatched and call Declaration::SetImmutable directly for style rules (like for @page and keyframe rules). r=heycam
This is just simplification (plus the addition of an assertion).

--HG--
extra : commitid : 8jnKsQbG74s
2015-11-05 16:44:10 +08:00
L. David Baron 7d8e9c1328 Bug 978833 patch 17 - Remove Rule::mWasMatched. r=heycam
--HG--
extra : commitid : 61ndKkCSYPa
2015-11-05 16:44:10 +08:00
L. David Baron d049548fd1 Bug 978833 patch 16 - Always call Declaration::SetImmutable when we match a rule. r=heycam
This change needs to happen before future work that would get rid of the
DeclarationChanged dance in which we make a new StyleRule, but I've
postponed that work to a later bug.  Without this, those changes would
cause a regression, because we'd only call SetImmutable on a StyleRule's
first mDeclaration.  However, we may as well do this now, as it makes
patch 17 and patch 18 possible.

--HG--
extra : commitid : GcyBFi1AWHy
2015-11-05 16:44:10 +08:00
L. David Baron cdd348acd9 Bug 978833 patch 15 - Make css::Rule no longer inherit from nsIStyleRule. r=heycam
This inheritance was previously needed only by a subset of the classes
derived from css::Rule (css::StyleRule, nsCSSKeyframeRule,
nsCSSPageRule).  After patch 12, it is now needed by none.

--HG--
extra : commitid : CEFVRbS42w6
2015-11-05 16:44:10 +08:00
L. David Baron 4ed7c0f036 Bug 978833 patch 7 - Fuse allocation of ImportantStyleData with Declaration. r=heycam
Note that this adds a new public API to css::Declaration; the equivalent
API is removed from css::StyleRule and nsCSSPageRule in patch 13.  But
the removal and addition need to be on opposite sides of patch 12.

This fused allocation is no larger than having a pointer, and it removes
having to worry about cycles.

--HG--
extra : commitid : EOrsMKswNMP
2015-11-05 16:44:09 +08:00
L. David Baron ed0b078c21 Bug 978833 patch 6 - Move ImportantStyleData from StyleRule.{h,cpp} to Declaration.{h,cpp} r=heycam
This is needed for patch 7.

Note that this removes an unused "friend class StyleRule;" declaration.

--HG--
extra : commitid : Fjns3SwV7M1
2015-11-05 16:44:09 +08:00
L. David Baron 00351db8e0 Bug 978833 patch 5 - Rename ImportantRule to ImportantStyleData. r=heycam
(This is part of a longer term plan to rename nsIStyleRule to StyleData
and nsIStyleRuleProcessor to StyleDataSource.  I'm not doing all of that
here, though.)

--HG--
extra : commitid : DZGpUQO2Fey
2015-11-05 16:44:08 +08:00
L. David Baron 8a5bc09609 Bug 978833 patch 4 - Add pointer back from css::Declaration to css::Rule. r=heycam
This is used in patch 12, in nsStyleSet::AssertNoCSSRules and in
inDOMUtils::GetCSSStyleRules.

--HG--
extra : commitid : 8oiNdCdLIV6
2015-11-05 16:44:08 +08:00
L. David Baron 3a0f427640 Bug 978833 patch 3 - Make css::Declaration implement nsIStyleRule. r=heycam
We switch to using this implementation instead of the one in
css::StyleRule in patch 12.

(Yes, implementing QueryInterface for a CID is ugly, but it's the same
thing StyleRule does.  Unfortunately now we'll need to have it in both
places.)

--HG--
extra : commitid : 9O6Z3E868cq
2015-11-05 16:44:08 +08:00
L. David Baron 867d3273b6 Bug 978833 patch 2 - Make css::Declaration reference-counted. r=heycam
This is done in preparation for making it implement nsIStyleRule, which
happens in patch 3, and which is used in patch 12.

--HG--
extra : commitid : 56cV7yfXq59
2015-11-05 16:44:08 +08:00
Cameron McCormack 41d0ebc4e9 Bug 1216362 - Measure nsCSSSelector::mAttrList. r=erahm
--HG--
extra : rebase_source : 81a80957a5645676e2079a4d48729cc3b3163e7a
2015-10-21 16:18:36 +11:00
Nathan Froyd 01583602a9 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

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Cameron McCormack 5b9bb2f89a Bug 1180118 - Part 10: Logging. r=bzbarsky 2015-08-05 22:42:21 +10:00
Carsten "Tomcat" Book 94b10d301f Backed out 13 changesets (bug 1180118) for crashes on a CLOSED TREE
Backed out changeset c65d298d7cfa (bug 1180118)
Backed out changeset 7c5ebadc3fc9 (bug 1180118)
Backed out changeset 91a3e2205388 (bug 1180118)
Backed out changeset 15ad6049b940 (bug 1180118)
Backed out changeset 9b41cd9f2bc5 (bug 1180118)
Backed out changeset 37493f6eef20 (bug 1180118)
Backed out changeset b7ec8d4d2d7e (bug 1180118)
Backed out changeset cfeeae42d514 (bug 1180118)
Backed out changeset 9bcc3233f3c8 (bug 1180118)
Backed out changeset b99c358a6fea (bug 1180118)
Backed out changeset 4a7b79980353 (bug 1180118)
Backed out changeset 20984dfa4302 (bug 1180118)
Backed out changeset ef165b896cf4 (bug 1180118)
2015-08-04 12:20:20 +02:00
Cameron McCormack e4b325902b Bug 1180118 - Part 10: Logging. r=bzbarsky 2015-08-04 17:27:53 +10:00
Birunthan Mohanathas a8939590de 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
Mike Hommey 924c9eb636 Bug 1134923 - Remove NS_Alloc/NS_Realloc/NS_Free. r=nfroyd
They are kept around for the sake of the standalone glue, which is used
for e.g. webapprt, which doesn't have direct access to jemalloc, and thus
still needs a wrapper to go through the xpcom function list and get to
jemalloc from there.
2015-05-01 09:40:30 +09:00
Cameron McCormack acd763f9f6 Bug 1149042 - Call AttributeWillChange before a style="" attribute gets created when touching element.style. r=smaug 2015-04-10 10:41:35 +10:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -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 MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Nicholas Nethercote 242708cf72 Bug 1127201 (attempt 2, part 1) - Replace most NS_ABORT_IF_FALSE calls with MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 488e401ff87e31a2074c4108c4df0572d9536667
2015-02-09 14:34:50 -08:00
Andrew McCreight d3826daa16 Back out Bug 1127201 (part 2) for various problems. 2015-02-06 15:04:32 -08:00
Nicholas Nethercote d34f0301b8 Bug 1127201 (part 2) - Convert all NS_ABORT_IF_FALSE calls to MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 99182e70335d2b5ff95f8c528ae992d37294be3a
2015-02-04 20:05:36 -08:00
Cameron McCormack d502d1fa59 Bug 1126145 - Include style sheet URL and line number in StyleRule::List output. r=dbaron 2015-01-27 16:08:57 +11:00
Cameron McCormack fb3a2a89f9 Bug 1126140 - Remove duplicated selector lists in StyleRule::List output. r=dbaron 2015-01-27 16:08:57 +11:00
Ehsan Akhgari 8a04f8a90c Bug 1118426 - Mark virtual overridden functions as MOZ_OVERRIDE in layout/style; r=dbaron 2015-01-06 23:33:51 -05:00
L. David Baron 714a5547a4 Bug 1100773 patch 2 - Convert style rule List methods to use fprintf_stderr. r=heycam
Note that getting decent logcat output on Android and B2G requires not
splitting lines of output across multiple fprintf_stderr calls.
2014-11-26 22:29:44 -08:00
L. David Baron 702143efb2 Bug 1100773 patch 1 - Fix bracing of indent loops in style rule print functions. r=heycam 2014-11-26 22:29:44 -08:00
Boris Zbarsky 5b759b528b Bug 1019191 part 15. Remove now-dead DOMCI_DATA bits. r=peterv 2014-10-22 11:40:49 -04:00
Bruno Peres 747255721f Bug 949651 - Serialize all pseudo-elements with the two-colon syntax, even those that allow one colon. r=dbaron 2014-10-18 17:01:58 -04:00
Ryan VanderMeulen c4efcdc11c Backed out changeset f7e1426249f2 (bug 949651) for mochitest-5 failures. 2014-10-15 18:58:56 -04:00
Bruno Peres 139a3159ab Bug 949651 - Serialize all pseudo-elements with the two-colon syntax, even those that allow one colon. r=dbaron 2014-10-15 14:50:58 -07:00
Ehsan Akhgari 60360fc645 Bug 1060985 - Fix more bad implicit constructors in layout; r=roc 2014-08-31 23:36:37 -04:00
Brian Grinstead 4d00eac785 Bug 1037519 - Allow matching pseudo-elements in inIDOMUtils.selectorMatchesElement. r=bz 2014-07-18 14:30:00 -04:00
Birunthan Mohanathas a7d5f55774 Bug 591303 - Part 2: Add getCSSRule function to nsIDOMCSSRule. r=bz 2014-07-14 15:57:46 -07:00
Gabriel Luong c0ea3ed948 Bug 591303 - Part 1: Move mLineNumber, mColumnNumber, and mWasMatched from StyleRule to Rule. r=bz
Also, pass the line/column number through the constructor rather than through a separate function.
2014-07-14 15:57:02 -07:00
Andrew McCreight 844759f440 Bug 1026033, part 2 - Make StyleRule::mImportantRule into an nsRefPtr. r=bz 2014-06-26 09:29:04 -07:00
Andrew McCreight d0c431f013 Bug 1026033, part 1 - Make StyleRule::mDOMRule into an nsRefPtr. r=bz 2014-06-26 09:29:04 -07:00
Benoit Jacob e1b7dbca34 Bug 1028588 - Fix dangerous public destructors in layout/ - r=dbaron 2014-06-23 18:40:01 -04:00
Ms2ger bad4ca4d29 Bug 1022855 - Rename nsCSSStyleSheet to mozilla::CSSStyleSheet; r=heycam
--HG--
rename : layout/style/nsCSSStyleSheet.cpp => layout/style/CSSStyleSheet.cpp
rename : layout/style/nsCSSStyleSheet.h => layout/style/CSSStyleSheet.h
2014-06-20 12:32:49 +02:00
Ms2ger 451c7edf83 Backout revision 308e51eae10c for build bustage.
--HG--
rename : layout/style/CSSStyleSheet.cpp => layout/style/nsCSSStyleSheet.cpp
rename : layout/style/CSSStyleSheet.h => layout/style/nsCSSStyleSheet.h
2014-06-20 13:00:08 +02:00
Ms2ger 9fb7f507f0 Bug 1022855 - Rename nsCSSStyleSheet to mozilla::CSSStyleSheet; r=heycam
--HG--
rename : layout/style/nsCSSStyleSheet.cpp => layout/style/CSSStyleSheet.cpp
rename : layout/style/nsCSSStyleSheet.h => layout/style/CSSStyleSheet.h
2014-06-20 12:32:49 +02:00
Boris Zbarsky 88aef1f5fa Bug 1016063. Don't include the fake classnames XUL tree pseudo-elements have when calculating style rule specificity. r=heycam 2014-06-03 11:38:38 -04:00
Birunthan Mohanathas 0e6f3a6562 Bug 869836 - Part 3: Use `Append('c')` instead of `AppendLiteral("c")`. r=ehsan 2014-05-22 06:48:51 +03:00
Birunthan Mohanathas 5f1fde8824 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Kyle Huey fe6c4e28d6 Bug 967364: Rename already_AddRefed::get to take. r=bsmedberg 2014-03-15 12:00:15 -07:00
Reuben Morais bde629dd63 Bug 458300 - Rename nsINameSpaceManager.h to nsNameSpaceManager.h. r=jst r=hsivonen
--HG--
rename : content/base/public/nsINameSpaceManager.h => content/base/public/nsNameSpaceManager.h
2014-02-27 20:04:46 -03:00
Arnaud Sourioux a127266e74 Bug 974687 - Part 1: Add about 300 MOZ_OVERRIDE in layout/. r=dholbert 2014-02-24 09:41:56 -05:00
Ehsan Akhgari 1b83407ce9 Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc
This patch was automatically generated by the following script:

#!/bin/bash
# Command to convert PRUnichar to char16_t

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*modules/libmar*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name prtypes.h \
       ! -name Char16.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 PRUnichar char16_t
2014-01-04 10:02:17 -05:00
Cameron McCormack 836792bdcf Bug 922669 - Part 2: Use a different operator to represent the element -> pseudo-element relationship in selectors. r=bz 2013-11-28 17:46:38 +11:00
Cameron McCormack 417805594e Bug 922669 - Part 1: Parse selectors with user action pseudo-classes after pseudo-elements. r=bz 2013-11-28 17:46:38 +11:00