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

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

Issue 53373003: Remove display:run-in as per https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/_tHSX… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix test Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderObject.cpp ('k') | Source/core/rendering/RenderProgress.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) 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 20 matching lines...) Expand all
31 #include "core/rendering/RenderCounter.h" 31 #include "core/rendering/RenderCounter.h"
32 #include "core/rendering/RenderObject.h" 32 #include "core/rendering/RenderObject.h"
33 #include "core/rendering/RenderView.h" 33 #include "core/rendering/RenderView.h"
34 #include "core/rendering/style/RenderStyle.h" 34 #include "core/rendering/style/RenderStyle.h"
35 35
36 namespace WebCore { 36 namespace WebCore {
37 37
38 void RenderObjectChildList::destroyLeftoverChildren() 38 void RenderObjectChildList::destroyLeftoverChildren()
39 { 39 {
40 while (firstChild()) { 40 while (firstChild()) {
41 if (firstChild()->isListMarker() || (firstChild()->style()->styleType() == FIRST_LETTER && !firstChild()->isText())) 41 if (firstChild()->isListMarker() || (firstChild()->style()->styleType() == FIRST_LETTER && !firstChild()->isText())) {
42 firstChild()->remove(); // List markers are owned by their enclosin g list and so don't get destroyed by this container. Similarly, first letters ar e destroyed by their remaining text fragment. 42 firstChild()->remove(); // List markers are owned by their enclosin g list and so don't get destroyed by this container. Similarly, first letters ar e destroyed by their remaining text fragment.
43 else if (firstChild()->isRunIn() && firstChild()->node()) {
44 firstChild()->node()->setRenderer(0);
45 firstChild()->node()->setNeedsStyleRecalc();
46 firstChild()->destroy();
47 } else { 43 } else {
48 // Destroy any anonymous children remaining in the render tree, as w ell as implicit (shadow) DOM elements like those used in the engine-based text f ields. 44 // Destroy any anonymous children remaining in the render tree, as w ell as implicit (shadow) DOM elements like those used in the engine-based text f ields.
49 if (firstChild()->node()) 45 if (firstChild()->node())
50 firstChild()->node()->setRenderer(0); 46 firstChild()->node()->setRenderer(0);
51 firstChild()->destroy(); 47 firstChild()->destroy();
52 } 48 }
53 } 49 }
54 } 50 }
55 51
56 RenderObject* RenderObjectChildList::removeChildNode(RenderObject* owner, Render Object* oldChild, bool notifyRenderer) 52 RenderObject* RenderObjectChildList::removeChildNode(RenderObject* owner, Render Object* oldChild, bool notifyRenderer)
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 155
160 newChild->setNeedsLayoutAndPrefWidthsRecalc(); 156 newChild->setNeedsLayoutAndPrefWidthsRecalc();
161 if (!owner->normalChildNeedsLayout()) 157 if (!owner->normalChildNeedsLayout())
162 owner->setChildNeedsLayout(); // We may supply the static position for a n absolute positioned child. 158 owner->setChildNeedsLayout(); // We may supply the static position for a n absolute positioned child.
163 159
164 if (AXObjectCache* cache = owner->document().axObjectCache()) 160 if (AXObjectCache* cache = owner->document().axObjectCache())
165 cache->childrenChanged(owner); 161 cache->childrenChanged(owner);
166 } 162 }
167 163
168 } // namespace WebCore 164 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderObject.cpp ('k') | Source/core/rendering/RenderProgress.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698