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

118 Коммитов

Автор SHA1 Сообщение Дата
Xidorn Quan df85c99c08 Bug 1294299 part 1 - Make nsDOMCSSDeclaration use DeclarationBlock. r=heycam
MozReview-Commit-ID: B2eHrpxOMJ8

--HG--
extra : source : 1fb048c40e848189bc31f5309d4f85b6101975c2
2016-11-03 14:41:02 +11:00
Xidorn Quan 1dc2955ab8 Bug 1304302 part 8 - Change include of {CSS,Servo}StyleSheet.h to StyleSheetInlines.h. r=heycam
It is a preparation for later patch which moves functions from those
classes into StyleSheet. Some of the functions are better defined in
StyleSheetInlines.h.

This commit is generated by the following command:

find . \( -name '*.h' -or -name '*.cpp' \) -not -name '*StyleSheet*' -exec sed -i -b \
  -e '/^#include/ s_/\(CSS\|Servo\)StyleSheet\.h_/StyleSheetInlines.h_' \
  -e '1,\_^#include "mozilla/StyleSheetInlines.h"_ ! { \_^#include "mozilla/StyleSheetInlines.h"_d }' {} +

MozReview-Commit-ID: 54H5x27Pmso

--HG--
extra : source : e4fe253a8f82c3c58e5191d6af66fb0e85f2df19
2016-09-26 22:03:25 +10:00
Nicholas Nethercote f4ec41d9b5 Bug 1297300 - Add missing checks to GetSpec() calls in layout/. r=dholbert,heycam.
--HG--
extra : rebase_source : b3a26866746cde4337f5ffeff94f370b2eb7da3e
2016-08-31 20:10:10 +10:00
Boris Chiou 66ed914313 Bug 1250820 - Part 2: Replace nsCSSPseudoClasses::Type with CSSPseudoClassType. r=heycam
MozReview-Commit-ID: 6w4SoaS7gRi

--HG--
extra : rebase_source : 6e3c05aedf910616def9f9f43fc0e135a2d84359
2016-04-22 21:38:46 +08:00
Nicholas Nethercote d376f9f82e Bug 1260871 - Remove do_GetAtom() and rename NS_NewAtom() as NS_Atomize(). r=erahm.
do_GetAtom() is currently just a synonym for NS_NewAtom().

--HG--
extra : rebase_source : f4409784f931616cbc300591e6b843d30805c273
2016-03-29 10:09:43 +11:00
Boris Chiou f9b04f2758 Bug 1244049 - Part 3: Replace the type of nsCSSSelector::mPseudoType. r=dbaron
--HG--
extra : rebase_source : 4bb852ab13bd448da20f9af4a3f13c5704e3a007
2016-02-17 22:04:00 +01:00
Boris Chiou e436478f26 Bug 1244049 - Part 2: Replace nsCSSPseudoElements::Type with CSSPseudoElementType. r=dbaron
Also, try to use forward declaraions for CSSPseudoElementType;

--HG--
extra : rebase_source : c00eb9753e8f618a33aa711538ac45c0132b353c
2016-02-17 21:37:00 +01:00
Boris Chiou 185a769719 Bug 1244049 - Part 1: Define scoped enum for CSSPseudoElement type. r=dbaron
--HG--
extra : rebase_source : e53dd269e47fa97eb259ebd9295d012eacbdb612
2016-02-16 23:07:00 +01:00
Birunthan Mohanathas d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas 373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Boris Zbarsky b84abf01a3 Bug 888190. Implement case-insensitive attribute value selectors from Selectors 4. r=dbaron 2016-01-26 14:55:52 -05:00
L. David Baron 8b65346205 Bug 1226489 - Pass only a single rule to StyleRuleChanged. r=bzbarsky
--HG--
extra : transplant_source : g%3B%E8%9F%11/%88%E9R%85%0Dp5%CC%A7T%BC%10%0D%1E
2015-11-20 14:34:12 -08:00
L. David Baron 764b2b1601 Bug 1221436 patch 6 - Remove mechanism for replacing style rules. r=heycam
This is no longer used, thanks to patch 5.

--HG--
extra : commitid : 9E12f2cAoMn
2015-11-09 15:57:17 +08:00
L. David Baron c054fd2a09 Bug 1221436 patch 5 - Stop generating new style rules in DeclarationChanged (and rename it to SetDeclaration), since we no longer need a new style rule for nsIStyleRule identity rules. r=heycam
(I think the change DOMCSSDeclarationImpl::GetCSSDeclaration fixes a
purely theoretical bug that would happen if it were possible to get
ahold of a CSS rule without calling either
CSSStyleSheet::EnsureUniqueInner (which is called by
CSSRuleListImpl::IndexedGetter) or Declaration::SetImmutable (which is
called by rule matching, including that triggered by
inIDomUtils::GetCSSStyleRules).  If that were possible, then mutating
such a declaration would mutate the shared Declaration, and then call
WillDirty which would clone the now-mutated Declaration, leading to the
mutation applying to both sheets that shared it rather than just the one
that should have been modified.)

This is the simplification allowed by bug 978833 patch 11 (and part of
what we would otherwise have needed to duplicate in @page and keyframe
rules; we'd also have needed to duplicate the object split between the
internal object and the DOM-exposed object, but for style rules that's
probably worth keeping for the memory savings).

--HG--
extra : commitid : 4LV6uqm7iYf
2015-11-09 15:57:17 +08:00
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