| 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 1386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1397 } | 1397 } |
| 1398 if (hasParentStyle && (change >= Inherit || needsStyleRecalc())) { | 1398 if (hasParentStyle && (change >= Inherit || needsStyleRecalc())) { |
| 1399 StyleChange localChange = Detach; | 1399 StyleChange localChange = Detach; |
| 1400 RefPtr<RenderStyle> newStyle; | 1400 RefPtr<RenderStyle> newStyle; |
| 1401 if (currentStyle) { | 1401 if (currentStyle) { |
| 1402 // FIXME: This still recalcs style twice when changing display types
, but saves | 1402 // FIXME: This still recalcs style twice when changing display types
, but saves |
| 1403 // us from recalcing twice when going from none -> anything else whi
ch is more | 1403 // us from recalcing twice when going from none -> anything else whi
ch is more |
| 1404 // common, especially during lazy attach. | 1404 // common, especially during lazy attach. |
| 1405 newStyle = styleForRenderer(); | 1405 newStyle = styleForRenderer(); |
| 1406 localChange = Node::diff(currentStyle.get(), newStyle.get(), documen
t()); | 1406 localChange = Node::diff(currentStyle.get(), newStyle.get(), documen
t()); |
| 1407 } else if (attached() && isActiveInsertionPoint(this)) { |
| 1408 // Active InsertionPoints will never have renderers so there's no re
ason to |
| 1409 // reattach them repeatedly once they're already attached. |
| 1410 localChange = change; |
| 1407 } | 1411 } |
| 1408 if (localChange == Detach) { | 1412 if (localChange == Detach) { |
| 1409 AttachContext reattachContext; | 1413 AttachContext reattachContext; |
| 1410 reattachContext.resolvedStyle = newStyle.get(); | 1414 reattachContext.resolvedStyle = newStyle.get(); |
| 1411 reattach(reattachContext); | 1415 reattach(reattachContext); |
| 1412 | 1416 |
| 1413 // attach recalculates the style for all children. No need to do it
twice. | 1417 // attach recalculates the style for all children. No need to do it
twice. |
| 1414 clearNeedsStyleRecalc(); | 1418 clearNeedsStyleRecalc(); |
| 1415 clearChildNeedsStyleRecalc(); | 1419 clearChildNeedsStyleRecalc(); |
| 1416 | 1420 |
| (...skipping 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3110 return 0; | 3114 return 0; |
| 3111 } | 3115 } |
| 3112 | 3116 |
| 3113 Attribute* UniqueElementData::attributeItem(unsigned index) | 3117 Attribute* UniqueElementData::attributeItem(unsigned index) |
| 3114 { | 3118 { |
| 3115 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); | 3119 ASSERT_WITH_SECURITY_IMPLICATION(index < length()); |
| 3116 return &m_attributeVector.at(index); | 3120 return &m_attributeVector.at(index); |
| 3117 } | 3121 } |
| 3118 | 3122 |
| 3119 } // namespace WebCore | 3123 } // namespace WebCore |
| OLD | NEW |