Changeset 248328 in webkit


Ignore:
Timestamp:
Aug 6, 2019 4:46:22 PM (5 years ago)
Author:
Devin Rousso
Message:

Web Inspector: Show radius values in box model metrics view
https://bugs.webkit.org/show_bug.cgi?id=160993
<rdar://problem/27919035>

Reviewed by Brian Burg.

  • UserInterface/Views/BoxModelDetailsSectionRow.js:

(WI.BoxModelDetailsSectionRow.prototype._getPropertyValue): Added.
(WI.BoxModelDetailsSectionRow.prototype._getPropertyValueAsPx):
(WI.BoxModelDetailsSectionRow.prototype._getBox):
(WI.BoxModelDetailsSectionRow.prototype._getComponentPrefix): Added.
(WI.BoxModelDetailsSectionRow.prototype._getComponentSuffix):
(WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
(WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
(WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaElement):
(WI.BoxModelDetailsSectionRow.prototype._applyUserInput):
(WI.BoxModelDetailsSectionRow.prototype._applyUserInput.inspectedPage_node_toggleInlineStyleProperty):

  • UserInterface/Views/BoxModelDetailsSectionRow.css:

(.details-section .row.box-model .box): Added.
(.details-section .row.box-model .box > .label): Added.
(.details-section .row.box-model .box.position): Added.
(.details-section .row.box-model .box.margin): Added.
(.details-section .row.box-model:not(.hovered) .box.margin, .details-section .row.box-model .box.margin.active): Added.
(.details-section .row.box-model .box.border): Added.
(.details-section .row.box-model:not(.hovered) .box.border, .details-section .row.box-model .box.border.active): Added.
(.details-section .row.box-model .box.border > .label): Added.
(.details-section .row.box-model .box.border.has-top-left-radius, .details-section .row.box-model .box.border.has-top-left-radius .box): Added.
(.details-section .row.box-model .box.border.has-top-right-radius, .details-section .row.box-model .box.border.has-top-right-radius .box): Added.
(.details-section .row.box-model .box.border.has-bottom-right-radius, .details-section .row.box-model .box.border.has-bottom-right-radius .box): Added.
(.details-section .row.box-model .box.border.has-bottom-left-radius, .details-section .row.box-model .box.border.has-bottom-left-radius .box): Added.
(.details-section .row.box-model .box.padding): Added.
(.details-section .row.box-model:not(.hovered) .box.padding, .details-section .row.box-model .box.padding.active): Added.
(.details-section .row.box-model .box.content): Added.
(.details-section .row.box-model:not(.hovered) .box.content, .details-section .row.box-model .box.content.active): Added.
(.details-section .row.box-model :matches(.top, .right, .bottom, .left)): Added.
(.details-section .row.box-model :matches(.top, .right, .bottom, .left):not(.editing), .details-section .row.box-model :matches(.top-left, .top-right, .bottom-right, .bottom-left)): Added.
(.details-section .row.box-model :matches(.top-left, .top-right, .bottom-right, .bottom-left)): Added.
(.details-section .row.box-model :matches(.top-left, .top-right)): Added.
(.details-section .row.box-model :matches(.bottom-left, .bottom-right):not(.editing)): Added.
(.details-section .row.box-model :matches(.bottom-left, .bottom-right).editing): Added.
(.details-section .row.box-model :matches(.top-left, .bottom-left):not(.editing)): Added.
(.details-section .row.box-model :matches(.top-left, .bottom-left).editing): Added.
(.details-section .row.box-model :matches(.top-right, .bottom-right):not(.editing)): Added.
(.details-section .row.box-model :matches(.top-right, .bottom-right).editing): Added.
(@media (prefers-color-scheme: dark) .details-section .row.box-model .box): Added.
(@media (prefers-color-scheme: dark) .details-section .row.box-model:not(.hovered) .box:matches(.margin, .border, .padding, .content), .details-section .row.box-model .box.active:matches(.margin, .border, .padding, .content)): Added.
(@media (prefers-color-scheme: dark) .details-section .row.box-model .box.margin): Added.
(@media (prefers-color-scheme: dark) .details-section .row.box-model .box.border): Added.
(.details-section .row.box-model :matches(.position, .margin, .border, .padding, .content)): Deleted.
(.details-section .row.box-model .position): Deleted.
(.details-section .row.box-model .margin): Deleted.
(.details-section .row.box-model:not(.hovered) .margin, .details-section .row.box-model .margin.active): Deleted.
(.details-section .row.box-model .border): Deleted.
(.details-section .row.box-model:not(.hovered) .border, .details-section .row.box-model .border.active): Deleted.
(.details-section .row.box-model .padding): Deleted.
(.details-section .row.box-model:not(.hovered) .padding, .details-section .row.box-model .padding.active): Deleted.
(.details-section .row.box-model .content): Deleted.
(.details-section .row.box-model:not(.hovered) .content, .details-section .row.box-model .content.active): Deleted.
(.details-section .row.box-model :matches(.content span, .top, .right, .bottom, .left)): Deleted.
(.details-section .row.box-model :matches(.right, .left)): Deleted.
(.details-section .row.box-model:not(.hovered) :matches(.margin, .border, .padding, .content), .details-section .row.box-model .active:matches(.margin, .border, .padding, .content)): Deleted.

  • UserInterface/Models/CSSProperty.js:

(WI.CSSProperty.prototype.update):
Ensure that the _value is updated whenever the _rawValue is updated.

Location:
trunk/Source/WebInspectorUI
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r248327 r248328  
     12019-08-06  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: Show radius values in box model metrics view
     4        https://bugs.webkit.org/show_bug.cgi?id=160993
     5        <rdar://problem/27919035>
     6
     7        Reviewed by Brian Burg.
     8
     9        * UserInterface/Views/BoxModelDetailsSectionRow.js:
     10        (WI.BoxModelDetailsSectionRow.prototype._getPropertyValue): Added.
     11        (WI.BoxModelDetailsSectionRow.prototype._getPropertyValueAsPx):
     12        (WI.BoxModelDetailsSectionRow.prototype._getBox):
     13        (WI.BoxModelDetailsSectionRow.prototype._getComponentPrefix): Added.
     14        (WI.BoxModelDetailsSectionRow.prototype._getComponentSuffix):
     15        (WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
     16        (WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
     17        (WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaElement):
     18        (WI.BoxModelDetailsSectionRow.prototype._applyUserInput):
     19        (WI.BoxModelDetailsSectionRow.prototype._applyUserInput.inspectedPage_node_toggleInlineStyleProperty):
     20        * UserInterface/Views/BoxModelDetailsSectionRow.css:
     21        (.details-section .row.box-model .box): Added.
     22        (.details-section .row.box-model .box > .label): Added.
     23        (.details-section .row.box-model .box.position): Added.
     24        (.details-section .row.box-model .box.margin): Added.
     25        (.details-section .row.box-model:not(.hovered) .box.margin, .details-section .row.box-model .box.margin.active): Added.
     26        (.details-section .row.box-model .box.border): Added.
     27        (.details-section .row.box-model:not(.hovered) .box.border, .details-section .row.box-model .box.border.active): Added.
     28        (.details-section .row.box-model .box.border > .label): Added.
     29        (.details-section .row.box-model .box.border.has-top-left-radius, .details-section .row.box-model .box.border.has-top-left-radius .box): Added.
     30        (.details-section .row.box-model .box.border.has-top-right-radius, .details-section .row.box-model .box.border.has-top-right-radius .box): Added.
     31        (.details-section .row.box-model .box.border.has-bottom-right-radius, .details-section .row.box-model .box.border.has-bottom-right-radius .box): Added.
     32        (.details-section .row.box-model .box.border.has-bottom-left-radius, .details-section .row.box-model .box.border.has-bottom-left-radius .box): Added.
     33        (.details-section .row.box-model .box.padding): Added.
     34        (.details-section .row.box-model:not(.hovered) .box.padding, .details-section .row.box-model .box.padding.active): Added.
     35        (.details-section .row.box-model .box.content): Added.
     36        (.details-section .row.box-model:not(.hovered) .box.content, .details-section .row.box-model .box.content.active): Added.
     37        (.details-section .row.box-model :matches(.top, .right, .bottom, .left)): Added.
     38        (.details-section .row.box-model :matches(.top, .right, .bottom, .left):not(.editing), .details-section .row.box-model :matches(.top-left, .top-right, .bottom-right, .bottom-left)): Added.
     39        (.details-section .row.box-model :matches(.top-left, .top-right, .bottom-right, .bottom-left)): Added.
     40        (.details-section .row.box-model :matches(.top-left, .top-right)): Added.
     41        (.details-section .row.box-model :matches(.bottom-left, .bottom-right):not(.editing)): Added.
     42        (.details-section .row.box-model :matches(.bottom-left, .bottom-right).editing): Added.
     43        (.details-section .row.box-model :matches(.top-left, .bottom-left):not(.editing)): Added.
     44        (.details-section .row.box-model :matches(.top-left, .bottom-left).editing): Added.
     45        (.details-section .row.box-model :matches(.top-right, .bottom-right):not(.editing)): Added.
     46        (.details-section .row.box-model :matches(.top-right, .bottom-right).editing): Added.
     47        (@media (prefers-color-scheme: dark) .details-section .row.box-model .box): Added.
     48        (@media (prefers-color-scheme: dark) .details-section .row.box-model:not(.hovered) .box:matches(.margin, .border, .padding, .content), .details-section .row.box-model .box.active:matches(.margin, .border, .padding, .content)): Added.
     49        (@media (prefers-color-scheme: dark) .details-section .row.box-model .box.margin): Added.
     50        (@media (prefers-color-scheme: dark) .details-section .row.box-model .box.border): Added.
     51        (.details-section .row.box-model :matches(.position, .margin, .border, .padding, .content)): Deleted.
     52        (.details-section .row.box-model .position): Deleted.
     53        (.details-section .row.box-model .margin): Deleted.
     54        (.details-section .row.box-model:not(.hovered) .margin, .details-section .row.box-model .margin.active): Deleted.
     55        (.details-section .row.box-model .border): Deleted.
     56        (.details-section .row.box-model:not(.hovered) .border, .details-section .row.box-model .border.active): Deleted.
     57        (.details-section .row.box-model .padding): Deleted.
     58        (.details-section .row.box-model:not(.hovered) .padding, .details-section .row.box-model .padding.active): Deleted.
     59        (.details-section .row.box-model .content): Deleted.
     60        (.details-section .row.box-model:not(.hovered) .content, .details-section .row.box-model .content.active): Deleted.
     61        (.details-section .row.box-model :matches(.content span, .top, .right, .bottom, .left)): Deleted.
     62        (.details-section .row.box-model :matches(.right, .left)): Deleted.
     63        (.details-section .row.box-model:not(.hovered) :matches(.margin, .border, .padding, .content), .details-section .row.box-model .active:matches(.margin, .border, .padding, .content)): Deleted.
     64
     65        * UserInterface/Models/CSSProperty.js:
     66        (WI.CSSProperty.prototype.update):
     67        Ensure that the `_value` is updated whenever the `_rawValue` is updated.
     68
    1692019-08-06  Commit Queue  <commit-queue@webkit.org>
    270
  • trunk/Source/WebInspectorUI/UserInterface/Models/CSSProperty.js

    r247406 r248328  
    109109        this._name = name;
    110110        this._rawValue = value;
     111        this._value = undefined;
    111112        this._priority = priority;
    112113        this._enabled = enabled;
  • trunk/Source/WebInspectorUI/UserInterface/Views/BoxModelDetailsSectionRow.css

    r242768 r248328  
    3030}
    3131
    32 .details-section .row.box-model .label {
     32.details-section .row.box-model .box {
     33    display: inline-block;
     34    position: relative;
     35    margin: 3px;
     36    padding: 3px;
     37    text-align: center;
     38    vertical-align: middle;
     39    background-color: white;
     40    border: 1px solid grey;
     41}
     42
     43.details-section .row.box-model .box > .label {
    3344    position: absolute;
    34     color: black;
    3545    padding: 0 2px;
    3646}
    3747
    38 .details-section .row.box-model :matches(.position, .margin, .border, .padding, .content) {
    39     border: 1px solid grey;
    40     background-color: white;
    41     display: inline-block;
    42     text-align: center;
    43     vertical-align: middle;
    44     padding: 3px;
    45     margin: 3px;
    46 }
    47 
    48 .details-section .row.box-model .position {
     48.details-section .row.box-model .box.position {
    4949    border-style: dotted;
    5050}
    5151
    52 .details-section .row.box-model .margin {
     52.details-section .row.box-model .box.margin {
    5353    border-style: dashed;
    5454    border-color: black;
    5555}
    5656
    57 .details-section .row.box-model:not(.hovered) .margin,
    58 .details-section .row.box-model .margin.active {
     57.details-section .row.box-model:not(.hovered) .box.margin,
     58.details-section .row.box-model .box.margin.active {
    5959    background-color: hsla(30, 88%, 69%, 0.66);
    6060}
    6161
    62 .details-section .row.box-model .border {
     62.details-section .row.box-model .box.border {
    6363    border-color: black;
     64
     65    --has-border-radius-border-radius: 10px;
    6466}
    6567
    66 .details-section .row.box-model:not(.hovered) .border,
    67 .details-section .row.box-model .border.active {
     68.details-section .row.box-model:not(.hovered) .box.border,
     69.details-section .row.box-model .box.border.active {
    6870    background-color: hsla(44, 100%, 80%, 0.66);
    6971}
    7072
    71 .details-section .row.box-model .padding {
     73.details-section .row.box-model .box.border > .label {
     74    -webkit-margin-start: 20px;
     75}
     76
     77.details-section .row.box-model .box.border.has-top-left-radius,
     78.details-section .row.box-model .box.border.has-top-left-radius .box {
     79    border-top-left-radius: var(--has-border-radius-border-radius);
     80}
     81
     82.details-section .row.box-model .box.border.has-top-right-radius,
     83.details-section .row.box-model .box.border.has-top-right-radius .box {
     84    border-top-right-radius: var(--has-border-radius-border-radius);
     85}
     86
     87.details-section .row.box-model .box.border.has-bottom-right-radius,
     88.details-section .row.box-model .box.border.has-bottom-right-radius .box {
     89    border-bottom-right-radius: var(--has-border-radius-border-radius);
     90}
     91
     92.details-section .row.box-model .box.border.has-bottom-left-radius,
     93.details-section .row.box-model .box.border.has-bottom-left-radius .box {
     94    border-bottom-left-radius: var(--has-border-radius-border-radius);
     95}
     96
     97.details-section .row.box-model .box.padding {
    7298    border-style: dashed;
    7399}
    74100
    75 .details-section .row.box-model:not(.hovered) .padding,
    76 .details-section .row.box-model .padding.active {
     101.details-section .row.box-model:not(.hovered) .box.padding,
     102.details-section .row.box-model .box.padding.active {
    77103    background-color: hsla(101, 37%, 62%, 0.55);
    78104}
    79105
    80 .details-section .row.box-model .content {
     106.details-section .row.box-model .box.content {
    81107    position: static;
    82108    min-width: 80px;
     
    84110}
    85111
    86 .details-section .row.box-model:not(.hovered) .content,
    87 .details-section .row.box-model .content.active {
     112.details-section .row.box-model:not(.hovered) .box.content,
     113.details-section .row.box-model .box.content.active {
    88114    background-color: hsla(208, 60%, 64%, 0.66);
    89115}
     
    94120}
    95121
    96 .details-section .row.box-model :matches(.content span, .top, .right, .bottom, .left) {
     122.details-section .row.box-model :matches(.top, .right, .bottom, .left) {
    97123    display: inline-block;
     124    vertical-align: middle;
    98125}
    99126
    100 .details-section .row.box-model :matches(.right, .left) {
    101     vertical-align: middle;
     127.details-section .row.box-model :matches(.top, .right, .bottom, .left):not(.editing),
     128.details-section .row.box-model :matches(.top-left, .top-right, .bottom-right, .bottom-left) {
     129    margin: 0 0.25em;
     130}
     131
     132.details-section .row.box-model :matches(.top-left, .top-right, .bottom-right, .bottom-left) {
     133    position: absolute;
     134}
     135
     136.details-section .row.box-model :matches(.top-left, .top-right) {
     137    top: 4px;
     138}
     139
     140.details-section .row.box-model :matches(.bottom-left, .bottom-right):not(.editing) {
     141    bottom: 3px;
     142}
     143
     144.details-section .row.box-model :matches(.bottom-left, .bottom-right).editing {
     145    bottom: 2px;
     146}
     147
     148.details-section .row.box-model :matches(.top-left, .bottom-left):not(.editing) {
     149    left: 3px;
     150}
     151
     152.details-section .row.box-model :matches(.top-left, .bottom-left).editing {
     153    left: 1px;
     154}
     155
     156.details-section .row.box-model :matches(.top-right, .bottom-right):not(.editing) {
     157    right: 3px;
     158}
     159
     160.details-section .row.box-model :matches(.top-right, .bottom-right).editing {
     161    right: 1px;
    102162}
    103163
     
    111171    }
    112172
    113     .details-section .row.box-model :matches(.position, .margin, .border, .padding, .content) {
     173    .details-section .row.box-model .box {
    114174        border-color: var(--text-color-quaternary);
    115175        background-color: var(--background-color);
     
    117177    }
    118178
    119     .details-section .row.box-model:not(.hovered) :matches(.margin, .border, .padding, .content),
    120     .details-section .row.box-model .active:matches(.margin, .border, .padding, .content) {
     179    .details-section .row.box-model:not(.hovered) .box:matches(.margin, .border, .padding, .content),
     180    .details-section .row.box-model .box.active:matches(.margin, .border, .padding, .content) {
    121181        color: black;
    122182    }
    123183
    124     .details-section .row.box-model .margin {
     184    .details-section .row.box-model .box.margin {
    125185        border-color: var(--text-color-quaternary);
    126186    }
    127187
    128     .details-section .row.box-model .border {
     188    .details-section .row.box-model .box.border {
    129189        border-color: var(--text-color-quaternary);
    130190    }
    131191}
     192
  • trunk/Source/WebInspectorUI/UserInterface/Views/BoxModelDetailsSectionRow.js

    r240314 r248328  
    6666    }
    6767
     68    _getPropertyValue(style, propertyName)
     69    {
     70        const dontCreateIfMissing = true;
     71        let property = style.propertyForName(propertyName, dontCreateIfMissing);
     72        if (!property)
     73            return null;
     74        return property.value;
     75    }
     76
    6877    _getPropertyValueAsPx(style, propertyName)
    6978    {
    70         return Number(style.propertyForName(propertyName).value.replace(/px$/, "") || 0);
     79        let value = this._getPropertyValue(style, propertyName);
     80        if (!value)
     81            return 0;
     82        return Number(value.replace(/px$/, "") || 0);
    7183    }
    7284
    7385    _getBox(computedStyle, componentName)
    7486    {
    75         var suffix = this._getComponentSuffix(componentName);
    76         var left = this._getPropertyValueAsPx(computedStyle, componentName + "-left" + suffix);
    77         var top = this._getPropertyValueAsPx(computedStyle, componentName + "-top" + suffix);
    78         var right = this._getPropertyValueAsPx(computedStyle, componentName + "-right" + suffix);
    79         var bottom = this._getPropertyValueAsPx(computedStyle, componentName + "-bottom" + suffix);
     87        let prefix = this._getComponentPrefix(componentName);
     88        let suffix = this._getComponentSuffix(componentName);
     89        let left = this._getPropertyValueAsPx(computedStyle, prefix + "-left" + suffix);
     90        let top = this._getPropertyValueAsPx(computedStyle, prefix + "-top" + suffix);
     91        let right = this._getPropertyValueAsPx(computedStyle, prefix + "-right" + suffix);
     92        let bottom = this._getPropertyValueAsPx(computedStyle, prefix + "-bottom" + suffix);
    8093        return {left, top, right, bottom};
    8194    }
    8295
     96    _getComponentPrefix(componentName)
     97    {
     98        return componentName === "border-radius" ? "border" : componentName;
     99    }
     100
    83101    _getComponentSuffix(componentName)
    84102    {
    85         return componentName === "border" ? "-width" : "";
     103        switch (componentName) {
     104        case "border":
     105            return "-width";
     106
     107        case "border-radius":
     108            return "-radius";
     109        }
     110        return "";
    86111    }
    87112
     
    136161        function createBoxPartElement(name, side)
    137162        {
     163            let prefix = this._getComponentPrefix(name);
    138164            let suffix = this._getComponentSuffix(name);
    139             let propertyName = (name !== "position" ? name + "-" : "") + side + suffix;
    140             let property = style.propertyForName(propertyName);
    141             if (!property)
    142                 return null;
    143 
    144             let value = property.value;
    145             if (value === "" || (name !== "position" && value === "0px") || (name === "position" && value === "auto"))
     165            let propertyName = (prefix !== "position" ? prefix + "-" : "") + side + suffix;
     166            let value = this._getPropertyValue(style, propertyName);
     167            if (value) {
     168                if (prefix === "position" && value === "auto")
     169                    value = "";
     170                else if (prefix !== "position" && value === "0px")
     171                    value = "";
     172                else
     173                    value = value.replace(/px$/, "");
     174            } else
    146175                value = "";
    147             else
    148                 value = value.replace(/px$/, "");
    149176
    150177            let element = createValueElement.call(this, "div", value, name, propertyName);
     
    157184            console.assert(name === "width" || name === "height");
    158185
    159             let property = style.propertyForName(name);
    160             if (!property)
    161                 return null;
    162 
    163             let size = property.value.replace(/px$/, "");
    164             if (style.propertyForName("box-sizing").value === "border-box") {
     186            let size = this._getPropertyValueAsPx(style, name);
     187            if (this._getPropertyValue(style, "box-sizing") === "border-box") {
    165188                let borderBox = this._getBox(style, "border");
    166189                let paddingBox = this._getBox(style, "padding");
     
    206229        }
    207230
    208         let displayProperty = style.propertyForName("display");
    209         let positionProperty = style.propertyForName("position");
     231        let displayProperty = this._getPropertyValue(style, "display");
     232        let positionProperty = this._getPropertyValue(style, "position");
    210233        if (!displayProperty || !positionProperty) {
    211234            this.showEmptyMessage();
     
    224247
    225248            let boxElement = document.createElement("div");
    226             boxElement.className = name;
     249            boxElement.classList.add("box", name);
    227250            boxElement._name = name;
    228251            boxElement.addEventListener("mouseover", this._highlightDOMNode.bind(this, true, name === "position" ? "all" : name), false);
     
    239262                boxElement.append(widthElement, " \u00D7 ", heightElement);
    240263            } else {
     264                let borderTopLeftRadiusElement = null;
     265                let borderTopRightRadiusElement = null;
     266                let borderBottomRightRadiusElement = null;
     267                let borderBottomLeftRadiusElement = null;
     268                if (name === "border") {
     269                    for (let corner of ["top-left", "top-right", "bottom-right", "bottom-left"]) {
     270                        let cornerValue = this._getPropertyValue(style, "border-" + corner + "-radius");
     271                        if (cornerValue && cornerValue !== "0px")
     272                            boxElement.classList.add("has-" + corner + "-radius");
     273                    }
     274
     275                    borderTopLeftRadiusElement = createBoxPartElement.call(this, "border-radius", "top-left");
     276                    borderTopRightRadiusElement = createBoxPartElement.call(this, "border-radius", "top-right");
     277                    borderBottomRightRadiusElement = createBoxPartElement.call(this, "border-radius", "bottom-right");
     278                    borderBottomLeftRadiusElement = createBoxPartElement.call(this, "border-radius", "bottom-left");
     279                }
     280
    241281                let topElement = createBoxPartElement.call(this, name, "top");
    242282                let leftElement = createBoxPartElement.call(this, name, "left");
     
    253293                boxElement.appendChild(labelElement);
    254294
     295                if (borderTopLeftRadiusElement)
     296                    boxElement.appendChild(borderTopLeftRadiusElement);
     297
    255298                boxElement.appendChild(topElement);
     299
     300                if (borderTopRightRadiusElement)
     301                    boxElement.appendChild(borderTopRightRadiusElement);
     302
    256303                boxElement.appendChild(document.createElement("br"));
    257304                boxElement.appendChild(leftElement);
     
    262309                boxElement.appendChild(rightElement);
    263310                boxElement.appendChild(document.createElement("br"));
     311
     312                if (borderBottomLeftRadiusElement)
     313                    boxElement.appendChild(borderBottomLeftRadiusElement);
     314
    264315                boxElement.appendChild(bottomElement);
     316
     317                if (borderBottomRightRadiusElement)
     318                    boxElement.appendChild(borderBottomRightRadiusElement);
    265319            }
    266320
     
    417471        var computedStyle = this._nodeStyles.computedStyle;
    418472
    419         if (computedStyle.propertyForName("box-sizing").value === "border-box" && (styleProperty === "width" || styleProperty === "height")) {
     473        if (this._getPropertyValue(computedStyle, "box-sizing") === "border-box" && (styleProperty === "width" || styleProperty === "height")) {
    420474            if (!userInput.match(/px$/)) {
    421475                console.error("For elements with box-sizing: border-box, only absolute content area dimensions can be applied");
     
    436490        }
    437491
     492        let setBorderStyleProperty = null;
     493        if (context.box === "border") {
     494            let borderStyleProperty = styleProperty.replace("-width", "-style");
     495            if (this._getPropertyValue(computedStyle, borderStyleProperty) === "none")
     496                setBorderStyleProperty = borderStyleProperty;
     497        }
     498
    438499        WI.RemoteObject.resolveNode(this._nodeStyles.node).then((object) => {
    439             function inspectedPage_node_toggleInlineStyleProperty(property, value) {
    440                 this.style.setProperty(property, value, "important");
     500            function inspectedPage_node_toggleInlineStyleProperty(styleProperty, userInput, setBorderStyleProperty) {
     501                if (setBorderStyleProperty)
     502                    this.style.setProperty(setBorderStyleProperty, "solid", "important");
     503                this.style.setProperty(styleProperty, userInput, "important");
    441504            }
    442505
     
    445508            };
    446509
    447             object.callFunction(inspectedPage_node_toggleInlineStyleProperty, [styleProperty, userInput], false, didToggle);
     510            object.callFunction(inspectedPage_node_toggleInlineStyleProperty, [styleProperty, userInput, setBorderStyleProperty], false, didToggle);
    448511            object.release();
    449512        });
Note: See TracChangeset for help on using the changeset viewer.