⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 176488 in webkit


Ignore:
Timestamp:
Nov 21, 2014, 4:59:27 PM (12 years ago)
Author:
Alan Bujtas
Message:

Simple line layout: Add "show simple line layout debug borders" setting to MiniBrowser.
https://bugs.webkit.org/show_bug.cgi?id=138981

Reviewed by Simon Fraser.

Source/WebKit/mac:

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences simpleLineLayoutDebugBordersEnabled]):
(-[WebPreferences setSimpleLineLayoutDebugBordersEnabled:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit2:

  • UIProcess/API/Cocoa/WKPreferences.mm:

(-[WKPreferences _simpleLineLayoutDebugBordersEnabled]):
(-[WKPreferences _setSimpleLineLayoutDebugBordersEnabled:]):

  • UIProcess/API/Cocoa/WKPreferencesPrivate.h:

Tools:

  • MiniBrowser/mac/SettingsController.h:
  • MiniBrowser/mac/SettingsController.m:

(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController toggleSimpleLineLayoutDebugBordersEnabled:]):
(-[SettingsController simpleLineLayoutDebugBordersEnabled]):

  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController didChangeSettings]):

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController didChangeSettings]):

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/mac/ChangeLog

    r176477 r176488  
     12014-11-21  Zalan Bujtas  <zalan@apple.com>
     2
     3        Simple line layout: Add "show simple line layout debug borders" setting to MiniBrowser.
     4        https://bugs.webkit.org/show_bug.cgi?id=138981
     5
     6        Reviewed by Simon Fraser.
     7
     8        * WebView/WebPreferenceKeysPrivate.h:
     9        * WebView/WebPreferences.mm:
     10        (+[WebPreferences initialize]):
     11        (-[WebPreferences simpleLineLayoutDebugBordersEnabled]):
     12        (-[WebPreferences setSimpleLineLayoutDebugBordersEnabled:]):
     13        * WebView/WebPreferencesPrivate.h:
     14        * WebView/WebView.mm:
     15        (-[WebView _preferencesChanged:]):
     16
    1172014-11-21  Tim Horton  <timothy_horton@apple.com>
    218
  • trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h

    r176297 r176488  
    105105#define WebKitCSSCompositingEnabledPreferenceKey @"WebKitCSSCompositingEnabled"
    106106#define WebKitShowDebugBordersPreferenceKey @"WebKitShowDebugBorders"
     107#define WebKitSimpleLineLayoutDebugBordersEnabledPreferenceKey @"WebKitSimpleLineLayoutDebugBordersEnabled"
    107108#define WebKitShowRepaintCounterPreferenceKey @"WebKitShowRepaintCounter"
    108109#define WebKitWebAudioEnabledPreferenceKey @"WebKitWebAudioEnabled"
  • trunk/Source/WebKit/mac/WebView/WebPreferences.mm

    r176297 r176488  
    495495#endif
    496496        [NSNumber numberWithBool:NO],   WebKitShowDebugBordersPreferenceKey,
     497        [NSNumber numberWithBool:NO],   WebKitSimpleLineLayoutDebugBordersEnabledPreferenceKey,
    497498        [NSNumber numberWithBool:NO],   WebKitShowRepaintCounterPreferenceKey,
    498499        [NSNumber numberWithBool:YES],  WebKitWebGLEnabledPreferenceKey,
     
    18541855{
    18551856    [self _setBoolValue:enabled forKey:WebKitShowDebugBordersPreferenceKey];
     1857}
     1858
     1859- (BOOL)simpleLineLayoutDebugBordersEnabled
     1860{
     1861    return [self _boolValueForKey:WebKitSimpleLineLayoutDebugBordersEnabledPreferenceKey];
     1862}
     1863
     1864- (void)setSimpleLineLayoutDebugBordersEnabled:(BOOL)enabled
     1865{
     1866    [self _setBoolValue:enabled forKey:WebKitSimpleLineLayoutDebugBordersEnabledPreferenceKey];
    18561867}
    18571868
  • trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h

    r176297 r176488  
    212212- (void)setShowDebugBorders:(BOOL)show;
    213213
     214- (BOOL)simpleLineLayoutDebugBordersEnabled;
     215- (void)setSimpleLineLayoutDebugBordersEnabled:(BOOL)enabled;
     216
    214217- (BOOL)showRepaintCounter;
    215218- (void)setShowRepaintCounter:(BOOL)show;
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r176450 r176488  
    22372237    settings.setCanvasUsesAcceleratedDrawing([preferences canvasUsesAcceleratedDrawing]);   
    22382238    settings.setShowDebugBorders([preferences showDebugBorders]);
     2239    settings.setSimpleLineLayoutDebugBordersEnabled([preferences simpleLineLayoutDebugBordersEnabled]);
    22392240    settings.setShowRepaintCounter([preferences showRepaintCounter]);
    22402241    settings.setWebGLEnabled([preferences webGLEnabled]);
  • trunk/Source/WebKit2/ChangeLog

    r176487 r176488  
     12014-11-21  Zalan Bujtas  <zalan@apple.com>
     2
     3        Simple line layout: Add "show simple line layout debug borders" setting to MiniBrowser.
     4        https://bugs.webkit.org/show_bug.cgi?id=138981
     5
     6        Reviewed by Simon Fraser.
     7
     8        * UIProcess/API/Cocoa/WKPreferences.mm:
     9        (-[WKPreferences _simpleLineLayoutDebugBordersEnabled]):
     10        (-[WKPreferences _setSimpleLineLayoutDebugBordersEnabled:]):
     11        * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
     12
    1132014-11-21  Eric Carlson  <eric.carlson@apple.com>
    214
  • trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h

    r176297 r176488  
    187187    macro(ThreadedScrollingEnabled, threadedScrollingEnabled, Bool, bool, true) \
    188188    macro(SimpleLineLayoutEnabled, simpleLineLayoutEnabled, Bool, bool, true) \
    189     macro(SimpleLineLayoutDebugBordersEnabled, simpleLineLayoutDebugBordersEnabled, Bool, bool, false) \
    190189    macro(SubpixelCSSOMElementMetricsEnabled, subpixelCSSOMElementMetricsEnabled, Bool, bool, false) \
    191190    macro(BackgroundShouldExtendBeyondPage, backgroundShouldExtendBeyondPage, Bool, bool, false) \
     
    236235    macro(CompositingRepaintCountersVisible, compositingRepaintCountersVisible, Bool, bool, false) \
    237236    macro(TiledScrollingIndicatorVisible, tiledScrollingIndicatorVisible, Bool, bool, false) \
     237    macro(SimpleLineLayoutDebugBordersEnabled, simpleLineLayoutDebugBordersEnabled, Bool, bool, false) \
    238238    macro(LogsPageMessagesToSystemConsoleEnabled, logsPageMessagesToSystemConsoleEnabled, Bool, bool, false) \
    239239    \
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm

    r175494 r176488  
    214214}
    215215
     216- (BOOL)_simpleLineLayoutDebugBordersEnabled
     217{
     218    return _preferences->simpleLineLayoutDebugBordersEnabled();
     219}
     220
     221- (void)_setSimpleLineLayoutDebugBordersEnabled:(BOOL)simpleLineLayoutDebugBordersEnabled
     222{
     223    _preferences->setSimpleLineLayoutDebugBordersEnabled(simpleLineLayoutDebugBordersEnabled);
     224}
     225
    216226- (BOOL)_developerExtrasEnabled
    217227{
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h

    r175494 r176488  
    5353@property (nonatomic, setter=_setTiledScrollingIndicatorVisible:) BOOL _tiledScrollingIndicatorVisible;
    5454@property (nonatomic, setter=_setVisibleDebugOverlayRegions:) _WKDebugOverlayRegions _visibleDebugOverlayRegions;
     55@property (nonatomic, setter=_setSimpleLineLayoutDebugBordersEnabled:) BOOL _simpleLineLayoutDebugBordersEnabled;
    5556
    5657@property (nonatomic, setter=_setDeveloperExtrasEnabled:) BOOL _developerExtrasEnabled;
  • trunk/Tools/ChangeLog

    r176449 r176488  
     12014-11-21  Zalan Bujtas  <zalan@apple.com>
     2
     3        Simple line layout: Add "show simple line layout debug borders" setting to MiniBrowser.
     4        https://bugs.webkit.org/show_bug.cgi?id=138981
     5
     6        Reviewed by Simon Fraser.
     7
     8        * MiniBrowser/mac/SettingsController.h:
     9        * MiniBrowser/mac/SettingsController.m:
     10        (-[SettingsController _populateMenu]):
     11        (-[SettingsController validateMenuItem:]):
     12        (-[SettingsController toggleSimpleLineLayoutDebugBordersEnabled:]):
     13        (-[SettingsController simpleLineLayoutDebugBordersEnabled]):
     14        * MiniBrowser/mac/WK1BrowserWindowController.m:
     15        (-[WK1BrowserWindowController didChangeSettings]):
     16        * MiniBrowser/mac/WK2BrowserWindowController.m:
     17        (-[WK2BrowserWindowController didChangeSettings]):
     18
    1192014-11-21  Csaba Osztrogonác  <ossy@webkit.org>
    220
  • trunk/Tools/MiniBrowser/mac/SettingsController.h

    r175494 r176488  
    3838@property (nonatomic, readonly) BOOL usePaginatedMode;
    3939@property (nonatomic, readonly) BOOL layerBordersVisible;
     40@property (nonatomic, readonly) BOOL simpleLineLayoutDebugBordersEnabled;
    4041@property (nonatomic, readonly) BOOL tiledScrollingIndicatorVisible;
    4142@property (nonatomic, readonly) BOOL nonFastScrollableRegionOverlayVisible;
  • trunk/Tools/MiniBrowser/mac/SettingsController.m

    r175494 r176488  
    3434static NSString * const UseWebKit2ByDefaultPreferenceKey = @"UseWebKit2ByDefault";
    3535static NSString * const LayerBordersVisiblePreferenceKey = @"LayerBordersVisible";
     36static NSString * const SimpleLineLayoutDebugBordersEnabledPreferenceKey = @"SimpleLineLayoutDebugBordersEnabled";
    3637static NSString * const TiledScrollingIndicatorVisiblePreferenceKey = @"TiledScrollingIndicatorVisible";
    3738
     
    101102    [self _addItemWithTitle:@"Use Paginated Mode" action:@selector(toggleUsePaginatedMode:) indented:NO];
    102103    [self _addItemWithTitle:@"Show Layer Borders" action:@selector(toggleShowLayerBorders:) indented:NO];
     104    [self _addItemWithTitle:@"Show Simple Line Layout Borders" action:@selector(toggleSimpleLineLayoutDebugBordersEnabled:) indented:NO];
    103105
    104106    [self _addHeaderWithTitle:@"WebKit2-only Settings"];
     
    141143    else if (action == @selector(toggleShowLayerBorders:))
    142144        [menuItem setState:[self layerBordersVisible] ? NSOnState : NSOffState];
     145    else if (action == @selector(toggleSimpleLineLayoutDebugBordersEnabled:))
     146        [menuItem setState:[self simpleLineLayoutDebugBordersEnabled] ? NSOnState : NSOffState];
    143147    else if (action == @selector(toggleShowTiledScrollingIndicator:))
    144148        [menuItem setState:[self tiledScrollingIndicatorVisible] ? NSOnState : NSOffState];
     
    211215}
    212216
     217- (void)toggleSimpleLineLayoutDebugBordersEnabled:(id)sender
     218{
     219    [self _toggleBooleanDefault:SimpleLineLayoutDebugBordersEnabledPreferenceKey];
     220}
     221
     222- (BOOL)simpleLineLayoutDebugBordersEnabled
     223{
     224    return [[NSUserDefaults standardUserDefaults] boolForKey:SimpleLineLayoutDebugBordersEnabledPreferenceKey];
     225}
     226
    213227- (void)toggleShowTiledScrollingIndicator:(id)sender
    214228{
  • trunk/Tools/MiniBrowser/mac/WK1BrowserWindowController.m

    r174525 r176488  
    239239    [[WebPreferences standardPreferences] setSubpixelCSSOMElementMetricsEnabled:settings.subPixelCSSOMMetricsEnabled];
    240240    [[WebPreferences standardPreferences] setShowDebugBorders:settings.layerBordersVisible];
     241    [[WebPreferences standardPreferences] setSimpleLineLayoutDebugBordersEnabled:settings.simpleLineLayoutDebugBordersEnabled];
    241242    [[WebPreferences standardPreferences] setShowRepaintCounter:settings.layerBordersVisible];
    242243
  • trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m

    r175494 r176488  
    279279    preferences._compositingBordersVisible = settings.layerBordersVisible;
    280280    preferences._compositingRepaintCountersVisible = settings.layerBordersVisible;
     281    preferences._simpleLineLayoutDebugBordersEnabled = settings.simpleLineLayoutDebugBordersEnabled;
    281282
    282283    BOOL useTransparentWindows = settings.useTransparentWindows;
Note: See TracChangeset for help on using the changeset viewer.