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, 2007, 2008 Apple Inc. All rights reserv
ed. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv
ed. |
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
6 * Copyright (C) 2010 Daniel Bates (dbates@intudata.com) | 6 * Copyright (C) 2010 Daniel Bates (dbates@intudata.com) |
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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 | 441 |
442 LayoutRect LayoutListMarker::selectionRectForPaintInvalidation(const LayoutBoxMo
delObject* paintInvalidationContainer) const | 442 LayoutRect LayoutListMarker::selectionRectForPaintInvalidation(const LayoutBoxMo
delObject* paintInvalidationContainer) const |
443 { | 443 { |
444 ASSERT(!needsLayout()); | 444 ASSERT(!needsLayout()); |
445 | 445 |
446 if (getSelectionState() == SelectionNone || !inlineBoxWrapper()) | 446 if (getSelectionState() == SelectionNone || !inlineBoxWrapper()) |
447 return LayoutRect(); | 447 return LayoutRect(); |
448 | 448 |
449 RootInlineBox& root = inlineBoxWrapper()->root(); | 449 RootInlineBox& root = inlineBoxWrapper()->root(); |
450 LayoutRect rect(LayoutUnit(), root.selectionTop() - location().y(), size().w
idth(), root.selectionHeight()); | 450 LayoutRect rect(LayoutUnit(), root.selectionTop() - location().y(), size().w
idth(), root.selectionHeight()); |
451 mapToVisibleRectInAncestorSpace(paintInvalidationContainer, rect, nullptr); | 451 mapToVisibleRectInAncestorSpace(paintInvalidationContainer, rect, nullptr, f
alse); |
452 // FIXME: groupedMapping() leaks the squashing abstraction. | 452 // FIXME: groupedMapping() leaks the squashing abstraction. |
453 if (paintInvalidationContainer->layer()->groupedMapping()) | 453 if (paintInvalidationContainer->layer()->groupedMapping()) |
454 PaintLayer::mapRectToPaintBackingCoordinates(paintInvalidationContainer,
rect); | 454 PaintLayer::mapRectToPaintBackingCoordinates(paintInvalidationContainer,
rect); |
455 return rect; | 455 return rect; |
456 } | 456 } |
457 | 457 |
458 void LayoutListMarker::listItemStyleDidChange() | 458 void LayoutListMarker::listItemStyleDidChange() |
459 { | 459 { |
460 RefPtr<ComputedStyle> newStyle = ComputedStyle::create(); | 460 RefPtr<ComputedStyle> newStyle = ComputedStyle::create(); |
461 // The marker always inherits from the list item, regardless of where it mig
ht end | 461 // The marker always inherits from the list item, regardless of where it mig
ht end |
462 // up (e.g., in some deeply nested line box). See CSS3 spec. | 462 // up (e.g., in some deeply nested line box). See CSS3 spec. |
463 newStyle->inheritFrom(m_listItem->styleRef()); | 463 newStyle->inheritFrom(m_listItem->styleRef()); |
464 if (style()) { | 464 if (style()) { |
465 // Reuse the current margins. Otherwise resetting the margins to initial
values | 465 // Reuse the current margins. Otherwise resetting the margins to initial
values |
466 // would trigger unnecessary layout. | 466 // would trigger unnecessary layout. |
467 newStyle->setMarginStart(style()->marginStart()); | 467 newStyle->setMarginStart(style()->marginStart()); |
468 newStyle->setMarginEnd(style()->marginRight()); | 468 newStyle->setMarginEnd(style()->marginRight()); |
469 } | 469 } |
470 setStyle(newStyle.release()); | 470 setStyle(newStyle.release()); |
471 } | 471 } |
472 | 472 |
473 } // namespace blink | 473 } // namespace blink |
OLD | NEW |