mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
import changes from tenfourfox:
bug1444231, bug1450688, bug1464784, bug1458048, bug1316649 - #491: new fix for M1452416 (8ebe4e8e5) (ported) - #508: unprefix -moz-columns (M1300895 plus additional work) (b9bdadfef)
This commit is contained in:
@@ -172,6 +172,12 @@ nsIContent::DoGetClasses() const
|
||||
NS_IMETHODIMP
|
||||
Element::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
||||
{
|
||||
if (aIID.Equals(NS_GET_IID(Element))) {
|
||||
NS_ADDREF_THIS();
|
||||
*aInstancePtr = this;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_ASSERTION(aInstancePtr,
|
||||
"QueryInterface requires a non-NULL destination!");
|
||||
nsresult rv = FragmentOrElement::QueryInterface(aIID, aInstancePtr);
|
||||
|
||||
@@ -1939,7 +1939,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
NS_INTERFACE_MAP_BEGIN(FragmentOrElement)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(FragmentOrElement)
|
||||
NS_INTERFACE_MAP_ENTRY(Element)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIContent)
|
||||
NS_INTERFACE_MAP_ENTRY(nsINode)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMEventTarget)
|
||||
|
||||
+10
-10
@@ -1729,8 +1729,8 @@ nsINode::Before(const Sequence<OwningNodeOrString>& aNodes,
|
||||
nsCOMPtr<nsINode> viablePreviousSibling =
|
||||
FindViablePreviousSibling(*this, aNodes);
|
||||
|
||||
nsCOMPtr<nsINode> node =
|
||||
ConvertNodesOrStringsIntoNode(aNodes, OwnerDoc(), aRv);
|
||||
nsCOMPtr<nsIDocument> doc = OwnerDoc();
|
||||
nsCOMPtr<nsINode> node = ConvertNodesOrStringsIntoNode(aNodes, doc, aRv);
|
||||
if (aRv.Failed()) {
|
||||
return;
|
||||
}
|
||||
@@ -1752,8 +1752,8 @@ nsINode::After(const Sequence<OwningNodeOrString>& aNodes,
|
||||
|
||||
nsCOMPtr<nsINode> viableNextSibling = FindViableNextSibling(*this, aNodes);
|
||||
|
||||
nsCOMPtr<nsINode> node =
|
||||
ConvertNodesOrStringsIntoNode(aNodes, OwnerDoc(), aRv);
|
||||
nsCOMPtr<nsIDocument> doc = OwnerDoc();
|
||||
nsCOMPtr<nsINode> node = ConvertNodesOrStringsIntoNode(aNodes, doc, aRv);
|
||||
if (aRv.Failed()) {
|
||||
return;
|
||||
}
|
||||
@@ -1772,8 +1772,8 @@ nsINode::ReplaceWith(const Sequence<OwningNodeOrString>& aNodes,
|
||||
|
||||
nsCOMPtr<nsINode> viableNextSibling = FindViableNextSibling(*this, aNodes);
|
||||
|
||||
nsCOMPtr<nsINode> node =
|
||||
ConvertNodesOrStringsIntoNode(aNodes, OwnerDoc(), aRv);
|
||||
nsCOMPtr<nsIDocument> doc = OwnerDoc();
|
||||
nsCOMPtr<nsINode> node = ConvertNodesOrStringsIntoNode(aNodes, doc, aRv);
|
||||
if (aRv.Failed()) {
|
||||
return;
|
||||
}
|
||||
@@ -1832,8 +1832,8 @@ void
|
||||
nsINode::Prepend(const Sequence<OwningNodeOrString>& aNodes,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
nsCOMPtr<nsINode> node =
|
||||
ConvertNodesOrStringsIntoNode(aNodes, OwnerDoc(), aRv);
|
||||
nsCOMPtr<nsIDocument> doc = OwnerDoc();
|
||||
nsCOMPtr<nsINode> node = ConvertNodesOrStringsIntoNode(aNodes, doc, aRv);
|
||||
if (aRv.Failed()) {
|
||||
return;
|
||||
}
|
||||
@@ -1845,8 +1845,8 @@ void
|
||||
nsINode::Append(const Sequence<OwningNodeOrString>& aNodes,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
nsCOMPtr<nsINode> node =
|
||||
ConvertNodesOrStringsIntoNode(aNodes, OwnerDoc(), aRv);
|
||||
nsCOMPtr<nsIDocument> doc = OwnerDoc();
|
||||
nsCOMPtr<nsINode> node = ConvertNodesOrStringsIntoNode(aNodes, doc, aRv);
|
||||
if (aRv.Failed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -62,6 +62,26 @@ PRLogModuleInfo* gMediaStreamGraphLog;
|
||||
# define LIFECYCLE_LOG(...)
|
||||
#endif
|
||||
|
||||
// Fix for bug 1452416, since we don't have the proper form of
|
||||
// NS_ReleaseOnMainThread(). This is based on our fix for M1348955
|
||||
// et al. as demonstrated in TenFourFox issue 478.
|
||||
template<typename T>
|
||||
class ProxyReleaseEvent : public nsRunnable
|
||||
{
|
||||
public:
|
||||
explicit ProxyReleaseEvent(already_AddRefed<T> aDoomed)
|
||||
: mDoomed(aDoomed.take()) {}
|
||||
|
||||
NS_IMETHOD Run() override
|
||||
{
|
||||
NS_IF_RELEASE(mDoomed);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
private:
|
||||
T* MOZ_OWNING_REF mDoomed;
|
||||
};
|
||||
|
||||
/**
|
||||
* The singleton graph instance.
|
||||
*/
|
||||
@@ -1709,6 +1729,12 @@ MediaStreamGraphImpl::RunInStableState(bool aSourceIsMSG)
|
||||
nsRefPtr<GraphDriver> driver = CurrentDriver();
|
||||
MonitorAutoUnlock unlock(mMonitor);
|
||||
driver->Start();
|
||||
// It's not safe to Shutdown() a thread from StableState, and
|
||||
// releasing this may shutdown a SystemClockDriver thread.
|
||||
// Proxy the release to outside of StableState.
|
||||
// NS_ReleaseOnMainThread(driver.forget(), true); // always proxy
|
||||
nsCOMPtr<nsIRunnable> event = new ProxyReleaseEvent<GraphDriver>(driver.forget());
|
||||
NS_DispatchToMainThread(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -976,7 +976,17 @@ nsXBLBinding::DoInitJSClass(JSContext *cx,
|
||||
NS_ENSURE_TRUE(xblScope, NS_ERROR_UNEXPECTED);
|
||||
|
||||
JS::Rooted<JSObject*> parent_proto(cx);
|
||||
if (!JS_GetPrototype(cx, obj, &parent_proto)) {
|
||||
{
|
||||
JS::RootedObject wrapped(cx, obj);
|
||||
JSAutoCompartment ac(cx, xblScope);
|
||||
if (!JS_WrapObject(cx, &wrapped)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
if (!JS_GetPrototype(cx, wrapped, &parent_proto)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
if (!JS_WrapObject(cx, &parent_proto)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ nsColumnSetFrame::PaintColumnRule(nsRenderingContext* aCtx,
|
||||
return;
|
||||
|
||||
nscolor ruleColor =
|
||||
GetVisitedDependentColor(eCSSProperty__moz_column_rule_color);
|
||||
GetVisitedDependentColor(eCSSProperty_column_rule_color);
|
||||
|
||||
// In order to re-use a large amount of code, we treat the column rule as a border.
|
||||
// We create a new border style object and fill in all the details of the column rule as
|
||||
|
||||
@@ -441,6 +441,11 @@ void nsHTMLReflowState::InitCBReflowState()
|
||||
mCBReflowState = nullptr;
|
||||
return;
|
||||
}
|
||||
if (parentReflowState->mFlags.mDummyParentReflowState) {
|
||||
// from bug 1316649
|
||||
mCBReflowState = parentReflowState;
|
||||
return;
|
||||
}
|
||||
|
||||
if (parentReflowState->frame == frame->GetContainingBlock()) {
|
||||
// Inner table frames need to use the containing block of the outer
|
||||
|
||||
@@ -371,7 +371,7 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue,
|
||||
case eCSSProperty_border_end:
|
||||
case eCSSProperty_border_block_start:
|
||||
case eCSSProperty_border_block_end:
|
||||
case eCSSProperty__moz_column_rule:
|
||||
case eCSSProperty_column_rule:
|
||||
case eCSSProperty_outline: {
|
||||
const nsCSSProperty* subprops =
|
||||
nsCSSProps::SubpropertyEntryFor(aProperty);
|
||||
@@ -872,7 +872,7 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue,
|
||||
AppendValueToString(eCSSProperty_marker_end, aValue, aSerialization);
|
||||
break;
|
||||
}
|
||||
case eCSSProperty__moz_columns: {
|
||||
case eCSSProperty_columns: {
|
||||
// Two values, column-count and column-width, separated by a space.
|
||||
const nsCSSProperty* subprops =
|
||||
nsCSSProps::SubpropertyEntryFor(aProperty);
|
||||
|
||||
@@ -2926,7 +2926,7 @@ StyleAnimationValue::ExtractComputedValue(nsCSSProperty aProperty,
|
||||
BORDER_WIDTH_CASE(eCSSProperty_border_top_width, top)
|
||||
#undef BORDER_WIDTH_CASE
|
||||
|
||||
case eCSSProperty__moz_column_rule_width:
|
||||
case eCSSProperty_column_rule_width:
|
||||
aComputedValue.SetCoordValue(
|
||||
static_cast<const nsStyleColumn*>(styleStruct)->
|
||||
GetComputedColumnRuleWidth());
|
||||
@@ -2959,7 +2959,7 @@ StyleAnimationValue::ExtractComputedValue(nsCSSProperty aProperty,
|
||||
break;
|
||||
}
|
||||
|
||||
case eCSSProperty__moz_column_rule_color: {
|
||||
case eCSSProperty_column_rule_color: {
|
||||
const nsStyleColumn *styleColumn =
|
||||
static_cast<const nsStyleColumn*>(styleStruct);
|
||||
nscolor color;
|
||||
@@ -2972,7 +2972,7 @@ StyleAnimationValue::ExtractComputedValue(nsCSSProperty aProperty,
|
||||
break;
|
||||
}
|
||||
|
||||
case eCSSProperty__moz_column_count: {
|
||||
case eCSSProperty_column_count: {
|
||||
const nsStyleColumn *styleColumn =
|
||||
static_cast<const nsStyleColumn*>(styleStruct);
|
||||
if (styleColumn->mColumnCount == NS_STYLE_COLUMN_COUNT_AUTO) {
|
||||
|
||||
@@ -6697,9 +6697,9 @@ static const nsCSSProperty kBorderBlockEndIDs[] = {
|
||||
eCSSProperty_border_block_end_color
|
||||
};
|
||||
static const nsCSSProperty kColumnRuleIDs[] = {
|
||||
eCSSProperty__moz_column_rule_width,
|
||||
eCSSProperty__moz_column_rule_style,
|
||||
eCSSProperty__moz_column_rule_color
|
||||
eCSSProperty_column_rule_width,
|
||||
eCSSProperty_column_rule_style,
|
||||
eCSSProperty_column_rule_color
|
||||
};
|
||||
|
||||
bool
|
||||
@@ -9885,9 +9885,9 @@ CSSParserImpl::ParsePropertyByFunction(nsCSSProperty aPropID)
|
||||
|
||||
case eCSSProperty_clip:
|
||||
return ParseRect(eCSSProperty_clip);
|
||||
case eCSSProperty__moz_columns:
|
||||
case eCSSProperty_columns:
|
||||
return ParseColumns();
|
||||
case eCSSProperty__moz_column_rule:
|
||||
case eCSSProperty_column_rule:
|
||||
return ParseBorderSide(kColumnRuleIDs, false);
|
||||
case eCSSProperty_content:
|
||||
return ParseContent();
|
||||
@@ -11603,8 +11603,8 @@ CSSParserImpl::ParseColumns()
|
||||
// find.
|
||||
static const nsCSSProperty columnIDs[] = {
|
||||
eCSSPropertyExtra_x_auto_value,
|
||||
eCSSProperty__moz_column_count,
|
||||
eCSSProperty__moz_column_width
|
||||
eCSSProperty_column_count,
|
||||
eCSSProperty_column_width
|
||||
};
|
||||
const int32_t numProps = MOZ_ARRAY_LENGTH(columnIDs);
|
||||
|
||||
|
||||
@@ -1399,15 +1399,15 @@ CSS_PROP_COLOR(
|
||||
offsetof(nsStyleColor, mColor),
|
||||
eStyleAnimType_Color)
|
||||
CSS_PROP_SHORTHAND(
|
||||
-moz-columns,
|
||||
_moz_columns,
|
||||
CSS_PROP_DOMPROP_PREFIXED(Columns),
|
||||
columns,
|
||||
columns,
|
||||
Columns,
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"")
|
||||
CSS_PROP_COLUMN(
|
||||
-moz-column-count,
|
||||
_moz_column_count,
|
||||
CSS_PROP_DOMPROP_PREFIXED(ColumnCount),
|
||||
column-count,
|
||||
column_count,
|
||||
ColumnCount,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
// Need to reject 0 in addition to negatives. If we accept 0, we
|
||||
// need to change NS_STYLE_COLUMN_COUNT_AUTO to something else.
|
||||
@@ -1418,9 +1418,9 @@ CSS_PROP_COLUMN(
|
||||
offsetof(nsStyleColumn, mColumnCount),
|
||||
eStyleAnimType_Custom)
|
||||
CSS_PROP_COLUMN(
|
||||
-moz-column-fill,
|
||||
_moz_column_fill,
|
||||
CSS_PROP_DOMPROP_PREFIXED(ColumnFill),
|
||||
column-fill,
|
||||
column_fill,
|
||||
ColumnFill,
|
||||
CSS_PROPERTY_PARSE_VALUE,
|
||||
"",
|
||||
VARIANT_HK,
|
||||
@@ -1428,9 +1428,9 @@ CSS_PROP_COLUMN(
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_COLUMN(
|
||||
-moz-column-width,
|
||||
_moz_column_width,
|
||||
CSS_PROP_DOMPROP_PREFIXED(ColumnWidth),
|
||||
column-width,
|
||||
column_width,
|
||||
ColumnWidth,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE,
|
||||
"",
|
||||
@@ -1439,9 +1439,9 @@ CSS_PROP_COLUMN(
|
||||
offsetof(nsStyleColumn, mColumnWidth),
|
||||
eStyleAnimType_Coord)
|
||||
CSS_PROP_COLUMN(
|
||||
-moz-column-gap,
|
||||
_moz_column_gap,
|
||||
CSS_PROP_DOMPROP_PREFIXED(ColumnGap),
|
||||
column-gap,
|
||||
column_gap,
|
||||
ColumnGap,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE,
|
||||
"",
|
||||
@@ -1450,15 +1450,15 @@ CSS_PROP_COLUMN(
|
||||
offsetof(nsStyleColumn, mColumnGap),
|
||||
eStyleAnimType_Coord)
|
||||
CSS_PROP_SHORTHAND(
|
||||
-moz-column-rule,
|
||||
_moz_column_rule,
|
||||
CSS_PROP_DOMPROP_PREFIXED(ColumnRule),
|
||||
column-rule,
|
||||
column_rule,
|
||||
ColumnRule,
|
||||
CSS_PROPERTY_PARSE_FUNCTION,
|
||||
"")
|
||||
CSS_PROP_COLUMN(
|
||||
-moz-column-rule-color,
|
||||
_moz_column_rule_color,
|
||||
CSS_PROP_DOMPROP_PREFIXED(ColumnRuleColor),
|
||||
column-rule-color,
|
||||
column_rule_color,
|
||||
ColumnRuleColor,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED,
|
||||
"",
|
||||
@@ -1467,9 +1467,9 @@ CSS_PROP_COLUMN(
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_Custom)
|
||||
CSS_PROP_COLUMN(
|
||||
-moz-column-rule-style,
|
||||
_moz_column_rule_style,
|
||||
CSS_PROP_DOMPROP_PREFIXED(ColumnRuleStyle),
|
||||
column-rule-style,
|
||||
column_rule_style,
|
||||
ColumnRuleStyle,
|
||||
CSS_PROPERTY_PARSE_VALUE,
|
||||
"",
|
||||
VARIANT_HK,
|
||||
@@ -1477,9 +1477,9 @@ CSS_PROP_COLUMN(
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_COLUMN(
|
||||
-moz-column-rule-width,
|
||||
_moz_column_rule_width,
|
||||
CSS_PROP_DOMPROP_PREFIXED(ColumnRuleWidth),
|
||||
column-rule-width,
|
||||
column_rule_width,
|
||||
ColumnRuleWidth,
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_VALUE_NONNEGATIVE,
|
||||
"",
|
||||
|
||||
@@ -2530,17 +2530,17 @@ static const nsCSSProperty gOutlineSubpropTable[] = {
|
||||
};
|
||||
|
||||
static const nsCSSProperty gColumnsSubpropTable[] = {
|
||||
eCSSProperty__moz_column_count,
|
||||
eCSSProperty__moz_column_width,
|
||||
eCSSProperty_column_count,
|
||||
eCSSProperty_column_width,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
static const nsCSSProperty gColumnRuleSubpropTable[] = {
|
||||
// nsCSSDeclaration.cpp outputs the subproperties in this order.
|
||||
// It also depends on the color being third.
|
||||
eCSSProperty__moz_column_rule_width,
|
||||
eCSSProperty__moz_column_rule_style,
|
||||
eCSSProperty__moz_column_rule_color,
|
||||
eCSSProperty_column_rule_width,
|
||||
eCSSProperty_column_rule_style,
|
||||
eCSSProperty_column_rule_color,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
|
||||
@@ -102,6 +102,14 @@ COMPUTED_STYLE_PROP(caption_side, CaptionSide)
|
||||
COMPUTED_STYLE_PROP(clear, Clear)
|
||||
COMPUTED_STYLE_PROP(clip, Clip)
|
||||
COMPUTED_STYLE_PROP(color, Color)
|
||||
COMPUTED_STYLE_PROP(column_count, ColumnCount)
|
||||
COMPUTED_STYLE_PROP(column_fill, ColumnFill)
|
||||
COMPUTED_STYLE_PROP(column_gap, ColumnGap)
|
||||
//// COMPUTED_STYLE_PROP(column_rule, ColumnRule)
|
||||
COMPUTED_STYLE_PROP(column_rule_color, ColumnRuleColor)
|
||||
COMPUTED_STYLE_PROP(column_rule_style, ColumnRuleStyle)
|
||||
COMPUTED_STYLE_PROP(column_rule_width, ColumnRuleWidth)
|
||||
COMPUTED_STYLE_PROP(column_width, ColumnWidth)
|
||||
COMPUTED_STYLE_PROP(content, Content)
|
||||
COMPUTED_STYLE_PROP(counter_increment, CounterIncrement)
|
||||
COMPUTED_STYLE_PROP(counter_reset, CounterReset)
|
||||
@@ -253,14 +261,6 @@ COMPUTED_STYLE_PROP(box_flex, BoxFlex)
|
||||
COMPUTED_STYLE_PROP(box_ordinal_group, BoxOrdinalGroup)
|
||||
COMPUTED_STYLE_PROP(box_orient, BoxOrient)
|
||||
COMPUTED_STYLE_PROP(box_pack, BoxPack)
|
||||
COMPUTED_STYLE_PROP(_moz_column_count, ColumnCount)
|
||||
COMPUTED_STYLE_PROP(_moz_column_fill, ColumnFill)
|
||||
COMPUTED_STYLE_PROP(_moz_column_gap, ColumnGap)
|
||||
//// COMPUTED_STYLE_PROP(_moz_column_rule, ColumnRule)
|
||||
COMPUTED_STYLE_PROP(_moz_column_rule_color, ColumnRuleColor)
|
||||
COMPUTED_STYLE_PROP(_moz_column_rule_style, ColumnRuleStyle)
|
||||
COMPUTED_STYLE_PROP(_moz_column_rule_width, ColumnRuleWidth)
|
||||
COMPUTED_STYLE_PROP(_moz_column_width, ColumnWidth)
|
||||
COMPUTED_STYLE_PROP(float_edge, FloatEdge)
|
||||
COMPUTED_STYLE_PROP(force_broken_image_icon, ForceBrokenImageIcon)
|
||||
COMPUTED_STYLE_PROP(hyphens, Hyphens)
|
||||
|
||||
@@ -1144,7 +1144,7 @@ nsStyleContext::GetVisitedDependentColor(nsCSSProperty aProperty)
|
||||
aProperty == eCSSProperty_border_bottom_color ||
|
||||
aProperty == eCSSProperty_border_left_color ||
|
||||
aProperty == eCSSProperty_outline_color ||
|
||||
aProperty == eCSSProperty__moz_column_rule_color ||
|
||||
aProperty == eCSSProperty_column_rule_color ||
|
||||
aProperty == eCSSProperty_text_decoration_color ||
|
||||
aProperty == eCSSProperty_fill ||
|
||||
aProperty == eCSSProperty_stroke,
|
||||
|
||||
@@ -1540,6 +1540,8 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, struct mbuf *m,
|
||||
if (p_random != NULL) {
|
||||
keylen = sizeof(*p_random) + random_len;
|
||||
bcopy(p_random, new_key->key, keylen);
|
||||
} else {
|
||||
keylen = 0;
|
||||
}
|
||||
/* append in the AUTH chunks */
|
||||
if (chunks != NULL) {
|
||||
|
||||
@@ -7600,6 +7600,8 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
|
||||
if (p_random != NULL) {
|
||||
keylen = sizeof(*p_random) + random_len;
|
||||
bcopy(p_random, new_key->key, keylen);
|
||||
} else {
|
||||
keylen = 0;
|
||||
}
|
||||
/* append in the AUTH chunks */
|
||||
if (chunks != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user