зеркало из https://github.com/mozilla/gecko-dev.git
Merge inbound to mozilla-central. a=merge
This commit is contained in:
Коммит
cbbdd02331
|
@ -430,7 +430,7 @@ MARKUPMAP(p,
|
|||
MARKUPMAP(
|
||||
progress,
|
||||
[](Element* aElement, Accessible* aContext) -> Accessible* {
|
||||
return new HTMLProgressMeterAccessible(aElement, aContext->Document());
|
||||
return new HTMLProgressAccessible(aElement, aContext->Document());
|
||||
},
|
||||
0
|
||||
)
|
||||
|
|
|
@ -319,7 +319,7 @@ enum Role {
|
|||
|
||||
/**
|
||||
* Represents a progress bar, dynamically showing the user the percent
|
||||
* complete of an operation in progress. It is used for xul:progressmeter,
|
||||
* complete of an operation in progress. It is used for html:progress,
|
||||
* role="progressbar".
|
||||
*/
|
||||
PROGRESSBAR = 48,
|
||||
|
|
|
@ -19,7 +19,6 @@ XULMAP_TYPE(menuitem, XULMenuitemAccessibleWrap)
|
|||
XULMAP_TYPE(menulist, XULComboboxAccessible)
|
||||
XULMAP_TYPE(menuseparator, XULMenuSeparatorAccessible)
|
||||
XULMAP_TYPE(notification, XULAlertAccessible)
|
||||
XULMAP_TYPE(progressmeter, XULProgressMeterAccessible)
|
||||
XULMAP_TYPE(radio, XULRadioButtonAccessible)
|
||||
XULMAP_TYPE(radiogroup, XULRadioGroupAccessible)
|
||||
XULMAP_TYPE(richlistbox, XULListboxAccessibleWrap)
|
||||
|
|
|
@ -13,136 +13,6 @@
|
|||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// ProgressMeterAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template class mozilla::a11y::ProgressMeterAccessible<1>;
|
||||
template class mozilla::a11y::ProgressMeterAccessible<100>;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Accessible
|
||||
|
||||
template<int Max>
|
||||
role
|
||||
ProgressMeterAccessible<Max>::NativeRole() const
|
||||
{
|
||||
return roles::PROGRESSBAR;
|
||||
}
|
||||
|
||||
template<int Max>
|
||||
uint64_t
|
||||
ProgressMeterAccessible<Max>::NativeState() const
|
||||
{
|
||||
uint64_t state = LeafAccessible::NativeState();
|
||||
|
||||
// An undetermined progressbar (i.e. without a value) has a mixed state.
|
||||
nsAutoString attrValue;
|
||||
mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::value, attrValue);
|
||||
|
||||
if (attrValue.IsEmpty())
|
||||
state |= states::MIXED;
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// ProgressMeterAccessible<Max>: Widgets
|
||||
|
||||
template<int Max>
|
||||
bool
|
||||
ProgressMeterAccessible<Max>::IsWidget() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// ProgressMeterAccessible<Max>: Value
|
||||
|
||||
template<int Max>
|
||||
void
|
||||
ProgressMeterAccessible<Max>::Value(nsString& aValue) const
|
||||
{
|
||||
LeafAccessible::Value(aValue);
|
||||
if (!aValue.IsEmpty())
|
||||
return;
|
||||
|
||||
double maxValue = MaxValue();
|
||||
if (IsNaN(maxValue) || maxValue == 0)
|
||||
return;
|
||||
|
||||
double curValue = CurValue();
|
||||
if (IsNaN(curValue))
|
||||
return;
|
||||
|
||||
// Treat the current value bigger than maximum as 100%.
|
||||
double percentValue = (curValue < maxValue) ?
|
||||
(curValue / maxValue) * 100 : 100;
|
||||
|
||||
aValue.AppendFloat(percentValue);
|
||||
aValue.Append('%');
|
||||
}
|
||||
|
||||
template<int Max>
|
||||
double
|
||||
ProgressMeterAccessible<Max>::MaxValue() const
|
||||
{
|
||||
double value = LeafAccessible::MaxValue();
|
||||
if (!IsNaN(value))
|
||||
return value;
|
||||
|
||||
nsAutoString strValue;
|
||||
if (mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::max, strValue)) {
|
||||
nsresult result = NS_OK;
|
||||
value = strValue.ToDouble(&result);
|
||||
if (NS_SUCCEEDED(result))
|
||||
return value;
|
||||
}
|
||||
|
||||
return Max;
|
||||
}
|
||||
|
||||
template<int Max>
|
||||
double
|
||||
ProgressMeterAccessible<Max>::MinValue() const
|
||||
{
|
||||
double value = LeafAccessible::MinValue();
|
||||
return IsNaN(value) ? 0 : value;
|
||||
}
|
||||
|
||||
template<int Max>
|
||||
double
|
||||
ProgressMeterAccessible<Max>::Step() const
|
||||
{
|
||||
double value = LeafAccessible::Step();
|
||||
return IsNaN(value) ? 0 : value;
|
||||
}
|
||||
|
||||
template<int Max>
|
||||
double
|
||||
ProgressMeterAccessible<Max>::CurValue() const
|
||||
{
|
||||
double value = LeafAccessible::CurValue();
|
||||
if (!IsNaN(value))
|
||||
return value;
|
||||
|
||||
nsAutoString attrValue;
|
||||
if (!mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::value, attrValue))
|
||||
return UnspecifiedNaN<double>();
|
||||
|
||||
nsresult error = NS_OK;
|
||||
value = attrValue.ToDouble(&error);
|
||||
return NS_FAILED(error) ? UnspecifiedNaN<double>() : value;
|
||||
}
|
||||
|
||||
template<int Max>
|
||||
bool
|
||||
ProgressMeterAccessible<Max>::SetCurValue(double aValue)
|
||||
{
|
||||
return false; // progress meters are readonly.
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// CheckboxAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -11,41 +11,6 @@
|
|||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
/**
|
||||
* Generic class used for progress meters.
|
||||
*/
|
||||
template<int Max>
|
||||
class ProgressMeterAccessible : public LeafAccessible
|
||||
{
|
||||
public:
|
||||
ProgressMeterAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
||||
LeafAccessible(aContent, aDoc)
|
||||
{
|
||||
// Ignore 'ValueChange' DOM event in lieu of @value attribute change
|
||||
// notifications.
|
||||
mStateFlags |= eHasNumericValue | eIgnoreDOMUIEvent;
|
||||
mType = eProgressType;
|
||||
}
|
||||
|
||||
// Accessible
|
||||
virtual void Value(nsString& aValue) const override;
|
||||
virtual mozilla::a11y::role NativeRole() const override;
|
||||
virtual uint64_t NativeState() const override;
|
||||
|
||||
// Value
|
||||
virtual double MaxValue() const override;
|
||||
virtual double MinValue() const override;
|
||||
virtual double CurValue() const override;
|
||||
virtual double Step() const override;
|
||||
virtual bool SetCurValue(double aValue) override;
|
||||
|
||||
// Widgets
|
||||
virtual bool IsWidget() const override;
|
||||
|
||||
protected:
|
||||
virtual ~ProgressMeterAccessible() {}
|
||||
};
|
||||
|
||||
/**
|
||||
* Checkbox accessible.
|
||||
*/
|
||||
|
|
|
@ -805,3 +805,121 @@ HTMLFigcaptionAccessible::RelationByType(RelationType aType) const
|
|||
|
||||
return rel;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLProgressAccessible
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
role
|
||||
HTMLProgressAccessible::NativeRole() const
|
||||
{
|
||||
return roles::PROGRESSBAR;
|
||||
}
|
||||
|
||||
uint64_t
|
||||
HTMLProgressAccessible::NativeState() const
|
||||
{
|
||||
uint64_t state = LeafAccessible::NativeState();
|
||||
|
||||
// An undetermined progressbar (i.e. without a value) has a mixed state.
|
||||
nsAutoString attrValue;
|
||||
mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::value,
|
||||
attrValue);
|
||||
if (attrValue.IsEmpty()) {
|
||||
state |= states::MIXED;
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
bool
|
||||
HTMLProgressAccessible::IsWidget() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
HTMLProgressAccessible::Value(nsString& aValue) const
|
||||
{
|
||||
LeafAccessible::Value(aValue);
|
||||
if (!aValue.IsEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
double maxValue = MaxValue();
|
||||
if (IsNaN(maxValue) || maxValue == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
double curValue = CurValue();
|
||||
if (IsNaN(curValue)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Treat the current value bigger than maximum as 100%.
|
||||
double percentValue = (curValue < maxValue) ? (curValue / maxValue) * 100
|
||||
: 100;
|
||||
|
||||
aValue.AppendFloat(percentValue);
|
||||
aValue.Append('%');
|
||||
}
|
||||
|
||||
double
|
||||
HTMLProgressAccessible::MaxValue() const
|
||||
{
|
||||
double value = LeafAccessible::MaxValue();
|
||||
if (!IsNaN(value)) {
|
||||
return value;
|
||||
}
|
||||
|
||||
nsAutoString strValue;
|
||||
if (mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::max,
|
||||
strValue)) {
|
||||
nsresult result = NS_OK;
|
||||
value = strValue.ToDouble(&result);
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
double
|
||||
HTMLProgressAccessible::MinValue() const
|
||||
{
|
||||
double value = LeafAccessible::MinValue();
|
||||
return IsNaN(value) ? 0 : value;
|
||||
}
|
||||
|
||||
double
|
||||
HTMLProgressAccessible::Step() const
|
||||
{
|
||||
double value = LeafAccessible::Step();
|
||||
return IsNaN(value) ? 0 : value;
|
||||
}
|
||||
|
||||
double
|
||||
HTMLProgressAccessible::CurValue() const
|
||||
{
|
||||
double value = LeafAccessible::CurValue();
|
||||
if (!IsNaN(value)) {
|
||||
return value;
|
||||
}
|
||||
|
||||
nsAutoString attrValue;
|
||||
if (!mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::value,
|
||||
attrValue)) {
|
||||
return UnspecifiedNaN<double>();
|
||||
}
|
||||
|
||||
nsresult error = NS_OK;
|
||||
value = attrValue.ToDouble(&error);
|
||||
return NS_FAILED(error) ? UnspecifiedNaN<double>() : value;
|
||||
}
|
||||
|
||||
bool
|
||||
HTMLProgressAccessible::SetCurValue(double aValue)
|
||||
{
|
||||
return false; // progress meters are readonly.
|
||||
}
|
||||
|
|
|
@ -13,11 +13,6 @@ namespace mozilla {
|
|||
class TextEditor;
|
||||
namespace a11y {
|
||||
|
||||
/**
|
||||
* Accessible for HTML progress element.
|
||||
*/
|
||||
typedef ProgressMeterAccessible<1> HTMLProgressMeterAccessible;
|
||||
|
||||
/**
|
||||
* Accessible for HTML input@type="radio" element.
|
||||
*/
|
||||
|
@ -270,6 +265,41 @@ protected:
|
|||
virtual ~HTMLFormAccessible() = default;
|
||||
};
|
||||
|
||||
/**
|
||||
* Accessible for HTML progress element.
|
||||
*/
|
||||
|
||||
class HTMLProgressAccessible : public LeafAccessible
|
||||
{
|
||||
public:
|
||||
HTMLProgressAccessible(nsIContent* aContent, DocAccessible* aDoc) :
|
||||
LeafAccessible(aContent, aDoc)
|
||||
{
|
||||
// Ignore 'ValueChange' DOM event in lieu of @value attribute change
|
||||
// notifications.
|
||||
mStateFlags |= eHasNumericValue | eIgnoreDOMUIEvent;
|
||||
mType = eProgressType;
|
||||
}
|
||||
|
||||
// Accessible
|
||||
virtual void Value(nsString& aValue) const override;
|
||||
virtual mozilla::a11y::role NativeRole() const override;
|
||||
virtual uint64_t NativeState() const override;
|
||||
|
||||
// Value
|
||||
virtual double MaxValue() const override;
|
||||
virtual double MinValue() const override;
|
||||
virtual double CurValue() const override;
|
||||
virtual double Step() const override;
|
||||
virtual bool SetCurValue(double aValue) override;
|
||||
|
||||
// Widgets
|
||||
virtual bool IsWidget() const override;
|
||||
|
||||
protected:
|
||||
virtual ~HTMLProgressAccessible() {}
|
||||
};
|
||||
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
||||
|
||||
|
|
|
@ -312,7 +312,7 @@ interface nsIAccessibleRole : nsISupports
|
|||
|
||||
/**
|
||||
* Represents a progress bar, dynamically showing the user the percent
|
||||
* complete of an operation in progress. It is used for xul:progressmeter,
|
||||
* complete of an operation in progress. It is used for html:progress,
|
||||
* role="progressbar".
|
||||
*/
|
||||
const unsigned long ROLE_PROGRESSBAR = 48;
|
||||
|
|
|
@ -174,7 +174,7 @@
|
|||
testName("li_labelledby", "Show an Alert The moment the event starts");
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// groupbox labeling from caption sub tree
|
||||
// groupbox labeling from first label
|
||||
testName("groupbox", "Some caption");
|
||||
|
||||
SimpleTest.finish();
|
||||
|
@ -348,7 +348,7 @@
|
|||
|
||||
<!-- Name from caption sub tree -->
|
||||
<groupbox id="groupbox">
|
||||
<caption><label>Some caption</label></caption>
|
||||
<label>Some caption</label>
|
||||
<checkbox label="some checkbox label" />
|
||||
</groupbox>
|
||||
</vbox>
|
||||
|
|
|
@ -103,8 +103,7 @@
|
|||
// 'default button' relation
|
||||
testRelation("textbox", RELATION_DEFAULT_BUTTON, "submit");
|
||||
|
||||
// 'labelled by'/'label for' relation for xul:goupbox and xul:label of
|
||||
// xul:caption
|
||||
// 'labelled by'/'label for' relation for xul:groupbox and xul:label
|
||||
var groupboxAcc = getAccessible("groupbox");
|
||||
var labelAcc = groupboxAcc.firstChild;
|
||||
testRelation(labelAcc, RELATION_LABEL_FOR, groupboxAcc);
|
||||
|
@ -211,7 +210,7 @@
|
|||
<button id="submit" default="true" label="Default"/>
|
||||
|
||||
<groupbox id="groupbox">
|
||||
<caption><label id="groupboxlabel" value="caption"/></caption>
|
||||
<label value="caption"/>
|
||||
</groupbox>
|
||||
|
||||
<tabbox>
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
|
||||
<vbox flex="1">
|
||||
<groupbox id="groupbox">
|
||||
<caption><label value="Some caption"/></caption>
|
||||
<label value="Some caption"/>
|
||||
<checkbox label="some checkbox label" />
|
||||
</groupbox>
|
||||
</vbox>
|
||||
|
|
|
@ -5,5 +5,4 @@ support-files =
|
|||
[test_general.html]
|
||||
[test_number.html]
|
||||
[test_progress.html]
|
||||
[test_progress.xul]
|
||||
[test_range.html]
|
||||
|
|
|
@ -1,68 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
|
||||
type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="XUL progressmeter tests">
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
|
||||
|
||||
<script type="application/javascript"
|
||||
src="../common.js" />
|
||||
<script type="application/javascript"
|
||||
src="../value.js" />
|
||||
|
||||
<script type="application/javascript">
|
||||
<![CDATA[
|
||||
function doTest()
|
||||
{
|
||||
// progressmeter
|
||||
testValue("pm1", "50%", 50, 0, 100, 0);
|
||||
testValue("pm2", "50%", 500, 0, 1000, 0);
|
||||
testValue("pm3", "", 0, 0, 100, 0);
|
||||
testValue("pm4", "", 0, 0, 100, 0);
|
||||
|
||||
// aria progressbar
|
||||
testValue("ariapb1", "500", 500, 0, 1000, 0);
|
||||
testValue("ariapb2", "", 0, 0, 0, 0);
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addA11yLoadEvent(doTest);
|
||||
]]>
|
||||
</script>
|
||||
|
||||
<hbox flex="1" style="overflow: auto;">
|
||||
<body xmlns="http://www.w3.org/1999/xhtml">
|
||||
<a target="_blank"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=489551"
|
||||
title="Values of sliders and progress bars in HTML 5 audio and video element's control sets are not percentages">
|
||||
Mozilla Bug 489551
|
||||
</a><br/>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
</div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
</body>
|
||||
|
||||
<!-- progressmeter -->
|
||||
<vbox>
|
||||
<progressmeter id="pm1" value="50"/>
|
||||
<progressmeter id="pm2" value="500" max="1000"/>
|
||||
<progressmeter id="pm3"/>
|
||||
<progressmeter id="pm4" mode="undetermined"/>
|
||||
</vbox>
|
||||
|
||||
<!-- aria -->
|
||||
<description id="ariapb1" role="progressbar"
|
||||
aria-valuenow="500" aria-valuemin="0" aria-valuemax="1000"/>
|
||||
<description id="ariapb2" role="progressbar"/>
|
||||
</hbox>
|
||||
|
||||
</window>
|
||||
|
|
@ -89,13 +89,14 @@ Relation
|
|||
XULLabelAccessible::RelationByType(RelationType aType) const
|
||||
{
|
||||
Relation rel = HyperTextAccessibleWrap::RelationByType(aType);
|
||||
|
||||
// The label for xul:groupbox is generated from the first xul:label
|
||||
if (aType == RelationType::LABEL_FOR) {
|
||||
// Caption is the label for groupbox
|
||||
nsIContent* parent = mContent->GetFlattenedTreeParent();
|
||||
if (parent && parent->IsXULElement(nsGkAtoms::caption)) {
|
||||
Accessible* parent = Parent();
|
||||
if (parent && parent->Role() == roles::GROUPING)
|
||||
rel.AppendTarget(parent);
|
||||
Accessible* parent = Parent();
|
||||
if (parent && parent->Role() == roles::GROUPING &&
|
||||
parent->GetContent()->IsXULElement(nsGkAtoms::groupbox) &&
|
||||
parent->GetChildAt(0) == this) {
|
||||
rel.AppendTarget(parent);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -286,24 +286,13 @@ Relation
|
|||
XULGroupboxAccessible::RelationByType(RelationType aType) const
|
||||
{
|
||||
Relation rel = AccessibleWrap::RelationByType(aType);
|
||||
if (aType != RelationType::LABELLED_BY)
|
||||
return rel;
|
||||
|
||||
// The label for xul:groupbox is generated from xul:label that is
|
||||
// inside the anonymous content of the xul:caption.
|
||||
// The xul:label has an accessible object but the xul:caption does not
|
||||
uint32_t childCount = ChildCount();
|
||||
for (uint32_t childIdx = 0; childIdx < childCount; childIdx++) {
|
||||
Accessible* childAcc = GetChildAt(childIdx);
|
||||
if (childAcc->Role() == roles::LABEL) {
|
||||
// Ensure that it's our label
|
||||
Relation reverseRel = childAcc->RelationByType(RelationType::LABEL_FOR);
|
||||
Accessible* testGroupbox = nullptr;
|
||||
while ((testGroupbox = reverseRel.Next()))
|
||||
if (testGroupbox == this) {
|
||||
// The <label> points back to this groupbox
|
||||
rel.AppendTarget(childAcc);
|
||||
}
|
||||
// The label for xul:groupbox is generated from the first xul:label
|
||||
if (aType == RelationType::LABELLED_BY && ChildCount() > 0) {
|
||||
Accessible* childAcc = GetChildAt(0);
|
||||
if (childAcc->Role() == roles::LABEL &&
|
||||
childAcc->GetContent()->IsXULElement(nsGkAtoms::label)) {
|
||||
rel.AppendTarget(childAcc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,11 +15,6 @@
|
|||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
/**
|
||||
* Used for XUL progressmeter element.
|
||||
*/
|
||||
typedef ProgressMeterAccessible<100> XULProgressMeterAccessible;
|
||||
|
||||
/**
|
||||
* Used for XUL button.
|
||||
*
|
||||
|
|
|
@ -279,9 +279,7 @@
|
|||
<vbox id="securityPanel">
|
||||
<!-- Identity Section -->
|
||||
<groupbox>
|
||||
<caption>
|
||||
<label class="header" value="&securityView.identity.header;"/>
|
||||
</caption>
|
||||
<label class="header" value="&securityView.identity.header;"/>
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
|
@ -326,9 +324,7 @@
|
|||
|
||||
<!-- Privacy & History section -->
|
||||
<groupbox>
|
||||
<caption>
|
||||
<label class="header" value="&securityView.privacy.header;"/>
|
||||
</caption>
|
||||
<label class="header" value="&securityView.privacy.header;"/>
|
||||
<grid>
|
||||
<columns>
|
||||
<column flex="1"/>
|
||||
|
@ -373,9 +369,7 @@
|
|||
|
||||
<!-- Technical Details section -->
|
||||
<groupbox>
|
||||
<caption>
|
||||
<label class="header" value="&securityView.technical.header;"/>
|
||||
</caption>
|
||||
<label class="header" value="&securityView.technical.header;"/>
|
||||
<label id="security-technical-shortform"/>
|
||||
<description id="security-technical-longform1"/>
|
||||
<description id="security-technical-longform2"/>
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
<dialog id="SanitizeDialog" type="child"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
buttons="accept,cancel"
|
||||
persist="lastSelected screenX screenY"
|
||||
role="dialog"
|
||||
|
@ -71,7 +72,7 @@
|
|||
<separator class="thin"/>
|
||||
|
||||
<groupbox>
|
||||
<caption><label data-l10n-id="history-section-label"></label></caption>
|
||||
<label><html:h2 data-l10n-id="history-section-label"/></label>
|
||||
<grid flex="1">
|
||||
<columns>
|
||||
<column data-l10n-id="sanitize-prefs-style" data-l10n-attrs="style"/>
|
||||
|
@ -103,7 +104,7 @@
|
|||
</grid>
|
||||
</groupbox>
|
||||
<groupbox>
|
||||
<caption><label data-l10n-id="data-section-label"></label></caption>
|
||||
<label><html:h2 data-l10n-id="data-section-label"/></label>
|
||||
<grid flex="1">
|
||||
<columns>
|
||||
<column data-l10n-id="sanitize-prefs-style" data-l10n-attrs="style"/>
|
||||
|
|
|
@ -10,6 +10,8 @@ const {actionTypes: at} = ChromeUtils.import("resource://activity-stream/common/
|
|||
|
||||
XPCOMUtils.defineLazyGlobalGetters(this, ["fetch"]);
|
||||
|
||||
const HTML_NS = "http://www.w3.org/1999/xhtml";
|
||||
|
||||
const PREFERENCES_LOADED_EVENT = "home-pane-loaded";
|
||||
|
||||
// These "section" objects are formatted in a way to be similar to the ones from
|
||||
|
@ -162,11 +164,11 @@ this.AboutPreferences = class AboutPreferences {
|
|||
const contentsGroup = homeGroup.insertAdjacentElement("afterend", homeGroup.cloneNode());
|
||||
contentsGroup.id = "homeContentsGroup";
|
||||
contentsGroup.setAttribute("data-subcategory", "contents");
|
||||
const caption = createAppend("caption", contentsGroup);
|
||||
const captionLabel = createAppend("label", caption);
|
||||
captionLabel.setAttribute("value", formatString("prefs_home_header"));
|
||||
const description = createAppend("description", contentsGroup);
|
||||
description.textContent = formatString("prefs_home_description");
|
||||
createAppend("label", contentsGroup)
|
||||
.appendChild(document.createElementNS(HTML_NS, "h2"))
|
||||
.textContent = formatString("prefs_home_header");
|
||||
createAppend("description", contentsGroup)
|
||||
.textContent = formatString("prefs_home_description");
|
||||
|
||||
// Add preferences for each section
|
||||
prefStructure.forEach(sectionData => {
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
<hbox>
|
||||
<groupbox flex="1">
|
||||
<caption><label data-l10n-id="colors-text-and-background"/></caption>
|
||||
<label><html:h2 data-l10n-id="colors-text-and-background"/></label>
|
||||
<hbox align="center">
|
||||
<label data-l10n-id="colors-text-header" control="foregroundtextmenu"/>
|
||||
<spacer flex="1"/>
|
||||
|
@ -53,7 +53,7 @@
|
|||
</groupbox>
|
||||
|
||||
<groupbox flex="1">
|
||||
<caption><label data-l10n-id="colors-links-header"/></caption>
|
||||
<label><html:h2 data-l10n-id="colors-links-header"/></label>
|
||||
<hbox align="center">
|
||||
<label data-l10n-id="colors-unvisited-links" control="unvisitedlinkmenu" />
|
||||
<spacer flex="1"/>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
<dialog id="ConnectionsDialog" type="child"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
data-l10n-id="connection-window"
|
||||
data-l10n-attrs="title, style"
|
||||
buttons="accept,cancel,help"
|
||||
|
@ -45,7 +46,7 @@
|
|||
</hbox>
|
||||
|
||||
<groupbox>
|
||||
<caption><label data-l10n-id="connection-proxy-configure" /></caption>
|
||||
<label><html:h2 data-l10n-id="connection-proxy-configure"/></label>
|
||||
|
||||
<radiogroup id="networkProxyType" preference="network.proxy.type"
|
||||
onsyncfrompreference="return gConnectionsDialog.readProxyType();">
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
<dialog id="FontsDialog" type="child"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
data-l10n-id="fonts-window"
|
||||
data-l10n-attrs="title"
|
||||
buttons="accept,cancel,help"
|
||||
|
@ -31,48 +32,46 @@
|
|||
|
||||
<!-- Fonts for: [ Language ] -->
|
||||
<groupbox>
|
||||
<caption>
|
||||
<hbox align="center">
|
||||
<label data-l10n-id="fonts-langgroup-header" control="selectLangs"/>
|
||||
</hbox>
|
||||
<!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
|
||||
<hbox>
|
||||
<menulist id="selectLangs" preference="font.language.group"
|
||||
onsyncfrompreference="return gFontsDialog.readFontLanguageGroup();">
|
||||
<menupopup>
|
||||
<menuitem value="ar" data-l10n-id="fonts-langgroup-arabic"/>
|
||||
<menuitem value="x-armn" data-l10n-id="fonts-langgroup-armenian"/>
|
||||
<menuitem value="x-beng" data-l10n-id="fonts-langgroup-bengali"/>
|
||||
<menuitem value="zh-CN" data-l10n-id="fonts-langgroup-simpl-chinese"/>
|
||||
<menuitem value="zh-HK" data-l10n-id="fonts-langgroup-trad-chinese-hk"/>
|
||||
<menuitem value="zh-TW" data-l10n-id="fonts-langgroup-trad-chinese"/>
|
||||
<menuitem value="x-cyrillic" data-l10n-id="fonts-langgroup-cyrillic"/>
|
||||
<menuitem value="x-devanagari" data-l10n-id="fonts-langgroup-devanagari"/>
|
||||
<menuitem value="x-ethi" data-l10n-id="fonts-langgroup-ethiopic"/>
|
||||
<menuitem value="x-geor" data-l10n-id="fonts-langgroup-georgian"/>
|
||||
<menuitem value="el" data-l10n-id="fonts-langgroup-el"/>
|
||||
<menuitem value="x-gujr" data-l10n-id="fonts-langgroup-gujarati"/>
|
||||
<menuitem value="x-guru" data-l10n-id="fonts-langgroup-gurmukhi"/>
|
||||
<menuitem value="he" data-l10n-id="fonts-langgroup-hebrew"/>
|
||||
<menuitem value="ja" data-l10n-id="fonts-langgroup-japanese"/>
|
||||
<menuitem value="x-knda" data-l10n-id="fonts-langgroup-kannada"/>
|
||||
<menuitem value="x-khmr" data-l10n-id="fonts-langgroup-khmer"/>
|
||||
<menuitem value="ko" data-l10n-id="fonts-langgroup-korean"/>
|
||||
<menuitem value="x-western" data-l10n-id="fonts-langgroup-latin"/>
|
||||
<menuitem value="x-mlym" data-l10n-id="fonts-langgroup-malayalam"/>
|
||||
<menuitem value="x-math" data-l10n-id="fonts-langgroup-math"/>
|
||||
<menuitem value="x-orya" data-l10n-id="fonts-langgroup-odia"/>
|
||||
<menuitem value="x-sinh" data-l10n-id="fonts-langgroup-sinhala"/>
|
||||
<menuitem value="x-tamil" data-l10n-id="fonts-langgroup-tamil"/>
|
||||
<menuitem value="x-telu" data-l10n-id="fonts-langgroup-telugu"/>
|
||||
<menuitem value="th" data-l10n-id="fonts-langgroup-thai"/>
|
||||
<menuitem value="x-tibt" data-l10n-id="fonts-langgroup-tibetan"/>
|
||||
<menuitem value="x-cans" data-l10n-id="fonts-langgroup-canadian"/>
|
||||
<menuitem value="x-unicode" data-l10n-id="fonts-langgroup-other"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
</caption>
|
||||
<hbox align="center">
|
||||
<label control="selectLangs"><html:h2 data-l10n-id="fonts-langgroup-header"/></label>
|
||||
</hbox>
|
||||
<!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
|
||||
<hbox>
|
||||
<menulist id="selectLangs" preference="font.language.group"
|
||||
onsyncfrompreference="return gFontsDialog.readFontLanguageGroup();">
|
||||
<menupopup>
|
||||
<menuitem value="ar" data-l10n-id="fonts-langgroup-arabic"/>
|
||||
<menuitem value="x-armn" data-l10n-id="fonts-langgroup-armenian"/>
|
||||
<menuitem value="x-beng" data-l10n-id="fonts-langgroup-bengali"/>
|
||||
<menuitem value="zh-CN" data-l10n-id="fonts-langgroup-simpl-chinese"/>
|
||||
<menuitem value="zh-HK" data-l10n-id="fonts-langgroup-trad-chinese-hk"/>
|
||||
<menuitem value="zh-TW" data-l10n-id="fonts-langgroup-trad-chinese"/>
|
||||
<menuitem value="x-cyrillic" data-l10n-id="fonts-langgroup-cyrillic"/>
|
||||
<menuitem value="x-devanagari" data-l10n-id="fonts-langgroup-devanagari"/>
|
||||
<menuitem value="x-ethi" data-l10n-id="fonts-langgroup-ethiopic"/>
|
||||
<menuitem value="x-geor" data-l10n-id="fonts-langgroup-georgian"/>
|
||||
<menuitem value="el" data-l10n-id="fonts-langgroup-el"/>
|
||||
<menuitem value="x-gujr" data-l10n-id="fonts-langgroup-gujarati"/>
|
||||
<menuitem value="x-guru" data-l10n-id="fonts-langgroup-gurmukhi"/>
|
||||
<menuitem value="he" data-l10n-id="fonts-langgroup-hebrew"/>
|
||||
<menuitem value="ja" data-l10n-id="fonts-langgroup-japanese"/>
|
||||
<menuitem value="x-knda" data-l10n-id="fonts-langgroup-kannada"/>
|
||||
<menuitem value="x-khmr" data-l10n-id="fonts-langgroup-khmer"/>
|
||||
<menuitem value="ko" data-l10n-id="fonts-langgroup-korean"/>
|
||||
<menuitem value="x-western" data-l10n-id="fonts-langgroup-latin"/>
|
||||
<menuitem value="x-mlym" data-l10n-id="fonts-langgroup-malayalam"/>
|
||||
<menuitem value="x-math" data-l10n-id="fonts-langgroup-math"/>
|
||||
<menuitem value="x-orya" data-l10n-id="fonts-langgroup-odia"/>
|
||||
<menuitem value="x-sinh" data-l10n-id="fonts-langgroup-sinhala"/>
|
||||
<menuitem value="x-tamil" data-l10n-id="fonts-langgroup-tamil"/>
|
||||
<menuitem value="x-telu" data-l10n-id="fonts-langgroup-telugu"/>
|
||||
<menuitem value="th" data-l10n-id="fonts-langgroup-thai"/>
|
||||
<menuitem value="x-tibt" data-l10n-id="fonts-langgroup-tibetan"/>
|
||||
<menuitem value="x-cans" data-l10n-id="fonts-langgroup-canadian"/>
|
||||
<menuitem value="x-unicode" data-l10n-id="fonts-langgroup-other"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
|
||||
<grid>
|
||||
<columns>
|
||||
|
@ -254,7 +253,7 @@
|
|||
|
||||
<!-- Text Encoding -->
|
||||
<groupbox>
|
||||
<caption><label data-l10n-id="fonts-languages-fallback-header"/></caption>
|
||||
<label><html:h2 data-l10n-id="fonts-languages-fallback-header"/></label>
|
||||
<description data-l10n-id="fonts-languages-fallback-desc"/>
|
||||
<hbox align="center">
|
||||
<label data-l10n-id="fonts-languages-fallback-label" control="DefaultCharsetList"/>
|
||||
|
|
|
@ -310,7 +310,7 @@ var gSearchResultsPane = {
|
|||
gotoPref("paneGeneral");
|
||||
|
||||
// Hide some special second level headers in normal view
|
||||
for (let element of document.querySelectorAll("caption.search-header")) {
|
||||
for (let element of document.querySelectorAll(".search-header")) {
|
||||
element.hidden = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<groupbox id="homepageGroup"
|
||||
data-category="paneHome"
|
||||
hidden="true">
|
||||
<caption><label data-l10n-id="home-new-windows-tabs-header"/></caption>
|
||||
<label><html:h2 data-l10n-id="home-new-windows-tabs-header"/></label>
|
||||
<description data-l10n-id="home-new-windows-tabs-description2" />
|
||||
|
||||
<hbox id="homepageAndNewWindowsOption">
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<groupbox id="startupGroup"
|
||||
data-category="paneGeneral"
|
||||
hidden="true">
|
||||
<caption><label data-l10n-id="startup-header"/></caption>
|
||||
<label><html:h2 data-l10n-id="startup-header"/></label>
|
||||
|
||||
#ifdef MOZ_DEV_EDITION
|
||||
<vbox id="separateProfileBox">
|
||||
|
@ -74,7 +74,7 @@
|
|||
<!-- Tab preferences -->
|
||||
<groupbox data-category="paneGeneral"
|
||||
hidden="true">
|
||||
<caption><label data-l10n-id="tabs-group-header"/></caption>
|
||||
<label><html:h2 data-l10n-id="tabs-group-header"/></label>
|
||||
|
||||
<checkbox id="ctrlTabRecentlyUsedOrder" data-l10n-id="ctrl-tab-recently-used-order"
|
||||
preference="browser.ctrlTab.recentlyUsedOrder"
|
||||
|
@ -138,7 +138,7 @@
|
|||
|
||||
<!-- Fonts and Colors -->
|
||||
<groupbox id="fontsGroup" data-category="paneGeneral" hidden="true">
|
||||
<caption><label data-l10n-id="fonts-and-colors-header"/></caption>
|
||||
<label><html:h2 data-l10n-id="fonts-and-colors-header"/></label>
|
||||
|
||||
<hbox id="fontSettings">
|
||||
<hbox align="center" flex="1">
|
||||
|
@ -280,7 +280,7 @@
|
|||
|
||||
<!-- Languages -->
|
||||
<groupbox id="languagesGroup" data-category="paneGeneral" hidden="true">
|
||||
<caption><label data-l10n-id="language-header"/></caption>
|
||||
<label><html:h2 data-l10n-id="language-header"/></label>
|
||||
|
||||
<vbox id="browserLanguagesBox" align="start" hidden="true">
|
||||
<description flex="1" controls="chooseBrowserLanguage" data-l10n-id="choose-browser-language-description"/>
|
||||
|
@ -353,7 +353,7 @@
|
|||
|
||||
<!--Downloads-->
|
||||
<groupbox id="downloadsGroup" data-category="paneGeneral" hidden="true">
|
||||
<caption><label data-l10n-id="download-header"/></caption>
|
||||
<label><html:h2 data-l10n-id="download-header"/></label>
|
||||
|
||||
<radiogroup id="saveWhere"
|
||||
preference="browser.download.useDownloadDir"
|
||||
|
@ -380,7 +380,7 @@
|
|||
</groupbox>
|
||||
|
||||
<groupbox id="applicationsGroup" data-category="paneGeneral" hidden="true">
|
||||
<caption><label data-l10n-id="applications-header"/></caption>
|
||||
<label><html:h2 data-l10n-id="applications-header"/></label>
|
||||
<description data-l10n-id="applications-description"/>
|
||||
<textbox id="filter" flex="1"
|
||||
type="search"
|
||||
|
@ -403,7 +403,7 @@
|
|||
|
||||
<!-- DRM Content -->
|
||||
<groupbox id="drmGroup" data-category="paneGeneral" data-subcategory="drm" hidden="true">
|
||||
<caption><label data-l10n-id="drm-content-header"/></caption>
|
||||
<label><html:h2 data-l10n-id="drm-content-header"/></label>
|
||||
<grid id="contentGrid2">
|
||||
<columns>
|
||||
<column flex="1"/>
|
||||
|
@ -435,7 +435,7 @@
|
|||
|
||||
<!-- Update -->
|
||||
<groupbox id="updateApp" data-category="paneGeneral" hidden="true">
|
||||
<caption class="search-header" hidden="true"><label data-l10n-id="update-application-title"/></caption>
|
||||
<label class="search-header" hidden="true"><html:h2 data-l10n-id="update-application-title"/></label>
|
||||
|
||||
<label data-l10n-id="update-application-description"/>
|
||||
<hbox align="center">
|
||||
|
@ -581,7 +581,7 @@
|
|||
|
||||
<!-- Performance -->
|
||||
<groupbox id="performanceGroup" data-category="paneGeneral" hidden="true">
|
||||
<caption class="search-header" hidden="true"><label data-l10n-id="performance-title"/></caption>
|
||||
<label class="search-header" hidden="true"><html:h2 data-l10n-id="performance-title"/></label>
|
||||
|
||||
<hbox align="center">
|
||||
<checkbox id="useRecommendedPerformanceSettings"
|
||||
|
@ -627,7 +627,7 @@
|
|||
|
||||
<!-- Browsing -->
|
||||
<groupbox id="browsingGroup" data-category="paneGeneral" hidden="true">
|
||||
<caption class="search-header" hidden="true"><label data-l10n-id="browsing-title"/></caption>
|
||||
<label class="search-header" hidden="true"><html:h2 data-l10n-id="browsing-title"/></label>
|
||||
|
||||
<checkbox id="useAutoScroll"
|
||||
data-l10n-id="browsing-use-autoscroll"
|
||||
|
@ -666,7 +666,7 @@
|
|||
|
||||
<!-- Network Settings-->
|
||||
<groupbox id="connectionGroup" data-category="paneGeneral" hidden="true">
|
||||
<caption class="search-header" hidden="true"><label data-l10n-id="network-settings-title"/></caption>
|
||||
<label class="search-header" hidden="true"><html:h2 data-l10n-id="network-settings-title"/></label>
|
||||
|
||||
<hbox align="center">
|
||||
<hbox align="center" flex="1">
|
||||
|
|
|
@ -303,7 +303,7 @@ function scrollAndHighlight(subcategory) {
|
|||
*/
|
||||
function getClosestDisplayedHeader(element) {
|
||||
let header = element.closest("groupbox");
|
||||
let searchHeader = header.querySelector("caption.search-header");
|
||||
let searchHeader = header.querySelector(".search-header");
|
||||
if (searchHeader && searchHeader.hidden &&
|
||||
header.previousSibling.classList.contains("subcategory")) {
|
||||
header = header.previousSibling;
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
role="document"
|
||||
data-l10n-id="pref-page"
|
||||
data-l10n-attrs="title">
|
||||
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
|
||||
<!-- Tracking / Content Blocking -->
|
||||
<groupbox id="trackingGroup" data-category="panePrivacy" hidden="true" aria-describedby="contentBlockingDescription">
|
||||
<caption>
|
||||
<label id="contentBlockingHeader" data-l10n-id="content-blocking-header"/>
|
||||
</caption>
|
||||
<label id="contentBlockingHeader"><html:h2 data-l10n-id="content-blocking-header"/></label>
|
||||
<vbox data-subcategory="trackingprotection">
|
||||
<hbox align="start">
|
||||
<image id="trackingProtectionShield"/>
|
||||
|
@ -205,7 +203,7 @@
|
|||
|
||||
<!-- Site Data -->
|
||||
<groupbox id="siteDataGroup" data-category="panePrivacy" hidden="true" aria-describedby="totalSiteDataSize">
|
||||
<caption><label data-l10n-id="sitedata-header"/></caption>
|
||||
<label><html:h2 data-l10n-id="sitedata-header"/></label>
|
||||
|
||||
<hbox data-subcategory="sitedata" align="baseline">
|
||||
<vbox flex="1">
|
||||
|
@ -268,7 +266,7 @@
|
|||
|
||||
<!-- Passwords -->
|
||||
<groupbox id="passwordsGroup" orient="vertical" data-category="panePrivacy" hidden="true">
|
||||
<caption><label data-l10n-id="logins-header"/></caption>
|
||||
<label><html:h2 data-l10n-id="logins-header"/></label>
|
||||
|
||||
<vbox id="passwordSettings">
|
||||
<hbox id="savePasswordsBox">
|
||||
|
@ -322,7 +320,7 @@
|
|||
|
||||
<!-- History -->
|
||||
<groupbox id="historyGroup" data-category="panePrivacy" hidden="true">
|
||||
<caption><label data-l10n-id="history-header"/></caption>
|
||||
<label><html:h2 data-l10n-id="history-header"/></label>
|
||||
<hbox align="center">
|
||||
<label id="historyModeLabel"
|
||||
control="historyMode"
|
||||
|
@ -423,7 +421,7 @@
|
|||
<groupbox id="locationBarGroup"
|
||||
data-category="panePrivacy"
|
||||
hidden="true">
|
||||
<caption><label data-l10n-id="addressbar-header"/></caption>
|
||||
<label><html:h2 data-l10n-id="addressbar-header"/></label>
|
||||
<label id="locationBarSuggestionLabel" data-l10n-id="addressbar-suggest"/>
|
||||
<checkbox id="historySuggestion" data-l10n-id="addressbar-locbar-history-option"
|
||||
preference="browser.urlbar.suggest.history"/>
|
||||
|
@ -443,8 +441,8 @@
|
|||
</hbox>
|
||||
|
||||
<!-- Permissions -->
|
||||
<groupbox id="permissionsGroup" data-category="panePrivacy" hidden="true" data-subcategory="permissions" aria-labelledby="permissionsGroupLabel">
|
||||
<caption class="search-header" hidden="true"><label data-l10n-id="permissions-header" id="permissionsGroupLabel"/></caption>
|
||||
<groupbox id="permissionsGroup" data-category="panePrivacy" hidden="true" data-subcategory="permissions">
|
||||
<label class="search-header" hidden="true"><html:h2 data-l10n-id="permissions-header"/></label>
|
||||
|
||||
<grid>
|
||||
<columns>
|
||||
|
@ -673,8 +671,8 @@
|
|||
<label class="header-name" flex="1" data-l10n-id="collection-header"/>
|
||||
</hbox>
|
||||
|
||||
<groupbox id="dataCollectionGroup" data-category="panePrivacy" hidden="true" aria-labelledby="dataCollectionGroupLabel">
|
||||
<caption class="search-header" hidden="true"><label data-l10n-id="collection-header" id="dataCollectionGroupLabel"/></caption>
|
||||
<groupbox id="dataCollectionGroup" data-category="panePrivacy" hidden="true">
|
||||
<label class="search-header" hidden="true"><html:h2 data-l10n-id="collection-header"/></label>
|
||||
|
||||
<description>
|
||||
<label class="tail-with-learn-more" data-l10n-id="collection-description"/>
|
||||
|
@ -745,7 +743,7 @@
|
|||
|
||||
<!-- addons, forgery (phishing) UI Security -->
|
||||
<groupbox id="browsingProtectionGroup" data-category="panePrivacy" hidden="true">
|
||||
<caption><label data-l10n-id="security-browsing-protection"/></caption>
|
||||
<label><html:h2 data-l10n-id="security-browsing-protection"/></label>
|
||||
<hbox align = "center">
|
||||
<checkbox id="enableSafeBrowsing"
|
||||
data-l10n-id="security-enable-safe-browsing"
|
||||
|
@ -763,7 +761,7 @@
|
|||
|
||||
<!-- Certificates -->
|
||||
<groupbox id="certSelection" data-category="panePrivacy" hidden="true">
|
||||
<caption><label data-l10n-id="certs-header"/></caption>
|
||||
<label><html:h2 data-l10n-id="certs-header"/></label>
|
||||
<description id="CertSelectionDesc" control="certSelection" data-l10n-id="certs-personal-label"/>
|
||||
|
||||
<!--
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
</hbox>
|
||||
|
||||
<groupbox id="searchbarGroup" data-category="paneSearch">
|
||||
<caption><label id="searchbarLabel" data-l10n-id="search-bar-header" /></caption>
|
||||
<radiogroup id="searchBarVisibleGroup" aria-labelledby="searchbarLabel" preference="browser.search.widget.inNavBar">
|
||||
<label control="searchBarVisibleGroup"><html:h2 data-l10n-id="search-bar-header"/></label>
|
||||
<radiogroup id="searchBarVisibleGroup" preference="browser.search.widget.inNavBar">
|
||||
<radio id="searchBarHiddenRadio" value="false" data-l10n-id="search-bar-hidden"/>
|
||||
<image class="searchBarImage searchBarHiddenImage" role="presentation"/>
|
||||
<radio id="searchBarShownRadio" value="true" data-l10n-id="search-bar-shown"/>
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
<!-- Default Search Engine -->
|
||||
<groupbox id="defaultEngineGroup" data-category="paneSearch">
|
||||
<caption><label data-l10n-id="search-engine-default-header" /></caption>
|
||||
<label><html:h2 data-l10n-id="search-engine-default-header" /></label>
|
||||
<description data-l10n-id="search-engine-default-desc" />
|
||||
|
||||
<hbox id="browserDefaultSearchExtensionContent"
|
||||
|
@ -52,7 +52,7 @@
|
|||
</groupbox>
|
||||
|
||||
<groupbox id="oneClickSearchProvidersGroup" data-category="paneSearch">
|
||||
<caption><label data-l10n-id="search-one-click-header" /></caption>
|
||||
<label><html:h2 data-l10n-id="search-one-click-header" /></label>
|
||||
<description data-l10n-id="search-one-click-desc" />
|
||||
|
||||
<tree id="engineList" flex="1" rows="8" hidecolumnpicker="true" editable="true"
|
||||
|
|
|
@ -308,7 +308,8 @@ var gSyncPane = {
|
|||
if (state.displayName) {
|
||||
fxaLoginStatus.setAttribute("hasName", true);
|
||||
displayNameLabel.hidden = false;
|
||||
displayNameLabel.textContent = state.displayName;
|
||||
document.getElementById("fxaDisplayNameHeading").textContent =
|
||||
state.displayName;
|
||||
} else {
|
||||
fxaLoginStatus.removeAttribute("hasName");
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<groupbox id="noFxaAccount">
|
||||
<hbox>
|
||||
<vbox flex="1">
|
||||
<caption><label id="noFxaCaption" data-l10n-id="sync-signedout-caption"/></caption>
|
||||
<label id="noFxaCaption"><html:h2 data-l10n-id="sync-signedout-caption"/></label>
|
||||
<description id="noFxaDescription" flex="1" data-l10n-id="sync-signedout-description"/>
|
||||
</vbox>
|
||||
<vbox>
|
||||
|
@ -33,7 +33,7 @@
|
|||
<vbox flex="1">
|
||||
<hbox align="center" flex="1">
|
||||
<hbox align="center" flex="1">
|
||||
<caption><label id="signedOutAccountBoxTitle" data-l10n-id="sync-signedout-account-title"/></caption>
|
||||
<label id="signedOutAccountBoxTitle"><html:h2 data-l10n-id="sync-signedout-account-title"/></label>
|
||||
</hbox>
|
||||
<button id="noFxaSignIn"
|
||||
class="accessory-button"
|
||||
|
@ -70,7 +70,7 @@
|
|||
<hbox>
|
||||
<vbox id="fxaContentWrapper" flex="1">
|
||||
<groupbox id="fxaGroup">
|
||||
<caption class="search-header" hidden="true"><label data-l10n-id="pane-sync-title"/></caption>
|
||||
<label class="search-header" hidden="true"><html:h2 data-l10n-id="pane-sync-title"/></label>
|
||||
|
||||
<deck id="fxaLoginStatus" flex="1">
|
||||
|
||||
|
@ -83,7 +83,9 @@
|
|||
data-l10n-id="sync-profile-picture"/>
|
||||
<vbox flex="1" pack="center">
|
||||
<hbox flex="1" align="baseline">
|
||||
<caption><label id="fxaDisplayName" hidden="true"/></caption>
|
||||
<label id="fxaDisplayName" hidden="true">
|
||||
<html:h2 id="fxaDisplayNameHeading"/>
|
||||
</label>
|
||||
<label id="fxaEmailAddress" flex="1" crop="end"/>
|
||||
<button id="fxaUnlinkButton"
|
||||
class="accessory-button"
|
||||
|
@ -139,7 +141,7 @@
|
|||
</deck>
|
||||
</groupbox>
|
||||
<groupbox id="syncOptions">
|
||||
<caption><label data-l10n-id="sync-signedin-settings-header"/></caption>
|
||||
<label><html:h2 data-l10n-id="sync-signedin-settings-header"/></label>
|
||||
<description data-l10n-id="sync-signedin-settings-desc"/>
|
||||
<hbox id="fxaSyncEngines">
|
||||
<vbox flex="1">
|
||||
|
@ -169,9 +171,7 @@
|
|||
</vbox>
|
||||
</hbox>
|
||||
<groupbox>
|
||||
<caption>
|
||||
<label control="fxaSyncComputerName" data-l10n-id="sync-device-name-header"/>
|
||||
</caption>
|
||||
<label control="fxaSyncComputerName"><html:h2 data-l10n-id="sync-device-name-header"/></label>
|
||||
<hbox id="fxaDeviceName">
|
||||
<textbox id="fxaSyncComputerName" flex="1" disabled="true"/>
|
||||
<button id="fxaChangeDeviceName"
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
<dialog id="SanitizeDialog" type="child"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
buttons="accept,cancel,help"
|
||||
persist="lastSelected screenX screenY"
|
||||
role="dialog"
|
||||
|
@ -38,7 +39,7 @@
|
|||
<description data-l10n-id="clear-data-settings-label"></description>
|
||||
|
||||
<groupbox>
|
||||
<caption><label data-l10n-id="history-section-label"></label></caption>
|
||||
<label><html:h2 data-l10n-id="history-section-label"/></label>
|
||||
<grid flex="1">
|
||||
<columns>
|
||||
<column data-l10n-id="sanitize-prefs-style" data-l10n-attrs="style"/>
|
||||
|
@ -65,7 +66,7 @@
|
|||
</grid>
|
||||
</groupbox>
|
||||
<groupbox>
|
||||
<caption><label data-l10n-id="data-section-label"></label></caption>
|
||||
<label><html:h2 data-l10n-id="data-section-label"/></label>
|
||||
<grid flex="1">
|
||||
<columns>
|
||||
<column data-l10n-id="sanitize-prefs-style" data-l10n-attrs="style"/>
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
# This file is sourced by the nightly, beta, and release mozconfigs.
|
||||
|
||||
. "$topsrcdir/build/mozconfig.stylo"
|
||||
|
||||
. "$topsrcdir/browser/config/mozconfigs/common"
|
||||
|
||||
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
|
||||
ac_add_options --enable-jemalloc
|
||||
if [ -f /c/builds/gapi.data ]; then
|
||||
_gapi_keyfile=c:/builds/gapi.data
|
||||
else
|
||||
_gapi_keyfile=e:/builds/gapi.data
|
||||
fi
|
||||
ac_add_options --with-google-api-keyfile=${_gapi_keyfile}
|
||||
|
||||
ac_add_options --with-mozilla-api-keyfile=c:/builds/mozilla-desktop-geoloc-api.key
|
||||
|
||||
# Needed to enable breakpad in application.ini
|
||||
export MOZILLA_OFFICIAL=1
|
||||
|
||||
export MOZ_TELEMETRY_REPORTING=1
|
||||
|
||||
. $topsrcdir/build/win64-aarch64/mozconfig.vs-latest
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
# Crashreporter does peculiar things.
|
||||
ac_add_options --disable-crashreporter
|
|
@ -0,0 +1,10 @@
|
|||
# This file is used by all AArch64 Win64 builds
|
||||
|
||||
ac_add_options --target=aarch64-windows-mingw32
|
||||
ac_add_options --host=x86_64-pc-mingw32
|
||||
|
||||
# WebRTC is busted in various ways.
|
||||
ac_add_options --disable-webrtc
|
||||
|
||||
# Accessibility doesn't work.
|
||||
ac_add_options --disable-accessibility
|
|
@ -0,0 +1,29 @@
|
|||
. "$topsrcdir/build/mozconfig.win-common"
|
||||
MOZ_AUTOMATION_L10N_CHECK=0
|
||||
. "$topsrcdir/browser/config/mozconfigs/common"
|
||||
|
||||
ac_add_options --disable-crashreporter
|
||||
|
||||
. "$topsrcdir/browser/config/mozconfigs/win64-aarch64/common-win64"
|
||||
|
||||
. "$topsrcdir/build/mozconfig.stylo"
|
||||
|
||||
ac_add_options --enable-debug
|
||||
ac_add_options --enable-dmd
|
||||
ac_add_options --enable-profiling # needed for --enable-dmd to work on Windows
|
||||
ac_add_options --enable-verify-mar
|
||||
|
||||
# Needed to enable breakpad in application.ini
|
||||
export MOZILLA_OFFICIAL=1
|
||||
|
||||
# Enable Telemetry
|
||||
export MOZ_TELEMETRY_REPORTING=1
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
ac_add_options --with-branding=browser/branding/nightly
|
||||
|
||||
. $topsrcdir/build/win64-aarch64/mozconfig.vs-latest
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
|
@ -0,0 +1,3 @@
|
|||
. "$topsrcdir/browser/config/mozconfigs/win64-aarch64/debug"
|
||||
|
||||
unset ENABLE_CLANG_PLUGIN
|
|
@ -0,0 +1,10 @@
|
|||
. "$topsrcdir/build/mozconfig.win-common"
|
||||
. "$topsrcdir/browser/config/mozconfigs/win64-aarch64/common-win64"
|
||||
. "$topsrcdir/browser/config/mozconfigs/win64-aarch64/common-opt"
|
||||
|
||||
ac_add_options --enable-verify-mar
|
||||
ac_add_options --enable-dmd
|
||||
|
||||
ac_add_options --with-branding=browser/branding/nightly
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
|
@ -0,0 +1,3 @@
|
|||
. "$topsrcdir/browser/config/mozconfigs/win64-aarch64/nightly"
|
||||
|
||||
unset ENABLE_CLANG_PLUGIN
|
|
@ -0,0 +1,33 @@
|
|||
[
|
||||
{
|
||||
"size": 266240,
|
||||
"digest": "bb345b0e700ffab4d09436981f14b5de84da55a3f18a7f09ebc4364a4488acdeab8d46f447b12ac70f2da1444a68b8ce8b8675f0dae2ccf845e966d1df0f0869",
|
||||
"algorithm": "sha512",
|
||||
"filename": "mozmake.exe"
|
||||
},
|
||||
{
|
||||
"version": "Visual Studio 15.9 preview release 5",
|
||||
"size": 621847510,
|
||||
"visibility": "internal",
|
||||
"digest": "eba775d85c32d3d0acab72804ba82f0d0180b419c6f01774bc520b7b5f74efd384a2569cb255866053d30e71c94363afee2042f1fad510c02525d5b282cbb3cf",
|
||||
"algorithm": "sha512",
|
||||
"filename": "vs2017_15.9.0p5.zip",
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"version": "makecab rev d2bc6797648b7a834782714a55d339d2fd4e58c8",
|
||||
"algorithm": "sha512",
|
||||
"visibility": "public",
|
||||
"filename": "makecab.tar.bz2",
|
||||
"unpack": true,
|
||||
"digest": "196ac6a567c85559957dfe511c3d8654d23c94d5603259e19ccafe9d71e0e4ccee63ccc9a778f2699654b786cda54266108b7d4db543d01bb0b42545b4e6ec75",
|
||||
"size": 297118
|
||||
},
|
||||
{
|
||||
"size": 1516544,
|
||||
"visibility": "public",
|
||||
"digest": "cf84f9592059f1e0756370f44e0ad289b71569c235d2ec8c5958695cc57352d3b99b584fd119e73fc9593d1c4cca414985e71f567f777162471b6040ebc59d13",
|
||||
"algorithm": "sha512",
|
||||
"filename": "win32-minidump_stackwalk.exe"
|
||||
}
|
||||
]
|
|
@ -36,6 +36,8 @@ const {
|
|||
this.log = null;
|
||||
FormAutofill.defineLazyLogGetter(this, EXPORTED_SYMBOLS[0]);
|
||||
|
||||
const HTML_NS = "http://www.w3.org/1999/xhtml";
|
||||
|
||||
function FormAutofillPreferences() {
|
||||
this.bundle = Services.strings.createBundle(BUNDLE_URI);
|
||||
}
|
||||
|
@ -70,8 +72,8 @@ FormAutofillPreferences.prototype = {
|
|||
createPreferenceGroup(document) {
|
||||
let learnMoreURL = Services.urlFormatter.formatURLPref("app.support.baseURL") + "autofill-card-address";
|
||||
let formAutofillFragment = document.createDocumentFragment();
|
||||
let formAutofillGroupBoxCaption = document.createXULElement("caption");
|
||||
let formAutofillGroupBoxCaptionLabel = document.createXULElement("label");
|
||||
let formAutofillGroupBoxLabel = document.createXULElement("label");
|
||||
let formAutofillGroupBoxLabelHeading = document.createElementNS(HTML_NS, "h2");
|
||||
let formAutofillGroupBoxDescription = document.createXULElement("description");
|
||||
let formAutofillGroup = document.createXULElement("vbox");
|
||||
let addressAutofill = document.createXULElement("hbox");
|
||||
|
@ -91,7 +93,7 @@ FormAutofillPreferences.prototype = {
|
|||
addressAutofill.id = "addressAutofill";
|
||||
addressAutofillLearnMore.id = "addressAutofillLearnMore";
|
||||
|
||||
formAutofillGroupBoxCaptionLabel.textContent = this.bundle.GetStringFromName("autofillHeader");
|
||||
formAutofillGroupBoxLabelHeading.textContent = this.bundle.GetStringFromName("autofillHeader");
|
||||
formAutofillGroupBoxDescription.textContent =
|
||||
this.bundle.formatStringFromName("autofillDescription",
|
||||
[FormAutofillUtils.brandBundle.GetStringFromName("brandShortName")],
|
||||
|
@ -119,8 +121,8 @@ FormAutofillPreferences.prototype = {
|
|||
addressAutofillCheckboxGroup.align = "center";
|
||||
addressAutofillCheckboxGroup.flex = 1;
|
||||
|
||||
formAutofillGroupBoxCaption.appendChild(formAutofillGroupBoxCaptionLabel);
|
||||
formAutofillFragment.appendChild(formAutofillGroupBoxCaption);
|
||||
formAutofillGroupBoxLabel.appendChild(formAutofillGroupBoxLabelHeading);
|
||||
formAutofillFragment.appendChild(formAutofillGroupBoxLabel);
|
||||
formAutofillFragment.appendChild(formAutofillGroupBoxDescription);
|
||||
formAutofillFragment.appendChild(formAutofillGroup);
|
||||
formAutofillGroup.appendChild(addressAutofill);
|
||||
|
|
|
@ -98,7 +98,6 @@ chrome/toolkit/skin/classic/global/menulist.css
|
|||
chrome/toolkit/skin/classic/global/numberbox.css
|
||||
chrome/toolkit/skin/classic/global/popup.css
|
||||
chrome/toolkit/skin/classic/global/preferences.css
|
||||
chrome/toolkit/skin/classic/global/progressmeter.css
|
||||
chrome/toolkit/skin/classic/global/radio.css
|
||||
chrome/toolkit/skin/classic/global/richlistbox.css
|
||||
chrome/toolkit/skin/classic/global/scrollbars.css
|
||||
|
|
|
@ -28,10 +28,10 @@ groupbox[data-category] {
|
|||
margin: 0 0 32px;
|
||||
}
|
||||
|
||||
caption {
|
||||
html|h2 {
|
||||
margin: 16px 0 4px;
|
||||
font-size: 1.14em;
|
||||
font-weight: 600;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
.header-name {
|
||||
|
|
|
@ -1154,29 +1154,13 @@ set_config('MOZ_APP_VERSION', milestone.app_version)
|
|||
set_config('MOZ_APP_VERSION_DISPLAY', milestone.app_version_display)
|
||||
add_old_configure_assignment('MOZ_APP_VERSION', milestone.app_version)
|
||||
|
||||
|
||||
# The app update channel is 'default' when not supplied, and MOZILLA_OFFICIAL
|
||||
# is not set. When MOZILLA_OFFICIAL is set, the default is derived from
|
||||
# the application display version.
|
||||
@depends(milestone, mozilla_official)
|
||||
def default_update_channel(milestone, mozilla_official):
|
||||
if not mozilla_official:
|
||||
return 'default'
|
||||
if milestone.is_release_or_beta:
|
||||
if 'esr' in milestone.app_version_display:
|
||||
return 'esr'
|
||||
if 'b' in milestone.app_version_display:
|
||||
return 'beta'
|
||||
return 'release'
|
||||
if milestone.is_nightly:
|
||||
return 'nightly'
|
||||
return 'default'
|
||||
|
||||
|
||||
# The app update channel is 'default' when not supplied. The value is used in
|
||||
# the application's confvars.sh (and is made available to a project specific
|
||||
# moz.configure).
|
||||
option('--enable-update-channel',
|
||||
nargs=1,
|
||||
help='Select application update channel',
|
||||
default=default_update_channel)
|
||||
default='default')
|
||||
|
||||
|
||||
@depends('--enable-update-channel')
|
||||
|
|
|
@ -330,7 +330,8 @@ def win64_cargo_linker(target, rustc_info, compiler_info, link, lib):
|
|||
# need to configure the linker it will use for host binaries (build scripts)
|
||||
# specially because the compiler configuration we use for the build is for
|
||||
# MSVC targeting 32-bit binaries.
|
||||
if target.kernel == 'WINNT' and target.cpu == 'x86' and \
|
||||
if target.kernel == 'WINNT' and \
|
||||
target.cpu in ('x86', 'aarch64') and \
|
||||
compiler_info.type in ('msvc', 'clang-cl') and \
|
||||
rustc_info.host == 'x86_64-pc-windows-msvc' and link and lib:
|
||||
return True
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
. $topsrcdir/build/win64-aarch64/mozconfig.vs2017
|
|
@ -0,0 +1,47 @@
|
|||
if [ -z "${VSPATH}" ]; then
|
||||
TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
|
||||
VSPATH="$(cd ${TOOLTOOL_DIR} && pwd)/vs2017_15.9.0p5"
|
||||
fi
|
||||
|
||||
if [ -d "${VSPATH}" ]; then
|
||||
VSWINPATH="$(cd ${VSPATH} && pwd -W)"
|
||||
|
||||
export WINDOWSSDKDIR="${VSWINPATH}/SDK"
|
||||
export WIN32_REDIST_DIR=${VSPATH}/VC/redist/onecore/arm64/Microsoft.VC141.CRT
|
||||
export WIN_DIA_SDK_BIN_DIR="${VSPATH}/DIA SDK/bin/amd64"
|
||||
|
||||
win_sdk_version="10.0.17134.0"
|
||||
|
||||
# Need to run x86-64 host binaries.
|
||||
export PATH="${VSPATH}/VC/bin/Hostx64/x64:${VSPATH}/SDK/bin/${win_sdk_version}/x64:${VSPATH}/VC/redist/x64/Microsoft.VC141.CRT:${VSPATH}/SDK/Redist/ucrt/DLLs/x64:${WIN_DIA_SDK_BIN_DIR}:${PATH}"
|
||||
|
||||
export INCLUDE="${VSPATH}/VC/include:${VSPATH}/VC/atlmfc/include:${VSPATH}/SDK/Include/${win_sdk_version}/ucrt:${VSPATH}/SDK/Include/${win_sdk_version}/shared:${VSPATH}/SDK/Include/${win_sdk_version}/um:${VSPATH}/SDK/Include/${win_sdk_version}/winrt"
|
||||
export LIB="${VSPATH}/VC/lib/arm64:${VSPATH}/VC/atlmfc/lib/arm64:${VSPATH}/SDK/Lib/${win_sdk_version}/ucrt/arm64:${VSPATH}/SDK/Lib/${win_sdk_version}/um/arm64:${VSPATH}/DIA SDK/lib/amd64"
|
||||
|
||||
# We need to declare host and target tools separately.
|
||||
arm_bin="${VSPATH}/VC/bin/Hostx64/arm64"
|
||||
export CC="${arm_bin}/cl.exe"
|
||||
export CXX="${arm_bin}/cl.exe"
|
||||
export AS="${arm_bin}/armasm64.exe"
|
||||
export LINKER="${arm_bin}/link.exe"
|
||||
|
||||
x64_bin="${VSPATH}/VC/bin/Hostx64/x64"
|
||||
export HOST_CC="${x64_bin}/cl.exe"
|
||||
export HOST_CXX="${x64_bin}/cl.exe"
|
||||
export HOST_LINKER="${x64_bin}/link.exe"
|
||||
|
||||
# We provided LIB, above, but we also need to provide HOST_LDFLAGS so host
|
||||
# links are not completely confused. LIBPATH wants its argument with
|
||||
# Windows-style drives.
|
||||
libs=""
|
||||
libs="${libs} -LIBPATH:${VSWINPATH}/VC/lib/x64"
|
||||
libs="${libs} -LIBPATH:${VSWINPATH}/VC/atlmfc/lib/x64"
|
||||
libs="${libs} -LIBPATH:${VSWINPATH}/SDK/Lib/${win_sdk_version}/um/x64"
|
||||
libs="${libs} -LIBPATH:${VSWINPATH}/SDK/Lib/${win_sdk_version}/ucrt/x64"
|
||||
export HOST_LDFLAGS="${libs}"
|
||||
|
||||
export WIN64_LINK="${VSPATH}/VC/bin/Hostx64/x64/link.exe"
|
||||
export WIN64_LIB="${VSPATH}/VC/lib/x64:${VSPATH}/VC/atlmfc/lib/x64:${VSPATH}/SDK/Lib/${win_sdk_version}/ucrt/x64:${VSPATH}/SDK/Lib/${win_sdk_version}/um/x64:${VSPATH}/DIA SDK/lib/amd64"
|
||||
fi
|
||||
|
||||
. $topsrcdir/build/mozconfig.vs-common
|
|
@ -25,6 +25,8 @@ import {
|
|||
getPendingBreakpointsForSource
|
||||
} from "../../selectors";
|
||||
|
||||
import { prefs } from "../../utils/prefs";
|
||||
|
||||
import type { Source, SourceId } from "../../types";
|
||||
import type { Action, ThunkArgs } from "../types";
|
||||
|
||||
|
@ -46,7 +48,7 @@ function createOriginalSource(
|
|||
|
||||
function loadSourceMaps(sources) {
|
||||
return async function({ dispatch, sourceMaps }: ThunkArgs) {
|
||||
if (!sourceMaps) {
|
||||
if (!prefs.clientSourceMapsEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,8 +61,7 @@ export function shouldPrettyPrint(source: Source) {
|
|||
isPretty(source) ||
|
||||
!isJavaScript(source) ||
|
||||
isOriginal(source) ||
|
||||
source.sourceMapURL ||
|
||||
!prefs.clientSourceMapsEnabled
|
||||
(prefs.clientSourceMapsEnabled && source.sourceMapURL)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -730,6 +730,7 @@ skip-if = os == "win" # Bug 1393121
|
|||
skip-if = os == "win"
|
||||
[browser_dbg-search-project.js]
|
||||
[browser_dbg-sourcemaps.js]
|
||||
[browser_dbg-sourcemaps-disabled.js]
|
||||
[browser_dbg-sourcemaps-reload.js]
|
||||
skip-if = os == "win" || (verify) # Bug 1434792
|
||||
[browser_dbg-sourcemaps-reloading.js]
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
// Tests loading and pretty printing bundles with sourcemaps disabled
|
||||
requestLongerTimeout(2);
|
||||
|
||||
add_task(async function() {
|
||||
await pushPref("devtools.source-map.client-service.enabled", false);
|
||||
const dbg = await initDebugger("doc-sourcemaps.html");
|
||||
|
||||
await waitForSources(dbg, "bundle.js");
|
||||
const bundleSrc = findSource(dbg, "bundle.js");
|
||||
|
||||
info('Pretty print the bundle');
|
||||
await selectSource(dbg, bundleSrc);
|
||||
clickElement(dbg, "prettyPrintButton");
|
||||
await waitForSelectedSource(dbg, "bundle.js:formatted");
|
||||
ok(true, 'everything finished');
|
||||
});
|
|
@ -690,9 +690,6 @@ Toolbox.prototype = {
|
|||
* the source map worker.
|
||||
*/
|
||||
get sourceMapService() {
|
||||
if (!Services.prefs.getBoolPref("devtools.source-map.client-service.enabled")) {
|
||||
return null;
|
||||
}
|
||||
return this._createSourceMapService();
|
||||
},
|
||||
|
||||
|
|
|
@ -314,7 +314,8 @@ StyleEditorUI.prototype = {
|
|||
|
||||
const toolbox = gDevTools.getToolbox(this._target);
|
||||
const sourceMapService = toolbox.sourceMapService;
|
||||
if (!sourceMapService) {
|
||||
|
||||
if (!sourceMapService || !Services.prefs.getBoolPref(PREF_ORIG_SOURCES)) {
|
||||
return editor;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
<window onload="boom();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<script>
|
||||
|
||||
function boom()
|
||||
{
|
||||
var p = document.getElementById("p");
|
||||
|
||||
document.addEventListener("DOMAttrModified", removeP, true);
|
||||
|
||||
p.removeAttribute("mode");
|
||||
|
||||
function removeP()
|
||||
{
|
||||
document.documentElement.removeChild(p);
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<progressmeter id="p" mode="determined" />
|
||||
|
||||
</window>
|
|
@ -51,7 +51,6 @@ load 386794-1.html
|
|||
load 387460-1.html
|
||||
load 395469-1.xhtml
|
||||
load 395469-2.xhtml
|
||||
load 398088-1.xul
|
||||
skip load 399712-1.html # sporadically times out (bug 473680)
|
||||
load 400763-1.html
|
||||
load 401993-1.html
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
#include "SkFlattenablePriv.h"
|
||||
#include "SkMaskFilter.h"
|
||||
#include "../../src/effects/SkDashImpl.h"
|
||||
#include "SkGradientShader.h"
|
||||
|
||||
|
@ -21,6 +22,9 @@ void SkFlattenable::PrivateInitializer::InitEffects() {
|
|||
// Shader
|
||||
SkGradientShader::InitializeFlattenables();
|
||||
|
||||
// Mask filters.
|
||||
SkMaskFilter::InitializeFlattenables();
|
||||
|
||||
// PathEffect
|
||||
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDashImpl)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<html>
|
||||
|
||||
<head>
|
||||
<script>
|
||||
function start() {
|
||||
canvas = document.getElementById('canvas')
|
||||
context = canvas.getContext('2d')
|
||||
canvas.setAttribute('x', 800)
|
||||
setTimeout(function() {
|
||||
context.fillText('i', 158, 156, 206)
|
||||
}, 0)
|
||||
context.setTransform(0, 1, 19, 1, 0.0989504886744, 0)
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded', start)
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<canvas id='canvas'></canvas>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -173,3 +173,4 @@ load 1478035.html
|
|||
load 1490704-1.html
|
||||
load 1501518.html
|
||||
load 1503986-1.html
|
||||
load 1505426-1.html
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#ifndef js_CompilationAndEvaluation_h
|
||||
#define js_CompilationAndEvaluation_h
|
||||
|
||||
#include "mozilla/Utf8.h" // mozilla::Utf8Unit
|
||||
|
||||
#include <stddef.h> // size_t
|
||||
#include <stdio.h> // FILE
|
||||
|
||||
|
@ -156,6 +158,22 @@ extern JS_PUBLIC_API bool
|
|||
Compile(JSContext* cx, const ReadOnlyCompileOptions& options,
|
||||
SourceText<char16_t>& srcBuf, MutableHandle<JSScript*> script);
|
||||
|
||||
/**
|
||||
* Identical to |JS::Compile|, but compiles UTF-8.
|
||||
*
|
||||
* The "DontInflate" suffix is temporary while bugs in UTF-8 compilation are
|
||||
* ironed out. In the long term this function and |JS::Compile| will follow
|
||||
* the same naming scheme.
|
||||
*
|
||||
* NOTE: This function DOES NOT INFLATE the UTF-8 bytes to UTF-16 before
|
||||
* compiling them. UTF-8 compilation is currently experimental and has
|
||||
* known bugs. Use only if you're willing to tolerate unspecified bugs!
|
||||
*/
|
||||
extern JS_PUBLIC_API bool
|
||||
CompileDontInflate(JSContext* cx, const ReadOnlyCompileOptions& options,
|
||||
SourceText<mozilla::Utf8Unit>& srcBuf,
|
||||
MutableHandle<JSScript*> script);
|
||||
|
||||
/**
|
||||
* Compile the provided UTF-8 data into a script. If the data contains invalid
|
||||
* UTF-8, an error is reported.
|
||||
|
|
|
@ -1414,19 +1414,79 @@ TokenStreamSpecific<Unit, AnyCharsAccess>::currentLineAndColumn(uint32_t* line,
|
|||
anyChars.srcCoords.lineNumAndColumnIndex(offset, line, column);
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void
|
||||
SourceUnits<char16_t>::computeWindowOffsetAndLength(const char16_t* encodedWindow,
|
||||
size_t encodedTokenOffset,
|
||||
size_t* utf16TokenOffset,
|
||||
size_t encodedWindowLength,
|
||||
size_t* utf16WindowLength)
|
||||
{
|
||||
MOZ_ASSERT_UNREACHABLE("shouldn't need to recompute for UTF-16");
|
||||
}
|
||||
|
||||
template<>
|
||||
inline void
|
||||
SourceUnits<Utf8Unit>::computeWindowOffsetAndLength(const Utf8Unit* encodedWindow,
|
||||
size_t encodedTokenOffset,
|
||||
size_t* utf16TokenOffset,
|
||||
size_t encodedWindowLength,
|
||||
size_t* utf16WindowLength)
|
||||
{
|
||||
MOZ_ASSERT(encodedTokenOffset <= encodedWindowLength,
|
||||
"token offset must be within the window, and the two lambda "
|
||||
"calls below presume this ordering of values");
|
||||
|
||||
const Utf8Unit* const encodedWindowEnd = encodedWindow + encodedWindowLength;
|
||||
|
||||
size_t i = 0;
|
||||
auto ComputeUtf16Count = [&i, &encodedWindow](const Utf8Unit* limit) {
|
||||
while (encodedWindow < limit) {
|
||||
Utf8Unit lead = *encodedWindow++;
|
||||
if (MOZ_LIKELY(IsAscii(lead))) {
|
||||
// ASCII contributes a single UTF-16 code unit.
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
|
||||
Maybe<char32_t> cp = DecodeOneUtf8CodePoint(lead, &encodedWindow, limit);
|
||||
MOZ_ASSERT(cp.isSome(),
|
||||
"computed window should only contain valid UTF-8");
|
||||
|
||||
i += unicode::IsSupplementary(cp.value()) ? 2 : 1;
|
||||
}
|
||||
|
||||
return i;
|
||||
};
|
||||
|
||||
// Compute the token offset from |i == 0| and the initial |encodedWindow|.
|
||||
const Utf8Unit* token = encodedWindow + encodedTokenOffset;
|
||||
MOZ_ASSERT(token <= encodedWindowEnd);
|
||||
*utf16TokenOffset = ComputeUtf16Count(token);
|
||||
|
||||
// Compute the window length, picking up from |i| and |encodedWindow| that,
|
||||
// in general, were modified just above.
|
||||
*utf16WindowLength = ComputeUtf16Count(encodedWindowEnd);
|
||||
}
|
||||
|
||||
template<typename Unit>
|
||||
bool
|
||||
TokenStreamCharsBase<Unit>::addLineOfContext(ErrorMetadata* err, uint32_t offset)
|
||||
{
|
||||
size_t windowStart = sourceUnits.findWindowStart(offset);
|
||||
size_t windowEnd = sourceUnits.findWindowEnd(offset);
|
||||
// Rename the variable to make meaning clearer: an offset into source units
|
||||
// in Unit encoding.
|
||||
size_t encodedOffset = offset;
|
||||
|
||||
size_t windowLength = windowEnd - windowStart;
|
||||
MOZ_ASSERT(windowLength <= SourceUnits::WindowRadius * 2);
|
||||
// These are also offsets into source units in Unit encoding.
|
||||
size_t encodedWindowStart = sourceUnits.findWindowStart(encodedOffset);
|
||||
size_t encodedWindowEnd = sourceUnits.findWindowEnd(encodedOffset);
|
||||
|
||||
size_t encodedWindowLength = encodedWindowEnd - encodedWindowStart;
|
||||
MOZ_ASSERT(encodedWindowLength <= SourceUnits::WindowRadius * 2);
|
||||
|
||||
// Don't add a useless "line" of context when the window ends up empty
|
||||
// because of an invalid encoding at the start of a line.
|
||||
if (windowLength == 0) {
|
||||
if (encodedWindowLength == 0) {
|
||||
MOZ_ASSERT(err->lineOfContext == nullptr,
|
||||
"ErrorMetadata::lineOfContext must be null so we don't "
|
||||
"have to set the lineLength/tokenOffset fields");
|
||||
|
@ -1439,11 +1499,15 @@ TokenStreamCharsBase<Unit>::addLineOfContext(ErrorMetadata* err, uint32_t offset
|
|||
// Thus we must clear |this->charBuffer| of prior work.
|
||||
this->charBuffer.clear();
|
||||
|
||||
const Unit* start = sourceUnits.codeUnitPtrAt(windowStart);
|
||||
if (!fillCharBufferFromSourceNormalizingAsciiLineBreaks(start, start + windowLength)) {
|
||||
const Unit* encodedWindow = sourceUnits.codeUnitPtrAt(encodedWindowStart);
|
||||
if (!fillCharBufferFromSourceNormalizingAsciiLineBreaks(encodedWindow,
|
||||
encodedWindow + encodedWindowLength))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t utf16WindowLength = this->charBuffer.length();
|
||||
|
||||
// The windowed string is null-terminated.
|
||||
if (!this->charBuffer.append('\0')) {
|
||||
return false;
|
||||
|
@ -1454,8 +1518,47 @@ TokenStreamCharsBase<Unit>::addLineOfContext(ErrorMetadata* err, uint32_t offset
|
|||
return false;
|
||||
}
|
||||
|
||||
err->lineLength = windowLength;
|
||||
err->tokenOffset = offset - windowStart;
|
||||
size_t encodedTokenOffset = encodedOffset - encodedWindowStart;
|
||||
|
||||
MOZ_ASSERT(encodedTokenOffset <= encodedWindowLength,
|
||||
"token offset must be inside the window");
|
||||
|
||||
// The length in UTF-8 code units of a code point is always greater than or
|
||||
// equal to the same code point's length in UTF-16 code points. ASCII code
|
||||
// points are 1 unit in either encoding. Code points in [U+0080, U+10000)
|
||||
// are 2-3 UTF-8 code units to 1 UTF-16 code unit. And code points in
|
||||
// [U+10000, U+10FFFF] are 4 UTF-8 code units to 2 UTF-16 code units.
|
||||
//
|
||||
// Therefore, if encoded window length equals the length in UTF-16 (this is
|
||||
// always the case for Unit=char16_t), the UTF-16 offsets are exactly the
|
||||
// encoded offsets. Otherwise we must convert offset/length from UTF-8 to
|
||||
// UTF-16.
|
||||
if (std::is_same<Unit, char16_t>::value) {
|
||||
MOZ_ASSERT(utf16WindowLength == encodedWindowLength,
|
||||
"UTF-16 to UTF-16 shouldn't change window length");
|
||||
err->tokenOffset = encodedTokenOffset;
|
||||
err->lineLength = encodedWindowLength;
|
||||
} else {
|
||||
MOZ_ASSERT((std::is_same<Unit, Utf8Unit>::value),
|
||||
"should only see UTF-8 here");
|
||||
|
||||
bool simple = utf16WindowLength == encodedWindowLength;
|
||||
MOZ_ASSERT(std::all_of(encodedWindow, encodedWindow + encodedWindowLength,
|
||||
IsAscii<Unit>) ==
|
||||
simple,
|
||||
"equal window lengths in UTF-8 should correspond only to "
|
||||
"wholly-ASCII text");
|
||||
|
||||
if (simple) {
|
||||
err->tokenOffset = encodedTokenOffset;
|
||||
err->lineLength = encodedWindowLength;
|
||||
} else {
|
||||
sourceUnits.computeWindowOffsetAndLength(encodedWindow,
|
||||
encodedTokenOffset, &err->tokenOffset,
|
||||
encodedWindowLength, &err->lineLength);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3188,7 +3291,7 @@ TokenStreamSpecific<Unit, AnyCharsAccess>::getStringOrTemplateToken(char untilCh
|
|||
// LineContinuation represents no code points, so don't append
|
||||
// in this case.
|
||||
if (codePoint != '\n') {
|
||||
if (!this->charBuffer.append(unit)) {
|
||||
if (!appendCodePointToCharBuffer(AssertedCast<char32_t>(codePoint))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1423,6 +1423,35 @@ class SourceUnits
|
|||
*/
|
||||
size_t findWindowEnd(size_t offset) const;
|
||||
|
||||
/**
|
||||
* Given a |window| of |encodingSpecificWindowLength| units encoding valid
|
||||
* Unicode text, with index |encodingSpecificTokenOffset| indicating a
|
||||
* particular code point boundary in |window|, compute the corresponding
|
||||
* token offset and length if |window| were encoded in UTF-16. For
|
||||
* example:
|
||||
*
|
||||
* // U+03C0 GREEK SMALL LETTER PI is encoded as 0xCF 0x80.
|
||||
* const Utf8Unit* encodedWindow =
|
||||
* reinterpret_cast<const Utf8Unit*>(u8"ππππ = @ FAIL");
|
||||
* size_t encodedTokenOffset = 11; // 2 * 4 + ' = '.length
|
||||
* size_t encodedWindowLength = 17; // 2 * 4 + ' = @ FAIL'.length
|
||||
* size_t utf16Offset, utf16Length;
|
||||
* computeWindowOffsetAndLength(encodedWindow,
|
||||
* encodedTokenOffset, &utf16Offset,
|
||||
* encodedWindowLength, &utf16Length);
|
||||
* MOZ_ASSERT(utf16Offset == 7);
|
||||
* MOZ_ASSERT(utf16Length = 13);
|
||||
*
|
||||
* This function asserts if called for UTF-16: the sole caller can avoid
|
||||
* computing UTF-16 offsets when they're definitely the same as the encoded
|
||||
* offsets.
|
||||
*/
|
||||
inline void computeWindowOffsetAndLength(const Unit* encodeWindow,
|
||||
size_t encodingSpecificTokenOffset,
|
||||
size_t* utf16TokenOffset,
|
||||
size_t encodingSpecificWindowLength,
|
||||
size_t* utf16WindowLength);
|
||||
|
||||
private:
|
||||
/** Base of buffer. */
|
||||
const Unit* base_;
|
||||
|
|
|
@ -31,6 +31,7 @@ UNIFIED_SOURCES += [
|
|||
'testDefinePropertyIgnoredAttributes.cpp',
|
||||
'testDeflateStringToUTF8Buffer.cpp',
|
||||
'testDifferentNewTargetInvokeConstructor.cpp',
|
||||
'testEmptyWindowIsOmitted.cpp',
|
||||
'testErrorCopying.cpp',
|
||||
'testErrorLineOfContext.cpp',
|
||||
'testException.cpp',
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "jsapi-tests/tests.h"
|
||||
#include "vm/ErrorReporting.h"
|
||||
|
||||
using mozilla::ArrayEqual;
|
||||
using mozilla::ArrayLength;
|
||||
using mozilla::IsAsciiHexDigit;
|
||||
using mozilla::Utf8Unit;
|
||||
|
@ -205,27 +206,16 @@ isNotShortestFormMessage(const char* str)
|
|||
contains(str, "it wasn't encoded in shortest possible form");
|
||||
}
|
||||
|
||||
bool
|
||||
compileUtf8(const char* chars, size_t len, JS::MutableHandleScript script)
|
||||
{
|
||||
JS::RealmOptions globalOptions;
|
||||
JS::RootedObject global(cx, JS_NewGlobalObject(cx, getGlobalClass(), nullptr,
|
||||
JS::FireOnNewGlobalHook, globalOptions));
|
||||
CHECK(global);
|
||||
|
||||
JSAutoRealm ar(cx, global);
|
||||
|
||||
JS::CompileOptions options(cx);
|
||||
return JS::CompileUtf8DontInflate(cx, options, chars, len, script);
|
||||
}
|
||||
|
||||
template<size_t N, typename TestMessage>
|
||||
bool
|
||||
testBadUtf8(const char (&chars)[N], unsigned errorNumber,
|
||||
TestMessage testMessage, const char* badBytes)
|
||||
{
|
||||
JS::Rooted<JSScript*> script(cx);
|
||||
CHECK(!compileUtf8(chars, N - 1, &script));
|
||||
{
|
||||
JS::CompileOptions options(cx);
|
||||
CHECK(!JS::CompileUtf8DontInflate(cx, options, chars, N - 1, &script));
|
||||
}
|
||||
|
||||
JS::RootedValue exn(cx);
|
||||
CHECK(JS_GetPendingException(cx, &exn));
|
||||
|
@ -277,3 +267,61 @@ testBadUtf8(const char (&chars)[N], unsigned errorNumber,
|
|||
return true;
|
||||
}
|
||||
END_TEST(testUtf8BadBytes)
|
||||
|
||||
BEGIN_TEST(testMultiUnitUtf8InWindow)
|
||||
{
|
||||
static const char firstInWindowIsMultiUnit[] =
|
||||
"\xCF\x80\xCF\x80 = 6.283185307; @ bad starts HERE:\x80\xFF\xFF";
|
||||
CHECK(testContext(firstInWindowIsMultiUnit,
|
||||
u"ππ = 6.283185307; @ bad starts HERE:"));
|
||||
|
||||
static const char atTokenOffsetIsMulti[] =
|
||||
"var z = 💯";
|
||||
CHECK(testContext(atTokenOffsetIsMulti,
|
||||
u"var z = 💯"));
|
||||
|
||||
static const char afterTokenOffsetIsMulti[] =
|
||||
"var z = @💯💯💯X";
|
||||
CHECK(testContext(afterTokenOffsetIsMulti,
|
||||
u"var z = @💯💯💯X"));
|
||||
|
||||
static const char atEndIsMulti[] =
|
||||
"var z = @@💯💯💯";
|
||||
CHECK(testContext(atEndIsMulti,
|
||||
u"var z = @@💯💯💯"));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
template<size_t N, size_t ContextLenWithNull>
|
||||
bool
|
||||
testContext(const char (&chars)[N], const char16_t (&expectedContext)[ContextLenWithNull])
|
||||
{
|
||||
JS::Rooted<JSScript*> script(cx);
|
||||
{
|
||||
JS::CompileOptions options(cx);
|
||||
CHECK(!JS::CompileUtf8DontInflate(cx, options, chars, N - 1, &script));
|
||||
}
|
||||
|
||||
JS::RootedValue exn(cx);
|
||||
CHECK(JS_GetPendingException(cx, &exn));
|
||||
JS_ClearPendingException(cx);
|
||||
|
||||
js::ErrorReport report(cx);
|
||||
CHECK(report.init(cx, exn, js::ErrorReport::WithSideEffects));
|
||||
|
||||
const auto* errorReport = report.report();
|
||||
|
||||
CHECK(errorReport->errorNumber == JSMSG_ILLEGAL_CHARACTER);
|
||||
|
||||
const char16_t* lineOfContext = errorReport->linebuf();
|
||||
size_t lineOfContextLength = errorReport->linebufLength();
|
||||
|
||||
CHECK(lineOfContext[lineOfContextLength] == '\0');
|
||||
CHECK(lineOfContextLength == ContextLenWithNull - 1);
|
||||
|
||||
CHECK(ArrayEqual(lineOfContext, expectedContext, ContextLenWithNull));
|
||||
|
||||
return true;
|
||||
}
|
||||
END_TEST(testMultiUnitUtf8InWindow)
|
||||
|
|
|
@ -0,0 +1,165 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/TextUtils.h"
|
||||
#include "mozilla/Utf8.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "jsfriendapi.h"
|
||||
|
||||
#include "js/CharacterEncoding.h"
|
||||
#include "js/CompilationAndEvaluation.h"
|
||||
#include "js/SourceText.h"
|
||||
#include "jsapi-tests/tests.h"
|
||||
#include "vm/ErrorReporting.h"
|
||||
|
||||
using mozilla::ArrayLength;
|
||||
using mozilla::IsAsciiHexDigit;
|
||||
using mozilla::Utf8Unit;
|
||||
|
||||
BEGIN_TEST(testEmptyWindow)
|
||||
{
|
||||
return testUtf8() && testUtf16();
|
||||
}
|
||||
|
||||
bool
|
||||
testUtf8()
|
||||
{
|
||||
// Bad unit with nothing before it.
|
||||
static const char badLeadingUnit[] = "\x80";
|
||||
CHECK(testOmittedWindow(badLeadingUnit, JSMSG_BAD_LEADING_UTF8_UNIT, "0x80"));
|
||||
|
||||
// Bad unit at start of a fresh line.
|
||||
static const char badStartingFreshLine[] = "var x = 5;\n\x98";
|
||||
CHECK(testOmittedWindow(badStartingFreshLine, JSMSG_BAD_LEADING_UTF8_UNIT, "0x98"));
|
||||
|
||||
// Bad trailing unit in initial code point.
|
||||
static const char badTrailingUnit[] = "\xD8\x20";
|
||||
CHECK(testOmittedWindow(badTrailingUnit, JSMSG_BAD_TRAILING_UTF8_UNIT, "0xD8 0x20"));
|
||||
|
||||
// Bad trailing unit at start of a fresh line.
|
||||
static const char badTrailingUnitFreshLine[] = "var x = 5;\n\xD8\x20";
|
||||
CHECK(testOmittedWindow(badTrailingUnitFreshLine, JSMSG_BAD_TRAILING_UTF8_UNIT, "0xD8 0x20"));
|
||||
|
||||
// Overlong in initial code point.
|
||||
static const char overlongInitial[] = "\xC0\x80";
|
||||
CHECK(testOmittedWindow(overlongInitial, JSMSG_FORBIDDEN_UTF8_CODE_POINT, "0xC0 0x80"));
|
||||
|
||||
// Overlong at start of a fresh line.
|
||||
static const char overlongFreshLine[] = "var x = 5;\n\xC0\x81";
|
||||
CHECK(testOmittedWindow(overlongFreshLine, JSMSG_FORBIDDEN_UTF8_CODE_POINT, "0xC0 0x81"));
|
||||
|
||||
// Not-enough in initial code point.
|
||||
static const char notEnoughInitial[] = "\xF0";
|
||||
CHECK(testOmittedWindow(notEnoughInitial, JSMSG_NOT_ENOUGH_CODE_UNITS, "0xF0"));
|
||||
|
||||
// Not-enough at start of a fresh line.
|
||||
static const char notEnoughFreshLine[] = "var x = 5;\n\xF0";
|
||||
CHECK(testOmittedWindow(notEnoughFreshLine, JSMSG_NOT_ENOUGH_CODE_UNITS, "0xF0"));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
testUtf16()
|
||||
{
|
||||
// Bad unit with nothing before it.
|
||||
static const char16_t badLeadingUnit[] = u"\xDFFF";
|
||||
CHECK(testOmittedWindow(badLeadingUnit, JSMSG_ILLEGAL_CHARACTER));
|
||||
|
||||
// Bad unit at start of a fresh line.
|
||||
static const char16_t badStartingFreshLine[] = u"var x = 5;\n\xDFFF";
|
||||
CHECK(testOmittedWindow(badStartingFreshLine, JSMSG_ILLEGAL_CHARACTER));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
startsWith(const char* str, const char* prefix)
|
||||
{
|
||||
return std::strncmp(prefix, str, strlen(prefix)) == 0;
|
||||
}
|
||||
|
||||
static bool
|
||||
equals(const char* str, const char* expected)
|
||||
{
|
||||
return std::strcmp(str, expected) == 0;
|
||||
}
|
||||
|
||||
bool
|
||||
compile(const char16_t* chars, size_t len, JS::MutableHandle<JSScript*> script)
|
||||
{
|
||||
JS::SourceText<char16_t> source;
|
||||
CHECK(source.init(cx, chars, len, JS::SourceOwnership::Borrowed));
|
||||
|
||||
JS::CompileOptions options(cx);
|
||||
return JS::Compile(cx, options, source, script);
|
||||
}
|
||||
|
||||
bool
|
||||
compile(const char* chars, size_t len, JS::MutableHandle<JSScript*> script)
|
||||
{
|
||||
JS::SourceText<Utf8Unit> source;
|
||||
CHECK(source.init(cx, chars, len, JS::SourceOwnership::Borrowed));
|
||||
|
||||
JS::CompileOptions options(cx);
|
||||
return JS::CompileDontInflate(cx, options, source, script);
|
||||
}
|
||||
|
||||
template<typename CharT, size_t N>
|
||||
bool
|
||||
testOmittedWindow(const CharT (&chars)[N], unsigned expectedErrorNumber,
|
||||
const char* badCodeUnits = nullptr)
|
||||
{
|
||||
JS::Rooted<JSScript*> script(cx);
|
||||
CHECK(!compile(chars, N - 1, &script));
|
||||
|
||||
JS::RootedValue exn(cx);
|
||||
CHECK(JS_GetPendingException(cx, &exn));
|
||||
JS_ClearPendingException(cx);
|
||||
|
||||
js::ErrorReport report(cx);
|
||||
CHECK(report.init(cx, exn, js::ErrorReport::WithSideEffects));
|
||||
|
||||
const auto* errorReport = report.report();
|
||||
|
||||
CHECK(errorReport->errorNumber == expectedErrorNumber);
|
||||
|
||||
if (const auto& notes = errorReport->notes) {
|
||||
CHECK(sizeof(CharT) == 1);
|
||||
CHECK(badCodeUnits != nullptr);
|
||||
|
||||
auto iter = notes->begin();
|
||||
CHECK(iter != notes->end());
|
||||
|
||||
const char* noteMessage = (*iter)->message().c_str();
|
||||
|
||||
// The prefix ought always be the same.
|
||||
static const char expectedPrefix[] =
|
||||
"the code units comprising this invalid code point were: ";
|
||||
constexpr size_t expectedPrefixLen = ArrayLength(expectedPrefix) - 1;
|
||||
|
||||
CHECK(startsWith(noteMessage, expectedPrefix));
|
||||
|
||||
// The end of the prefix is the bad code units.
|
||||
CHECK(equals(noteMessage + expectedPrefixLen, badCodeUnits));
|
||||
|
||||
++iter;
|
||||
CHECK(iter == notes->end());
|
||||
} else {
|
||||
CHECK(sizeof(CharT) == 2);
|
||||
|
||||
// UTF-16 encoding "errors" are not categorical errors, so the errors
|
||||
// are just of the invalid-character sort, without an accompanying note
|
||||
// spelling out a series of invalid code units.
|
||||
CHECK(!badCodeUnits);
|
||||
}
|
||||
|
||||
CHECK(!errorReport->linebuf());
|
||||
|
||||
return true;
|
||||
}
|
||||
END_TEST(testEmptyWindow)
|
|
@ -125,6 +125,13 @@ JS::Compile(JSContext* cx, const ReadOnlyCompileOptions& options,
|
|||
return CompileSourceBuffer(cx, options, srcBuf, script);
|
||||
}
|
||||
|
||||
bool
|
||||
JS::CompileDontInflate(JSContext* cx, const ReadOnlyCompileOptions& options,
|
||||
SourceText<Utf8Unit>& srcBuf, JS::MutableHandleScript script)
|
||||
{
|
||||
return CompileSourceBuffer(cx, options, srcBuf, script);
|
||||
}
|
||||
|
||||
bool
|
||||
JS::CompileLatin1(JSContext* cx, const ReadOnlyCompileOptions& options,
|
||||
const char* bytes, size_t length, JS::MutableHandleScript script)
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
|
||||
<window xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
>
|
||||
|
||||
<html:style>
|
||||
#prog {
|
||||
-moz-appearance: none;
|
||||
background-color: blue;
|
||||
}
|
||||
#prog .progress-bar {
|
||||
-moz-appearance: none;
|
||||
border-radius: 3px 3px;
|
||||
background-color: red;
|
||||
}
|
||||
</html:style>
|
||||
|
||||
<progressmeter id="prog" value="50" max="200"/>
|
||||
|
||||
</window>
|
|
@ -1,35 +0,0 @@
|
|||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
|
||||
<window xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
class="reftest-wait">
|
||||
|
||||
<html:style>
|
||||
#prog {
|
||||
-moz-appearance: none;
|
||||
background-color: blue;
|
||||
}
|
||||
#prog .progress-bar {
|
||||
-moz-appearance: none;
|
||||
border-radius: 3px 3px;
|
||||
background-color: red;
|
||||
}
|
||||
</html:style>
|
||||
|
||||
<progressmeter id="prog" value="50"/>
|
||||
|
||||
<script>
|
||||
<![CDATA[
|
||||
|
||||
function load(event) {
|
||||
setTimeout(function() {
|
||||
document.getElementById("prog").max = 200;
|
||||
document.documentElement.removeAttribute("class");
|
||||
}, 0);
|
||||
}
|
||||
window.addEventListener("load", load, false);
|
||||
|
||||
]]>
|
||||
</script>
|
||||
|
||||
</window>
|
|
@ -1260,7 +1260,6 @@ fails == 472020-2.xul 472020-2-ref.xul
|
|||
== 472769-2.html 472769-2-ref.html
|
||||
== 472769-3.html 472769-3-ref.html
|
||||
== 473847-1.xul 473847-1-ref.xul
|
||||
fuzzy-if(skiaContent,0-1,0-16) == 474336-1.xul 474336-1-ref.xul
|
||||
== 474417-1.html 474417-1-ref.html
|
||||
fuzzy-if(skiaContent,0-1,0-5) == 474472-1.html 474472-1-ref.html
|
||||
== 475986-1a.html 475986-1-ref.html
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
<window id="yourwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<script type="text/javascript">
|
||||
<![CDATA[
|
||||
function onload() {
|
||||
document.addEventListener("DOMAttrModified", function() {}, true);
|
||||
document.getElementById("test").setAttribute("value", "50");
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
<progressmeter id="test"/>
|
||||
</window>
|
|
@ -1,20 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
function x()
|
||||
{
|
||||
document.removeEventListener("DOMAttrModified", x);
|
||||
document.removeChild(document.documentElement);
|
||||
}
|
||||
|
||||
function boom()
|
||||
{
|
||||
var p = document.createElementNS("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "progressmeter");
|
||||
document.addEventListener("DOMAttrModified", x);
|
||||
document.documentElement.appendChild(p);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();"></body>
|
||||
</html>
|
|
@ -59,8 +59,6 @@ asserts(0-1) load 464407-1.xhtml # Bugs 450974, 1267054, 718883
|
|||
load 467080.xul
|
||||
load 470063-1.html
|
||||
load 470272.html
|
||||
load 472189.xul
|
||||
load 475133.html
|
||||
load 538308-1.xul
|
||||
load 557174-1.xml
|
||||
load 564705-1.xul
|
||||
|
|
|
@ -233,8 +233,9 @@ Utf8AsUnsignedChars(const Utf8Unit* aUnits)
|
|||
}
|
||||
|
||||
/** Returns true iff |aUnit| is an ASCII value. */
|
||||
template<>
|
||||
inline bool
|
||||
IsAscii(Utf8Unit aUnit)
|
||||
IsAscii<Utf8Unit>(Utf8Unit aUnit)
|
||||
{
|
||||
return IsAscii(aUnit.toUint8());
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ chrome/toolkit/skin/classic/global/menulist.css
|
|||
chrome/toolkit/skin/classic/global/numberbox.css
|
||||
chrome/toolkit/skin/classic/global/popup.css
|
||||
chrome/toolkit/skin/classic/global/preferences.css
|
||||
chrome/toolkit/skin/classic/global/progressmeter.css
|
||||
chrome/toolkit/skin/classic/global/radio.css
|
||||
chrome/toolkit/skin/classic/global/richlistbox.css
|
||||
chrome/toolkit/skin/classic/global/scrollbars.css
|
||||
|
|
|
@ -997,6 +997,76 @@ win64-msvc/opt:
|
|||
- win64-sccache
|
||||
- win64-node
|
||||
|
||||
win64-aarch64-msvc/debug:
|
||||
description: "AArch64 Win64 MSVC Debug"
|
||||
index:
|
||||
product: firefox
|
||||
job-name: win64-aarch64-msvc-debug
|
||||
treeherder:
|
||||
platform: windows2012-aarch64/debug
|
||||
symbol: Bmsvc
|
||||
tier: 1
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
|
||||
worker:
|
||||
max-run-time: 7200
|
||||
env:
|
||||
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/aarch64.manifest"
|
||||
PERFHERDER_EXTRA_OPTIONS: msvc-aarch64
|
||||
run:
|
||||
using: mozharness
|
||||
actions: [get-secrets, build]
|
||||
options: [append-env-variables-from-configs]
|
||||
script: mozharness/scripts/fx_desktop_build.py
|
||||
config:
|
||||
- builds/releng_base_firefox.py
|
||||
- builds/taskcluster_base_windows.py
|
||||
- builds/taskcluster_sub_win64/debug.py
|
||||
extra-config:
|
||||
mozconfig_platform: win64-aarch64
|
||||
mozconfig-variant: debug-msvc
|
||||
run-on-projects: ['mozilla-central', 'trunk', 'try']
|
||||
toolchains:
|
||||
- win64-clang-cl
|
||||
- win64-aarch64-rust-nightly
|
||||
- win64-cbindgen
|
||||
- win64-sccache
|
||||
- win64-node
|
||||
|
||||
win64-aarch64-msvc/opt:
|
||||
description: "AArch64 Win64 MSVC Opt"
|
||||
index:
|
||||
product: firefox
|
||||
job-name: win64-aarch64-msvc-opt
|
||||
treeherder:
|
||||
platform: windows2012-aarch64/opt
|
||||
symbol: Bmsvc
|
||||
tier: 1
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
|
||||
worker:
|
||||
max-run-time: 7200
|
||||
env:
|
||||
TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/aarch64.manifest"
|
||||
PERFHERDER_EXTRA_OPTIONS: msvc-aarch64
|
||||
run:
|
||||
using: mozharness
|
||||
actions: [get-secrets, build]
|
||||
options: [append-env-variables-from-configs]
|
||||
script: mozharness/scripts/fx_desktop_build.py
|
||||
config:
|
||||
- builds/releng_base_firefox.py
|
||||
- builds/taskcluster_base_windows.py
|
||||
extra-config:
|
||||
stage_platform: win64
|
||||
mozconfig_platform: win64-aarch64
|
||||
mozconfig-variant: opt-msvc
|
||||
run-on-projects: ['mozilla-central', 'trunk', 'try']
|
||||
toolchains:
|
||||
- win64-clang-cl
|
||||
- win64-aarch64-rust-nightly
|
||||
- win64-cbindgen
|
||||
- win64-sccache
|
||||
- win64-node
|
||||
|
||||
win32-mingwclang/opt:
|
||||
description: "Win32 MinGW-Clang Opt"
|
||||
index:
|
||||
|
|
|
@ -21,9 +21,6 @@ geckoview-junit:
|
|||
script: android_emulator_unittest.py
|
||||
config:
|
||||
by-test-platform:
|
||||
android-em-4.2-x86/opt:
|
||||
- android/android_common.py
|
||||
- android/androidx86.py
|
||||
android-em-7.0-x86/opt:
|
||||
- android/android_common.py
|
||||
- android/androidx86_7_0.py
|
||||
|
|
|
@ -15,9 +15,6 @@ job-defaults:
|
|||
default: desktop_unittest.py
|
||||
config:
|
||||
by-test-platform:
|
||||
android-em-4.2-x86/opt:
|
||||
- android/android_common.py
|
||||
- android/androidx86.py
|
||||
android-em-7.0-x86/opt:
|
||||
- android/android_common.py
|
||||
- android/androidx86_7_0.py
|
||||
|
|
|
@ -304,11 +304,6 @@ android-em-4.3-arm7-api-16/opt:
|
|||
- android-common-tests
|
||||
- android-opt-tests
|
||||
|
||||
android-em-4.2-x86/opt:
|
||||
build-platform: android-x86/opt
|
||||
test-sets:
|
||||
- android-x86-tests
|
||||
|
||||
android-em-7.0-x86/opt:
|
||||
build-platform: android-x86/opt
|
||||
test-sets:
|
||||
|
|
|
@ -334,10 +334,6 @@ android-opt-tests:
|
|||
# Robocop tests often fail on Debug builds
|
||||
- robocop
|
||||
|
||||
android-x86-tests:
|
||||
- mochitest-chrome
|
||||
- xpcshell
|
||||
|
||||
android-x86-kvm-tests:
|
||||
- crashtest
|
||||
- geckoview-junit
|
||||
|
|
|
@ -10,9 +10,6 @@ job-defaults:
|
|||
default: desktop_unittest.py
|
||||
config:
|
||||
by-test-platform:
|
||||
android-em-4.2-x86/opt:
|
||||
- android/android_common.py
|
||||
- android/androidx86.py
|
||||
android-em.*:
|
||||
- android/android_common.py
|
||||
- android/androidarm_4_3.py
|
||||
|
@ -41,7 +38,6 @@ xpcshell:
|
|||
by-test-platform:
|
||||
linux32/debug: 12
|
||||
linux64/debug: 10
|
||||
android-em-4.2-x86/opt: 6
|
||||
android-em-4.3-arm7-api-16/debug: 12
|
||||
macosx.*: 1
|
||||
windows.*: 1
|
||||
|
|
|
@ -149,6 +149,31 @@ win64-rust-nightly:
|
|||
]
|
||||
toolchain-artifact: public/build/rustc.tar.bz2
|
||||
|
||||
win64-aarch64-rust-nightly:
|
||||
description: "rust nightly repack with aarch64 support"
|
||||
treeherder:
|
||||
kind: build
|
||||
platform: toolchains/opt
|
||||
symbol: TW64(rust-aarch64-nightly)
|
||||
tier: 1
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
|
||||
worker:
|
||||
docker-image: {in-tree: toolchain-build}
|
||||
max-run-time: 7200
|
||||
env:
|
||||
UPLOAD_DIR: artifacts
|
||||
run:
|
||||
using: toolchain-script
|
||||
script: repack_rust.py
|
||||
arguments: [
|
||||
'--channel', 'nightly-2018-11-08',
|
||||
'--host', 'x86_64-pc-windows-msvc',
|
||||
'--target', 'x86_64-pc-windows-msvc',
|
||||
'--target', 'aarch64-pc-windows-msvc',
|
||||
'--target', 'i686-pc-windows-msvc',
|
||||
]
|
||||
toolchain-artifact: public/build/rustc.tar.bz2
|
||||
|
||||
win64-node:
|
||||
description: "Node repack toolchain build"
|
||||
treeherder:
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
# mozharness configuration for Android x86 unit tests
|
||||
#
|
||||
# This configuration should be combined with suite definitions and other
|
||||
# mozharness configuration from android_common.py, or similar.
|
||||
|
||||
config = {
|
||||
"deprecated_sdk_path": True,
|
||||
"tooltool_manifest_path": "testing/config/tooltool-manifests/androidx86/releng.manifest",
|
||||
"emulator_manifest": """
|
||||
[
|
||||
{
|
||||
"size": 193383673,
|
||||
"digest": "6609e8b95db59c6a3ad60fc3dcfc358b2c8ec8b4dda4c2780eb439e1c5dcc5d550f2e47ce56ba14309363070078d09b5287e372f6e95686110ff8a2ef1838221",
|
||||
"algorithm": "sha512",
|
||||
"filename": "android-sdk18_0.r18moz1.orig.tar.gz",
|
||||
"unpack": "True"
|
||||
}
|
||||
] """,
|
||||
"emulator_avd_name": "test-1",
|
||||
"emulator_process_name": "emulator64-x86",
|
||||
"emulator_extra_args": "-show-kernel -debug init,console,gles,memcheck,adbserver,adbclient,adb,avd_config,socket -qemu -m 1024",
|
||||
"exes": {
|
||||
'adb': '%(abs_work_dir)s/android-sdk18/platform-tools/adb',
|
||||
},
|
||||
"env": {
|
||||
"DISPLAY": ":0.0",
|
||||
"PATH": "%(PATH)s:%(abs_work_dir)s/android-sdk18/tools:%(abs_work_dir)s/android-sdk18/platform-tools",
|
||||
"MINIDUMP_SAVEPATH": "%(abs_work_dir)s/../minidumps"
|
||||
},
|
||||
}
|
|
@ -296,7 +296,6 @@ if (!isDummyDocument) {
|
|||
for (let script of [
|
||||
"chrome://global/content/elements/general.js",
|
||||
"chrome://global/content/elements/notificationbox.js",
|
||||
"chrome://global/content/elements/progressmeter.js",
|
||||
"chrome://global/content/elements/radio.js",
|
||||
"chrome://global/content/elements/textbox.js",
|
||||
"chrome://global/content/elements/tabbox.js",
|
||||
|
|
|
@ -97,7 +97,6 @@ toolkit.jar:
|
|||
content/global/elements/editor.js (widgets/editor.js)
|
||||
content/global/elements/general.js (widgets/general.js)
|
||||
content/global/elements/notificationbox.js (widgets/notificationbox.js)
|
||||
content/global/elements/progressmeter.js (widgets/progressmeter.js)
|
||||
content/global/elements/radio.js (widgets/radio.js)
|
||||
content/global/elements/marquee.css (widgets/marquee.css)
|
||||
content/global/elements/marquee.js (widgets/marquee.js)
|
||||
|
|
|
@ -169,9 +169,6 @@ with Files('tests/mochitest/*autocomplete*'):
|
|||
with Files('tests/mochitest/*mousecapture*'):
|
||||
BUG_COMPONENT = ('Core', 'Event Handling')
|
||||
|
||||
with Files('tests/reftests/*progress*'):
|
||||
BUG_COMPONENT = ('Toolkit', 'XUL Widgets')
|
||||
|
||||
with Files('tests/reftests/*multiline*'):
|
||||
BUG_COMPONENT = ('Core', 'XBL')
|
||||
|
||||
|
|
|
@ -170,7 +170,6 @@ skip-if = (verify && (os == 'win'))
|
|||
support-files = window_preferences_beforeaccept.xul
|
||||
[test_preferences_onsyncfrompreference.xul]
|
||||
support-files = window_preferences_onsyncfrompreference.xul
|
||||
[test_progressmeter.xul]
|
||||
[test_props.xul]
|
||||
[test_radio.xul]
|
||||
[test_richlist_direction.xul]
|
||||
|
|
|
@ -1,74 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
|
||||
<!--
|
||||
XUL Widget Test for progressmeter
|
||||
-->
|
||||
<window title="Progressmeter" width="500" height="600"
|
||||
onload="doTests()"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<progressmeter id="n1"/>
|
||||
<progressmeter id="n2" mode="undetermined"/>
|
||||
|
||||
<!-- test results are displayed in the html:body -->
|
||||
<body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
|
||||
|
||||
<!-- test code goes here -->
|
||||
<script type="application/javascript"><![CDATA[
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function doTests() {
|
||||
var n1 = document.getElementById("n1");
|
||||
var n2 = document.getElementById("n2");
|
||||
|
||||
SimpleTest.is(n1.mode, "", "mode determined");
|
||||
SimpleTest.is(n2.mode, "undetermined", "mode undetermined");
|
||||
|
||||
SimpleTest.is(n1.value, "0", "determined value");
|
||||
SimpleTest.is(n2.value, "0", "undetermined value");
|
||||
|
||||
// values can only be incremented in multiples of 4
|
||||
n1.value = 2;
|
||||
SimpleTest.is(n1.value, "0", "determined value set 2");
|
||||
n1.value = -1;
|
||||
SimpleTest.is(n1.value, "0", "determined value set -1");
|
||||
n1.value = 125;
|
||||
SimpleTest.is(n1.value, "100", "determined value set 125");
|
||||
n1.value = 7;
|
||||
SimpleTest.is(n1.value, "7", "determined value set 7");
|
||||
n1.value = "17";
|
||||
SimpleTest.is(n1.value, "17", "determined value set 17 string");
|
||||
n1.value = 18;
|
||||
SimpleTest.is(n1.value, "17", "determined value set 18");
|
||||
n1.value = "Cat";
|
||||
SimpleTest.is(n1.value, "17", "determined value set invalid");
|
||||
|
||||
n1.max = 200;
|
||||
is(n1.max, "200", "max changed");
|
||||
n1.value = 150;
|
||||
n1.max = 120;
|
||||
is(n1.value, "120", "max lowered below value");
|
||||
|
||||
n2.value = 2;
|
||||
SimpleTest.is(n2.value, "0", "undetermined value set 2");
|
||||
n2.value = -1;
|
||||
SimpleTest.is(n2.value, "0", "undetermined value set -1");
|
||||
n2.value = 125;
|
||||
SimpleTest.is(n2.value, "100", "undetermined value set 125");
|
||||
n2.value = 7;
|
||||
SimpleTest.is(n2.value, "7", "undetermined value set 7");
|
||||
n2.value = "17";
|
||||
SimpleTest.is(n2.value, "17", "undetermined value set 17 string");
|
||||
n2.value = 18;
|
||||
SimpleTest.is(n2.value, "17", "undetermined value set 18");
|
||||
n2.value = "Cat";
|
||||
SimpleTest.is(n2.value, "17", "determined value set invalid");
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
]]></script>
|
||||
|
||||
</window>
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<progressmeter value="100"/> <!-- default is max = 100 -->
|
||||
</window>
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<progressmeter max="198" value="198"/> <!-- 100% -->
|
||||
</window>
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
== bug-442419-progressmeter-max.xul bug-442419-progressmeter-max-ref.xul
|
||||
!= textbox-multiline-default-value.xul textbox-multiline-empty.xul
|
||||
== videocontrols-dynamically-add-cc.html videocontrols-dynamically-add-cc-ref.html
|
||||
== audio-with-bogus-url.html audio-with-bogus-url-ref.html
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
@import url("chrome://global/skin/menulist.css");
|
||||
@import url("chrome://global/skin/notification.css");
|
||||
@import url("chrome://global/skin/popup.css");
|
||||
@import url("chrome://global/skin/progressmeter.css");
|
||||
@import url("chrome://global/skin/radio.css");
|
||||
@import url("chrome://global/skin/richlistbox.css");
|
||||
@import url("chrome://global/skin/scrollbox.css");
|
||||
|
|
|
@ -1,105 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
// This is loaded into chrome windows with the subscript loader. Wrap in
|
||||
// a block to prevent accidentally leaking globals onto `window`.
|
||||
{
|
||||
|
||||
/**
|
||||
* XUL progressmeter element.
|
||||
*/
|
||||
class MozProgressmeter extends MozXULElement {
|
||||
get mode() {
|
||||
return this.getAttribute("mode");
|
||||
}
|
||||
|
||||
set mode(val) {
|
||||
if (this.mode != val) {
|
||||
this.setAttribute("mode", val);
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
get value() {
|
||||
return this.getAttribute("value") || "0";
|
||||
}
|
||||
|
||||
set value(val) {
|
||||
let p = Math.round(val);
|
||||
let max = Math.round(this.max);
|
||||
if (p < 0) {
|
||||
p = 0;
|
||||
} else if (p > max) {
|
||||
p = max;
|
||||
}
|
||||
|
||||
let c = this.value;
|
||||
if (p != c) {
|
||||
let delta = p - c;
|
||||
if (delta < 0) {
|
||||
delta = -delta;
|
||||
}
|
||||
if (delta > 3 || p == 0 || p == max) {
|
||||
this.setAttribute("value", p);
|
||||
// Fire DOM event so that accessible value change events occur
|
||||
let event = document.createEvent("Events");
|
||||
event.initEvent("ValueChange", true, true);
|
||||
this.dispatchEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
get max() {
|
||||
return this.getAttribute("max") || "100";
|
||||
}
|
||||
|
||||
set max(val) {
|
||||
this.setAttribute("max", isNaN(val) ? 100 : Math.max(val, 1));
|
||||
this.value = this.value;
|
||||
return val;
|
||||
}
|
||||
|
||||
isUndetermined() {
|
||||
return this.getAttribute("mode") == "undetermined";
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
if (this.delayConnectedCallback()) {
|
||||
return;
|
||||
}
|
||||
this._initUI();
|
||||
}
|
||||
|
||||
static get observedAttributes() {
|
||||
return [ "mode" ];
|
||||
}
|
||||
|
||||
attributeChangedCallback(name, oldValue, newValue) {
|
||||
if (!this.isConnectedAndReady) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (name === "mode" && oldValue != newValue) {
|
||||
this._initUI();
|
||||
}
|
||||
}
|
||||
|
||||
_initUI() {
|
||||
let content = `
|
||||
<spacer class="progress-bar"/>
|
||||
<spacer class="progress-remainder"/>
|
||||
`;
|
||||
|
||||
this.textContent = "";
|
||||
this.appendChild(MozXULElement.parseXULToFragment(content));
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define("progressmeter", MozProgressmeter);
|
||||
|
||||
}
|
|
@ -32,8 +32,8 @@ master-password-warning = Please make sure you remember the Master Password you
|
|||
remove-password =
|
||||
.title = Remove Master Password
|
||||
remove-info =
|
||||
.label = You must enter your current password to proceed:
|
||||
.value = You must enter your current password to proceed:
|
||||
remove-warning1 = Your Master Password is used to protect sensitive information like site passwords.
|
||||
remove-warning2 = If you remove your Master Password your information will not be protected if your computer is compromised.
|
||||
remove-password-old-password =
|
||||
.label = Current password:
|
||||
.value = Current password:
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
<bindings id="addonBindings"
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
xmlns:xbl="http://www.mozilla.org/xbl"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml">
|
||||
|
||||
|
||||
<!-- Rating - displays current/average rating, allows setting user rating -->
|
||||
|
@ -129,8 +130,7 @@
|
|||
<xul:stack flex="1">
|
||||
<xul:hbox flex="1">
|
||||
<xul:hbox class="start-cap"/>
|
||||
<xul:progressmeter anonid="progress" class="progress" flex="1"
|
||||
min="0" max="100"/>
|
||||
<html:progress anonid="progress" class="progress" max="100"/>
|
||||
<xul:hbox class="end-cap"/>
|
||||
</xul:hbox>
|
||||
<xul:hbox class="status-container">
|
||||
|
@ -163,11 +163,11 @@
|
|||
</field>
|
||||
|
||||
<property name="progress">
|
||||
<getter><![CDATA[
|
||||
return this._progress.value;
|
||||
]]></getter>
|
||||
<setter><![CDATA[
|
||||
this._progress.value = val;
|
||||
// This property is always updated after maxProgress.
|
||||
if (this.getAttribute("mode") == "determined") {
|
||||
this._progress.value = val;
|
||||
}
|
||||
if (val == this._progress.max)
|
||||
this.setAttribute("complete", true);
|
||||
else
|
||||
|
@ -176,17 +176,14 @@
|
|||
</property>
|
||||
|
||||
<property name="maxProgress">
|
||||
<getter><![CDATA[
|
||||
return this._progress.max;
|
||||
]]></getter>
|
||||
<setter><![CDATA[
|
||||
if (val == -1) {
|
||||
this._progress.mode = "undetermined";
|
||||
this.setAttribute("mode", "undetermined");
|
||||
this._progress.removeAttribute("value");
|
||||
} else {
|
||||
this._progress.mode = "determined";
|
||||
this._progress.max = val;
|
||||
this.setAttribute("mode", "determined");
|
||||
this._progress.setAttribute("max", val);
|
||||
}
|
||||
this.setAttribute("mode", this._progress.mode);
|
||||
]]></setter>
|
||||
</property>
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<separator class="thin"/>
|
||||
|
||||
<groupbox>
|
||||
<caption data-l10n-id="remove-info"/>
|
||||
<label data-l10n-id="remove-info"/>
|
||||
|
||||
<hbox align="center">
|
||||
<label control="password" data-l10n-id="remove-password-old-password"/>
|
||||
|
|
|
@ -15,7 +15,6 @@ toolkit.jar:
|
|||
skin/classic/global/menulist.css (global/empty.css)
|
||||
skin/classic/global/numberbox.css (global/empty.css)
|
||||
skin/classic/global/popup.css (global/empty.css)
|
||||
skin/classic/global/progressmeter.css (global/empty.css)
|
||||
skin/classic/global/radio.css (global/empty.css)
|
||||
skin/classic/global/richlistbox.css (global/empty.css)
|
||||
skin/classic/global/scrollbox.css (global/empty.css)
|
||||
|
|
|
@ -18,7 +18,6 @@ toolkit.jar:
|
|||
* skin/classic/global/notification.css
|
||||
skin/classic/global/netError.css
|
||||
skin/classic/global/popup.css
|
||||
skin/classic/global/progressmeter.css
|
||||
skin/classic/global/radio.css
|
||||
skin/classic/global/richlistbox.css
|
||||
skin/classic/global/scrollbars.css (nativescrollbars.css)
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
progressmeter {
|
||||
-moz-appearance: progressbar;
|
||||
margin: 2px 4px;
|
||||
min-width: 128px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.progress-remainder[flex="100"],
|
||||
.progress-remainder[flex="0"] {
|
||||
background-image: none !important;
|
||||
-moz-appearance: none;
|
||||
}
|
|
@ -834,6 +834,7 @@ button.warning {
|
|||
}
|
||||
|
||||
.download-progress .progress {
|
||||
-moz-box-flex: 1;
|
||||
-moz-appearance: none;
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include jar.inc.mn
|
||||
|
||||
skin/classic/global/dialog.css (../../windows/global/dialog.css)
|
||||
skin/classic/global/progressmeter.css (../../windows/global/progressmeter.css)
|
||||
skin/classic/global/scrollbars.css (../../windows/global/xulscrollbars.css)
|
||||
skin/classic/global/tabprompts.css (../../windows/global/tabprompts.css)
|
||||
skin/classic/global/wizard.css (../../windows/global/wizard.css)
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* ===== progressmeter.css ==============================================
|
||||
== Styles used by the XUL progressmeter element.
|
||||
======================================================================= */
|
||||
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
/* ::::: progressmeter ::::: */
|
||||
|
||||
progressmeter {
|
||||
-moz-appearance: progressbar;
|
||||
margin: 2px 4px;
|
||||
border: 1px solid ThreeDShadow;
|
||||
background-color: -moz-Dialog;
|
||||
min-width: 128px;
|
||||
min-height: 15px;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
-moz-appearance: progresschunk;
|
||||
min-width: 0;
|
||||
background-color: ThreeDShadow;
|
||||
}
|
|
@ -176,26 +176,22 @@ nsNativeTheme::CheckIntAttr(nsIFrame* aFrame, nsAtom* aAtom, int32_t defaultValu
|
|||
double
|
||||
nsNativeTheme::GetProgressValue(nsIFrame* aFrame)
|
||||
{
|
||||
// When we are using the HTML progress element,
|
||||
// we can get the value from the IDL property.
|
||||
if (aFrame && aFrame->GetContent()->IsHTMLElement(nsGkAtoms::progress)) {
|
||||
return static_cast<HTMLProgressElement*>(aFrame->GetContent())->Value();
|
||||
if (!aFrame || !aFrame->GetContent()->IsHTMLElement(nsGkAtoms::progress)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (double)nsNativeTheme::CheckIntAttr(aFrame, nsGkAtoms::value, 0);
|
||||
return static_cast<HTMLProgressElement*>(aFrame->GetContent())->Value();
|
||||
}
|
||||
|
||||
/* static */
|
||||
double
|
||||
nsNativeTheme::GetProgressMaxValue(nsIFrame* aFrame)
|
||||
{
|
||||
// When we are using the HTML progress element,
|
||||
// we can get the max from the IDL property.
|
||||
if (aFrame && aFrame->GetContent()->IsHTMLElement(nsGkAtoms::progress)) {
|
||||
return static_cast<HTMLProgressElement*>(aFrame->GetContent())->Max();
|
||||
if (!aFrame || !aFrame->GetContent()->IsHTMLElement(nsGkAtoms::progress)) {
|
||||
return 100;
|
||||
}
|
||||
|
||||
return (double)std::max(nsNativeTheme::CheckIntAttr(aFrame, nsGkAtoms::max, 100), 1);
|
||||
return static_cast<HTMLProgressElement*>(aFrame->GetContent())->Max();
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -565,22 +561,16 @@ nsNativeTheme::IsNextToSelectedTab(nsIFrame* aFrame, int32_t aOffset)
|
|||
return (thisTabIndex - selectedTabIndex == aOffset);
|
||||
}
|
||||
|
||||
// progressbar:
|
||||
bool
|
||||
nsNativeTheme::IsIndeterminateProgress(nsIFrame* aFrame,
|
||||
EventStates aEventStates)
|
||||
{
|
||||
if (!aFrame || !aFrame->GetContent()|| !aFrame->GetContent()->IsElement())
|
||||
if (!aFrame || !aFrame->GetContent() ||
|
||||
!aFrame->GetContent()->IsHTMLElement(nsGkAtoms::progress)) {
|
||||
return false;
|
||||
|
||||
if (aFrame->GetContent()->IsHTMLElement(nsGkAtoms::progress)) {
|
||||
return aEventStates.HasState(NS_EVENT_STATE_INDETERMINATE);
|
||||
}
|
||||
|
||||
return aFrame->GetContent()->AsElement()->AttrValueIs(kNameSpaceID_None,
|
||||
nsGkAtoms::mode,
|
||||
NS_LITERAL_STRING("undetermined"),
|
||||
eCaseMatters);
|
||||
return aEventStates.HasState(NS_EVENT_STATE_INDETERMINATE);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче