зеркало из https://github.com/mozilla/gecko-dev.git
Merge inbound to mozilla-central a=merge
This commit is contained in:
Коммит
e06af9c36a
|
@ -13,6 +13,8 @@ support-files =
|
||||||
|
|
||||||
[browser_0_library_left_pane_migration.js]
|
[browser_0_library_left_pane_migration.js]
|
||||||
[browser_addBookmarkForFrame.js]
|
[browser_addBookmarkForFrame.js]
|
||||||
|
[browser_bookmark_add_tags.js]
|
||||||
|
skip-if = (os == 'win' && ccov) # Bug 1423667
|
||||||
[browser_bookmark_folder_moveability.js]
|
[browser_bookmark_folder_moveability.js]
|
||||||
skip-if = (os == 'win' && ccov) # Bug 1423667
|
skip-if = (os == 'win' && ccov) # Bug 1423667
|
||||||
[browser_bookmark_remove_tags.js]
|
[browser_bookmark_remove_tags.js]
|
||||||
|
@ -30,7 +32,6 @@ skip-if = (os == 'win' && ccov) # Bug 1423667
|
||||||
skip-if = (os == 'win' && ccov) # Bug 1423667
|
skip-if = (os == 'win' && ccov) # Bug 1423667
|
||||||
[browser_bookmarkProperties_addLivemark.js]
|
[browser_bookmarkProperties_addLivemark.js]
|
||||||
skip-if = (os == 'win' && ccov) # Bug 1423667
|
skip-if = (os == 'win' && ccov) # Bug 1423667
|
||||||
[browser_bookmarkProperties_addTags.js]
|
|
||||||
[browser_bookmarkProperties_bookmarkAllTabs.js]
|
[browser_bookmarkProperties_bookmarkAllTabs.js]
|
||||||
skip-if = (os == 'win' && ccov) # Bug 1423667
|
skip-if = (os == 'win' && ccov) # Bug 1423667
|
||||||
[browser_bookmarkProperties_cancel.js]
|
[browser_bookmarkProperties_cancel.js]
|
||||||
|
@ -56,8 +57,6 @@ subsuite = clipboard
|
||||||
[browser_drag_bookmarks_on_toolbar.js]
|
[browser_drag_bookmarks_on_toolbar.js]
|
||||||
[browser_forgetthissite_single.js]
|
[browser_forgetthissite_single.js]
|
||||||
[browser_history_sidebar_search.js]
|
[browser_history_sidebar_search.js]
|
||||||
[browser_library_add_tags.js]
|
|
||||||
skip-if = (os == 'win' && ccov) # Bug 1423667
|
|
||||||
[browser_library_batch_delete.js]
|
[browser_library_batch_delete.js]
|
||||||
skip-if = (os == 'win' && ccov) # Bug 1423667
|
skip-if = (os == 'win' && ccov) # Bug 1423667
|
||||||
[browser_library_commands.js]
|
[browser_library_commands.js]
|
||||||
|
|
|
@ -1,74 +0,0 @@
|
||||||
/**
|
|
||||||
* Test that tags can be added to bookmarks using the star-shaped button.
|
|
||||||
*/
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
let bookmarkPanel = document.getElementById("editBookmarkPanel");
|
|
||||||
let doneButton = document.getElementById("editBookmarkPanelDoneButton");
|
|
||||||
let bookmarkStar = BookmarkingUI.star;
|
|
||||||
let bookmarkPanelTitle = document.getElementById("editBookmarkPanelTitle");
|
|
||||||
let TEST_URL = "about:buildconfig";
|
|
||||||
|
|
||||||
async function clickBookmarkStar() {
|
|
||||||
let shownPromise = promisePopupShown(bookmarkPanel);
|
|
||||||
bookmarkStar.click();
|
|
||||||
await shownPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function hideBookmarksPanel(callback) {
|
|
||||||
let hiddenPromise = promisePopupHidden(bookmarkPanel);
|
|
||||||
callback();
|
|
||||||
await hiddenPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
add_task(async function test_add_tags() {
|
|
||||||
let tab = await BrowserTestUtils.openNewForegroundTab({
|
|
||||||
gBrowser,
|
|
||||||
opening: TEST_URL,
|
|
||||||
waitForStateStop: true
|
|
||||||
});
|
|
||||||
|
|
||||||
// The bookmarks panel is expected to auto-close after this step.
|
|
||||||
await hideBookmarksPanel(async () => {
|
|
||||||
// Click the bookmark star to bookmark the page.
|
|
||||||
await clickBookmarkStar();
|
|
||||||
Assert.equal(bookmarkPanelTitle.value, gNavigatorBundle.getString("editBookmarkPanel.pageBookmarkedTitle"), "Bookmark title is correct");
|
|
||||||
Assert.equal(bookmarkStar.getAttribute("starred"), "true", "Page is starred");
|
|
||||||
});
|
|
||||||
|
|
||||||
// Click the bookmark star again to add tags.
|
|
||||||
await clickBookmarkStar();
|
|
||||||
Assert.equal(bookmarkPanelTitle.value, gNavigatorBundle.getString("editBookmarkPanel.editBookmarkTitle"), "Bookmark title is correct");
|
|
||||||
let promiseNotification = PlacesTestUtils.waitForNotification("onItemAdded", (id, parentId, index, type, itemUrl) => {
|
|
||||||
if (itemUrl !== null) {
|
|
||||||
return itemUrl.equals(Services.io.newURI(TEST_URL));
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
await fillBookmarkTextField("editBMPanel_tagsField", "tag1", window);
|
|
||||||
await promiseNotification;
|
|
||||||
let bookmarks = [];
|
|
||||||
await PlacesUtils.bookmarks.fetch({ url: TEST_URL }, bm => bookmarks.push(bm));
|
|
||||||
Assert.equal(PlacesUtils.tagging.getTagsForURI(Services.io.newURI(TEST_URL)).length, 1, "Found the right number of tags");
|
|
||||||
Assert.deepEqual(PlacesUtils.tagging.getTagsForURI(Services.io.newURI(TEST_URL)), ["tag1"]);
|
|
||||||
await hideBookmarksPanel(() => doneButton.click());
|
|
||||||
|
|
||||||
// Click the bookmark star again, add more tags.
|
|
||||||
await clickBookmarkStar();
|
|
||||||
promiseNotification = PlacesTestUtils.waitForNotification("onItemChanged", (id, property) => property == "tags");
|
|
||||||
await fillBookmarkTextField("editBMPanel_tagsField", "tag1, tag2, tag3", window);
|
|
||||||
await promiseNotification;
|
|
||||||
await hideBookmarksPanel(() => doneButton.click());
|
|
||||||
|
|
||||||
bookmarks = [];
|
|
||||||
await PlacesUtils.bookmarks.fetch({ url: TEST_URL }, bm => bookmarks.push(bm));
|
|
||||||
Assert.equal(bookmarks.length, 1, "Only one bookmark should exist");
|
|
||||||
Assert.equal(PlacesUtils.tagging.getTagsForURI(Services.io.newURI(TEST_URL)).length, 3, "Found the right number of tags");
|
|
||||||
Assert.deepEqual(PlacesUtils.tagging.getTagsForURI(Services.io.newURI(TEST_URL)), ["tag1", "tag2", "tag3"]);
|
|
||||||
|
|
||||||
// Cleanup.
|
|
||||||
registerCleanupFunction(async function() {
|
|
||||||
await PlacesUtils.bookmarks.eraseEverything();
|
|
||||||
await BrowserTestUtils.removeTab(tab);
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -0,0 +1,161 @@
|
||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tests that multiple tags can be added to a bookmark using the star-shaped button, the library and the sidebar.
|
||||||
|
*/
|
||||||
|
|
||||||
|
const bookmarkPanel = document.getElementById("editBookmarkPanel");
|
||||||
|
const bookmarkStar = BookmarkingUI.star;
|
||||||
|
|
||||||
|
async function clickBookmarkStar() {
|
||||||
|
let shownPromise = promisePopupShown(bookmarkPanel);
|
||||||
|
bookmarkStar.click();
|
||||||
|
await shownPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function hideBookmarksPanel(callback) {
|
||||||
|
let hiddenPromise = promisePopupHidden(bookmarkPanel);
|
||||||
|
callback();
|
||||||
|
await hiddenPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
add_task(async function test_add_bookmark_tags_from_bookmarkProperties() {
|
||||||
|
const TEST_URL = "about:robots";
|
||||||
|
|
||||||
|
let tab = await BrowserTestUtils.openNewForegroundTab({
|
||||||
|
gBrowser,
|
||||||
|
opening: TEST_URL,
|
||||||
|
waitForStateStop: true
|
||||||
|
});
|
||||||
|
|
||||||
|
// Cleanup.
|
||||||
|
registerCleanupFunction(async function() {
|
||||||
|
await BrowserTestUtils.removeTab(tab);
|
||||||
|
});
|
||||||
|
|
||||||
|
let bookmarkPanelTitle = document.getElementById("editBookmarkPanelTitle");
|
||||||
|
|
||||||
|
// The bookmarks panel is expected to auto-close after this step.
|
||||||
|
await hideBookmarksPanel(async () => {
|
||||||
|
// Click the bookmark star to bookmark the page.
|
||||||
|
await clickBookmarkStar();
|
||||||
|
Assert.equal(bookmarkPanelTitle.value, gNavigatorBundle.getString("editBookmarkPanel.pageBookmarkedTitle"), "Bookmark title is correct");
|
||||||
|
Assert.equal(bookmarkStar.getAttribute("starred"), "true", "Page is starred");
|
||||||
|
});
|
||||||
|
|
||||||
|
// Click the bookmark star again to add tags.
|
||||||
|
await clickBookmarkStar();
|
||||||
|
Assert.equal(bookmarkPanelTitle.value, gNavigatorBundle.getString("editBookmarkPanel.editBookmarkTitle"), "Bookmark title is correct");
|
||||||
|
let promiseNotification = PlacesTestUtils.waitForNotification("onItemAdded", (id, parentId, index, type, itemUrl) => {
|
||||||
|
if (itemUrl !== null) {
|
||||||
|
return itemUrl.equals(Services.io.newURI(TEST_URL));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
await fillBookmarkTextField("editBMPanel_tagsField", "tag1", window);
|
||||||
|
await promiseNotification;
|
||||||
|
let bookmarks = [];
|
||||||
|
await PlacesUtils.bookmarks.fetch({ url: TEST_URL }, bm => bookmarks.push(bm));
|
||||||
|
Assert.equal(PlacesUtils.tagging.getTagsForURI(Services.io.newURI(TEST_URL)).length, 1, "Found the right number of tags");
|
||||||
|
Assert.deepEqual(PlacesUtils.tagging.getTagsForURI(Services.io.newURI(TEST_URL)), ["tag1"]);
|
||||||
|
let doneButton = document.getElementById("editBookmarkPanelDoneButton");
|
||||||
|
await hideBookmarksPanel(() => doneButton.click());
|
||||||
|
|
||||||
|
// Click the bookmark star again, add more tags.
|
||||||
|
await clickBookmarkStar();
|
||||||
|
promiseNotification = PlacesTestUtils.waitForNotification("onItemChanged", (id, property) => property == "tags");
|
||||||
|
await fillBookmarkTextField("editBMPanel_tagsField", "tag1, tag2, tag3", window);
|
||||||
|
await promiseNotification;
|
||||||
|
await hideBookmarksPanel(() => doneButton.click());
|
||||||
|
|
||||||
|
bookmarks = [];
|
||||||
|
await PlacesUtils.bookmarks.fetch({ url: TEST_URL }, bm => bookmarks.push(bm));
|
||||||
|
Assert.equal(bookmarks.length, 1, "Only one bookmark should exist");
|
||||||
|
Assert.equal(PlacesUtils.tagging.getTagsForURI(Services.io.newURI(TEST_URL)).length, 3, "Found the right number of tags");
|
||||||
|
Assert.deepEqual(PlacesUtils.tagging.getTagsForURI(Services.io.newURI(TEST_URL)), ["tag1", "tag2", "tag3"]);
|
||||||
|
|
||||||
|
// Cleanup.
|
||||||
|
await PlacesUtils.bookmarks.eraseEverything();
|
||||||
|
});
|
||||||
|
|
||||||
|
add_task(async function test_add_bookmark_tags_from_library() {
|
||||||
|
const uri = "http://example.com/";
|
||||||
|
|
||||||
|
// Add a bookmark.
|
||||||
|
await PlacesUtils.bookmarks.insert({
|
||||||
|
url: uri,
|
||||||
|
parentGuid: PlacesUtils.bookmarks.unfiledGuid
|
||||||
|
});
|
||||||
|
|
||||||
|
// Open the Library on "UnfiledBookmarks".
|
||||||
|
let library = await promiseLibrary("UnfiledBookmarks");
|
||||||
|
|
||||||
|
// Cleanup.
|
||||||
|
registerCleanupFunction(async function() {
|
||||||
|
await promiseLibraryClosed(library);
|
||||||
|
});
|
||||||
|
|
||||||
|
let bookmarkNode = library.ContentTree.view.selectedNode;
|
||||||
|
Assert.equal(bookmarkNode.uri, "http://example.com/", "Found the expected bookmark");
|
||||||
|
|
||||||
|
// Add a tag to the bookmark.
|
||||||
|
fillBookmarkTextField("editBMPanel_tagsField", "tag1", library);
|
||||||
|
|
||||||
|
await waitForCondition(() => bookmarkNode.tags === "tag1", "Node tag is correct");
|
||||||
|
|
||||||
|
// Add a new tag to the bookmark.
|
||||||
|
fillBookmarkTextField("editBMPanel_tagsField", "tag1, tag2", library);
|
||||||
|
|
||||||
|
await waitForCondition(() => bookmarkNode.tags === "tag1, tag2", "Node tag is correct");
|
||||||
|
|
||||||
|
// Check the tag change has been completed.
|
||||||
|
let tags = PlacesUtils.tagging.getTagsForURI(Services.io.newURI(uri));
|
||||||
|
Assert.equal(tags.length, 2, "Found the right number of tags");
|
||||||
|
Assert.deepEqual(tags, ["tag1", "tag2"], "Found the expected tags");
|
||||||
|
|
||||||
|
// Cleanup.
|
||||||
|
await PlacesUtils.bookmarks.eraseEverything();
|
||||||
|
});
|
||||||
|
|
||||||
|
add_task(async function test_add_bookmark_tags_from_sidebar() {
|
||||||
|
const TEST_URL = "about:buildconfig";
|
||||||
|
|
||||||
|
let bookmarks = await PlacesUtils.bookmarks.insert({
|
||||||
|
parentGuid: PlacesUtils.bookmarks.unfiledGuid,
|
||||||
|
url: TEST_URL,
|
||||||
|
title: "Bookmark Title"
|
||||||
|
});
|
||||||
|
|
||||||
|
await withSidebarTree("bookmarks", async function(tree) {
|
||||||
|
tree.selectItems([bookmarks.guid]);
|
||||||
|
// Add one tag.
|
||||||
|
await addTags(["tag1"], tree, ["tag1"]);
|
||||||
|
// Add 2 more tags.
|
||||||
|
await addTags(["tag2", "tag3"], tree, ["tag1", "tag2", "tag3"]);
|
||||||
|
});
|
||||||
|
|
||||||
|
async function addTags(tagValue, tree, expected) {
|
||||||
|
await withBookmarksDialog(
|
||||||
|
false,
|
||||||
|
function openPropertiesDialog() {
|
||||||
|
tree.controller.doCommand("placesCmd_show:info");
|
||||||
|
},
|
||||||
|
async function test(dialogWin) {
|
||||||
|
PlacesUtils.tagging.tagURI(makeURI(TEST_URL), tagValue);
|
||||||
|
let tags = PlacesUtils.tagging.getTagsForURI(Services.io.newURI(TEST_URL));
|
||||||
|
|
||||||
|
Assert.deepEqual(tags, expected, "Tags field is correctly populated");
|
||||||
|
|
||||||
|
EventUtils.synthesizeKey("VK_RETURN", {}, dialogWin);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cleanup.
|
||||||
|
registerCleanupFunction(async () => {
|
||||||
|
await PlacesUtils.bookmarks.eraseEverything();
|
||||||
|
});
|
||||||
|
});
|
|
@ -1,41 +0,0 @@
|
||||||
/**
|
|
||||||
* Tests that multiple tags can be added to a bookmark using the Library.
|
|
||||||
*/
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
add_task(async function test_add_tags() {
|
|
||||||
const uri = "http://example.com/";
|
|
||||||
|
|
||||||
// Add a bookmark.
|
|
||||||
await PlacesUtils.bookmarks.insert({
|
|
||||||
url: uri,
|
|
||||||
parentGuid: PlacesUtils.bookmarks.unfiledGuid
|
|
||||||
});
|
|
||||||
|
|
||||||
// Open the Library on "UnfiledBookmarks".
|
|
||||||
let library = await promiseLibrary("UnfiledBookmarks");
|
|
||||||
|
|
||||||
let bookmarkNode = library.ContentTree.view.selectedNode;
|
|
||||||
Assert.equal(bookmarkNode.uri, "http://example.com/", "Found the expected bookmark");
|
|
||||||
|
|
||||||
// Add a tag to the bookmark.
|
|
||||||
fillBookmarkTextField("editBMPanel_tagsField", "tag1", library);
|
|
||||||
|
|
||||||
await waitForCondition(() => bookmarkNode.tags === "tag1", "Node tag is correct");
|
|
||||||
|
|
||||||
// Add a new tag to the bookmark.
|
|
||||||
fillBookmarkTextField("editBMPanel_tagsField", "tag1, tag2", library);
|
|
||||||
|
|
||||||
await waitForCondition(() => bookmarkNode.tags === "tag1, tag2", "Node tag is correct");
|
|
||||||
|
|
||||||
// Check the tag change has been.
|
|
||||||
let tags = PlacesUtils.tagging.getTagsForURI(Services.io.newURI(uri));
|
|
||||||
Assert.equal(tags.length, 2, "Found the right number of tags");
|
|
||||||
Assert.deepEqual(tags, ["tag1", "tag2"], "Found the expected tags");
|
|
||||||
|
|
||||||
// Cleanup
|
|
||||||
registerCleanupFunction(async function() {
|
|
||||||
await promiseLibraryClosed(library);
|
|
||||||
await PlacesUtils.bookmarks.eraseEverything();
|
|
||||||
});
|
|
||||||
});
|
|
Двоичный файл не отображается.
|
@ -1,9 +1,9 @@
|
||||||
This is the debugger.html project output.
|
This is the debugger.html project output.
|
||||||
See https://github.com/devtools-html/debugger.html
|
See https://github.com/devtools-html/debugger.html
|
||||||
|
|
||||||
Version 12.0
|
Version 13.0
|
||||||
Comparison: https://github.com/devtools-html/debugger.html/compare/release-11...release-12
|
Comparison: https://github.com/devtools-html/debugger.html/compare/release-12...release-13
|
||||||
Commit: https://github.com/devtools-html/debugger.html/commit/5f7ecfe
|
Commit: https://github.com/devtools-html/debugger.html/commit/3c10bd43b5
|
||||||
|
|
||||||
Packages:
|
Packages:
|
||||||
- babel-plugin-transform-es2015-modules-commonjs @6.26.0
|
- babel-plugin-transform-es2015-modules-commonjs @6.26.0
|
||||||
|
|
|
@ -1067,13 +1067,17 @@ html .arrow.expanded svg {
|
||||||
fill: var(--theme-body-color);
|
fill: var(--theme-body-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.angular svg {
|
.angular svg, .source-icon svg {
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
vertical-align: sub;
|
vertical-align: sub;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.source-icon svg {
|
||||||
|
fill: var(--theme-body-color);
|
||||||
|
}
|
||||||
|
|
||||||
.theme-dark .angular {
|
.theme-dark .angular {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
@ -1565,6 +1569,10 @@ html[dir="rtl"] .arrow svg,
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tree-indent {
|
||||||
|
border-inline-start: 0 none;
|
||||||
|
}
|
||||||
|
|
||||||
.source-outline-tabs {
|
.source-outline-tabs {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background: var(--theme-body-background);
|
background: var(--theme-body-background);
|
||||||
|
@ -1638,6 +1646,10 @@ html[dir="rtl"] .arrow svg,
|
||||||
.theme-dark .sources-list .managed-tree .tree .node.focused img.blackBox {
|
.theme-dark .sources-list .managed-tree .tree .node.focused img.blackBox {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tree-node[data-expandable="false"] .tree-indent:last-of-type {
|
||||||
|
margin-inline-end: 4px;
|
||||||
|
}
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
/* 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
|
* 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/>. */
|
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
|
||||||
|
@ -4021,3 +4033,15 @@ html .welcomebox .toggle-button-end.collapsed {
|
||||||
.theme-dark .result-list {
|
.theme-dark .result-list {
|
||||||
background-color: var(--theme-body-background);
|
background-color: var(--theme-body-background);
|
||||||
}
|
}
|
||||||
|
.result-item .title .fuzzy-match {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-item .subtitle .fuzzy-match {
|
||||||
|
color: var(--grey-90);
|
||||||
|
}
|
||||||
|
|
||||||
|
.theme-dark .result-item .title .fuzzy-match,
|
||||||
|
.theme-dark .result-item .subtitle .fuzzy-match {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -2896,7 +2896,7 @@ pp$3.checkUnreserved = function(ref) {
|
||||||
if (this.isKeyword(name))
|
if (this.isKeyword(name))
|
||||||
{ this.raise(start, ("Unexpected keyword '" + name + "'")); }
|
{ this.raise(start, ("Unexpected keyword '" + name + "'")); }
|
||||||
if (this.options.ecmaVersion < 6 &&
|
if (this.options.ecmaVersion < 6 &&
|
||||||
this.input.slice(start, end).includes("\\")) { return }
|
this.input.slice(start, end).indexOf("\\") != -1) { return }
|
||||||
var re = this.strict ? this.reservedWordsStrict : this.reservedWords;
|
var re = this.strict ? this.reservedWordsStrict : this.reservedWords;
|
||||||
if (re.test(name))
|
if (re.test(name))
|
||||||
{ this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); }
|
{ this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); }
|
||||||
|
@ -3661,7 +3661,7 @@ pp$8.readRegexp = function() {
|
||||||
var validFlags = /^[gim]*$/;
|
var validFlags = /^[gim]*$/;
|
||||||
if (this.options.ecmaVersion >= 6) { validFlags = /^[gimuy]*$/; }
|
if (this.options.ecmaVersion >= 6) { validFlags = /^[gimuy]*$/; }
|
||||||
if (!validFlags.test(mods)) { this.raise(start, "Invalid regular expression flag"); }
|
if (!validFlags.test(mods)) { this.raise(start, "Invalid regular expression flag"); }
|
||||||
if (mods.includes("u")) {
|
if (mods.indexOf("u") >= 0) {
|
||||||
if (regexpUnicodeSupport) {
|
if (regexpUnicodeSupport) {
|
||||||
tmpFlags = "u";
|
tmpFlags = "u";
|
||||||
} else {
|
} else {
|
||||||
|
@ -7285,7 +7285,7 @@ IndexedSourceMapConsumer.prototype.generatedPositionFor =
|
||||||
|
|
||||||
// Only consider this section if the requested source is in the list of
|
// Only consider this section if the requested source is in the list of
|
||||||
// sources of the consumer.
|
// sources of the consumer.
|
||||||
if (!section.consumer.sources.includes(util.getArg(aArgs, 'source'))) {
|
if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
var generatedPosition = section.consumer.generatedPositionFor(aArgs);
|
var generatedPosition = section.consumer.generatedPositionFor(aArgs);
|
||||||
|
|
|
@ -108,6 +108,7 @@ skip-if = os == "linux" # bug 1351952
|
||||||
skip-if = os == "win"
|
skip-if = os == "win"
|
||||||
[browser_dbg-navigation.js]
|
[browser_dbg-navigation.js]
|
||||||
[browser_dbg-minified.js]
|
[browser_dbg-minified.js]
|
||||||
|
skip-if = true
|
||||||
[browser_dbg-pretty-print.js]
|
[browser_dbg-pretty-print.js]
|
||||||
[browser_dbg-pretty-print-console.js]
|
[browser_dbg-pretty-print-console.js]
|
||||||
[browser_dbg-pretty-print-paused.js]
|
[browser_dbg-pretty-print-paused.js]
|
||||||
|
@ -127,6 +128,7 @@ skip-if = true # regular failures during release in Bug 1415300
|
||||||
[browser_dbg-sourcemaps-reloading.js]
|
[browser_dbg-sourcemaps-reloading.js]
|
||||||
[browser_dbg-sourcemaps2.js]
|
[browser_dbg-sourcemaps2.js]
|
||||||
[browser_dbg-sourcemaps3.js]
|
[browser_dbg-sourcemaps3.js]
|
||||||
|
skip-if = true
|
||||||
[browser_dbg-sourcemaps-bogus.js]
|
[browser_dbg-sourcemaps-bogus.js]
|
||||||
[browser_dbg-sources.js]
|
[browser_dbg-sources.js]
|
||||||
[browser_dbg-sources-named-eval.js]
|
[browser_dbg-sources-named-eval.js]
|
||||||
|
|
|
@ -80,10 +80,14 @@ add_task(async function() {
|
||||||
await stepIn(dbg);
|
await stepIn(dbg);
|
||||||
assertPausedLocation(dbg);
|
assertPausedLocation(dbg);
|
||||||
|
|
||||||
|
await dbg.actions.jumpToMappedSelectedLocation()
|
||||||
await stepOver(dbg);
|
await stepOver(dbg);
|
||||||
assertPausedLocation(dbg);
|
assertPausedLocation(dbg);
|
||||||
|
assertDebugLine(dbg, 71);
|
||||||
|
|
||||||
|
await dbg.actions.jumpToMappedSelectedLocation()
|
||||||
await stepOut(dbg);
|
await stepOut(dbg);
|
||||||
await stepOut(dbg);
|
await stepOut(dbg);
|
||||||
assertPausedLocation(dbg);
|
assertPausedLocation(dbg);
|
||||||
|
assertDebugLine(dbg, 16);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{
|
||||||
"name": "sourcemaps-reload",
|
"name": "sourcemaps-reload",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "",
|
"description": "Rebuild assets for sourcemaps-reload test, see README.md in the same folder",
|
||||||
"main": "sorted.js",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "MPL-2.0",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-core": "^6.26.0",
|
"babel-core": "^6.26.0",
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
{
|
{
|
||||||
"name": "sorted-es6",
|
"name": "sorted-es6",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "",
|
"description": "Rebuild assets for sourcemaps3 test",
|
||||||
"main": "sorted.js",
|
"main": "sorted.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "MPL-2.0",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-core": "^6.26.0",
|
"babel-core": "^6.26.0",
|
||||||
|
|
|
@ -1739,7 +1739,7 @@ function integrateWasmJS(Module) {
|
||||||
|
|
||||||
function lookupImport(mod, base) {
|
function lookupImport(mod, base) {
|
||||||
var lookup = info;
|
var lookup = info;
|
||||||
if (!mod.includes(".")) {
|
if (mod.indexOf(".") < 0) {
|
||||||
lookup = (lookup || {})[mod];
|
lookup = (lookup || {})[mod];
|
||||||
} else {
|
} else {
|
||||||
var parts = mod.split(".");
|
var parts = mod.split(".");
|
||||||
|
@ -2098,8 +2098,8 @@ STATICTOP = STATIC_BASE + 3008;
|
||||||
/* global initializers */ __ATINIT__.push();
|
/* global initializers */ __ATINIT__.push();
|
||||||
|
|
||||||
memoryInitializer =
|
memoryInitializer =
|
||||||
Module["wasmJSMethod"].includes("asmjs") ||
|
Module["wasmJSMethod"].indexOf("asmjs") >= 0 ||
|
||||||
Module["wasmJSMethod"].includes("interpret-asm2wasm")
|
Module["wasmJSMethod"].indexOf("interpret-asm2wasm") >= 0
|
||||||
? "average.js.mem"
|
? "average.js.mem"
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
|
|
|
@ -285,12 +285,12 @@ function assertNotPaused(dbg) {
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
function assertPausedLocation(dbg) {
|
function assertPausedLocation(dbg) {
|
||||||
const { selectors: { getSelectedSource, getTopFrame }, getState } = dbg;
|
const { selectors: { getSelectedSource, getVisibleSelectedFrame }, getState } = dbg;
|
||||||
|
|
||||||
ok(isTopFrameSelected(dbg, getState()), "top frame's source is selected");
|
ok(isSelectedFrameSelected(dbg, getState()), "top frame's source is selected");
|
||||||
|
|
||||||
// Check the pause location
|
// Check the pause location
|
||||||
const frame = getTopFrame(getState());
|
const frame = getVisibleSelectedFrame(getState());
|
||||||
const pauseLine = frame && frame.location.line;
|
const pauseLine = frame && frame.location.line;
|
||||||
assertDebugLine(dbg, pauseLine);
|
assertDebugLine(dbg, pauseLine);
|
||||||
|
|
||||||
|
@ -454,8 +454,8 @@ async function waitForMappedScopes(dbg) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isTopFrameSelected(dbg, state) {
|
function isSelectedFrameSelected(dbg, state) {
|
||||||
const frame = dbg.selectors.getTopFrame(state);
|
const frame = dbg.selectors.getVisibleSelectedFrame(state);
|
||||||
|
|
||||||
// Make sure the source text is completely loaded for the
|
// Make sure the source text is completely loaded for the
|
||||||
// source we are paused in.
|
// source we are paused in.
|
||||||
|
|
|
@ -24,16 +24,17 @@ copySource.accesskey=y
|
||||||
copySourceUri2=Copy source URI
|
copySourceUri2=Copy source URI
|
||||||
copySourceUri2.accesskey=u
|
copySourceUri2.accesskey=u
|
||||||
|
|
||||||
# LOCALIZATION NOTE (setDirectoryRoot): This is the text that appears in the
|
# LOCALIZATION NOTE (setDirectoryRoot.label): This is the text that appears in the
|
||||||
# context menu to set a directory as root directory
|
# context menu to set a directory as root directory
|
||||||
setDirectoryRoot.label=Set directory root
|
setDirectoryRoot.label=Set directory root
|
||||||
setDirectoryRoot.accesskey=r
|
setDirectoryRoot.accesskey=r
|
||||||
|
|
||||||
# LOCALIZATION NOTE (removeDirectoryRoot): This is the text that appears in the
|
# LOCALIZATION NOTE (removeDirectoryRoot.label): This is the text that appears in the
|
||||||
# context menu to remove a directory as root directory
|
# context menu to remove a directory as root directory
|
||||||
removeDirectoryRoot.label=Remove directory root
|
removeDirectoryRoot.label=Remove directory root
|
||||||
|
removeDirectoryRoot.accesskey=d
|
||||||
|
|
||||||
# LOCALIZATION NOTE (copyFunction): This is the text that appears in the
|
# LOCALIZATION NOTE (copyFunction.label): This is the text that appears in the
|
||||||
# context menu to copy the function the user selected
|
# context menu to copy the function the user selected
|
||||||
copyFunction.label=Copy function
|
copyFunction.label=Copy function
|
||||||
copyFunction.accesskey=F
|
copyFunction.accesskey=F
|
||||||
|
|
|
@ -49,7 +49,7 @@ pref("devtools.debugger.features.root", false);
|
||||||
pref("devtools.debugger.features.column-breakpoints", false);
|
pref("devtools.debugger.features.column-breakpoints", false);
|
||||||
pref("devtools.debugger.features.chrome-scopes", false);
|
pref("devtools.debugger.features.chrome-scopes", false);
|
||||||
pref("devtools.debugger.features.map-scopes", false);
|
pref("devtools.debugger.features.map-scopes", false);
|
||||||
pref("devtools.debugger.features.breakpoints-dropdown", true);
|
pref("devtools.debugger.features.breakpoints-dropdown", false);
|
||||||
pref("devtools.debugger.features.remove-command-bar-options", false);
|
pref("devtools.debugger.features.remove-command-bar-options", false);
|
||||||
pref("devtools.debugger.features.workers", true);
|
pref("devtools.debugger.features.workers", true);
|
||||||
pref("devtools.debugger.features.code-coverage", false);
|
pref("devtools.debugger.features.code-coverage", false);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- 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/. -->
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="34" height="32" viewBox="0 0 34 32">
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="34" height="32" viewBox="0 -2.5 34 32">
|
||||||
<path fill="#444444" d="M19.314 15.987c0 1.321-1.071 2.392-2.392 2.392s-2.392-1.071-2.392-2.392c0-1.321 1.071-2.392 2.392-2.392s2.392 1.071 2.392 2.392z"></path>
|
<path d="M19.314 15.987c0 1.321-1.071 2.392-2.392 2.392s-2.392-1.071-2.392-2.392c0-1.321 1.071-2.392 2.392-2.392s2.392 1.071 2.392 2.392z"></path>
|
||||||
<path fill="#444444" d="M16.922 24.783c1.878 1.826 3.729 2.906 5.221 2.906 0.489 0 0.952-0.103 1.337-0.334 1.337-0.772 1.826-2.701 1.363-5.453-0.077-0.489-0.18-0.977-0.309-1.492 0.514-0.154 0.977-0.309 1.44-0.463 2.598-1.003 4.038-2.392 4.038-3.909 0-1.543-1.44-2.932-4.038-3.909-0.463-0.18-0.926-0.334-1.44-0.463 0.129-0.514 0.232-1.003 0.309-1.492 0.437-2.803-0.051-4.758-1.389-5.53-0.386-0.231-0.849-0.334-1.337-0.334-1.466 0-3.344 1.080-5.221 2.906-1.852-1.826-3.704-2.906-5.195-2.906-0.489 0-0.952 0.103-1.337 0.334-1.337 0.772-1.826 2.701-1.363 5.453 0.077 0.489 0.18 0.977 0.309 1.492-0.514 0.154-0.977 0.309-1.44 0.463-2.598 1.003-4.038 2.392-4.038 3.909 0 1.543 1.44 2.932 4.038 3.909 0.463 0.18 0.926 0.334 1.44 0.463-0.129 0.514-0.232 1.003-0.309 1.492-0.437 2.752 0.051 4.707 1.363 5.453 0.386 0.232 0.849 0.334 1.337 0.334 1.492 0.051 3.344-1.029 5.221-2.829v0zM15.481 21.311c0.463 0.026 0.952 0.026 1.44 0.026s0.977 0 1.44-0.026c-0.463 0.617-0.952 1.183-1.44 1.723-0.489-0.54-0.977-1.106-1.44-1.723zM12.292 18.662c0.257 0.437 0.489 0.849 0.772 1.26-0.797-0.103-1.543-0.232-2.263-0.386 0.232-0.694 0.489-1.415 0.797-2.135 0.206 0.411 0.437 0.849 0.694 1.26zM10.8 12.463c0.72-0.154 1.466-0.283 2.263-0.386-0.257 0.412-0.514 0.823-0.772 1.26s-0.489 0.849-0.694 1.286c-0.334-0.746-0.592-1.466-0.797-2.161zM12.215 15.987c0.334-0.694 0.694-1.389 1.106-2.083 0.386-0.669 0.823-1.337 1.26-2.006 0.772-0.051 1.543-0.077 2.341-0.077 0.823 0 1.595 0.026 2.341 0.077 0.463 0.669 0.874 1.337 1.26 2.006 0.412 0.694 0.772 1.389 1.106 2.083-0.334 0.694-0.694 1.389-1.106 2.083-0.386 0.669-0.823 1.337-1.26 2.006-0.772 0.051-1.543 0.077-2.341 0.077-0.823 0-1.595-0.026-2.341-0.077-0.463-0.669-0.874-1.337-1.26-2.006-0.412-0.695-0.772-1.389-1.106-2.083v0zM22.272 14.598l-0.694-1.286c-0.257-0.437-0.489-0.849-0.772-1.26 0.797 0.103 1.543 0.232 2.263 0.386-0.231 0.72-0.489 1.44-0.797 2.161v0zM22.272 17.376c0.309 0.72 0.566 1.44 0.797 2.135-0.72 0.154-1.466 0.283-2.263 0.386 0.257-0.412 0.514-0.823 0.772-1.26 0.232-0.386 0.463-0.823 0.694-1.26v0zM22.863 26.301c-0.206 0.129-0.463 0.18-0.746 0.18-1.26 0-2.829-1.029-4.372-2.572 0.746-0.797 1.466-1.698 2.186-2.701 1.209-0.103 2.366-0.283 3.447-0.54 0.129 0.463 0.206 0.926 0.283 1.389 0.36 2.186 0.077 3.755-0.797 4.244zM24.201 12.746c2.881 0.823 4.604 2.083 4.604 3.241 0 1.003-1.183 2.006-3.266 2.804-0.412 0.154-0.874 0.309-1.337 0.437-0.334-1.055-0.746-2.135-1.26-3.241 0.514-1.106 0.952-2.186 1.26-3.241v0zM22.143 5.493c0.283 0 0.514 0.051 0.746 0.18 0.849 0.489 1.157 2.032 0.797 4.244-0.077 0.437-0.18 0.9-0.283 1.389-1.080-0.232-2.238-0.412-3.447-0.54-0.694-1.003-1.44-1.903-2.186-2.701 1.543-1.518 3.112-2.572 4.372-2.572zM18.362 10.663c-0.463-0.026-0.952-0.026-1.44-0.026s-0.977 0-1.44 0.026c0.463-0.617 0.952-1.183 1.44-1.723 0.489 0.54 0.977 1.132 1.44 1.723v0zM10.98 5.673c0.206-0.129 0.463-0.18 0.746-0.18 1.26 0 2.829 1.029 4.372 2.572-0.746 0.797-1.466 1.697-2.186 2.701-1.209 0.103-2.366 0.283-3.447 0.54-0.129-0.463-0.206-0.926-0.283-1.389-0.36-2.186-0.077-3.729 0.797-4.244v0zM9.643 19.228c-2.881-0.823-4.604-2.083-4.604-3.241 0-1.003 1.183-2.006 3.266-2.803 0.412-0.154 0.874-0.309 1.337-0.437 0.334 1.055 0.746 2.135 1.26 3.241-0.514 1.106-0.952 2.212-1.26 3.241zM10.183 22.057c0.077-0.437 0.18-0.9 0.283-1.389 1.080 0.232 2.238 0.412 3.447 0.54 0.694 1.003 1.44 1.903 2.186 2.701-1.543 1.517-3.112 2.572-4.372 2.572-0.283 0-0.514-0.051-0.746-0.18-0.875-0.489-1.157-2.058-0.797-4.244z"></path>
|
<path d="M16.922 24.783c1.878 1.826 3.729 2.906 5.221 2.906 0.489 0 0.952-0.103 1.337-0.334 1.337-0.772 1.826-2.701 1.363-5.453-0.077-0.489-0.18-0.977-0.309-1.492 0.514-0.154 0.977-0.309 1.44-0.463 2.598-1.003 4.038-2.392 4.038-3.909 0-1.543-1.44-2.932-4.038-3.909-0.463-0.18-0.926-0.334-1.44-0.463 0.129-0.514 0.232-1.003 0.309-1.492 0.437-2.803-0.051-4.758-1.389-5.53-0.386-0.231-0.849-0.334-1.337-0.334-1.466 0-3.344 1.080-5.221 2.906-1.852-1.826-3.704-2.906-5.195-2.906-0.489 0-0.952 0.103-1.337 0.334-1.337 0.772-1.826 2.701-1.363 5.453 0.077 0.489 0.18 0.977 0.309 1.492-0.514 0.154-0.977 0.309-1.44 0.463-2.598 1.003-4.038 2.392-4.038 3.909 0 1.543 1.44 2.932 4.038 3.909 0.463 0.18 0.926 0.334 1.44 0.463-0.129 0.514-0.232 1.003-0.309 1.492-0.437 2.752 0.051 4.707 1.363 5.453 0.386 0.232 0.849 0.334 1.337 0.334 1.492 0.051 3.344-1.029 5.221-2.829v0zM15.481 21.311c0.463 0.026 0.952 0.026 1.44 0.026s0.977 0 1.44-0.026c-0.463 0.617-0.952 1.183-1.44 1.723-0.489-0.54-0.977-1.106-1.44-1.723zM12.292 18.662c0.257 0.437 0.489 0.849 0.772 1.26-0.797-0.103-1.543-0.232-2.263-0.386 0.232-0.694 0.489-1.415 0.797-2.135 0.206 0.411 0.437 0.849 0.694 1.26zM10.8 12.463c0.72-0.154 1.466-0.283 2.263-0.386-0.257 0.412-0.514 0.823-0.772 1.26s-0.489 0.849-0.694 1.286c-0.334-0.746-0.592-1.466-0.797-2.161zM12.215 15.987c0.334-0.694 0.694-1.389 1.106-2.083 0.386-0.669 0.823-1.337 1.26-2.006 0.772-0.051 1.543-0.077 2.341-0.077 0.823 0 1.595 0.026 2.341 0.077 0.463 0.669 0.874 1.337 1.26 2.006 0.412 0.694 0.772 1.389 1.106 2.083-0.334 0.694-0.694 1.389-1.106 2.083-0.386 0.669-0.823 1.337-1.26 2.006-0.772 0.051-1.543 0.077-2.341 0.077-0.823 0-1.595-0.026-2.341-0.077-0.463-0.669-0.874-1.337-1.26-2.006-0.412-0.695-0.772-1.389-1.106-2.083v0zM22.272 14.598l-0.694-1.286c-0.257-0.437-0.489-0.849-0.772-1.26 0.797 0.103 1.543 0.232 2.263 0.386-0.231 0.72-0.489 1.44-0.797 2.161v0zM22.272 17.376c0.309 0.72 0.566 1.44 0.797 2.135-0.72 0.154-1.466 0.283-2.263 0.386 0.257-0.412 0.514-0.823 0.772-1.26 0.232-0.386 0.463-0.823 0.694-1.26v0zM22.863 26.301c-0.206 0.129-0.463 0.18-0.746 0.18-1.26 0-2.829-1.029-4.372-2.572 0.746-0.797 1.466-1.698 2.186-2.701 1.209-0.103 2.366-0.283 3.447-0.54 0.129 0.463 0.206 0.926 0.283 1.389 0.36 2.186 0.077 3.755-0.797 4.244zM24.201 12.746c2.881 0.823 4.604 2.083 4.604 3.241 0 1.003-1.183 2.006-3.266 2.804-0.412 0.154-0.874 0.309-1.337 0.437-0.334-1.055-0.746-2.135-1.26-3.241 0.514-1.106 0.952-2.186 1.26-3.241v0zM22.143 5.493c0.283 0 0.514 0.051 0.746 0.18 0.849 0.489 1.157 2.032 0.797 4.244-0.077 0.437-0.18 0.9-0.283 1.389-1.080-0.232-2.238-0.412-3.447-0.54-0.694-1.003-1.44-1.903-2.186-2.701 1.543-1.518 3.112-2.572 4.372-2.572zM18.362 10.663c-0.463-0.026-0.952-0.026-1.44-0.026s-0.977 0-1.44 0.026c0.463-0.617 0.952-1.183 1.44-1.723 0.489 0.54 0.977 1.132 1.44 1.723v0zM10.98 5.673c0.206-0.129 0.463-0.18 0.746-0.18 1.26 0 2.829 1.029 4.372 2.572-0.746 0.797-1.466 1.697-2.186 2.701-1.209 0.103-2.366 0.283-3.447 0.54-0.129-0.463-0.206-0.926-0.283-1.389-0.36-2.186-0.077-3.729 0.797-4.244v0zM9.643 19.228c-2.881-0.823-4.604-2.083-4.604-3.241 0-1.003 1.183-2.006 3.266-2.803 0.412-0.154 0.874-0.309 1.337-0.437 0.334 1.055 0.746 2.135 1.26 3.241-0.514 1.106-0.952 2.212-1.26 3.241zM10.183 22.057c0.077-0.437 0.18-0.9 0.283-1.389 1.080 0.232 2.238 0.412 3.447 0.54 0.694 1.003 1.44 1.903 2.186 2.701-1.543 1.517-3.112 2.572-4.372 2.572-0.283 0-0.514-0.051-0.746-0.18-0.875-0.489-1.157-2.058-0.797-4.244z"></path>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
До Ширина: | Высота: | Размер: 4.0 KiB После Ширина: | Высота: | Размер: 4.0 KiB |
|
@ -28,14 +28,14 @@ public:
|
||||||
* @param aStyleSheet the style sheet associated with this
|
* @param aStyleSheet the style sheet associated with this
|
||||||
* element.
|
* element.
|
||||||
*/
|
*/
|
||||||
NS_IMETHOD SetStyleSheet(mozilla::StyleSheet* aStyleSheet) = 0;
|
virtual void SetStyleSheet(mozilla::StyleSheet* aStyleSheet) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to obtain the style sheet linked in by this element.
|
* Used to obtain the style sheet linked in by this element.
|
||||||
*
|
*
|
||||||
* @return the style sheet associated with this element.
|
* @return the style sheet associated with this element.
|
||||||
*/
|
*/
|
||||||
NS_IMETHOD_(mozilla::StyleSheet*) GetStyleSheet() = 0;
|
virtual mozilla::StyleSheet* GetStyleSheet() = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the stylesheet linking element. If aDontLoadStyle is
|
* Initialize the stylesheet linking element. If aDontLoadStyle is
|
||||||
|
@ -43,7 +43,7 @@ public:
|
||||||
* element that would cause a stylesheet to be loaded. Subsequent
|
* element that would cause a stylesheet to be loaded. Subsequent
|
||||||
* modifications to the element will not be ignored.
|
* modifications to the element will not be ignored.
|
||||||
*/
|
*/
|
||||||
NS_IMETHOD InitStyleLinkElement(bool aDontLoadStyle) = 0;
|
virtual void InitStyleLinkElement(bool aDontLoadStyle) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tells this element to update the stylesheet.
|
* Tells this element to update the stylesheet.
|
||||||
|
@ -61,7 +61,7 @@ public:
|
||||||
* @param aForceUpdate whether we wand to force the update, flushing the
|
* @param aForceUpdate whether we wand to force the update, flushing the
|
||||||
* cached version if any.
|
* cached version if any.
|
||||||
*/
|
*/
|
||||||
NS_IMETHOD UpdateStyleSheet(nsICSSLoaderObserver* aObserver,
|
virtual nsresult UpdateStyleSheet(nsICSSLoaderObserver* aObserver,
|
||||||
bool *aWillNotify,
|
bool *aWillNotify,
|
||||||
bool *aIsAlternate,
|
bool *aIsAlternate,
|
||||||
bool aForceUpdate = false) = 0;
|
bool aForceUpdate = false) = 0;
|
||||||
|
@ -72,14 +72,16 @@ public:
|
||||||
*
|
*
|
||||||
* @param aEnableUpdates update on changes or not.
|
* @param aEnableUpdates update on changes or not.
|
||||||
*/
|
*/
|
||||||
NS_IMETHOD SetEnableUpdates(bool aEnableUpdates) = 0;
|
virtual void SetEnableUpdates(bool aEnableUpdates) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the charset that the element claims the style sheet is in
|
* Gets the charset that the element claims the style sheet is in.
|
||||||
|
* Can return empty string to indicate that we have no charset
|
||||||
|
* information.
|
||||||
*
|
*
|
||||||
* @param aCharset the charset
|
* @param aCharset the charset
|
||||||
*/
|
*/
|
||||||
NS_IMETHOD GetCharset(nsAString& aCharset) = 0;
|
virtual void GetCharset(nsAString& aCharset) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tells this element to use a different base URI. This is used for
|
* Tells this element to use a different base URI. This is used for
|
||||||
|
|
|
@ -69,7 +69,7 @@ nsStyleLinkElement::Traverse(nsCycleCollectionTraversalCallback &cb)
|
||||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mStyleSheet);
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mStyleSheet);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsStyleLinkElement::SetStyleSheet(StyleSheet* aStyleSheet)
|
nsStyleLinkElement::SetStyleSheet(StyleSheet* aStyleSheet)
|
||||||
{
|
{
|
||||||
if (mStyleSheet) {
|
if (mStyleSheet) {
|
||||||
|
@ -83,37 +83,30 @@ nsStyleLinkElement::SetStyleSheet(StyleSheet* aStyleSheet)
|
||||||
mStyleSheet->SetOwningNode(node);
|
mStyleSheet->SetOwningNode(node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP_(StyleSheet*)
|
StyleSheet*
|
||||||
nsStyleLinkElement::GetStyleSheet()
|
nsStyleLinkElement::GetStyleSheet()
|
||||||
{
|
{
|
||||||
return mStyleSheet;
|
return mStyleSheet;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsStyleLinkElement::InitStyleLinkElement(bool aDontLoadStyle)
|
nsStyleLinkElement::InitStyleLinkElement(bool aDontLoadStyle)
|
||||||
{
|
{
|
||||||
mDontLoadStyle = aDontLoadStyle;
|
mDontLoadStyle = aDontLoadStyle;
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsStyleLinkElement::SetEnableUpdates(bool aEnableUpdates)
|
nsStyleLinkElement::SetEnableUpdates(bool aEnableUpdates)
|
||||||
{
|
{
|
||||||
mUpdatesEnabled = aEnableUpdates;
|
mUpdatesEnabled = aEnableUpdates;
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
nsStyleLinkElement::GetCharset(nsAString& aCharset)
|
nsStyleLinkElement::GetCharset(nsAString& aCharset)
|
||||||
{
|
{
|
||||||
// descendants have to implement this themselves
|
aCharset.Truncate();
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* virtual */ void
|
/* virtual */ void
|
||||||
|
@ -312,7 +305,7 @@ nsStyleLinkElement::CheckPreloadAttrs(const nsAttrValue& aAs,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
nsresult
|
||||||
nsStyleLinkElement::UpdateStyleSheet(nsICSSLoaderObserver* aObserver,
|
nsStyleLinkElement::UpdateStyleSheet(nsICSSLoaderObserver* aObserver,
|
||||||
bool* aWillNotify,
|
bool* aWillNotify,
|
||||||
bool* aIsAlternate,
|
bool* aIsAlternate,
|
||||||
|
|
|
@ -43,15 +43,15 @@ public:
|
||||||
mozilla::StyleSheet* GetSheet() const { return mStyleSheet; }
|
mozilla::StyleSheet* GetSheet() const { return mStyleSheet; }
|
||||||
|
|
||||||
// nsIStyleSheetLinkingElement
|
// nsIStyleSheetLinkingElement
|
||||||
NS_IMETHOD SetStyleSheet(mozilla::StyleSheet* aStyleSheet) override;
|
void SetStyleSheet(mozilla::StyleSheet* aStyleSheet) override;
|
||||||
NS_IMETHOD_(mozilla::StyleSheet*) GetStyleSheet() override;
|
mozilla::StyleSheet* GetStyleSheet() override;
|
||||||
NS_IMETHOD InitStyleLinkElement(bool aDontLoadStyle) override;
|
void InitStyleLinkElement(bool aDontLoadStyle) override;
|
||||||
NS_IMETHOD UpdateStyleSheet(nsICSSLoaderObserver* aObserver,
|
nsresult UpdateStyleSheet(nsICSSLoaderObserver* aObserver,
|
||||||
bool* aWillNotify,
|
bool* aWillNotify,
|
||||||
bool* aIsAlternate,
|
bool* aIsAlternate,
|
||||||
bool aForceReload) override;
|
bool aForceReload) override;
|
||||||
NS_IMETHOD SetEnableUpdates(bool aEnableUpdates) override;
|
void SetEnableUpdates(bool aEnableUpdates) override;
|
||||||
NS_IMETHOD GetCharset(nsAString& aCharset) override;
|
void GetCharset(nsAString& aCharset) override;
|
||||||
|
|
||||||
virtual void OverrideBaseURI(nsIURI* aNewBaseURI) override;
|
virtual void OverrideBaseURI(nsIURI* aNewBaseURI) override;
|
||||||
virtual void SetLineNumber(uint32_t aLineNumber) override;
|
virtual void SetLineNumber(uint32_t aLineNumber) override;
|
||||||
|
|
|
@ -4320,9 +4320,10 @@ EventStateManager::NotifyMouseOver(WidgetMouseEvent* aMouseEvent,
|
||||||
// content associated with our subdocument.
|
// content associated with our subdocument.
|
||||||
EnsureDocument(mPresContext);
|
EnsureDocument(mPresContext);
|
||||||
if (nsIDocument *parentDoc = mDocument->GetParentDocument()) {
|
if (nsIDocument *parentDoc = mDocument->GetParentDocument()) {
|
||||||
if (nsIContent *docContent = parentDoc->FindContentForSubDocument(mDocument)) {
|
if (nsCOMPtr<nsIContent> docContent =
|
||||||
|
parentDoc->FindContentForSubDocument(mDocument)) {
|
||||||
if (nsIPresShell *parentShell = parentDoc->GetShell()) {
|
if (nsIPresShell *parentShell = parentDoc->GetShell()) {
|
||||||
EventStateManager* parentESM =
|
RefPtr<EventStateManager> parentESM =
|
||||||
parentShell->GetPresContext()->EventStateManager();
|
parentShell->GetPresContext()->EventStateManager();
|
||||||
parentESM->NotifyMouseOver(aMouseEvent, docContent);
|
parentESM->NotifyMouseOver(aMouseEvent, docContent);
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,11 +150,9 @@ public:
|
||||||
{
|
{
|
||||||
SetHTMLAttr(nsGkAtoms::type, aType, aRv);
|
SetHTMLAttr(nsGkAtoms::type, aType, aRv);
|
||||||
}
|
}
|
||||||
// Requires nsresult return for nsStyleLinkElement override.
|
void GetCharset(nsAString& aValue) override
|
||||||
NS_IMETHODIMP GetCharset(nsAString& aValue) override
|
|
||||||
{
|
{
|
||||||
GetHTMLAttr(nsGkAtoms::charset, aValue);
|
GetHTMLAttr(nsGkAtoms::charset, aValue);
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
void SetCharset(const nsAString& aCharset, ErrorResult& aRv)
|
void SetCharset(const nsAString& aCharset, ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,6 @@ with Files("**"):
|
||||||
|
|
||||||
XPIDL_SOURCES += [
|
XPIDL_SOURCES += [
|
||||||
'nsIDOMSVGElement.idl',
|
'nsIDOMSVGElement.idl',
|
||||||
'nsIDOMSVGLength.idl',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
XPIDL_MODULE = 'dom_svg'
|
XPIDL_MODULE = 'dom_svg'
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
#include "domstubs.idl"
|
|
||||||
|
|
||||||
[uuid(2596325c-aed0-487e-96a1-0a6d589b9c6b)]
|
|
||||||
interface nsIDOMSVGLength : nsISupports
|
|
||||||
{
|
|
||||||
// Length Unit Types
|
|
||||||
const unsigned short SVG_LENGTHTYPE_UNKNOWN = 0;
|
|
||||||
const unsigned short SVG_LENGTHTYPE_NUMBER = 1;
|
|
||||||
const unsigned short SVG_LENGTHTYPE_PERCENTAGE = 2;
|
|
||||||
const unsigned short SVG_LENGTHTYPE_EMS = 3;
|
|
||||||
const unsigned short SVG_LENGTHTYPE_EXS = 4;
|
|
||||||
const unsigned short SVG_LENGTHTYPE_PX = 5;
|
|
||||||
const unsigned short SVG_LENGTHTYPE_CM = 6;
|
|
||||||
const unsigned short SVG_LENGTHTYPE_MM = 7;
|
|
||||||
const unsigned short SVG_LENGTHTYPE_IN = 8;
|
|
||||||
const unsigned short SVG_LENGTHTYPE_PT = 9;
|
|
||||||
const unsigned short SVG_LENGTHTYPE_PC = 10;
|
|
||||||
|
|
||||||
readonly attribute unsigned short unitType;
|
|
||||||
attribute float value;
|
|
||||||
// raises DOMException on setting
|
|
||||||
attribute float valueInSpecifiedUnits;
|
|
||||||
// raises DOMException on setting
|
|
||||||
attribute DOMString valueAsString;
|
|
||||||
// raises DOMException on setting
|
|
||||||
|
|
||||||
void newValueSpecifiedUnits(in unsigned short unitType, in float valueInSpecifiedUnits);
|
|
||||||
void convertToSpecifiedUnits(in unsigned short unitType);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
#include "SVGAnimatedLengthList.h"
|
#include "SVGAnimatedLengthList.h"
|
||||||
#include "nsSVGElement.h"
|
#include "nsSVGElement.h"
|
||||||
#include "nsSVGLength2.h"
|
#include "nsSVGLength2.h"
|
||||||
#include "nsIDOMSVGLength.h"
|
|
||||||
#include "nsError.h"
|
#include "nsError.h"
|
||||||
#include "nsMathUtils.h"
|
#include "nsMathUtils.h"
|
||||||
#include "mozilla/dom/SVGLengthBinding.h"
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
|
@ -22,6 +21,8 @@
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
using namespace dom;
|
||||||
|
|
||||||
static nsSVGAttrTearoffTable<nsSVGLength2, DOMSVGLength>
|
static nsSVGAttrTearoffTable<nsSVGLength2, DOMSVGLength>
|
||||||
sBaseSVGLengthTearOffTable,
|
sBaseSVGLengthTearOffTable,
|
||||||
sAnimSVGLengthTearOffTable;
|
sAnimSVGLengthTearOffTable;
|
||||||
|
@ -55,7 +56,6 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(DOMSVGLength)
|
||||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMSVGLength)
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMSVGLength)
|
||||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||||
NS_INTERFACE_MAP_ENTRY(mozilla::DOMSVGLength) // pseudo-interface
|
NS_INTERFACE_MAP_ENTRY(mozilla::DOMSVGLength) // pseudo-interface
|
||||||
NS_INTERFACE_MAP_ENTRY(nsIDOMSVGLength)
|
|
||||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||||
NS_INTERFACE_MAP_END
|
NS_INTERFACE_MAP_END
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ DOMSVGLength::DOMSVGLength(DOMSVGLengthList *aList,
|
||||||
, mListIndex(aListIndex)
|
, mListIndex(aListIndex)
|
||||||
, mAttrEnum(aAttrEnum)
|
, mAttrEnum(aAttrEnum)
|
||||||
, mIsAnimValItem(aIsAnimValItem)
|
, mIsAnimValItem(aIsAnimValItem)
|
||||||
, mUnit(nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER)
|
, mUnit(SVGLengthBinding::SVG_LENGTHTYPE_NUMBER)
|
||||||
, mValue(0.0f)
|
, mValue(0.0f)
|
||||||
, mVal(nullptr)
|
, mVal(nullptr)
|
||||||
{
|
{
|
||||||
|
@ -118,7 +118,7 @@ DOMSVGLength::DOMSVGLength()
|
||||||
, mListIndex(0)
|
, mListIndex(0)
|
||||||
, mAttrEnum(0)
|
, mAttrEnum(0)
|
||||||
, mIsAnimValItem(false)
|
, mIsAnimValItem(false)
|
||||||
, mUnit(nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER)
|
, mUnit(SVGLengthBinding::SVG_LENGTHTYPE_NUMBER)
|
||||||
, mValue(0.0f)
|
, mValue(0.0f)
|
||||||
, mVal(nullptr)
|
, mVal(nullptr)
|
||||||
{
|
{
|
||||||
|
@ -130,7 +130,7 @@ DOMSVGLength::DOMSVGLength(nsSVGLength2* aVal, nsSVGElement* aSVGElement,
|
||||||
, mListIndex(0)
|
, mListIndex(0)
|
||||||
, mAttrEnum(0)
|
, mAttrEnum(0)
|
||||||
, mIsAnimValItem(aAnimVal)
|
, mIsAnimValItem(aAnimVal)
|
||||||
, mUnit(nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER)
|
, mUnit(SVGLengthBinding::SVG_LENGTHTYPE_NUMBER)
|
||||||
, mValue(0.0f)
|
, mValue(0.0f)
|
||||||
, mVal(aVal)
|
, mVal(aVal)
|
||||||
, mSVGElement(aSVGElement)
|
, mSVGElement(aSVGElement)
|
||||||
|
@ -192,7 +192,7 @@ DOMSVGLength::Copy()
|
||||||
unit = length.GetUnit();
|
unit = length.GetUnit();
|
||||||
value = length.GetValueInCurrentUnits();
|
value = length.GetValueInCurrentUnits();
|
||||||
}
|
}
|
||||||
copy->NewValueSpecifiedUnits(unit, value);
|
copy->NewValueSpecifiedUnits(unit, value, IgnoreErrors());
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,13 +212,6 @@ DOMSVGLength::UnitType()
|
||||||
return HasOwner() ? InternalItem().GetUnit() : mUnit;
|
return HasOwner() ? InternalItem().GetUnit() : mUnit;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
DOMSVGLength::GetUnitType(uint16_t* aUnit)
|
|
||||||
{
|
|
||||||
*aUnit = UnitType();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
float
|
float
|
||||||
DOMSVGLength::GetValue(ErrorResult& aRv)
|
DOMSVGLength::GetValue(ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
|
@ -239,8 +232,8 @@ DOMSVGLength::GetValue(ErrorResult& aRv)
|
||||||
aRv.Throw(NS_ERROR_FAILURE);
|
aRv.Throw(NS_ERROR_FAILURE);
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
} else if (mUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER ||
|
} else if (mUnit == SVGLengthBinding::SVG_LENGTHTYPE_NUMBER ||
|
||||||
mUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_PX) {
|
mUnit == SVGLengthBinding::SVG_LENGTHTYPE_PX) {
|
||||||
return mValue;
|
return mValue;
|
||||||
}
|
}
|
||||||
// else [SVGWG issue] Can't convert this length's value to user units
|
// else [SVGWG issue] Can't convert this length's value to user units
|
||||||
|
@ -249,14 +242,6 @@ DOMSVGLength::GetValue(ErrorResult& aRv)
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
DOMSVGLength::GetValue(float* aValue)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
*aValue = GetValue(rv);
|
|
||||||
return rv.StealNSResult();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DOMSVGLength::SetValue(float aUserUnitValue, ErrorResult& aRv)
|
DOMSVGLength::SetValue(float aUserUnitValue, ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
|
@ -289,8 +274,8 @@ DOMSVGLength::SetValue(float aUserUnitValue, ErrorResult& aRv)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (mUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER ||
|
} else if (mUnit == SVGLengthBinding::SVG_LENGTHTYPE_NUMBER ||
|
||||||
mUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_PX) {
|
mUnit == SVGLengthBinding::SVG_LENGTHTYPE_PX) {
|
||||||
mValue = aUserUnitValue;
|
mValue = aUserUnitValue;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -299,18 +284,6 @@ DOMSVGLength::SetValue(float aUserUnitValue, ErrorResult& aRv)
|
||||||
aRv.Throw(NS_ERROR_FAILURE);
|
aRv.Throw(NS_ERROR_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
DOMSVGLength::SetValue(float aUserUnitValue)
|
|
||||||
{
|
|
||||||
if (!IsFinite(aUserUnitValue)) {
|
|
||||||
return NS_ERROR_ILLEGAL_VALUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
ErrorResult rv;
|
|
||||||
SetValue(aUserUnitValue, rv);
|
|
||||||
return rv.StealNSResult();
|
|
||||||
}
|
|
||||||
|
|
||||||
float
|
float
|
||||||
DOMSVGLength::ValueInSpecifiedUnits()
|
DOMSVGLength::ValueInSpecifiedUnits()
|
||||||
{
|
{
|
||||||
|
@ -328,13 +301,6 @@ DOMSVGLength::ValueInSpecifiedUnits()
|
||||||
return HasOwner() ? InternalItem().GetValueInCurrentUnits() : mValue;
|
return HasOwner() ? InternalItem().GetValueInCurrentUnits() : mValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
DOMSVGLength::GetValueInSpecifiedUnits(float* aValue)
|
|
||||||
{
|
|
||||||
*aValue = ValueInSpecifiedUnits();
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DOMSVGLength::SetValueInSpecifiedUnits(float aValue, ErrorResult& aRv)
|
DOMSVGLength::SetValueInSpecifiedUnits(float aValue, ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
|
@ -359,18 +325,6 @@ DOMSVGLength::SetValueInSpecifiedUnits(float aValue, ErrorResult& aRv)
|
||||||
mValue = aValue;
|
mValue = aValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
DOMSVGLength::SetValueInSpecifiedUnits(float aValue)
|
|
||||||
{
|
|
||||||
if (!IsFinite(aValue)) {
|
|
||||||
return NS_ERROR_ILLEGAL_VALUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
ErrorResult rv;
|
|
||||||
SetValueInSpecifiedUnits(aValue, rv);
|
|
||||||
return rv.StealNSResult();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DOMSVGLength::SetValueAsString(const nsAString& aValue, ErrorResult& aRv)
|
DOMSVGLength::SetValueAsString(const nsAString& aValue, ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
|
@ -401,15 +355,7 @@ DOMSVGLength::SetValueAsString(const nsAString& aValue, ErrorResult& aRv)
|
||||||
mUnit = value.GetUnit();
|
mUnit = value.GetUnit();
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
DOMSVGLength::SetValueAsString(const nsAString& aValue)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
SetValueAsString(aValue, rv);
|
|
||||||
return rv.StealNSResult();
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
DOMSVGLength::GetValueAsString(nsAString& aValue)
|
DOMSVGLength::GetValueAsString(nsAString& aValue)
|
||||||
{
|
{
|
||||||
if (mVal) {
|
if (mVal) {
|
||||||
|
@ -419,7 +365,7 @@ DOMSVGLength::GetValueAsString(nsAString& aValue)
|
||||||
} else {
|
} else {
|
||||||
mVal->GetBaseValueString(aValue);
|
mVal->GetBaseValueString(aValue);
|
||||||
}
|
}
|
||||||
return NS_OK;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mIsAnimValItem && HasOwner()) {
|
if (mIsAnimValItem && HasOwner()) {
|
||||||
|
@ -427,10 +373,9 @@ DOMSVGLength::GetValueAsString(nsAString& aValue)
|
||||||
}
|
}
|
||||||
if (HasOwner()) {
|
if (HasOwner()) {
|
||||||
InternalItem().GetValueAsString(aValue);
|
InternalItem().GetValueAsString(aValue);
|
||||||
return NS_OK;
|
return;
|
||||||
}
|
}
|
||||||
SVGLength(mValue, mUnit).GetValueAsString(aValue);
|
SVGLength(mValue, mUnit).GetValueAsString(aValue);
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -464,18 +409,6 @@ DOMSVGLength::NewValueSpecifiedUnits(uint16_t aUnit, float aValue,
|
||||||
mValue = aValue;
|
mValue = aValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
DOMSVGLength::NewValueSpecifiedUnits(uint16_t aUnit, float aValue)
|
|
||||||
{
|
|
||||||
if (!IsFinite(aValue)) {
|
|
||||||
return NS_ERROR_ILLEGAL_VALUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
ErrorResult rv;
|
|
||||||
NewValueSpecifiedUnits(aUnit, aValue, rv);
|
|
||||||
return rv.StealNSResult();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
DOMSVGLength::ConvertToSpecifiedUnits(uint16_t aUnit, ErrorResult& aRv)
|
DOMSVGLength::ConvertToSpecifiedUnits(uint16_t aUnit, ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
|
@ -518,18 +451,10 @@ DOMSVGLength::ConvertToSpecifiedUnits(uint16_t aUnit, ErrorResult& aRv)
|
||||||
aRv.Throw(NS_ERROR_FAILURE);
|
aRv.Throw(NS_ERROR_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
DOMSVGLength::ConvertToSpecifiedUnits(uint16_t aUnit)
|
|
||||||
{
|
|
||||||
ErrorResult rv;
|
|
||||||
ConvertToSpecifiedUnits(aUnit, rv);
|
|
||||||
return rv.StealNSResult();
|
|
||||||
}
|
|
||||||
|
|
||||||
JSObject*
|
JSObject*
|
||||||
DOMSVGLength::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
DOMSVGLength::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
||||||
{
|
{
|
||||||
return dom::SVGLengthBinding::Wrap(aCx, this, aGivenProto);
|
return SVGLengthBinding::Wrap(aCx, this, aGivenProto);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#include "DOMSVGLengthList.h"
|
#include "DOMSVGLengthList.h"
|
||||||
#include "nsCycleCollectionParticipant.h"
|
#include "nsCycleCollectionParticipant.h"
|
||||||
#include "nsDebug.h"
|
#include "nsDebug.h"
|
||||||
#include "nsIDOMSVGLength.h"
|
|
||||||
#include "nsTArray.h"
|
#include "nsTArray.h"
|
||||||
#include "SVGLength.h"
|
#include "SVGLength.h"
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
|
@ -74,7 +73,7 @@ class ErrorResult;
|
||||||
* if-else as appropriate. The bug for doing that work is:
|
* if-else as appropriate. The bug for doing that work is:
|
||||||
* https://bugzilla.mozilla.org/show_bug.cgi?id=571734
|
* https://bugzilla.mozilla.org/show_bug.cgi?id=571734
|
||||||
*/
|
*/
|
||||||
class DOMSVGLength final : public nsIDOMSVGLength,
|
class DOMSVGLength final : public nsISupports,
|
||||||
public nsWrapperCache
|
public nsWrapperCache
|
||||||
{
|
{
|
||||||
friend class AutoChangeLengthNotifier;
|
friend class AutoChangeLengthNotifier;
|
||||||
|
@ -90,7 +89,6 @@ public:
|
||||||
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOMSVGLENGTH_IID)
|
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOMSVGLENGTH_IID)
|
||||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGLength)
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGLength)
|
||||||
NS_DECL_NSIDOMSVGLENGTH
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic ctor for DOMSVGLength objects that are created for an attribute.
|
* Generic ctor for DOMSVGLength objects that are created for an attribute.
|
||||||
|
@ -177,7 +175,7 @@ public:
|
||||||
void SetValue(float aValue, ErrorResult& aRv);
|
void SetValue(float aValue, ErrorResult& aRv);
|
||||||
float ValueInSpecifiedUnits();
|
float ValueInSpecifiedUnits();
|
||||||
void SetValueInSpecifiedUnits(float aValue, ErrorResult& aRv);
|
void SetValueInSpecifiedUnits(float aValue, ErrorResult& aRv);
|
||||||
// The XPCOM GetValueAsString is good
|
void GetValueAsString(nsAString& aValue);
|
||||||
void SetValueAsString(const nsAString& aValue, ErrorResult& aRv);
|
void SetValueAsString(const nsAString& aValue, ErrorResult& aRv);
|
||||||
void NewValueSpecifiedUnits(uint16_t aUnit, float aValue,
|
void NewValueSpecifiedUnits(uint16_t aUnit, float aValue,
|
||||||
ErrorResult& aRv);
|
ErrorResult& aRv);
|
||||||
|
|
|
@ -12,9 +12,12 @@
|
||||||
#include "nsSVGAttrTearoffTable.h"
|
#include "nsSVGAttrTearoffTable.h"
|
||||||
#include "nsSMILValue.h"
|
#include "nsSMILValue.h"
|
||||||
#include "SVGLengthListSMILType.h"
|
#include "SVGLengthListSMILType.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
using namespace dom;
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
SVGAnimatedLengthList::SetBaseValueString(const nsAString& aValue)
|
SVGAnimatedLengthList::SetBaseValueString(const nsAString& aValue)
|
||||||
{
|
{
|
||||||
|
@ -160,9 +163,9 @@ SVGAnimatedLengthList::
|
||||||
aPreventCachingOfSandwich = false;
|
aPreventCachingOfSandwich = false;
|
||||||
for (uint32_t i = 0; i < llai->Length(); ++i) {
|
for (uint32_t i = 0; i < llai->Length(); ++i) {
|
||||||
uint8_t unit = (*llai)[i].GetUnit();
|
uint8_t unit = (*llai)[i].GetUnit();
|
||||||
if (unit == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE ||
|
if (unit == SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE ||
|
||||||
unit == nsIDOMSVGLength::SVG_LENGTHTYPE_EMS ||
|
unit == SVGLengthBinding::SVG_LENGTHTYPE_EMS ||
|
||||||
unit == nsIDOMSVGLength::SVG_LENGTHTYPE_EXS) {
|
unit == SVGLengthBinding::SVG_LENGTHTYPE_EXS) {
|
||||||
aPreventCachingOfSandwich = true;
|
aPreventCachingOfSandwich = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "mozilla/gfx/2D.h"
|
#include "mozilla/gfx/2D.h"
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
#include "mozilla/dom/SVGCircleElementBinding.h"
|
#include "mozilla/dom/SVGCircleElementBinding.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
|
|
||||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Circle)
|
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Circle)
|
||||||
|
|
||||||
|
@ -24,9 +25,9 @@ SVGCircleElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
||||||
|
|
||||||
nsSVGElement::LengthInfo SVGCircleElement::sLengthInfo[3] =
|
nsSVGElement::LengthInfo SVGCircleElement::sLengthInfo[3] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::cx, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
{ &nsGkAtoms::cx, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::cy, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
{ &nsGkAtoms::cy, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
||||||
{ &nsGkAtoms::r, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::XY }
|
{ &nsGkAtoms::r, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::XY }
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "mozilla/dom/SVGEllipseElement.h"
|
#include "mozilla/dom/SVGEllipseElement.h"
|
||||||
#include "mozilla/dom/SVGEllipseElementBinding.h"
|
#include "mozilla/dom/SVGEllipseElementBinding.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
#include "mozilla/gfx/2D.h"
|
#include "mozilla/gfx/2D.h"
|
||||||
#include "mozilla/gfx/PathHelpers.h"
|
#include "mozilla/gfx/PathHelpers.h"
|
||||||
#include "mozilla/RefPtr.h"
|
#include "mozilla/RefPtr.h"
|
||||||
|
@ -25,10 +26,10 @@ SVGEllipseElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
||||||
|
|
||||||
nsSVGElement::LengthInfo SVGEllipseElement::sLengthInfo[4] =
|
nsSVGElement::LengthInfo SVGEllipseElement::sLengthInfo[4] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::cx, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
{ &nsGkAtoms::cx, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::cy, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
{ &nsGkAtoms::cy, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
||||||
{ &nsGkAtoms::rx, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
{ &nsGkAtoms::rx, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::ry, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
{ &nsGkAtoms::ry, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "mozilla/dom/SVGFilterElement.h"
|
#include "mozilla/dom/SVGFilterElement.h"
|
||||||
#include "mozilla/dom/SVGFilterElementBinding.h"
|
#include "mozilla/dom/SVGFilterElementBinding.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
#include "nsSVGUtils.h"
|
#include "nsSVGUtils.h"
|
||||||
|
|
||||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Filter)
|
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Filter)
|
||||||
|
@ -25,10 +26,10 @@ SVGFilterElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
||||||
|
|
||||||
nsSVGElement::LengthInfo SVGFilterElement::sLengthInfo[4] =
|
nsSVGElement::LengthInfo SVGFilterElement::sLengthInfo[4] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::x, -10, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
{ &nsGkAtoms::x, -10, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::y, -10, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
{ &nsGkAtoms::y, -10, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
||||||
{ &nsGkAtoms::width, 120, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
{ &nsGkAtoms::width, 120, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::height, 120, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
{ &nsGkAtoms::height, 120, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
||||||
};
|
};
|
||||||
|
|
||||||
nsSVGElement::EnumInfo SVGFilterElement::sEnumInfo[2] =
|
nsSVGElement::EnumInfo SVGFilterElement::sEnumInfo[2] =
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "mozilla/dom/SVGDocument.h"
|
#include "mozilla/dom/SVGDocument.h"
|
||||||
#include "mozilla/dom/SVGForeignObjectElement.h"
|
#include "mozilla/dom/SVGForeignObjectElement.h"
|
||||||
#include "mozilla/dom/SVGForeignObjectElementBinding.h"
|
#include "mozilla/dom/SVGForeignObjectElementBinding.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
|
|
||||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(ForeignObject)
|
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(ForeignObject)
|
||||||
|
|
||||||
|
@ -24,10 +25,10 @@ SVGForeignObjectElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenPr
|
||||||
|
|
||||||
nsSVGElement::LengthInfo SVGForeignObjectElement::sLengthInfo[4] =
|
nsSVGElement::LengthInfo SVGForeignObjectElement::sLengthInfo[4] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::x, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
{ &nsGkAtoms::x, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::y, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
{ &nsGkAtoms::y, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
||||||
{ &nsGkAtoms::width, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
{ &nsGkAtoms::width, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::height, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
{ &nsGkAtoms::height, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "DOMSVGPoint.h"
|
#include "DOMSVGPoint.h"
|
||||||
#include "gfxPlatform.h"
|
#include "gfxPlatform.h"
|
||||||
#include "mozilla/gfx/2D.h"
|
#include "mozilla/gfx/2D.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
#include "nsComputedDOMStyle.h"
|
#include "nsComputedDOMStyle.h"
|
||||||
#include "nsSVGUtils.h"
|
#include "nsSVGUtils.h"
|
||||||
#include "nsSVGLength2.h"
|
#include "nsSVGLength2.h"
|
||||||
|
@ -16,6 +17,7 @@
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using namespace mozilla::gfx;
|
using namespace mozilla::gfx;
|
||||||
|
using namespace mozilla::dom;
|
||||||
|
|
||||||
nsSVGElement::NumberInfo SVGGeometryElement::sNumberInfo =
|
nsSVGElement::NumberInfo SVGGeometryElement::sNumberInfo =
|
||||||
{ &nsGkAtoms::pathLength, 0, false };
|
{ &nsGkAtoms::pathLength, 0, false };
|
||||||
|
@ -76,7 +78,8 @@ SVGGeometryElement::GeometryDependsOnCoordCtx()
|
||||||
// Check the nsSVGLength2 attribute
|
// Check the nsSVGLength2 attribute
|
||||||
LengthAttributesInfo info = const_cast<SVGGeometryElement*>(this)->GetLengthInfo();
|
LengthAttributesInfo info = const_cast<SVGGeometryElement*>(this)->GetLengthInfo();
|
||||||
for (uint32_t i = 0; i < info.mLengthCount; i++) {
|
for (uint32_t i = 0; i < info.mLengthCount; i++) {
|
||||||
if (info.mLengths[i].GetSpecifiedUnitType() == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE) {
|
if (info.mLengths[i].GetSpecifiedUnitType() ==
|
||||||
|
SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "mozilla/ArrayUtils.h"
|
#include "mozilla/ArrayUtils.h"
|
||||||
#include "mozilla/dom/SVGAnimatedTransformList.h"
|
#include "mozilla/dom/SVGAnimatedTransformList.h"
|
||||||
#include "mozilla/dom/SVGRadialGradientElementBinding.h"
|
#include "mozilla/dom/SVGRadialGradientElementBinding.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
#include "mozilla/dom/SVGLinearGradientElementBinding.h"
|
#include "mozilla/dom/SVGLinearGradientElementBinding.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
|
@ -126,10 +127,10 @@ SVGLinearGradientElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenP
|
||||||
|
|
||||||
nsSVGElement::LengthInfo SVGLinearGradientElement::sLengthInfo[4] =
|
nsSVGElement::LengthInfo SVGLinearGradientElement::sLengthInfo[4] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::x1, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
{ &nsGkAtoms::x1, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::y1, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
{ &nsGkAtoms::y1, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
||||||
{ &nsGkAtoms::x2, 100, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
{ &nsGkAtoms::x2, 100, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::y2, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
{ &nsGkAtoms::y2, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -200,12 +201,12 @@ SVGRadialGradientElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenP
|
||||||
|
|
||||||
nsSVGElement::LengthInfo SVGRadialGradientElement::sLengthInfo[6] =
|
nsSVGElement::LengthInfo SVGRadialGradientElement::sLengthInfo[6] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::cx, 50, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
{ &nsGkAtoms::cx, 50, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::cy, 50, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
{ &nsGkAtoms::cy, 50, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
||||||
{ &nsGkAtoms::r, 50, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::XY },
|
{ &nsGkAtoms::r, 50, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::XY },
|
||||||
{ &nsGkAtoms::fx, 50, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
{ &nsGkAtoms::fx, 50, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::fy, 50, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
{ &nsGkAtoms::fy, 50, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
||||||
{ &nsGkAtoms::fr, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::XY },
|
{ &nsGkAtoms::fr, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::XY },
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "imgINotificationObserver.h"
|
#include "imgINotificationObserver.h"
|
||||||
#include "mozilla/dom/SVGImageElementBinding.h"
|
#include "mozilla/dom/SVGImageElementBinding.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
|
|
||||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Image)
|
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Image)
|
||||||
|
@ -32,10 +33,10 @@ SVGImageElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
||||||
|
|
||||||
nsSVGElement::LengthInfo SVGImageElement::sLengthInfo[4] =
|
nsSVGElement::LengthInfo SVGImageElement::sLengthInfo[4] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::x, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
{ &nsGkAtoms::x, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::y, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
{ &nsGkAtoms::y, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
||||||
{ &nsGkAtoms::width, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
{ &nsGkAtoms::width, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::height, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
{ &nsGkAtoms::height, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
||||||
};
|
};
|
||||||
|
|
||||||
nsSVGElement::StringInfo SVGImageElement::sStringInfo[2] =
|
nsSVGElement::StringInfo SVGImageElement::sStringInfo[2] =
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
using namespace mozilla;
|
||||||
|
|
||||||
// Declare some helpers defined below:
|
// Declare some helpers defined below:
|
||||||
static void GetUnitString(nsAString& unit, uint16_t unitType);
|
static void GetUnitString(nsAString& unit, uint16_t unitType);
|
||||||
static uint16_t GetUnitTypeForString(const nsAString& unitStr);
|
static uint16_t GetUnitTypeForString(const nsAString& unitStr);
|
||||||
|
@ -57,8 +59,8 @@ SVGLength::SetValueFromString(const nsAString &aString)
|
||||||
inline static bool
|
inline static bool
|
||||||
IsAbsoluteUnit(uint8_t aUnit)
|
IsAbsoluteUnit(uint8_t aUnit)
|
||||||
{
|
{
|
||||||
return aUnit >= nsIDOMSVGLength::SVG_LENGTHTYPE_CM &&
|
return aUnit >= SVGLengthBinding::SVG_LENGTHTYPE_CM &&
|
||||||
aUnit <= nsIDOMSVGLength::SVG_LENGTHTYPE_PC;
|
aUnit <= SVGLengthBinding::SVG_LENGTHTYPE_PC;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -69,8 +71,8 @@ IsAbsoluteUnit(uint8_t aUnit)
|
||||||
*
|
*
|
||||||
* Example usage: to find out how many centimeters there are per inch:
|
* Example usage: to find out how many centimeters there are per inch:
|
||||||
*
|
*
|
||||||
* GetAbsUnitsPerAbsUnit(nsIDOMSVGLength::SVG_LENGTHTYPE_CM,
|
* GetAbsUnitsPerAbsUnit(SVGLengthBinding::SVG_LENGTHTYPE_CM,
|
||||||
* nsIDOMSVGLength::SVG_LENGTHTYPE_IN)
|
* SVGLengthBinding::SVG_LENGTHTYPE_IN)
|
||||||
*/
|
*/
|
||||||
inline static float GetAbsUnitsPerAbsUnit(uint8_t aUnits, uint8_t aPerUnit)
|
inline static float GetAbsUnitsPerAbsUnit(uint8_t aUnits, uint8_t aPerUnit)
|
||||||
{
|
{
|
||||||
|
@ -102,10 +104,10 @@ SVGLength::GetValueInSpecifiedUnit(uint8_t aUnit,
|
||||||
if (aUnit == mUnit) {
|
if (aUnit == mUnit) {
|
||||||
return mValue;
|
return mValue;
|
||||||
}
|
}
|
||||||
if ((aUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER &&
|
if ((aUnit == SVGLengthBinding::SVG_LENGTHTYPE_NUMBER &&
|
||||||
mUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_PX) ||
|
mUnit == SVGLengthBinding::SVG_LENGTHTYPE_PX) ||
|
||||||
(aUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_PX &&
|
(aUnit == SVGLengthBinding::SVG_LENGTHTYPE_PX &&
|
||||||
mUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER)) {
|
mUnit == SVGLengthBinding::SVG_LENGTHTYPE_NUMBER)) {
|
||||||
return mValue;
|
return mValue;
|
||||||
}
|
}
|
||||||
if (IsAbsoluteUnit(aUnit) && IsAbsoluteUnit(mUnit)) {
|
if (IsAbsoluteUnit(aUnit) && IsAbsoluteUnit(mUnit)) {
|
||||||
|
@ -144,24 +146,24 @@ float
|
||||||
SVGLength::GetUserUnitsPerUnit(const nsSVGElement *aElement, uint8_t aAxis) const
|
SVGLength::GetUserUnitsPerUnit(const nsSVGElement *aElement, uint8_t aAxis) const
|
||||||
{
|
{
|
||||||
switch (mUnit) {
|
switch (mUnit) {
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER:
|
case SVGLengthBinding::SVG_LENGTHTYPE_NUMBER:
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_PX:
|
case SVGLengthBinding::SVG_LENGTHTYPE_PX:
|
||||||
return 1.0f;
|
return 1.0f;
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_MM:
|
case SVGLengthBinding::SVG_LENGTHTYPE_MM:
|
||||||
return INCHES_PER_MM_FLOAT * GetUserUnitsPerInch();
|
return INCHES_PER_MM_FLOAT * GetUserUnitsPerInch();
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_CM:
|
case SVGLengthBinding::SVG_LENGTHTYPE_CM:
|
||||||
return INCHES_PER_CM_FLOAT * GetUserUnitsPerInch();
|
return INCHES_PER_CM_FLOAT * GetUserUnitsPerInch();
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_IN:
|
case SVGLengthBinding::SVG_LENGTHTYPE_IN:
|
||||||
return GetUserUnitsPerInch();
|
return GetUserUnitsPerInch();
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_PT:
|
case SVGLengthBinding::SVG_LENGTHTYPE_PT:
|
||||||
return (1.0f/POINTS_PER_INCH_FLOAT) * GetUserUnitsPerInch();
|
return (1.0f/POINTS_PER_INCH_FLOAT) * GetUserUnitsPerInch();
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_PC:
|
case SVGLengthBinding::SVG_LENGTHTYPE_PC:
|
||||||
return (12.0f/POINTS_PER_INCH_FLOAT) * GetUserUnitsPerInch();
|
return (12.0f/POINTS_PER_INCH_FLOAT) * GetUserUnitsPerInch();
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE:
|
case SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE:
|
||||||
return GetUserUnitsPerPercent(aElement, aAxis);
|
return GetUserUnitsPerPercent(aElement, aAxis);
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_EMS:
|
case SVGLengthBinding::SVG_LENGTHTYPE_EMS:
|
||||||
return SVGContentUtils::GetFontSize(const_cast<nsSVGElement*>(aElement));
|
return SVGContentUtils::GetFontSize(const_cast<nsSVGElement*>(aElement));
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_EXS:
|
case SVGLengthBinding::SVG_LENGTHTYPE_EXS:
|
||||||
return SVGContentUtils::GetFontXHeight(const_cast<nsSVGElement*>(aElement));
|
return SVGContentUtils::GetFontXHeight(const_cast<nsSVGElement*>(aElement));
|
||||||
default:
|
default:
|
||||||
NS_NOTREACHED("Unknown unit type");
|
NS_NOTREACHED("Unknown unit type");
|
||||||
|
@ -183,7 +185,7 @@ SVGLength::GetUserUnitsPerPercent(const nsSVGElement *aElement, uint8_t aAxis)
|
||||||
|
|
||||||
// Helpers:
|
// Helpers:
|
||||||
|
|
||||||
// These items must be at the same index as the nsIDOMSVGLength constants!
|
// These items must be at the same index as the SVGLength constants!
|
||||||
static nsStaticAtom** const unitMap[] =
|
static nsStaticAtom** const unitMap[] =
|
||||||
{
|
{
|
||||||
nullptr, /* SVG_LENGTHTYPE_UNKNOWN */
|
nullptr, /* SVG_LENGTHTYPE_UNKNOWN */
|
||||||
|
@ -215,7 +217,7 @@ static uint16_t
|
||||||
GetUnitTypeForString(const nsAString& unitStr)
|
GetUnitTypeForString(const nsAString& unitStr)
|
||||||
{
|
{
|
||||||
if (unitStr.IsEmpty())
|
if (unitStr.IsEmpty())
|
||||||
return nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER;
|
return SVGLengthBinding::SVG_LENGTHTYPE_NUMBER;
|
||||||
|
|
||||||
nsAtom* unitAtom = NS_GetStaticAtom(unitStr);
|
nsAtom* unitAtom = NS_GetStaticAtom(unitStr);
|
||||||
|
|
||||||
|
@ -226,7 +228,7 @@ GetUnitTypeForString(const nsAString& unitStr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nsIDOMSVGLength::SVG_LENGTHTYPE_UNKNOWN;
|
return SVGLengthBinding::SVG_LENGTHTYPE_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
|
@ -8,9 +8,9 @@
|
||||||
#define MOZILLA_SVGLENGTH_H__
|
#define MOZILLA_SVGLENGTH_H__
|
||||||
|
|
||||||
#include "nsDebug.h"
|
#include "nsDebug.h"
|
||||||
#include "nsIDOMSVGLength.h"
|
|
||||||
#include "nsMathUtils.h"
|
#include "nsMathUtils.h"
|
||||||
#include "mozilla/FloatingPoint.h"
|
#include "mozilla/FloatingPoint.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
|
|
||||||
class nsSVGElement;
|
class nsSVGElement;
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ public:
|
||||||
SVGLength()
|
SVGLength()
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
: mValue(0.0f)
|
: mValue(0.0f)
|
||||||
, mUnit(nsIDOMSVGLength::SVG_LENGTHTYPE_UNKNOWN) // caught by IsValid()
|
, mUnit(dom::SVGLengthBinding::SVG_LENGTHTYPE_UNKNOWN) // caught by IsValid()
|
||||||
#endif
|
#endif
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
@ -120,12 +120,12 @@ public:
|
||||||
uint8_t aAxis) const;
|
uint8_t aAxis) const;
|
||||||
|
|
||||||
bool IsPercentage() const {
|
bool IsPercentage() const {
|
||||||
return mUnit == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE;
|
return mUnit == dom::SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool IsValidUnitType(uint16_t unit) {
|
static bool IsValidUnitType(uint16_t unit) {
|
||||||
return unit > nsIDOMSVGLength::SVG_LENGTHTYPE_UNKNOWN &&
|
return unit > dom::SVGLengthBinding::SVG_LENGTHTYPE_UNKNOWN &&
|
||||||
unit <= nsIDOMSVGLength::SVG_LENGTHTYPE_PC;
|
unit <= dom::SVGLengthBinding::SVG_LENGTHTYPE_PC;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "nsSVGElement.h"
|
#include "nsSVGElement.h"
|
||||||
#include "nsTArray.h"
|
#include "nsTArray.h"
|
||||||
#include "SVGLength.h"
|
#include "SVGLength.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
@ -337,7 +338,7 @@ public:
|
||||||
|
|
||||||
bool HasPercentageValueAt(uint32_t aIndex) const {
|
bool HasPercentageValueAt(uint32_t aIndex) const {
|
||||||
const SVGLength& length = (*mList)[aIndex];
|
const SVGLength& length = (*mList)[aIndex];
|
||||||
return length.GetUnit() == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE;
|
return length.GetUnit() == dom::SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "mozilla/dom/SVGLineElement.h"
|
#include "mozilla/dom/SVGLineElement.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
#include "mozilla/dom/SVGLineElementBinding.h"
|
#include "mozilla/dom/SVGLineElementBinding.h"
|
||||||
#include "mozilla/gfx/2D.h"
|
#include "mozilla/gfx/2D.h"
|
||||||
|
|
||||||
|
@ -23,10 +24,10 @@ SVGLineElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
||||||
|
|
||||||
nsSVGElement::LengthInfo SVGLineElement::sLengthInfo[4] =
|
nsSVGElement::LengthInfo SVGLineElement::sLengthInfo[4] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::x1, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
{ &nsGkAtoms::x1, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::y1, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
{ &nsGkAtoms::y1, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
||||||
{ &nsGkAtoms::x2, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
{ &nsGkAtoms::x2, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::y2, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
{ &nsGkAtoms::y2, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "SVGAnimatedPreserveAspectRatio.h"
|
#include "SVGAnimatedPreserveAspectRatio.h"
|
||||||
#include "nsError.h"
|
#include "nsError.h"
|
||||||
#include "mozilla/dom/SVGAngle.h"
|
#include "mozilla/dom/SVGAngle.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
#include "mozilla/dom/SVGMarkerElement.h"
|
#include "mozilla/dom/SVGMarkerElement.h"
|
||||||
#include "mozilla/dom/SVGMarkerElementBinding.h"
|
#include "mozilla/dom/SVGMarkerElementBinding.h"
|
||||||
#include "mozilla/Preferences.h"
|
#include "mozilla/Preferences.h"
|
||||||
|
@ -33,10 +34,10 @@ SVGMarkerElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
||||||
|
|
||||||
nsSVGElement::LengthInfo SVGMarkerElement::sLengthInfo[4] =
|
nsSVGElement::LengthInfo SVGMarkerElement::sLengthInfo[4] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::refX, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
{ &nsGkAtoms::refX, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::refY, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
{ &nsGkAtoms::refY, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
||||||
{ &nsGkAtoms::markerWidth, 3, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
{ &nsGkAtoms::markerWidth, 3, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::markerHeight, 3, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
{ &nsGkAtoms::markerHeight, 3, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
||||||
};
|
};
|
||||||
|
|
||||||
nsSVGEnumMapping SVGMarkerElement::sUnitsMap[] = {
|
nsSVGEnumMapping SVGMarkerElement::sUnitsMap[] = {
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
#include "mozilla/dom/SVGMaskElement.h"
|
#include "mozilla/dom/SVGMaskElement.h"
|
||||||
#include "mozilla/dom/SVGMaskElementBinding.h"
|
#include "mozilla/dom/SVGMaskElementBinding.h"
|
||||||
|
|
||||||
|
@ -26,10 +27,10 @@ SVGMaskElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
||||||
|
|
||||||
nsSVGElement::LengthInfo SVGMaskElement::sLengthInfo[4] =
|
nsSVGElement::LengthInfo SVGMaskElement::sLengthInfo[4] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::x, -10, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
{ &nsGkAtoms::x, -10, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::y, -10, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
{ &nsGkAtoms::y, -10, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
||||||
{ &nsGkAtoms::width, 120, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
{ &nsGkAtoms::width, 120, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::height, 120, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
{ &nsGkAtoms::height, 120, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
||||||
};
|
};
|
||||||
|
|
||||||
nsSVGElement::EnumInfo SVGMaskElement::sEnumInfo[2] =
|
nsSVGElement::EnumInfo SVGMaskElement::sEnumInfo[2] =
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
#include "mozilla/dom/SVGAnimatedTransformList.h"
|
#include "mozilla/dom/SVGAnimatedTransformList.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
#include "mozilla/dom/SVGPatternElement.h"
|
#include "mozilla/dom/SVGPatternElement.h"
|
||||||
#include "mozilla/dom/SVGPatternElementBinding.h"
|
#include "mozilla/dom/SVGPatternElementBinding.h"
|
||||||
|
|
||||||
|
@ -27,10 +28,10 @@ SVGPatternElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
||||||
|
|
||||||
nsSVGElement::LengthInfo SVGPatternElement::sLengthInfo[4] =
|
nsSVGElement::LengthInfo SVGPatternElement::sLengthInfo[4] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::x, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
{ &nsGkAtoms::x, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::y, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
{ &nsGkAtoms::y, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
||||||
{ &nsGkAtoms::width, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
{ &nsGkAtoms::width, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::height, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
{ &nsGkAtoms::height, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
||||||
};
|
};
|
||||||
|
|
||||||
nsSVGElement::EnumInfo SVGPatternElement::sEnumInfo[2] =
|
nsSVGElement::EnumInfo SVGPatternElement::sEnumInfo[2] =
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "mozilla/dom/SVGRectElement.h"
|
#include "mozilla/dom/SVGRectElement.h"
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
#include "mozilla/dom/SVGRectElementBinding.h"
|
#include "mozilla/dom/SVGRectElementBinding.h"
|
||||||
#include "mozilla/gfx/2D.h"
|
#include "mozilla/gfx/2D.h"
|
||||||
#include "mozilla/gfx/Matrix.h"
|
#include "mozilla/gfx/Matrix.h"
|
||||||
|
@ -30,12 +31,12 @@ SVGRectElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
||||||
|
|
||||||
nsSVGElement::LengthInfo SVGRectElement::sLengthInfo[6] =
|
nsSVGElement::LengthInfo SVGRectElement::sLengthInfo[6] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::x, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
{ &nsGkAtoms::x, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::y, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
{ &nsGkAtoms::y, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
||||||
{ &nsGkAtoms::width, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
{ &nsGkAtoms::width, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::height, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
{ &nsGkAtoms::height, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
||||||
{ &nsGkAtoms::rx, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
{ &nsGkAtoms::rx, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::ry, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y }
|
{ &nsGkAtoms::ry, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y }
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "mozilla/dom/SVGTextContentElement.h"
|
#include "mozilla/dom/SVGTextContentElement.h"
|
||||||
|
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
#include "mozilla/dom/SVGIRect.h"
|
#include "mozilla/dom/SVGIRect.h"
|
||||||
#include "nsBidiUtils.h"
|
#include "nsBidiUtils.h"
|
||||||
#include "nsISVGPoint.h"
|
#include "nsISVGPoint.h"
|
||||||
|
@ -30,7 +31,7 @@ nsSVGElement::EnumInfo SVGTextContentElement::sEnumInfo[1] =
|
||||||
|
|
||||||
nsSVGElement::LengthInfo SVGTextContentElement::sLengthInfo[1] =
|
nsSVGElement::LengthInfo SVGTextContentElement::sLengthInfo[1] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::textLength, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::XY }
|
{ &nsGkAtoms::textLength, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::XY }
|
||||||
};
|
};
|
||||||
|
|
||||||
SVGTextFrame*
|
SVGTextFrame*
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "mozilla/dom/SVGTextPathElement.h"
|
#include "mozilla/dom/SVGTextPathElement.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
#include "mozilla/dom/SVGTextPathElementBinding.h"
|
#include "mozilla/dom/SVGTextPathElementBinding.h"
|
||||||
#include "nsSVGElement.h"
|
#include "nsSVGElement.h"
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
|
@ -26,9 +27,9 @@ SVGTextPathElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
||||||
nsSVGElement::LengthInfo SVGTextPathElement::sLengthInfo[2] =
|
nsSVGElement::LengthInfo SVGTextPathElement::sLengthInfo[2] =
|
||||||
{
|
{
|
||||||
// from SVGTextContentElement:
|
// from SVGTextContentElement:
|
||||||
{ &nsGkAtoms::textLength, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::XY },
|
{ &nsGkAtoms::textLength, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::XY },
|
||||||
// from SVGTextPathElement:
|
// from SVGTextPathElement:
|
||||||
{ &nsGkAtoms::startOffset, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X }
|
{ &nsGkAtoms::startOffset, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X }
|
||||||
};
|
};
|
||||||
|
|
||||||
nsSVGEnumMapping SVGTextPathElement::sMethodMap[] = {
|
nsSVGEnumMapping SVGTextPathElement::sMethodMap[] = {
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "mozilla/ErrorResult.h"
|
#include "mozilla/ErrorResult.h"
|
||||||
|
|
||||||
#include "mozilla/dom/SVGUseElement.h"
|
#include "mozilla/dom/SVGUseElement.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
#include "mozilla/dom/SVGUseElementBinding.h"
|
#include "mozilla/dom/SVGUseElementBinding.h"
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
#include "mozilla/dom/SVGSVGElement.h"
|
#include "mozilla/dom/SVGSVGElement.h"
|
||||||
|
@ -36,10 +37,10 @@ SVGUseElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
|
||||||
|
|
||||||
nsSVGElement::LengthInfo SVGUseElement::sLengthInfo[4] =
|
nsSVGElement::LengthInfo SVGUseElement::sLengthInfo[4] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::x, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
{ &nsGkAtoms::x, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::y, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
{ &nsGkAtoms::y, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
||||||
{ &nsGkAtoms::width, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
{ &nsGkAtoms::width, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::height, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
{ &nsGkAtoms::height, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
||||||
};
|
};
|
||||||
|
|
||||||
nsSVGElement::StringInfo SVGUseElement::sStringInfo[2] =
|
nsSVGElement::StringInfo SVGUseElement::sStringInfo[2] =
|
||||||
|
@ -350,7 +351,7 @@ SVGUseElement::SyncWidthOrHeight(nsAtom* aName)
|
||||||
// need to set the value to 100%
|
// need to set the value to 100%
|
||||||
nsSVGLength2 length;
|
nsSVGLength2 length;
|
||||||
length.Init(SVGContentUtils::XY, 0xff,
|
length.Init(SVGContentUtils::XY, 0xff,
|
||||||
100, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE);
|
100, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE);
|
||||||
target->SetLength(aName, length);
|
target->SetLength(aName, length);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "mozilla/ContentEvents.h"
|
#include "mozilla/ContentEvents.h"
|
||||||
#include "mozilla/EventDispatcher.h"
|
#include "mozilla/EventDispatcher.h"
|
||||||
#include "mozilla/Likely.h"
|
#include "mozilla/Likely.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
#include "mozilla/dom/SVGMatrix.h"
|
#include "mozilla/dom/SVGMatrix.h"
|
||||||
#include "mozilla/dom/SVGViewportElement.h"
|
#include "mozilla/dom/SVGViewportElement.h"
|
||||||
#include "mozilla/dom/SVGViewElement.h"
|
#include "mozilla/dom/SVGViewElement.h"
|
||||||
|
@ -39,10 +40,10 @@ namespace dom {
|
||||||
|
|
||||||
nsSVGElement::LengthInfo SVGViewportElement::sLengthInfo[4] =
|
nsSVGElement::LengthInfo SVGViewportElement::sLengthInfo[4] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::x, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
{ &nsGkAtoms::x, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::y, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
{ &nsGkAtoms::y, 0, SVGLengthBinding::SVG_LENGTHTYPE_NUMBER, SVGContentUtils::Y },
|
||||||
{ &nsGkAtoms::width, 100, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
{ &nsGkAtoms::width, 100, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::height, 100, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
{ &nsGkAtoms::height, 100, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Global hashmap to associate internal SVG data types (e.g. nsSVGLength2) with
|
* Global hashmap to associate internal SVG data types (e.g. nsSVGLength2) with
|
||||||
* DOM tear-off objects (e.g. nsIDOMSVGLength). This allows us to always return
|
* DOM tear-off objects (e.g. DOMSVGLength). This allows us to always return
|
||||||
* the same object for subsequent requests for DOM objects.
|
* the same object for subsequent requests for DOM objects.
|
||||||
*
|
*
|
||||||
* We don't keep an owning reference to the tear-off objects so they are
|
* We don't keep an owning reference to the tear-off objects so they are
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
#include "nsSVGElement.h"
|
#include "nsSVGElement.h"
|
||||||
|
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
#include "mozilla/dom/SVGSVGElement.h"
|
#include "mozilla/dom/SVGSVGElement.h"
|
||||||
#include "mozilla/dom/SVGTests.h"
|
#include "mozilla/dom/SVGTests.h"
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
|
@ -1692,12 +1693,12 @@ nsSVGElement::GetAnimatedLengthValues(float *aFirst, ...)
|
||||||
while (f && i < info.mLengthCount) {
|
while (f && i < info.mLengthCount) {
|
||||||
uint8_t type = info.mLengths[i].GetSpecifiedUnitType();
|
uint8_t type = info.mLengths[i].GetSpecifiedUnitType();
|
||||||
if (!ctx) {
|
if (!ctx) {
|
||||||
if (type != nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER &&
|
if (type != SVGLengthBinding::SVG_LENGTHTYPE_NUMBER &&
|
||||||
type != nsIDOMSVGLength::SVG_LENGTHTYPE_PX)
|
type != SVGLengthBinding::SVG_LENGTHTYPE_PX)
|
||||||
ctx = GetCtx();
|
ctx = GetCtx();
|
||||||
}
|
}
|
||||||
if (type == nsIDOMSVGLength::SVG_LENGTHTYPE_EMS ||
|
if (type == SVGLengthBinding::SVG_LENGTHTYPE_EMS ||
|
||||||
type == nsIDOMSVGLength::SVG_LENGTHTYPE_EXS)
|
type == SVGLengthBinding::SVG_LENGTHTYPE_EXS)
|
||||||
*f = info.mLengths[i++].GetAnimValue(this);
|
*f = info.mLengths[i++].GetAnimValue(this);
|
||||||
else
|
else
|
||||||
*f = info.mLengths[i++].GetAnimValue(ctx);
|
*f = info.mLengths[i++].GetAnimValue(ctx);
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include "mozilla/dom/SVGFEFuncRElementBinding.h"
|
#include "mozilla/dom/SVGFEFuncRElementBinding.h"
|
||||||
#include "mozilla/dom/SVGFEPointLightElement.h"
|
#include "mozilla/dom/SVGFEPointLightElement.h"
|
||||||
#include "mozilla/dom/SVGFESpotLightElement.h"
|
#include "mozilla/dom/SVGFESpotLightElement.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
|
|
||||||
#if defined(XP_WIN)
|
#if defined(XP_WIN)
|
||||||
// Prevent Windows redefining LoadImage
|
// Prevent Windows redefining LoadImage
|
||||||
|
@ -52,10 +53,10 @@ using namespace mozilla::gfx;
|
||||||
|
|
||||||
nsSVGElement::LengthInfo nsSVGFE::sLengthInfo[4] =
|
nsSVGElement::LengthInfo nsSVGFE::sLengthInfo[4] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::x, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
{ &nsGkAtoms::x, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::y, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
{ &nsGkAtoms::y, 0, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y },
|
||||||
{ &nsGkAtoms::width, 100, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
{ &nsGkAtoms::width, 100, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X },
|
||||||
{ &nsGkAtoms::height, 100, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y }
|
{ &nsGkAtoms::height, 100, SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y }
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -45,8 +45,8 @@ static nsSVGAttrTearoffTable<nsSVGLength2, SVGAnimatedLength>
|
||||||
static bool
|
static bool
|
||||||
IsValidUnitType(uint16_t unit)
|
IsValidUnitType(uint16_t unit)
|
||||||
{
|
{
|
||||||
if (unit > nsIDOMSVGLength::SVG_LENGTHTYPE_UNKNOWN &&
|
if (unit > SVGLengthBinding::SVG_LENGTHTYPE_UNKNOWN &&
|
||||||
unit <= nsIDOMSVGLength::SVG_LENGTHTYPE_PC)
|
unit <= SVGLengthBinding::SVG_LENGTHTYPE_PC)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -69,7 +69,7 @@ static uint16_t
|
||||||
GetUnitTypeForString(const nsAString& unitStr)
|
GetUnitTypeForString(const nsAString& unitStr)
|
||||||
{
|
{
|
||||||
if (unitStr.IsEmpty())
|
if (unitStr.IsEmpty())
|
||||||
return nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER;
|
return SVGLengthBinding::SVG_LENGTHTYPE_NUMBER;
|
||||||
|
|
||||||
nsAtom *unitAtom = NS_GetStaticAtom(unitStr);
|
nsAtom *unitAtom = NS_GetStaticAtom(unitStr);
|
||||||
if (unitAtom) {
|
if (unitAtom) {
|
||||||
|
@ -80,7 +80,7 @@ GetUnitTypeForString(const nsAString& unitStr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nsIDOMSVGLength::SVG_LENGTHTYPE_UNKNOWN;
|
return SVGLengthBinding::SVG_LENGTHTYPE_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -243,24 +243,24 @@ nsSVGLength2::GetPixelsPerUnit(const UserSpaceMetrics& aMetrics,
|
||||||
uint8_t aUnitType) const
|
uint8_t aUnitType) const
|
||||||
{
|
{
|
||||||
switch (aUnitType) {
|
switch (aUnitType) {
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER:
|
case SVGLengthBinding::SVG_LENGTHTYPE_NUMBER:
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_PX:
|
case SVGLengthBinding::SVG_LENGTHTYPE_PX:
|
||||||
return 1;
|
return 1;
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_MM:
|
case SVGLengthBinding::SVG_LENGTHTYPE_MM:
|
||||||
return DPI / MM_PER_INCH_FLOAT;
|
return DPI / MM_PER_INCH_FLOAT;
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_CM:
|
case SVGLengthBinding::SVG_LENGTHTYPE_CM:
|
||||||
return 10.0f * DPI / MM_PER_INCH_FLOAT;
|
return 10.0f * DPI / MM_PER_INCH_FLOAT;
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_IN:
|
case SVGLengthBinding::SVG_LENGTHTYPE_IN:
|
||||||
return DPI;
|
return DPI;
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_PT:
|
case SVGLengthBinding::SVG_LENGTHTYPE_PT:
|
||||||
return DPI / POINTS_PER_INCH_FLOAT;
|
return DPI / POINTS_PER_INCH_FLOAT;
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_PC:
|
case SVGLengthBinding::SVG_LENGTHTYPE_PC:
|
||||||
return 12.0f * DPI / POINTS_PER_INCH_FLOAT;
|
return 12.0f * DPI / POINTS_PER_INCH_FLOAT;
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE:
|
case SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE:
|
||||||
return aMetrics.GetAxisLength(mCtxType) / 100.0f;
|
return aMetrics.GetAxisLength(mCtxType) / 100.0f;
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_EMS:
|
case SVGLengthBinding::SVG_LENGTHTYPE_EMS:
|
||||||
return aMetrics.GetEmLength();
|
return aMetrics.GetEmLength();
|
||||||
case nsIDOMSVGLength::SVG_LENGTHTYPE_EXS:
|
case SVGLengthBinding::SVG_LENGTHTYPE_EXS:
|
||||||
return aMetrics.GetExLength();
|
return aMetrics.GetExLength();
|
||||||
default:
|
default:
|
||||||
NS_NOTREACHED("Unknown unit type");
|
NS_NOTREACHED("Unknown unit type");
|
||||||
|
@ -518,9 +518,9 @@ nsSVGLength2::SMILLength::ValueFromString(const nsAString& aStr,
|
||||||
val.mU.mDouble = value * mVal->GetPixelsPerUnit(mSVGElement, unitType);
|
val.mU.mDouble = value * mVal->GetPixelsPerUnit(mSVGElement, unitType);
|
||||||
aValue = val;
|
aValue = val;
|
||||||
aPreventCachingOfSandwich =
|
aPreventCachingOfSandwich =
|
||||||
(unitType == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE ||
|
(unitType == SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE ||
|
||||||
unitType == nsIDOMSVGLength::SVG_LENGTHTYPE_EMS ||
|
unitType == SVGLengthBinding::SVG_LENGTHTYPE_EMS ||
|
||||||
unitType == nsIDOMSVGLength::SVG_LENGTHTYPE_EXS);
|
unitType == SVGLengthBinding::SVG_LENGTHTYPE_EXS);
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
|
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "mozilla/UniquePtr.h"
|
#include "mozilla/UniquePtr.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
#include "nsCoord.h"
|
#include "nsCoord.h"
|
||||||
#include "nsCycleCollectionParticipant.h"
|
#include "nsCycleCollectionParticipant.h"
|
||||||
#include "nsError.h"
|
#include "nsError.h"
|
||||||
#include "nsIDOMSVGLength.h"
|
|
||||||
#include "nsISMILAttr.h"
|
#include "nsISMILAttr.h"
|
||||||
#include "nsMathUtils.h"
|
#include "nsMathUtils.h"
|
||||||
#include "nsSVGElement.h"
|
#include "nsSVGElement.h"
|
||||||
|
@ -97,7 +97,8 @@ public:
|
||||||
void Init(uint8_t aCtxType = SVGContentUtils::XY,
|
void Init(uint8_t aCtxType = SVGContentUtils::XY,
|
||||||
uint8_t aAttrEnum = 0xff,
|
uint8_t aAttrEnum = 0xff,
|
||||||
float aValue = 0,
|
float aValue = 0,
|
||||||
uint8_t aUnitType = nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER) {
|
uint8_t aUnitType =
|
||||||
|
mozilla::dom::SVGLengthBinding::SVG_LENGTHTYPE_NUMBER) {
|
||||||
mAnimVal = mBaseVal = aValue;
|
mAnimVal = mBaseVal = aValue;
|
||||||
mSpecifiedUnitType = aUnitType;
|
mSpecifiedUnitType = aUnitType;
|
||||||
mAttrEnum = aAttrEnum;
|
mAttrEnum = aAttrEnum;
|
||||||
|
@ -136,7 +137,8 @@ public:
|
||||||
uint8_t GetCtxType() const { return mCtxType; }
|
uint8_t GetCtxType() const { return mCtxType; }
|
||||||
uint8_t GetSpecifiedUnitType() const { return mSpecifiedUnitType; }
|
uint8_t GetSpecifiedUnitType() const { return mSpecifiedUnitType; }
|
||||||
bool IsPercentage() const
|
bool IsPercentage() const
|
||||||
{ return mSpecifiedUnitType == nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE; }
|
{ return mSpecifiedUnitType ==
|
||||||
|
mozilla::dom::SVGLengthBinding::SVG_LENGTHTYPE_PERCENTAGE; }
|
||||||
float GetAnimValInSpecifiedUnits() const { return mAnimVal; }
|
float GetAnimValInSpecifiedUnits() const { return mAnimVal; }
|
||||||
float GetBaseValInSpecifiedUnits() const { return mBaseVal; }
|
float GetBaseValInSpecifiedUnits() const { return mBaseVal; }
|
||||||
|
|
||||||
|
|
|
@ -280,7 +280,7 @@ class WorkerControlRunnable : public WorkerRunnable
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
WorkerControlRunnable(WorkerPrivate* aWorkerPrivate,
|
WorkerControlRunnable(WorkerPrivate* aWorkerPrivate,
|
||||||
TargetAndBusyBehavior aBehavior = WorkerThreadModifyBusyCount)
|
TargetAndBusyBehavior aBehavior)
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
;
|
;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -87,10 +87,12 @@ XMLStylesheetProcessingInstruction::SetNodeValueInternal(const nsAString& aNodeV
|
||||||
|
|
||||||
// nsStyleLinkElement
|
// nsStyleLinkElement
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
XMLStylesheetProcessingInstruction::GetCharset(nsAString& aCharset)
|
XMLStylesheetProcessingInstruction::GetCharset(nsAString& aCharset)
|
||||||
{
|
{
|
||||||
return GetAttrValue(nsGkAtoms::charset, aCharset) ? NS_OK : NS_ERROR_FAILURE;
|
if (!GetAttrValue(nsGkAtoms::charset, aCharset)) {
|
||||||
|
aCharset.Truncate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* virtual */ void
|
/* virtual */ void
|
||||||
|
|
|
@ -60,7 +60,7 @@ public:
|
||||||
virtual void OverrideBaseURI(nsIURI* aNewBaseURI) override;
|
virtual void OverrideBaseURI(nsIURI* aNewBaseURI) override;
|
||||||
|
|
||||||
// nsStyleLinkElement
|
// nsStyleLinkElement
|
||||||
NS_IMETHOD GetCharset(nsAString& aCharset) override;
|
void GetCharset(nsAString& aCharset) override;
|
||||||
|
|
||||||
virtual void SetData(const nsAString& aData, mozilla::ErrorResult& rv) override
|
virtual void SetData(const nsAString& aData, mozilla::ErrorResult& rv) override
|
||||||
{
|
{
|
||||||
|
|
|
@ -1061,7 +1061,7 @@ nsAbsolutePositioningCommand::ToggleState(mozilla::HTMLEditor* aHTMLEditor)
|
||||||
|
|
||||||
RefPtr<Element> container =
|
RefPtr<Element> container =
|
||||||
aHTMLEditor->GetAbsolutelyPositionedSelectionContainer();
|
aHTMLEditor->GetAbsolutelyPositionedSelectionContainer();
|
||||||
return aHTMLEditor->AbsolutePositionSelection(!container);
|
return aHTMLEditor->SetSelectionToAbsoluteOrStatic(!container);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1089,11 +1089,7 @@ nsDecreaseZIndexCommand::IsCommandEnabled(const char * aCommandName,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t z;
|
int32_t z = htmlEditor->GetZIndex(*positionedElement);
|
||||||
nsresult rv = htmlEditor->GetElementZIndex(positionedElement, &z);
|
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
*outCmdEnabled = (z > 0);
|
*outCmdEnabled = (z > 0);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
@ -1110,7 +1106,7 @@ nsDecreaseZIndexCommand::DoCommand(const char *aCommandName,
|
||||||
if (NS_WARN_IF(!htmlEditor)) {
|
if (NS_WARN_IF(!htmlEditor)) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
return htmlEditor->RelativeChangeZIndex(-1);
|
return htmlEditor->AddZIndex(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
@ -1170,7 +1166,7 @@ nsIncreaseZIndexCommand::DoCommand(const char *aCommandName,
|
||||||
if (NS_WARN_IF(!htmlEditor)) {
|
if (NS_WARN_IF(!htmlEditor)) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
return htmlEditor->RelativeChangeZIndex(1);
|
return htmlEditor->AddZIndex(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|
|
@ -51,8 +51,8 @@ using namespace dom;
|
||||||
|
|
||||||
#define BLACK_BG_RGB_TRIGGER 0xd0
|
#define BLACK_BG_RGB_TRIGGER 0xd0
|
||||||
|
|
||||||
NS_IMETHODIMP
|
nsresult
|
||||||
HTMLEditor::AbsolutePositionSelection(bool aEnabled)
|
HTMLEditor::SetSelectionToAbsoluteOrStatic(bool aEnabled)
|
||||||
{
|
{
|
||||||
AutoPlaceholderBatch beginBatching(this);
|
AutoPlaceholderBatch beginBatching(this);
|
||||||
AutoRules beginRulesSniffing(this,
|
AutoRules beginRulesSniffing(this,
|
||||||
|
@ -78,21 +78,6 @@ HTMLEditor::AbsolutePositionSelection(bool aEnabled)
|
||||||
return rules->DidDoAction(selection, &ruleInfo, rv);
|
return rules->DidDoAction(selection, &ruleInfo, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLEditor::GetAbsolutelyPositionedSelectionContainer(nsIDOMElement** _retval)
|
|
||||||
{
|
|
||||||
RefPtr<Element> container =
|
|
||||||
GetAbsolutelyPositionedSelectionContainer();
|
|
||||||
if (NS_WARN_IF(!container)) {
|
|
||||||
*_retval = nullptr;
|
|
||||||
return NS_ERROR_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsCOMPtr<nsIDOMElement> domContainer = do_QueryInterface(container);
|
|
||||||
domContainer.forget(_retval);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
already_AddRefed<Element>
|
already_AddRefed<Element>
|
||||||
HTMLEditor::GetAbsolutelyPositionedSelectionContainer()
|
HTMLEditor::GetAbsolutelyPositionedSelectionContainer()
|
||||||
{
|
{
|
||||||
|
@ -114,14 +99,6 @@ HTMLEditor::GetAbsolutelyPositionedSelectionContainer()
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLEditor::GetSelectionContainerAbsolutelyPositioned(
|
|
||||||
bool* aIsSelectionContainerAbsolutelyPositioned)
|
|
||||||
{
|
|
||||||
*aIsSelectionContainerAbsolutelyPositioned = (mAbsolutelyPositionedObject != nullptr);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
HTMLEditor::GetAbsolutePositioningEnabled(bool* aIsEnabled)
|
HTMLEditor::GetAbsolutePositioningEnabled(bool* aIsEnabled)
|
||||||
{
|
{
|
||||||
|
@ -136,43 +113,35 @@ HTMLEditor::SetAbsolutePositioningEnabled(bool aIsEnabled)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
nsresult
|
||||||
HTMLEditor::RelativeChangeElementZIndex(nsIDOMElement* aElement,
|
HTMLEditor::RelativeChangeElementZIndex(Element& aElement,
|
||||||
int32_t aChange,
|
int32_t aChange,
|
||||||
int32_t* aReturn)
|
int32_t* aReturn)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aElement);
|
|
||||||
NS_ENSURE_ARG_POINTER(aReturn);
|
NS_ENSURE_ARG_POINTER(aReturn);
|
||||||
if (!aChange) // early way out, no change
|
if (!aChange) // early way out, no change
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
int32_t zIndex;
|
int32_t zIndex = GetZIndex(aElement);
|
||||||
nsresult rv = GetElementZIndex(aElement, &zIndex);
|
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
|
|
||||||
zIndex = std::max(zIndex + aChange, 0);
|
zIndex = std::max(zIndex + aChange, 0);
|
||||||
SetElementZIndex(aElement, zIndex);
|
SetZIndex(aElement, zIndex);
|
||||||
*aReturn = zIndex;
|
*aReturn = zIndex;
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
HTMLEditor::SetElementZIndex(nsIDOMElement* aElement,
|
HTMLEditor::SetZIndex(Element& aElement,
|
||||||
int32_t aZindex)
|
int32_t aZindex)
|
||||||
{
|
{
|
||||||
nsCOMPtr<Element> element = do_QueryInterface(aElement);
|
|
||||||
NS_ENSURE_ARG_POINTER(element);
|
|
||||||
|
|
||||||
nsAutoString zIndexStr;
|
nsAutoString zIndexStr;
|
||||||
zIndexStr.AppendInt(aZindex);
|
zIndexStr.AppendInt(aZindex);
|
||||||
|
|
||||||
mCSSEditUtils->SetCSSProperty(*element, *nsGkAtoms::z_index, zIndexStr);
|
mCSSEditUtils->SetCSSProperty(aElement, *nsGkAtoms::z_index, zIndexStr);
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
nsresult
|
||||||
HTMLEditor::RelativeChangeZIndex(int32_t aChange)
|
HTMLEditor::AddZIndex(int32_t aChange)
|
||||||
{
|
{
|
||||||
AutoPlaceholderBatch beginBatching(this);
|
AutoPlaceholderBatch beginBatching(this);
|
||||||
AutoRules beginRulesSniffing(this,
|
AutoRules beginRulesSniffing(this,
|
||||||
|
@ -197,56 +166,48 @@ HTMLEditor::RelativeChangeZIndex(int32_t aChange)
|
||||||
return rules->DidDoAction(selection, &ruleInfo, rv);
|
return rules->DidDoAction(selection, &ruleInfo, rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
int32_t
|
||||||
HTMLEditor::GetElementZIndex(nsIDOMElement* aElement,
|
HTMLEditor::GetZIndex(Element& aElement)
|
||||||
int32_t* aZindex)
|
|
||||||
{
|
{
|
||||||
nsCOMPtr<Element> element = do_QueryInterface(aElement);
|
|
||||||
return GetElementZIndex(element, aZindex);
|
|
||||||
}
|
|
||||||
|
|
||||||
nsresult
|
|
||||||
HTMLEditor::GetElementZIndex(Element* aElement,
|
|
||||||
int32_t* aZindex)
|
|
||||||
{
|
|
||||||
if (NS_WARN_IF(!aElement)) {
|
|
||||||
return NS_ERROR_INVALID_ARG;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsAutoString zIndexStr;
|
nsAutoString zIndexStr;
|
||||||
*aZindex = 0;
|
|
||||||
|
|
||||||
nsresult rv =
|
nsresult rv =
|
||||||
mCSSEditUtils->GetSpecifiedProperty(*aElement, *nsGkAtoms::z_index,
|
mCSSEditUtils->GetSpecifiedProperty(aElement, *nsGkAtoms::z_index,
|
||||||
zIndexStr);
|
zIndexStr);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (zIndexStr.EqualsLiteral("auto")) {
|
if (zIndexStr.EqualsLiteral("auto")) {
|
||||||
// we have to look at the positioned ancestors
|
// we have to look at the positioned ancestors
|
||||||
// cf. CSS 2 spec section 9.9.1
|
// cf. CSS 2 spec section 9.9.1
|
||||||
nsCOMPtr<nsINode> node = aElement->GetParentNode();
|
nsCOMPtr<nsINode> node = aElement.GetParentNode();
|
||||||
nsAutoString positionStr;
|
nsAutoString positionStr;
|
||||||
while (node && zIndexStr.EqualsLiteral("auto") &&
|
while (node && zIndexStr.EqualsLiteral("auto") &&
|
||||||
!node->IsHTMLElement(nsGkAtoms::body)) {
|
!node->IsHTMLElement(nsGkAtoms::body)) {
|
||||||
rv = mCSSEditUtils->GetComputedProperty(*node, *nsGkAtoms::position,
|
rv = mCSSEditUtils->GetComputedProperty(*node, *nsGkAtoms::position,
|
||||||
positionStr);
|
positionStr);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (positionStr.EqualsLiteral("absolute")) {
|
if (positionStr.EqualsLiteral("absolute")) {
|
||||||
// ah, we found one, what's its z-index ? If its z-index is auto,
|
// ah, we found one, what's its z-index ? If its z-index is auto,
|
||||||
// we have to continue climbing the document's tree
|
// we have to continue climbing the document's tree
|
||||||
rv = mCSSEditUtils->GetComputedProperty(*node, *nsGkAtoms::z_index,
|
rv = mCSSEditUtils->GetComputedProperty(*node, *nsGkAtoms::z_index,
|
||||||
zIndexStr);
|
zIndexStr);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
node = node->GetParentNode();
|
node = node->GetParentNode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!zIndexStr.EqualsLiteral("auto")) {
|
if (zIndexStr.EqualsLiteral("auto")) {
|
||||||
nsresult errorCode;
|
return 0;
|
||||||
*aZindex = zIndexStr.ToInteger(&errorCode);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
nsresult errorCode;
|
||||||
|
return zIndexStr.ToInteger(&errorCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
ManualNACPtr
|
ManualNACPtr
|
||||||
|
@ -292,16 +253,20 @@ HTMLEditor::RefreshGrabber()
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
void
|
||||||
HTMLEditor::HideGrabber()
|
HTMLEditor::HideGrabber()
|
||||||
{
|
{
|
||||||
nsresult rv = mAbsolutelyPositionedObject->UnsetAttr(kNameSpaceID_None,
|
nsresult rv = mAbsolutelyPositionedObject->UnsetAttr(kNameSpaceID_None,
|
||||||
nsGkAtoms::_moz_abspos,
|
nsGkAtoms::_moz_abspos,
|
||||||
true);
|
true);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mAbsolutelyPositionedObject = nullptr;
|
mAbsolutelyPositionedObject = nullptr;
|
||||||
NS_ENSURE_TRUE(mGrabber, NS_ERROR_NULL_POINTER);
|
if (NS_WARN_IF(!mGrabber)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// get the presshell's document observer interface.
|
// get the presshell's document observer interface.
|
||||||
nsCOMPtr<nsIPresShell> ps = GetPresShell();
|
nsCOMPtr<nsIPresShell> ps = GetPresShell();
|
||||||
|
@ -311,20 +276,10 @@ HTMLEditor::HideGrabber()
|
||||||
|
|
||||||
DeleteRefToAnonymousNode(Move(mGrabber), ps);
|
DeleteRefToAnonymousNode(Move(mGrabber), ps);
|
||||||
DeleteRefToAnonymousNode(Move(mPositioningShadow), ps);
|
DeleteRefToAnonymousNode(Move(mPositioningShadow), ps);
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLEditor::ShowGrabberOnElement(nsIDOMElement* aElement)
|
|
||||||
{
|
|
||||||
nsCOMPtr<Element> element = do_QueryInterface(aElement);
|
|
||||||
NS_ENSURE_ARG_POINTER(element);
|
|
||||||
return ShowGrabberOnElement(*element);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
HTMLEditor::ShowGrabberOnElement(Element& aElement)
|
HTMLEditor::ShowGrabber(Element& aElement)
|
||||||
{
|
{
|
||||||
if (NS_WARN_IF(!IsDescendantOfEditorRoot(&aElement))) {
|
if (NS_WARN_IF(!IsDescendantOfEditorRoot(&aElement))) {
|
||||||
return NS_ERROR_UNEXPECTED;
|
return NS_ERROR_UNEXPECTED;
|
||||||
|
@ -498,41 +453,45 @@ HTMLEditor::AddPositioningOffset(int32_t& aX,
|
||||||
aY += positioningOffset;
|
aY += positioningOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
nsresult
|
||||||
HTMLEditor::AbsolutelyPositionElement(nsIDOMElement* aElement,
|
HTMLEditor::SetPositionToAbsoluteOrStatic(Element& aElement,
|
||||||
bool aEnabled)
|
bool aEnabled)
|
||||||
{
|
{
|
||||||
nsCOMPtr<Element> element = do_QueryInterface(aElement);
|
|
||||||
NS_ENSURE_ARG_POINTER(element);
|
|
||||||
|
|
||||||
nsAutoString positionStr;
|
nsAutoString positionStr;
|
||||||
mCSSEditUtils->GetComputedProperty(*element, *nsGkAtoms::position,
|
mCSSEditUtils->GetComputedProperty(aElement, *nsGkAtoms::position,
|
||||||
positionStr);
|
positionStr);
|
||||||
bool isPositioned = (positionStr.EqualsLiteral("absolute"));
|
bool isPositioned = (positionStr.EqualsLiteral("absolute"));
|
||||||
|
|
||||||
// nothing to do if the element is already in the state we want
|
// nothing to do if the element is already in the state we want
|
||||||
if (isPositioned == aEnabled)
|
if (isPositioned == aEnabled) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
}
|
||||||
AutoPlaceholderBatch batchIt(this);
|
|
||||||
|
|
||||||
if (aEnabled) {
|
if (aEnabled) {
|
||||||
int32_t x, y;
|
return SetPositionToAbsolute(aElement);
|
||||||
GetElementOrigin(*element, x, y);
|
}
|
||||||
|
|
||||||
mCSSEditUtils->SetCSSProperty(*element, *nsGkAtoms::position,
|
return SetPositionToStatic(aElement);
|
||||||
|
}
|
||||||
|
|
||||||
|
nsresult
|
||||||
|
HTMLEditor::SetPositionToAbsolute(Element& aElement)
|
||||||
|
{
|
||||||
|
AutoPlaceholderBatch batchIt(this);
|
||||||
|
|
||||||
|
int32_t x, y;
|
||||||
|
GetElementOrigin(aElement, x, y);
|
||||||
|
|
||||||
|
mCSSEditUtils->SetCSSProperty(aElement, *nsGkAtoms::position,
|
||||||
NS_LITERAL_STRING("absolute"));
|
NS_LITERAL_STRING("absolute"));
|
||||||
|
|
||||||
AddPositioningOffset(x, y);
|
AddPositioningOffset(x, y);
|
||||||
SnapToGrid(x, y);
|
SnapToGrid(x, y);
|
||||||
SetElementPosition(*element, x, y);
|
SetTopAndLeft(aElement, x, y);
|
||||||
|
|
||||||
// we may need to create a br if the positioned element is alone in its
|
// we may need to create a br if the positioned element is alone in its
|
||||||
// container
|
// container
|
||||||
nsCOMPtr<nsINode> element = do_QueryInterface(aElement);
|
nsINode* parentNode = aElement.GetParentNode();
|
||||||
NS_ENSURE_STATE(element);
|
|
||||||
|
|
||||||
nsINode* parentNode = element->GetParentNode();
|
|
||||||
if (parentNode->GetChildCount() == 1) {
|
if (parentNode->GetChildCount() == 1) {
|
||||||
RefPtr<Selection> selection = GetSelection();
|
RefPtr<Selection> selection = GetSelection();
|
||||||
if (NS_WARN_IF(!selection)) {
|
if (NS_WARN_IF(!selection)) {
|
||||||
|
@ -544,36 +503,40 @@ HTMLEditor::AbsolutelyPositionElement(nsIDOMElement* aElement,
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return NS_OK;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
mCSSEditUtils->RemoveCSSProperty(*element, *nsGkAtoms::position,
|
nsresult
|
||||||
|
HTMLEditor::SetPositionToStatic(Element& aElement)
|
||||||
|
{
|
||||||
|
AutoPlaceholderBatch batchIt(this);
|
||||||
|
|
||||||
|
mCSSEditUtils->RemoveCSSProperty(aElement, *nsGkAtoms::position,
|
||||||
EmptyString());
|
EmptyString());
|
||||||
mCSSEditUtils->RemoveCSSProperty(*element, *nsGkAtoms::top,
|
mCSSEditUtils->RemoveCSSProperty(aElement, *nsGkAtoms::top,
|
||||||
EmptyString());
|
EmptyString());
|
||||||
mCSSEditUtils->RemoveCSSProperty(*element, *nsGkAtoms::left,
|
mCSSEditUtils->RemoveCSSProperty(aElement, *nsGkAtoms::left,
|
||||||
EmptyString());
|
EmptyString());
|
||||||
mCSSEditUtils->RemoveCSSProperty(*element, *nsGkAtoms::z_index,
|
mCSSEditUtils->RemoveCSSProperty(aElement, *nsGkAtoms::z_index,
|
||||||
EmptyString());
|
EmptyString());
|
||||||
|
|
||||||
if (!HTMLEditUtils::IsImage(aElement)) {
|
if (!HTMLEditUtils::IsImage(&aElement)) {
|
||||||
mCSSEditUtils->RemoveCSSProperty(*element, *nsGkAtoms::width,
|
mCSSEditUtils->RemoveCSSProperty(aElement, *nsGkAtoms::width,
|
||||||
EmptyString());
|
EmptyString());
|
||||||
mCSSEditUtils->RemoveCSSProperty(*element, *nsGkAtoms::height,
|
mCSSEditUtils->RemoveCSSProperty(aElement, *nsGkAtoms::height,
|
||||||
EmptyString());
|
EmptyString());
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCOMPtr<dom::Element> element = do_QueryInterface(aElement);
|
if (aElement.IsHTMLElement(nsGkAtoms::div) &&
|
||||||
if (element && element->IsHTMLElement(nsGkAtoms::div) &&
|
!HasStyleOrIdOrClass(&aElement)) {
|
||||||
!HasStyleOrIdOrClass(element)) {
|
|
||||||
RefPtr<HTMLEditRules> htmlRules =
|
RefPtr<HTMLEditRules> htmlRules =
|
||||||
static_cast<HTMLEditRules*>(mRules.get());
|
static_cast<HTMLEditRules*>(mRules.get());
|
||||||
NS_ENSURE_TRUE(htmlRules, NS_ERROR_FAILURE);
|
NS_ENSURE_TRUE(htmlRules, NS_ERROR_FAILURE);
|
||||||
nsresult rv = htmlRules->MakeSureElemStartsOrEndsOnCR(*element);
|
nsresult rv = htmlRules->MakeSureElemStartsOrEndsOnCR(aElement);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
rv = RemoveContainer(element);
|
rv = RemoveContainer(&aElement);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -606,20 +569,8 @@ HTMLEditor::GetGridSize(uint32_t* aSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
// self-explanatory
|
// self-explanatory
|
||||||
NS_IMETHODIMP
|
|
||||||
HTMLEditor::SetElementPosition(nsIDOMElement* aElement,
|
|
||||||
int32_t aX,
|
|
||||||
int32_t aY)
|
|
||||||
{
|
|
||||||
nsCOMPtr<Element> element = do_QueryInterface(aElement);
|
|
||||||
NS_ENSURE_STATE(element);
|
|
||||||
|
|
||||||
SetElementPosition(*element, aX, aY);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
HTMLEditor::SetElementPosition(Element& aElement,
|
HTMLEditor::SetTopAndLeft(Element& aElement,
|
||||||
int32_t aX,
|
int32_t aX,
|
||||||
int32_t aY)
|
int32_t aY)
|
||||||
{
|
{
|
||||||
|
|
|
@ -396,8 +396,7 @@ HTMLEditor::CheckSelectionStateForAnonymousButtons(nsISelection* aSelection)
|
||||||
|
|
||||||
if (mIsAbsolutelyPositioningEnabled && mAbsolutelyPositionedObject &&
|
if (mIsAbsolutelyPositioningEnabled && mAbsolutelyPositionedObject &&
|
||||||
absPosElement != mAbsolutelyPositionedObject) {
|
absPosElement != mAbsolutelyPositionedObject) {
|
||||||
nsresult rv = HideGrabber();
|
HideGrabber();
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
NS_ASSERTION(!mAbsolutelyPositionedObject, "HideGrabber failed");
|
NS_ASSERTION(!mAbsolutelyPositionedObject, "HideGrabber failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -444,7 +443,7 @@ HTMLEditor::CheckSelectionStateForAnonymousButtons(nsISelection* aSelection)
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
nsresult rv = ShowGrabberOnElement(*absPosElement);
|
nsresult rv = ShowGrabber(*absPosElement);
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9460,11 +9460,14 @@ HTMLEditRules::WillAbsolutePosition(Selection& aSelection,
|
||||||
nsresult
|
nsresult
|
||||||
HTMLEditRules::DidAbsolutePosition()
|
HTMLEditRules::DidAbsolutePosition()
|
||||||
{
|
{
|
||||||
NS_ENSURE_STATE(mHTMLEditor);
|
if (!mNewBlock) {
|
||||||
nsCOMPtr<nsIHTMLAbsPosEditor> absPosHTMLEditor = mHTMLEditor;
|
return NS_OK;
|
||||||
nsCOMPtr<nsIDOMElement> elt =
|
}
|
||||||
static_cast<nsIDOMElement*>(GetAsDOMNode(mNewBlock));
|
if (NS_WARN_IF(!mHTMLEditor)) {
|
||||||
return absPosHTMLEditor->AbsolutelyPositionElement(elt, true);
|
return NS_ERROR_NOT_AVAILABLE;
|
||||||
|
}
|
||||||
|
RefPtr<HTMLEditor> htmlEditor = mHTMLEditor;
|
||||||
|
return htmlEditor->SetPositionToAbsoluteOrStatic(*mNewBlock, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
|
@ -9474,6 +9477,12 @@ HTMLEditRules::WillRemoveAbsolutePosition(Selection* aSelection,
|
||||||
if (!aSelection || !aCancel || !aHandled) {
|
if (!aSelection || !aCancel || !aHandled) {
|
||||||
return NS_ERROR_NULL_POINTER;
|
return NS_ERROR_NULL_POINTER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (NS_WARN_IF(!mHTMLEditor)) {
|
||||||
|
return NS_ERROR_NOT_AVAILABLE;
|
||||||
|
}
|
||||||
|
RefPtr<HTMLEditor> htmlEditor = mHTMLEditor;
|
||||||
|
|
||||||
WillInsert(*aSelection, aCancel);
|
WillInsert(*aSelection, aCancel);
|
||||||
|
|
||||||
// initialize out param
|
// initialize out param
|
||||||
|
@ -9481,18 +9490,15 @@ HTMLEditRules::WillRemoveAbsolutePosition(Selection* aSelection,
|
||||||
*aCancel = false;
|
*aCancel = false;
|
||||||
*aHandled = true;
|
*aHandled = true;
|
||||||
|
|
||||||
nsCOMPtr<nsIDOMElement> elt;
|
RefPtr<Element> element =
|
||||||
NS_ENSURE_STATE(mHTMLEditor);
|
htmlEditor->GetAbsolutelyPositionedSelectionContainer();
|
||||||
nsresult rv =
|
if (NS_WARN_IF(!element)) {
|
||||||
mHTMLEditor->GetAbsolutelyPositionedSelectionContainer(getter_AddRefs(elt));
|
return NS_ERROR_FAILURE;
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
}
|
||||||
|
|
||||||
NS_ENSURE_STATE(mHTMLEditor);
|
AutoSelectionRestorer selectionRestorer(aSelection, htmlEditor);
|
||||||
AutoSelectionRestorer selectionRestorer(aSelection, mHTMLEditor);
|
|
||||||
|
|
||||||
NS_ENSURE_STATE(mHTMLEditor);
|
return htmlEditor->SetPositionToAbsoluteOrStatic(*element, false);
|
||||||
nsCOMPtr<nsIHTMLAbsPosEditor> absPosHTMLEditor = mHTMLEditor;
|
|
||||||
return absPosHTMLEditor->AbsolutelyPositionElement(elt, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
|
@ -9504,6 +9510,12 @@ HTMLEditRules::WillRelativeChangeZIndex(Selection* aSelection,
|
||||||
if (!aSelection || !aCancel || !aHandled) {
|
if (!aSelection || !aCancel || !aHandled) {
|
||||||
return NS_ERROR_NULL_POINTER;
|
return NS_ERROR_NULL_POINTER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (NS_WARN_IF(!mHTMLEditor)) {
|
||||||
|
return NS_ERROR_NOT_AVAILABLE;
|
||||||
|
}
|
||||||
|
RefPtr<HTMLEditor> htmlEditor = mHTMLEditor;
|
||||||
|
|
||||||
WillInsert(*aSelection, aCancel);
|
WillInsert(*aSelection, aCancel);
|
||||||
|
|
||||||
// initialize out param
|
// initialize out param
|
||||||
|
@ -9511,19 +9523,16 @@ HTMLEditRules::WillRelativeChangeZIndex(Selection* aSelection,
|
||||||
*aCancel = false;
|
*aCancel = false;
|
||||||
*aHandled = true;
|
*aHandled = true;
|
||||||
|
|
||||||
nsCOMPtr<nsIDOMElement> elt;
|
RefPtr<Element> element =
|
||||||
NS_ENSURE_STATE(mHTMLEditor);
|
htmlEditor->GetAbsolutelyPositionedSelectionContainer();
|
||||||
nsresult rv =
|
if (NS_WARN_IF(!element)) {
|
||||||
mHTMLEditor->GetAbsolutelyPositionedSelectionContainer(getter_AddRefs(elt));
|
return NS_ERROR_FAILURE;
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
}
|
||||||
|
|
||||||
NS_ENSURE_STATE(mHTMLEditor);
|
AutoSelectionRestorer selectionRestorer(aSelection, htmlEditor);
|
||||||
AutoSelectionRestorer selectionRestorer(aSelection, mHTMLEditor);
|
|
||||||
|
|
||||||
NS_ENSURE_STATE(mHTMLEditor);
|
|
||||||
nsCOMPtr<nsIHTMLAbsPosEditor> absPosHTMLEditor = mHTMLEditor;
|
|
||||||
int32_t zIndex;
|
int32_t zIndex;
|
||||||
return absPosHTMLEditor->RelativeChangeElementZIndex(elt, aChange, &zIndex);
|
return htmlEditor->RelativeChangeElementZIndex(*element, aChange, &zIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
|
|
|
@ -237,12 +237,58 @@ public:
|
||||||
{
|
{
|
||||||
return mIsAbsolutelyPositioningEnabled;
|
return mIsAbsolutelyPositioningEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns the deepest absolutely positioned container of the selection
|
||||||
|
* if it exists or null.
|
||||||
|
*/
|
||||||
already_AddRefed<Element> GetAbsolutelyPositionedSelectionContainer();
|
already_AddRefed<Element> GetAbsolutelyPositionedSelectionContainer();
|
||||||
|
|
||||||
Element* GetPositionedElement() const
|
Element* GetPositionedElement() const
|
||||||
{
|
{
|
||||||
return mAbsolutelyPositionedObject;
|
return mAbsolutelyPositionedObject;
|
||||||
}
|
}
|
||||||
nsresult GetElementZIndex(Element* aElement, int32_t* aZindex);
|
|
||||||
|
/**
|
||||||
|
* extracts the selection from the normal flow of the document and
|
||||||
|
* positions it.
|
||||||
|
* @param aEnabled [IN] true to absolutely position the selection,
|
||||||
|
* false to put it back in the normal flow
|
||||||
|
*/
|
||||||
|
nsresult SetSelectionToAbsoluteOrStatic(bool aEnabled);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* extracts an element from the normal flow of the document and
|
||||||
|
* positions it, and puts it back in the normal flow.
|
||||||
|
* @param aElement [IN] the element
|
||||||
|
* @param aEnabled [IN] true to absolutely position the element,
|
||||||
|
* false to put it back in the normal flow
|
||||||
|
*/
|
||||||
|
nsresult SetPositionToAbsoluteOrStatic(Element& aElement,
|
||||||
|
bool aEnabled);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns the absolute z-index of a positioned element. Never returns 'auto'
|
||||||
|
* @return the z-index of the element
|
||||||
|
* @param aElement [IN] the element.
|
||||||
|
*/
|
||||||
|
int32_t GetZIndex(Element& aElement);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* adds aChange to the z-index of the currently positioned element.
|
||||||
|
* @param aChange [IN] relative change to apply to current z-index
|
||||||
|
*/
|
||||||
|
nsresult AddZIndex(int32_t aChange);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* adds aChange to the z-index of an arbitrary element.
|
||||||
|
* @param aElement [IN] the element
|
||||||
|
* @param aChange [IN] relative change to apply to current z-index of
|
||||||
|
* the element
|
||||||
|
* @param aReturn [OUT] the new z-index of the element
|
||||||
|
*/
|
||||||
|
nsresult RelativeChangeElementZIndex(Element& aElement, int32_t aChange,
|
||||||
|
int32_t* aReturn);
|
||||||
|
|
||||||
nsresult SetInlineProperty(nsAtom* aProperty,
|
nsresult SetInlineProperty(nsAtom* aProperty,
|
||||||
nsAtom* aAttribute,
|
nsAtom* aAttribute,
|
||||||
|
@ -967,7 +1013,14 @@ protected:
|
||||||
nsresult ClearStyle(nsCOMPtr<nsINode>* aNode, int32_t* aOffset,
|
nsresult ClearStyle(nsCOMPtr<nsINode>* aNode, int32_t* aOffset,
|
||||||
nsAtom* aProperty, nsAtom* aAttribute);
|
nsAtom* aProperty, nsAtom* aAttribute);
|
||||||
|
|
||||||
void SetElementPosition(Element& aElement, int32_t aX, int32_t aY);
|
/**
|
||||||
|
* sets the position of an element; warning it does NOT check if the
|
||||||
|
* element is already positioned or not and that's on purpose.
|
||||||
|
* @param aElement [IN] the element
|
||||||
|
* @param aX [IN] the x position in pixels.
|
||||||
|
* @param aY [IN] the y position in pixels.
|
||||||
|
*/
|
||||||
|
void SetTopAndLeft(Element& aElement, int32_t aX, int32_t aY);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset a selected cell or collapsed selection (the caret) after table
|
* Reset a selected cell or collapsed selection (the caret) after table
|
||||||
|
@ -1159,6 +1212,16 @@ protected:
|
||||||
|
|
||||||
int32_t mGridSize;
|
int32_t mGridSize;
|
||||||
|
|
||||||
|
nsresult SetPositionToAbsolute(Element& aElement);
|
||||||
|
nsresult SetPositionToStatic(Element& aElement);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sets the z-index of an element.
|
||||||
|
* @param aElement [IN] the element
|
||||||
|
* @param aZorder [IN] the z-index
|
||||||
|
*/
|
||||||
|
void SetZIndex(Element& aElement, int32_t aZorder);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* shows a grabber attached to an arbitrary element. The grabber is an image
|
* shows a grabber attached to an arbitrary element. The grabber is an image
|
||||||
* positioned on the left hand side of the top border of the element. Draggin
|
* positioned on the left hand side of the top border of the element. Draggin
|
||||||
|
@ -1166,7 +1229,12 @@ protected:
|
||||||
* document. See chrome://editor/content/images/grabber.gif
|
* document. See chrome://editor/content/images/grabber.gif
|
||||||
* @param aElement [IN] the element
|
* @param aElement [IN] the element
|
||||||
*/
|
*/
|
||||||
nsresult ShowGrabberOnElement(Element& aElement);
|
nsresult ShowGrabber(Element& aElement);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hide the grabber if it shown.
|
||||||
|
*/
|
||||||
|
void HideGrabber();
|
||||||
|
|
||||||
ManualNACPtr CreateGrabber(nsIContent& aParentContent);
|
ManualNACPtr CreateGrabber(nsIContent& aParentContent);
|
||||||
nsresult StartMoving(nsIDOMElement* aHandle);
|
nsresult StartMoving(nsIDOMElement* aHandle);
|
||||||
|
|
|
@ -10,11 +10,6 @@
|
||||||
|
|
||||||
interface nsIHTMLAbsPosEditor : nsISupports
|
interface nsIHTMLAbsPosEditor : nsISupports
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* true if the selection container is absolutely positioned
|
|
||||||
*/
|
|
||||||
readonly attribute boolean selectionContainerAbsolutelyPositioned;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* this contains the absolutely positioned element currently edited
|
* this contains the absolutely positioned element currently edited
|
||||||
* or null
|
* or null
|
||||||
|
@ -40,88 +35,8 @@ interface nsIHTMLAbsPosEditor : nsISupports
|
||||||
*/
|
*/
|
||||||
attribute unsigned long gridSize;
|
attribute unsigned long gridSize;
|
||||||
|
|
||||||
/* Selection-based methods */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* returns the deepest absolutely positioned container of the selection
|
|
||||||
* if it exists or null.
|
|
||||||
*/
|
|
||||||
readonly attribute nsIDOMElement absolutelyPositionedSelectionContainer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* extracts the selection from the normal flow of the document and
|
|
||||||
* positions it.
|
|
||||||
* @param aEnabled [IN] true to absolutely position the selection,
|
|
||||||
* false to put it back in the normal flow
|
|
||||||
*/
|
|
||||||
void absolutePositionSelection(in boolean aEnabled);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* adds aChange to the z-index of the currently positioned element.
|
|
||||||
* @param aChange [IN] relative change to apply to current z-index
|
|
||||||
*/
|
|
||||||
void relativeChangeZIndex(in long aChange);
|
|
||||||
|
|
||||||
/* Element-based methods */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* extracts an element from the normal flow of the document and
|
|
||||||
* positions it, and puts it back in the normal flow.
|
|
||||||
* @param aElement [IN] the element
|
|
||||||
* @param aEnabled [IN] true to absolutely position the element,
|
|
||||||
* false to put it back in the normal flow
|
|
||||||
*/
|
|
||||||
void absolutelyPositionElement(in nsIDOMElement aElement,
|
|
||||||
in boolean aEnabled);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* sets the position of an element; warning it does NOT check if the
|
|
||||||
* element is already positioned or not and that's on purpose.
|
|
||||||
* @param aElement [IN] the element
|
|
||||||
* @param aX [IN] the x position in pixels.
|
|
||||||
* @param aY [IN] the y position in pixels.
|
|
||||||
*/
|
|
||||||
void setElementPosition(in nsIDOMElement aElement, in long aX, in long aY);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* returns the absolute z-index of a positioned element. Never returns 'auto'.
|
|
||||||
* @return the z-index of the element
|
|
||||||
* @param aElement [IN] the element.
|
|
||||||
*/
|
|
||||||
long getElementZIndex(in nsIDOMElement aElement);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* sets the z-index of an element.
|
|
||||||
* @param aElement [IN] the element
|
|
||||||
* @param aZorder [IN] the z-index
|
|
||||||
*/
|
|
||||||
void setElementZIndex(in nsIDOMElement aElement, in long aZorder);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* adds aChange to the z-index of an arbitrary element.
|
|
||||||
* @return the new z-index of the element
|
|
||||||
* @param aElement [IN] the element
|
|
||||||
* @param aChange [IN] relative change to apply to current z-index of
|
|
||||||
* the element
|
|
||||||
*/
|
|
||||||
long relativeChangeElementZIndex(in nsIDOMElement aElement, in long aChange);
|
|
||||||
|
|
||||||
/* Other */
|
/* Other */
|
||||||
|
|
||||||
/**
|
|
||||||
* shows a grabber attached to an arbitrary element. The grabber is an image
|
|
||||||
* positioned on the left hand side of the top border of the element. Dragging
|
|
||||||
* and dropping it allows to change the element's absolute position in the
|
|
||||||
* document. See chrome://editor/content/images/grabber.gif
|
|
||||||
* @param aElement [IN] the element
|
|
||||||
*/
|
|
||||||
void showGrabberOnElement(in nsIDOMElement aElement);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* hide the grabber if it shown.
|
|
||||||
*/
|
|
||||||
void hideGrabber();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* refreshes the grabber if it shown, possibly updating its position or
|
* refreshes the grabber if it shown, possibly updating its position or
|
||||||
* even hiding it.
|
* even hiding it.
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
#include "nsIContentViewer.h"
|
#include "nsIContentViewer.h"
|
||||||
#include "nsIDocument.h"
|
#include "nsIDocument.h"
|
||||||
#include "nsIDocumentLoaderFactory.h"
|
#include "nsIDocumentLoaderFactory.h"
|
||||||
#include "nsIDOMSVGLength.h"
|
|
||||||
#include "nsIHttpChannel.h"
|
#include "nsIHttpChannel.h"
|
||||||
#include "nsIObserverService.h"
|
#include "nsIObserverService.h"
|
||||||
#include "nsIParser.h"
|
#include "nsIParser.h"
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
Path: 44
|
Path: 44
|
||||||
URL: https://ssl.icu-project.org/repos/icu/data/trunk/tzdata/icunew/2017c/44
|
URL: https://ssl.icu-project.org/repos/icu/data/trunk/tzdata/icunew/2018c/44
|
||||||
Relative URL: ^/data/trunk/tzdata/icunew/2017c/44
|
Relative URL: ^/data/trunk/tzdata/icunew/2018c/44
|
||||||
Repository Root: https://ssl.icu-project.org/repos/icu
|
Repository Root: https://ssl.icu-project.org/repos/icu
|
||||||
Repository UUID: 251d0590-4201-4cf1-90de-194747b24ca1
|
Repository UUID: 251d0590-4201-4cf1-90de-194747b24ca1
|
||||||
Node Kind: directory
|
Node Kind: directory
|
||||||
Last Changed Author: yoshito
|
Last Changed Author: yoshito
|
||||||
Last Changed Rev: 40633
|
Last Changed Rev: 40799
|
||||||
Last Changed Date: 2017-10-25 15:39:04 +0000 (Wed, 25 Oct 2017)
|
Last Changed Date: 2018-01-24 03:22:47 +0000 (Wed, 24 Jan 2018)
|
||||||
|
|
||||||
|
|
Двоичные данные
intl/tzdata/source/be/metaZones.res
Двоичные данные
intl/tzdata/source/be/metaZones.res
Двоичный файл не отображается.
Двоичные данные
intl/tzdata/source/be/windowsZones.res
Двоичные данные
intl/tzdata/source/be/windowsZones.res
Двоичный файл не отображается.
Двоичные данные
intl/tzdata/source/be/zoneinfo64.res
Двоичные данные
intl/tzdata/source/be/zoneinfo64.res
Двоичный файл не отображается.
Двоичные данные
intl/tzdata/source/ee/metaZones.res
Двоичные данные
intl/tzdata/source/ee/metaZones.res
Двоичный файл не отображается.
Двоичные данные
intl/tzdata/source/ee/windowsZones.res
Двоичные данные
intl/tzdata/source/ee/windowsZones.res
Двоичный файл не отображается.
Двоичные данные
intl/tzdata/source/ee/zoneinfo64.res
Двоичные данные
intl/tzdata/source/ee/zoneinfo64.res
Двоичный файл не отображается.
Двоичные данные
intl/tzdata/source/le/metaZones.res
Двоичные данные
intl/tzdata/source/le/metaZones.res
Двоичный файл не отображается.
Двоичные данные
intl/tzdata/source/le/windowsZones.res
Двоичные данные
intl/tzdata/source/le/windowsZones.res
Двоичный файл не отображается.
Двоичные данные
intl/tzdata/source/le/zoneinfo64.res
Двоичные данные
intl/tzdata/source/le/zoneinfo64.res
Двоичный файл не отображается.
|
@ -344,7 +344,6 @@ metaZones:table(nofallback){
|
||||||
SH{"Atlantic/St_Helena"}
|
SH{"Atlantic/St_Helena"}
|
||||||
SL{"Africa/Freetown"}
|
SL{"Africa/Freetown"}
|
||||||
SN{"Africa/Dakar"}
|
SN{"Africa/Dakar"}
|
||||||
ST{"Africa/Sao_Tome"}
|
|
||||||
TG{"Africa/Lome"}
|
TG{"Africa/Lome"}
|
||||||
}
|
}
|
||||||
Galapagos{
|
Galapagos{
|
||||||
|
@ -1030,6 +1029,13 @@ metaZones:table(nofallback){
|
||||||
"Africa:Sao_Tome"{
|
"Africa:Sao_Tome"{
|
||||||
{
|
{
|
||||||
"GMT",
|
"GMT",
|
||||||
|
"1970-01-01 00:00",
|
||||||
|
"2018-01-01 01:00",
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"Africa_Western",
|
||||||
|
"2018-01-01 01:00",
|
||||||
|
"9999-12-31 23:59",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"Africa:Tripoli"{
|
"Africa:Tripoli"{
|
||||||
|
|
|
@ -316,7 +316,6 @@ windowsZones:table(nofallback){
|
||||||
SH{"Atlantic/St_Helena"}
|
SH{"Atlantic/St_Helena"}
|
||||||
SL{"Africa/Freetown"}
|
SL{"Africa/Freetown"}
|
||||||
SN{"Africa/Dakar"}
|
SN{"Africa/Dakar"}
|
||||||
ST{"Africa/Sao_Tome"}
|
|
||||||
TG{"Africa/Lome"}
|
TG{"Africa/Lome"}
|
||||||
}
|
}
|
||||||
"Haiti Standard Time"{
|
"Haiti Standard Time"{
|
||||||
|
@ -744,6 +743,7 @@ windowsZones:table(nofallback){
|
||||||
GQ{"Africa/Malabo"}
|
GQ{"Africa/Malabo"}
|
||||||
NE{"Africa/Niamey"}
|
NE{"Africa/Niamey"}
|
||||||
NG{"Africa/Lagos"}
|
NG{"Africa/Lagos"}
|
||||||
|
ST{"Africa/Sao_Tome"}
|
||||||
TD{"Africa/Ndjamena"}
|
TD{"Africa/Ndjamena"}
|
||||||
TN{"Africa/Tunis"}
|
TN{"Africa/Tunis"}
|
||||||
ZZ{"Etc/GMT-1"}
|
ZZ{"Etc/GMT-1"}
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
// License & terms of use: http://www.unicode.org/copyright.html#License
|
// License & terms of use: http://www.unicode.org/copyright.html#License
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
// Build tool: tz2icu
|
// Build tool: tz2icu
|
||||||
// Build date: Tue Oct 24 17:35:27 2017
|
// Build date: Tue Jan 23 20:51:55 2018
|
||||||
// tz database: ftp://ftp.iana.org/tz/
|
// tz database: ftp://ftp.iana.org/tz/
|
||||||
// tz version: 2017c
|
// tz version: 2018c
|
||||||
// ICU version: 60.1
|
// ICU version: 60.1
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
// >> !!! >> THIS IS A MACHINE-GENERATED FILE << !!! <<
|
// >> !!! >> THIS IS A MACHINE-GENERATED FILE << !!! <<
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
zoneinfo64:table(nofallback) {
|
zoneinfo64:table(nofallback) {
|
||||||
TZVersion { "2017c" }
|
TZVersion { "2018c" }
|
||||||
Zones:array {
|
Zones:array {
|
||||||
/* ACT */ :int { 354 } //Z#0
|
/* ACT */ :int { 354 } //Z#0
|
||||||
/* AET */ :int { 366 } //Z#1
|
/* AET */ :int { 366 } //Z#1
|
||||||
|
@ -24,7 +24,7 @@ zoneinfo64:table(nofallback) {
|
||||||
trans:intvector { -1830383032 }
|
trans:intvector { -1830383032 }
|
||||||
typeOffsets:intvector { -968, 0, 0, 0 }
|
typeOffsets:intvector { -968, 0, 0, 0 }
|
||||||
typeMap:bin { "01" }
|
typeMap:bin { "01" }
|
||||||
links:intvector { 5, 11, 13, 21, 22, 27, 38, 51, 52, 54, 55, 346 }
|
links:intvector { 5, 11, 13, 21, 22, 27, 38, 51, 52, 55, 346 }
|
||||||
} //Z#5
|
} //Z#5
|
||||||
/* Africa/Accra */ :table {
|
/* Africa/Accra */ :table {
|
||||||
trans:intvector { -1640995148, -1556841600, -1546388400, -1525305600, -1514852400, -1493769600, -1483316400, -1462233600, -1451780400, -1430611200, -1420158000, -1399075200, -1388622000, -1367539200, -1357086000, -1336003200, -1325550000, -1304380800, -1293927600, -1272844800, -1262391600, -1241308800, -1230855600, -1209772800, -1199319600, -1178150400, -1167697200, -1146614400, -1136161200, -1115078400, -1104625200, -1083542400, -1073089200, -1051920000, -1041466800, -1020384000, -1009930800, -988848000, -978394800, -957312000, -946858800, -925689600, -915236400, -894153600, -883700400, -862617600, -852164400 }
|
trans:intvector { -1640995148, -1556841600, -1546388400, -1525305600, -1514852400, -1493769600, -1483316400, -1462233600, -1451780400, -1430611200, -1420158000, -1399075200, -1388622000, -1367539200, -1357086000, -1336003200, -1325550000, -1304380800, -1293927600, -1272844800, -1262391600, -1241308800, -1230855600, -1209772800, -1199319600, -1178150400, -1167697200, -1146614400, -1136161200, -1115078400, -1104625200, -1083542400, -1073089200, -1051920000, -1041466800, -1020384000, -1009930800, -988848000, -978394800, -957312000, -946858800, -925689600, -915236400, -894153600, -883700400, -862617600, -852164400 }
|
||||||
|
@ -154,7 +154,12 @@ zoneinfo64:table(nofallback) {
|
||||||
/* Africa/Nouakchott */ :int { 5 } //Z#51
|
/* Africa/Nouakchott */ :int { 5 } //Z#51
|
||||||
/* Africa/Ouagadougou */ :int { 5 } //Z#52
|
/* Africa/Ouagadougou */ :int { 5 } //Z#52
|
||||||
/* Africa/Porto-Novo */ :int { 36 } //Z#53
|
/* Africa/Porto-Novo */ :int { 36 } //Z#53
|
||||||
/* Africa/Sao_Tome */ :int { 5 } //Z#54
|
/* Africa/Sao_Tome */ :table {
|
||||||
|
transPre32:intvector { -1, 1581055280 }
|
||||||
|
trans:intvector { -1830381795, 1514768400 }
|
||||||
|
typeOffsets:intvector { 1616, 0, -2205, 0, 0, 0, 3600, 0 }
|
||||||
|
typeMap:bin { "010203" }
|
||||||
|
} //Z#54
|
||||||
/* Africa/Timbuktu */ :int { 5 } //Z#55
|
/* Africa/Timbuktu */ :int { 5 } //Z#55
|
||||||
/* Africa/Tripoli */ :table {
|
/* Africa/Tripoli */ :table {
|
||||||
trans:intvector { -1577926364, -574902000, -568087200, -512175600, -504928800, -449888400, -441856800, -347158800, 378684000, 386463600, 402271200, 417999600, 433807200, 449622000, 465429600, 481590000, 496965600, 512953200, 528674400, 544230000, 560037600, 575852400, 591660000, 607388400, 623196000, 641775600, 844034400, 860108400, 875916000, 1352505600, 1364515200, 1382659200 }
|
trans:intvector { -1577926364, -574902000, -568087200, -512175600, -504928800, -449888400, -441856800, -347158800, 378684000, 386463600, 402271200, 417999600, 433807200, 449622000, 465429600, 481590000, 496965600, 512953200, 528674400, 544230000, 560037600, 575852400, 591660000, 607388400, 623196000, 641775600, 844034400, 860108400, 875916000, 1352505600, 1364515200, 1382659200 }
|
||||||
|
@ -358,8 +363,8 @@ zoneinfo64:table(nofallback) {
|
||||||
finalYear:int { 2008 }
|
finalYear:int { 2008 }
|
||||||
} //Z#91
|
} //Z#91
|
||||||
/* America/Campo_Grande */ :table {
|
/* America/Campo_Grande */ :table {
|
||||||
trans:intvector { -1767212492, -1206954000, -1191358800, -1175371200, -1159822800, -633816000, -622065600, -602280000, -591829200, -570744000, -560206800, -539121600, -531349200, -191361600, -184194000, -155160000, -150066000, -128894400, -121122000, -99950400, -89586000, -68414400, -57963600, 499752000, 511239600, 530596800, 540270000, 562132800, 571201200, 592977600, 602046000, 624427200, 634705200, 656481600, 666759600, 687931200, 697604400, 719985600, 728449200, 750830400, 761713200, 782280000, 793162800, 813729600, 824007600, 844574400, 856062000, 876110400, 888721200, 908078400, 919566000, 938923200, 951620400, 970977600, 982465200, 1003032000, 1013914800, 1036296000, 1045364400, 1066536000, 1076814000, 1099368000, 1108868400, 1129435200, 1140318000, 1162699200, 1172372400, 1192334400, 1203217200, 1224388800, 1234666800, 1255838400, 1266721200, 1287288000, 1298170800, 1318737600, 1330225200, 1350792000, 1361070000, 1382241600, 1392519600, 1413691200, 1424574000, 1445140800, 1456023600, 1476590400, 1487473200, 1508040000, 1518922800, 1540094400, 1550372400, 1571544000, 1581822000, 1602993600, 1613876400, 1634443200, 1645326000, 1665892800, 1677380400, 1697342400, 1708225200, 1729396800, 1739674800, 1760846400, 1771729200, 1792296000, 1803178800, 1823745600, 1834628400, 1855195200, 1866078000, 1887249600, 1897527600, 1918699200, 1928977200, 1950148800, 1960426800, 1981598400, 1992481200, 2013048000, 2024535600, 2044497600, 2055380400, 2076552000, 2086830000, 2108001600, 2118884400, 2139451200 }
|
trans:intvector { -1767212492, -1206954000, -1191358800, -1175371200, -1159822800, -633816000, -622065600, -602280000, -591829200, -570744000, -560206800, -539121600, -531349200, -191361600, -184194000, -155160000, -150066000, -128894400, -121122000, -99950400, -89586000, -68414400, -57963600, 499752000, 511239600, 530596800, 540270000, 562132800, 571201200, 592977600, 602046000, 624427200, 634705200, 656481600, 666759600, 687931200, 697604400, 719985600, 728449200, 750830400, 761713200, 782280000, 793162800, 813729600, 824007600, 844574400, 856062000, 876110400, 888721200, 908078400, 919566000, 938923200, 951620400, 970977600, 982465200, 1003032000, 1013914800, 1036296000, 1045364400, 1066536000, 1076814000, 1099368000, 1108868400, 1129435200, 1140318000, 1162699200, 1172372400, 1192334400, 1203217200, 1224388800, 1234666800, 1255838400, 1266721200, 1287288000, 1298170800, 1318737600, 1330225200, 1350792000, 1361070000, 1382241600, 1392519600, 1413691200, 1424574000, 1445140800, 1456023600, 1476590400, 1487473200, 1508040000, 1518922800, 1541304000, 1550372400, 1572753600, 1581822000, 1604203200, 1613876400, 1636257600, 1645326000, 1667707200, 1677380400, 1699156800, 1708225200, 1730606400, 1739674800, 1762056000, 1771729200, 1793505600, 1803178800, 1825560000, 1834628400, 1857009600, 1866078000, 1888459200, 1897527600, 1919908800, 1928977200, 1951358400, 1960426800, 1983412800, 1992481200, 2014862400, 2024535600, 2046312000, 2055380400, 2077761600, 2086830000, 2109211200, 2118884400, 2140660800 }
|
||||||
transPost32:intvector { 0, -2144633296, 0, -2124066496 }
|
transPost32:intvector { 0, -2144633296, 0, -2122252096 }
|
||||||
typeOffsets:intvector { -13108, 0, -14400, 0, -14400, 3600 }
|
typeOffsets:intvector { -13108, 0, -14400, 0, -14400, 3600 }
|
||||||
typeMap:bin { "01020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102" }
|
typeMap:bin { "01020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102" }
|
||||||
finalRule { "Brazil" }
|
finalRule { "Brazil" }
|
||||||
|
@ -416,8 +421,8 @@ zoneinfo64:table(nofallback) {
|
||||||
typeMap:bin { "020102" }
|
typeMap:bin { "020102" }
|
||||||
} //Z#103
|
} //Z#103
|
||||||
/* America/Cuiaba */ :table {
|
/* America/Cuiaba */ :table {
|
||||||
trans:intvector { -1767212140, -1206954000, -1191358800, -1175371200, -1159822800, -633816000, -622065600, -602280000, -591829200, -570744000, -560206800, -539121600, -531349200, -191361600, -184194000, -155160000, -150066000, -128894400, -121122000, -99950400, -89586000, -68414400, -57963600, 499752000, 511239600, 530596800, 540270000, 562132800, 571201200, 592977600, 602046000, 624427200, 634705200, 656481600, 666759600, 687931200, 697604400, 719985600, 728449200, 750830400, 761713200, 782280000, 793162800, 813729600, 824007600, 844574400, 856062000, 876110400, 888721200, 908078400, 919566000, 938923200, 951620400, 970977600, 982465200, 1003032000, 1013914800, 1036296000, 1045364400, 1099368000, 1108868400, 1129435200, 1140318000, 1162699200, 1172372400, 1192334400, 1203217200, 1224388800, 1234666800, 1255838400, 1266721200, 1287288000, 1298170800, 1318737600, 1330225200, 1350792000, 1361070000, 1382241600, 1392519600, 1413691200, 1424574000, 1445140800, 1456023600, 1476590400, 1487473200, 1508040000, 1518922800, 1540094400, 1550372400, 1571544000, 1581822000, 1602993600, 1613876400, 1634443200, 1645326000, 1665892800, 1677380400, 1697342400, 1708225200, 1729396800, 1739674800, 1760846400, 1771729200, 1792296000, 1803178800, 1823745600, 1834628400, 1855195200, 1866078000, 1887249600, 1897527600, 1918699200, 1928977200, 1950148800, 1960426800, 1981598400, 1992481200, 2013048000, 2024535600, 2044497600, 2055380400, 2076552000, 2086830000, 2108001600, 2118884400, 2139451200 }
|
trans:intvector { -1767212140, -1206954000, -1191358800, -1175371200, -1159822800, -633816000, -622065600, -602280000, -591829200, -570744000, -560206800, -539121600, -531349200, -191361600, -184194000, -155160000, -150066000, -128894400, -121122000, -99950400, -89586000, -68414400, -57963600, 499752000, 511239600, 530596800, 540270000, 562132800, 571201200, 592977600, 602046000, 624427200, 634705200, 656481600, 666759600, 687931200, 697604400, 719985600, 728449200, 750830400, 761713200, 782280000, 793162800, 813729600, 824007600, 844574400, 856062000, 876110400, 888721200, 908078400, 919566000, 938923200, 951620400, 970977600, 982465200, 1003032000, 1013914800, 1036296000, 1045364400, 1099368000, 1108868400, 1129435200, 1140318000, 1162699200, 1172372400, 1192334400, 1203217200, 1224388800, 1234666800, 1255838400, 1266721200, 1287288000, 1298170800, 1318737600, 1330225200, 1350792000, 1361070000, 1382241600, 1392519600, 1413691200, 1424574000, 1445140800, 1456023600, 1476590400, 1487473200, 1508040000, 1518922800, 1541304000, 1550372400, 1572753600, 1581822000, 1604203200, 1613876400, 1636257600, 1645326000, 1667707200, 1677380400, 1699156800, 1708225200, 1730606400, 1739674800, 1762056000, 1771729200, 1793505600, 1803178800, 1825560000, 1834628400, 1857009600, 1866078000, 1888459200, 1897527600, 1919908800, 1928977200, 1951358400, 1960426800, 1983412800, 1992481200, 2014862400, 2024535600, 2046312000, 2055380400, 2077761600, 2086830000, 2109211200, 2118884400, 2140660800 }
|
||||||
transPost32:intvector { 0, -2144633296, 0, -2124066496 }
|
transPost32:intvector { 0, -2144633296, 0, -2122252096 }
|
||||||
typeOffsets:intvector { -13460, 0, -14400, 0, -14400, 3600 }
|
typeOffsets:intvector { -13460, 0, -14400, 0, -14400, 3600 }
|
||||||
typeMap:bin { "0102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102" }
|
typeMap:bin { "0102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102" }
|
||||||
finalRule { "Brazil" }
|
finalRule { "Brazil" }
|
||||||
|
@ -1040,8 +1045,8 @@ zoneinfo64:table(nofallback) {
|
||||||
typeMap:bin { "0401030102010201020102010201050105" }
|
typeMap:bin { "0401030102010201020102010201050105" }
|
||||||
} //Z#201
|
} //Z#201
|
||||||
/* America/Sao_Paulo */ :table {
|
/* America/Sao_Paulo */ :table {
|
||||||
trans:intvector { -1767214412, -1206957600, -1191362400, -1175374800, -1159826400, -633819600, -622069200, -602283600, -591832800, -570747600, -560210400, -539125200, -531352800, -195426000, -184197600, -155163600, -150069600, -128898000, -121125600, -99954000, -89589600, -68418000, -57967200, 499748400, 511236000, 530593200, 540266400, 562129200, 571197600, 592974000, 602042400, 624423600, 634701600, 656478000, 666756000, 687927600, 697600800, 719982000, 728445600, 750826800, 761709600, 782276400, 793159200, 813726000, 824004000, 844570800, 856058400, 876106800, 888717600, 908074800, 919562400, 938919600, 951616800, 970974000, 982461600, 1003028400, 1013911200, 1036292400, 1045360800, 1066532400, 1076810400, 1099364400, 1108864800, 1129431600, 1140314400, 1162695600, 1172368800, 1192330800, 1203213600, 1224385200, 1234663200, 1255834800, 1266717600, 1287284400, 1298167200, 1318734000, 1330221600, 1350788400, 1361066400, 1382238000, 1392516000, 1413687600, 1424570400, 1445137200, 1456020000, 1476586800, 1487469600, 1508036400, 1518919200, 1540090800, 1550368800, 1571540400, 1581818400, 1602990000, 1613872800, 1634439600, 1645322400, 1665889200, 1677376800, 1697338800, 1708221600, 1729393200, 1739671200, 1760842800, 1771725600, 1792292400, 1803175200, 1823742000, 1834624800, 1855191600, 1866074400, 1887246000, 1897524000, 1918695600, 1928973600, 1950145200, 1960423200, 1981594800, 1992477600, 2013044400, 2024532000, 2044494000, 2055376800, 2076548400, 2086826400, 2107998000, 2118880800, 2139447600 }
|
trans:intvector { -1767214412, -1206957600, -1191362400, -1175374800, -1159826400, -633819600, -622069200, -602283600, -591832800, -570747600, -560210400, -539125200, -531352800, -195426000, -184197600, -155163600, -150069600, -128898000, -121125600, -99954000, -89589600, -68418000, -57967200, 499748400, 511236000, 530593200, 540266400, 562129200, 571197600, 592974000, 602042400, 624423600, 634701600, 656478000, 666756000, 687927600, 697600800, 719982000, 728445600, 750826800, 761709600, 782276400, 793159200, 813726000, 824004000, 844570800, 856058400, 876106800, 888717600, 908074800, 919562400, 938919600, 951616800, 970974000, 982461600, 1003028400, 1013911200, 1036292400, 1045360800, 1066532400, 1076810400, 1099364400, 1108864800, 1129431600, 1140314400, 1162695600, 1172368800, 1192330800, 1203213600, 1224385200, 1234663200, 1255834800, 1266717600, 1287284400, 1298167200, 1318734000, 1330221600, 1350788400, 1361066400, 1382238000, 1392516000, 1413687600, 1424570400, 1445137200, 1456020000, 1476586800, 1487469600, 1508036400, 1518919200, 1541300400, 1550368800, 1572750000, 1581818400, 1604199600, 1613872800, 1636254000, 1645322400, 1667703600, 1677376800, 1699153200, 1708221600, 1730602800, 1739671200, 1762052400, 1771725600, 1793502000, 1803175200, 1825556400, 1834624800, 1857006000, 1866074400, 1888455600, 1897524000, 1919905200, 1928973600, 1951354800, 1960423200, 1983409200, 1992477600, 2014858800, 2024532000, 2046308400, 2055376800, 2077758000, 2086826400, 2109207600, 2118880800, 2140657200 }
|
||||||
transPost32:intvector { 0, -2144636896, 0, -2124070096 }
|
transPost32:intvector { 0, -2144636896, 0, -2122255696 }
|
||||||
typeOffsets:intvector { -11188, 0, -10800, 0, -10800, 3600 }
|
typeOffsets:intvector { -11188, 0, -10800, 0, -10800, 3600 }
|
||||||
typeMap:bin { "01020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102" }
|
typeMap:bin { "01020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102" }
|
||||||
finalRule { "Brazil" }
|
finalRule { "Brazil" }
|
||||||
|
@ -1645,7 +1650,7 @@ zoneinfo64:table(nofallback) {
|
||||||
} //Z#322
|
} //Z#322
|
||||||
/* Asia/Tokyo */ :table {
|
/* Asia/Tokyo */ :table {
|
||||||
transPre32:intvector { -1, 1707254896 }
|
transPre32:intvector { -1, 1707254896 }
|
||||||
trans:intvector { -683794800, -672393600, -654764400, -640944000, -620290800, -609494400, -588841200, -578044800 }
|
trans:intvector { -683802000, -672314400, -654771600, -640864800, -620298000, -609415200, -588848400, -577965600 }
|
||||||
typeOffsets:intvector { 33539, 0, 32400, 0, 32400, 3600 }
|
typeOffsets:intvector { 33539, 0, 32400, 0, 32400, 3600 }
|
||||||
typeMap:bin { "010201020102010201" }
|
typeMap:bin { "010201020102010201" }
|
||||||
links:intvector { 323, 527, 529 }
|
links:intvector { 323, 527, 529 }
|
||||||
|
@ -3083,7 +3088,7 @@ zoneinfo64:table(nofallback) {
|
||||||
9, 1, -1, 7200, 1, 3, 1, -1, 7200, 1, 3600
|
9, 1, -1, 7200, 1, 3, 1, -1, 7200, 1, 3600
|
||||||
} //_#3
|
} //_#3
|
||||||
Brazil:intvector {
|
Brazil:intvector {
|
||||||
9, 15, -1, 0, 0, 1, 15, -1, 0, 0, 3600
|
10, 1, -1, 0, 0, 1, 15, -1, 0, 0, 3600
|
||||||
} //_#4
|
} //_#4
|
||||||
C-Eur:intvector {
|
C-Eur:intvector {
|
||||||
2, -31, -1, 7200, 1, 9, -31, -1, 7200, 1, 3600
|
2, -31, -1, 7200, 1, 9, -31, -1, 7200, 1, 3600
|
||||||
|
|
|
@ -54,41 +54,41 @@ function resolveDateTimeFormatInternals(lazyDateTimeFormatData) {
|
||||||
var internalProps = std_Object_create(null);
|
var internalProps = std_Object_create(null);
|
||||||
|
|
||||||
// Compute effective locale.
|
// Compute effective locale.
|
||||||
// Step 8.
|
|
||||||
var DateTimeFormat = dateTimeFormatInternalProperties;
|
var DateTimeFormat = dateTimeFormatInternalProperties;
|
||||||
|
|
||||||
// Step 9.
|
// Step 10.
|
||||||
var localeData = DateTimeFormat.localeData;
|
var localeData = DateTimeFormat.localeData;
|
||||||
|
|
||||||
// Step 10.
|
// Step 11.
|
||||||
var r = ResolveLocale(callFunction(DateTimeFormat.availableLocales, DateTimeFormat),
|
var r = ResolveLocale(callFunction(DateTimeFormat.availableLocales, DateTimeFormat),
|
||||||
lazyDateTimeFormatData.requestedLocales,
|
lazyDateTimeFormatData.requestedLocales,
|
||||||
lazyDateTimeFormatData.localeOpt,
|
lazyDateTimeFormatData.localeOpt,
|
||||||
DateTimeFormat.relevantExtensionKeys,
|
DateTimeFormat.relevantExtensionKeys,
|
||||||
localeData);
|
localeData);
|
||||||
|
|
||||||
// Steps 11-13.
|
// Steps 12-13, 15.
|
||||||
internalProps.locale = r.locale;
|
internalProps.locale = r.locale;
|
||||||
internalProps.calendar = r.ca;
|
internalProps.calendar = r.ca;
|
||||||
internalProps.numberingSystem = r.nu;
|
internalProps.numberingSystem = r.nu;
|
||||||
|
|
||||||
// Compute formatting options.
|
// Compute formatting options.
|
||||||
// Step 14.
|
// Step 16.
|
||||||
var dataLocale = r.dataLocale;
|
var dataLocale = r.dataLocale;
|
||||||
|
|
||||||
// Steps 15-17.
|
// Step 20.
|
||||||
internalProps.timeZone = lazyDateTimeFormatData.timeZone;
|
internalProps.timeZone = lazyDateTimeFormatData.timeZone;
|
||||||
|
|
||||||
// Step 18.
|
// Step 21.
|
||||||
var formatOpt = lazyDateTimeFormatData.formatOpt;
|
var formatOpt = lazyDateTimeFormatData.formatOpt;
|
||||||
|
|
||||||
|
// Step 16.
|
||||||
// Copy the hourCycle setting, if present, to the format options. But
|
// Copy the hourCycle setting, if present, to the format options. But
|
||||||
// only do this if no hour12 option is present, because the latter takes
|
// only do this if no hour12 option is present, because the latter takes
|
||||||
// precedence over hourCycle.
|
// precedence over hourCycle.
|
||||||
if (r.hc !== null && formatOpt.hour12 === undefined)
|
if (r.hc !== null && formatOpt.hour12 === undefined)
|
||||||
formatOpt.hourCycle = r.hc;
|
formatOpt.hourCycle = r.hc;
|
||||||
|
|
||||||
// Steps 27-28, more or less - see comment after this function.
|
// Steps 26-30, more or less - see comment after this function.
|
||||||
var pattern;
|
var pattern;
|
||||||
if (lazyDateTimeFormatData.mozExtensions) {
|
if (lazyDateTimeFormatData.mozExtensions) {
|
||||||
if (lazyDateTimeFormatData.patternOption !== undefined) {
|
if (lazyDateTimeFormatData.patternOption !== undefined) {
|
||||||
|
@ -115,10 +115,9 @@ function resolveDateTimeFormatInternals(lazyDateTimeFormatData) {
|
||||||
if (formatOpt.hourCycle !== undefined)
|
if (formatOpt.hourCycle !== undefined)
|
||||||
pattern = replaceHourRepresentation(pattern, formatOpt.hourCycle);
|
pattern = replaceHourRepresentation(pattern, formatOpt.hourCycle);
|
||||||
|
|
||||||
// Step 29.
|
// Step 31.
|
||||||
internalProps.pattern = pattern;
|
internalProps.pattern = pattern;
|
||||||
|
|
||||||
// Step 30.
|
|
||||||
internalProps.boundFormat = undefined;
|
internalProps.boundFormat = undefined;
|
||||||
|
|
||||||
// The caller is responsible for associating |internalProps| with the right
|
// The caller is responsible for associating |internalProps| with the right
|
||||||
|
@ -356,29 +355,42 @@ function InitializeDateTimeFormat(dateTimeFormat, thisValue, locales, options, m
|
||||||
localeOpt.localeMatcher = localeMatcher;
|
localeOpt.localeMatcher = localeMatcher;
|
||||||
|
|
||||||
// Step 6.
|
// Step 6.
|
||||||
|
var hr12 = GetOption(options, "hour12", "boolean", undefined, undefined);
|
||||||
|
|
||||||
|
// Step 7.
|
||||||
var hc = GetOption(options, "hourCycle", "string", ["h11", "h12", "h23", "h24"], undefined);
|
var hc = GetOption(options, "hourCycle", "string", ["h11", "h12", "h23", "h24"], undefined);
|
||||||
|
|
||||||
|
// Step 8.
|
||||||
|
if (hr12 !== undefined) {
|
||||||
|
// The "hourCycle" option is ignored if "hr12" is also present.
|
||||||
|
hc = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 9.
|
||||||
localeOpt.hc = hc;
|
localeOpt.hc = hc;
|
||||||
|
|
||||||
// Steps 15-18.
|
// Steps 10-16 (see resolveDateTimeFormatInternals).
|
||||||
|
|
||||||
|
// Steps 17-20.
|
||||||
var tz = options.timeZone;
|
var tz = options.timeZone;
|
||||||
if (tz !== undefined) {
|
if (tz !== undefined) {
|
||||||
// Step 15.a.
|
// Step 18.a.
|
||||||
tz = ToString(tz);
|
tz = ToString(tz);
|
||||||
|
|
||||||
// Step 15.b.
|
// Step 18.b.
|
||||||
var timeZone = intl_IsValidTimeZoneName(tz);
|
var timeZone = intl_IsValidTimeZoneName(tz);
|
||||||
if (timeZone === null)
|
if (timeZone === null)
|
||||||
ThrowRangeError(JSMSG_INVALID_TIME_ZONE, tz);
|
ThrowRangeError(JSMSG_INVALID_TIME_ZONE, tz);
|
||||||
|
|
||||||
// Step 15.c.
|
// Step 18.c.
|
||||||
tz = CanonicalizeTimeZoneName(timeZone);
|
tz = CanonicalizeTimeZoneName(timeZone);
|
||||||
} else {
|
} else {
|
||||||
// Step 16.
|
// Step 19.
|
||||||
tz = DefaultTimeZone();
|
tz = DefaultTimeZone();
|
||||||
}
|
}
|
||||||
lazyDateTimeFormatData.timeZone = tz;
|
lazyDateTimeFormatData.timeZone = tz;
|
||||||
|
|
||||||
// Step 19.
|
// Step 21.
|
||||||
var formatOpt = new Record();
|
var formatOpt = new Record();
|
||||||
lazyDateTimeFormatData.formatOpt = formatOpt;
|
lazyDateTimeFormatData.formatOpt = formatOpt;
|
||||||
|
|
||||||
|
@ -394,8 +406,8 @@ function InitializeDateTimeFormat(dateTimeFormat, thisValue, locales, options, m
|
||||||
lazyDateTimeFormatData.timeStyle = timeStyle;
|
lazyDateTimeFormatData.timeStyle = timeStyle;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 20.
|
// Step 22.
|
||||||
// 12.1, Table 4: Components of date and time formats.
|
// 12.1, Table 5: Components of date and time formats.
|
||||||
formatOpt.weekday = GetOption(options, "weekday", "string", ["narrow", "short", "long"],
|
formatOpt.weekday = GetOption(options, "weekday", "string", ["narrow", "short", "long"],
|
||||||
undefined);
|
undefined);
|
||||||
formatOpt.era = GetOption(options, "era", "string", ["narrow", "short", "long"], undefined);
|
formatOpt.era = GetOption(options, "era", "string", ["narrow", "short", "long"], undefined);
|
||||||
|
@ -409,9 +421,9 @@ function InitializeDateTimeFormat(dateTimeFormat, thisValue, locales, options, m
|
||||||
formatOpt.timeZoneName = GetOption(options, "timeZoneName", "string", ["short", "long"],
|
formatOpt.timeZoneName = GetOption(options, "timeZoneName", "string", ["short", "long"],
|
||||||
undefined);
|
undefined);
|
||||||
|
|
||||||
// Steps 21-22 provided by ICU - see comment after this function.
|
// Steps 23-24 provided by ICU - see comment after this function.
|
||||||
|
|
||||||
// Step 23.
|
// Step 25.
|
||||||
//
|
//
|
||||||
// For some reason (ICU not exposing enough interface?) we drop the
|
// For some reason (ICU not exposing enough interface?) we drop the
|
||||||
// requested format matcher on the floor after this. In any case, even if
|
// requested format matcher on the floor after this. In any case, even if
|
||||||
|
@ -422,21 +434,20 @@ function InitializeDateTimeFormat(dateTimeFormat, thisValue, locales, options, m
|
||||||
"best fit");
|
"best fit");
|
||||||
void formatMatcher;
|
void formatMatcher;
|
||||||
|
|
||||||
// Steps 24-26 provided by ICU, more or less - see comment after this function.
|
// Steps 26-28 provided by ICU, more or less - see comment after this function.
|
||||||
|
|
||||||
// Step 27.
|
|
||||||
var hr12 = GetOption(options, "hour12", "boolean", undefined, undefined);
|
|
||||||
|
|
||||||
|
// Steps 29-30.
|
||||||
// Pass hr12 on to ICU.
|
// Pass hr12 on to ICU.
|
||||||
if (hr12 !== undefined)
|
if (hr12 !== undefined)
|
||||||
formatOpt.hour12 = hr12;
|
formatOpt.hour12 = hr12;
|
||||||
|
|
||||||
// Step 31.
|
// Step 32.
|
||||||
//
|
//
|
||||||
// We've done everything that must be done now: mark the lazy data as fully
|
// We've done everything that must be done now: mark the lazy data as fully
|
||||||
// computed and install it.
|
// computed and install it.
|
||||||
initializeIntlObject(dateTimeFormat, "DateTimeFormat", lazyDateTimeFormatData);
|
initializeIntlObject(dateTimeFormat, "DateTimeFormat", lazyDateTimeFormatData);
|
||||||
|
|
||||||
|
// 12.2.1, steps 4-5.
|
||||||
if (dateTimeFormat !== thisValue && IsObject(thisValue) &&
|
if (dateTimeFormat !== thisValue && IsObject(thisValue) &&
|
||||||
thisValue instanceof GetDateTimeFormatConstructor())
|
thisValue instanceof GetDateTimeFormatConstructor())
|
||||||
{
|
{
|
||||||
|
@ -446,6 +457,7 @@ function InitializeDateTimeFormat(dateTimeFormat, thisValue, locales, options, m
|
||||||
return thisValue;
|
return thisValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 12.2.1, step 6.
|
||||||
return dateTimeFormat;
|
return dateTimeFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// Generated by make_intl_data.py. DO NOT EDIT.
|
// Generated by make_intl_data.py. DO NOT EDIT.
|
||||||
// tzdata version = 2017c
|
// tzdata version = 2018c
|
||||||
|
|
||||||
#ifndef builtin_intl_TimeZoneDataGenerated_h
|
#ifndef builtin_intl_TimeZoneDataGenerated_h
|
||||||
#define builtin_intl_TimeZoneDataGenerated_h
|
#define builtin_intl_TimeZoneDataGenerated_h
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||||
|
|
||||||
// Generated by make_intl_data.py. DO NOT EDIT.
|
// Generated by make_intl_data.py. DO NOT EDIT.
|
||||||
// tzdata version = 2017c
|
// tzdata version = 2018c
|
||||||
|
|
||||||
const tzMapper = [
|
const tzMapper = [
|
||||||
x => x,
|
x => x,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||||
|
|
||||||
// Generated by make_intl_data.py. DO NOT EDIT.
|
// Generated by make_intl_data.py. DO NOT EDIT.
|
||||||
// tzdata version = 2017c
|
// tzdata version = 2018c
|
||||||
|
|
||||||
const tzMapper = [
|
const tzMapper = [
|
||||||
x => x,
|
x => x,
|
||||||
|
@ -47,7 +47,6 @@ const links = {
|
||||||
"Africa/Nouakchott": "Africa/Nouakchott",
|
"Africa/Nouakchott": "Africa/Nouakchott",
|
||||||
"Africa/Ouagadougou": "Africa/Ouagadougou",
|
"Africa/Ouagadougou": "Africa/Ouagadougou",
|
||||||
"Africa/Porto-Novo": "Africa/Porto-Novo",
|
"Africa/Porto-Novo": "Africa/Porto-Novo",
|
||||||
"Africa/Sao_Tome": "Africa/Sao_Tome",
|
|
||||||
"Africa/Timbuktu": "Africa/Timbuktu",
|
"Africa/Timbuktu": "Africa/Timbuktu",
|
||||||
"America/Anguilla": "America/Anguilla",
|
"America/Anguilla": "America/Anguilla",
|
||||||
"America/Antigua": "America/Antigua",
|
"America/Antigua": "America/Antigua",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||||
|
|
||||||
// Generated by make_intl_data.py. DO NOT EDIT.
|
// Generated by make_intl_data.py. DO NOT EDIT.
|
||||||
// tzdata version = 2017c
|
// tzdata version = 2018c
|
||||||
|
|
||||||
const tzMapper = [
|
const tzMapper = [
|
||||||
x => x,
|
x => x,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
// |reftest| skip-if(!this.hasOwnProperty("Intl"))
|
||||||
|
|
||||||
// Generated by make_intl_data.py. DO NOT EDIT.
|
// Generated by make_intl_data.py. DO NOT EDIT.
|
||||||
// tzdata version = 2017c
|
// tzdata version = 2018c
|
||||||
|
|
||||||
const tzMapper = [
|
const tzMapper = [
|
||||||
x => x,
|
x => x,
|
||||||
|
|
|
@ -35,7 +35,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=790732
|
||||||
is(Ci.nsIDOMHTMLMediaElement, HTMLMediaElement);
|
is(Ci.nsIDOMHTMLMediaElement, HTMLMediaElement);
|
||||||
is(Ci.nsIDOMOfflineResourceList, OfflineResourceList);
|
is(Ci.nsIDOMOfflineResourceList, OfflineResourceList);
|
||||||
is(Ci.nsIDOMRange, Range);
|
is(Ci.nsIDOMRange, Range);
|
||||||
is(Ci.nsIDOMSVGLength, SVGLength);
|
|
||||||
is(Ci.nsIDOMNodeFilter, NodeFilter);
|
is(Ci.nsIDOMNodeFilter, NodeFilter);
|
||||||
is(Ci.nsIDOMXPathResult, XPathResult);
|
is(Ci.nsIDOMXPathResult, XPathResult);
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<title>Test for Bug 1207734 (individual transforms)</title>
|
||||||
|
<!--
|
||||||
|
FIXME: This is only here in a separate file since it needs the
|
||||||
|
layout.css.individual-transform.enabled pref to be set when it runs and the
|
||||||
|
pref= annotation in mochitest.ini doesn't work on Android (bug 1393326).
|
||||||
|
Once we turn on that pref by default or fix bug 1393326 we can move this back
|
||||||
|
into test_specified_value_serialization.html.
|
||||||
|
-->
|
||||||
|
<script>
|
||||||
|
const is = opener.is.bind(opener);
|
||||||
|
function finish() {
|
||||||
|
const o = opener;
|
||||||
|
self.close();
|
||||||
|
o.SimpleTest.finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
function runTest() {
|
||||||
|
// The individual transform functions are not implemented in the Gecko style
|
||||||
|
// system.
|
||||||
|
if (!SpecialPowers.DOMWindowUtils.isStyledByServo) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Test for rotate property serialization.
|
||||||
|
[
|
||||||
|
[" 90deg ", "90deg"],
|
||||||
|
[" 100grad ", "100grad"],
|
||||||
|
[" 100gRaD ", "100grad"],
|
||||||
|
[" 0.25turn ", "0.25turn"],
|
||||||
|
[" 0.25tUrN ", "0.25turn"],
|
||||||
|
[" 1.57RaD ", "1.57rad"],
|
||||||
|
].forEach(function(arr) {
|
||||||
|
document.documentElement.style.rotate = arr[0];
|
||||||
|
is(document.documentElement.style.rotate, arr[1],
|
||||||
|
"bug-1207734: incorrect rotate serialization");
|
||||||
|
});
|
||||||
|
document.documentElement.style.rotate = "";
|
||||||
|
|
||||||
|
// Test for translate property serialization.
|
||||||
|
[
|
||||||
|
[" 50% 5px 6px ", "50% 5px 6px"],
|
||||||
|
[" 50% 10px 100px ", "50% 10px 100px"],
|
||||||
|
[" 4px 5px ", "4px 5px"],
|
||||||
|
[" 10% 10% 99px ", "10% 10% 99px"],
|
||||||
|
[" 50px ", "50px"],
|
||||||
|
].forEach(function(arr) {
|
||||||
|
document.documentElement.style.translate = arr[0];
|
||||||
|
is(document.documentElement.style.translate, arr[1],
|
||||||
|
"bug-1207734: incorrect translate serialization");
|
||||||
|
});
|
||||||
|
document.documentElement.style.translate = "";
|
||||||
|
|
||||||
|
// Test for scale property serialization.
|
||||||
|
[
|
||||||
|
[" 10 ", "10"],
|
||||||
|
[" 10 20.5 ", "10 20.5"],
|
||||||
|
[" 10 20 30 ", "10 20 30"],
|
||||||
|
].forEach(function(arr) {
|
||||||
|
document.documentElement.style.scale = arr[0];
|
||||||
|
is(document.documentElement.style.scale, arr[1],
|
||||||
|
"bug-1207734: incorrect scale serialization");
|
||||||
|
});
|
||||||
|
|
||||||
|
document.documentElement.style.scale = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
runTest();
|
||||||
|
finish();
|
||||||
|
</script>
|
|
@ -34,7 +34,6 @@ support-files =
|
||||||
visited-lying-inner.html
|
visited-lying-inner.html
|
||||||
visited-pref-iframe.html
|
visited-pref-iframe.html
|
||||||
xbl_bindings.xml
|
xbl_bindings.xml
|
||||||
; prefs = layout.css.individual-transform.enabled=true
|
|
||||||
|
|
||||||
[test_acid3_test46.html]
|
[test_acid3_test46.html]
|
||||||
[test_addSheet.html]
|
[test_addSheet.html]
|
||||||
|
@ -298,6 +297,7 @@ skip-if = toolkit == 'android' #bug 775227
|
||||||
[test_setPropertyWithNull.html]
|
[test_setPropertyWithNull.html]
|
||||||
[test_shorthand_property_getters.html]
|
[test_shorthand_property_getters.html]
|
||||||
[test_specified_value_serialization.html]
|
[test_specified_value_serialization.html]
|
||||||
|
support-files = file_specified_value_serialization_individual_transforms.html
|
||||||
[test_style_attr_listener.html]
|
[test_style_attr_listener.html]
|
||||||
[test_style_attribute_quirks.html]
|
[test_style_attribute_quirks.html]
|
||||||
[test_style_attribute_standards.html]
|
[test_style_attribute_standards.html]
|
||||||
|
|
|
@ -42,8 +42,7 @@ for (var idx in gLonghandProperties) {
|
||||||
if (prop.pref && !IsCSSPropertyPrefEnabled(prop.pref)) {
|
if (prop.pref && !IsCSSPropertyPrefEnabled(prop.pref)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// FIXME(Bug 1207734).
|
if (!SpecialPowers.DOMWindowUtils.isStyledByServo &&
|
||||||
if (// !SpecialPowers.DOMWindowUtils.isStyledByServo &&
|
|
||||||
gServoOnlyProperties.includes(prop.name)) {
|
gServoOnlyProperties.includes(prop.name)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -277,55 +277,14 @@
|
||||||
p.remove();
|
p.remove();
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(function test_bug_1207734 () {
|
SimpleTest.waitForExplicitFinish();
|
||||||
// The individual transform functions are not implemented on the Gecko style
|
SpecialPowers.pushPrefEnv(
|
||||||
// system.
|
{
|
||||||
// FIXME(bug 1207734).
|
set: [['layout.css.individual-transform.enabled', true]],
|
||||||
if (true || !SpecialPowers.DOMWindowUtils.isStyledByServo) {
|
},
|
||||||
return;
|
() =>
|
||||||
}
|
window.open('file_specified_value_serialization_individual_transforms.html')
|
||||||
// Test for rotate property serialization.
|
);
|
||||||
[
|
|
||||||
[" 90deg ", "90deg"],
|
|
||||||
[" 100grad ", "100grad"],
|
|
||||||
[" 100gRaD ", "100grad"],
|
|
||||||
[" 0.25turn ", "0.25turn"],
|
|
||||||
[" 0.25tUrN ", "0.25turn"],
|
|
||||||
[" 1.57RaD ", "1.57rad"],
|
|
||||||
].forEach(function(arr) {
|
|
||||||
document.documentElement.style.rotate = arr[0];
|
|
||||||
is(document.documentElement.style.rotate, arr[1],
|
|
||||||
"bug-1207734: incorrect rotate serialization");
|
|
||||||
});
|
|
||||||
document.documentElement.style.rotate = "";
|
|
||||||
|
|
||||||
// Test for translate property serialization.
|
|
||||||
[
|
|
||||||
[" 50% 5px 6px ", "50% 5px 6px"],
|
|
||||||
[" 50% 10px 100px ", "50% 10px 100px"],
|
|
||||||
[" 4px 5px ", "4px 5px"],
|
|
||||||
[" 10% 10% 99px ", "10% 10% 99px"],
|
|
||||||
[" 50px ", "50px"],
|
|
||||||
].forEach(function(arr) {
|
|
||||||
document.documentElement.style.translate = arr[0];
|
|
||||||
is(document.documentElement.style.translate, arr[1],
|
|
||||||
"bug-1207734: incorrect translate serialization");
|
|
||||||
});
|
|
||||||
document.documentElement.style.translate = "";
|
|
||||||
|
|
||||||
// Test for scale property serialization.
|
|
||||||
[
|
|
||||||
[" 10 ", "10"],
|
|
||||||
[" 10 20.5 ", "10 20.5"],
|
|
||||||
[" 10 20 30 ", "10 20 30"],
|
|
||||||
].forEach(function(arr) {
|
|
||||||
document.documentElement.style.scale = arr[0];
|
|
||||||
is(document.documentElement.style.scale, arr[1],
|
|
||||||
"bug-1207734: incorrect scale serialization");
|
|
||||||
});
|
|
||||||
document.documentElement.style.scale = "";
|
|
||||||
|
|
||||||
})();
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include "nsCaret.h"
|
#include "nsCaret.h"
|
||||||
#include "nsContentUtils.h"
|
#include "nsContentUtils.h"
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
#include "nsIDOMSVGLength.h"
|
|
||||||
#include "nsISelection.h"
|
#include "nsISelection.h"
|
||||||
#include "nsQuickSort.h"
|
#include "nsQuickSort.h"
|
||||||
#include "SVGObserverUtils.h"
|
#include "SVGObserverUtils.h"
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "nsSVGDisplayableFrame.h"
|
#include "nsSVGDisplayableFrame.h"
|
||||||
#include "mozilla/dom/HTMLCanvasElement.h"
|
#include "mozilla/dom/HTMLCanvasElement.h"
|
||||||
#include "mozilla/dom/IDTracker.h"
|
#include "mozilla/dom/IDTracker.h"
|
||||||
|
#include "mozilla/dom/SVGLengthBinding.h"
|
||||||
#include "mozilla/dom/SVGFilterElement.h"
|
#include "mozilla/dom/SVGFilterElement.h"
|
||||||
#include "SVGObserverUtils.h"
|
#include "SVGObserverUtils.h"
|
||||||
#include "nsSVGFilterFrame.h"
|
#include "nsSVGFilterFrame.h"
|
||||||
|
@ -161,7 +162,7 @@ nsSVGFilterInstance::GetPrimitiveNumber(uint8_t aCtxType, float aValue) const
|
||||||
{
|
{
|
||||||
nsSVGLength2 val;
|
nsSVGLength2 val;
|
||||||
val.Init(aCtxType, 0xff, aValue,
|
val.Init(aCtxType, 0xff, aValue,
|
||||||
nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER);
|
SVGLengthBinding::SVG_LENGTHTYPE_NUMBER);
|
||||||
|
|
||||||
float value;
|
float value;
|
||||||
if (mPrimitiveUnits == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
|
if (mPrimitiveUnits == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) {
|
||||||
|
@ -188,14 +189,14 @@ nsSVGFilterInstance::ConvertLocation(const Point3D& aPoint) const
|
||||||
{
|
{
|
||||||
nsSVGLength2 val[4];
|
nsSVGLength2 val[4];
|
||||||
val[0].Init(SVGContentUtils::X, 0xff, aPoint.x,
|
val[0].Init(SVGContentUtils::X, 0xff, aPoint.x,
|
||||||
nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER);
|
SVGLengthBinding::SVG_LENGTHTYPE_NUMBER);
|
||||||
val[1].Init(SVGContentUtils::Y, 0xff, aPoint.y,
|
val[1].Init(SVGContentUtils::Y, 0xff, aPoint.y,
|
||||||
nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER);
|
SVGLengthBinding::SVG_LENGTHTYPE_NUMBER);
|
||||||
// Dummy width/height values
|
// Dummy width/height values
|
||||||
val[2].Init(SVGContentUtils::X, 0xff, 0,
|
val[2].Init(SVGContentUtils::X, 0xff, 0,
|
||||||
nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER);
|
SVGLengthBinding::SVG_LENGTHTYPE_NUMBER);
|
||||||
val[3].Init(SVGContentUtils::Y, 0xff, 0,
|
val[3].Init(SVGContentUtils::Y, 0xff, 0,
|
||||||
nsIDOMSVGLength::SVG_LENGTHTYPE_NUMBER);
|
SVGLengthBinding::SVG_LENGTHTYPE_NUMBER);
|
||||||
|
|
||||||
gfxRect feArea = nsSVGUtils::GetRelativeRect(mPrimitiveUnits,
|
gfxRect feArea = nsSVGUtils::GetRelativeRect(mPrimitiveUnits,
|
||||||
val, mTargetBBox, mMetrics);
|
val, mTargetBBox, mMetrics);
|
||||||
|
|
|
@ -647,7 +647,7 @@ class LcovFileRewriter(object):
|
||||||
lcov_file.print_file(out_fh, rewrite_source, self.pp_rewriter.rewrite_record)
|
lcov_file.print_file(out_fh, rewrite_source, self.pp_rewriter.rewrite_record)
|
||||||
|
|
||||||
if not found_valid[0]:
|
if not found_valid[0]:
|
||||||
print("WARNING: No valid records found in %s" % in_path)
|
print("WARNING: No valid records found in %s" % in_paths)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -210492,6 +210492,11 @@
|
||||||
{}
|
{}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
"content-security-policy/support/dedicated-worker-helper.js": [
|
||||||
|
[
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
"content-security-policy/support/document-write-alert-fail.js": [
|
"content-security-policy/support/document-write-alert-fail.js": [
|
||||||
[
|
[
|
||||||
{}
|
{}
|
||||||
|
@ -210617,6 +210622,16 @@
|
||||||
{}
|
{}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
"content-security-policy/support/service-worker-helper.js": [
|
||||||
|
[
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"content-security-policy/support/shared-worker-helper.js": [
|
||||||
|
[
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
"content-security-policy/support/siblingPath.js": [
|
"content-security-policy/support/siblingPath.js": [
|
||||||
[
|
[
|
||||||
{}
|
{}
|
||||||
|
@ -305160,6 +305175,30 @@
|
||||||
{}
|
{}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
"content-security-policy/worker-src/dedicated-worker-src-child-fallback.sub.html": [
|
||||||
|
[
|
||||||
|
"/content-security-policy/worker-src/dedicated-worker-src-child-fallback.sub.html",
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"content-security-policy/worker-src/dedicated-worker-src-default-fallback.sub.html": [
|
||||||
|
[
|
||||||
|
"/content-security-policy/worker-src/dedicated-worker-src-default-fallback.sub.html",
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"content-security-policy/worker-src/dedicated-worker-src-script-fallback.sub.html": [
|
||||||
|
[
|
||||||
|
"/content-security-policy/worker-src/dedicated-worker-src-script-fallback.sub.html",
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"content-security-policy/worker-src/dedicated-worker-src-self-fallback.sub.html": [
|
||||||
|
[
|
||||||
|
"/content-security-policy/worker-src/dedicated-worker-src-self-fallback.sub.html",
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
"content-security-policy/worker-src/service-child.https.sub.html": [
|
"content-security-policy/worker-src/service-child.https.sub.html": [
|
||||||
[
|
[
|
||||||
"/content-security-policy/worker-src/service-child.https.sub.html",
|
"/content-security-policy/worker-src/service-child.https.sub.html",
|
||||||
|
@ -305190,6 +305229,30 @@
|
||||||
{}
|
{}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
"content-security-policy/worker-src/service-worker-src-child-fallback.https.sub.html": [
|
||||||
|
[
|
||||||
|
"/content-security-policy/worker-src/service-worker-src-child-fallback.https.sub.html",
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"content-security-policy/worker-src/service-worker-src-default-fallback.https.sub.html": [
|
||||||
|
[
|
||||||
|
"/content-security-policy/worker-src/service-worker-src-default-fallback.https.sub.html",
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"content-security-policy/worker-src/service-worker-src-script-fallback.https.sub.html": [
|
||||||
|
[
|
||||||
|
"/content-security-policy/worker-src/service-worker-src-script-fallback.https.sub.html",
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"content-security-policy/worker-src/service-worker-src-self-fallback.https.sub.html": [
|
||||||
|
[
|
||||||
|
"/content-security-policy/worker-src/service-worker-src-self-fallback.https.sub.html",
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
"content-security-policy/worker-src/shared-child.sub.html": [
|
"content-security-policy/worker-src/shared-child.sub.html": [
|
||||||
[
|
[
|
||||||
"/content-security-policy/worker-src/shared-child.sub.html",
|
"/content-security-policy/worker-src/shared-child.sub.html",
|
||||||
|
@ -305220,6 +305283,30 @@
|
||||||
{}
|
{}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
"content-security-policy/worker-src/shared-worker-src-child-fallback.sub.html": [
|
||||||
|
[
|
||||||
|
"/content-security-policy/worker-src/shared-worker-src-child-fallback.sub.html",
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"content-security-policy/worker-src/shared-worker-src-default-fallback.sub.html": [
|
||||||
|
[
|
||||||
|
"/content-security-policy/worker-src/shared-worker-src-default-fallback.sub.html",
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"content-security-policy/worker-src/shared-worker-src-script-fallback.sub.html": [
|
||||||
|
[
|
||||||
|
"/content-security-policy/worker-src/shared-worker-src-script-fallback.sub.html",
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"content-security-policy/worker-src/shared-worker-src-self-fallback.sub.html": [
|
||||||
|
[
|
||||||
|
"/content-security-policy/worker-src/shared-worker-src-self-fallback.sub.html",
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
"cookie-store/cookieStore_delete_arguments.tentative.window.js": [
|
"cookie-store/cookieStore_delete_arguments.tentative.window.js": [
|
||||||
[
|
[
|
||||||
"/cookie-store/cookieStore_delete_arguments.tentative.window.html",
|
"/cookie-store/cookieStore_delete_arguments.tentative.window.html",
|
||||||
|
@ -412737,6 +412824,10 @@
|
||||||
"06b0c4f4a36a7bd4d323d1920a1a3e2caa9b52dc",
|
"06b0c4f4a36a7bd4d323d1920a1a3e2caa9b52dc",
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
|
"content-security-policy/support/dedicated-worker-helper.js": [
|
||||||
|
"c2ee371b1ca6b56d4579032db79470d38dc7fad9",
|
||||||
|
"support"
|
||||||
|
],
|
||||||
"content-security-policy/support/document-write-alert-fail.js": [
|
"content-security-policy/support/document-write-alert-fail.js": [
|
||||||
"55f9e74adccef83969d5da859a05bf670f711671",
|
"55f9e74adccef83969d5da859a05bf670f711671",
|
||||||
"support"
|
"support"
|
||||||
|
@ -412837,6 +412928,14 @@
|
||||||
"e6e5eb285a3988173c49a116b1ae8a76f9f7ab1a",
|
"e6e5eb285a3988173c49a116b1ae8a76f9f7ab1a",
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
|
"content-security-policy/support/service-worker-helper.js": [
|
||||||
|
"dada4b697830bd56b771e02de8460dffcb3a494e",
|
||||||
|
"support"
|
||||||
|
],
|
||||||
|
"content-security-policy/support/shared-worker-helper.js": [
|
||||||
|
"7e7b17341425d222d440f2f4607ee40ff020efe6",
|
||||||
|
"support"
|
||||||
|
],
|
||||||
"content-security-policy/support/siblingPath.js": [
|
"content-security-policy/support/siblingPath.js": [
|
||||||
"1743309038e2aef21670a82973c1cea2fbc01253",
|
"1743309038e2aef21670a82973c1cea2fbc01253",
|
||||||
"support"
|
"support"
|
||||||
|
@ -412957,6 +413056,22 @@
|
||||||
"ec579a530ae0f44e387ed400d5b923cdb8203dc7",
|
"ec579a530ae0f44e387ed400d5b923cdb8203dc7",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
|
"content-security-policy/worker-src/dedicated-worker-src-child-fallback.sub.html": [
|
||||||
|
"1206a6f00c5cf43da1327625fb7c97ce9f63a868",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
|
"content-security-policy/worker-src/dedicated-worker-src-default-fallback.sub.html": [
|
||||||
|
"abc576c3a0adc9e3a68b5449aeb1477f6b50f6b1",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
|
"content-security-policy/worker-src/dedicated-worker-src-script-fallback.sub.html": [
|
||||||
|
"a5a34c8184397fc38b1949e798f23e0799aade1a",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
|
"content-security-policy/worker-src/dedicated-worker-src-self-fallback.sub.html": [
|
||||||
|
"8fee6e7d738c6cc9a22883cde366e395f346f5d4",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
"content-security-policy/worker-src/service-child.https.sub.html": [
|
"content-security-policy/worker-src/service-child.https.sub.html": [
|
||||||
"0ccf56794d55c4ea8800cbe8f0805fd02450549f",
|
"0ccf56794d55c4ea8800cbe8f0805fd02450549f",
|
||||||
"testharness"
|
"testharness"
|
||||||
|
@ -412977,6 +413092,22 @@
|
||||||
"561c9a2ce0d4c1b9e148cad2ca5bad4b17517e9e",
|
"561c9a2ce0d4c1b9e148cad2ca5bad4b17517e9e",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
|
"content-security-policy/worker-src/service-worker-src-child-fallback.https.sub.html": [
|
||||||
|
"90d70a062e718daf5013f3b12662066b6edb1692",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
|
"content-security-policy/worker-src/service-worker-src-default-fallback.https.sub.html": [
|
||||||
|
"0a115336d748892edd4afc99467ae558080789f4",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
|
"content-security-policy/worker-src/service-worker-src-script-fallback.https.sub.html": [
|
||||||
|
"c770ac48a17b74d54bcde8a8f721fd506da81a6b",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
|
"content-security-policy/worker-src/service-worker-src-self-fallback.https.sub.html": [
|
||||||
|
"ee7276b72994909e0c504f5d3ef0fe526f898e7a",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
"content-security-policy/worker-src/shared-child.sub.html": [
|
"content-security-policy/worker-src/shared-child.sub.html": [
|
||||||
"1bc3004b63255bdb75f6660ab81870d08b96e74c",
|
"1bc3004b63255bdb75f6660ab81870d08b96e74c",
|
||||||
"testharness"
|
"testharness"
|
||||||
|
@ -412997,6 +413128,22 @@
|
||||||
"ff4d7ca289ea20fa00bca535fdcf929876a2278b",
|
"ff4d7ca289ea20fa00bca535fdcf929876a2278b",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
|
"content-security-policy/worker-src/shared-worker-src-child-fallback.sub.html": [
|
||||||
|
"8cc98872cd4fe0ed2e411d74ba4c79684fb1b312",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
|
"content-security-policy/worker-src/shared-worker-src-default-fallback.sub.html": [
|
||||||
|
"7ff188d280b8b5af15da54a75201ed5e68804c42",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
|
"content-security-policy/worker-src/shared-worker-src-script-fallback.sub.html": [
|
||||||
|
"d1a3d6e2848bd03fb46ad4be6e312ddc501e9f5c",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
|
"content-security-policy/worker-src/shared-worker-src-self-fallback.sub.html": [
|
||||||
|
"599143e3733f0ea7dc3cbaa6b03de0a7b8e93acf",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
"cookie-store/OWNERS": [
|
"cookie-store/OWNERS": [
|
||||||
"9e68d9eb0784e10786bd8b0c6009afb42516acdc",
|
"9e68d9eb0784e10786bd8b0c6009afb42516acdc",
|
||||||
"support"
|
"support"
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
var url = new URL("../support/ping.js", document.baseURI).toString();
|
||||||
|
assert_worker_is_loaded(url, document.getElementById("foo").getAttribute("data-desc-fallback"));
|
|
@ -0,0 +1,2 @@
|
||||||
|
var url = new URL("../support/ping.js", document.baseURI).toString();
|
||||||
|
assert_service_worker_is_loaded(url, document.getElementById("foo").getAttribute("data-desc-fallback"));
|
|
@ -0,0 +1,2 @@
|
||||||
|
var url = new URL("../support/ping.js", document.baseURI).toString();
|
||||||
|
assert_shared_worker_is_loaded(url, document.getElementById("foo").getAttribute("data-desc-fallback"));
|
|
@ -0,0 +1,9 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<title>Web platform test for dedicated worker allowed by child-src self</title>
|
||||||
|
<script src=/resources/testharness.js></script>
|
||||||
|
<script src=/resources/testharnessreport.js></script>
|
||||||
|
<script src="../support/testharness-helper.js"></script>
|
||||||
|
<!-- Ideally we would use "script-src 'none'" alone but we have to whitelist the actual script that spawns the workers, hence the nonce.-->
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="child-src 'self'; script-src 'none' 'nonce-foo'; default-src 'none'; ">
|
||||||
|
<script src="../support/dedicated-worker-helper.js" nonce="foo" id="foo" data-desc-fallback="Same-origin dedicated worker allowed by child-src 'self'."></script>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<title>Web platform test for dedicated worker allowed by default-src self</title>
|
||||||
|
<script src=/resources/testharness.js></script>
|
||||||
|
<script src=/resources/testharnessreport.js></script>
|
||||||
|
<script src="../support/testharness-helper.js"></script>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self'">
|
||||||
|
<script src="../support/dedicated-worker-helper.js" id="foo" data-desc-fallback="Same-origin dedicated worker allowed by default-src 'self'."></script>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<title>Web platform test for dedicated worker allowed by script-src self</title>
|
||||||
|
<script src=/resources/testharness.js></script>
|
||||||
|
<script src=/resources/testharnessreport.js></script>
|
||||||
|
<script src="../support/testharness-helper.js"></script>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="script-src 'self'; default-src 'none'; ">
|
||||||
|
<script src="../support/dedicated-worker-helper.js" id="foo" data-desc-fallback="Same-origin dedicated worker allowed by script-src 'self'."></script>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<title>Web platform test for dedicated worker allowed by worker-src self</title>
|
||||||
|
<script src=/resources/testharness.js></script>
|
||||||
|
<script src=/resources/testharnessreport.js></script>
|
||||||
|
<script src="../support/testharness-helper.js"></script>
|
||||||
|
<!-- Ideally we would use "script-src 'none'" alone but we have to whitelist the actual script that spawns the workers, hence the nonce.-->
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="worker-src 'self'; child-src 'none'; script-src 'none' 'nonce-foo'; default-src 'none'; ">
|
||||||
|
<script src="../support/dedicated-worker-helper.js" nonce="foo" id="foo" data-desc-fallback="Same-origin dedicated worker allowed by worker-src 'self'."></script>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<title>Web platform test for service worker allowed by child-src self</title>
|
||||||
|
<script src=/resources/testharness.js></script>
|
||||||
|
<script src=/resources/testharnessreport.js></script>
|
||||||
|
<script src="../support/testharness-helper.js"></script>
|
||||||
|
<!-- Ideally we would use "script-src 'none'" alone but we have to whitelist the actual script that spawns the workers, hence the nonce.-->
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="child-src 'self'; script-src 'none' 'nonce-foo'; default-src 'none'; ">
|
||||||
|
<script src="../support/service-worker-helper.js" nonce="foo" id="foo" data-desc-fallback="Same-origin service worker allowed by child-src 'self'."></script>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset=utf-8>
|
||||||
|
<title>Web platform test for service worker allowed by default-src self</title>
|
||||||
|
<script src=/resources/testharness.js></script>
|
||||||
|
<script src=/resources/testharnessreport.js></script>
|
||||||
|
<script src="../support/testharness-helper.js"></script>
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self'">
|
||||||
|
<script src="../support/service-worker-helper.js" id="foo" data-desc-fallback="Same-origin service worker allowed by default-src 'self'."></script>
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче