Chromium Code Reviews| 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 HTMLMenuElement* menu = contextMenu(); | |
| 940 if (menu) | |
|
tkent
2014/11/12 09:37:18
nit:
if (HTMLMenuElement* menu = contextMenu()
pals
2014/11/12 09:43:59
Done.
| |
| 941 return menu; | |
| 942 | |
| 943 return parentElement() && parentElement()->isHTMLElement() ? toHTMLElement(p arentElement())->assignedContextMenu() :nullptr; | |
|
tkent
2014/11/12 09:37:18
nit: need a space after :
pals
2014/11/12 09:43:58
Done.
| |
| 944 } | |
| 937 | 945 |
| 938 HTMLMenuElement* HTMLElement::contextMenu() const | 946 HTMLMenuElement* HTMLElement::contextMenu() const |
| 939 { | 947 { |
| 940 const AtomicString& contextMenuId(fastGetAttribute(contextmenuAttr)); | 948 const AtomicString& contextMenuId(fastGetAttribute(contextmenuAttr)); |
| 941 if (contextMenuId.isNull()) | 949 if (contextMenuId.isNull()) |
| 942 return nullptr; | 950 return nullptr; |
| 943 | 951 |
| 944 Element* element = treeScope().getElementById(contextMenuId); | 952 Element* element = treeScope().getElementById(contextMenuId); |
| 945 // Not checking if the menu element is of type "popup". | 953 // Not checking if the menu element is of type "popup". |
| 946 // Ignoring menu element type attribute is intentional according to the stan dard. | 954 // 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 | 1034 #ifndef NDEBUG |
| 1027 | 1035 |
| 1028 // For use in the debugger | 1036 // For use in the debugger |
| 1029 void dumpInnerHTML(blink::HTMLElement*); | 1037 void dumpInnerHTML(blink::HTMLElement*); |
| 1030 | 1038 |
| 1031 void dumpInnerHTML(blink::HTMLElement* element) | 1039 void dumpInnerHTML(blink::HTMLElement* element) |
| 1032 { | 1040 { |
| 1033 printf("%s\n", element->innerHTML().ascii().data()); | 1041 printf("%s\n", element->innerHTML().ascii().data()); |
| 1034 } | 1042 } |
| 1035 #endif | 1043 #endif |
| OLD | NEW |