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) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 if (!isAnonymousBlock()) { | 239 if (!isAnonymousBlock()) { |
240 // Ensure that all of our continuation blocks pick up the new style. | 240 // Ensure that all of our continuation blocks pick up the new style. |
241 for (RenderBlock* currCont = blockElementContinuation(); currCont; currC
ont = currCont->blockElementContinuation()) { | 241 for (RenderBlock* currCont = blockElementContinuation(); currCont; currC
ont = currCont->blockElementContinuation()) { |
242 RenderBoxModelObject* nextCont = currCont->continuation(); | 242 RenderBoxModelObject* nextCont = currCont->continuation(); |
243 currCont->setContinuation(0); | 243 currCont->setContinuation(0); |
244 currCont->setStyle(style()); | 244 currCont->setStyle(style()); |
245 currCont->setContinuation(nextCont); | 245 currCont->setContinuation(nextCont); |
246 } | 246 } |
247 } | 247 } |
248 | 248 |
249 // FIXME: We could save this call when the change only affected non-inherite
d properties | 249 propagateStyleToAnonymousChildren(true); |
250 for (RenderObject* child = firstChild(); child; child = child->nextSibling()
) { | |
251 if (child->isAnonymousBlock()) { | |
252 RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(sty
le()); | |
253 if (style()->specifiesColumns()) { | |
254 if (child->style()->specifiesColumns()) | |
255 newStyle->inheritColumnPropertiesFrom(style()); | |
256 if (child->style()->columnSpan()) | |
257 newStyle->setColumnSpan(true); | |
258 } | |
259 newStyle->setDisplay(BLOCK); | |
260 child->setStyle(newStyle.release()); | |
261 } | |
262 } | |
263 | |
264 m_lineHeight = -1; | 250 m_lineHeight = -1; |
265 | 251 |
266 // Update pseudos for :before and :after now. | 252 // Update pseudos for :before and :after now. |
267 if (!isAnonymous() && document()->usesBeforeAfterRules() && canHaveChildren(
)) { | 253 if (!isAnonymous() && document()->usesBeforeAfterRules() && canHaveChildren(
)) { |
268 updateBeforeAfterContent(BEFORE); | 254 updateBeforeAfterContent(BEFORE); |
269 updateBeforeAfterContent(AFTER); | 255 updateBeforeAfterContent(AFTER); |
270 } | 256 } |
271 | 257 |
272 // After our style changed, if we lose our ability to propagate floats into
next sibling | 258 // After our style changed, if we lose our ability to propagate floats into
next sibling |
273 // blocks, then we need to find the top most parent containing that overhang
ing float and | 259 // blocks, then we need to find the top most parent containing that overhang
ing float and |
(...skipping 6343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6617 } | 6603 } |
6618 | 6604 |
6619 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) | 6605 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) |
6620 { | 6606 { |
6621 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x(
), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); | 6607 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->x(
), floatingObject->y(), floatingObject->maxX(), floatingObject->maxY()); |
6622 } | 6608 } |
6623 | 6609 |
6624 #endif | 6610 #endif |
6625 | 6611 |
6626 } // namespace WebCore | 6612 } // namespace WebCore |
OLD | NEW |