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

Unified Diff: Source/core/rendering/RenderListItem.cpp

Issue 18496005: Dirty line boxes when moving list marker from another block. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Renaming markerPar Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/lists/list-inside-columns-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderListItem.cpp
diff --git a/Source/core/rendering/RenderListItem.cpp b/Source/core/rendering/RenderListItem.cpp
index fd911150e8566d48e3f436e4d2474847e1fd00e5..f6e8b409800c64ae16a3644b0e3945a7f4598f55 100644
--- a/Source/core/rendering/RenderListItem.cpp
+++ b/Source/core/rendering/RenderListItem.cpp
@@ -268,32 +268,34 @@ void RenderListItem::updateMarkerLocation()
{
// Sanity check the location of our marker.
if (m_marker) {
- RenderObject* markerPar = m_marker->parent();
+ RenderObject* markerParent = m_marker->parent();
RenderObject* lineBoxParent = getParentOfFirstLineBox(this, m_marker);
if (!lineBoxParent) {
// If the marker is currently contained inside an anonymous box,
// then we are the only item in that anonymous box (since no line box
// parent was found). It's ok to just leave the marker where it is
// in this case.
- if (markerPar && markerPar->isAnonymousBlock())
- lineBoxParent = markerPar;
+ if (markerParent && markerParent->isAnonymousBlock())
+ lineBoxParent = markerParent;
else
lineBoxParent = this;
}
- if (markerPar != lineBoxParent || m_marker->preferredLogicalWidthsDirty()) {
+ if (markerParent != lineBoxParent || m_marker->preferredLogicalWidthsDirty()) {
// Removing and adding the marker can trigger repainting in
// containers other than ourselves, so we need to disable LayoutState.
LayoutStateDisabler layoutStateDisabler(view());
updateFirstLetter();
m_marker->remove();
+ if (markerParent)
+ markerParent->dirtyLinesFromChangedChild(m_marker);
if (!lineBoxParent)
lineBoxParent = this;
lineBoxParent->addChild(m_marker, firstNonMarkerChild(lineBoxParent));
m_marker->updateMarginsAndContent();
- // If markerPar is an anonymous block that has lost all its children, destroy it.
- if (markerPar && markerPar->isAnonymousBlock() && !markerPar->firstChild() && !toRenderBlock(markerPar)->continuation())
- markerPar->destroy();
+ // If markerParent is an anonymous block that has lost all its children, destroy it.
+ if (markerParent && markerParent->isAnonymousBlock() && !markerParent->firstChild() && !toRenderBlock(markerParent)->continuation())
+ markerParent->destroy();
}
}
}
« no previous file with comments | « LayoutTests/fast/lists/list-inside-columns-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698