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 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 | 937 |
938 HTMLMenuElement* HTMLElement::contextMenu() const | 938 HTMLMenuElement* HTMLElement::contextMenu() const |
939 { | 939 { |
940 const AtomicString& contextMenuId(fastGetAttribute(contextmenuAttr)); | 940 const AtomicString& contextMenuId(fastGetAttribute(contextmenuAttr)); |
941 // If an element A has a parent element, then A's assigned context menu is | |
tkent
2014/11/12 07:17:21
You should not change this function. The specific
pals
2014/11/12 09:30:05
Done.
| |
942 // the assigned context menu of its parent element. Otherwise, A's assigned | |
943 // context menu is null. | |
941 if (contextMenuId.isNull()) | 944 if (contextMenuId.isNull()) |
942 return nullptr; | 945 return parentElement() ? toHTMLElement(parentElement())->contextMenu() : nullptr; |
tkent
2014/11/12 07:17:21
This line has a bad cast. parentElement might not
pals
2014/11/12 09:30:05
Done.
| |
943 | 946 |
944 Element* element = treeScope().getElementById(contextMenuId); | 947 Element* element = treeScope().getElementById(contextMenuId); |
945 // Not checking if the menu element is of type "popup". | 948 // Not checking if the menu element is of type "popup". |
946 // Ignoring menu element type attribute is intentional according to the stan dard. | 949 // Ignoring menu element type attribute is intentional according to the stan dard. |
947 return isHTMLMenuElement(element) ? toHTMLMenuElement(element) : nullptr; | 950 return isHTMLMenuElement(element) ? toHTMLMenuElement(element) : nullptr; |
948 } | 951 } |
949 | 952 |
950 void HTMLElement::setContextMenu(HTMLMenuElement* contextMenu) | 953 void HTMLElement::setContextMenu(HTMLMenuElement* contextMenu) |
951 { | 954 { |
952 if (!contextMenu) { | 955 if (!contextMenu) { |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1026 #ifndef NDEBUG | 1029 #ifndef NDEBUG |
1027 | 1030 |
1028 // For use in the debugger | 1031 // For use in the debugger |
1029 void dumpInnerHTML(blink::HTMLElement*); | 1032 void dumpInnerHTML(blink::HTMLElement*); |
1030 | 1033 |
1031 void dumpInnerHTML(blink::HTMLElement* element) | 1034 void dumpInnerHTML(blink::HTMLElement* element) |
1032 { | 1035 { |
1033 printf("%s\n", element->innerHTML().ascii().data()); | 1036 printf("%s\n", element->innerHTML().ascii().data()); |
1034 } | 1037 } |
1035 #endif | 1038 #endif |
OLD | NEW |