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

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

Issue 14467003: Remove ENABLE_DIALOG_ELEMENT (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
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 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 { 1145 {
1146 return false; 1146 return false;
1147 } 1147 }
1148 1148
1149 void Element::setChangedSinceLastFormControlChangeEvent(bool) 1149 void Element::setChangedSinceLastFormControlChangeEvent(bool)
1150 { 1150 {
1151 } 1151 }
1152 1152
1153 bool Element::isDisabledFormControl() const 1153 bool Element::isDisabledFormControl() const
1154 { 1154 {
1155 #if ENABLE(DIALOG_ELEMENT)
1156 // FIXME: disabled and inert are separate concepts in the spec, but now we t reat them as the same. 1155 // FIXME: disabled and inert are separate concepts in the spec, but now we t reat them as the same.
1157 // For example, an inert, non-disabled form control should not be grayed out . 1156 // For example, an inert, non-disabled form control should not be grayed out .
1158 if (isInert()) 1157 if (isInert())
1159 return true; 1158 return true;
1160 #endif
1161 return false; 1159 return false;
1162 } 1160 }
1163 1161
1164 #if ENABLE(DIALOG_ELEMENT)
1165 bool Element::isInert() const 1162 bool Element::isInert() const
1166 { 1163 {
1167 Element* dialog = document()->activeModalDialog(); 1164 Element* dialog = document()->activeModalDialog();
1168 return dialog && !containsIncludingShadowDOM(dialog) && !dialog->containsInc ludingShadowDOM(this); 1165 return dialog && !containsIncludingShadowDOM(dialog) && !dialog->containsInc ludingShadowDOM(this);
1169 } 1166 }
1170 #endif
1171 1167
1172 Node::InsertionNotificationRequest Element::insertedInto(ContainerNode* insertio nPoint) 1168 Node::InsertionNotificationRequest Element::insertedInto(ContainerNode* insertio nPoint)
1173 { 1169 {
1174 // need to do superclass processing first so inDocument() is true 1170 // need to do superclass processing first so inDocument() is true
1175 // by the time we reach updateId 1171 // by the time we reach updateId
1176 ContainerNode::insertedInto(insertionPoint); 1172 ContainerNode::insertedInto(insertionPoint);
1177 1173
1178 if (containsFullScreenElement() && parentElement() && !parentElement()->cont ainsFullScreenElement()) 1174 if (containsFullScreenElement() && parentElement() && !parentElement()->cont ainsFullScreenElement())
1179 setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(true); 1175 setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(true);
1180 1176
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 #if ENABLE(SVG) 1211 #if ENABLE(SVG)
1216 bool wasInDocument = insertionPoint->document(); 1212 bool wasInDocument = insertionPoint->document();
1217 #endif 1213 #endif
1218 1214
1219 if (Element* before = pseudoElement(BEFORE)) 1215 if (Element* before = pseudoElement(BEFORE))
1220 before->removedFrom(insertionPoint); 1216 before->removedFrom(insertionPoint);
1221 1217
1222 if (Element* after = pseudoElement(AFTER)) 1218 if (Element* after = pseudoElement(AFTER))
1223 after->removedFrom(insertionPoint); 1219 after->removedFrom(insertionPoint);
1224 1220
1225 #if ENABLE(DIALOG_ELEMENT)
1226 document()->removeFromTopLayer(this); 1221 document()->removeFromTopLayer(this);
1227 #endif
1228 if (containsFullScreenElement()) 1222 if (containsFullScreenElement())
1229 setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(false); 1223 setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(false);
1230 1224
1231 if (document()->page()) 1225 if (document()->page())
1232 document()->page()->pointerLockController()->elementRemoved(this); 1226 document()->page()->pointerLockController()->elementRemoved(this);
1233 1227
1234 setSavedLayerScrollOffset(IntSize()); 1228 setSavedLayerScrollOffset(IntSize());
1235 1229
1236 if (insertionPoint->isInTreeScope() && treeScope() == document()) { 1230 if (insertionPoint->isInTreeScope() && treeScope() == document()) {
1237 const AtomicString& idValue = getIdAttribute(); 1231 const AtomicString& idValue = getIdAttribute();
(...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after
2470 return element->parentElement() ? element->parentElement() : element->docume nt()->ownerElement(); 2464 return element->parentElement() ? element->parentElement() : element->docume nt()->ownerElement();
2471 } 2465 }
2472 2466
2473 void Element::setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(boo l flag) 2467 void Element::setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(boo l flag)
2474 { 2468 {
2475 Element* element = this; 2469 Element* element = this;
2476 while ((element = parentCrossingFrameBoundaries(element))) 2470 while ((element = parentCrossingFrameBoundaries(element)))
2477 element->setContainsFullScreenElement(flag); 2471 element->setContainsFullScreenElement(flag);
2478 } 2472 }
2479 2473
2480 #if ENABLE(DIALOG_ELEMENT)
2481 bool Element::isInTopLayer() const 2474 bool Element::isInTopLayer() const
2482 { 2475 {
2483 return hasRareData() && elementRareData()->isInTopLayer(); 2476 return hasRareData() && elementRareData()->isInTopLayer();
2484 } 2477 }
2485 2478
2486 void Element::setIsInTopLayer(bool inTopLayer) 2479 void Element::setIsInTopLayer(bool inTopLayer)
2487 { 2480 {
2488 if (isInTopLayer() == inTopLayer) 2481 if (isInTopLayer() == inTopLayer)
2489 return; 2482 return;
2490 ensureElementRareData()->setIsInTopLayer(inTopLayer); 2483 ensureElementRareData()->setIsInTopLayer(inTopLayer);
2491 2484
2492 // We must ensure a reattach occurs so the renderer is inserted in the corre ct sibling order under RenderView according to its 2485 // We must ensure a reattach occurs so the renderer is inserted in the corre ct sibling order under RenderView according to its
2493 // top layer position, or in its usual place if not in the top layer. 2486 // top layer position, or in its usual place if not in the top layer.
2494 reattachIfAttached(); 2487 reattachIfAttached();
2495 } 2488 }
2496 #endif
2497 2489
2498 void Element::webkitRequestPointerLock() 2490 void Element::webkitRequestPointerLock()
2499 { 2491 {
2500 if (document()->page()) 2492 if (document()->page())
2501 document()->page()->pointerLockController()->requestPointerLock(this); 2493 document()->page()->pointerLockController()->requestPointerLock(this);
2502 } 2494 }
2503 2495
2504 SpellcheckAttributeState Element::spellcheckAttributeState() const 2496 SpellcheckAttributeState Element::spellcheckAttributeState() const
2505 { 2497 {
2506 const AtomicString& value = getAttribute(HTMLNames::spellcheckAttr); 2498 const AtomicString& value = getAttribute(HTMLNames::spellcheckAttr);
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
3123 return 0; 3115 return 0;
3124 } 3116 }
3125 3117
3126 Attribute* UniqueElementData::attributeItem(unsigned index) 3118 Attribute* UniqueElementData::attributeItem(unsigned index)
3127 { 3119 {
3128 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); 3120 ASSERT_WITH_SECURITY_IMPLICATION(index < length());
3129 return &m_attributeVector.at(index); 3121 return &m_attributeVector.at(index);
3130 } 3122 }
3131 3123
3132 } // namespace WebCore 3124 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698