Lines Matching refs:child

75     RenderObject* child = ruby->slowFirstChild();
76 return isRubyBeforeBlock(child) ? toRenderBlock(child) : 0;
81 RenderObject* child = ruby->slowLastChild();
82 return isRubyAfterBlock(child) ? toRenderBlock(child) : 0;
95 RenderObject* child = ruby->slowLastChild();
96 if (child && !child->isRubyRun())
97 child = child->previousSibling();
98 ASSERT(!child || child->isRubyRun() || child->isBeforeContent() || child == rubyBeforeBlock(ruby));
99 return child && child->isRubyRun() ? toRenderRubyRun(child) : 0;
102 static inline RenderRubyRun* findRubyRunParent(RenderObject* child)
104 while (child && !child->isRubyRun())
105 child = child->parent();
106 return toRenderRubyRun(child);
126 void RenderRubyAsInline::addChild(RenderObject* child, RenderObject* beforeChild)
129 if (child->isBeforeContent()) {
130 if (child->isInline()) {
132 RenderInline::addChild(child, firstChild());
140 beforeBlock->addChild(child);
144 if (child->isAfterContent()) {
145 if (child->isInline()) {
147 RenderInline::addChild(child);
155 afterBlock->addChild(child);
160 // If the child is a ruby run, just add it normally.
161 if (child->isRubyRun()) {
162 RenderInline::addChild(child, beforeChild);
167 // insert child into run
173 run->addChild(child, beforeChild);
180 // If the new child would be appended, try to add the child to the previous run
188 lastRun->addChild(child);
191 void RenderRubyAsInline::removeChild(RenderObject* child)
193 // If the child's parent is *this (must be a ruby run or generated content or anonymous block),
195 if (child->parent() == this) {
196 ASSERT(child->isRubyRun() || child->isBeforeContent() || child->isAfterContent() || isAnonymousRubyInlineBlock(child));
197 RenderInline::removeChild(child);
200 // If the child's parent is an anoymous block (must be generated :before/:after content)
202 if (isAnonymousRubyInlineBlock(child->parent())) {
203 ASSERT(child->isBeforeContent() || child->isAfterContent());
204 child->parent()->removeChild(child);
205 removeChild(child->parent());
210 RenderRubyRun* run = findRubyRunParent(child);
212 run->removeChild(child);
232 void RenderRubyAsBlock::addChild(RenderObject* child, RenderObject* beforeChild)
235 if (child->isBeforeContent()) {
236 if (child->isInline()) {
238 RenderBlockFlow::addChild(child, firstChild());
246 beforeBlock->addChild(child);
250 if (child->isAfterContent()) {
251 if (child->isInline()) {
253 RenderBlockFlow::addChild(child);
261 afterBlock->addChild(child);
266 // If the child is a ruby run, just add it normally.
267 if (child->isRubyRun()) {
268 RenderBlockFlow::addChild(child, beforeChild);
273 // insert child into run
279 run->addChild(child, beforeChild);
286 // If the new child would be appended, try to add the child to the previous run
294 lastRun->addChild(child);
297 void RenderRubyAsBlock::removeChild(RenderObject* child)
299 // If the child's parent is *this (must be a ruby run or generated content or anonymous block),
301 if (child->parent() == this) {
302 ASSERT(child->isRubyRun() || child->isBeforeContent() || child->isAfterContent() || isAnonymousRubyInlineBlock(child));
303 RenderBlockFlow::removeChild(child);
306 // If the child's parent is an anoymous block (must be generated :before/:after content)
308 if (isAnonymousRubyInlineBlock(child->parent())) {
309 ASSERT(child->isBeforeContent() || child->isAfterContent());
310 child->parent()->removeChild(child);
311 removeChild(child->parent());
316 RenderRubyRun* run = findRubyRunParent(child);
318 run->removeChild(child);