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

175 Коммитов

Автор SHA1 Сообщение Дата
Boris Zbarsky 8eff629f46 Bug 1230639 - Propagate the namespace ID to AttributeRuleProcessorData on attribute changes. r=dbaron 2015-12-05 01:09:13 -05:00
Cameron McCormack fd2fba0c73 Bug 990250 - Fold nsIStyleSheet into CSSStyleSheet. r=dbaron 2015-11-17 17:04:09 +11:00
Cameron McCormack 904f671b03 Bug 1222745 - Restore eRestyleResult_StopWithStyleChange optimization for shared style contexts by comparing rule nodes for inherited style data changes. r=dbaron 2015-11-17 15:09:55 +11:00
Cameron McCormack fc548e7db1 Bug 1220496 - Create PresHint/StyleAttr rule processors in nsStyleSet::Init and make DirtyRuleProcessors private. r=bzbarsky 2015-11-05 18:24:22 +11:00
Cameron McCormack 2f1046d287 Bug 1216043 - Rename nsStyleSheet::sheetType and make it an enum class. r=dbaron
The only substantive change here, apart from a few variables changing in
size from uint16_t to uint8_t, is FontFaceSet's use of SheetType::Unknown
(0xFF) instead of 0 for FontFaceRecords for script-created FontFaces.
2015-10-20 10:16:20 +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
Gijs Kruitbosch ecccf6ff1a Bug 1157292 - include XBL stylesheets in the inspector's list of stylesheets, r=dholbert,heycam
--HG--
extra : commitid : FaWwCEWPkKA
extra : rebase_source : 4d4568f1c30cb8d062106f71099e21a3c33f25ab
2015-08-12 13:43:39 +01:00
Cameron McCormack 77856721a3 Bug 1180118 - Part 9: Clear nsCSSSelector pointers in the pending restyle tracker if they might be stale. r=bzbarsky 2015-08-05 22:42:21 +10:00
Cameron McCormack 9ae3b05332 Bug 1180118 - Part 5: Add a RestyleHintData outparam to HasAttributeDependentStyle for use with eRestyle_SomeDescendants. 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 96ce1278fa Bug 1180118 - Part 9: Clear nsCSSSelector pointers in the pending restyle tracker if they might be stale. r=bzbarsky 2015-08-04 17:27:53 +10:00
Cameron McCormack 18f6b81597 Bug 1180118 - Part 5: Add a RestyleHintData outparam to HasAttributeDependentStyle for use with eRestyle_SomeDescendants. r=bzbarsky 2015-08-04 17:27:53 +10:00
Robert O'Callahan 894d9c19a5 Bug 1184842. Route aOldValue/aNewValue to AttributeData. r=heycam
--HG--
extra : commitid : HPs2uc3HzHl
extra : rebase_source : c1962247a393eb10bfa85d5e9590fa71e56203ce
2015-07-22 15:54:07 +12:00
Cameron McCormack 9835a50961 Bug 1177563 - Test that we share agent rule processors across different documents. r=dbaron 2015-07-08 15:57:31 +10:00
Carsten "Tomcat" Book f5a2bf64b3 Backed out changeset 42e80a07acd6 (bug 1177563) for bustage on a CLOSED TREE
--HG--
extra : rebase_source : 4a68bf83cc2939f899b0c6f92efa58e3d5aab6a2
2015-07-08 09:44:16 +02:00
Cameron McCormack f086e12dcb Bug 1177563 - Test that we share agent rule processors across different documents. r=dbaron
--HG--
extra : rebase_source : 119e78e4798a8044531f6fa288be7a0fc3ce9e43
2015-07-08 15:57:31 +10:00
Cameron McCormack b26c6e1429 Bug 1170888 - Restyle the document in EnsureSafeToHandOutCSSRules if we previously cloned sheet inners outside of that method. r=bzbarsky 2015-06-26 13:49:58 +10:00
Cameron McCormack dd81f3c902 Bug 1169512 - Add and remove quirk.css rather than enable and disable a clone of it. r=jwatt 2015-06-26 13:49:58 +10:00
Mats Palmgren 5a2a4f8f08 Bug 997709 part 2 - Prevent the nsComboboxDisplayFrame from being blockified if the parent context has display:flex/grid. r=heycam 2015-05-27 22:18:36 +00:00
Xidorn Quan ffec696346 Backout df7c88910f47 (bug 1149009) for new patch.
--HG--
extra : source : f1d1ec017c872676ca90738f31f41d8f4a77f9cb
2015-05-04 09:52:53 +12:00
Andrea Marchesini 085da9302a Bug 1156632 - Remove unused forward class declarations - patch 5 - rdf, parser, layout and something else, r=ehsan 2015-04-22 08:29:22 +02:00
Xidorn Quan 1eac8d1918 Bug 1149009 - Fix line break suppression on whitespace not contained but wrapped in ruby boxes. r=dbaron
--HG--
extra : rebase_source : d523d7fb01b9ca6a0db9c2a99b05f5560a94e3aa
extra : source : b3028ab938b2269518a5fb1e124c2982f4afdd36
2015-04-20 15:04:09 +12:00
Cameron McCormack 84ff03514a Bug 1154149 - Remove nsPresContext arguments from a bunch of nsStyleSet methods. r=dbaron 2015-04-17 11:09:59 +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
L. David Baron 8c28244fab Bug 960465 patch 21 - Replace one use of nsRestyleHint_ChangeAnimationPhase with nsRestyleHint_AllHintsWithAnimations so that we can remove the rest. r=birtles 2015-02-17 11:15:06 +13:00
L. David Baron 04535c3f75 Bug 960465 patch 20 - Allow pseudo-elements for style attribute replacement in RuleNodeWithReplacement. r=birtles
I confirmed that we're actually using this codepath by manually testing
<input type=color>:  it works with the patch, but if I comment out the
call to nsHTMLCSSStyleSheet::PseudoElementRulesMatching from
nsStyleSet::RuleNodeWithReplacement, then the color swatch breaks, which
proves that we're depending on the code.

I think I included this in the queue because it is needed for patch 22,
although I've forgotten the full reasoning.
2015-02-17 11:15:05 +13:00
L. David Baron 6475962f36 Bug 960465 patch 18 - Remove aElementOrPseudoElement parameter to ReparentStyleContext (added in bug 1057129). r=birtles 2015-02-17 11:15:05 +13:00
L. David Baron 4eedf5bf60 Bug 960465 patch 2 - Add method to return a modified version of a style context, with all or part of the animation data removed. r=birtles
This is used in patch 3.
2015-02-17 11:15:01 +13:00
L. David Baron e5827e4f0a Bug 960465 patch 1 - Add parameter to skip animations work to ResolveStyleWithReplacement. r=birtles
This is used in patch 2.
2015-02-17 11:15:00 +13:00
Ehsan Akhgari 4354953b4f Bug 1118486 - Part 1: Use `= delete` instead of MOZ_DELETE directly; r=Waldo
Most of this patch (with the exception of dom/bindings/Codegen.py) was
generated by the following bash script:

#!/bin/bash

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "*/.git*" \
       ! -wholename "obj-*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -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_DELETE '= delete'
2015-01-08 23:19:05 -05:00
L. David Baron 18f4e801e6 Bug 1087536 patch 1 - Record the transition manager's cover rule as in the eTransitionSheet level of the cascade so that ResolveStyleWithReplacement replaces it correctly. r=birtles
Without this patch, patch 3 will cause bugs where we'll never remove the
cover rule we create during the process of starting a transition.  This
won't actually be problematic during the transition, since the
transition will overwrite it, but once the transition completes, the
cover rule will still be around, and we'll be stuck with the
pre-transition value instead of the post-transition value.

It's possible it also fixes existing bugs prior to the patch series in
this bug.
2014-11-17 11:39:14 -08:00
L. David Baron 5c924eff08 Bug 1057231 patch 3 - Add new cascade level for rules from SMIL Animation of SVG attributes to the style set. r=dholbert
I will fix the indentation of gCascadeLevels in bug 977991 patch 2,
which adds a member to each element of the array.

Note that this bumps the maximum sheetType from 8 to 9 (and number of
them from 9 to 10), which does not require updating
NS_RULE_NODE_LEVEL_MASK, since NS_RULE_NODE_LEVEL_MASK currently has 4
bits and allows a maximum of 15.
2014-09-13 06:17:35 -07:00
L. David Baron 7465178016 Bug 1057129 patch 3 - Post restyles from CheckAnimationRule directly to pseudo-elements. r=birtles
This matches patch 2, and also fixes an incorrect use of eRestyle_Self
on the parents of pseudo-elements in order to restyle those
pseudo-elements, where it would not previously have been effective.

This should all be temporary, since this code can go away with bug
960465, when animation phases are removed.
2014-08-24 21:48:22 -07:00
L. David Baron 9c23ec99b9 Bug 996796 patch 20 - Make restyling exact - Avoid rerunning selector matching on everything when the basis of rem units changes. r=heycam 2014-08-03 13:11:55 -07:00
L. David Baron a39da5881c Back out bug 996796 patch 18 through patch 25 (changesets fbe97c2db729 through 9719c08c3144) to fix 50%-of-the-time Android 4.0 debug orange from single assertion ("Why did this not get handled while processing mRestyleRoots?", layout/base/RestyleTracker.cpp, line 87) in gfx/tests/crashtests/815489.html . 2014-08-03 01:22:07 -07:00
L. David Baron 9babce67c7 Bug 996796 patch 20 - Make restyling exact - Avoid rerunning selector matching on everything when the basis of rem units changes. r=heycam 2014-08-02 19:37:47 -07:00
L. David Baron aa56e78e07 Bug 996796 patch 10 - Separate the rule node replacement code from the style context handling so that we can make visited handling correct. r=heycam 2014-08-02 19:37:44 -07:00
L. David Baron 807e67eeb1 Bug 996796 patch 9 - Make nsStyleSet::ResolveStyleWithReplacement handle changing between having and not having animation or transition rules, make it set IsImportantRule on rule nodes correctly, and merge the bogus ResolveStyleForRules into it. r=heycam
ResolveStyleForRules had various problems:  it failed to set importance
correctly and really only handled replacing a path in the rule tree
since it didn't handle creating important rules.  (Possibly more.)
2014-08-02 19:37:44 -07:00
L. David Baron 7e242b4acd Bug 996796 patch 8 - Pass the replacements through to ResolveStyleWithReplacement. r=heycam
This means ResolveStyleWithReplacement will replace only the rules in
the nsRestyleHint rather than always replacing both the animations rule
and the transitions rule.  (This will become even more useful later when
we add the ability to replace the style attribute rule.)
2014-08-02 19:37:44 -07:00
L. David Baron 29e1f8c013 Bug 996796 patch 5 - Move the guts of UpdateThrottledStyle into nsStyleSet, where it can be reused. r=heycam 2014-08-02 19:37:43 -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
Susanna Bowen 64b0116f8b Bug 1025308 - Rename the variables associated with skipping style fixups for children element's based on parent display value. r=mats 2014-06-16 09:55:00 -04:00
Xidorn Quan 96a68ed4e1 Bug 966166 - Part 1: Parse @counter-style rule. r=dbaron, r=bz 2014-06-11 21:10:00 -04:00
Daniel Holbert 86232178d1 Bug 985336: Remove unnecessary #includes from headers in layout/style. r=dbaron 2014-05-09 08:23:14 -07:00
Mats Palmgren 4933aef60a Bug 1000376 - part 3, s/FlexItemStyleFixup/FlexOrGridItemStyleFixup/ and corresponding comment changes. r=dholbert 2014-05-03 13:42:33 +00:00
Masayuki Nakano 3cc4e99fc0 Bug 989212 Rename nsEventStates to mozilla::EventStates r=smaug
--HG--
rename : dom/events/nsEventStates.h => dom/events/EventStates.h
2014-04-03 13:18:36 +09:00
Cameron McCormack 5bbc325e7f Bug 922669 - Part 7: Add nsStyleSet::HasStateDependentStyle and nsCSSRuleProcessor:HasStateDependentStyle overrides that work on pseudo-elements. r=bz 2013-11-28 17:46:39 +11:00