Changeset 196207 in webkit


Ignore:
Timestamp:
Feb 5, 2016 5:15:13 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Visual Styles sidebar should be more forgiving to long labels
https://bugs.webkit.org/show_bug.cgi?id=153927
<rdar://problem/24343897>

Patch by Devin Rousso <Devin Rousso> on 2016-02-05
Reviewed by Timothy Hatcher.

If a label is too long for it's container, it overflows and is visible
above the rest of the elements nearby.

  • UserInterface/Views/VisualStylePropertyEditor.css:

(.visual-style-property-container > .visual-style-property-title):
Adds text overflow to properties that extend beyond the container's width.

  • UserInterface/Views/VisualStylePropertyEditor.js:

(WebInspector.VisualStylePropertyEditor):
Now also adds the label value as a title attribute to the element, just in
case the content overflows.

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r196193 r196207  
     12016-02-05  Devin Rousso  <dcrousso+webkit@gmail.com>
     2
     3        Web Inspector: Visual Styles sidebar should be more forgiving to long labels
     4        https://bugs.webkit.org/show_bug.cgi?id=153927
     5        <rdar://problem/24343897>
     6
     7        Reviewed by Timothy Hatcher.
     8
     9        If a label is too long for it's container, it overflows and is visible
     10        above the rest of the elements nearby.
     11
     12        * UserInterface/Views/VisualStylePropertyEditor.css:
     13        (.visual-style-property-container > .visual-style-property-title):
     14        Adds text overflow to properties that extend beyond the container's width.
     15
     16        * UserInterface/Views/VisualStylePropertyEditor.js:
     17        (WebInspector.VisualStylePropertyEditor):
     18        Now also adds the label value as a title attribute to the element, just in
     19        case the content overflows.
     20
    1212016-02-05  Saam barati  <sbarati@apple.com>
    222
  • trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.css

    r196146 r196207  
    3333    margin: 4px;
    3434    text-align: right;
     35    overflow: hidden;
     36    text-overflow: ellipsis;
    3537}
    3638
  • trunk/Source/WebInspectorUI/UserInterface/Views/VisualStylePropertyEditor.js

    r196184 r196207  
    7474            this._titleElement = titleContainer.createChild("span");
    7575            this._titleElement.append(label);
     76            this._titleElement.title = label;
    7677            this._titleElement.addEventListener("mouseover", this._titleElementMouseOver.bind(this));
    7778            this._titleElement.addEventListener("mouseout", this._titleElementMouseOut.bind(this));
Note: See TracChangeset for help on using the changeset viewer.