Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLMenuElement.cpp

Issue 2905763003: Rollback ContextMenu (Closed)
Patch Set: Rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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) 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2010 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 13 matching lines...) Expand all
24 24
25 #include "core/HTMLNames.h" 25 #include "core/HTMLNames.h"
26 26
27 namespace blink { 27 namespace blink {
28 28
29 using namespace HTMLNames; 29 using namespace HTMLNames;
30 30
31 inline HTMLMenuElement::HTMLMenuElement(Document& document) 31 inline HTMLMenuElement::HTMLMenuElement(Document& document)
32 : HTMLElement(menuTag, document) {} 32 : HTMLElement(menuTag, document) {}
33 33
34 const String HTMLMenuElement::type() const {
35 const AtomicString menuType = FastGetAttribute(typeAttr);
36 if (EqualIgnoringASCIICase(menuType, "context")) {
37 return "context";
38 }
39 if (EqualIgnoringASCIICase(menuType, "toolbar")) {
40 return "toolbar";
41 }
42 if (parentNode() && isHTMLMenuElement(parentNode()) &&
43 toHTMLMenuElement(parentNode())->type() == "context") {
44 return "context";
45 }
46 return "toolbar";
47 }
48
49 void HTMLMenuElement::setType(const AtomicString& type) {
50 setAttribute(typeAttr, type);
51 }
52
53 DEFINE_NODE_FACTORY(HTMLMenuElement) 34 DEFINE_NODE_FACTORY(HTMLMenuElement)
54 35
55 } // namespace blink 36 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMenuElement.h ('k') | third_party/WebKit/Source/core/html/HTMLMenuElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698