Changeset 248590 in webkit


Ignore:
Timestamp:
Aug 12, 2019 8:56:37 PM (5 years ago)
Author:
Devin Rousso
Message:

REGRESSION(r248391): Web Inspector: changing Layout Direction Debug setting no longer adds dir="ltr" to body element
https://bugs.webkit.org/show_bug.cgi?id=200564

Reviewed by Joseph Pecoraro.

WI.resolvedLayoutDirection was called before WI.runBootstrapOperations, which is what
instantiates WI.showDebugUISetting. Without it, WI.resolvedLayoutDirection will ignore
the value of WI.settings.debugLayoutDirection and instead use the system.

Moving the instantiation of WI.showDebugUISetting outside WI.runBootstrapOperations
allows the setting to be created when the Bootstrap.js script is loaded, rather than after
the DOMContentLoaded event is fired. This means that it's guaranteed to exist before any
interface/view code runs.

  • UserInterface/Debug/Bootstrap.js:

(WI.runBootstrapOperations):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r248589 r248590  
     12019-08-12  Devin Rousso  <drousso@apple.com>
     2
     3        REGRESSION(r248391): Web Inspector: changing Layout Direction Debug setting no longer adds dir="ltr" to body element
     4        https://bugs.webkit.org/show_bug.cgi?id=200564
     5
     6        Reviewed by Joseph Pecoraro.
     7
     8        `WI.resolvedLayoutDirection` was called before `WI.runBootstrapOperations`, which is what
     9        instantiates `WI.showDebugUISetting`. Without it, `WI.resolvedLayoutDirection` will ignore
     10        the value of `WI.settings.debugLayoutDirection` and instead use the system.
     11
     12        Moving the instantiation of `WI.showDebugUISetting` outside `WI.runBootstrapOperations`
     13        allows the setting to be created when the Bootstrap.js script is loaded, rather than after
     14        the `DOMContentLoaded` event is fired. This means that it's guaranteed to exist before any
     15        interface/view code runs.
     16
     17        * UserInterface/Debug/Bootstrap.js:
     18        (WI.runBootstrapOperations):
     19
    1202019-08-12  Devin Rousso  <drousso@apple.com>
    221
  • trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.js

    r248391 r248590  
    3838}, WI.settings.engineeringShowInternalScripts);
    3939
     40WI.showDebugUISetting = new WI.Setting("show-debug-ui", false);
     41
    4042// This function is invoked after the inspector has loaded and has a backend target.
    4143WI.runBootstrapOperations = function() {
    42     WI.showDebugUISetting = new WI.Setting("show-debug-ui", false);
    43 
    4444    // Toggle Debug UI setting.
    4545    new WI.KeyboardShortcut(WI.KeyboardShortcut.Modifier.Option | WI.KeyboardShortcut.Modifier.Shift | WI.KeyboardShortcut.Modifier.CommandOrControl, "D", () => {
Note: See TracChangeset for help on using the changeset viewer.