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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 if (box == root) | 350 if (box == root) |
351 adjustOverflow = true; | 351 adjustOverflow = true; |
352 } | 352 } |
353 if (markerLogicalLeft < newLogicalLayoutOverflowRect.x()) { | 353 if (markerLogicalLeft < newLogicalLayoutOverflowRect.x()) { |
354 newLogicalLayoutOverflowRect.setWidth(newLogicalLayoutOverfl
owRect.maxX() - markerLogicalLeft); | 354 newLogicalLayoutOverflowRect.setWidth(newLogicalLayoutOverfl
owRect.maxX() - markerLogicalLeft); |
355 newLogicalLayoutOverflowRect.setX(markerLogicalLeft); | 355 newLogicalLayoutOverflowRect.setX(markerLogicalLeft); |
356 if (box == root) | 356 if (box == root) |
357 adjustOverflow = true; | 357 adjustOverflow = true; |
358 } | 358 } |
359 box->setOverflowFromLogicalRects(newLogicalLayoutOverflowRect, n
ewLogicalVisualOverflowRect, lineTop, lineBottom); | 359 box->setOverflowFromLogicalRects(newLogicalLayoutOverflowRect, n
ewLogicalVisualOverflowRect, lineTop, lineBottom); |
360 if (box->boxModelObject()->hasSelfPaintingLayer()) | 360 if (box->boxModelObject().hasSelfPaintingLayer()) |
361 hitSelfPaintingLayer = true; | 361 hitSelfPaintingLayer = true; |
362 } | 362 } |
363 } else { | 363 } else { |
364 LayoutUnit rightLineOffset = logicalRightOffsetForLine(blockOffset,
logicalRightOffsetForLine(blockOffset, false), false); | 364 LayoutUnit rightLineOffset = logicalRightOffsetForLine(blockOffset,
logicalRightOffsetForLine(blockOffset, false), false); |
365 markerLogicalLeft = rightLineOffset - lineOffset + paddingStart() +
borderStart() + m_marker->marginEnd(); | 365 markerLogicalLeft = rightLineOffset - lineOffset + paddingStart() +
borderStart() + m_marker->marginEnd(); |
366 m_marker->inlineBoxWrapper()->moveInInlineDirection((markerLogicalLe
ft - markerOldLogicalLeft).toFloat()); | 366 m_marker->inlineBoxWrapper()->moveInInlineDirection((markerLogicalLe
ft - markerOldLogicalLeft).toFloat()); |
367 for (InlineFlowBox* box = m_marker->inlineBoxWrapper()->parent(); bo
x; box = box->parent()) { | 367 for (InlineFlowBox* box = m_marker->inlineBoxWrapper()->parent(); bo
x; box = box->parent()) { |
368 LayoutRect newLogicalVisualOverflowRect = box->logicalVisualOver
flowRect(lineTop, lineBottom); | 368 LayoutRect newLogicalVisualOverflowRect = box->logicalVisualOver
flowRect(lineTop, lineBottom); |
369 LayoutRect newLogicalLayoutOverflowRect = box->logicalLayoutOver
flowRect(lineTop, lineBottom); | 369 LayoutRect newLogicalLayoutOverflowRect = box->logicalLayoutOver
flowRect(lineTop, lineBottom); |
370 if (markerLogicalLeft + m_marker->logicalWidth() > newLogicalVis
ualOverflowRect.maxX() && !hitSelfPaintingLayer) { | 370 if (markerLogicalLeft + m_marker->logicalWidth() > newLogicalVis
ualOverflowRect.maxX() && !hitSelfPaintingLayer) { |
371 newLogicalVisualOverflowRect.setWidth(markerLogicalLeft + m_
marker->logicalWidth() - newLogicalVisualOverflowRect.x()); | 371 newLogicalVisualOverflowRect.setWidth(markerLogicalLeft + m_
marker->logicalWidth() - newLogicalVisualOverflowRect.x()); |
372 if (box == root) | 372 if (box == root) |
373 adjustOverflow = true; | 373 adjustOverflow = true; |
374 } | 374 } |
375 if (markerLogicalLeft + m_marker->logicalWidth() > newLogicalLay
outOverflowRect.maxX()) { | 375 if (markerLogicalLeft + m_marker->logicalWidth() > newLogicalLay
outOverflowRect.maxX()) { |
376 newLogicalLayoutOverflowRect.setWidth(markerLogicalLeft + m_
marker->logicalWidth() - newLogicalLayoutOverflowRect.x()); | 376 newLogicalLayoutOverflowRect.setWidth(markerLogicalLeft + m_
marker->logicalWidth() - newLogicalLayoutOverflowRect.x()); |
377 if (box == root) | 377 if (box == root) |
378 adjustOverflow = true; | 378 adjustOverflow = true; |
379 } | 379 } |
380 box->setOverflowFromLogicalRects(newLogicalLayoutOverflowRect, n
ewLogicalVisualOverflowRect, lineTop, lineBottom); | 380 box->setOverflowFromLogicalRects(newLogicalLayoutOverflowRect, n
ewLogicalVisualOverflowRect, lineTop, lineBottom); |
381 | 381 |
382 if (box->boxModelObject()->hasSelfPaintingLayer()) | 382 if (box->boxModelObject().hasSelfPaintingLayer()) |
383 hitSelfPaintingLayer = true; | 383 hitSelfPaintingLayer = true; |
384 } | 384 } |
385 } | 385 } |
386 | 386 |
387 if (adjustOverflow) { | 387 if (adjustOverflow) { |
388 LayoutRect markerRect(LayoutPoint(markerLogicalLeft + lineOffset, bl
ockOffset), m_marker->size()); | 388 LayoutRect markerRect(LayoutPoint(markerLogicalLeft + lineOffset, bl
ockOffset), m_marker->size()); |
389 if (!style()->isHorizontalWritingMode()) | 389 if (!style()->isHorizontalWritingMode()) |
390 markerRect = markerRect.transposedRect(); | 390 markerRect = markerRect.transposedRect(); |
391 LayoutBox* o = m_marker; | 391 LayoutBox* o = m_marker; |
392 bool propagateVisualOverflow = true; | 392 bool propagateVisualOverflow = true; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 // assume that all the following ones have too. | 498 // assume that all the following ones have too. |
499 // This gives us the opportunity to stop here and avoid | 499 // This gives us the opportunity to stop here and avoid |
500 // marking the same nodes again. | 500 // marking the same nodes again. |
501 break; | 501 break; |
502 } | 502 } |
503 item->updateValue(); | 503 item->updateValue(); |
504 } | 504 } |
505 } | 505 } |
506 | 506 |
507 } // namespace blink | 507 } // namespace blink |
OLD | NEW |