зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to mozilla-inbound
This commit is contained in:
Коммит
77603c4c21
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7676b68b4d32ed13243eeb719188847121bd5611"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="66638d0e65bf58b7f640bcc7bed4a0b23d1356c6"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7676b68b4d32ed13243eeb719188847121bd5611"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="66638d0e65bf58b7f640bcc7bed4a0b23d1356c6"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="7676b68b4d32ed13243eeb719188847121bd5611"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="66638d0e65bf58b7f640bcc7bed4a0b23d1356c6"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="87a2d8ab9248540910e56921654367b78a587095"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7676b68b4d32ed13243eeb719188847121bd5611"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="66638d0e65bf58b7f640bcc7bed4a0b23d1356c6"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="42b31cf3248acf7acd1fd30c7491871c50305fa8"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7676b68b4d32ed13243eeb719188847121bd5611"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="66638d0e65bf58b7f640bcc7bed4a0b23d1356c6"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7676b68b4d32ed13243eeb719188847121bd5611"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="66638d0e65bf58b7f640bcc7bed4a0b23d1356c6"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="7676b68b4d32ed13243eeb719188847121bd5611"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="66638d0e65bf58b7f640bcc7bed4a0b23d1356c6"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="87a2d8ab9248540910e56921654367b78a587095"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7676b68b4d32ed13243eeb719188847121bd5611"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="66638d0e65bf58b7f640bcc7bed4a0b23d1356c6"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"git": {
|
||||
"git_revision": "7676b68b4d32ed13243eeb719188847121bd5611",
|
||||
"git_revision": "66638d0e65bf58b7f640bcc7bed4a0b23d1356c6",
|
||||
"remote": "https://git.mozilla.org/releases/gaia.git",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "52155d52c8270011caa3409791eb4f5dc3e8315a",
|
||||
"revision": "f99acf8fe79c200c9456000e8651e48be96a8bc0",
|
||||
"repo_path": "integration/gaia-central"
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7676b68b4d32ed13243eeb719188847121bd5611"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="66638d0e65bf58b7f640bcc7bed4a0b23d1356c6"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="42b31cf3248acf7acd1fd30c7491871c50305fa8"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="7676b68b4d32ed13243eeb719188847121bd5611"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="66638d0e65bf58b7f640bcc7bed4a0b23d1356c6"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c490ae41c67f892232599f4ef049467a922b613e"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
|
|
@ -3,11 +3,6 @@
|
|||
* 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/. */
|
||||
%endif
|
||||
%filter substitution
|
||||
%define smallSeparatorDark linear-gradient(transparent 15%, #5a6169 15%, #5a6169 85%, transparent 85%)
|
||||
%define smallSeparatorLight linear-gradient(transparent 15%, #aaa 15%, #aaa 85%, transparent 85%)
|
||||
%define solidSeparatorDark linear-gradient(#2d5b7d, #2d5b7d)
|
||||
%define solidSeparatorLight linear-gradient(#aaa, #aaa)
|
||||
|
||||
/* CSS Variables specific to the devtools toolbar that aren't defined by the themes */
|
||||
.theme-light {
|
||||
|
@ -554,73 +549,57 @@
|
|||
text-shadow: none;
|
||||
}
|
||||
|
||||
.devtools-sidebar-tabs tabs > tab {
|
||||
border-image: linear-gradient(transparent 15%, var(--theme-splitter-color) 15%, var(--theme-splitter-color) 85%, transparent 85%) 1 1;
|
||||
}
|
||||
|
||||
.devtools-sidebar-tabs tabs > tab[selected],
|
||||
.devtools-sidebar-tabs tabs > tab[selected] + tab {
|
||||
border-image: linear-gradient(var(--theme-splitter-color), var(--theme-splitter-color)) 1 1;
|
||||
}
|
||||
|
||||
.devtools-sidebar-tabs tabs > tab:first-child {
|
||||
-moz-border-start-width: 0;
|
||||
}
|
||||
|
||||
.theme-dark .devtools-sidebar-tabs tabs > tab {
|
||||
border-image: @smallSeparatorDark@ 1 1;
|
||||
}
|
||||
|
||||
.theme-dark .devtools-sidebar-tabs tabs > tab:hover {
|
||||
background: hsla(206,37%,4%,.2);
|
||||
border-image: @smallSeparatorDark@ 1 1;
|
||||
}
|
||||
|
||||
.theme-dark .devtools-sidebar-tabs tabs > tab:hover:active {
|
||||
background: hsla(206,37%,4%,.4);
|
||||
border-image: @smallSeparatorDark@ 1 1;
|
||||
}
|
||||
|
||||
.theme-dark .devtools-sidebar-tabs tabs > tab[selected] + tab {
|
||||
border-image: @solidSeparatorDark@ 1 1;
|
||||
}
|
||||
|
||||
.theme-dark .devtools-sidebar-tabs tabs > tab[selected] + tab:hover {
|
||||
background: hsla(206,37%,4%,.2);
|
||||
border-image: @solidSeparatorDark@ 1 1;
|
||||
}
|
||||
|
||||
.theme-dark .devtools-sidebar-tabs tabs > tab[selected] + tab:hover:active {
|
||||
background: hsla(206,37%,4%,.4);
|
||||
border-image: @solidSeparatorDark@ 1 1;
|
||||
}
|
||||
|
||||
.theme-dark .devtools-sidebar-tabs tabs > tab[selected],
|
||||
.theme-dark .devtools-sidebar-tabs tabs > tab[selected]:hover:active {
|
||||
color: var(--theme-selection-color);
|
||||
background: #1d4f73;
|
||||
border-image: @solidSeparatorDark@ 1 1;
|
||||
}
|
||||
|
||||
.theme-light .devtools-sidebar-tabs tabs > tab {
|
||||
border-image: @smallSeparatorLight@ 1 1;
|
||||
}
|
||||
|
||||
.theme-light .devtools-sidebar-tabs tabs > tab:hover {
|
||||
background: #ddd;
|
||||
border-image: @smallSeparatorLight@ 1 1;
|
||||
}
|
||||
|
||||
.theme-light .devtools-sidebar-tabs tabs > tab:hover:active {
|
||||
background: #ddd;
|
||||
border-image: @smallSeparatorLight@ 1 1;
|
||||
}
|
||||
|
||||
.theme-light .devtools-sidebar-tabs tabs > tab[selected] + tab {
|
||||
border-image: @solidSeparatorLight@;
|
||||
}
|
||||
|
||||
.theme-light .devtools-sidebar-tabs tabs > tab[selected] + tab:hover {
|
||||
background: #ddd;
|
||||
border-image: @solidSeparatorLight@;
|
||||
}
|
||||
|
||||
.theme-light .devtools-sidebar-tabs tabs > tab[selected],
|
||||
.theme-light .devtools-sidebar-tabs tabs > tab[selected]:hover:active {
|
||||
color: var(--theme-selection-color);
|
||||
background: #4c9ed9;
|
||||
border-image: @solidSeparatorLight@;
|
||||
}
|
||||
|
||||
/* Toolbox - moved from toolbox.css.
|
||||
|
|
|
@ -1751,40 +1751,6 @@ nsListControlFrame::GetIndexFromDOMEvent(nsIDOMEvent* aMouseEvent,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
int32_t numOptions = GetNumberOfOptions();
|
||||
if (numOptions < 1)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsPoint pt = nsLayoutUtils::GetDOMEventCoordinatesRelativeTo(aMouseEvent, this);
|
||||
|
||||
// If the event coordinate is above the first option frame, then target the
|
||||
// first option frame
|
||||
nsRefPtr<dom::HTMLOptionElement> firstOption = GetOption(0);
|
||||
NS_ASSERTION(firstOption, "Can't find first option that's supposed to be there");
|
||||
nsIFrame* optionFrame = firstOption->GetPrimaryFrame();
|
||||
if (optionFrame) {
|
||||
nsPoint ptInOptionFrame = pt - optionFrame->GetOffsetTo(this);
|
||||
if (ptInOptionFrame.y < 0 && ptInOptionFrame.x >= 0 &&
|
||||
ptInOptionFrame.x < optionFrame->GetSize().width) {
|
||||
aCurIndex = 0;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
nsRefPtr<dom::HTMLOptionElement> lastOption = GetOption(numOptions - 1);
|
||||
// If the event coordinate is below the last option frame, then target the
|
||||
// last option frame
|
||||
NS_ASSERTION(lastOption, "Can't find last option that's supposed to be there");
|
||||
optionFrame = lastOption->GetPrimaryFrame();
|
||||
if (optionFrame) {
|
||||
nsPoint ptInOptionFrame = pt - optionFrame->GetOffsetTo(this);
|
||||
if (ptInOptionFrame.y >= optionFrame->GetSize().height && ptInOptionFrame.x >= 0 &&
|
||||
ptInOptionFrame.x < optionFrame->GetSize().width) {
|
||||
aCurIndex = numOptions - 1;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ public class FindInPageBar extends LinearLayout implements TextWatcher, View.OnC
|
|||
}
|
||||
|
||||
public void hide() {
|
||||
if (!mInflated) {
|
||||
if (!mInflated || getVisibility() == View.GONE) {
|
||||
// There's nothing to hide yet.
|
||||
return;
|
||||
}
|
||||
|
@ -104,8 +104,13 @@ public class FindInPageBar extends LinearLayout implements TextWatcher, View.OnC
|
|||
// Always clear the Find string, primarily for privacy.
|
||||
mFindText.setText("");
|
||||
|
||||
// Only close the IMM if its EditText is the one with focus.
|
||||
if (mFindText.isFocused()) {
|
||||
getInputMethodManager(mFindText).hideSoftInputFromWindow(mFindText.getWindowToken(), 0);
|
||||
}
|
||||
|
||||
// Close the FIPB / FindHelper state.
|
||||
setVisibility(GONE);
|
||||
getInputMethodManager(mFindText).hideSoftInputFromWindow(mFindText.getWindowToken(), 0);
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("FindInPage:Closed", null));
|
||||
}
|
||||
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 807 B |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.0 KiB |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.6 KiB |
|
@ -267,7 +267,7 @@ public class CommandProcessor {
|
|||
final NotificationManager notificationManager = (NotificationManager) context.getSystemService(ns);
|
||||
|
||||
// Create a Notification.
|
||||
final int icon = R.drawable.icon;
|
||||
final int icon = R.drawable.flat_icon;
|
||||
String notificationTitle = context.getString(R.string.sync_new_tab);
|
||||
if (title != null) {
|
||||
notificationTitle = notificationTitle.concat(": " + title);
|
||||
|
|
|
@ -92,7 +92,6 @@ class CommandAction(argparse.Action):
|
|||
elif values:
|
||||
command = values[0].lower()
|
||||
args = values[1:]
|
||||
|
||||
if command == 'help':
|
||||
if args and args[0] not in ['-h', '--help']:
|
||||
# Make sure args[0] is indeed a command.
|
||||
|
@ -102,8 +101,17 @@ class CommandAction(argparse.Action):
|
|||
sys.exit(0)
|
||||
elif '-h' in args or '--help' in args:
|
||||
# -h or --help is in the command arguments.
|
||||
self._handle_command_help(parser, command)
|
||||
sys.exit(0)
|
||||
if '--' in args:
|
||||
# -- is in command arguments
|
||||
if '-h' in args[:args.index('--')] or '--help' in args[:args.index('--')]:
|
||||
# Honor -h or --help only if it appears before --
|
||||
self._handle_main_help(parser, command)
|
||||
sys.exit(0)
|
||||
else:
|
||||
self._handle_main_help(parser, command)
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
else:
|
||||
raise NoCommandError()
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ function runTests()
|
|||
synthesizeMouse(document.getElementById("option3"), 2, 2, { type: "mousedown" });
|
||||
synthesizeMouse(document.getElementById("option3"), 2, 1000, { type: "mousemove" });
|
||||
var select = document.getElementById("select");
|
||||
is(select.selectedIndex, 9, "scroll select");
|
||||
is(select.selectedIndex, 2, "scroll select");
|
||||
synthesizeMouse(document.getElementById("select"), 2, 2, { type: "mouseup" });
|
||||
|
||||
synthesizeMouse(custom, 2, 2, { type: "mousedown" });
|
||||
|
|
|
@ -355,25 +355,45 @@ define('source-map/source-map-consumer', ['require', 'exports', 'module' , 'sou
|
|||
function SourceMapConsumer_fromSourceMap(aSourceMap) {
|
||||
var smc = Object.create(BasicSourceMapConsumer.prototype);
|
||||
|
||||
smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
|
||||
smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
|
||||
var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
|
||||
var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
|
||||
smc.sourceRoot = aSourceMap._sourceRoot;
|
||||
smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
|
||||
smc.sourceRoot);
|
||||
smc.file = aSourceMap._file;
|
||||
|
||||
smc.__generatedMappings = aSourceMap._mappings.toArray().slice();
|
||||
smc.__originalMappings = aSourceMap._mappings.toArray().slice().sort();
|
||||
// Because we are modifying the entries (by converting string sources and
|
||||
// names to indices into the sources and names ArraySets), we have to make
|
||||
// a copy of the entry or else bad things happen. Shared mutable state
|
||||
// strikes again! See github issue #191.
|
||||
|
||||
smc.__generatedMappings.forEach(function (m) {
|
||||
if (m.source !== null) {
|
||||
m.source = smc._sources.indexOf(m.source);
|
||||
var generatedMappings = aSourceMap._mappings.toArray().slice();
|
||||
var destGeneratedMappings = smc.__generatedMappings = [];
|
||||
var destOriginalMappings = smc.__originalMappings = [];
|
||||
|
||||
if (m.name !== null) {
|
||||
m.name = smc._names.indexOf(m.name);
|
||||
for (var i = 0, length = generatedMappings.length; i < length; i++) {
|
||||
var srcMapping = generatedMappings[i];
|
||||
var destMapping = new Mapping;
|
||||
destMapping.generatedLine = srcMapping.generatedLine;
|
||||
destMapping.generatedColumn = srcMapping.generatedColumn;
|
||||
|
||||
if (srcMapping.source) {
|
||||
destMapping.source = sources.indexOf(srcMapping.source);
|
||||
destMapping.originalLine = srcMapping.originalLine;
|
||||
destMapping.originalColumn = srcMapping.originalColumn;
|
||||
|
||||
if (srcMapping.name) {
|
||||
destMapping.name = names.indexOf(srcMapping.name);
|
||||
}
|
||||
|
||||
destOriginalMappings.push(destMapping);
|
||||
}
|
||||
});
|
||||
|
||||
destGeneratedMappings.push(destMapping);
|
||||
}
|
||||
|
||||
quickSort(smc.__originalMappings, util.compareByOriginalPositions);
|
||||
|
||||
return smc;
|
||||
};
|
||||
|
||||
|
@ -507,7 +527,7 @@ define('source-map/source-map-consumer', ['require', 'exports', 'module' , 'sou
|
|||
}
|
||||
}
|
||||
|
||||
quickSort(generatedMappings, util.compareByGeneratedPositions);
|
||||
quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
|
||||
this.__generatedMappings = generatedMappings;
|
||||
|
||||
quickSort(originalMappings, util.compareByOriginalPositions);
|
||||
|
@ -597,7 +617,7 @@ define('source-map/source-map-consumer', ['require', 'exports', 'module' , 'sou
|
|||
this._generatedMappings,
|
||||
"generatedLine",
|
||||
"generatedColumn",
|
||||
util.compareByGeneratedPositions,
|
||||
util.compareByGeneratedPositionsDeflated,
|
||||
util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
|
||||
);
|
||||
|
||||
|
@ -1066,7 +1086,7 @@ define('source-map/source-map-consumer', ['require', 'exports', 'module' , 'sou
|
|||
};
|
||||
};
|
||||
|
||||
quickSort(this.__generatedMappings, util.compareByGeneratedPositions);
|
||||
quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
|
||||
quickSort(this.__originalMappings, util.compareByOriginalPositions);
|
||||
};
|
||||
|
||||
|
@ -1355,15 +1375,15 @@ define('source-map/util', ['require', 'exports', 'module' , ], function(require,
|
|||
exports.compareByOriginalPositions = compareByOriginalPositions;
|
||||
|
||||
/**
|
||||
* Comparator between two mappings where the generated positions are
|
||||
* compared.
|
||||
* Comparator between two mappings with deflated source and name indices where
|
||||
* the generated positions are compared.
|
||||
*
|
||||
* Optionally pass in `true` as `onlyCompareGenerated` to consider two
|
||||
* mappings with the same generated line and column, but different
|
||||
* source/name/original line and column the same. Useful when searching for a
|
||||
* mapping with a stubbed out mapping.
|
||||
*/
|
||||
function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) {
|
||||
function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
|
||||
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
||||
if (cmp !== 0) {
|
||||
return cmp;
|
||||
|
@ -1391,7 +1411,53 @@ define('source-map/util', ['require', 'exports', 'module' , ], function(require,
|
|||
|
||||
return mappingA.name - mappingB.name;
|
||||
};
|
||||
exports.compareByGeneratedPositions = compareByGeneratedPositions;
|
||||
exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
|
||||
|
||||
function strcmp(aStr1, aStr2) {
|
||||
if (aStr1 === aStr2) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (aStr1 > aStr2) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Comparator between two mappings with inflated source and name strings where
|
||||
* the generated positions are compared.
|
||||
*/
|
||||
function compareByGeneratedPositionsInflated(mappingA, mappingB) {
|
||||
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
||||
if (cmp !== 0) {
|
||||
return cmp;
|
||||
}
|
||||
|
||||
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
||||
if (cmp !== 0) {
|
||||
return cmp;
|
||||
}
|
||||
|
||||
cmp = strcmp(mappingA.source, mappingB.source);
|
||||
if (cmp !== 0) {
|
||||
return cmp;
|
||||
}
|
||||
|
||||
cmp = mappingA.originalLine - mappingB.originalLine;
|
||||
if (cmp !== 0) {
|
||||
return cmp;
|
||||
}
|
||||
|
||||
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
||||
if (cmp !== 0) {
|
||||
return cmp;
|
||||
}
|
||||
|
||||
return strcmp(mappingA.name, mappingB.name);
|
||||
};
|
||||
exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
|
||||
|
||||
});
|
||||
/* -*- Mode: js; js-indent-level: 2; -*- */
|
||||
|
@ -2238,7 +2304,6 @@ define('source-map/source-map-generator', ['require', 'exports', 'module' , 'so
|
|||
var mapping;
|
||||
|
||||
var mappings = this._mappings.toArray();
|
||||
|
||||
for (var i = 0, len = mappings.length; i < len; i++) {
|
||||
mapping = mappings[i];
|
||||
|
||||
|
@ -2251,7 +2316,7 @@ define('source-map/source-map-generator', ['require', 'exports', 'module' , 'so
|
|||
}
|
||||
else {
|
||||
if (i > 0) {
|
||||
if (!util.compareByGeneratedPositions(mapping, mappings[i - 1])) {
|
||||
if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
|
||||
continue;
|
||||
}
|
||||
result += ',';
|
||||
|
@ -2360,7 +2425,7 @@ define('source-map/mapping-list', ['require', 'exports', 'module' , 'source-map
|
|||
var columnA = mappingA.generatedColumn;
|
||||
var columnB = mappingB.generatedColumn;
|
||||
return lineB > lineA || lineB == lineA && columnB >= columnA ||
|
||||
util.compareByGeneratedPositions(mappingA, mappingB) <= 0;
|
||||
util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2413,7 +2478,7 @@ define('source-map/mapping-list', ['require', 'exports', 'module' , 'source-map
|
|||
*/
|
||||
MappingList.prototype.toArray = function MappingList_toArray() {
|
||||
if (!this._sorted) {
|
||||
this._array.sort(util.compareByGeneratedPositions);
|
||||
this._array.sort(util.compareByGeneratedPositionsInflated);
|
||||
this._sorted = true;
|
||||
}
|
||||
return this._array;
|
||||
|
|
|
@ -652,15 +652,15 @@ define('lib/source-map/util', ['require', 'exports', 'module' , ], function(requ
|
|||
exports.compareByOriginalPositions = compareByOriginalPositions;
|
||||
|
||||
/**
|
||||
* Comparator between two mappings where the generated positions are
|
||||
* compared.
|
||||
* Comparator between two mappings with deflated source and name indices where
|
||||
* the generated positions are compared.
|
||||
*
|
||||
* Optionally pass in `true` as `onlyCompareGenerated` to consider two
|
||||
* mappings with the same generated line and column, but different
|
||||
* source/name/original line and column the same. Useful when searching for a
|
||||
* mapping with a stubbed out mapping.
|
||||
*/
|
||||
function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) {
|
||||
function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
|
||||
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
||||
if (cmp !== 0) {
|
||||
return cmp;
|
||||
|
@ -688,7 +688,53 @@ define('lib/source-map/util', ['require', 'exports', 'module' , ], function(requ
|
|||
|
||||
return mappingA.name - mappingB.name;
|
||||
};
|
||||
exports.compareByGeneratedPositions = compareByGeneratedPositions;
|
||||
exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
|
||||
|
||||
function strcmp(aStr1, aStr2) {
|
||||
if (aStr1 === aStr2) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (aStr1 > aStr2) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Comparator between two mappings with inflated source and name strings where
|
||||
* the generated positions are compared.
|
||||
*/
|
||||
function compareByGeneratedPositionsInflated(mappingA, mappingB) {
|
||||
var cmp = mappingA.generatedLine - mappingB.generatedLine;
|
||||
if (cmp !== 0) {
|
||||
return cmp;
|
||||
}
|
||||
|
||||
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
||||
if (cmp !== 0) {
|
||||
return cmp;
|
||||
}
|
||||
|
||||
cmp = strcmp(mappingA.source, mappingB.source);
|
||||
if (cmp !== 0) {
|
||||
return cmp;
|
||||
}
|
||||
|
||||
cmp = mappingA.originalLine - mappingB.originalLine;
|
||||
if (cmp !== 0) {
|
||||
return cmp;
|
||||
}
|
||||
|
||||
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
||||
if (cmp !== 0) {
|
||||
return cmp;
|
||||
}
|
||||
|
||||
return strcmp(mappingA.name, mappingB.name);
|
||||
};
|
||||
exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
|
||||
|
||||
});
|
||||
/* -*- Mode: js; js-indent-level: 2; -*- */
|
||||
|
|
|
@ -1062,6 +1062,30 @@ define("test/source-map/test-source-map-consumer", ["require", "exports", "modul
|
|||
assert.equal(pos.column, 4);
|
||||
};
|
||||
|
||||
exports['test issue #191'] = function (assert, util) {
|
||||
var generator = new SourceMapGenerator({ file: 'a.css' });
|
||||
generator.addMapping({
|
||||
source: 'b.css',
|
||||
original: {
|
||||
line: 1,
|
||||
column: 0
|
||||
},
|
||||
generated: {
|
||||
line: 1,
|
||||
column: 0
|
||||
}
|
||||
});
|
||||
|
||||
// Create a SourceMapConsumer from the SourceMapGenerator, ...
|
||||
var consumer = SourceMapConsumer.fromSourceMap(generator);
|
||||
// ... and then try and use the SourceMapGenerator again. This should not
|
||||
// throw.
|
||||
generator.toJSON();
|
||||
|
||||
assert.ok(true, "Using a SourceMapGenerator again after creating a " +
|
||||
"SourceMapConsumer from it should not throw");
|
||||
};
|
||||
|
||||
});
|
||||
function run_test() {
|
||||
runSourceMapTests('test/source-map/test-source-map-consumer', do_throw);
|
||||
|
|
|
@ -723,6 +723,30 @@ define("test/source-map/test-source-map-generator", ["require", "exports", "modu
|
|||
|
||||
util.assertEqualMaps(assert, map1.toJSON(), expectedMap.toJSON());
|
||||
};
|
||||
|
||||
exports['test issue #192'] = function (assert, util) {
|
||||
var generator = new SourceMapGenerator();
|
||||
generator.addMapping({
|
||||
source: 'a.js',
|
||||
generated: { line: 1, column: 10 },
|
||||
original: { line: 1, column: 10 },
|
||||
});
|
||||
generator.addMapping({
|
||||
source: 'b.js',
|
||||
generated: { line: 1, column: 10 },
|
||||
original: { line: 2, column: 20 },
|
||||
});
|
||||
|
||||
var consumer = new SourceMapConsumer(generator.toJSON());
|
||||
|
||||
var n = 0;
|
||||
consumer.eachMapping(function () { n++ });
|
||||
|
||||
assert.equal(n, 2,
|
||||
"Should not de-duplicate mappings that have the same " +
|
||||
"generated positions, but different original positions.");
|
||||
};
|
||||
|
||||
});
|
||||
function run_test() {
|
||||
runSourceMapTests('test/source-map/test-source-map-generator', do_throw);
|
||||
|
|
Загрузка…
Ссылка в новой задаче