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

Side by Side Diff: Source/WebCore/rendering/RenderRuby.cpp

Issue 7833032: Merge 94543 - Style not propagated to anonymous boxes and anonymous (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 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 | « Source/WebCore/rendering/RenderRuby.h ('k') | Source/WebCore/rendering/RenderTable.cpp » ('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 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 RenderRubyAsInline::RenderRubyAsInline(Node* node) 113 RenderRubyAsInline::RenderRubyAsInline(Node* node)
114 : RenderInline(node) 114 : RenderInline(node)
115 { 115 {
116 } 116 }
117 117
118 RenderRubyAsInline::~RenderRubyAsInline() 118 RenderRubyAsInline::~RenderRubyAsInline()
119 { 119 {
120 } 120 }
121 121
122 void RenderRubyAsInline::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
123 {
124 RenderInline::styleDidChange(diff, oldStyle);
125 propagateStyleToAnonymousChildren();
126 }
127
122 void RenderRubyAsInline::addChild(RenderObject* child, RenderObject* beforeChild ) 128 void RenderRubyAsInline::addChild(RenderObject* child, RenderObject* beforeChild )
123 { 129 {
124 // Insert :before and :after content before/after the RenderRubyRun(s) 130 // Insert :before and :after content before/after the RenderRubyRun(s)
125 if (child->isBeforeContent()) { 131 if (child->isBeforeContent()) {
126 if (child->isInline()) { 132 if (child->isInline()) {
127 // Add generated inline content normally 133 // Add generated inline content normally
128 RenderInline::addChild(child, firstChild()); 134 RenderInline::addChild(child, firstChild());
129 } else { 135 } else {
130 // Wrap non-inline content with an anonymous inline-block. 136 // Wrap non-inline content with an anonymous inline-block.
131 RenderBlock* beforeBlock = rubyBeforeBlock(this); 137 RenderBlock* beforeBlock = rubyBeforeBlock(this);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 219
214 RenderRubyAsBlock::RenderRubyAsBlock(Node* node) 220 RenderRubyAsBlock::RenderRubyAsBlock(Node* node)
215 : RenderBlock(node) 221 : RenderBlock(node)
216 { 222 {
217 } 223 }
218 224
219 RenderRubyAsBlock::~RenderRubyAsBlock() 225 RenderRubyAsBlock::~RenderRubyAsBlock()
220 { 226 {
221 } 227 }
222 228
229 void RenderRubyAsBlock::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
230 {
231 RenderBlock::styleDidChange(diff, oldStyle);
232 propagateStyleToAnonymousChildren();
233 }
234
223 void RenderRubyAsBlock::addChild(RenderObject* child, RenderObject* beforeChild) 235 void RenderRubyAsBlock::addChild(RenderObject* child, RenderObject* beforeChild)
224 { 236 {
225 // Insert :before and :after content before/after the RenderRubyRun(s) 237 // Insert :before and :after content before/after the RenderRubyRun(s)
226 if (child->isBeforeContent()) { 238 if (child->isBeforeContent()) {
227 if (child->isInline()) { 239 if (child->isInline()) {
228 // Add generated inline content normally 240 // Add generated inline content normally
229 RenderBlock::addChild(child, firstChild()); 241 RenderBlock::addChild(child, firstChild());
230 } else { 242 } else {
231 // Wrap non-inline content with an anonymous inline-block. 243 // Wrap non-inline content with an anonymous inline-block.
232 RenderBlock* beforeBlock = rubyBeforeBlock(this); 244 RenderBlock* beforeBlock = rubyBeforeBlock(this);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 return; 315 return;
304 } 316 }
305 317
306 // Otherwise find the containing run and remove it from there. 318 // Otherwise find the containing run and remove it from there.
307 RenderRubyRun* run = findRubyRunParent(child); 319 RenderRubyRun* run = findRubyRunParent(child);
308 ASSERT(run); 320 ASSERT(run);
309 run->removeChild(child); 321 run->removeChild(child);
310 } 322 }
311 323
312 } // namespace WebCore 324 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderRuby.h ('k') | Source/WebCore/rendering/RenderTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698