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

Side by Side Diff: sky/engine/core/html/HTMLElement.cpp

Issue 696903002: Remove a lot of API surface from Element. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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) 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 void HTMLElement::setDir(const AtomicString& value) 128 void HTMLElement::setDir(const AtomicString& value)
129 { 129 {
130 setAttribute(HTMLNames::dirAttr, value); 130 setAttribute(HTMLNames::dirAttr, value);
131 } 131 }
132 132
133 bool HTMLElement::isInteractiveContent() const 133 bool HTMLElement::isInteractiveContent() const
134 { 134 {
135 return false; 135 return false;
136 } 136 }
137 137
138 bool HTMLElement::matchesReadOnlyPseudoClass() const
139 {
140 return !matchesReadWritePseudoClass();
141 }
142
143 bool HTMLElement::matchesReadWritePseudoClass() const
144 {
145 if (hasAttribute(HTMLNames::contenteditableAttr)) {
146 const AtomicString& value = getAttribute(HTMLNames::contenteditableAttr) ;
147
148 if (value.isEmpty() || equalIgnoringCase(value, "true") || equalIgnoring Case(value, "plaintext-only"))
149 return true;
150 if (equalIgnoringCase(value, "false"))
151 return false;
152 // All other values should be treated as "inherit".
153 }
154
155 return parentElement() && parentElement()->hasEditableStyle();
156 }
157
158 const AtomicString& HTMLElement::eventParameterName() 138 const AtomicString& HTMLElement::eventParameterName()
159 { 139 {
160 DEFINE_STATIC_LOCAL(const AtomicString, eventString, ("event", AtomicString: :ConstructFromLiteral)); 140 DEFINE_STATIC_LOCAL(const AtomicString, eventString, ("event", AtomicString: :ConstructFromLiteral));
161 return eventString; 141 return eventString;
162 } 142 }
163 143
164 v8::Handle<v8::Object> HTMLElement::wrap(v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) 144 v8::Handle<v8::Object> HTMLElement::wrap(v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
165 { 145 {
166 return createV8HTMLWrapper(this, creationContext, isolate); 146 return createV8HTMLWrapper(this, creationContext, isolate);
167 } 147 }
168 148
169 } // namespace blink 149 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/html/HTMLElement.h ('k') | sky/engine/core/html/parser/HTMLConstructionSite.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698