OLD | NEW |
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 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1381 } | 1381 } |
1382 if (hasParentStyle && (change >= Inherit || needsStyleRecalc())) { | 1382 if (hasParentStyle && (change >= Inherit || needsStyleRecalc())) { |
1383 StyleChange localChange = Detach; | 1383 StyleChange localChange = Detach; |
1384 RefPtr<RenderStyle> newStyle; | 1384 RefPtr<RenderStyle> newStyle; |
1385 if (currentStyle) { | 1385 if (currentStyle) { |
1386 // FIXME: This still recalcs style twice when changing display types
, but saves | 1386 // FIXME: This still recalcs style twice when changing display types
, but saves |
1387 // us from recalcing twice when going from none -> anything else whi
ch is more | 1387 // us from recalcing twice when going from none -> anything else whi
ch is more |
1388 // common, especially during lazy attach. | 1388 // common, especially during lazy attach. |
1389 newStyle = styleForRenderer(); | 1389 newStyle = styleForRenderer(); |
1390 localChange = Node::diff(currentStyle.get(), newStyle.get(), documen
t()); | 1390 localChange = Node::diff(currentStyle.get(), newStyle.get(), documen
t()); |
| 1391 } else if (isActiveInsertionPoint(this) && attached()) { |
| 1392 // Active Insertion points are special: They never have renderers an
d reattach()-ing their subtrees is just a waste. |
| 1393 // We can just skip Element-local style updates for them. |
| 1394 localChange = change; |
1391 } | 1395 } |
| 1396 |
1392 if (localChange == Detach) { | 1397 if (localChange == Detach) { |
1393 // FIXME: The style gets computed twice by calling attach. We could
do better if we passed the style along. | 1398 // FIXME: The style gets computed twice by calling attach. We could
do better if we passed the style along. |
1394 reattach(); | 1399 reattach(); |
1395 // attach recalculates the style for all children. No need to do it
twice. | 1400 // attach recalculates the style for all children. No need to do it
twice. |
1396 clearNeedsStyleRecalc(); | 1401 clearNeedsStyleRecalc(); |
1397 clearChildNeedsStyleRecalc(); | 1402 clearChildNeedsStyleRecalc(); |
1398 | 1403 |
1399 if (hasCustomStyleCallbacks()) | 1404 if (hasCustomStyleCallbacks()) |
1400 didRecalcStyle(change); | 1405 didRecalcStyle(change); |
1401 return; | 1406 return; |
(...skipping 1702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3104 return 0; | 3109 return 0; |
3105 } | 3110 } |
3106 | 3111 |
3107 Attribute* UniqueElementData::attributeItem(unsigned index) | 3112 Attribute* UniqueElementData::attributeItem(unsigned index) |
3108 { | 3113 { |
3109 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); | 3114 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); |
3110 return &m_attributeVector.at(index); | 3115 return &m_attributeVector.at(index); |
3111 } | 3116 } |
3112 | 3117 |
3113 } // namespace WebCore | 3118 } // namespace WebCore |
OLD | NEW |