summaryrefslogtreecommitdiff
path: root/layout/style
diff options
context:
space:
mode:
authorPale Moon <git-repo@palemoon.org>2016-03-16 12:10:21 +0100
committerPale Moon <git-repo@palemoon.org>2016-03-16 12:10:21 +0100
commit5d7e3626cfdc824880bbc12cf82327b1ae24f9d3 (patch)
treec4b0d807c12561c9bb8045a6062427e1c2127a72 /layout/style
parentc4d4d92b56d8bfc64c4887393d628c0cbb7620d9 (diff)
downloadpalemoon-gre-5d7e3626cfdc824880bbc12cf82327b1ae24f9d3.tar.gz
Fix layout of reflowed combobox without enough space (shouldn't split and add a line), and DiD BP crashfix for the same.
Diffstat (limited to 'layout/style')
-rw-r--r--layout/style/nsStyleSet.cpp5
-rw-r--r--layout/style/nsStyleSet.h38
2 files changed, 23 insertions, 20 deletions
diff --git a/layout/style/nsStyleSet.cpp b/layout/style/nsStyleSet.cpp
index 5e0e6391c..3829beb47 100644
--- a/layout/style/nsStyleSet.cpp
+++ b/layout/style/nsStyleSet.cpp
@@ -1426,7 +1426,8 @@ nsStyleSet::ProbePseudoElementStyle(Element* aParentElement,
already_AddRefed<nsStyleContext>
nsStyleSet::ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag,
- nsStyleContext* aParentContext)
+ nsStyleContext* aParentContext,
+ uint32_t aFlags)
{
NS_ENSURE_FALSE(mInShutdown, nullptr);
@@ -1464,7 +1465,7 @@ nsStyleSet::ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag,
return GetContext(aParentContext, ruleWalker.CurrentNode(), nullptr,
aPseudoTag, nsCSSPseudoElements::ePseudo_AnonBox,
- nullptr, eNoFlags);
+ nullptr, aFlags);
}
#ifdef MOZ_XUL
diff --git a/layout/style/nsStyleSet.h b/layout/style/nsStyleSet.h
index 9f61eebd8..4c4330981 100644
--- a/layout/style/nsStyleSet.h
+++ b/layout/style/nsStyleSet.h
@@ -139,10 +139,29 @@ class nsStyleSet
nsStyleContext* aParentContext,
TreeMatchContext& aTreeMatchContext);
+ /**
+ * Bit-flags that can be passed to ResolveAnonymousBoxStyle and GetContext
+ * in their parameter 'aFlags'.
+ */
+ enum {
+ eNoFlags = 0,
+ eIsLink = 1 << 0,
+ eIsVisitedLink = 1 << 1,
+ eDoAnimation = 1 << 2,
+
+ // Indicates that we should skip the flex-item-specific chunk of
+ // ApplyStyleFixups(). This is useful if our parent has "display: flex"
+ // but we can tell it's not going to actually be a flex container (e.g. if
+ // it's the outer frame of a button widget, and we're the inline frame for
+ // the button's label).
+ eSkipFlexItemStyleFixup = 1 << 3
+ };
+
// Get a style context for an anonymous box. aPseudoTag is the
// pseudo-tag to use and must be non-null.
already_AddRefed<nsStyleContext>
- ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag, nsStyleContext* aParentContext);
+ ResolveAnonymousBoxStyle(nsIAtom* aPseudoTag, nsStyleContext* aParentContext,
+ uint32_t aFlags = eNoFlags);
#ifdef MOZ_XUL
// Get a style context for a XUL tree pseudo. aPseudoTag is the
@@ -363,23 +382,6 @@ class nsStyleSet
ElementDependentRuleProcessorData* aData,
bool aWalkAllXBLStylesheets);
- /**
- * Bit-flags that can be passed to GetContext() in its parameter 'aFlags'.
- */
- enum {
- eNoFlags = 0,
- eIsLink = 1 << 0,
- eIsVisitedLink = 1 << 1,
- eDoAnimation = 1 << 2,
-
- // Indicates that we should skip the flex-item-specific chunk of
- // ApplyStyleFixups(). This is useful if our parent has "display: flex"
- // but we can tell it's not going to actually be a flex container (e.g. if
- // it's the outer frame of a button widget, and we're the inline frame for
- // the button's label).
- eSkipFlexItemStyleFixup = 1 << 3
- };
-
already_AddRefed<nsStyleContext>
GetContext(nsStyleContext* aParentContext,
nsRuleNode* aRuleNode,