OLD | NEW |
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 if (!hasRubyText() && !hasRubyBase()) { | 181 if (!hasRubyText() && !hasRubyBase()) { |
182 deleteLineBoxTree(); | 182 deleteLineBoxTree(); |
183 destroy(); | 183 destroy(); |
184 } | 184 } |
185 } | 185 } |
186 } | 186 } |
187 | 187 |
188 LayoutRubyBase* LayoutRubyRun::createRubyBase() const | 188 LayoutRubyBase* LayoutRubyRun::createRubyBase() const |
189 { | 189 { |
190 LayoutRubyBase* layoutObject = LayoutRubyBase::createAnonymous(&document()); | 190 LayoutRubyBase* layoutObject = LayoutRubyBase::createAnonymous(&document()); |
191 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp
lay(styleRef(), BLOCK); | 191 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp
lay(styleRef(), EDisplay::Block); |
192 newStyle->setTextAlign(CENTER); // FIXME: use WEBKIT_CENTER? | 192 newStyle->setTextAlign(CENTER); // FIXME: use WEBKIT_CENTER? |
193 layoutObject->setStyle(newStyle.release()); | 193 layoutObject->setStyle(newStyle.release()); |
194 return layoutObject; | 194 return layoutObject; |
195 } | 195 } |
196 | 196 |
197 LayoutRubyRun* LayoutRubyRun::staticCreateRubyRun(const LayoutObject* parentRuby
) | 197 LayoutRubyRun* LayoutRubyRun::staticCreateRubyRun(const LayoutObject* parentRuby
) |
198 { | 198 { |
199 ASSERT(parentRuby && parentRuby->isRuby()); | 199 ASSERT(parentRuby && parentRuby->isRuby()); |
200 LayoutRubyRun* rr = new LayoutRubyRun(); | 200 LayoutRubyRun* rr = new LayoutRubyRun(); |
201 rr->setDocumentForAnonymous(&parentRuby->document()); | 201 rr->setDocumentForAnonymous(&parentRuby->document()); |
202 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp
lay(parentRuby->styleRef(), INLINE_BLOCK); | 202 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisp
lay(parentRuby->styleRef(), EDisplay::InlineBlock); |
203 rr->setStyle(newStyle.release()); | 203 rr->setStyle(newStyle.release()); |
204 return rr; | 204 return rr; |
205 } | 205 } |
206 | 206 |
207 LayoutObject* LayoutRubyRun::layoutSpecialExcludedChild(bool relayoutChildren, S
ubtreeLayoutScope& layoutScope) | 207 LayoutObject* LayoutRubyRun::layoutSpecialExcludedChild(bool relayoutChildren, S
ubtreeLayoutScope& layoutScope) |
208 { | 208 { |
209 // Don't bother positioning the LayoutRubyRun yet. | 209 // Don't bother positioning the LayoutRubyRun yet. |
210 LayoutRubyText* rt = rubyText(); | 210 LayoutRubyText* rt = rubyText(); |
211 if (!rt) | 211 if (!rt) |
212 return nullptr; | 212 return nullptr; |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 case U_LB_GLUE: | 324 case U_LB_GLUE: |
325 case U_LB_OPEN_PUNCTUATION: | 325 case U_LB_OPEN_PUNCTUATION: |
326 return false; | 326 return false; |
327 default: | 327 default: |
328 break; | 328 break; |
329 } | 329 } |
330 return true; | 330 return true; |
331 } | 331 } |
332 | 332 |
333 } // namespace blink | 333 } // namespace blink |
OLD | NEW |