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

Side by Side Diff: Source/WebCore/dom/Element.cpp

Issue 12703032: Revert 146744 "Refactoring: Pull Node::disabled() and Node::isIn..." (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1453/
Patch Set: Created 7 years, 9 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
« no previous file with comments | « Source/WebCore/dom/Element.h ('k') | Source/WebCore/dom/EventDispatcher.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * (C) 2007 David Smith (catfish.man@gmail.com) 6 * (C) 2007 David Smith (catfish.man@gmail.com)
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
8 * (C) 2007 Eric Seidel (eric@webkit.org) 8 * (C) 2007 Eric Seidel (eric@webkit.org)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1169 1169
1170 bool Element::wasChangedSinceLastFormControlChangeEvent() const 1170 bool Element::wasChangedSinceLastFormControlChangeEvent() const
1171 { 1171 {
1172 return false; 1172 return false;
1173 } 1173 }
1174 1174
1175 void Element::setChangedSinceLastFormControlChangeEvent(bool) 1175 void Element::setChangedSinceLastFormControlChangeEvent(bool)
1176 { 1176 {
1177 } 1177 }
1178 1178
1179 bool Element::disabled() const
1180 {
1181 #if ENABLE(DIALOG_ELEMENT)
1182 // FIXME: disabled and inert are separate concepts in the spec, but now we t reat them as the same.
1183 // For example, an inert, non-disabled form control should not be grayed out .
1184 if (isInert())
1185 return true;
1186 #endif
1187 return false;
1188 }
1189
1190 #if ENABLE(DIALOG_ELEMENT)
1191 bool Element::isInert() const
1192 {
1193 Element* dialog = document()->activeModalDialog();
1194 return dialog && !containsIncludingShadowDOM(dialog) && !dialog->containsInc ludingShadowDOM(this);
1195 }
1196 #endif
1197
1198 Node::InsertionNotificationRequest Element::insertedInto(ContainerNode* insertio nPoint) 1179 Node::InsertionNotificationRequest Element::insertedInto(ContainerNode* insertio nPoint)
1199 { 1180 {
1200 // need to do superclass processing first so inDocument() is true 1181 // need to do superclass processing first so inDocument() is true
1201 // by the time we reach updateId 1182 // by the time we reach updateId
1202 ContainerNode::insertedInto(insertionPoint); 1183 ContainerNode::insertedInto(insertionPoint);
1203 1184
1204 #if ENABLE(FULLSCREEN_API) 1185 #if ENABLE(FULLSCREEN_API)
1205 if (containsFullScreenElement() && parentElement() && !parentElement()->cont ainsFullScreenElement()) 1186 if (containsFullScreenElement() && parentElement() && !parentElement()->cont ainsFullScreenElement())
1206 setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(true); 1187 setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(true);
1207 #endif 1188 #endif
(...skipping 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after
3141 return 0; 3122 return 0;
3142 } 3123 }
3143 3124
3144 Attribute* UniqueElementData::attributeItem(unsigned index) 3125 Attribute* UniqueElementData::attributeItem(unsigned index)
3145 { 3126 {
3146 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); 3127 ASSERT_WITH_SECURITY_IMPLICATION(index < length());
3147 return &m_attributeVector.at(index); 3128 return &m_attributeVector.at(index);
3148 } 3129 }
3149 3130
3150 } // namespace WebCore 3131 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/dom/Element.h ('k') | Source/WebCore/dom/EventDispatcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698