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 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. |
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 for (LayoutObject* currChild = firstChild; currChild; currChild = currChild-
>nextSibling()) { | 226 for (LayoutObject* currChild = firstChild; currChild; currChild = currChild-
>nextSibling()) { |
227 if (currChild == marker) | 227 if (currChild == marker) |
228 continue; | 228 continue; |
229 | 229 |
230 if (currChild->isInline() && (!currChild->isRenderInline() || curr->gene
ratesLineBoxesForInlineChild(currChild))) | 230 if (currChild->isInline() && (!currChild->isRenderInline() || curr->gene
ratesLineBoxesForInlineChild(currChild))) |
231 return curr; | 231 return curr; |
232 | 232 |
233 if (currChild->isFloating() || currChild->isOutOfFlowPositioned()) | 233 if (currChild->isFloating() || currChild->isOutOfFlowPositioned()) |
234 continue; | 234 continue; |
235 | 235 |
236 if (!currChild->isRenderBlockFlow() || (currChild->isBox() && toRenderBo
x(currChild)->isWritingModeRoot())) | 236 if (!currChild->isRenderBlockFlow() || (currChild->isBox() && toLayoutBo
x(currChild)->isWritingModeRoot())) |
237 break; | 237 break; |
238 | 238 |
239 if (curr->isListItem() && inQuirksMode && currChild->node() | 239 if (curr->isListItem() && inQuirksMode && currChild->node() |
240 && (isHTMLUListElement(*currChild->node()) || isHTMLOListElement(*cu
rrChild->node()))) | 240 && (isHTMLUListElement(*currChild->node()) || isHTMLOListElement(*cu
rrChild->node()))) |
241 break; | 241 break; |
242 | 242 |
243 LayoutObject* lineBox = getParentOfFirstLineBox(toRenderBlockFlow(currCh
ild), marker); | 243 LayoutObject* lineBox = getParentOfFirstLineBox(toRenderBlockFlow(currCh
ild), marker); |
244 if (lineBox) | 244 if (lineBox) |
245 return lineBox; | 245 return lineBox; |
246 } | 246 } |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 RenderBlockFlow::addOverflowFromChildren(); | 330 RenderBlockFlow::addOverflowFromChildren(); |
331 positionListMarker(); | 331 positionListMarker(); |
332 } | 332 } |
333 | 333 |
334 void LayoutListItem::positionListMarker() | 334 void LayoutListItem::positionListMarker() |
335 { | 335 { |
336 if (m_marker && m_marker->parent()->isBox() && !m_marker->isInside() && m_ma
rker->inlineBoxWrapper()) { | 336 if (m_marker && m_marker->parent()->isBox() && !m_marker->isInside() && m_ma
rker->inlineBoxWrapper()) { |
337 LayoutUnit markerOldLogicalLeft = m_marker->logicalLeft(); | 337 LayoutUnit markerOldLogicalLeft = m_marker->logicalLeft(); |
338 LayoutUnit blockOffset = 0; | 338 LayoutUnit blockOffset = 0; |
339 LayoutUnit lineOffset = 0; | 339 LayoutUnit lineOffset = 0; |
340 for (RenderBox* o = m_marker->parentBox(); o != this; o = o->parentBox()
) { | 340 for (LayoutBox* o = m_marker->parentBox(); o != this; o = o->parentBox()
) { |
341 blockOffset += o->logicalTop(); | 341 blockOffset += o->logicalTop(); |
342 lineOffset += o->logicalLeft(); | 342 lineOffset += o->logicalLeft(); |
343 } | 343 } |
344 | 344 |
345 bool adjustOverflow = false; | 345 bool adjustOverflow = false; |
346 LayoutUnit markerLogicalLeft; | 346 LayoutUnit markerLogicalLeft; |
347 RootInlineBox& root = m_marker->inlineBoxWrapper()->root(); | 347 RootInlineBox& root = m_marker->inlineBoxWrapper()->root(); |
348 bool hitSelfPaintingLayer = false; | 348 bool hitSelfPaintingLayer = false; |
349 | 349 |
350 LayoutUnit lineTop = root.lineTop(); | 350 LayoutUnit lineTop = root.lineTop(); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 | 395 |
396 if (box->boxModelObject()->hasSelfPaintingLayer()) | 396 if (box->boxModelObject()->hasSelfPaintingLayer()) |
397 hitSelfPaintingLayer = true; | 397 hitSelfPaintingLayer = true; |
398 } | 398 } |
399 } | 399 } |
400 | 400 |
401 if (adjustOverflow) { | 401 if (adjustOverflow) { |
402 LayoutRect markerRect(LayoutPoint(markerLogicalLeft + lineOffset, bl
ockOffset), m_marker->size()); | 402 LayoutRect markerRect(LayoutPoint(markerLogicalLeft + lineOffset, bl
ockOffset), m_marker->size()); |
403 if (!style()->isHorizontalWritingMode()) | 403 if (!style()->isHorizontalWritingMode()) |
404 markerRect = markerRect.transposedRect(); | 404 markerRect = markerRect.transposedRect(); |
405 RenderBox* o = m_marker; | 405 LayoutBox* o = m_marker; |
406 bool propagateVisualOverflow = true; | 406 bool propagateVisualOverflow = true; |
407 bool propagateLayoutOverflow = true; | 407 bool propagateLayoutOverflow = true; |
408 do { | 408 do { |
409 o = o->parentBox(); | 409 o = o->parentBox(); |
410 if (o->isRenderBlock()) { | 410 if (o->isRenderBlock()) { |
411 if (propagateVisualOverflow) | 411 if (propagateVisualOverflow) |
412 toRenderBlock(o)->addContentsVisualOverflow(markerRect); | 412 toRenderBlock(o)->addContentsVisualOverflow(markerRect); |
413 if (propagateLayoutOverflow) | 413 if (propagateLayoutOverflow) |
414 toRenderBlock(o)->addLayoutOverflow(markerRect); | 414 toRenderBlock(o)->addLayoutOverflow(markerRect); |
415 } | 415 } |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 // assume that all the following ones have too. | 514 // assume that all the following ones have too. |
515 // This gives us the opportunity to stop here and avoid | 515 // This gives us the opportunity to stop here and avoid |
516 // marking the same nodes again. | 516 // marking the same nodes again. |
517 break; | 517 break; |
518 } | 518 } |
519 item->updateValue(); | 519 item->updateValue(); |
520 } | 520 } |
521 } | 521 } |
522 | 522 |
523 } // namespace blink | 523 } // namespace blink |
OLD | NEW |