merge mozilla-central to mozilla-inbound. r=merge a=merge

This commit is contained in:
Sebastian Hengst 2017-09-22 11:51:21 +02:00
Родитель 6ad441ca98 79326d87c8
Коммит 1867bfd2c5
904 изменённых файлов: 8554 добавлений и 35397 удалений

Просмотреть файл

@ -21,7 +21,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
CharsetMenu: "resource://gre/modules/CharsetMenu.jsm", CharsetMenu: "resource://gre/modules/CharsetMenu.jsm",
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm", PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
SyncedTabs: "resource://services-sync/SyncedTabs.jsm", SyncedTabs: "resource://services-sync/SyncedTabs.jsm",
ContextualIdentityService: "resource://gre/modules/ContextualIdentityService.jsm",
}); });
XPCOMUtils.defineLazyGetter(this, "CharsetBundle", function() { XPCOMUtils.defineLazyGetter(this, "CharsetBundle", function() {
@ -914,89 +913,6 @@ const CustomizableWidgets = [
let win = aEvent.view; let win = aEvent.view;
win.MailIntegration.sendLinkForBrowser(win.gBrowser.selectedBrowser) win.MailIntegration.sendLinkForBrowser(win.gBrowser.selectedBrowser)
} }
}, {
id: "containers-panelmenu",
type: "view",
viewId: "PanelUI-containers",
hasObserver: false,
onCreated(aNode) {
let doc = aNode.ownerDocument;
let win = doc.defaultView;
let items = doc.getElementById("PanelUI-containersItems");
let onItemCommand = function(aEvent) {
let item = aEvent.target;
if (item.hasAttribute("usercontextid")) {
let userContextId = parseInt(item.getAttribute("usercontextid"));
win.openUILinkIn(win.BROWSER_NEW_TAB_URL, "tab", {userContextId});
}
};
items.addEventListener("command", onItemCommand);
if (PrivateBrowsingUtils.isWindowPrivate(win)) {
aNode.setAttribute("disabled", "true");
}
this.updateVisibility(aNode);
if (!this.hasObserver) {
Services.prefs.addObserver("privacy.userContext.enabled", this, true);
this.hasObserver = true;
}
},
onViewShowing(aEvent) {
let doc = aEvent.target.ownerDocument;
let items = doc.getElementById("PanelUI-containersItems");
while (items.firstChild) {
items.firstChild.remove();
}
let fragment = doc.createDocumentFragment();
let bundle = doc.getElementById("bundle_browser");
ContextualIdentityService.getPublicIdentities().forEach(identity => {
let label = ContextualIdentityService.getUserContextLabel(identity.userContextId);
let item = doc.createElementNS(kNSXUL, "toolbarbutton");
item.setAttribute("label", label);
item.setAttribute("usercontextid", identity.userContextId);
item.setAttribute("class", "subviewbutton");
item.setAttribute("data-identity-color", identity.color);
item.setAttribute("data-identity-icon", identity.icon);
fragment.appendChild(item);
});
fragment.appendChild(doc.createElementNS(kNSXUL, "menuseparator"));
let item = doc.createElementNS(kNSXUL, "toolbarbutton");
item.setAttribute("label", bundle.getString("userContext.aboutPage.label"));
item.setAttribute("command", "Browser:OpenAboutContainers");
item.setAttribute("class", "subviewbutton");
fragment.appendChild(item);
items.appendChild(fragment);
},
updateVisibility(aNode) {
aNode.hidden = !Services.prefs.getBoolPref("privacy.userContext.enabled");
},
observe(aSubject, aTopic, aData) {
let {instances} = CustomizableUI.getWidget("containers-panelmenu");
for (let {node} of instances) {
if (node) {
this.updateVisibility(node);
}
}
},
QueryInterface: XPCOMUtils.generateQI([
Ci.nsISupportsWeakReference,
Ci.nsIObserver
]),
}]; }];
let preferencesButton = { let preferencesButton = {

Просмотреть файл

@ -76,9 +76,6 @@ paste-button.tooltiptext2 = Paste (%S)
feed-button.label = Subscribe feed-button.label = Subscribe
feed-button.tooltiptext2 = Subscribe to this page feed-button.tooltiptext2 = Subscribe to this page
containers-panelmenu.label = Open Container Tab
containers-panelmenu.tooltiptext = Open Container Tab
# LOCALIZATION NOTE (characterencoding-button2.label): The \u00ad text at the beginning # LOCALIZATION NOTE (characterencoding-button2.label): The \u00ad text at the beginning
# of the string is used to disable auto hyphenation on the button text when it is displayed # of the string is used to disable auto hyphenation on the button text when it is displayed
# in the menu panel. # in the menu panel.

Просмотреть файл

@ -92,7 +92,6 @@ XPCOMUtils.defineLazyGetter(this, "PALETTE_ITEMS", function() {
"developer-button", "developer-button",
"feed-button", "feed-button",
"email-link-button", "email-link-button",
"containers-panelmenu",
...LEGACY_PANEL_PLACEMENTS, ...LEGACY_PANEL_PLACEMENTS,
"characterencoding-button", "characterencoding-button",
]; ];

Просмотреть файл

@ -1,6 +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/. -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path fill="context-fill" fill-opacity="context-fill-opacity" d="M12 4H4v4h8zm-2 2.75a.25.25 0 0 1-.25.25h-3.5A.25.25 0 0 1 6 6.75v-.5A.25.25 0 0 1 6.25 6h3.5a.25.25 0 0 1 .25.25zM12 9H4v4h8zm-2 2.75a.25.25 0 0 1-.25.25h-3.5a.25.25 0 0 1-.25-.25v-.5a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25zm3.854-9.9L13 1H3l-.854.853A.5.5 0 0 0 2 2.207V14a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V2.207a.5.5 0 0 0-.146-.354zM13 14H3V3h10z"/>
</svg>

До

Ширина:  |  Высота:  |  Размер: 726 B

Просмотреть файл

@ -128,7 +128,6 @@
skin/classic/browser/chevron-animation.svg (../shared/icons/chevron-animation.svg) skin/classic/browser/chevron-animation.svg (../shared/icons/chevron-animation.svg)
skin/classic/browser/check.svg (../shared/icons/check.svg) skin/classic/browser/check.svg (../shared/icons/check.svg)
skin/classic/browser/check-animation.svg (../shared/icons/check-animation.svg) skin/classic/browser/check-animation.svg (../shared/icons/check-animation.svg)
skin/classic/browser/containers.svg (../shared/icons/containers.svg)
skin/classic/browser/customize.svg (../shared/icons/customize.svg) skin/classic/browser/customize.svg (../shared/icons/customize.svg)
skin/classic/browser/developer.svg (../shared/icons/developer.svg) skin/classic/browser/developer.svg (../shared/icons/developer.svg)
skin/classic/browser/device-mobile.svg (../shared/icons/device-mobile.svg) skin/classic/browser/device-mobile.svg (../shared/icons/device-mobile.svg)

Просмотреть файл

@ -217,10 +217,6 @@ toolbar[brighttext] {
list-style-image: url("chrome://browser/skin/synced-tabs.svg"); list-style-image: url("chrome://browser/skin/synced-tabs.svg");
} }
#containers-panelmenu {
list-style-image: url("chrome://browser/skin/containers.svg");
}
#feed-button { #feed-button {
list-style-image: url("chrome://browser/skin/feed.svg"); list-style-image: url("chrome://browser/skin/feed.svg");
} }

Просмотреть файл

@ -1821,7 +1821,7 @@ MediaFormatReader::NotifyError(TrackType aTrack, const MediaResult& aError)
!aError.GPUCrashTimeStamp().IsNull()) { !aError.GPUCrashTimeStamp().IsNull()) {
GPUProcessCrashTelemetryLogger::RecordGPUCrashData(mMediaDecoderOwnerID, GPUProcessCrashTelemetryLogger::RecordGPUCrashData(mMediaDecoderOwnerID,
&decoder, decoder.mDecoder.get(),
aError.GPUCrashTimeStamp(), aError.GPUCrashTimeStamp(),
TimeStamp::Now()); TimeStamp::Now());
} }
@ -2024,7 +2024,7 @@ MediaFormatReader::DecodeDemuxedSamples(TrackType aTrack,
// frame, report the recovery time telemetry. // frame, report the recovery time telemetry.
if (aTrack == TrackType::kVideoTrack) { if (aTrack == TrackType::kVideoTrack) {
GPUProcessCrashTelemetryLogger::ReportTelemetry( GPUProcessCrashTelemetryLogger::ReportTelemetry(
mMediaDecoderOwnerID, &decoder); mMediaDecoderOwnerID, decoder.mDecoder.get());
} }
}, },
[self, this, aTrack, &decoder](const MediaResult& aError) { [self, this, aTrack, &decoder](const MediaResult& aError) {

Просмотреть файл

@ -773,12 +773,10 @@ PropertySupportsVariant(nsCSSPropertyID aPropertyID, uint32_t aVariant)
case eCSSProperty_background_position_x: case eCSSProperty_background_position_x:
case eCSSProperty_background_position_y: case eCSSProperty_background_position_y:
case eCSSProperty_background_size: case eCSSProperty_background_size:
#ifdef MOZ_ENABLE_MASK_AS_SHORTHAND
case eCSSProperty_mask_position: case eCSSProperty_mask_position:
case eCSSProperty_mask_position_x: case eCSSProperty_mask_position_x:
case eCSSProperty_mask_position_y: case eCSSProperty_mask_position_y:
case eCSSProperty_mask_size: case eCSSProperty_mask_size:
#endif
case eCSSProperty_grid_auto_columns: case eCSSProperty_grid_auto_columns:
case eCSSProperty_grid_auto_rows: case eCSSProperty_grid_auto_rows:
case eCSSProperty_grid_template_columns: case eCSSProperty_grid_template_columns:

Просмотреть файл

@ -441,11 +441,7 @@ Declaration::GetImageLayerValue(
} }
// This layer is an mask layer // This layer is an mask layer
} else { } else {
#ifdef MOZ_ENABLE_MASK_AS_SHORTHAND
MOZ_ASSERT(aTable == nsStyleImageLayers::kMaskLayerTable); MOZ_ASSERT(aTable == nsStyleImageLayers::kMaskLayerTable);
#else
MOZ_ASSERT_UNREACHABLE("Should never get here when mask-as-shorthand is disable");
#endif
if (repeat || positionX || positionY || clip || origin || size || if (repeat || positionX || positionY || clip || origin || size ||
composite || mode) { composite || mode) {
// Uneven length lists, so can't be serialized as shorthand. // Uneven length lists, so can't be serialized as shorthand.
@ -466,11 +462,7 @@ Declaration::GetImageLayerValue(
} }
// This layer is an mask layer // This layer is an mask layer
} else { } else {
#ifdef MOZ_ENABLE_MASK_AS_SHORTHAND
MOZ_ASSERT(aTable == nsStyleImageLayers::kMaskLayerTable); MOZ_ASSERT(aTable == nsStyleImageLayers::kMaskLayerTable);
#else
MOZ_ASSERT_UNREACHABLE("Should never get here when mask-as-shorthand is disable");
#endif
if (!repeat || !positionX || !positionY || !clip || !origin || !size || if (!repeat || !positionX || !positionY || !clip || !origin || !size ||
!composite || !mode) { !composite || !mode) {
// Uneven length lists, so can't be serialized as shorthand. // Uneven length lists, so can't be serialized as shorthand.
@ -800,7 +792,6 @@ Declaration::GetPropertyValueInternal(
nsStyleImageLayers::kBackgroundLayerTable); nsStyleImageLayers::kBackgroundLayerTable);
break; break;
} }
#ifdef MOZ_ENABLE_MASK_AS_SHORTHAND
case eCSSProperty_mask: { case eCSSProperty_mask: {
GetImageLayerValue(data, aValue, nsStyleImageLayers::kMaskLayerTable); GetImageLayerValue(data, aValue, nsStyleImageLayers::kMaskLayerTable);
break; break;
@ -810,7 +801,6 @@ Declaration::GetPropertyValueInternal(
nsStyleImageLayers::kMaskLayerTable); nsStyleImageLayers::kMaskLayerTable);
break; break;
} }
#endif
case eCSSProperty_font: { case eCSSProperty_font: {
// systemFont might not be present; other values are guaranteed to be // systemFont might not be present; other values are guaranteed to be
// available based on the shorthand check at the beginning of the // available based on the shorthand check at the beginning of the

Просмотреть файл

@ -23,6 +23,12 @@ args = ["-DOS_LINUX=1"]
"arch=x86" = ["-m32"] "arch=x86" = ["-m32"]
"arch=x86_64" = ["-m64"] "arch=x86_64" = ["-m64"]
[build."os=android"]
args = ["-DOS_ANDROID=1"]
"arch=aarch64" = ["--target=aarch64-linux-android"]
"arch=arm" = ["--target=armv7-linux-androideabi"]
"arch=x86" = ["--target=i686-linux-android"]
[build."os=windows"."env=msvc"] [build."os=windows"."env=msvc"]
args = [ args = [
"-DOS_WIN=1", "-DWIN32=1", "-DOS_WIN=1", "-DWIN32=1",

Просмотреть файл

@ -4545,13 +4545,14 @@ StyleAnimationValue::ExtractComputedValue(nsCSSPropertyID aProperty,
ExtractImageLayerPositionYList(layers, aComputedValue); ExtractImageLayerPositionYList(layers, aComputedValue);
break; break;
} }
#ifdef MOZ_ENABLE_MASK_AS_SHORTHAND
case eCSSProperty_mask_position_x: { case eCSSProperty_mask_position_x: {
const nsStyleImageLayers& layers = const nsStyleImageLayers& layers =
static_cast<const nsStyleSVGReset*>(styleStruct)->mMask; static_cast<const nsStyleSVGReset*>(styleStruct)->mMask;
ExtractImageLayerPositionXList(layers, aComputedValue); ExtractImageLayerPositionXList(layers, aComputedValue);
break; break;
} }
case eCSSProperty_mask_position_y: { case eCSSProperty_mask_position_y: {
const nsStyleImageLayers& layers = const nsStyleImageLayers& layers =
static_cast<const nsStyleSVGReset*>(styleStruct)->mMask; static_cast<const nsStyleSVGReset*>(styleStruct)->mMask;
@ -4559,21 +4560,20 @@ StyleAnimationValue::ExtractComputedValue(nsCSSPropertyID aProperty,
break; break;
} }
#endif
case eCSSProperty_background_size: { case eCSSProperty_background_size: {
const nsStyleImageLayers& layers = const nsStyleImageLayers& layers =
static_cast<const nsStyleBackground*>(styleStruct)->mImage; static_cast<const nsStyleBackground*>(styleStruct)->mImage;
ExtractImageLayerSizePairList(layers, aComputedValue); ExtractImageLayerSizePairList(layers, aComputedValue);
break; break;
} }
#ifdef MOZ_ENABLE_MASK_AS_SHORTHAND
case eCSSProperty_mask_size: { case eCSSProperty_mask_size: {
const nsStyleImageLayers& layers = const nsStyleImageLayers& layers =
static_cast<const nsStyleSVGReset*>(styleStruct)->mMask; static_cast<const nsStyleSVGReset*>(styleStruct)->mMask;
ExtractImageLayerSizePairList(layers, aComputedValue); ExtractImageLayerSizePairList(layers, aComputedValue);
break; break;
} }
#endif
case eCSSProperty_clip_path: { case eCSSProperty_clip_path: {
const nsStyleSVGReset* svgReset = const nsStyleSVGReset* svgReset =

Просмотреть файл

@ -61,7 +61,6 @@ TryToStartImageLoadOnValue(const nsCSSValue& aValue, nsIDocument* aDocument,
MOZ_ASSERT(aDocument); MOZ_ASSERT(aDocument);
if (aValue.GetUnit() == eCSSUnit_URL) { if (aValue.GetUnit() == eCSSUnit_URL) {
#ifdef MOZ_ENABLE_MASK_AS_SHORTHAND
// The 'mask-image' property accepts local reference URIs. // The 'mask-image' property accepts local reference URIs.
// For example, // For example,
// mask-image: url(#mask_id); // refer to a SVG mask element, whose id is // mask-image: url(#mask_id); // refer to a SVG mask element, whose id is
@ -94,7 +93,7 @@ TryToStartImageLoadOnValue(const nsCSSValue& aValue, nsIDocument* aDocument,
} }
} }
} }
#endif
aValue.StartImageLoad(aDocument); aValue.StartImageLoad(aDocument);
if (aForTokenStream && aContext) { if (aForTokenStream && aContext) {
CSSVariableImageTable::Add(aContext, aProperty, CSSVariableImageTable::Add(aContext, aProperty,

Просмотреть файл

@ -11802,7 +11802,6 @@ CSSParserImpl::ParsePropertyByFunction(nsCSSPropertyID aPropID)
return ParsePaintOrder(); return ParsePaintOrder();
case eCSSProperty_scroll_snap_type: case eCSSProperty_scroll_snap_type:
return ParseScrollSnapType(); return ParseScrollSnapType();
#ifdef MOZ_ENABLE_MASK_AS_SHORTHAND
case eCSSProperty_mask: case eCSSProperty_mask:
return ParseImageLayers(nsStyleImageLayers::kMaskLayerTable); return ParseImageLayers(nsStyleImageLayers::kMaskLayerTable);
case eCSSProperty_mask_repeat: case eCSSProperty_mask_repeat:
@ -11815,7 +11814,6 @@ CSSParserImpl::ParsePropertyByFunction(nsCSSPropertyID aPropID)
aPropID == eCSSProperty_mask_position_x); aPropID == eCSSProperty_mask_position_x);
case eCSSProperty_mask_size: case eCSSProperty_mask_size:
return ParseImageLayerSize(eCSSProperty_mask_size); return ParseImageLayerSize(eCSSProperty_mask_size);
#endif
case eCSSProperty__webkit_text_stroke: case eCSSProperty__webkit_text_stroke:
return ParseWebkitTextStroke(); return ParseWebkitTextStroke();
case eCSSProperty_all: case eCSSProperty_all:

Просмотреть файл

@ -549,8 +549,6 @@ CSS_PROP_ALIAS(-webkit-user-select,
_moz_user_select, _moz_user_select,
WebkitUserSelect, WebkitUserSelect,
WEBKIT_PREFIX_PREF) WEBKIT_PREFIX_PREF)
#ifdef MOZ_ENABLE_MASK_AS_SHORTHAND
CSS_PROP_ALIAS(-webkit-mask, CSS_PROP_ALIAS(-webkit-mask,
_webkit_mask, _webkit_mask,
mask, mask,
@ -601,5 +599,4 @@ CSS_PROP_ALIAS(-webkit-mask-size,
mask_size, mask_size,
WebkitMaskSize, WebkitMaskSize,
WEBKIT_PREFIX_PREF) WEBKIT_PREFIX_PREF)
#endif
#undef WEBKIT_PREFIX_PREF #undef WEBKIT_PREFIX_PREF

Просмотреть файл

@ -2707,19 +2707,6 @@ CSS_PROP_SVG(
nullptr, nullptr,
CSS_PROP_NO_OFFSET, CSS_PROP_NO_OFFSET,
eStyleAnimType_Discrete) eStyleAnimType_Discrete)
#ifndef MOZ_ENABLE_MASK_AS_SHORTHAND
CSS_PROP_SVGRESET(
mask,
mask,
Mask,
CSS_PROPERTY_PARSE_VALUE |
CSS_PROPERTY_CREATES_STACKING_CONTEXT,
"",
VARIANT_HUO,
nullptr,
CSS_PROP_NO_OFFSET,
eStyleAnimType_Discrete)
#else
CSS_PROP_SHORTHAND( CSS_PROP_SHORTHAND(
mask, mask,
mask, mask,
@ -2838,7 +2825,6 @@ CSS_PROP_SVGRESET(
kImageLayerSizeKTable, kImageLayerSizeKTable,
CSS_PROP_NO_OFFSET, CSS_PROP_NO_OFFSET,
eStyleAnimType_Custom) eStyleAnimType_Custom)
#endif // MOZ_ENABLE_MASK_AS_SHORTHAND
CSS_PROP_SVGRESET( CSS_PROP_SVGRESET(
mask-type, mask-type,
mask_type, mask_type,

Просмотреть файл

@ -3003,7 +3003,7 @@ static const nsCSSPropertyID gScrollSnapTypeSubpropTable[] = {
eCSSProperty_scroll_snap_type_y, eCSSProperty_scroll_snap_type_y,
eCSSProperty_UNKNOWN eCSSProperty_UNKNOWN
}; };
#ifdef MOZ_ENABLE_MASK_AS_SHORTHAND
static const nsCSSPropertyID gMaskSubpropTable[] = { static const nsCSSPropertyID gMaskSubpropTable[] = {
eCSSProperty_mask_image, eCSSProperty_mask_image,
eCSSProperty_mask_repeat, eCSSProperty_mask_repeat,
@ -3016,12 +3016,13 @@ static const nsCSSPropertyID gMaskSubpropTable[] = {
eCSSProperty_mask_mode, eCSSProperty_mask_mode,
eCSSProperty_UNKNOWN eCSSProperty_UNKNOWN
}; };
static const nsCSSPropertyID gMaskPositionSubpropTable[] = { static const nsCSSPropertyID gMaskPositionSubpropTable[] = {
eCSSProperty_mask_position_x, eCSSProperty_mask_position_x,
eCSSProperty_mask_position_y, eCSSProperty_mask_position_y,
eCSSProperty_UNKNOWN eCSSProperty_UNKNOWN
}; };
#endif
// FIXME: mask-border tables should be added when we implement // FIXME: mask-border tables should be added when we implement
// mask-border properties. // mask-border properties.

Просмотреть файл

@ -6508,7 +6508,6 @@ nsComputedDOMStyle::DoGetMask()
return val.forget(); return val.forget();
} }
#ifdef MOZ_ENABLE_MASK_AS_SHORTHAND
already_AddRefed<CSSValue> already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetMaskClip() nsComputedDOMStyle::DoGetMaskClip()
{ {
@ -6586,7 +6585,6 @@ nsComputedDOMStyle::DoGetMaskSize()
const nsStyleImageLayers& layers = StyleSVGReset()->mMask; const nsStyleImageLayers& layers = StyleSVGReset()->mMask;
return DoGetImageLayerSize(layers); return DoGetImageLayerSize(layers);
} }
#endif
already_AddRefed<CSSValue> already_AddRefed<CSSValue>
nsComputedDOMStyle::DoGetMaskType() nsComputedDOMStyle::DoGetMaskType()

Просмотреть файл

@ -346,7 +346,6 @@ private:
/* Mask properties */ /* Mask properties */
already_AddRefed<CSSValue> DoGetMask(); already_AddRefed<CSSValue> DoGetMask();
#ifdef MOZ_ENABLE_MASK_AS_SHORTHAND
already_AddRefed<CSSValue> DoGetMaskImage(); already_AddRefed<CSSValue> DoGetMaskImage();
already_AddRefed<CSSValue> DoGetMaskPosition(); already_AddRefed<CSSValue> DoGetMaskPosition();
already_AddRefed<CSSValue> DoGetMaskPositionX(); already_AddRefed<CSSValue> DoGetMaskPositionX();
@ -357,7 +356,7 @@ private:
already_AddRefed<CSSValue> DoGetMaskSize(); already_AddRefed<CSSValue> DoGetMaskSize();
already_AddRefed<CSSValue> DoGetMaskMode(); already_AddRefed<CSSValue> DoGetMaskMode();
already_AddRefed<CSSValue> DoGetMaskComposite(); already_AddRefed<CSSValue> DoGetMaskComposite();
#endif
/* Padding properties */ /* Padding properties */
already_AddRefed<CSSValue> DoGetPaddingTop(); already_AddRefed<CSSValue> DoGetPaddingTop();
already_AddRefed<CSSValue> DoGetPaddingBottom(); already_AddRefed<CSSValue> DoGetPaddingBottom();

Просмотреть файл

@ -340,7 +340,6 @@ COMPUTED_STYLE_PROP(marker_end, MarkerEnd)
COMPUTED_STYLE_PROP(marker_mid, MarkerMid) COMPUTED_STYLE_PROP(marker_mid, MarkerMid)
COMPUTED_STYLE_PROP(marker_start, MarkerStart) COMPUTED_STYLE_PROP(marker_start, MarkerStart)
COMPUTED_STYLE_PROP(mask, Mask) COMPUTED_STYLE_PROP(mask, Mask)
#ifdef MOZ_ENABLE_MASK_AS_SHORTHAND
COMPUTED_STYLE_PROP(mask_clip, MaskClip) COMPUTED_STYLE_PROP(mask_clip, MaskClip)
COMPUTED_STYLE_PROP(mask_composite, MaskComposite) COMPUTED_STYLE_PROP(mask_composite, MaskComposite)
COMPUTED_STYLE_PROP(mask_image, MaskImage) COMPUTED_STYLE_PROP(mask_image, MaskImage)
@ -351,7 +350,6 @@ COMPUTED_STYLE_PROP(mask_position_x, MaskPositionX)
COMPUTED_STYLE_PROP(mask_position_y, MaskPositionY) COMPUTED_STYLE_PROP(mask_position_y, MaskPositionY)
COMPUTED_STYLE_PROP(mask_repeat, MaskRepeat) COMPUTED_STYLE_PROP(mask_repeat, MaskRepeat)
COMPUTED_STYLE_PROP(mask_size, MaskSize) COMPUTED_STYLE_PROP(mask_size, MaskSize)
#endif
COMPUTED_STYLE_PROP(mask_type, MaskType) COMPUTED_STYLE_PROP(mask_type, MaskType)
COMPUTED_STYLE_PROP(paint_order, PaintOrder) COMPUTED_STYLE_PROP(paint_order, PaintOrder)
COMPUTED_STYLE_PROP(shape_rendering, ShapeRendering) COMPUTED_STYLE_PROP(shape_rendering, ShapeRendering)

Просмотреть файл

@ -10146,7 +10146,6 @@ nsRuleNode::ComputeSVGResetData(void* aStartStruct,
parentSVGReset->mMaskType, parentSVGReset->mMaskType,
NS_STYLE_MASK_TYPE_LUMINANCE); NS_STYLE_MASK_TYPE_LUMINANCE);
#ifdef MOZ_ENABLE_MASK_AS_SHORTHAND
uint32_t maxItemCount = 1; uint32_t maxItemCount = 1;
bool rebuild = false; bool rebuild = false;
@ -10246,21 +10245,6 @@ nsRuleNode::ComputeSVGResetData(void* aStartStruct,
if (rebuild) { if (rebuild) {
FillAllBackgroundLists(svgReset->mMask, maxItemCount); FillAllBackgroundLists(svgReset->mMask, maxItemCount);
} }
#else
// mask: none | <url>
const nsCSSValue* maskValue = aRuleData->ValueForMask();
if (eCSSUnit_URL == maskValue->GetUnit()) {
svgReset->mMask.mLayers[0].mSourceURI = maskValue->GetURLStructValue();
} else if (eCSSUnit_None == maskValue->GetUnit() ||
eCSSUnit_Initial == maskValue->GetUnit() ||
eCSSUnit_Unset == maskValue->GetUnit()) {
svgReset->mMask.mLayers[0].mSourceURI = nullptr;
} else if (eCSSUnit_Inherit == maskValue->GetUnit()) {
conditions.SetUncacheable();
svgReset->mMask.mLayers[0].mSourceURI =
parentSVGReset->mMask.mLayers[0].mSourceURI;
}
#endif
COMPUTE_END_RESET(SVGReset, svgReset) COMPUTE_END_RESET(SVGReset, svgReset)
} }

Просмотреть файл

@ -230,67 +230,6 @@ enum class StyleOrient : uint8_t {
Vertical, Vertical,
}; };
// Azimuth - See nsStyleAural
#define NS_STYLE_AZIMUTH_LEFT_SIDE 0x00
#define NS_STYLE_AZIMUTH_FAR_LEFT 0x01
#define NS_STYLE_AZIMUTH_LEFT 0x02
#define NS_STYLE_AZIMUTH_CENTER_LEFT 0x03
#define NS_STYLE_AZIMUTH_CENTER 0x04
#define NS_STYLE_AZIMUTH_CENTER_RIGHT 0x05
#define NS_STYLE_AZIMUTH_RIGHT 0x06
#define NS_STYLE_AZIMUTH_FAR_RIGHT 0x07
#define NS_STYLE_AZIMUTH_RIGHT_SIDE 0x08
#define NS_STYLE_AZIMUTH_BEHIND 0x80 // bits
#define NS_STYLE_AZIMUTH_LEFTWARDS 0x10 // bits
#define NS_STYLE_AZIMUTH_RIGHTWARDS 0x20 // bits
// See nsStyleAural
#define NS_STYLE_ELEVATION_BELOW 1
#define NS_STYLE_ELEVATION_LEVEL 2
#define NS_STYLE_ELEVATION_ABOVE 3
#define NS_STYLE_ELEVATION_HIGHER 4
#define NS_STYLE_ELEVATION_LOWER 5
// See nsStyleAural
#define NS_STYLE_PITCH_X_LOW 1
#define NS_STYLE_PITCH_LOW 2
#define NS_STYLE_PITCH_MEDIUM 3
#define NS_STYLE_PITCH_HIGH 4
#define NS_STYLE_PITCH_X_HIGH 5
// See nsStyleAural
#define NS_STYLE_SPEAK_NONE 0
#define NS_STYLE_SPEAK_NORMAL 1
#define NS_STYLE_SPEAK_SPELL_OUT 2
// See nsStyleAural
#define NS_STYLE_SPEAK_HEADER_ONCE 0
#define NS_STYLE_SPEAK_HEADER_ALWAYS 1
// See nsStyleAural
#define NS_STYLE_SPEAK_NUMERAL_DIGITS 0
#define NS_STYLE_SPEAK_NUMERAL_CONTINUOUS 1
// See nsStyleAural
#define NS_STYLE_SPEAK_PUNCTUATION_NONE 0
#define NS_STYLE_SPEAK_PUNCTUATION_CODE 1
// See nsStyleAural
#define NS_STYLE_SPEECH_RATE_X_SLOW 0
#define NS_STYLE_SPEECH_RATE_SLOW 1
#define NS_STYLE_SPEECH_RATE_MEDIUM 2
#define NS_STYLE_SPEECH_RATE_FAST 3
#define NS_STYLE_SPEECH_RATE_X_FAST 4
#define NS_STYLE_SPEECH_RATE_FASTER 10
#define NS_STYLE_SPEECH_RATE_SLOWER 11
// See nsStyleAural
#define NS_STYLE_VOLUME_SILENT 0
#define NS_STYLE_VOLUME_X_SOFT 1
#define NS_STYLE_VOLUME_SOFT 2
#define NS_STYLE_VOLUME_MEDIUM 3
#define NS_STYLE_VOLUME_LOUD 4
#define NS_STYLE_VOLUME_X_LOUD 5
// See nsStyleColor // See nsStyleColor
#define NS_STYLE_COLOR_INHERIT_FROM_BODY 2 /* Can't come from CSS directly */ #define NS_STYLE_COLOR_INHERIT_FROM_BODY 2 /* Can't come from CSS directly */

Просмотреть файл

@ -2637,7 +2637,6 @@ const nsCSSPropertyID nsStyleImageLayers::kBackgroundLayerTable[] = {
eCSSProperty_UNKNOWN // composite eCSSProperty_UNKNOWN // composite
}; };
#ifdef MOZ_ENABLE_MASK_AS_SHORTHAND
const nsCSSPropertyID nsStyleImageLayers::kMaskLayerTable[] = { const nsCSSPropertyID nsStyleImageLayers::kMaskLayerTable[] = {
eCSSProperty_mask, // shorthand eCSSProperty_mask, // shorthand
eCSSProperty_UNKNOWN, // color eCSSProperty_UNKNOWN, // color
@ -2652,7 +2651,6 @@ const nsCSSPropertyID nsStyleImageLayers::kMaskLayerTable[] = {
eCSSProperty_mask_mode, // maskMode eCSSProperty_mask_mode, // maskMode
eCSSProperty_mask_composite // composite eCSSProperty_mask_composite // composite
}; };
#endif
nsStyleImageLayers::nsStyleImageLayers(nsStyleImageLayers::LayerType aType) nsStyleImageLayers::nsStyleImageLayers(nsStyleImageLayers::LayerType aType)
: mAttachmentCount(1) : mAttachmentCount(1)

Просмотреть файл

@ -124,8 +124,6 @@ TEST_HARNESS_FILES.testing.mochitest.tests.layout.style.test['css-visited'] += [
] ]
DEFINES['MOZILLA_INTERNAL_API'] = True DEFINES['MOZILLA_INTERNAL_API'] = True
if CONFIG['MOZ_ENABLE_MASK_AS_SHORTHAND']:
HOST_DEFINES['MOZ_ENABLE_MASK_AS_SHORTHAND'] = True
if CONFIG['COMPILE_ENVIRONMENT']: if CONFIG['COMPILE_ENVIRONMENT']:
GENERATED_FILES += ['css_properties.js'] GENERATED_FILES += ['css_properties.js']

Просмотреть файл

@ -2040,6 +2040,265 @@ var gCSSProperties = {
], ],
invalid_values: [ "5", "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ], invalid_values: [ "5", "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ],
}, },
"mask": {
domProp: "mask",
inherited: false,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
/* FIXME: All mask-border-* should be added when we implement them. */
subproperties: ["mask-clip", "mask-image", "mask-mode", "mask-origin", "mask-position-x", "mask-position-y", "mask-repeat", "mask-size" , "mask-composite"],
initial_values: [ "match-source", "none", "repeat", "add", "0% 0%", "top left", "0% 0% / auto", "top left / auto", "left top / auto", "0% 0% / auto auto",
"top left none", "left top none", "none left top", "none top left", "none 0% 0%", "top left / auto none", "left top / auto none",
"top left / auto auto none",
"match-source none repeat add top left", "top left repeat none add", "none repeat add top left / auto", "top left / auto repeat none add match-source", "none repeat add 0% 0% / auto auto match-source",
"border-box", "border-box border-box" ],
other_values: [
"none alpha repeat add left top",
"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
"no-repeat url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==') alpha left top add",
"repeat-x",
"repeat-y",
"no-repeat",
"none repeat-y alpha add 0% 0%",
"subtract",
"0% top subtract alpha repeat none",
"top",
"left",
"50% 50%",
"center",
"top / 100px",
"left / contain",
"left / cover",
"10px / 10%",
"10em / calc(20px)",
"top left / 100px 100px",
"top left / 100px auto",
"top left / 100px 10%",
"top left / 100px calc(20px)",
"bottom right add none alpha repeat",
"50% alpha",
"alpha 50%",
"50%",
"url(#mymask)",
"radial-gradient(at 10% bottom, #ffffff, black) add no-repeat",
"repeating-radial-gradient(at 10% bottom, #ffffff, black) no-repeat",
"-moz-element(#test) alpha",
/* multiple mask-image */
"url(404.png), url(404.png)",
"repeat-x, subtract, none",
"0% top url(404.png), url(404.png) 50% top",
"subtract repeat-y top left url(404.png), repeat-x alpha",
"top left / contain, bottom right / cover",
/* test cases with clip+origin in the shorthand */
"url(404.png) alpha padding-box",
"url(404.png) border-box alpha",
"content-box url(404.png)",
"url(404.png) alpha padding-box padding-box",
"url(404.png) alpha padding-box border-box",
"content-box border-box url(404.png)",
"alpha padding-box url(404.png) border-box",
"alpha padding-box url(404.png) padding-box",
],
invalid_values: [
/* mixes with keywords have to be in correct order */
"50% left", "top 50%",
/* no quirks mode colors */
"radial-gradient(at 10% bottom, ffffff, black) add no-repeat",
/* no quirks mode lengths */
"linear-gradient(red -99, yellow, green, blue 120%)",
/* bug 258080: don't accept background-position separated */
"left url(404.png) top", "top url(404.png) left",
"-moz-element(#a rubbish)",
"left top / match-source"
]
},
"mask-clip": {
domProp: "maskClip",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "border-box" ],
other_values: [ "content-box", "fill-box", "stroke-box", "view-box", "no-clip", "padding-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ],
invalid_values: [ "content-box content-box", "margin-box" ]
},
"mask-composite": {
domProp: "maskComposite",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "add" ],
other_values: [ "subtract", "intersect", "exclude", "add, add", "subtract, intersect", "subtract, subtract, add"],
invalid_values: [ "add subtract", "intersect exclude" ]
},
"mask-image": {
domProp: "maskImage",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "none" ],
other_values: [
"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
"none, none",
"none, none, none, none, none",
"url(#mymask)",
"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
"none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
].concat(validGradientAndElementValues),
invalid_values: [
].concat(invalidGradientAndElementValues),
unbalanced_values: [
].concat(unbalancedGradientAndElementValues)
},
"mask-mode": {
domProp: "maskMode",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "match-source" ],
other_values: [ "alpha", "luminance", "match-source, match-source", "match-source, alpha", "alpha, luminance, match-source"],
invalid_values: [ "match-source match-source", "alpha match-source" ]
},
"mask-origin": {
domProp: "maskOrigin",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "border-box" ],
other_values: [ "padding-box", "content-box", "fill-box", "stroke-box", "view-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ],
invalid_values: [ "padding-box padding-box", "no-clip", "margin-box" ]
},
"mask-position": {
domProp: "maskPosition",
inherited: false,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
initial_values: [ "top 0% left 0%", "top 0% left", "top left", "left top", "0% 0%", "0% top", "left 0%" ],
other_values: [ "top", "left", "right", "bottom", "center", "center bottom", "bottom center", "center right", "right center", "center top", "top center", "center left", "left center", "right bottom", "bottom right", "50%", "top left, top left", "top left, top right", "top right, top left", "left top, 0% 0%", "10% 20%, 30%, 40%", "top left, bottom right", "right bottom, left top", "0%", "0px", "30px", "0%, 10%, 20%, 30%", "top, top, top, top, top",
"calc(20px)",
"calc(20px) 10px",
"10px calc(20px)",
"calc(20px) 25%",
"25% calc(20px)",
"calc(20px) calc(20px)",
"calc(20px + 1em) calc(20px / 2)",
"calc(20px + 50%) calc(50% - 10px)",
"calc(-20px) calc(-50%)",
"calc(-20%) calc(-50%)",
"0px 0px",
"right 20px top 60px",
"right 20px bottom 60px",
"left 20px top 60px",
"left 20px bottom 60px",
"right -50px top -50px",
"left -50px bottom -50px",
"right 20px top -50px",
"right -20px top 50px",
"right 3em bottom 10px",
"bottom 3em right 10px",
"top 3em right 10px",
"left 15px",
"10px top",
"left top 15px",
"left 10px top",
"left 20%",
"right 20%"
],
subproperties: [ "mask-position-x", "mask-position-y" ],
invalid_values: [ "center 10px center 4px", "center 10px center",
"top 20%", "bottom 20%", "50% left", "top 50%",
"50% bottom 10%", "right 10% 50%", "left right",
"top bottom", "left 10% right",
"top 20px bottom 20px", "left left",
"0px calc(0px + rubbish)"],
},
"mask-position-x": {
domProp: "maskPositionX",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "left", "0%" ],
other_values: [ "right", "center", "50%", "center, center", "center, right", "right, center", "center, 50%", "10%, 20%, 40%", "1px", "30px", "50%, 10%, 20%, 30%", "center, center, center, center, center",
"calc(20px)",
"calc(20px + 1em)",
"calc(20px / 2)",
"calc(20px + 50%)",
"calc(50% - 10px)",
"calc(-20px)",
"calc(-50%)",
"calc(-20%)",
"right 20px",
"left 20px",
"right -50px",
"left -50px",
"right 20px",
"right 3em",
],
invalid_values: [ "center 10px", "right 10% 50%", "left right", "left left",
"bottom 20px", "top 10%", "bottom 3em",
"top", "bottom", "top, top", "top, bottom", "bottom, top", "top, 0%", "top, top, top, top, top",
"calc(0px + rubbish)", "center 0%"],
},
"mask-position-y": {
domProp: "maskPositionY",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "top", "0%" ],
other_values: [ "bottom", "center", "50%", "center, center", "center, bottom", "bottom, center", "center, 0%", "10%, 20%, 40%", "1px", "30px", "50%, 10%, 20%, 30%", "center, center, center, center, center",
"calc(20px)",
"calc(20px + 1em)",
"calc(20px / 2)",
"calc(20px + 50%)",
"calc(50% - 10px)",
"calc(-20px)",
"calc(-50%)",
"calc(-20%)",
"bottom 20px",
"top 20px",
"bottom -50px",
"top -50px",
"bottom 20px",
"bottom 3em",
],
invalid_values: [ "center 10px", "bottom 10% 50%", "top bottom", "top top",
"right 20px", "left 10%", "right 3em",
"left", "right", "left, left", "left, right", "right, left", "left, 0%", "left, left, left, left, left",
"calc(0px + rubbish)", "center 0%"],
},
"mask-repeat": {
domProp: "maskRepeat",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "repeat", "repeat repeat" ],
other_values: [ "repeat-x", "repeat-y", "no-repeat",
"repeat-x, repeat-x",
"repeat, no-repeat",
"repeat-y, no-repeat, repeat-y",
"repeat, repeat, repeat",
"repeat no-repeat",
"no-repeat repeat",
"no-repeat no-repeat",
"repeat no-repeat",
"no-repeat no-repeat, no-repeat no-repeat",
],
invalid_values: [ "repeat repeat repeat",
"repeat-x repeat-y",
"repeat repeat-x",
"repeat repeat-y",
"repeat-x repeat",
"repeat-y repeat" ]
},
"mask-size": {
domProp: "maskSize",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "auto", "auto auto" ],
other_values: [ "contain", "cover", "100px auto", "auto 100px", "100% auto", "auto 100%", "25% 50px", "3em 40%",
"calc(20px)",
"calc(20px) 10px",
"10px calc(20px)",
"calc(20px) 25%",
"25% calc(20px)",
"calc(20px) calc(20px)",
"calc(20px + 1em) calc(20px / 2)",
"calc(20px + 50%) calc(50% - 10px)",
"calc(-20px) calc(-50%)",
"calc(-20%) calc(-50%)"
],
invalid_values: [ "contain contain", "cover cover", "cover auto", "auto cover", "contain cover", "cover contain", "-5px 3px", "3px -5px", "auto -5px", "-5px auto", "5 3", "10px calc(10px + rubbish)" ]
},
"mask-type": { "mask-type": {
domProp: "maskType", domProp: "maskType",
inherited: false, inherited: false,
@ -7245,281 +7504,6 @@ if (IsCSSPropertyPrefEnabled("layout.css.scroll-snap.enabled")) {
}; };
} }
function SupportsMaskShorthand() {
return "maskImage" in document.documentElement.style;
}
if (SupportsMaskShorthand()) {
gCSSProperties["mask"] = {
domProp: "mask",
inherited: false,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
/* FIXME: All mask-border-* should be added when we implement them. */
subproperties: ["mask-clip", "mask-image", "mask-mode", "mask-origin", "mask-position-x", "mask-position-y", "mask-repeat", "mask-size" , "mask-composite"],
initial_values: [ "match-source", "none", "repeat", "add", "0% 0%", "top left", "0% 0% / auto", "top left / auto", "left top / auto", "0% 0% / auto auto",
"top left none", "left top none", "none left top", "none top left", "none 0% 0%", "top left / auto none", "left top / auto none",
"top left / auto auto none",
"match-source none repeat add top left", "top left repeat none add", "none repeat add top left / auto", "top left / auto repeat none add match-source", "none repeat add 0% 0% / auto auto match-source",
"border-box", "border-box border-box" ],
other_values: [
"none alpha repeat add left top",
"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
"no-repeat url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==') alpha left top add",
"repeat-x",
"repeat-y",
"no-repeat",
"none repeat-y alpha add 0% 0%",
"subtract",
"0% top subtract alpha repeat none",
"top",
"left",
"50% 50%",
"center",
"top / 100px",
"left / contain",
"left / cover",
"10px / 10%",
"10em / calc(20px)",
"top left / 100px 100px",
"top left / 100px auto",
"top left / 100px 10%",
"top left / 100px calc(20px)",
"bottom right add none alpha repeat",
"50% alpha",
"alpha 50%",
"50%",
"url(#mymask)",
"radial-gradient(at 10% bottom, #ffffff, black) add no-repeat",
"repeating-radial-gradient(at 10% bottom, #ffffff, black) no-repeat",
"-moz-element(#test) alpha",
/* multiple mask-image */
"url(404.png), url(404.png)",
"repeat-x, subtract, none",
"0% top url(404.png), url(404.png) 50% top",
"subtract repeat-y top left url(404.png), repeat-x alpha",
"top left / contain, bottom right / cover",
/* test cases with clip+origin in the shorthand */
"url(404.png) alpha padding-box",
"url(404.png) border-box alpha",
"content-box url(404.png)",
"url(404.png) alpha padding-box padding-box",
"url(404.png) alpha padding-box border-box",
"content-box border-box url(404.png)",
"alpha padding-box url(404.png) border-box",
"alpha padding-box url(404.png) padding-box",
],
invalid_values: [
/* mixes with keywords have to be in correct order */
"50% left", "top 50%",
/* no quirks mode colors */
"radial-gradient(at 10% bottom, ffffff, black) add no-repeat",
/* no quirks mode lengths */
"linear-gradient(red -99, yellow, green, blue 120%)",
/* bug 258080: don't accept background-position separated */
"left url(404.png) top", "top url(404.png) left",
"-moz-element(#a rubbish)",
"left top / match-source"
]
};
gCSSProperties["mask-clip"] = {
domProp: "maskClip",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "border-box" ],
other_values: [ "content-box", "fill-box", "stroke-box", "view-box", "no-clip", "padding-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ],
invalid_values: [ "content-box content-box", "margin-box" ]
};
gCSSProperties["mask-image"] = {
domProp: "maskImage",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "none" ],
other_values: [
"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
"none, none",
"none, none, none, none, none",
"url(#mymask)",
"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
"none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
].concat(validGradientAndElementValues),
invalid_values: [
].concat(invalidGradientAndElementValues),
unbalanced_values: [
].concat(unbalancedGradientAndElementValues)
};
gCSSProperties["mask-mode"] = {
domProp: "maskMode",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "match-source" ],
other_values: [ "alpha", "luminance", "match-source, match-source", "match-source, alpha", "alpha, luminance, match-source"],
invalid_values: [ "match-source match-source", "alpha match-source" ]
};
gCSSProperties["mask-composite"] = {
domProp: "maskComposite",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "add" ],
other_values: [ "subtract", "intersect", "exclude", "add, add", "subtract, intersect", "subtract, subtract, add"],
invalid_values: [ "add subtract", "intersect exclude" ]
};
gCSSProperties["mask-origin"] = {
domProp: "maskOrigin",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "border-box" ],
other_values: [ "padding-box", "content-box", "fill-box", "stroke-box", "view-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ],
invalid_values: [ "padding-box padding-box", "no-clip", "margin-box" ]
};
gCSSProperties["mask-position"] = {
domProp: "maskPosition",
inherited: false,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
initial_values: [ "top 0% left 0%", "top 0% left", "top left", "left top", "0% 0%", "0% top", "left 0%" ],
other_values: [ "top", "left", "right", "bottom", "center", "center bottom", "bottom center", "center right", "right center", "center top", "top center", "center left", "left center", "right bottom", "bottom right", "50%", "top left, top left", "top left, top right", "top right, top left", "left top, 0% 0%", "10% 20%, 30%, 40%", "top left, bottom right", "right bottom, left top", "0%", "0px", "30px", "0%, 10%, 20%, 30%", "top, top, top, top, top",
"calc(20px)",
"calc(20px) 10px",
"10px calc(20px)",
"calc(20px) 25%",
"25% calc(20px)",
"calc(20px) calc(20px)",
"calc(20px + 1em) calc(20px / 2)",
"calc(20px + 50%) calc(50% - 10px)",
"calc(-20px) calc(-50%)",
"calc(-20%) calc(-50%)",
"0px 0px",
"right 20px top 60px",
"right 20px bottom 60px",
"left 20px top 60px",
"left 20px bottom 60px",
"right -50px top -50px",
"left -50px bottom -50px",
"right 20px top -50px",
"right -20px top 50px",
"right 3em bottom 10px",
"bottom 3em right 10px",
"top 3em right 10px",
"left 15px",
"10px top",
"left top 15px",
"left 10px top",
"left 20%",
"right 20%"
],
subproperties: [ "mask-position-x", "mask-position-y" ],
invalid_values: [ "center 10px center 4px", "center 10px center",
"top 20%", "bottom 20%", "50% left", "top 50%",
"50% bottom 10%", "right 10% 50%", "left right",
"top bottom", "left 10% right",
"top 20px bottom 20px", "left left",
"0px calc(0px + rubbish)"],
};
gCSSProperties["mask-position-x"] = {
domProp: "maskPositionX",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "left", "0%" ],
other_values: [ "right", "center", "50%", "center, center", "center, right", "right, center", "center, 50%", "10%, 20%, 40%", "1px", "30px", "50%, 10%, 20%, 30%", "center, center, center, center, center",
"calc(20px)",
"calc(20px + 1em)",
"calc(20px / 2)",
"calc(20px + 50%)",
"calc(50% - 10px)",
"calc(-20px)",
"calc(-50%)",
"calc(-20%)",
"right 20px",
"left 20px",
"right -50px",
"left -50px",
"right 20px",
"right 3em",
],
invalid_values: [ "center 10px", "right 10% 50%", "left right", "left left",
"bottom 20px", "top 10%", "bottom 3em",
"top", "bottom", "top, top", "top, bottom", "bottom, top", "top, 0%", "top, top, top, top, top",
"calc(0px + rubbish)", "center 0%"],
};
gCSSProperties["mask-position-y"] = {
domProp: "maskPositionY",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "top", "0%" ],
other_values: [ "bottom", "center", "50%", "center, center", "center, bottom", "bottom, center", "center, 0%", "10%, 20%, 40%", "1px", "30px", "50%, 10%, 20%, 30%", "center, center, center, center, center",
"calc(20px)",
"calc(20px + 1em)",
"calc(20px / 2)",
"calc(20px + 50%)",
"calc(50% - 10px)",
"calc(-20px)",
"calc(-50%)",
"calc(-20%)",
"bottom 20px",
"top 20px",
"bottom -50px",
"top -50px",
"bottom 20px",
"bottom 3em",
],
invalid_values: [ "center 10px", "bottom 10% 50%", "top bottom", "top top",
"right 20px", "left 10%", "right 3em",
"left", "right", "left, left", "left, right", "right, left", "left, 0%", "left, left, left, left, left",
"calc(0px + rubbish)", "center 0%"],
};
gCSSProperties["mask-repeat"] = {
domProp: "maskRepeat",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "repeat", "repeat repeat" ],
other_values: [ "repeat-x", "repeat-y", "no-repeat",
"repeat-x, repeat-x",
"repeat, no-repeat",
"repeat-y, no-repeat, repeat-y",
"repeat, repeat, repeat",
"repeat no-repeat",
"no-repeat repeat",
"no-repeat no-repeat",
"repeat no-repeat",
"no-repeat no-repeat, no-repeat no-repeat",
],
invalid_values: [ "repeat repeat repeat",
"repeat-x repeat-y",
"repeat repeat-x",
"repeat repeat-y",
"repeat-x repeat",
"repeat-y repeat" ]
};
gCSSProperties["mask-size"] = {
domProp: "maskSize",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "auto", "auto auto" ],
other_values: [ "contain", "cover", "100px auto", "auto 100px", "100% auto", "auto 100%", "25% 50px", "3em 40%",
"calc(20px)",
"calc(20px) 10px",
"10px calc(20px)",
"calc(20px) 25%",
"25% calc(20px)",
"calc(20px) calc(20px)",
"calc(20px + 1em) calc(20px / 2)",
"calc(20px + 50%) calc(50% - 10px)",
"calc(-20px) calc(-50%)",
"calc(-20%) calc(-50%)"
],
invalid_values: [ "contain contain", "cover cover", "cover auto", "auto cover", "contain cover", "cover contain", "-5px 3px", "3px -5px", "auto -5px", "-5px auto", "5 3", "10px calc(10px + rubbish)" ]
};
} else {
gCSSProperties["mask"] = {
domProp: "mask",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: [ "none" ],
other_values: [ "url(#mymask)" ],
invalid_values: []
};
}
if (IsCSSPropertyPrefEnabled("layout.css.prefixes.webkit")) { if (IsCSSPropertyPrefEnabled("layout.css.prefixes.webkit")) {
gCSSProperties["-webkit-animation"] = { gCSSProperties["-webkit-animation"] = {
domProp: "webkitAnimation", domProp: "webkitAnimation",
@ -7944,81 +7928,78 @@ if (IsCSSPropertyPrefEnabled("layout.css.prefixes.webkit")) {
alias_for: "-moz-user-select", alias_for: "-moz-user-select",
subproperties: [ "-moz-user-select" ], subproperties: [ "-moz-user-select" ],
}; };
gCSSProperties["-webkit-mask"] = {
domProp: "webkitMask",
inherited: false,
type: CSS_TYPE_TRUE_SHORTHAND,
alias_for: "mask",
subproperties: [ "mask-clip", "mask-image", "mask-mode", "mask-origin", "mask-position", "mask-repeat", "mask-size" , "mask-composite" ],
};
gCSSProperties["-webkit-mask-clip"] = {
domProp: "webkitMaskClip",
inherited: false,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
alias_for: "mask-clip",
subproperties: [ "mask-clip" ],
};
if (SupportsMaskShorthand()) { gCSSProperties["-webkit-mask-composite"] = {
gCSSProperties["-webkit-mask"] = { domProp: "webkitMaskComposite",
domProp: "webkitMask", inherited: false,
inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
type: CSS_TYPE_TRUE_SHORTHAND, alias_for: "mask-composite",
alias_for: "mask", subproperties: [ "mask-composite" ],
subproperties: [ "mask-clip", "mask-image", "mask-mode", "mask-origin", "mask-position", "mask-repeat", "mask-size" , "mask-composite" ], };
};
gCSSProperties["-webkit-mask-clip"] = {
domProp: "webkitMaskClip",
inherited: false,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
alias_for: "mask-clip",
subproperties: [ "mask-clip" ],
};
gCSSProperties["-webkit-mask-composite"] = { gCSSProperties["-webkit-mask-image"] = {
domProp: "webkitMaskComposite", domProp: "webkitMaskImage",
inherited: false, inherited: false,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND, type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
alias_for: "mask-composite", alias_for: "mask-image",
subproperties: [ "mask-composite" ], subproperties: [ "mask-image" ],
}; };
gCSSProperties["-webkit-mask-origin"] = {
gCSSProperties["-webkit-mask-image"] = { domProp: "webkitMaskOrigin",
domProp: "webkitMaskImage", inherited: false,
inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "mask-origin",
alias_for: "mask-image", subproperties: [ "mask-origin" ],
subproperties: [ "mask-image" ], };
}; gCSSProperties["-webkit-mask-position"] = {
gCSSProperties["-webkit-mask-origin"] = { domProp: "webkitMaskPosition",
domProp: "webkitMaskOrigin", inherited: false,
inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "mask-position",
alias_for: "mask-origin", subproperties: [ "mask-position" ],
subproperties: [ "mask-origin" ], };
}; gCSSProperties["-webkit-mask-position-x"] = {
gCSSProperties["-webkit-mask-position"] = { domProp: "webkitMaskPositionX",
domProp: "webkitMaskPosition", inherited: false,
inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "mask-position-x",
alias_for: "mask-position", subproperties: [ "mask-position-x" ],
subproperties: [ "mask-position" ], };
}; gCSSProperties["-webkit-mask-position-y"] = {
gCSSProperties["-webkit-mask-position-x"] = { domProp: "webkitMaskPositionY",
domProp: "webkitMaskPositionX", inherited: false,
inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "mask-position-y",
alias_for: "mask-position-x", subproperties: [ "mask-position-y" ],
subproperties: [ "mask-position-x" ], };
}; gCSSProperties["-webkit-mask-repeat"] = {
gCSSProperties["-webkit-mask-position-y"] = { domProp: "webkitMaskRepeat",
domProp: "webkitMaskPositionY", inherited: false,
inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "mask-repeat",
alias_for: "mask-position-y", subproperties: [ "mask-repeat" ],
subproperties: [ "mask-position-y" ], };
}; gCSSProperties["-webkit-mask-size"] = {
gCSSProperties["-webkit-mask-repeat"] = { domProp: "webkitMaskSize",
domProp: "webkitMaskRepeat", inherited: false,
inherited: false, type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND, alias_for: "mask-size",
alias_for: "mask-repeat", subproperties: [ "mask-size" ],
subproperties: [ "mask-repeat" ], };
};
gCSSProperties["-webkit-mask-size"] = {
domProp: "webkitMaskSize",
inherited: false,
type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
alias_for: "mask-size",
subproperties: [ "mask-size" ],
};
}
} }
if (IsCSSPropertyPrefEnabled("layout.css.prefixes.gradients")) { if (IsCSSPropertyPrefEnabled("layout.css.prefixes.gradients")) {
@ -8040,23 +8021,21 @@ if (IsCSSPropertyPrefEnabled("layout.css.prefixes.gradients")) {
"-moz-radial-gradient(10% bottom, 30px, 20px 20px, 10px, from(#ffffff), to(black)) scroll no-repeat", "-moz-radial-gradient(10% bottom, 30px, 20px 20px, 10px, from(#ffffff), to(black)) scroll no-repeat",
"-moz-linear-gradient(10px 10px, 20px 20px, from(red), to(blue)) repeat", "-moz-linear-gradient(10px 10px, 20px 20px, from(red), to(blue)) repeat",
); );
if (SupportsMaskShorthand()) { gCSSProperties["mask"].other_values.push(
gCSSProperties["mask"].other_values.push( "-moz-radial-gradient(10% bottom, #ffffff, black) add no-repeat",
"-moz-radial-gradient(10% bottom, #ffffff, black) add no-repeat", "-moz-linear-gradient(10px 10px -45deg, red, blue) repeat",
"-moz-linear-gradient(10px 10px -45deg, red, blue) repeat", "-moz-linear-gradient(10px 10px -0.125turn, red, blue) repeat",
"-moz-linear-gradient(10px 10px -0.125turn, red, blue) repeat", "-moz-repeating-radial-gradient(10% bottom, #ffffff, black) add no-repeat",
"-moz-repeating-radial-gradient(10% bottom, #ffffff, black) add no-repeat", "-moz-repeating-linear-gradient(10px 10px -45deg, red, blue) repeat",
"-moz-repeating-linear-gradient(10px 10px -45deg, red, blue) repeat", "url(404.png), -moz-linear-gradient(20px 20px -45deg, blue, green), -moz-element(#a) alpha",
"url(404.png), -moz-linear-gradient(20px 20px -45deg, blue, green), -moz-element(#a) alpha", );
); gCSSProperties["mask"].invalid_values.push(
gCSSProperties["mask"].invalid_values.push( /* no quirks mode colors */
/* no quirks mode colors */ "-moz-radial-gradient(10% bottom, ffffff, black) add no-repeat",
"-moz-radial-gradient(10% bottom, ffffff, black) add no-repeat", /* no quirks mode lengths */
/* no quirks mode lengths */ "-moz-linear-gradient(10 10px -45deg, red, blue) repeat",
"-moz-linear-gradient(10 10px -45deg, red, blue) repeat", "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat",
"-moz-linear-gradient(10px 10 -45deg, red, blue) repeat", );
);
}
} }
if (IsCSSPropertyPrefEnabled("layout.css.unset-value.enabled")) { if (IsCSSPropertyPrefEnabled("layout.css.unset-value.enabled")) {

Просмотреть файл

@ -243,10 +243,6 @@ var noframe_container = document.getElementById("content");
})(); })();
(function test_bug_1235015() { (function test_bug_1235015() {
if (!("maskImage" in document.documentElement.style)) {
return;
}
// "masks" object contains non-initial mask longhand values. // "masks" object contains non-initial mask longhand values.
var emptyMasks = { var emptyMasks = {
// More then one <mask-reference>, or any mask-image value other then // More then one <mask-reference>, or any mask-image value other then

Просмотреть файл

@ -194,6 +194,30 @@ var supported_properties = {
"margin-top": [ test_length_transition, test_percent_transition, "margin-top": [ test_length_transition, test_percent_transition,
test_length_percent_calc_transition, test_length_percent_calc_transition,
test_length_unclamped, test_percent_unclamped ], test_length_unclamped, test_percent_unclamped ],
"mask-position": [ test_background_position_transition,
// FIXME: We don't currently test clamping,
// since mask-position uses calc() as
// an intermediate form.
/* test_length_percent_pair_unclamped */ ],
"mask-position-x": [ test_background_position_coord_transition,
test_length_transition,
test_percent_transition,
// FIXME: We don't currently test clamping,
// since background-position-x uses calc() as
// an intermediate form.
/* test_length_percent_pair_unclamped */ ],
"mask-position-y": [ test_background_position_coord_transition,
test_length_transition,
test_percent_transition,
// FIXME: We don't currently test clamping,
// since background-position-y uses calc() as
// an intermediate form.
/* test_length_percent_pair_unclamped */ ],
"mask-size": [ test_background_size_transition,
// FIXME: We don't currently test clamping,
// since mask-size uses calc() as an
// intermediate form.
/* test_length_percent_pair_clamped */ ],
"max-height": [ test_length_transition, test_percent_transition, "max-height": [ test_length_transition, test_percent_transition,
test_length_clamped, test_percent_clamped ], test_length_clamped, test_percent_clamped ],
"max-width": [ test_length_transition, test_percent_transition, "max-width": [ test_length_transition, test_percent_transition,
@ -291,33 +315,6 @@ if (SpecialPowers.getBoolPref("layout.css.shape-outside.enabled")) {
[ test_basic_shape_or_url_transition ]; [ test_basic_shape_or_url_transition ];
} }
if (SupportsMaskShorthand()) {
supported_properties["mask-position"] = [ test_background_position_transition,
// FIXME: We don't currently test clamping,
// since mask-position uses calc() as
// an intermediate form.
/* test_length_percent_pair_unclamped */ ];
supported_properties["mask-position-x"] = [ test_background_position_coord_transition,
test_length_transition,
test_percent_transition,
// FIXME: We don't currently test clamping,
// since background-position-x uses calc() as
// an intermediate form.
/* test_length_percent_pair_unclamped */ ];
supported_properties["mask-position-y"] = [ test_background_position_coord_transition,
test_length_transition,
test_percent_transition,
// FIXME: We don't currently test clamping,
// since background-position-y uses calc() as
// an intermediate form.
/* test_length_percent_pair_unclamped */ ];
supported_properties["mask-size"] = [ test_background_size_transition,
// FIXME: We don't currently test clamping,
// since mask-size uses calc() as an
// intermediate form.
/* test_length_percent_pair_clamped */ ];
}
if (IsCSSPropertyPrefEnabled("layout.css.font-variations.enabled")) { if (IsCSSPropertyPrefEnabled("layout.css.font-variations.enabled")) {
supported_properties["font-variation-settings"] = [ test_font_variations_transition ]; supported_properties["font-variation-settings"] = [ test_font_variations_transition ];
} }

Просмотреть файл

@ -512,15 +512,7 @@ nsSVGUtils::DetermineMaskUsage(nsIFrame* aFrame, bool aHandleOpacity,
nsTArray<nsSVGMaskFrame*> maskFrames = effectProperties.GetMaskFrames(); nsTArray<nsSVGMaskFrame*> maskFrames = effectProperties.GetMaskFrames();
#ifdef MOZ_ENABLE_MASK_AS_SHORTHAND
aUsage.shouldGenerateMaskLayer = (maskFrames.Length() > 0); aUsage.shouldGenerateMaskLayer = (maskFrames.Length() > 0);
#else
// Since we do not support image mask so far, we should treat any
// unresolvable mask as no mask. Otherwise, any object with a valid image
// mask, e.g. url("xxx.png"), will become invisible just because we can not
// handle image mask correctly. (See bug 1294171)
aUsage.shouldGenerateMaskLayer = maskFrames.Length() == 1 && maskFrames[0];
#endif
nsSVGClipPathFrame *clipPathFrame = effectProperties.GetClipPathFrame(); nsSVGClipPathFrame *clipPathFrame = effectProperties.GetClipPathFrame();
MOZ_ASSERT(!clipPathFrame || MOZ_ASSERT(!clipPathFrame ||

Просмотреть файл

@ -136,6 +136,13 @@
<item>wifi</item> <item>wifi</item>
<item>disabled</item> <item>disabled</item>
</string-array> </string-array>
<!-- This value is similar to config_longPressVibePattern in android frameworks/base/core/res/res/values/config.xml-->
<integer-array name="long_press_vibrate_msec">
<item>0</item>
<item>1</item>
<item>20</item>
<item>21</item>
</integer-array>
<!-- browser.image_blocking --> <!-- browser.image_blocking -->
<string-array name="pref_browser_image_blocking_entries"> <string-array name="pref_browser_image_blocking_entries">
<item>@string/pref_tap_to_load_images_enabled</item> <item>@string/pref_tap_to_load_images_enabled</item>

Просмотреть файл

@ -49,7 +49,6 @@ import android.support.v4.view.MenuItemCompat;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.util.Log; import android.util.Log;
import android.view.HapticFeedbackConstants;
import android.view.InputDevice; import android.view.InputDevice;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -699,7 +698,7 @@ public class BrowserApp extends GeckoApp
final TabHistoryFragment fragment = TabHistoryFragment.newInstance(historyPageList, toIndex); final TabHistoryFragment fragment = TabHistoryFragment.newInstance(historyPageList, toIndex);
final FragmentManager fragmentManager = getSupportFragmentManager(); final FragmentManager fragmentManager = getSupportFragmentManager();
GeckoAppShell.getHapticFeedbackDelegate().performHapticFeedback(HapticFeedbackConstants.LONG_PRESS); GeckoAppShell.vibrateOnHapticFeedbackEnabled(getResources().getIntArray(R.array.long_press_vibrate_msec));
fragment.show(R.id.tab_history_panel, fragmentManager.beginTransaction(), TAB_HISTORY_FRAGMENT_TAG); fragment.show(R.id.tab_history_panel, fragmentManager.beginTransaction(), TAB_HISTORY_FRAGMENT_TAG);
} }
}); });
@ -1659,6 +1658,7 @@ public class BrowserApp extends GeckoApp
mLayerView.getDynamicToolbarAnimator().addMetricsListener(this); mLayerView.getDynamicToolbarAnimator().addMetricsListener(this);
mLayerView.getDynamicToolbarAnimator().setToolbarChromeProxy(this); mLayerView.getDynamicToolbarAnimator().setToolbarChromeProxy(this);
} }
mDynamicToolbar.setLayerView(mLayerView);
setDynamicToolbarEnabled(mDynamicToolbar.isEnabled()); setDynamicToolbarEnabled(mDynamicToolbar.isEnabled());
// Intercept key events for gamepad shortcuts // Intercept key events for gamepad shortcuts

Просмотреть файл

@ -673,7 +673,7 @@ public abstract class GeckoApp extends GeckoActivity
GeckoAccessibility.updateAccessibilitySettings(this); GeckoAccessibility.updateAccessibilitySettings(this);
} else if ("Accessibility:Event".equals(event)) { } else if ("Accessibility:Event".equals(event)) {
GeckoAccessibility.sendAccessibilityEvent(mLayerView, message); GeckoAccessibility.sendAccessibilityEvent(message);
} else if ("Bookmark:Insert".equals(event)) { } else if ("Bookmark:Insert".equals(event)) {
final BrowserDB db = BrowserDB.from(getProfile()); final BrowserDB db = BrowserDB.from(getProfile());

Просмотреть файл

@ -57,8 +57,7 @@ import java.io.File;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.UUID; import java.util.UUID;
public class GeckoApplication extends Application public class GeckoApplication extends Application {
implements HapticFeedbackDelegate {
private static final String LOG_TAG = "GeckoApplication"; private static final String LOG_TAG = "GeckoApplication";
private static final String MEDIA_DECODING_PROCESS_CRASH = "MEDIA_DECODING_PROCESS_CRASH"; private static final String MEDIA_DECODING_PROCESS_CRASH = "MEDIA_DECODING_PROCESS_CRASH";
@ -230,7 +229,6 @@ public class GeckoApplication extends Application
final Context context = getApplicationContext(); final Context context = getApplicationContext();
GeckoAppShell.setApplicationContext(context); GeckoAppShell.setApplicationContext(context);
GeckoAppShell.setHapticFeedbackDelegate(this);
GeckoAppShell.setGeckoInterface(new GeckoAppShell.GeckoInterface() { GeckoAppShell.setGeckoInterface(new GeckoAppShell.GeckoInterface() {
@Override @Override
public boolean openUriExternal(final String targetURI, final String mimeType, public boolean openUriExternal(final String targetURI, final String mimeType,
@ -636,13 +634,4 @@ public class GeckoApplication extends Application
return bitmap; return bitmap;
} }
@Override // HapticFeedbackDelegate
public void performHapticFeedback(final int effect) {
final Activity currentActivity =
GeckoActivityMonitor.getInstance().getCurrentActivity();
if (currentActivity != null) {
currentActivity.getWindow().getDecorView().performHapticFeedback(effect);
}
}
} }

Просмотреть файл

@ -5,12 +5,15 @@
package org.mozilla.gecko.activitystream; package org.mozilla.gecko.activitystream;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import org.json.JSONArray; import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import org.mozilla.gecko.R; import org.mozilla.gecko.R;
import org.mozilla.gecko.activitystream.homepanel.ActivityStreamPanel;
import org.mozilla.gecko.db.BrowserContract; import org.mozilla.gecko.db.BrowserContract;
import org.mozilla.gecko.activitystream.homepanel.model.TopSite; import org.mozilla.gecko.activitystream.homepanel.model.TopSite;
@ -30,6 +33,7 @@ public class ActivityStreamTelemetry {
public final static String COUNT = "count"; public final static String COUNT = "count";
public final static String PAGE_NUMBER = "page_number"; public final static String PAGE_NUMBER = "page_number";
public final static String INTERACTION = "interaction"; public final static String INTERACTION = "interaction";
public final static String AS_USER_PREFERENCES = "as-user-preferences";
// Values // Values
public final static String TYPE_TOPSITES = "topsites"; public final static String TYPE_TOPSITES = "topsites";
@ -55,6 +59,40 @@ public class ActivityStreamTelemetry {
public final static String INTERACTION_LONG_CLICK = "long_click"; public final static String INTERACTION_LONG_CLICK = "long_click";
} }
/**
* AS_USER_PREFERENCES
*
* NB: Additional pref values should be (unique) powers of 2
* We skip 1 and 2 to be consistent with Desktop, because those prefs are not used in Firefox for Android.
**/
private final static int POCKET_ENABLED_VALUE = 4;
private final static int VISITED_ENABLED_VALUE = 8;
private final static int BOOKMARKED_ENABLED_VALUE = 16;
/**
* Calculates the bit-packed value of the user's Activity Stream preferences (e.g. enabled/disabled sections).
*
* @param sharedPreferences SharedPreferences of this profile
* @return bit-packed value of the user's AS preferences, which is the sum of the values of the enabled preferences.
*/
public static int getASUserPreferencesValue(final SharedPreferences sharedPreferences, final Resources res) {
int bitPackedPrefValue = 0;
if (sharedPreferences.getBoolean(ActivityStreamPanel.PREF_POCKET_ENABLED, res.getBoolean(R.bool.pref_activitystream_pocket_enabled_default))) {
bitPackedPrefValue += POCKET_ENABLED_VALUE;
}
if (sharedPreferences.getBoolean(ActivityStreamPanel.PREF_VISITED_ENABLED, res.getBoolean(R.bool.pref_activitystream_visited_enabled_default))) {
bitPackedPrefValue += VISITED_ENABLED_VALUE;
}
if (sharedPreferences.getBoolean(ActivityStreamPanel.PREF_BOOKMARKS_ENABLED, res.getBoolean(R.bool.pref_activitystream_recentbookmarks_enabled_default))) {
bitPackedPrefValue += BOOKMARKED_ENABLED_VALUE;
}
return bitPackedPrefValue;
}
/** /**
* A helper class used for composing an 'extras' field. It encapsulates a holder of "global" * A helper class used for composing an 'extras' field. It encapsulates a holder of "global"
* key/value pairs which will be present in every 'extras' constructed by this class, and a * key/value pairs which will be present in every 'extras' constructed by this class, and a

Просмотреть файл

@ -5,7 +5,6 @@
package org.mozilla.gecko.activitystream.homepanel; package org.mozilla.gecko.activitystream.homepanel;
import android.app.Activity; import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
@ -18,7 +17,6 @@ import org.mozilla.gecko.GeckoSharedPrefs;
import org.mozilla.gecko.R; import org.mozilla.gecko.R;
import org.mozilla.gecko.Telemetry; import org.mozilla.gecko.Telemetry;
import org.mozilla.gecko.TelemetryContract; import org.mozilla.gecko.TelemetryContract;
import org.mozilla.gecko.activitystream.ActivityStream;
import org.mozilla.gecko.home.HomeFragment; import org.mozilla.gecko.home.HomeFragment;
/** /**
@ -51,7 +49,7 @@ public class ActivityStreamHomeFragment
|| TextUtils.equals(s, ActivityStreamPanel.PREF_POCKET_ENABLED); || TextUtils.equals(s, ActivityStreamPanel.PREF_POCKET_ENABLED);
if (shouldReload) { if (shouldReload) {
activityStreamPanel.reload(getLoaderManager()); activityStreamPanel.reload(getLoaderManager(), sharedPreferences, this.getResources());
} }
} }

Просмотреть файл

@ -89,6 +89,15 @@ public class ActivityStreamPanel extends FrameLayout {
ActivityStreamTelemetry.Contract.FX_ACCOUNT_PRESENT, ActivityStreamTelemetry.Contract.FX_ACCOUNT_PRESENT,
FirefoxAccounts.firefoxAccountsExist(context) FirefoxAccounts.firefoxAccountsExist(context)
); );
updateSharedPreferencesGlobalExtras(sharedPreferences, context.getResources());
}
private void updateSharedPreferencesGlobalExtras(final SharedPreferences sharedPreferences, final Resources res) {
ActivityStreamTelemetry.Extras.setGlobal(
ActivityStreamTelemetry.Contract.AS_USER_PREFERENCES,
ActivityStreamTelemetry.getASUserPreferencesValue(sharedPreferences, res)
);
} }
void setOnUrlOpenListeners(HomePager.OnUrlOpenListener onUrlOpenListener, HomePager.OnUrlOpenInBackgroundListener onUrlOpenInBackgroundListener) { void setOnUrlOpenListeners(HomePager.OnUrlOpenListener onUrlOpenListener, HomePager.OnUrlOpenInBackgroundListener onUrlOpenInBackgroundListener) {
@ -113,9 +122,11 @@ public class ActivityStreamPanel extends FrameLayout {
adapter.swapTopSitesCursor(null); adapter.swapTopSitesCursor(null);
} }
public void reload(LoaderManager lm) { public void reload(LoaderManager lm, SharedPreferences sharedPreferences, Resources res) {
adapter.clearAndInit(); adapter.clearAndInit();
updateSharedPreferencesGlobalExtras(sharedPreferences, res);
// Destroy loaders so they don't restart loading when returning. // Destroy loaders so they don't restart loading when returning.
lm.destroyLoader(LOADER_ID_HIGHLIGHTS); lm.destroyLoader(LOADER_ID_HIGHLIGHTS);
lm.destroyLoader(LOADER_ID_POCKET); lm.destroyLoader(LOADER_ID_POCKET);

Просмотреть файл

@ -17,7 +17,6 @@ import android.content.Intent;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.util.Log; import android.util.Log;
import android.util.SparseArray; import android.util.SparseArray;
import android.view.HapticFeedbackConstants;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
@ -260,8 +259,7 @@ public class GeckoMenu extends ListView
@Override @Override
public boolean onLongClick(View view) { public boolean onLongClick(View view) {
if (handleMenuItemLongClick(menuItem)) { if (handleMenuItemLongClick(menuItem)) {
GeckoAppShell.getHapticFeedbackDelegate().performHapticFeedback( GeckoAppShell.vibrateOnHapticFeedbackEnabled(getResources().getIntArray(R.array.long_press_vibrate_msec));
HapticFeedbackConstants.LONG_PRESS);
return true; return true;
} }
return false; return false;
@ -278,8 +276,7 @@ public class GeckoMenu extends ListView
@Override @Override
public boolean onLongClick(View view) { public boolean onLongClick(View view) {
if (handleMenuItemLongClick(menuItem)) { if (handleMenuItemLongClick(menuItem)) {
GeckoAppShell.getHapticFeedbackDelegate().performHapticFeedback( GeckoAppShell.vibrateOnHapticFeedbackEnabled(getResources().getIntArray(R.array.long_press_vibrate_msec));
HapticFeedbackConstants.LONG_PRESS);
return true; return true;
} }
return false; return false;

Просмотреть файл

@ -415,7 +415,6 @@ gvjar.sources += [geckoview_source_dir + 'java/org/mozilla/gecko/' + x
'gfx/SurfaceTextureListener.java', 'gfx/SurfaceTextureListener.java',
'gfx/ViewTransform.java', 'gfx/ViewTransform.java',
'gfx/VsyncSource.java', 'gfx/VsyncSource.java',
'HapticFeedbackDelegate.java',
'InputConnectionListener.java', 'InputConnectionListener.java',
'InputMethods.java', 'InputMethods.java',
'media/AsyncCodec.java', 'media/AsyncCodec.java',

Просмотреть файл

@ -18,6 +18,14 @@ A concept of a "global" extra is meant to support recording certain context info
``fx_account_present``, values: true, false ``fx_account_present``, values: true, false
Indicates if Firefox Account is currently enabled. Indicates if Firefox Account is currently enabled.
``as_user_preferences``, values: (bit-packed) value of preferences enabled
Each preference is assigned a value that is a unique power of 2, and value of as_user_preferences is the sum of all enabled preferences values.
The SharedPreferences preferences measured (with their value) are:
pref_activitystream_pocket_enabled: 4
pref_activitystream_visited_enabled: 8
pref_activitystream_recentbookmarks_enabled: 16
Extra information available for various event types Extra information available for various event types
=================================================== ===================================================
Action position Action position
@ -160,7 +168,7 @@ Full Examples
============= =============
Following examples of events are here to provide a better feel for the overall shape of telemetry data being recorded. Following examples of events are here to provide a better feel for the overall shape of telemetry data being recorded.
1) User with an active Firefox Account clicked on a menu item for a third highlight ("visited"): 1) User with an active Firefox Account clicked on a menu item for a third highlight ("visited") [prefs enabled: top-stories, bookmarks, visited] :
:: ::
session="activitystream.1" session="activitystream.1"
@ -168,12 +176,13 @@ Following examples of events are here to provide a better feel for the overall s
method="contextmenu" method="contextmenu"
extras="{ extras="{
'fx_account_present': true, 'fx_account_present': true,
'as_user_preferences': 28,
'source_type': 'highlights', 'source_type': 'highlights',
'source_subtype': 'visited', 'source_subtype': 'visited',
'action_position': 2 'action_position': 2
}" }"
2) User with no active Firefox Account clicked on a second highlight (recent bookmark), with total of 7 highlights being displayed: 2) User with no active Firefox Account clicked on a second highlight (recent bookmark), with total of 7 highlights being displayed [prefs enabled: bookmarks] :
:: ::
session="activitystream.1" session="activitystream.1"
@ -181,13 +190,14 @@ Following examples of events are here to provide a better feel for the overall s
method="listitem" method="listitem"
extras="{ extras="{
'fx_account_present': false, 'fx_account_present': false,
'as_user_preferences': 16,
'source_type': 'highlights', 'source_type': 'highlights',
'source_subtype': 'bookmarked' 'source_subtype': 'bookmarked'
'action_position': 1, 'action_position': 1,
'count': 7 'count': 7
}" }"
3) User with an active Firefox Account clicked on a third pinned top site: 3) User with an active Firefox Account clicked on a third pinned top site [prefs enabled: (none)] :
:: ::
session="activitystream.1" session="activitystream.1"
@ -195,13 +205,14 @@ Following examples of events are here to provide a better feel for the overall s
method="listitem" method="listitem"
extras="{ extras="{
'fx_account_present': true, 'fx_account_present': true,
'as_user_preferences': 0,
'source_type': 'topsites', 'source_type': 'topsites',
'source_subtype': 'pinned', 'source_subtype': 'pinned',
'action_position': 2, 'action_position': 2,
'page_number': 0 'page_number': 0
}" }"
4) User with an active Firefox Account clicked on a "share" context menu item, which was displayed for a regular top site number 6: 4) User with an active Firefox Account clicked on a "share" context menu item, which was displayed for a regular top site number 6 [prefs enabled: visited, bookmarks] :
:: ::
session="activitystream.1" session="activitystream.1"
@ -209,6 +220,7 @@ Following examples of events are here to provide a better feel for the overall s
method="contextmenu" method="contextmenu"
extras="{ extras="{
'fx_account_present': true, 'fx_account_present': true,
'as_user_preferences': 24,
'source_type': 'topsites', 'source_type': 'topsites',
'source_subtype': 'top', 'source_subtype': 'top',
'item': 'share', 'item': 'share',

Просмотреть файл

@ -7,6 +7,8 @@ package org.mozilla.gecko;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import org.mozilla.gecko.EventDispatcher;
import org.mozilla.gecko.gfx.LayerView;
import org.mozilla.gecko.util.GeckoBundle; import org.mozilla.gecko.util.GeckoBundle;
import org.mozilla.gecko.util.ThreadUtils; import org.mozilla.gecko.util.ThreadUtils;
@ -108,8 +110,7 @@ public class GeckoAccessibility {
return sEnabled; return sEnabled;
} }
public static void sendAccessibilityEvent(final GeckoView view, public static void sendAccessibilityEvent(final GeckoBundle message) {
final GeckoBundle message) {
if (!sEnabled) if (!sEnabled)
return; return;
@ -119,11 +120,10 @@ public class GeckoAccessibility {
return; return;
} }
sendAccessibilityEvent(view, message, eventType); sendAccessibilityEvent(message, eventType);
} }
public static void sendAccessibilityEvent(final GeckoView view, final GeckoBundle message, public static void sendAccessibilityEvent(final GeckoBundle message, final int eventType) {
final int eventType) {
if (!sEnabled) if (!sEnabled)
return; return;
@ -148,6 +148,10 @@ public class GeckoAccessibility {
} else { } else {
// In Jelly Bean we populate an AccessibilityNodeInfo with the minimal amount of data to have // In Jelly Bean we populate an AccessibilityNodeInfo with the minimal amount of data to have
// it work with TalkBack. // it work with TalkBack.
final LayerView view = GeckoAppShell.getLayerView();
if (view == null)
return;
if (sVirtualCursorNode == null) { if (sVirtualCursorNode == null) {
sVirtualCursorNode = AccessibilityNodeInfo.obtain(view, VIRTUAL_CURSOR_POSITION); sVirtualCursorNode = AccessibilityNodeInfo.obtain(view, VIRTUAL_CURSOR_POSITION);
} }
@ -262,12 +266,7 @@ public class GeckoAccessibility {
AccessibilityNodeProvider mAccessibilityNodeProvider; AccessibilityNodeProvider mAccessibilityNodeProvider;
@Override @Override
public AccessibilityNodeProvider getAccessibilityNodeProvider(final View hostView) { public AccessibilityNodeProvider getAccessibilityNodeProvider(final View host) {
if (!(hostView instanceof GeckoView)) {
return super.getAccessibilityNodeProvider(hostView);
}
final GeckoView host = (GeckoView) hostView;
if (mAccessibilityNodeProvider == null) if (mAccessibilityNodeProvider == null)
// The accessibility node structure for web content consists of 3 LayerView child nodes: // The accessibility node structure for web content consists of 3 LayerView child nodes:
// 1. VIRTUAL_ENTRY_POINT_BEFORE: Represents the entry point before the LayerView. // 1. VIRTUAL_ENTRY_POINT_BEFORE: Represents the entry point before the LayerView.
@ -320,7 +319,7 @@ public class GeckoAccessibility {
// The accessibility focus is permanently on the middle node, VIRTUAL_CURSOR_POSITION. // The accessibility focus is permanently on the middle node, VIRTUAL_CURSOR_POSITION.
// When we enter the view forward or backward we just ask Gecko to get focus, keeping the current position. // When we enter the view forward or backward we just ask Gecko to get focus, keeping the current position.
if (virtualViewId == VIRTUAL_CURSOR_POSITION && sHoverEnter != null) { if (virtualViewId == VIRTUAL_CURSOR_POSITION && sHoverEnter != null) {
GeckoAccessibility.sendAccessibilityEvent(host, sHoverEnter, AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED); GeckoAccessibility.sendAccessibilityEvent(sHoverEnter, AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED);
} else { } else {
final GeckoBundle data = new GeckoBundle(1); final GeckoBundle data = new GeckoBundle(1);
data.putBoolean("gainFocus", true); data.putBoolean("gainFocus", true);

Просмотреть файл

@ -28,6 +28,7 @@ import org.mozilla.gecko.annotation.JNITarget;
import org.mozilla.gecko.annotation.RobocopTarget; import org.mozilla.gecko.annotation.RobocopTarget;
import org.mozilla.gecko.annotation.WrapForJNI; import org.mozilla.gecko.annotation.WrapForJNI;
import org.mozilla.gecko.gfx.BitmapUtils; import org.mozilla.gecko.gfx.BitmapUtils;
import org.mozilla.gecko.gfx.LayerView;
import org.mozilla.gecko.permissions.Permissions; import org.mozilla.gecko.permissions.Permissions;
import org.mozilla.gecko.process.GeckoProcessManager; import org.mozilla.gecko.process.GeckoProcessManager;
import org.mozilla.gecko.util.HardwareCodecCapabilityUtils; import org.mozilla.gecko.util.HardwareCodecCapabilityUtils;
@ -221,8 +222,21 @@ public class GeckoAppShell
@WrapForJNI(dispatchTo = "gecko") @WrapForJNI(dispatchTo = "gecko")
public static native void notifyUriVisited(String uri); public static native void notifyUriVisited(String uri);
private static LayerView sLayerView;
private static Rect sScreenSize; private static Rect sScreenSize;
public static void setLayerView(LayerView lv) {
if (sLayerView == lv) {
return;
}
sLayerView = lv;
}
@RobocopTarget
public static LayerView getLayerView() {
return sLayerView;
}
@WrapForJNI(stubName = "NotifyObservers", dispatchTo = "gecko") @WrapForJNI(stubName = "NotifyObservers", dispatchTo = "gecko")
private static native void nativeNotifyObservers(String topic, String data); private static native void nativeNotifyObservers(String topic, String data);
@ -367,8 +381,7 @@ public class GeckoAppShell
LocationListener, LocationListener,
NotificationListener, NotificationListener,
ScreenOrientationDelegate, ScreenOrientationDelegate,
WakeLockDelegate, WakeLockDelegate {
HapticFeedbackDelegate {
@Override @Override
public void onAccuracyChanged(Sensor sensor, int accuracy) { public void onAccuracyChanged(Sensor sensor, int accuracy) {
} }
@ -548,22 +561,6 @@ public class GeckoAppShell
mWakeLocks.remove(lock); mWakeLocks.remove(lock);
} }
} }
@Override
public void performHapticFeedback(final int effect) {
final int[] pattern;
// Use default platform values.
if (effect == HapticFeedbackConstants.KEYBOARD_TAP) {
pattern = new int[] { 40 };
} else if (effect == HapticFeedbackConstants.LONG_PRESS) {
pattern = new int[] { 0, 1, 20, 21 };
} else if (effect == HapticFeedbackConstants.VIRTUAL_KEY) {
pattern = new int[] { 0, 10, 20, 30 };
} else {
return;
}
vibrateOnHapticFeedbackEnabled(pattern);
}
} }
private static final DefaultListeners DEFAULT_LISTENERS = new DefaultListeners(); private static final DefaultListeners DEFAULT_LISTENERS = new DefaultListeners();
@ -571,7 +568,6 @@ public class GeckoAppShell
private static LocationListener sLocationListener = DEFAULT_LISTENERS; private static LocationListener sLocationListener = DEFAULT_LISTENERS;
private static NotificationListener sNotificationListener = DEFAULT_LISTENERS; private static NotificationListener sNotificationListener = DEFAULT_LISTENERS;
private static WakeLockDelegate sWakeLockDelegate = DEFAULT_LISTENERS; private static WakeLockDelegate sWakeLockDelegate = DEFAULT_LISTENERS;
private static HapticFeedbackDelegate sHapticFeedbackDelegate = DEFAULT_LISTENERS;
/** /**
* A delegate for supporting the Screen Orientation API. * A delegate for supporting the Screen Orientation API.
@ -618,14 +614,6 @@ public class GeckoAppShell
sWakeLockDelegate = (delegate != null) ? delegate : DEFAULT_LISTENERS; sWakeLockDelegate = (delegate != null) ? delegate : DEFAULT_LISTENERS;
} }
public static HapticFeedbackDelegate getHapticFeedbackDelegate() {
return sHapticFeedbackDelegate;
}
public static void setHapticFeedbackDelegate(final HapticFeedbackDelegate delegate) {
sHapticFeedbackDelegate = (delegate != null) ? delegate : DEFAULT_LISTENERS;
}
@WrapForJNI(calledFrom = "gecko") @WrapForJNI(calledFrom = "gecko")
private static void enableSensor(int aSensortype) { private static void enableSensor(int aSensortype) {
final SensorManager sm = (SensorManager) final SensorManager sm = (SensorManager)
@ -1014,11 +1002,10 @@ public class GeckoAppShell
// Don't perform haptic feedback if a vibration is currently playing, // Don't perform haptic feedback if a vibration is currently playing,
// because the haptic feedback will nuke the vibration. // because the haptic feedback will nuke the vibration.
if (!sVibrationMaybePlaying || System.nanoTime() >= sVibrationEndTime) { if (!sVibrationMaybePlaying || System.nanoTime() >= sVibrationEndTime) {
getHapticFeedbackDelegate().performHapticFeedback( LayerView layerView = getLayerView();
aIsLongPress ? HapticFeedbackConstants.LONG_PRESS layerView.performHapticFeedback(aIsLongPress ?
: HapticFeedbackConstants.VIRTUAL_KEY); HapticFeedbackConstants.LONG_PRESS :
sVibrationMaybePlaying = false; HapticFeedbackConstants.VIRTUAL_KEY);
sVibrationEndTime = 0;
} }
} }
@ -1036,14 +1023,10 @@ public class GeckoAppShell
} }
// Vibrate only if haptic feedback is enabled. // Vibrate only if haptic feedback is enabled.
private static void vibrateOnHapticFeedbackEnabled(int[] milliseconds) { public static void vibrateOnHapticFeedbackEnabled(int[] milliseconds) {
if (Settings.System.getInt(getApplicationContext().getContentResolver(), if (Settings.System.getInt(getApplicationContext().getContentResolver(),
Settings.System.HAPTIC_FEEDBACK_ENABLED, 0) > 0) { Settings.System.HAPTIC_FEEDBACK_ENABLED, 0) > 0) {
if (milliseconds.length == 1) { vibrate(convertIntToLongArray(milliseconds), -1);
vibrate(milliseconds[0]);
} else {
vibrate(convertIntToLongArray(milliseconds), -1);
}
} }
} }
@ -1056,10 +1039,10 @@ public class GeckoAppShell
@WrapForJNI(calledFrom = "gecko") @WrapForJNI(calledFrom = "gecko")
private static void vibrate(long[] pattern, int repeat) { private static void vibrate(long[] pattern, int repeat) {
// If pattern.length is odd, the last element in the pattern is a // If pattern.length is even, the last element in the pattern is a
// meaningless delay, so don't include it in vibrationDuration. // meaningless delay, so don't include it in vibrationDuration.
long vibrationDuration = 0; long vibrationDuration = 0;
int iterLen = pattern.length & ~1; int iterLen = pattern.length - (pattern.length % 2 == 0 ? 1 : 0);
for (int i = 0; i < iterLen; i++) { for (int i = 0; i < iterLen; i++) {
vibrationDuration += pattern[i]; vibrationDuration += pattern[i];
} }
@ -1570,6 +1553,21 @@ public class GeckoAppShell
return HardwareUtils.isTablet(); return HardwareUtils.isTablet();
} }
private static boolean sImeWasEnabledOnLastResize = false;
public static void viewSizeChanged() {
GeckoView v = (GeckoView) getLayerView();
if (v == null) {
return;
}
boolean imeIsEnabled = v.isIMEEnabled();
if (imeIsEnabled && !sImeWasEnabledOnLastResize) {
// The IME just came up after not being up, so let's scroll
// to the focused input.
EventDispatcher.getInstance().dispatch("ScrollTo:FocusedInput", null);
}
sImeWasEnabledOnLastResize = imeIsEnabled;
}
@WrapForJNI(calledFrom = "gecko") @WrapForJNI(calledFrom = "gecko")
private static double[] getCurrentNetworkInformation() { private static double[] getCurrentNetworkInformation() {
return GeckoNetworkManager.getInstance().getCurrentInformation(); return GeckoNetworkManager.getInstance().getCurrentInformation();

Просмотреть файл

@ -72,7 +72,7 @@ class GeckoInputConnection
private String mCurrentInputMethod = ""; private String mCurrentInputMethod = "";
private final GeckoView mView; private final View mView;
private final GeckoEditableClient mEditableClient; private final GeckoEditableClient mEditableClient;
protected int mBatchEditCount; protected int mBatchEditCount;
private ExtractedTextRequest mUpdateRequest; private ExtractedTextRequest mUpdateRequest;
@ -83,7 +83,7 @@ class GeckoInputConnection
// Prevent showSoftInput and hideSoftInput from causing reentrant calls on some devices. // Prevent showSoftInput and hideSoftInput from causing reentrant calls on some devices.
private volatile boolean mSoftInputReentrancyGuard; private volatile boolean mSoftInputReentrancyGuard;
public static GeckoEditableListener create(GeckoView targetView, public static GeckoEditableListener create(View targetView,
GeckoEditableClient editable) { GeckoEditableClient editable) {
if (DEBUG) if (DEBUG)
return DebugGeckoInputConnection.create(targetView, editable); return DebugGeckoInputConnection.create(targetView, editable);
@ -91,7 +91,7 @@ class GeckoInputConnection
return new GeckoInputConnection(targetView, editable); return new GeckoInputConnection(targetView, editable);
} }
protected GeckoInputConnection(GeckoView targetView, protected GeckoInputConnection(View targetView,
GeckoEditableClient editable) { GeckoEditableClient editable) {
super(targetView, true); super(targetView, true);
mView = targetView; mView = targetView;
@ -204,7 +204,7 @@ class GeckoInputConnection
return extract; return extract;
} }
private GeckoView getView() { private View getView() {
return mView; return mView;
} }
@ -236,10 +236,7 @@ class GeckoInputConnection
v.clearFocus(); v.clearFocus();
v.requestFocus(); v.requestFocus();
} }
final GeckoView view = getView(); GeckoAppShell.getLayerView().getDynamicToolbarAnimator().showToolbar(/*immediately*/true);
if (view != null) {
view.getDynamicToolbarAnimator().showToolbar(/*immediately*/ true);
}
mSoftInputReentrancyGuard = true; mSoftInputReentrancyGuard = true;
imm.showSoftInput(v, 0); imm.showSoftInput(v, 0);
mSoftInputReentrancyGuard = false; mSoftInputReentrancyGuard = false;
@ -362,18 +359,18 @@ class GeckoInputConnection
mCursorAnchorInfoBuilder.reset(); mCursorAnchorInfoBuilder.reset();
// Calculate Gecko logical coords to screen coords // Calculate Gecko logical coords to screen coords
final GeckoView view = getView(); final View v = getView();
if (view == null) { if (v == null) {
return; return;
} }
int[] viewCoords = new int[2]; int[] viewCoords = new int[2];
view.getLocationOnScreen(viewCoords); v.getLocationOnScreen(viewCoords);
DynamicToolbarAnimator animator = view.getDynamicToolbarAnimator(); DynamicToolbarAnimator animator = GeckoAppShell.getLayerView().getDynamicToolbarAnimator();
float toolbarHeight = (float) animator.getCurrentToolbarHeight(); float toolbarHeight = (float)animator.getCurrentToolbarHeight();
Matrix matrix = view.getMatrixForLayerRectToViewRect(); Matrix matrix = GeckoAppShell.getLayerView().getMatrixForLayerRectToViewRect();
if (matrix == null) { if (matrix == null) {
if (DEBUG) { if (DEBUG) {
Log.d(LOGTAG, "Cannot get Matrix to convert from Gecko coords to layer view coords"); Log.d(LOGTAG, "Cannot get Matrix to convert from Gecko coords to layer view coords");
@ -1037,13 +1034,13 @@ final class DebugGeckoInputConnection
private InputConnection mProxy; private InputConnection mProxy;
private final StringBuilder mCallLevel; private final StringBuilder mCallLevel;
private DebugGeckoInputConnection(GeckoView targetView, private DebugGeckoInputConnection(View targetView,
GeckoEditableClient editable) { GeckoEditableClient editable) {
super(targetView, editable); super(targetView, editable);
mCallLevel = new StringBuilder(); mCallLevel = new StringBuilder();
} }
public static GeckoEditableListener create(GeckoView targetView, public static GeckoEditableListener create(View targetView,
GeckoEditableClient editable) { GeckoEditableClient editable) {
final Class<?>[] PROXY_INTERFACES = { InputConnection.class, final Class<?>[] PROXY_INTERFACES = { InputConnection.class,
InputConnectionListener.class, InputConnectionListener.class,

Просмотреть файл

@ -488,6 +488,9 @@ public class GeckoView extends LayerView {
private void init(final Context context, final GeckoViewSettings settings) { private void init(final Context context, final GeckoViewSettings settings) {
preload(context); preload(context);
// Perform common initialization for Fennec/GeckoView.
GeckoAppShell.setLayerView(this);
initializeView(); initializeView();
mListener.registerListeners(); mListener.registerListeners();
@ -748,8 +751,7 @@ public class GeckoView extends LayerView {
mInputConnectionListener.onKeyMultiple(keyCode, repeatCount, event); mInputConnectionListener.onKeyMultiple(keyCode, repeatCount, event);
} }
@Override /* package */ boolean isIMEEnabled() {
public boolean isIMEEnabled() {
return mInputConnectionListener != null && return mInputConnectionListener != null &&
mInputConnectionListener.isIMEEnabled(); mInputConnectionListener.isIMEEnabled();
} }

Просмотреть файл

@ -1,20 +0,0 @@
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
* 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/. */
package org.mozilla.gecko;
import android.view.HapticFeedbackConstants;
/**
* A <code>HapticFeedbackDelegate</code> is responsible for performing haptic feedback.
*/
public interface HapticFeedbackDelegate {
/**
* Perform a haptic feedback effect. Called from the Gecko thread.
*
* @param effect Effect to perform from <code>android.view.HapticFeedbackConstants</code>.
*/
void performHapticFeedback(int effect);
}

Просмотреть файл

@ -33,7 +33,6 @@ class GeckoLayerClient implements LayerView.Listener
private IntSize mWindowSize; private IntSize mWindowSize;
private boolean mForceRedraw; private boolean mForceRedraw;
private boolean mImeWasEnabledOnLastResize;
/* The current viewport metrics. /* The current viewport metrics.
* This is volatile so that we can read and write to it from different threads. * This is volatile so that we can read and write to it from different threads.
@ -154,13 +153,7 @@ class GeckoLayerClient implements LayerView.Listener
// the following call also sends gecko a message, which will be processed after the resize // the following call also sends gecko a message, which will be processed after the resize
// message above has updated the viewport. this message ensures that if we have just put // message above has updated the viewport. this message ensures that if we have just put
// focus in a text field, we scroll the content so that the text field is in view. // focus in a text field, we scroll the content so that the text field is in view.
final boolean imeIsEnabled = mView.isIMEEnabled(); GeckoAppShell.viewSizeChanged();
if (imeIsEnabled && !mImeWasEnabledOnLastResize) {
// The IME just came up after not being up, so let's scroll
// to the focused input.
EventDispatcher.getInstance().dispatch("ScrollTo:FocusedInput", null);
}
mImeWasEnabledOnLastResize = imeIsEnabled;
} }
return true; return true;
} }

Просмотреть файл

@ -824,9 +824,5 @@ public class LayerView extends FrameLayout {
if (isCompositorReady()) { if (isCompositorReady()) {
mCompositor.setDefaultClearColor(mDefaultClearColor); mCompositor.setDefaultClearColor(mDefaultClearColor);
} }
} }
public boolean isIMEEnabled() {
return false;
}
} }

Просмотреть файл

@ -356,7 +356,7 @@ public class FennecNativeActions implements Actions {
PaintExpecter() { PaintExpecter() {
final PaintExpecter expecter = this; final PaintExpecter expecter = this;
mLayerView = (LayerView) mSolo.getView(R.id.layer_view); mLayerView = GeckoAppShell.getLayerView();
mDrawListener = new DrawListener() { mDrawListener = new DrawListener() {
@Override @Override
public void drawFinished() { public void drawFinished() {

Просмотреть файл

@ -356,8 +356,7 @@ abstract class BaseTest extends BaseRobocopTest {
// If we don't see the item, scroll down once in case it's off-screen. // If we don't see the item, scroll down once in case it's off-screen.
// Hacky way to scroll down. solo.scroll* does not work in dialogs. // Hacky way to scroll down. solo.scroll* does not work in dialogs.
MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mSolo, MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
mDriver.getGeckoLeft(), mDriver.getGeckoTop());
meh.dragSync(mScreenMidWidth, mScreenMidHeight+100, mScreenMidWidth, mScreenMidHeight-100); meh.dragSync(mScreenMidWidth, mScreenMidHeight+100, mScreenMidWidth, mScreenMidHeight-100);
foundText = mSolo.waitForText(txt); foundText = mSolo.waitForText(txt);

Просмотреть файл

@ -5,11 +5,8 @@
package org.mozilla.gecko.tests; package org.mozilla.gecko.tests;
import org.mozilla.gecko.GeckoAppShell; import org.mozilla.gecko.GeckoAppShell;
import org.mozilla.gecko.PrefsHelper;
import org.mozilla.gecko.R;
import org.mozilla.gecko.gfx.LayerView; import org.mozilla.gecko.gfx.LayerView;
import org.mozilla.gecko.PrefsHelper;
import com.robotium.solo.Solo;
import android.app.Instrumentation; import android.app.Instrumentation;
import android.os.SystemClock; import android.os.SystemClock;
@ -29,12 +26,11 @@ class MotionEventHelper {
private float mTouchStartTolerance; private float mTouchStartTolerance;
private final int mDpi; private final int mDpi;
public MotionEventHelper(Instrumentation inst, Solo solo, public MotionEventHelper(Instrumentation inst, int surfaceOffsetX, int surfaceOffsetY) {
int surfaceOffsetX, int surfaceOffsetY) {
mInstrumentation = inst; mInstrumentation = inst;
mSurfaceOffsetX = surfaceOffsetX; mSurfaceOffsetX = surfaceOffsetX;
mSurfaceOffsetY = surfaceOffsetY; mSurfaceOffsetY = surfaceOffsetY;
layerView = (LayerView) solo.getView(R.id.layer_view); layerView = GeckoAppShell.getLayerView();
mApzEnabled = false; mApzEnabled = false;
mTouchStartTolerance = 0.0f; mTouchStartTolerance = 0.0f;
mDpi = GeckoAppShell.getDpi(); mDpi = GeckoAppShell.getDpi();

Просмотреть файл

@ -19,8 +19,7 @@ public class testAxisLocking extends PixelTest {
public void testAxisLocking() { public void testAxisLocking() {
String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BOXES_URL); String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BOXES_URL);
MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mSolo, MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
mDriver.getGeckoLeft(), mDriver.getGeckoTop());
blockForGeckoReady(); blockForGeckoReady();

Просмотреть файл

@ -17,8 +17,7 @@ public class testFlingCorrectness extends PixelTest {
public void testFlingCorrectness() { public void testFlingCorrectness() {
String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BOXES_URL); String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BOXES_URL);
MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mSolo, MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
mDriver.getGeckoLeft(), mDriver.getGeckoTop());
blockForGeckoReady(); blockForGeckoReady();

Просмотреть файл

@ -17,8 +17,7 @@ public class testPanCorrectness extends PixelTest {
public void testPanCorrectness() { public void testPanCorrectness() {
String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BOXES_URL); String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BOXES_URL);
MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mSolo, MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
mDriver.getGeckoLeft(), mDriver.getGeckoTop());
blockForGeckoReady(); blockForGeckoReady();

Просмотреть файл

@ -29,8 +29,7 @@ public class testVkbOverlap extends PixelTest {
// scroll to the bottom of the page and let it settle // scroll to the bottom of the page and let it settle
Actions.RepeatedEventExpecter paintExpecter = mActions.expectPaint(); Actions.RepeatedEventExpecter paintExpecter = mActions.expectPaint();
MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mSolo, MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
mDriver.getGeckoLeft(), mDriver.getGeckoTop());
meh.dragSync(10, 150, 10, 50); meh.dragSync(10, 150, 10, 50);
// the input field has a green background, so let's count the number of green pixels // the input field has a green background, so let's count the number of green pixels

Просмотреть файл

@ -5051,16 +5051,6 @@ fi
AC_SUBST(PREPROCESS_OPTION) AC_SUBST(PREPROCESS_OPTION)
dnl ========================================================
dnl mask as shorthand property
dnl ========================================================
# The control structure code will be removed as soon as the feature is stable
# Refer to bug 1281101 for more details.
MOZ_ENABLE_MASK_AS_SHORTHAND=1
AC_DEFINE(MOZ_ENABLE_MASK_AS_SHORTHAND)
AC_SUBST(MOZ_ENABLE_MASK_AS_SHORTHAND)
# Avoid using obsolete NSPR features # Avoid using obsolete NSPR features
AC_DEFINE(NO_NSPR_10_SUPPORT) AC_DEFINE(NO_NSPR_10_SUPPORT)

Просмотреть файл

@ -630,6 +630,10 @@ fn as_element<'le>(node: LayoutJS<Node>) -> Option<ServoLayoutElement<'le>> {
impl<'le> ::selectors::Element for ServoLayoutElement<'le> { impl<'le> ::selectors::Element for ServoLayoutElement<'le> {
type Impl = SelectorImpl; type Impl = SelectorImpl;
fn opaque(&self) -> ::selectors::OpaqueElement {
::selectors::OpaqueElement::new(self.as_node().opaque().0 as *const ())
}
fn parent_element(&self) -> Option<ServoLayoutElement<'le>> { fn parent_element(&self) -> Option<ServoLayoutElement<'le>> {
unsafe { unsafe {
self.element.upcast().parent_node_ref().and_then(as_element) self.element.upcast().parent_node_ref().and_then(as_element)
@ -1168,6 +1172,11 @@ impl<'le> ThreadSafeLayoutElement for ServoThreadSafeLayoutElement<'le> {
impl<'le> ::selectors::Element for ServoThreadSafeLayoutElement<'le> { impl<'le> ::selectors::Element for ServoThreadSafeLayoutElement<'le> {
type Impl = SelectorImpl; type Impl = SelectorImpl;
fn opaque(&self) -> ::selectors::OpaqueElement {
::selectors::OpaqueElement::new(self.as_node().opaque().0 as *const ())
}
fn parent_element(&self) -> Option<Self> { fn parent_element(&self) -> Option<Self> {
warn!("ServoThreadSafeLayoutElement::parent_element called"); warn!("ServoThreadSafeLayoutElement::parent_element called");
None None

Просмотреть файл

@ -2500,6 +2500,10 @@ impl VirtualMethods for Element {
impl<'a> ::selectors::Element for Root<Element> { impl<'a> ::selectors::Element for Root<Element> {
type Impl = SelectorImpl; type Impl = SelectorImpl;
fn opaque(&self) -> ::selectors::OpaqueElement {
::selectors::OpaqueElement::new(self.reflector().get_jsobject().get())
}
fn parent_element(&self) -> Option<Root<Element>> { fn parent_element(&self) -> Option<Root<Element>> {
self.upcast::<Node>().GetParentElement() self.upcast::<Node>().GetParentElement()
} }

Просмотреть файл

@ -4,6 +4,7 @@
use attr::CaseSensitivity; use attr::CaseSensitivity;
use bloom::BloomFilter; use bloom::BloomFilter;
use nth_index_cache::NthIndexCache;
/// What kind of selector matching mode we should use. /// What kind of selector matching mode we should use.
/// ///
@ -69,12 +70,6 @@ impl QuirksMode {
} }
} }
/// A cache to speed up matching of nth-index-like selectors.
///
/// NB: This is just a dummy type right now, it will be fleshed out in later patches.
#[derive(Default)]
pub struct NthIndexCache(usize);
/// Data associated with the matching process for a element. This context is /// Data associated with the matching process for a element. This context is
/// used across many selectors for an element, so it's not appropriate for /// used across many selectors for an element, so it's not appropriate for
/// transient data that applies to only a single selector. /// transient data that applies to only a single selector.
@ -84,7 +79,7 @@ pub struct MatchingContext<'a> {
/// Input with the bloom filter used to fast-reject selectors. /// Input with the bloom filter used to fast-reject selectors.
pub bloom_filter: Option<&'a BloomFilter>, pub bloom_filter: Option<&'a BloomFilter>,
/// An optional cache to speed up nth-index-like selectors. /// An optional cache to speed up nth-index-like selectors.
nth_index_cache: Option<&'a mut NthIndexCache>, pub nth_index_cache: Option<&'a mut NthIndexCache>,
/// Input that controls how matching for links is handled. /// Input that controls how matching for links is handled.
pub visited_handling: VisitedHandlingMode, pub visited_handling: VisitedHandlingMode,
/// Output that records whether we encountered a "relevant link" while /// Output that records whether we encountered a "relevant link" while

Просмотреть файл

@ -24,6 +24,7 @@ pub mod bloom;
mod builder; mod builder;
pub mod context; pub mod context;
pub mod matching; pub mod matching;
mod nth_index_cache;
pub mod parser; pub mod parser;
#[cfg(test)] mod size_of_tests; #[cfg(test)] mod size_of_tests;
#[cfg(any(test, feature = "gecko_like_types"))] pub mod gecko_like_types; #[cfg(any(test, feature = "gecko_like_types"))] pub mod gecko_like_types;
@ -31,5 +32,6 @@ pub mod sink;
mod tree; mod tree;
pub mod visitor; pub mod visitor;
pub use nth_index_cache::NthIndexCache;
pub use parser::{SelectorImpl, Parser, SelectorList}; pub use parser::{SelectorImpl, Parser, SelectorList};
pub use tree::Element; pub use tree::{Element, OpaqueElement};

Просмотреть файл

@ -4,6 +4,7 @@
use attr::{ParsedAttrSelectorOperation, AttrSelectorOperation, NamespaceConstraint}; use attr::{ParsedAttrSelectorOperation, AttrSelectorOperation, NamespaceConstraint};
use bloom::{BLOOM_HASH_MASK, BloomFilter}; use bloom::{BLOOM_HASH_MASK, BloomFilter};
use nth_index_cache::NthIndexCacheInner;
use parser::{AncestorHashes, Combinator, Component, LocalName}; use parser::{AncestorHashes, Combinator, Component, LocalName};
use parser::{Selector, SelectorImpl, SelectorIter, SelectorList}; use parser::{Selector, SelectorImpl, SelectorIter, SelectorList};
use std::borrow::Borrow; use std::borrow::Borrow;
@ -787,7 +788,20 @@ fn matches_generic_nth_child<E, F>(element: &E,
HAS_SLOW_SELECTOR_LATER_SIBLINGS HAS_SLOW_SELECTOR_LATER_SIBLINGS
}); });
let index = nth_child_index(element, is_of_type, is_from_end); // Grab a reference to the appropriate cache.
let mut cache = context.shared.nth_index_cache.as_mut().map(|c| {
c.get(is_of_type, is_from_end)
});
// Lookup or compute the index.
let index = if let Some(i) = cache.as_mut().and_then(|c| c.lookup(element.opaque())) {
i
} else {
let i = nth_child_index(element, is_of_type, is_from_end, cache.as_mut().map(|s| &mut **s));
cache.as_mut().map(|c| c.insert(element.opaque(), i));
i
};
debug_assert_eq!(index, nth_child_index(element, is_of_type, is_from_end, None), "invalid cache");
// Is there a non-negative integer n such that An+B=index? // Is there a non-negative integer n such that An+B=index?
match index.checked_sub(b) { match index.checked_sub(b) {
@ -799,41 +813,60 @@ fn matches_generic_nth_child<E, F>(element: &E,
} }
} }
#[inline]
fn same_type<E: Element>(a: &E, b: &E) -> bool {
a.get_local_name() == b.get_local_name() &&
a.get_namespace() == b.get_namespace()
}
#[inline] #[inline]
fn nth_child_index<E>( fn nth_child_index<E>(
element: &E, element: &E,
is_of_type: bool, is_of_type: bool,
is_from_end: bool, is_from_end: bool,
mut cache: Option<&mut NthIndexCacheInner>,
) -> i32 ) -> i32
where where
E: Element, E: Element,
{ {
let mut index: i32 = 1; // The traversal mostly processes siblings left to right. So when we walk
let mut next_sibling = if is_from_end { // siblings to the right when computing NthLast/NthLastOfType we're unlikely
element.next_sibling_element() // to get cache hits along the way. As such, we take the hit of walking the
} else { // siblings to the left checking the cache in the is_from_end case (this
element.prev_sibling_element() // matches what Gecko does). The indices-from-the-left is handled during the
}; // regular look further below.
if let Some(ref mut c) = cache {
loop { if is_from_end && !c.is_empty() {
let sibling = match next_sibling { let mut index: i32 = 1;
None => break, let mut curr = element.clone();
Some(next_sibling) => next_sibling while let Some(e) = curr.prev_sibling_element() {
}; curr = e;
if !is_of_type || same_type(element, &curr) {
if is_of_type { if let Some(i) = c.lookup(curr.opaque()) {
if element.get_local_name() == sibling.get_local_name() && return i - index;
element.get_namespace() == sibling.get_namespace() { }
index += 1; index += 1;
}
} }
} else {
index += 1;
} }
next_sibling = if is_from_end { }
sibling.next_sibling_element()
} else { let mut index: i32 = 1;
sibling.prev_sibling_element() let mut curr = element.clone();
}; let next = |e: E| if is_from_end { e.next_sibling_element() } else { e.prev_sibling_element() };
while let Some(e) = next(curr) {
curr = e;
if !is_of_type || same_type(element, &curr) {
// If we're computing indices from the left, check each element in the
// cache. We handle the indices-from-the-right case at the top of this
// function.
if !is_from_end {
if let Some(i) = cache.as_mut().and_then(|c| c.lookup(curr.opaque())) {
return i + index
}
}
index += 1;
}
} }
index index

Просмотреть файл

@ -0,0 +1,56 @@
/* 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 fnv::FnvHashMap;
use tree::OpaqueElement;
/// A cache to speed up matching of nth-index-like selectors.
///
/// See [1] for some discussion around the design tradeoffs.
///
/// [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1401855#c3
#[derive(Default)]
pub struct NthIndexCache {
nth: NthIndexCacheInner,
nth_last: NthIndexCacheInner,
nth_of_type: NthIndexCacheInner,
nth_last_of_type: NthIndexCacheInner,
}
impl NthIndexCache {
/// Gets the appropriate cache for the given parameters.
pub fn get(
&mut self,
is_of_type: bool,
is_from_end: bool
) -> &mut NthIndexCacheInner {
match (is_of_type, is_from_end) {
(false, false) => &mut self.nth,
(false, true) => &mut self.nth_last,
(true, false) => &mut self.nth_of_type,
(true, true) => &mut self.nth_last_of_type,
}
}
}
/// The concrete per-pseudo-class cache.
#[derive(Default)]
pub struct NthIndexCacheInner(FnvHashMap<OpaqueElement, i32>);
impl NthIndexCacheInner {
/// Does a lookup for a given element in the cache.
pub fn lookup(&mut self, el: OpaqueElement) -> Option<i32> {
self.0.get(&el).map(|x| *x)
}
/// Inserts an entry into the cache.
pub fn insert(&mut self, element: OpaqueElement, index: i32) {
self.0.insert(element, index);
}
/// Returns whether the cache is empty.
pub fn is_empty(&self) -> bool {
self.0.is_empty()
}
}

Просмотреть файл

@ -8,11 +8,27 @@
use attr::{AttrSelectorOperation, NamespaceConstraint, CaseSensitivity}; use attr::{AttrSelectorOperation, NamespaceConstraint, CaseSensitivity};
use matching::{ElementSelectorFlags, LocalMatchingContext, MatchingContext, RelevantLinkStatus}; use matching::{ElementSelectorFlags, LocalMatchingContext, MatchingContext, RelevantLinkStatus};
use parser::SelectorImpl; use parser::SelectorImpl;
use servo_arc::NonZeroPtrMut;
use std::fmt::Debug; use std::fmt::Debug;
pub trait Element: Sized + Debug { /// Opaque representation of an Element, for identity comparisons. We use
/// NonZeroPtrMut to get the NonZero optimization.
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct OpaqueElement(pub NonZeroPtrMut<()>);
impl OpaqueElement {
/// Creates a new OpaqueElement from an arbitrarily-typed pointer.
pub fn new<T>(ptr: *const T) -> Self {
OpaqueElement(NonZeroPtrMut::new(ptr as *const () as *mut ()))
}
}
pub trait Element: Sized + Clone + Debug {
type Impl: SelectorImpl; type Impl: SelectorImpl;
/// Converts self into an opaque representation.
fn opaque(&self) -> OpaqueElement;
fn parent_element(&self) -> Option<Self>; fn parent_element(&self) -> Option<Self>;
/// The parent of a given pseudo-element, after matching a pseudo-element /// The parent of a given pseudo-element, after matching a pseudo-element

Просмотреть файл

@ -23,7 +23,7 @@ use properties::ComputedValues;
use rule_cache::RuleCache; use rule_cache::RuleCache;
use rule_tree::StrongRuleNode; use rule_tree::StrongRuleNode;
use selector_parser::{EAGER_PSEUDO_COUNT, SnapshotMap}; use selector_parser::{EAGER_PSEUDO_COUNT, SnapshotMap};
use selectors::context::NthIndexCache; use selectors::NthIndexCache;
use selectors::matching::ElementSelectorFlags; use selectors::matching::ElementSelectorFlags;
use servo_arc::Arc; use servo_arc::Arc;
#[cfg(feature = "servo")] use servo_atoms::Atom; #[cfg(feature = "servo")] use servo_atoms::Atom;

Просмотреть файл

@ -76,7 +76,7 @@ use properties::animated_properties::TransitionProperty;
use properties::style_structs::Font; use properties::style_structs::Font;
use rule_tree::CascadeLevel as ServoCascadeLevel; use rule_tree::CascadeLevel as ServoCascadeLevel;
use selector_parser::{AttrValue, ElementExt, PseudoClassStringArg}; use selector_parser::{AttrValue, ElementExt, PseudoClassStringArg};
use selectors::Element; use selectors::{Element, OpaqueElement};
use selectors::attr::{AttrSelectorOperation, AttrSelectorOperator, CaseSensitivity, NamespaceConstraint}; use selectors::attr::{AttrSelectorOperation, AttrSelectorOperator, CaseSensitivity, NamespaceConstraint};
use selectors::matching::{ElementSelectorFlags, LocalMatchingContext, MatchingContext}; use selectors::matching::{ElementSelectorFlags, LocalMatchingContext, MatchingContext};
use selectors::matching::{RelevantLinkStatus, VisitedHandlingMode}; use selectors::matching::{RelevantLinkStatus, VisitedHandlingMode};
@ -1682,6 +1682,10 @@ impl<'le> PresentationalHintsSynthesizer for GeckoElement<'le> {
impl<'le> ::selectors::Element for GeckoElement<'le> { impl<'le> ::selectors::Element for GeckoElement<'le> {
type Impl = SelectorImpl; type Impl = SelectorImpl;
fn opaque(&self) -> OpaqueElement {
OpaqueElement::new(self.0)
}
fn parent_element(&self) -> Option<Self> { fn parent_element(&self) -> Option<Self> {
// FIXME(emilio): This will need to jump across if the parent node is a // FIXME(emilio): This will need to jump across if the parent node is a
// shadow root to get the shadow host. // shadow root to get the shadow host.

Просмотреть файл

@ -9,7 +9,7 @@ use {Atom, CaseSensitivityExt, LocalName, Namespace};
use dom::TElement; use dom::TElement;
use element_state::ElementState; use element_state::ElementState;
use selector_parser::{NonTSPseudoClass, PseudoElement, SelectorImpl, Snapshot, SnapshotMap, AttrValue}; use selector_parser::{NonTSPseudoClass, PseudoElement, SelectorImpl, Snapshot, SnapshotMap, AttrValue};
use selectors::Element; use selectors::{Element, OpaqueElement};
use selectors::attr::{AttrSelectorOperation, CaseSensitivity, NamespaceConstraint}; use selectors::attr::{AttrSelectorOperation, CaseSensitivity, NamespaceConstraint};
use selectors::matching::{ElementSelectorFlags, LocalMatchingContext, MatchingContext}; use selectors::matching::{ElementSelectorFlags, LocalMatchingContext, MatchingContext};
use selectors::matching::RelevantLinkStatus; use selectors::matching::RelevantLinkStatus;
@ -258,6 +258,10 @@ impl<'a, E> Element for ElementWrapper<'a, E>
self.element.is_link() self.element.is_link()
} }
fn opaque(&self) -> OpaqueElement {
self.element.opaque()
}
fn parent_element(&self) -> Option<Self> { fn parent_element(&self) -> Option<Self> {
self.element.parent_element() self.element.parent_element()
.map(|e| ElementWrapper::new(e, self.snapshot_map)) .map(|e| ElementWrapper::new(e, self.snapshot_map))

Просмотреть файл

@ -10,7 +10,7 @@ use Atom;
use bloom::StyleBloom; use bloom::StyleBloom;
use context::{SelectorFlagsMap, SharedStyleContext}; use context::{SelectorFlagsMap, SharedStyleContext};
use dom::TElement; use dom::TElement;
use selectors::context::NthIndexCache; use selectors::NthIndexCache;
use sharing::{StyleSharingCandidate, StyleSharingTarget}; use sharing::{StyleSharingCandidate, StyleSharingTarget};
/// Determines whether a target and a candidate have compatible parents for sharing. /// Determines whether a target and a candidate have compatible parents for sharing.

Просмотреть файл

@ -75,7 +75,7 @@ use matching::MatchMethods;
use owning_ref::OwningHandle; use owning_ref::OwningHandle;
use properties::ComputedValues; use properties::ComputedValues;
use rule_tree::StrongRuleNode; use rule_tree::StrongRuleNode;
use selectors::context::NthIndexCache; use selectors::NthIndexCache;
use selectors::matching::{ElementSelectorFlags, VisitedHandlingMode}; use selectors::matching::{ElementSelectorFlags, VisitedHandlingMode};
use servo_arc::{Arc, NonZeroPtrMut}; use servo_arc::{Arc, NonZeroPtrMut};
use smallbitvec::SmallBitVec; use smallbitvec::SmallBitVec;

Просмотреть файл

@ -28,9 +28,10 @@ use properties::IS_LINK;
use rule_tree::{CascadeLevel, RuleTree, StrongRuleNode, StyleSource}; use rule_tree::{CascadeLevel, RuleTree, StrongRuleNode, StyleSource};
use selector_map::{PrecomputedHashMap, SelectorMap, SelectorMapEntry}; use selector_map::{PrecomputedHashMap, SelectorMap, SelectorMapEntry};
use selector_parser::{SelectorImpl, PerPseudoElementMap, PseudoElement}; use selector_parser::{SelectorImpl, PerPseudoElementMap, PseudoElement};
use selectors::NthIndexCache;
use selectors::attr::NamespaceConstraint; use selectors::attr::NamespaceConstraint;
use selectors::bloom::{BloomFilter, NonCountingBloomFilter}; use selectors::bloom::{BloomFilter, NonCountingBloomFilter};
use selectors::matching::{ElementSelectorFlags, matches_selector, MatchingContext, MatchingMode, NthIndexCache}; use selectors::matching::{ElementSelectorFlags, matches_selector, MatchingContext, MatchingMode};
use selectors::matching::VisitedHandlingMode; use selectors::matching::VisitedHandlingMode;
use selectors::parser::{AncestorHashes, Combinator, Component, Selector}; use selectors::parser::{AncestorHashes, Combinator, Component, Selector};
use selectors::parser::{SelectorIter, SelectorMethods}; use selectors::parser::{SelectorIter, SelectorMethods};

Просмотреть файл

@ -22,4 +22,3 @@
[Event interface: existence and properties of interface object] [Event interface: existence and properties of interface object]
expected: FAIL expected: FAIL

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,5 +0,0 @@
[access-control-basic-cors-safelisted-request-headers.htm]
type: testharness
[Request with CORS-safelisted headers]
expected: FAIL

Просмотреть файл

@ -2,4 +2,3 @@
type: testharness type: testharness
[XHR method GET with MIME type image/png] [XHR method GET with MIME type image/png]
expected: FAIL expected: FAIL

Просмотреть файл

@ -1,3 +0,0 @@
[send-after-setting-document-domain.htm]
expected:
if debug and stylo and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): CRASH

Просмотреть файл

@ -1,3 +1,2 @@
[send-response-event-order.htm] [send-response-event-order.htm]
type: testharness
disabled: if (os == "win"): https://bugzilla.mozilla.org/show_bug.cgi?id=1370056 disabled: if (os == "win"): https://bugzilla.mozilla.org/show_bug.cgi?id=1370056

Просмотреть файл

@ -249,102 +249,3 @@
[Accelerometer interface: new GravitySensor(); must inherit property "z" with the proper type] [Accelerometer interface: new GravitySensor(); must inherit property "z" with the proper type]
expected: FAIL expected: FAIL
[Sensor interface: existence and properties of interface object]
expected: FAIL
[Sensor interface object length]
expected: FAIL
[Sensor interface object name]
expected: FAIL
[Sensor interface: existence and properties of interface prototype object]
expected: FAIL
[Sensor interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[Sensor interface: attribute activated]
expected: FAIL
[Sensor interface: attribute timestamp]
expected: FAIL
[Sensor interface: operation start()]
expected: FAIL
[Sensor interface: operation stop()]
expected: FAIL
[Sensor interface: attribute onreading]
expected: FAIL
[Sensor interface: attribute onactivate]
expected: FAIL
[Sensor interface: attribute onerror]
expected: FAIL
[Sensor interface: new Accelerometer(); must inherit property "activated" with the proper type]
expected: FAIL
[Sensor interface: new Accelerometer(); must inherit property "timestamp" with the proper type]
expected: FAIL
[Sensor interface: new Accelerometer(); must inherit property "start()" with the proper type]
expected: FAIL
[Sensor interface: new Accelerometer(); must inherit property "stop()" with the proper type]
expected: FAIL
[Sensor interface: new Accelerometer(); must inherit property "onreading" with the proper type]
expected: FAIL
[Sensor interface: new Accelerometer(); must inherit property "onactivate" with the proper type]
expected: FAIL
[Sensor interface: new Accelerometer(); must inherit property "onerror" with the proper type]
expected: FAIL
[Sensor interface: new LinearAccelerationSensor(); must inherit property "activated" with the proper type]
expected: FAIL
[Sensor interface: new LinearAccelerationSensor(); must inherit property "timestamp" with the proper type]
expected: FAIL
[Sensor interface: new LinearAccelerationSensor(); must inherit property "start()" with the proper type]
expected: FAIL
[Sensor interface: new LinearAccelerationSensor(); must inherit property "stop()" with the proper type]
expected: FAIL
[Sensor interface: new LinearAccelerationSensor(); must inherit property "onreading" with the proper type]
expected: FAIL
[Sensor interface: new LinearAccelerationSensor(); must inherit property "onactivate" with the proper type]
expected: FAIL
[Sensor interface: new LinearAccelerationSensor(); must inherit property "onerror" with the proper type]
expected: FAIL
[Sensor interface: new GravitySensor(); must inherit property "activated" with the proper type]
expected: FAIL
[Sensor interface: new GravitySensor(); must inherit property "timestamp" with the proper type]
expected: FAIL
[Sensor interface: new GravitySensor(); must inherit property "start()" with the proper type]
expected: FAIL
[Sensor interface: new GravitySensor(); must inherit property "stop()" with the proper type]
expected: FAIL
[Sensor interface: new GravitySensor(); must inherit property "onreading" with the proper type]
expected: FAIL
[Sensor interface: new GravitySensor(); must inherit property "onactivate" with the proper type]
expected: FAIL
[Sensor interface: new GravitySensor(); must inherit property "onerror" with the proper type]
expected: FAIL

Просмотреть файл

@ -87,60 +87,3 @@
[AmbientLightSensor interface: new AmbientLightSensor(); must inherit property "illuminance" with the proper type] [AmbientLightSensor interface: new AmbientLightSensor(); must inherit property "illuminance" with the proper type]
expected: FAIL expected: FAIL
[Sensor interface: existence and properties of interface object]
expected: FAIL
[Sensor interface object length]
expected: FAIL
[Sensor interface object name]
expected: FAIL
[Sensor interface: existence and properties of interface prototype object]
expected: FAIL
[Sensor interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[Sensor interface: attribute activated]
expected: FAIL
[Sensor interface: attribute timestamp]
expected: FAIL
[Sensor interface: operation start()]
expected: FAIL
[Sensor interface: operation stop()]
expected: FAIL
[Sensor interface: attribute onreading]
expected: FAIL
[Sensor interface: attribute onactivate]
expected: FAIL
[Sensor interface: attribute onerror]
expected: FAIL
[Sensor interface: new AmbientLightSensor(); must inherit property "activated" with the proper type]
expected: FAIL
[Sensor interface: new AmbientLightSensor(); must inherit property "timestamp" with the proper type]
expected: FAIL
[Sensor interface: new AmbientLightSensor(); must inherit property "start()" with the proper type]
expected: FAIL
[Sensor interface: new AmbientLightSensor(); must inherit property "stop()" with the proper type]
expected: FAIL
[Sensor interface: new AmbientLightSensor(); must inherit property "onreading" with the proper type]
expected: FAIL
[Sensor interface: new AmbientLightSensor(); must inherit property "onactivate" with the proper type]
expected: FAIL
[Sensor interface: new AmbientLightSensor(); must inherit property "onerror" with the proper type]
expected: FAIL

Просмотреть файл

@ -1,5 +0,0 @@
[content-security-policy.https.window.html]
type: testharness
[fetch blocked by CSP should reject]
expected: FAIL

Просмотреть файл

@ -1,14 +0,0 @@
[credentials-in-url.https.window.html]
type: testharness
[fetch without credentials in URL should register ok]
expected: FAIL
[fetch with username and password in URL should reject]
expected: FAIL
[fetch with username and empty password in URL should reject]
expected: FAIL
[fetch with empty username and password in URL should reject]
expected: FAIL

Просмотреть файл

@ -1,5 +0,0 @@
[dangling-markup.https.window.html]
type: testharness
[fetch to URL containing \\n and < should reject]
expected: FAIL

Просмотреть файл

@ -1,38 +0,0 @@
[mixed-content-and-allowed-schemes.https.window.html]
type: testharness
[https: fetch should register ok]
expected: FAIL
[loopback IPv4 http: fetch should register ok]
expected: FAIL
[loopback IPv6 http: fetch should register ok]
expected: FAIL
[non-loopback http: fetch should reject]
expected: FAIL
[non-loopback IPv4 http: fetch should reject]
expected: FAIL
[non-loopback IPv6 http: fetch should reject]
expected: FAIL
[https: and non-loopback http: fetch should reject]
expected: FAIL
[non-loopback http: and https: fetch should reject]
expected: FAIL
[wss: fetch should reject]
expected: FAIL
[file: fetch should reject]
expected: FAIL
[data: fetch should reject]
expected: FAIL
[unknown scheme fetch should reject]
expected: FAIL

Просмотреть файл

@ -1,20 +0,0 @@
[port-blocking.https.window.html]
type: testharness
[fetch to default https port should register ok]
expected: FAIL
[fetch to default http port should register ok]
expected: FAIL
[fetch to port 443 should register ok]
expected: FAIL
[fetch to port 80 should register ok, even over https]
expected: FAIL
[fetch to non-default non-bad port (8080) should register ok]
expected: FAIL
[fetch to bad port (SMTP) should reject]
expected: FAIL

Просмотреть файл

@ -0,0 +1,11 @@
[object-src-applet-archive-codebase.sub.html]
type: testharness
expected:
if not debug and (os == "mac") and (version == "OS X 10.8") and (processor == "x86_64") and (bits == 64): TIMEOUT
if debug and (os == "mac") and (version == "OS X 10.8") and (processor == "x86_64") and (bits == 64): TIMEOUT
[Expecting logs: ["PASS"\]]
expected: NOTRUN
[Violation report status OK.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,11 @@
[object-src-applet-archive.sub.html]
type: testharness
expected:
if not debug and (os == "mac") and (version == "OS X 10.8") and (processor == "x86_64") and (bits == 64): TIMEOUT
if debug and (os == "mac") and (version == "OS X 10.8") and (processor == "x86_64") and (bits == 64): TIMEOUT
[Expecting logs: ["PASS"\]]
expected: NOTRUN
[Violation report status OK.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,11 @@
[object-src-applet-code-codebase.sub.html]
type: testharness
expected:
if not debug and (os == "mac") and (version == "OS X 10.8") and (processor == "x86_64") and (bits == 64): TIMEOUT
if debug and (os == "mac") and (version == "OS X 10.8") and (processor == "x86_64") and (bits == 64): TIMEOUT
[Expecting logs: ["PASS"\]]
expected: NOTRUN
[Violation report status OK.]
expected: FAIL

Просмотреть файл

@ -0,0 +1,11 @@
[object-src-applet-code.sub.html]
type: testharness
expected:
if not debug and (os == "mac") and (version == "OS X 10.8") and (processor == "x86_64") and (bits == 64): TIMEOUT
if debug and (os == "mac") and (version == "OS X 10.8") and (processor == "x86_64") and (bits == 64): TIMEOUT
[Expecting logs: ["PASS"\]]
expected: NOTRUN
[Violation report status OK.]
expected: FAIL

Просмотреть файл

@ -1,3 +0,0 @@
[parse-input-arguments-019.html]
type: reftest
expected: FAIL

Просмотреть файл

@ -1,3 +0,0 @@
[parse-input-arguments-020.html]
type: reftest
expected: FAIL

Просмотреть файл

@ -1,3 +0,0 @@
[parse-input-arguments-021.html]
type: reftest
expected: FAIL

Просмотреть файл

@ -1,3 +0,0 @@
[parse-input-arguments-022.html]
type: reftest
expected: FAIL

Просмотреть файл

@ -0,0 +1,3 @@
[attribute-value-selector-002.xht]
type: reftest
expected: FAIL

Просмотреть файл

@ -1,5 +0,0 @@
[grid-alignment-implies-size-change-007.html]
type: testharness
[.before 1]
expected: FAIL

Просмотреть файл

@ -1,5 +0,0 @@
[grid-alignment-implies-size-change-009.html]
type: testharness
[.before 1]
expected: FAIL

Просмотреть файл

@ -1,5 +0,0 @@
[grid-alignment-implies-size-change-017.html]
type: testharness
[.before 1]
expected: FAIL

Просмотреть файл

@ -1,5 +0,0 @@
[grid-alignment-implies-size-change-025.html]
type: testharness
[.before 1]
expected: FAIL

Просмотреть файл

@ -1,5 +0,0 @@
[grid-alignment-implies-size-change-027.html]
type: testharness
[.before 1]
expected: FAIL

Просмотреть файл

@ -1,5 +0,0 @@
[grid-alignment-implies-size-change-035.html]
type: testharness
[.before 1]
expected: FAIL

Просмотреть файл

@ -1,3 +0,0 @@
[grid-minimum-size-grid-items-007.html]
type: reftest
expected: FAIL

Просмотреть файл

@ -1,3 +0,0 @@
[grid-minimum-size-grid-items-009.html]
type: reftest
expected: FAIL

Просмотреть файл

@ -1,17 +1,14 @@
[grid-minimum-size-grid-items-021.html] [grid-minimum-size-grid-items-021.html]
type: testharness type: testharness
[grid-2.gridTemplateRows] [grid-3.height]
expected: FAIL expected: FAIL
[grid-4.gridTemplateRows] [grid-3.gridTemplateRows]
expected: FAIL expected: FAIL
[grid-8.gridTemplateRows] [grid-9.height]
expected: FAIL expected: FAIL
[grid-10.gridTemplateRows] [grid-9.gridTemplateRows]
expected: FAIL
[grid-12.gridTemplateRows]
expected: FAIL expected: FAIL

Просмотреть файл

@ -0,0 +1,3 @@
[logicalprops-quirklength.html]
type: testharness
expected: ERROR

Просмотреть файл

@ -31,4 +31,3 @@
[circle(calc(25%*3)) - computed style] [circle(calc(25%*3)) - computed style]
expected: FAIL expected: FAIL

Просмотреть файл

@ -43,4 +43,3 @@
[circle(at calc((12.5%*6 + 10in) / 4)) - computed style] [circle(at calc((12.5%*6 + 10in) / 4)) - computed style]
expected: FAIL expected: FAIL

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше