Changeset 61494 in webkit


Ignore:
Timestamp:
Jun 19, 2010 9:47:37 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-06-19 Nikita Vasilyev <me@elv1s.ru>

Reviewed by Pavel Feldman.

Web Inspector: subtitleElement.textContent is always empty. Use subtitleAsText method instead.
https://bugs.webkit.org/show_bug.cgi?id=40420

  • inspector/elements-tests.js: (frontend_getSelectedElementStyles):

2010-06-19 Nikita Vasilyev <me@elv1s.ru>

Reviewed by Pavel Feldman.

Web Inspector: Prevent from copying "filename.css" in Styles pane
https://bugs.webkit.org/show_bug.cgi?id=40420

  • inspector/front-end/Section.js: (WebInspector.Section.prototype.set subtitle): (WebInspector.Section.prototype.get subtitleAsText):
  • inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection):
  • inspector/front-end/inspector.css: (.styles-section .subtitle::before, .styles-section .subtitle a::before):
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r61491 r61494  
     12010-06-19  Nikita Vasilyev  <me@elv1s.ru>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: subtitleElement.textContent is always empty. Use subtitleAsText method instead.
     6        https://bugs.webkit.org/show_bug.cgi?id=40420
     7
     8        * inspector/elements-tests.js:
     9        (frontend_getSelectedElementStyles):
     10
    1112010-06-19  Dimitri Glazkov  <dglazkov@chromium.org>
    212
  • trunk/LayoutTests/inspector/elements-tests.js

    r61010 r61494  
    7070            if (section.element.previousSibling && section.element.previousSibling.className === "styles-sidebar-separator")
    7171                result.push("======== " + section.element.previousSibling.textContent + " ========");
    72             result.push((section.expanded ? "[expanded] " : "[collapsed] ") + section.titleElement.textContent + " (" + section.subtitleElement.textContent + ")");
     72            result.push((section.expanded ? "[expanded] " : "[collapsed] ") + section.titleElement.textContent + " (" + section.subtitleAsText + ")");
    7373            section.expand();
    7474            frontend_dumpStyleTreeOutline(section.propertiesTreeOutline, result);
  • trunk/WebCore/ChangeLog

    r61493 r61494  
     12010-06-19  Nikita Vasilyev  <me@elv1s.ru>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: Prevent from copying "filename.css" in Styles pane
     6        https://bugs.webkit.org/show_bug.cgi?id=40420
     7
     8        * inspector/front-end/Section.js:
     9        (WebInspector.Section.prototype.set subtitle):
     10        (WebInspector.Section.prototype.get subtitleAsText):
     11        * inspector/front-end/StylesSidebarPane.js:
     12        (WebInspector.StylePropertiesSection):
     13        * inspector/front-end/inspector.css:
     14        (.styles-section .subtitle::before, .styles-section .subtitle a::before):
     15
    1162010-06-19  Alex Milowski  <alex@milowski.com>
    217
  • trunk/WebCore/inspector/front-end/Section.js

    r54769 r61494  
    8383            return;
    8484        this._subtitle = x;
    85         this.subtitleElement.innerHTML = x;
     85        this.subtitleElement.setAttribute("data-uncopyable", x);
     86    },
     87
     88    get subtitleAsText()
     89    {
     90        var result = "";
     91        var data = this.subtitleElement.getAttribute("data-uncopyable");
     92        if (data)
     93            result += data;
     94        var child = this.subtitleElement.querySelector("[data-uncopyable]");
     95        if (child) {
     96            var linkData = child.getAttribute("data-uncopyable");
     97            if (linkData)
     98                result += linkData;
     99        }
     100        return result;
    86101    },
    87102
  • trunk/WebCore/inspector/front-end/StylesSidebarPane.js

    r61014 r61494  
    652652            if (this.styleRule.parentStyleSheet && this.styleRule.parentStyleSheet.href) {
    653653                var url = this.styleRule.parentStyleSheet.href;
    654                 this.subtitleElement.appendChild(WebInspector.linkifyResourceAsNode(url, "resources", this.rule.sourceLine + 1));
     654                var link = WebInspector.linkifyResourceAsNode(url, "resources", this.rule.sourceLine + 1);
     655                link.setAttribute("data-uncopyable", link.textContent);
     656                link.textContent = "";
     657                this.subtitleElement.appendChild(link);
    655658            } else if (isUserAgent)
    656659                subtitle = WebInspector.UIString("user agent stylesheet");
     
    670673    this.identifier = styleRule.selectorText;
    671674    if (this.subtitle)
    672         this.identifier += ":" + this.subtitleElement.textContent;
     675        this.identifier += ":" + this.subtitle;
    673676}
    674677
  • trunk/WebCore/inspector/front-end/inspector.css

    r61274 r61494  
    40434043}
    40444044
     4045.styles-section .subtitle::before, .styles-section .subtitle a::before {
     4046    content: attr(data-uncopyable);
     4047}
     4048
    40454049.styles-section .properties {
    40464050    display: none;
Note: See TracChangeset for help on using the changeset viewer.