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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutListItem.cpp

Issue 2328623003: Fix incorrectly positioned block element inside list-style-position:inside item (Closed)
Patch Set: update aria-owns-expected-mac.txt Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/pasteboard/drag-drop-list-expected.txt ('k') | no next file » | 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, 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) 5 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 while (result && result->isListMarker()) 292 while (result && result->isListMarker())
293 result = result->nextSibling(); 293 result = result->nextSibling();
294 return result; 294 return result;
295 } 295 }
296 296
297 bool LayoutListItem::updateMarkerLocation() 297 bool LayoutListItem::updateMarkerLocation()
298 { 298 {
299 ASSERT(m_marker); 299 ASSERT(m_marker);
300 300
301 LayoutObject* markerParent = m_marker->parent(); 301 LayoutObject* markerParent = m_marker->parent();
302 LayoutObject* lineBoxParent = getParentOfFirstLineBox(this, m_marker); 302 // list-style-position:inside makes the ::marker pseudo an ordinary position :static element that should be attached to LayoutListItem block.
303 LayoutObject* lineBoxParent = m_marker->isInside() ? this : getParentOfFirst LineBox(this, m_marker);
303 if (!lineBoxParent) { 304 if (!lineBoxParent) {
304 // If the marker is currently contained inside an anonymous box, then we 305 // If the marker is currently contained inside an anonymous box, then we
305 // are the only item in that anonymous box (since no line box parent was 306 // are the only item in that anonymous box (since no line box parent was
306 // found). It's ok to just leave the marker where it is in this case. 307 // found). It's ok to just leave the marker where it is in this case.
307 if (markerParent && markerParent->isAnonymousBlock()) 308 if (markerParent && markerParent->isAnonymousBlock())
308 lineBoxParent = markerParent; 309 lineBoxParent = markerParent;
309 else 310 else
310 lineBoxParent = this; 311 lineBoxParent = this;
311 } 312 }
312 313
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 // assume that all the following ones have too. 509 // assume that all the following ones have too.
509 // This gives us the opportunity to stop here and avoid 510 // This gives us the opportunity to stop here and avoid
510 // marking the same nodes again. 511 // marking the same nodes again.
511 break; 512 break;
512 } 513 }
513 item->updateValue(); 514 item->updateValue();
514 } 515 }
515 } 516 }
516 517
517 } // namespace blink 518 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/editing/pasteboard/drag-drop-list-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698