| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. |
| 4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 | 390 |
| 391 if (obj->isBox()) | 391 if (obj->isBox()) |
| 392 return toRenderBox(obj)->createInlineBox(); | 392 return toRenderBox(obj)->createInlineBox(); |
| 393 | 393 |
| 394 return toRenderInline(obj)->createAndAppendInlineFlowBox(); | 394 return toRenderInline(obj)->createAndAppendInlineFlowBox(); |
| 395 } | 395 } |
| 396 | 396 |
| 397 static inline void dirtyLineBoxesForRenderer(RenderObject* o, bool fullLayout) | 397 static inline void dirtyLineBoxesForRenderer(RenderObject* o, bool fullLayout) |
| 398 { | 398 { |
| 399 if (o->isText()) { | 399 if (o->isText()) { |
| 400 if (o->preferredLogicalWidthsDirty() && (o->isCounter() || o->isQuote())
) | 400 RenderText* renderText = toRenderText(o); |
| 401 toRenderText(o)->computePreferredLogicalWidths(0); // FIXME: Counter
s depend on this hack. No clue why. Should be investigated and removed. | 401 renderText->updateTextIfNeeded(); // FIXME: Counters depend on this hack
. No clue why. Should be investigated and removed. |
| 402 toRenderText(o)->dirtyLineBoxes(fullLayout); | 402 renderText->dirtyLineBoxes(fullLayout); |
| 403 } else | 403 } else |
| 404 toRenderInline(o)->dirtyLineBoxes(fullLayout); | 404 toRenderInline(o)->dirtyLineBoxes(fullLayout); |
| 405 } | 405 } |
| 406 | 406 |
| 407 static bool parentIsConstructedOrHaveNext(InlineFlowBox* parentBox) | 407 static bool parentIsConstructedOrHaveNext(InlineFlowBox* parentBox) |
| 408 { | 408 { |
| 409 do { | 409 do { |
| 410 if (parentBox->isConstructed() || parentBox->nextOnLine()) | 410 if (parentBox->isConstructed() || parentBox->nextOnLine()) |
| 411 return true; | 411 return true; |
| 412 parentBox = parentBox->parent(); | 412 parentBox = parentBox->parent(); |
| (...skipping 2454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2867 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver
ticalPositionCache); | 2867 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver
ticalPositionCache); |
| 2868 | 2868 |
| 2869 setLineGridBox(lineGridBox); | 2869 setLineGridBox(lineGridBox); |
| 2870 | 2870 |
| 2871 // FIXME: If any of the characteristics of the box change compared to the ol
d one, then we need to do a deep dirtying | 2871 // FIXME: If any of the characteristics of the box change compared to the ol
d one, then we need to do a deep dirtying |
| 2872 // (similar to what happens when the page height changes). Ideally, though,
we only do this if someone is actually snapping | 2872 // (similar to what happens when the page height changes). Ideally, though,
we only do this if someone is actually snapping |
| 2873 // to this grid. | 2873 // to this grid. |
| 2874 } | 2874 } |
| 2875 | 2875 |
| 2876 } | 2876 } |
| OLD | NEW |