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

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

Issue 778003003: List marker pseudo elements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 10 matching lines...) Expand all
21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #include "config.h" 27 #include "config.h"
28 #include "core/rendering/RenderObjectChildList.h" 28 #include "core/rendering/RenderObjectChildList.h"
29 29
30 #include "core/dom/AXObjectCache.h" 30 #include "core/dom/AXObjectCache.h"
31 #include "core/dom/MarkerPseudoElement.h"
31 #include "core/layout/LayoutCounter.h" 32 #include "core/layout/LayoutCounter.h"
32 #include "core/rendering/RenderLayer.h" 33 #include "core/rendering/RenderLayer.h"
33 #include "core/rendering/RenderObject.h" 34 #include "core/rendering/RenderObject.h"
34 #include "core/rendering/RenderView.h" 35 #include "core/rendering/RenderView.h"
35 #include "core/rendering/style/RenderStyle.h" 36 #include "core/rendering/style/RenderStyle.h"
36 37
37 namespace blink { 38 namespace blink {
38 39
39 void RenderObjectChildList::trace(Visitor* visitor) 40 void RenderObjectChildList::trace(Visitor* visitor)
40 { 41 {
41 visitor->trace(m_firstChild); 42 visitor->trace(m_firstChild);
42 visitor->trace(m_lastChild); 43 visitor->trace(m_lastChild);
43 } 44 }
44 45
45 void RenderObjectChildList::destroyLeftoverChildren() 46 void RenderObjectChildList::destroyLeftoverChildren()
46 { 47 {
47 while (firstChild()) { 48 while (firstChild()) {
48 // List markers are owned by their enclosing list and so don't get destr oyed by this container. 49 // List markers are owned by their enclosing list and so don't get destr oyed by this container.
49 if (firstChild()->isListMarker()) { 50 if (firstChild()->isListMarker()) {
50 firstChild()->remove(); 51 if (RuntimeEnabledFeatures::listMarkerPseudoElementEnabled()) {
Julien - ping for review 2015/02/04 01:56:34 Adding a branch here is not a great idea. It would
dsinclair 2015/02/04 04:41:33 The problem is, MarkerPseudoElement isn't invoked.
52 if (firstChild()->node() && firstChild()->node()->isMarkerPseudo Element() && firstChild()->node()->parentNode()) {
53 toMarkerPseudoElement(firstChild()->node())->removeListMarke r();
54 firstChild()->destroy();
55 } else {
56 firstChild()->remove();
57 }
58 } else {
59 firstChild()->remove();
60 }
51 continue; 61 continue;
52 } 62 }
53 63
54 // Destroy any anonymous children remaining in the render tree, as well as implicit (shadow) DOM elements like those used in the engine-based text field s. 64 // Destroy any anonymous children remaining in the render tree, as well as implicit (shadow) DOM elements like those used in the engine-based text field s.
55 if (firstChild()->node()) 65 if (firstChild()->node())
56 firstChild()->node()->setRenderer(0); 66 firstChild()->node()->setRenderer(0);
57 firstChild()->destroy(); 67 firstChild()->destroy();
58 } 68 }
59 } 69 }
60 70
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 return; 190 return;
181 if (oldChild.isBody()) { 191 if (oldChild.isBody()) {
182 oldChild.view()->setShouldDoFullPaintInvalidation(); 192 oldChild.view()->setShouldDoFullPaintInvalidation();
183 return; 193 return;
184 } 194 }
185 DisableCompositingQueryAsserts disabler; 195 DisableCompositingQueryAsserts disabler;
186 oldChild.invalidatePaintUsingContainer(oldChild.containerForPaintInvalidatio n(), oldChild.previousPaintInvalidationRect(), PaintInvalidationRendererRemoval) ; 196 oldChild.invalidatePaintUsingContainer(oldChild.containerForPaintInvalidatio n(), oldChild.previousPaintInvalidationRect(), PaintInvalidationRendererRemoval) ;
187 } 197 }
188 198
189 } // namespace blink 199 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698