Changeset 269201 in webkit


Ignore:
Timestamp:
Oct 30, 2020 11:06:27 AM (21 months ago)
Author:
Nikita Vasilyev
Message:

Web Inspector: Extra closing parenthesis added after var in styles panel
https://bugs.webkit.org/show_bug.cgi?id=218295
<rdar://problem/70771314>

Reviewed by Devin Rousso.

  • UserInterface/Views/SpreadsheetStyleProperty.js:

(WI.SpreadsheetStyleProperty.prototype._addVariableTokens):
Remove contents.push(token) which was adding ). The closing parenthesis that was already
included in rawTokens above.
Drive-by: rawTokens.slice() should never include i as the 2nd argument. i is an index of an item
in the tokens - a different array.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r269175 r269201  
     12020-10-30  Nikita Vasilyev  <nvasilyev@apple.com>
     2
     3        Web Inspector: Extra closing parenthesis added after var in styles panel
     4        https://bugs.webkit.org/show_bug.cgi?id=218295
     5        <rdar://problem/70771314>
     6
     7        Reviewed by Devin Rousso.
     8
     9        * UserInterface/Views/SpreadsheetStyleProperty.js:
     10        (WI.SpreadsheetStyleProperty.prototype._addVariableTokens):
     11        Remove `contents.push(token)` which was adding `)`. The closing parenthesis that was already
     12        included in rawTokens above.
     13        Drive-by: rawTokens.slice() should never include `i` as the 2nd argument. `i` is an index of an item
     14        in the `tokens` - a different array.
     15
    1162020-10-29  Federico Bucchi  <fbucchi@apple.com>
    217
  • trunk/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js

    r268929 r269201  
    815815                        contents.pushAll(rawTokens.slice(variableNameIndex + 1, fallbackStartIndex));
    816816
    817                         let fallbackTokens = rawTokens.slice(fallbackStartIndex, i);
     817                        let fallbackTokens = rawTokens.slice(fallbackStartIndex);
    818818                        fallbackTokens = this._addBoxShadowTokens(fallbackTokens);
    819819                        fallbackTokens = this._addGradientTokens(fallbackTokens);
     
    824824                        contents.pushAll(fallbackTokens);
    825825                    } else
    826                         contents.pushAll(rawTokens.slice(variableNameIndex + 1, i));
    827                     contents.push(token);
     826                        contents.pushAll(rawTokens.slice(variableNameIndex + 1));
    828827
    829828                    let text = rawTokens.reduce((accumulator, token) => accumulator + token.value, "");
Note: See TracChangeset for help on using the changeset viewer.