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

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

Issue 16951003: Fix broken AttachContext from r152289 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed unwanted comments and passed context to Shadow DOM elements Created 7 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 * (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 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 createRendererIfNeeded(context); 1272 createRendererIfNeeded(context);
1273 1273
1274 if (parentElement() && parentElement()->isInCanvasSubtree()) 1274 if (parentElement() && parentElement()->isInCanvasSubtree())
1275 setIsInCanvasSubtree(true); 1275 setIsInCanvasSubtree(true);
1276 1276
1277 createPseudoElementIfNeeded(BEFORE); 1277 createPseudoElementIfNeeded(BEFORE);
1278 1278
1279 // When a shadow root exists, it does the work of attaching the children. 1279 // When a shadow root exists, it does the work of attaching the children.
1280 if (ElementShadow* shadow = this->shadow()) { 1280 if (ElementShadow* shadow = this->shadow()) {
1281 parentPusher.push(); 1281 parentPusher.push();
1282 shadow->attach(); 1282 shadow->attach(context);
1283 } else if (firstChild()) 1283 } else if (firstChild())
1284 parentPusher.push(); 1284 parentPusher.push();
1285 1285
1286 ContainerNode::attach(context); 1286 ContainerNode::attach(context);
1287 1287
1288 createPseudoElementIfNeeded(AFTER); 1288 createPseudoElementIfNeeded(AFTER);
1289 1289
1290 if (hasRareData()) { 1290 if (hasRareData()) {
1291 ElementRareData* data = elementRareData(); 1291 ElementRareData* data = elementRareData();
1292 if (data->needsFocusAppearanceUpdateSoonAfterAttach()) { 1292 if (data->needsFocusAppearanceUpdateSoonAfterAttach()) {
(...skipping 18 matching lines...) Expand all
1311 if (hasRareData()) { 1311 if (hasRareData()) {
1312 ElementRareData* data = elementRareData(); 1312 ElementRareData* data = elementRareData();
1313 data->setPseudoElement(BEFORE, 0); 1313 data->setPseudoElement(BEFORE, 0);
1314 data->setPseudoElement(AFTER, 0); 1314 data->setPseudoElement(AFTER, 0);
1315 data->setIsInCanvasSubtree(false); 1315 data->setIsInCanvasSubtree(false);
1316 data->resetComputedStyle(); 1316 data->resetComputedStyle();
1317 data->resetDynamicRestyleObservations(); 1317 data->resetDynamicRestyleObservations();
1318 } 1318 }
1319 1319
1320 if (ElementShadow* shadow = this->shadow()) { 1320 if (ElementShadow* shadow = this->shadow()) {
1321 detachChildrenIfNeeded(); 1321 detachChildrenIfNeeded(context);
1322 shadow->detach(); 1322 shadow->detach(context);
1323 } 1323 }
1324 ContainerNode::detach(context); 1324 ContainerNode::detach(context);
1325 } 1325 }
1326 1326
1327 bool Element::pseudoStyleCacheIsInvalid(const RenderStyle* currentStyle, RenderS tyle* newStyle) 1327 bool Element::pseudoStyleCacheIsInvalid(const RenderStyle* currentStyle, RenderS tyle* newStyle)
1328 { 1328 {
1329 ASSERT(currentStyle == renderStyle()); 1329 ASSERT(currentStyle == renderStyle());
1330 ASSERT(renderer()); 1330 ASSERT(renderer());
1331 1331
1332 if (!currentStyle) 1332 if (!currentStyle)
(...skipping 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after
3120 return 0; 3120 return 0;
3121 } 3121 }
3122 3122
3123 Attribute* UniqueElementData::attributeItem(unsigned index) 3123 Attribute* UniqueElementData::attributeItem(unsigned index)
3124 { 3124 {
3125 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); 3125 ASSERT_WITH_SECURITY_IMPLICATION(index < length());
3126 return &m_attributeVector.at(index); 3126 return &m_attributeVector.at(index);
3127 } 3127 }
3128 3128
3129 } // namespace WebCore 3129 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698