Guest User

Untitled

a guest
Aug 20th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.35 KB | None | 0 0
  1. commit 7d810146ed97b38a986d3b9d19870e4d839439cd
  2. Author: Jason Laster <jason.laster.11@gmail.com>
  3. Date: Mon Aug 20 16:54:00 2018 -0400
  4.  
  5. ...
  6.  
  7. diff --git a/assets/images/Svg.js b/assets/images/Svg.js
  8. index de1c776..51cc8ad 100644
  9. --- a/assets/images/Svg.js
  10. +++ b/assets/images/Svg.js
  11. @@ -26,6 +26,7 @@ const svg = {
  12. folder: require("./folder.svg"),
  13. globe: require("./globe.svg"),
  14. home: require("./home.svg"),
  15. + information: require("./information.svg"),
  16. javascript: require("./javascript.svg"),
  17. jquery: require("./jquery.svg"),
  18. underscore: require("./underscore.svg"),
  19. diff --git a/src/components/SecondaryPanes/Scopes.js b/src/components/SecondaryPanes/Scopes.js
  20. index fa83f61..6cc737b 100644
  21. --- a/src/components/SecondaryPanes/Scopes.js
  22. +++ b/src/components/SecondaryPanes/Scopes.js
  23. @@ -22,6 +22,7 @@ import { ObjectInspector } from "devtools-reps";
  24. import type { Pause, Why } from "../../types";
  25. import type { NamedValue } from "../../utils/pause/scopes/types";
  26.  
  27. +import Svg from "../shared/Svg";
  28. import "./Scopes.css";
  29.  
  30. type Props = {
  31. @@ -126,6 +127,19 @@ class Scopes extends PureComponent<Props, State> {
  32. : L10N.getStr("scopes.toggleToOriginal")}
  33. </a>
  34. </div>
  35. +
  36. + <div className="scope-type-toggle">
  37. + <a
  38. + href=""
  39. + onClick={e => {
  40. + e.preventDefault();
  41. + this.setState({ showOriginal: !showOriginal });
  42. + }}
  43. + >
  44. + <Svg name="information" title="..." aria-label="..." />
  45. + Source Maps
  46. + </a>
  47. + </div>
  48. ) : null}
  49. </div>
  50. );
  51. diff --git a/src/components/shared/Svg.css b/src/components/shared/Svg.css
  52. index 15d2801..d8bce15 100644
  53. --- a/src/components/shared/Svg.css
  54. +++ b/src/components/shared/Svg.css
  55. @@ -37,7 +37,8 @@
  56. .worker svg,
  57. .refresh svg,
  58. .shortcut svg,
  59. -.add-button svg {
  60. +.add-button svg,
  61. +.information svg {
  62. width: 15px;
  63. }
  64.  
  65. diff --git a/src/reducers/pause.js b/src/reducers/pause.js
  66. index 502ab39..3f748b1 100644
  67. --- a/src/reducers/pause.js
  68. +++ b/src/reducers/pause.js
  69. @@ -54,7 +54,8 @@ export type PauseState = {
  70. [FrameId]: {
  71. [string]: string | null
  72. }
  73. - }
  74. + },
  75. + mappingsType: "column" | "line" | null
  76. },
  77. selectedFrameId: ?string,
  78. selectedComponentIndex: ?number,
  79. @@ -86,7 +87,8 @@ const emptyPauseState = {
  80. frameScopes: {
  81. generated: {},
  82. original: {},
  83. - mappings: {}
  84. + mappings: {},
  85. + mappingsType: null
  86. },
  87. selectedFrameId: null,
  88. loadedObjects: {},
  89. @@ -168,12 +170,14 @@ function update(
  90. ...state.frameScopes.mappings,
  91. [selectedFrameId]: value && value.mappings
  92. };
  93. +
  94. return {
  95. ...state,
  96. frameScopes: {
  97. ...state.frameScopes,
  98. original,
  99. - mappings
  100. + mappings,
  101. + mappingsType: "column"
  102. }
  103. };
  104. }
  105. diff --git a/src/utils/pause/mapScopes/index.js b/src/utils/pause/mapScopes/index.js
  106. index 1f6fa97..158f4c0 100644
  107. --- a/src/utils/pause/mapScopes/index.js
  108. +++ b/src/utils/pause/mapScopes/index.js
  109. @@ -73,7 +73,7 @@ export async function buildMappedScopes(
  110. );
  111.  
  112. if (originalRanges.every(range => range.columnEnd === Infinity)) {
  113. - return null;
  114. + return { mappingsType: "line" };
  115. }
  116.  
  117. const generatedAstBindings = buildGeneratedBindingList(
Add Comment
Please, Sign In to add comment