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

Side by Side Diff: Source/core/layout/LayoutListMarker.cpp

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutListMarker.h ('k') | Source/core/layout/LayoutMedia.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 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 } 1069 }
1070 1070
1071 LayoutListMarker* LayoutListMarker::createAnonymous(LayoutListItem* item) 1071 LayoutListMarker* LayoutListMarker::createAnonymous(LayoutListItem* item)
1072 { 1072 {
1073 Document& document = item->document(); 1073 Document& document = item->document();
1074 LayoutListMarker* renderer = new LayoutListMarker(item); 1074 LayoutListMarker* renderer = new LayoutListMarker(item);
1075 renderer->setDocumentForAnonymous(&document); 1075 renderer->setDocumentForAnonymous(&document);
1076 return renderer; 1076 return renderer;
1077 } 1077 }
1078 1078
1079 void LayoutListMarker::styleWillChange(StyleDifference diff, const LayoutStyle& newStyle) 1079 void LayoutListMarker::styleWillChange(StyleDifference diff, const ComputedStyle & newStyle)
1080 { 1080 {
1081 if (style() && (newStyle.listStylePosition() != style()->listStylePosition() || newStyle.listStyleType() != style()->listStyleType())) 1081 if (style() && (newStyle.listStylePosition() != style()->listStylePosition() || newStyle.listStyleType() != style()->listStyleType()))
1082 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(); 1082 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation();
1083 1083
1084 LayoutBox::styleWillChange(diff, newStyle); 1084 LayoutBox::styleWillChange(diff, newStyle);
1085 } 1085 }
1086 1086
1087 void LayoutListMarker::styleDidChange(StyleDifference diff, const LayoutStyle* o ldStyle) 1087 void LayoutListMarker::styleDidChange(StyleDifference diff, const ComputedStyle* oldStyle)
1088 { 1088 {
1089 LayoutBox::styleDidChange(diff, oldStyle); 1089 LayoutBox::styleDidChange(diff, oldStyle);
1090 1090
1091 if (m_image != style()->listStyleImage()) { 1091 if (m_image != style()->listStyleImage()) {
1092 if (m_image) 1092 if (m_image)
1093 m_image->removeClient(this); 1093 m_image->removeClient(this);
1094 m_image = style()->listStyleImage(); 1094 m_image = style()->listStyleImage();
1095 if (m_image) 1095 if (m_image)
1096 m_image->addClient(this); 1096 m_image->addClient(this);
1097 } 1097 }
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 LayoutRect rect(0, root.selectionTop() - location().y(), size().width(), roo t.selectionHeight()); 1629 LayoutRect rect(0, root.selectionTop() - location().y(), size().width(), roo t.selectionHeight());
1630 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, 0); 1630 mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, 0);
1631 // FIXME: groupedMapping() leaks the squashing abstraction. 1631 // FIXME: groupedMapping() leaks the squashing abstraction.
1632 if (paintInvalidationContainer->layer()->groupedMapping()) 1632 if (paintInvalidationContainer->layer()->groupedMapping())
1633 DeprecatedPaintLayer::mapRectToPaintBackingCoordinates(paintInvalidation Container, rect); 1633 DeprecatedPaintLayer::mapRectToPaintBackingCoordinates(paintInvalidation Container, rect);
1634 return rect; 1634 return rect;
1635 } 1635 }
1636 1636
1637 void LayoutListMarker::listItemStyleDidChange() 1637 void LayoutListMarker::listItemStyleDidChange()
1638 { 1638 {
1639 RefPtr<LayoutStyle> newStyle = LayoutStyle::create(); 1639 RefPtr<ComputedStyle> newStyle = ComputedStyle::create();
1640 // The marker always inherits from the list item, regardless of where it mig ht end 1640 // The marker always inherits from the list item, regardless of where it mig ht end
1641 // up (e.g., in some deeply nested line box). See CSS3 spec. 1641 // up (e.g., in some deeply nested line box). See CSS3 spec.
1642 newStyle->inheritFrom(m_listItem->styleRef()); 1642 newStyle->inheritFrom(m_listItem->styleRef());
1643 if (style()) { 1643 if (style()) {
1644 // Reuse the current margins. Otherwise resetting the margins to initial values 1644 // Reuse the current margins. Otherwise resetting the margins to initial values
1645 // would trigger unnecessary layout. 1645 // would trigger unnecessary layout.
1646 newStyle->setMarginStart(style()->marginStart()); 1646 newStyle->setMarginStart(style()->marginStart());
1647 newStyle->setMarginEnd(style()->marginRight()); 1647 newStyle->setMarginEnd(style()->marginRight());
1648 } 1648 }
1649 setStyle(newStyle.release()); 1649 setStyle(newStyle.release());
1650 } 1650 }
1651 1651
1652 } // namespace blink 1652 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutListMarker.h ('k') | Source/core/layout/LayoutMedia.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698