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, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008 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 28 matching lines...) Expand all Loading... |
39 #include "core/dom/NodeTraversal.h" | 39 #include "core/dom/NodeTraversal.h" |
40 #include "core/dom/Text.h" | 40 #include "core/dom/Text.h" |
41 #include "core/editing/markup.h" | 41 #include "core/editing/markup.h" |
42 #include "core/events/EventListener.h" | 42 #include "core/events/EventListener.h" |
43 #include "core/events/KeyboardEvent.h" | 43 #include "core/events/KeyboardEvent.h" |
44 #include "core/events/ThreadLocalEventNames.h" | 44 #include "core/events/ThreadLocalEventNames.h" |
45 #include "core/frame/Settings.h" | 45 #include "core/frame/Settings.h" |
46 #include "core/html/HTMLBRElement.h" | 46 #include "core/html/HTMLBRElement.h" |
47 #include "core/html/HTMLFormElement.h" | 47 #include "core/html/HTMLFormElement.h" |
48 #include "core/html/HTMLInputElement.h" | 48 #include "core/html/HTMLInputElement.h" |
| 49 #include "core/html/HTMLMenuElement.h" |
49 #include "core/html/HTMLTemplateElement.h" | 50 #include "core/html/HTMLTemplateElement.h" |
50 #include "core/html/HTMLTextFormControlElement.h" | 51 #include "core/html/HTMLTextFormControlElement.h" |
51 #include "core/html/parser/HTMLParserIdioms.h" | 52 #include "core/html/parser/HTMLParserIdioms.h" |
52 #include "core/rendering/RenderObject.h" | 53 #include "core/rendering/RenderObject.h" |
53 #include "platform/text/BidiResolver.h" | 54 #include "platform/text/BidiResolver.h" |
54 #include "platform/text/BidiTextRun.h" | 55 #include "platform/text/BidiTextRun.h" |
55 #include "platform/text/TextRunIterator.h" | 56 #include "platform/text/TextRunIterator.h" |
56 #include "wtf/StdLibExtras.h" | 57 #include "wtf/StdLibExtras.h" |
57 #include "wtf/text/CString.h" | 58 #include "wtf/text/CString.h" |
58 | 59 |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
910 parsedColor.setRGB(parseColorStringWithCrazyLegacyRules(colorString)); | 911 parsedColor.setRGB(parseColorStringWithCrazyLegacyRules(colorString)); |
911 | 912 |
912 style->setProperty(propertyID, cssValuePool().createColorValue(parsedColor.r
gb())); | 913 style->setProperty(propertyID, cssValuePool().createColorValue(parsedColor.r
gb())); |
913 } | 914 } |
914 | 915 |
915 bool HTMLElement::isInteractiveContent() const | 916 bool HTMLElement::isInteractiveContent() const |
916 { | 917 { |
917 return false; | 918 return false; |
918 } | 919 } |
919 | 920 |
| 921 HTMLMenuElement* HTMLElement::menuElement() const |
| 922 { |
| 923 Element* element = treeScope().getElementById(fastGetAttribute(contextmenuAt
tr)); |
| 924 if (!element) |
| 925 return 0; |
| 926 if (!isHTMLMenuElement(*element)) |
| 927 return 0; |
| 928 |
| 929 return toHTMLMenuElement(element); |
| 930 } |
| 931 |
920 void HTMLElement::defaultEventHandler(Event* event) | 932 void HTMLElement::defaultEventHandler(Event* event) |
921 { | 933 { |
922 if (event->type() == EventTypeNames::keypress && event->isKeyboardEvent()) { | 934 if (event->type() == EventTypeNames::keypress && event->isKeyboardEvent()) { |
923 handleKeypressEvent(toKeyboardEvent(event)); | 935 handleKeypressEvent(toKeyboardEvent(event)); |
924 if (event->defaultHandled()) | 936 if (event->defaultHandled()) |
925 return; | 937 return; |
926 } | 938 } |
927 | 939 |
928 Element::defaultEventHandler(event); | 940 Element::defaultEventHandler(event); |
929 } | 941 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 #ifndef NDEBUG | 980 #ifndef NDEBUG |
969 | 981 |
970 // For use in the debugger | 982 // For use in the debugger |
971 void dumpInnerHTML(WebCore::HTMLElement*); | 983 void dumpInnerHTML(WebCore::HTMLElement*); |
972 | 984 |
973 void dumpInnerHTML(WebCore::HTMLElement* element) | 985 void dumpInnerHTML(WebCore::HTMLElement* element) |
974 { | 986 { |
975 printf("%s\n", element->innerHTML().ascii().data()); | 987 printf("%s\n", element->innerHTML().ascii().data()); |
976 } | 988 } |
977 #endif | 989 #endif |
OLD | NEW |