| 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 * Copyright (C) 2004-2008, 2013, 2014 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004-2008, 2013, 2014 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 5 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. | 6 * Copyright (C) 2011 Motorola Mobility. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 parsedColor.setRGB(parseColorStringWithCrazyLegacyRules(colorString)); | 927 parsedColor.setRGB(parseColorStringWithCrazyLegacyRules(colorString)); |
| 928 | 928 |
| 929 style->setProperty(propertyID, cssValuePool().createColorValue(parsedColor.r
gb())); | 929 style->setProperty(propertyID, cssValuePool().createColorValue(parsedColor.r
gb())); |
| 930 } | 930 } |
| 931 | 931 |
| 932 bool HTMLElement::isInteractiveContent() const | 932 bool HTMLElement::isInteractiveContent() const |
| 933 { | 933 { |
| 934 return false; | 934 return false; |
| 935 } | 935 } |
| 936 | 936 |
| 937 HTMLMenuElement* HTMLElement::assignedContextMenu() const |
| 938 { |
| 939 if (HTMLMenuElement* menu = contextMenu()) |
| 940 return menu; |
| 941 |
| 942 return parentElement() && parentElement()->isHTMLElement() ? toHTMLElement(p
arentElement())->assignedContextMenu() : nullptr; |
| 943 } |
| 937 | 944 |
| 938 HTMLMenuElement* HTMLElement::contextMenu() const | 945 HTMLMenuElement* HTMLElement::contextMenu() const |
| 939 { | 946 { |
| 940 const AtomicString& contextMenuId(fastGetAttribute(contextmenuAttr)); | 947 const AtomicString& contextMenuId(fastGetAttribute(contextmenuAttr)); |
| 941 if (contextMenuId.isNull()) | 948 if (contextMenuId.isNull()) |
| 942 return nullptr; | 949 return nullptr; |
| 943 | 950 |
| 944 Element* element = treeScope().getElementById(contextMenuId); | 951 Element* element = treeScope().getElementById(contextMenuId); |
| 945 // Not checking if the menu element is of type "popup". | 952 // Not checking if the menu element is of type "popup". |
| 946 // Ignoring menu element type attribute is intentional according to the stan
dard. | 953 // Ignoring menu element type attribute is intentional according to the stan
dard. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1026 #ifndef NDEBUG | 1033 #ifndef NDEBUG |
| 1027 | 1034 |
| 1028 // For use in the debugger | 1035 // For use in the debugger |
| 1029 void dumpInnerHTML(blink::HTMLElement*); | 1036 void dumpInnerHTML(blink::HTMLElement*); |
| 1030 | 1037 |
| 1031 void dumpInnerHTML(blink::HTMLElement* element) | 1038 void dumpInnerHTML(blink::HTMLElement* element) |
| 1032 { | 1039 { |
| 1033 printf("%s\n", element->innerHTML().ascii().data()); | 1040 printf("%s\n", element->innerHTML().ascii().data()); |
| 1034 } | 1041 } |
| 1035 #endif | 1042 #endif |
| OLD | NEW |