| 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 RootInlineBox& root = m_marker->inlineBoxWrapper()->root(); | 351 RootInlineBox& root = m_marker->inlineBoxWrapper()->root(); |
| 352 bool hitSelfPaintingLayer = false; | 352 bool hitSelfPaintingLayer = false; |
| 353 | 353 |
| 354 LayoutUnit lineTop = root.lineTop(); | 354 LayoutUnit lineTop = root.lineTop(); |
| 355 LayoutUnit lineBottom = root.lineBottom(); | 355 LayoutUnit lineBottom = root.lineBottom(); |
| 356 | 356 |
| 357 // TODO(jchaffraix): Propagating the overflow to the line boxes seems | 357 // TODO(jchaffraix): Propagating the overflow to the line boxes seems |
| 358 // pretty wrong (https://crbug.com/554160). | 358 // pretty wrong (https://crbug.com/554160). |
| 359 // FIXME: Need to account for relative positioning in the layout overflow. | 359 // FIXME: Need to account for relative positioning in the layout overflow. |
| 360 if (style()->isLeftToRightDirection()) { | 360 if (style()->isLeftToRightDirection()) { |
| 361 LayoutUnit leftLineOffset = logicalLeftOffsetForLine( | 361 markerLogicalLeft = m_marker->lineOffset() - lineOffset - paddingStart() - |
| 362 blockOffset, logicalLeftOffsetForLine(blockOffset, DoNotIndentText), | |
| 363 DoNotIndentText); | |
| 364 markerLogicalLeft = leftLineOffset - lineOffset - paddingStart() - | |
| 365 borderStart() + m_marker->marginStart(); | 362 borderStart() + m_marker->marginStart(); |
| 366 m_marker->inlineBoxWrapper()->moveInInlineDirection(markerLogicalLeft - | 363 m_marker->inlineBoxWrapper()->moveInInlineDirection(markerLogicalLeft - |
| 367 markerOldLogicalLeft); | 364 markerOldLogicalLeft); |
| 368 for (InlineFlowBox* box = m_marker->inlineBoxWrapper()->parent(); box; | 365 for (InlineFlowBox* box = m_marker->inlineBoxWrapper()->parent(); box; |
| 369 box = box->parent()) { | 366 box = box->parent()) { |
| 370 LayoutRect newLogicalVisualOverflowRect = | 367 LayoutRect newLogicalVisualOverflowRect = |
| 371 box->logicalVisualOverflowRect(lineTop, lineBottom); | 368 box->logicalVisualOverflowRect(lineTop, lineBottom); |
| 372 LayoutRect newLogicalLayoutOverflowRect = | 369 LayoutRect newLogicalLayoutOverflowRect = |
| 373 box->logicalLayoutOverflowRect(lineTop, lineBottom); | 370 box->logicalLayoutOverflowRect(lineTop, lineBottom); |
| 374 if (markerLogicalLeft < newLogicalVisualOverflowRect.x() && | 371 if (markerLogicalLeft < newLogicalVisualOverflowRect.x() && |
| (...skipping 11 matching lines...) Expand all Loading... |
| 386 if (box == root) | 383 if (box == root) |
| 387 adjustOverflow = true; | 384 adjustOverflow = true; |
| 388 } | 385 } |
| 389 box->overrideOverflowFromLogicalRects(newLogicalLayoutOverflowRect, | 386 box->overrideOverflowFromLogicalRects(newLogicalLayoutOverflowRect, |
| 390 newLogicalVisualOverflowRect, | 387 newLogicalVisualOverflowRect, |
| 391 lineTop, lineBottom); | 388 lineTop, lineBottom); |
| 392 if (box->boxModelObject().hasSelfPaintingLayer()) | 389 if (box->boxModelObject().hasSelfPaintingLayer()) |
| 393 hitSelfPaintingLayer = true; | 390 hitSelfPaintingLayer = true; |
| 394 } | 391 } |
| 395 } else { | 392 } else { |
| 396 LayoutUnit rightLineOffset = logicalRightOffsetForLine( | 393 markerLogicalLeft = m_marker->lineOffset() - lineOffset + paddingStart() + |
| 397 blockOffset, logicalRightOffsetForLine(blockOffset, DoNotIndentText), | |
| 398 DoNotIndentText); | |
| 399 markerLogicalLeft = rightLineOffset - lineOffset + paddingStart() + | |
| 400 borderStart() + m_marker->marginEnd(); | 394 borderStart() + m_marker->marginEnd(); |
| 401 m_marker->inlineBoxWrapper()->moveInInlineDirection(markerLogicalLeft - | 395 m_marker->inlineBoxWrapper()->moveInInlineDirection(markerLogicalLeft - |
| 402 markerOldLogicalLeft); | 396 markerOldLogicalLeft); |
| 403 for (InlineFlowBox* box = m_marker->inlineBoxWrapper()->parent(); box; | 397 for (InlineFlowBox* box = m_marker->inlineBoxWrapper()->parent(); box; |
| 404 box = box->parent()) { | 398 box = box->parent()) { |
| 405 LayoutRect newLogicalVisualOverflowRect = | 399 LayoutRect newLogicalVisualOverflowRect = |
| 406 box->logicalVisualOverflowRect(lineTop, lineBottom); | 400 box->logicalVisualOverflowRect(lineTop, lineBottom); |
| 407 LayoutRect newLogicalLayoutOverflowRect = | 401 LayoutRect newLogicalLayoutOverflowRect = |
| 408 box->logicalLayoutOverflowRect(lineTop, lineBottom); | 402 box->logicalLayoutOverflowRect(lineTop, lineBottom); |
| 409 if (markerLogicalLeft + m_marker->logicalWidth() > | 403 if (markerLogicalLeft + m_marker->logicalWidth() > |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 // assume that all the following ones have too. | 540 // assume that all the following ones have too. |
| 547 // This gives us the opportunity to stop here and avoid | 541 // This gives us the opportunity to stop here and avoid |
| 548 // marking the same nodes again. | 542 // marking the same nodes again. |
| 549 break; | 543 break; |
| 550 } | 544 } |
| 551 item->updateValue(); | 545 item->updateValue(); |
| 552 } | 546 } |
| 553 } | 547 } |
| 554 | 548 |
| 555 } // namespace blink | 549 } // namespace blink |
| OLD | NEW |