| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 | 443 |
| 444 LayoutRect LayoutListMarker::selectionRectForPaintInvalidation(const LayoutBoxMo
delObject* paintInvalidationContainer) const | 444 LayoutRect LayoutListMarker::selectionRectForPaintInvalidation(const LayoutBoxMo
delObject* paintInvalidationContainer) const |
| 445 { | 445 { |
| 446 ASSERT(!needsLayout()); | 446 ASSERT(!needsLayout()); |
| 447 | 447 |
| 448 if (selectionState() == SelectionNone || !inlineBoxWrapper()) | 448 if (selectionState() == SelectionNone || !inlineBoxWrapper()) |
| 449 return LayoutRect(); | 449 return LayoutRect(); |
| 450 | 450 |
| 451 RootInlineBox& root = inlineBoxWrapper()->root(); | 451 RootInlineBox& root = inlineBoxWrapper()->root(); |
| 452 LayoutRect rect(0, root.selectionTop() - location().y(), size().width(), roo
t.selectionHeight()); | 452 LayoutRect rect(0, root.selectionTop() - location().y(), size().width(), roo
t.selectionHeight()); |
| 453 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, 0); | 453 mapToVisibleRectInContainerSpace(paintInvalidationContainer, rect, 0); |
| 454 // FIXME: groupedMapping() leaks the squashing abstraction. | 454 // FIXME: groupedMapping() leaks the squashing abstraction. |
| 455 if (paintInvalidationContainer->layer()->groupedMapping()) | 455 if (paintInvalidationContainer->layer()->groupedMapping()) |
| 456 PaintLayer::mapRectToPaintBackingCoordinates(paintInvalidationContainer,
rect); | 456 PaintLayer::mapRectToPaintBackingCoordinates(paintInvalidationContainer,
rect); |
| 457 return rect; | 457 return rect; |
| 458 } | 458 } |
| 459 | 459 |
| 460 void LayoutListMarker::listItemStyleDidChange() | 460 void LayoutListMarker::listItemStyleDidChange() |
| 461 { | 461 { |
| 462 RefPtr<ComputedStyle> newStyle = ComputedStyle::create(); | 462 RefPtr<ComputedStyle> newStyle = ComputedStyle::create(); |
| 463 // The marker always inherits from the list item, regardless of where it mig
ht end | 463 // The marker always inherits from the list item, regardless of where it mig
ht end |
| 464 // up (e.g., in some deeply nested line box). See CSS3 spec. | 464 // up (e.g., in some deeply nested line box). See CSS3 spec. |
| 465 newStyle->inheritFrom(m_listItem->styleRef()); | 465 newStyle->inheritFrom(m_listItem->styleRef()); |
| 466 if (style()) { | 466 if (style()) { |
| 467 // Reuse the current margins. Otherwise resetting the margins to initial
values | 467 // Reuse the current margins. Otherwise resetting the margins to initial
values |
| 468 // would trigger unnecessary layout. | 468 // would trigger unnecessary layout. |
| 469 newStyle->setMarginStart(style()->marginStart()); | 469 newStyle->setMarginStart(style()->marginStart()); |
| 470 newStyle->setMarginEnd(style()->marginRight()); | 470 newStyle->setMarginEnd(style()->marginRight()); |
| 471 } | 471 } |
| 472 setStyle(newStyle.release()); | 472 setStyle(newStyle.release()); |
| 473 } | 473 } |
| 474 | 474 |
| 475 } // namespace blink | 475 } // namespace blink |
| OLD | NEW |