Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: Source/core/rendering/RenderListMarker.cpp

Issue 696703005: Remove RenderSelectionInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated after Kouhei's comment. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 LayoutRect RenderListMarker::selectionRectForPaintInvalidation(const RenderLayer ModelObject* paintInvalidationContainer) const 1623 LayoutRect RenderListMarker::selectionRectForPaintInvalidation(const RenderLayer ModelObject* paintInvalidationContainer) const
1624 { 1624 {
1625 ASSERT(!needsLayout()); 1625 ASSERT(!needsLayout());
1626 1626
1627 if (selectionState() == SelectionNone || !inlineBoxWrapper()) 1627 if (selectionState() == SelectionNone || !inlineBoxWrapper())
1628 return LayoutRect(); 1628 return LayoutRect();
1629 1629
1630 RootInlineBox& root = inlineBoxWrapper()->root(); 1630 RootInlineBox& root = inlineBoxWrapper()->root();
1631 LayoutRect rect(0, root.selectionTop() - y(), width(), root.selectionHeight( )); 1631 LayoutRect rect(0, root.selectionTop() - y(), width(), root.selectionHeight( ));
1632 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, 0); 1632 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, 0);
1633 // FIXME: groupedMapping() leaks the squashing abstraction.
1634 if (paintInvalidationContainer->layer()->groupedMapping())
1635 RenderLayer::mapRectToPaintBackingCoordinates(paintInvalidationContainer , rect);
1633 return rect; 1636 return rect;
1634 } 1637 }
1635 1638
1636 void RenderListMarker::listItemStyleDidChange() 1639 void RenderListMarker::listItemStyleDidChange()
1637 { 1640 {
1638 RefPtr<RenderStyle> newStyle = RenderStyle::create(); 1641 RefPtr<RenderStyle> newStyle = RenderStyle::create();
1639 // The marker always inherits from the list item, regardless of where it mig ht end 1642 // The marker always inherits from the list item, regardless of where it mig ht end
1640 // up (e.g., in some deeply nested line box). See CSS3 spec. 1643 // up (e.g., in some deeply nested line box). See CSS3 spec.
1641 newStyle->inheritFrom(m_listItem->style()); 1644 newStyle->inheritFrom(m_listItem->style());
1642 if (style()) { 1645 if (style()) {
1643 // Reuse the current margins. Otherwise resetting the margins to initial values 1646 // Reuse the current margins. Otherwise resetting the margins to initial values
1644 // would trigger unnecessary layout. 1647 // would trigger unnecessary layout.
1645 newStyle->setMarginStart(style()->marginStart()); 1648 newStyle->setMarginStart(style()->marginStart());
1646 newStyle->setMarginEnd(style()->marginRight()); 1649 newStyle->setMarginEnd(style()->marginRight());
1647 } 1650 }
1648 setStyle(newStyle.release()); 1651 setStyle(newStyle.release());
1649 } 1652 }
1650 1653
1651 } // namespace blink 1654 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698