| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 1845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1856 | 1856 |
| 1857 // Otherwise go up the tree looking for a renderer | 1857 // Otherwise go up the tree looking for a renderer |
| 1858 Element *parent = ancestorElement(); | 1858 Element *parent = ancestorElement(); |
| 1859 if (parent) | 1859 if (parent) |
| 1860 return parent->convertFromPage(p); | 1860 return parent->convertFromPage(p); |
| 1861 | 1861 |
| 1862 // No parent - no conversion needed | 1862 // No parent - no conversion needed |
| 1863 return p; | 1863 return p; |
| 1864 } | 1864 } |
| 1865 | 1865 |
| 1866 #ifndef NDEBUG | |
| 1867 | |
| 1868 String Node::debugName() const | 1866 String Node::debugName() const |
| 1869 { | 1867 { |
| 1870 StringBuilder name; | 1868 StringBuilder name; |
| 1871 name.append(nodeName()); | 1869 name.append(nodeName()); |
| 1872 | 1870 |
| 1873 if (hasID()) { | 1871 if (hasID()) { |
| 1874 name.appendLiteral(" id=\'"); | 1872 name.appendLiteral(" id=\'"); |
| 1875 name.append(toElement(this)->getIdAttribute()); | 1873 name.append(toElement(this)->getIdAttribute()); |
| 1876 name.append('\''); | 1874 name.append('\''); |
| 1877 } | 1875 } |
| 1878 | 1876 |
| 1879 if (hasClass()) { | 1877 if (hasClass()) { |
| 1880 name.appendLiteral(" class=\'"); | 1878 name.appendLiteral(" class=\'"); |
| 1881 const StyledElement* styledElement = static_cast<const StyledElement*>(t
his); | 1879 const StyledElement* styledElement = static_cast<const StyledElement*>(t
his); |
| 1882 for (size_t i = 0; i < styledElement->classNames().size(); ++i) { | 1880 for (size_t i = 0; i < styledElement->classNames().size(); ++i) { |
| 1883 if (i > 0) | 1881 if (i > 0) |
| 1884 name.append(' '); | 1882 name.append(' '); |
| 1885 name.append(styledElement->classNames()[i]); | 1883 name.append(styledElement->classNames()[i]); |
| 1886 } | 1884 } |
| 1887 name.append('\''); | 1885 name.append('\''); |
| 1888 } | 1886 } |
| 1889 | 1887 |
| 1890 return name.toString(); | 1888 return name.toString(); |
| 1891 } | 1889 } |
| 1892 | 1890 |
| 1891 #ifndef NDEBUG |
| 1892 |
| 1893 static void appendAttributeDesc(const Node* node, StringBuilder& stringBuilder,
const QualifiedName& name, const char* attrDesc) | 1893 static void appendAttributeDesc(const Node* node, StringBuilder& stringBuilder,
const QualifiedName& name, const char* attrDesc) |
| 1894 { | 1894 { |
| 1895 if (!node->isElementNode()) | 1895 if (!node->isElementNode()) |
| 1896 return; | 1896 return; |
| 1897 | 1897 |
| 1898 String attr = toElement(node)->getAttribute(name); | 1898 String attr = toElement(node)->getAttribute(name); |
| 1899 if (attr.isEmpty()) | 1899 if (attr.isEmpty()) |
| 1900 return; | 1900 return; |
| 1901 | 1901 |
| 1902 stringBuilder.append(attrDesc); | 1902 stringBuilder.append(attrDesc); |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2734 node->showTreeForThis(); | 2734 node->showTreeForThis(); |
| 2735 } | 2735 } |
| 2736 | 2736 |
| 2737 void showNodePath(const WebCore::Node* node) | 2737 void showNodePath(const WebCore::Node* node) |
| 2738 { | 2738 { |
| 2739 if (node) | 2739 if (node) |
| 2740 node->showNodePathForThis(); | 2740 node->showNodePathForThis(); |
| 2741 } | 2741 } |
| 2742 | 2742 |
| 2743 #endif | 2743 #endif |
| OLD | NEW |