| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 } | 177 } |
| 178 } | 178 } |
| 179 } | 179 } |
| 180 | 180 |
| 181 LayoutRubyBase* LayoutRubyRun::createRubyBase() const { | 181 LayoutRubyBase* LayoutRubyRun::createRubyBase() const { |
| 182 LayoutRubyBase* layoutObject = LayoutRubyBase::createAnonymous(&document()); | 182 LayoutRubyBase* layoutObject = LayoutRubyBase::createAnonymous(&document()); |
| 183 RefPtr<ComputedStyle> newStyle = | 183 RefPtr<ComputedStyle> newStyle = |
| 184 ComputedStyle::createAnonymousStyleWithDisplay(styleRef(), | 184 ComputedStyle::createAnonymousStyleWithDisplay(styleRef(), |
| 185 EDisplay::Block); | 185 EDisplay::Block); |
| 186 newStyle->setTextAlign(ETextAlign::kCenter); // FIXME: use WEBKIT_CENTER? | 186 newStyle->setTextAlign(ETextAlign::kCenter); // FIXME: use WEBKIT_CENTER? |
| 187 layoutObject->setStyle(newStyle.release()); | 187 layoutObject->setStyle(std::move(newStyle)); |
| 188 return layoutObject; | 188 return layoutObject; |
| 189 } | 189 } |
| 190 | 190 |
| 191 LayoutRubyRun* LayoutRubyRun::staticCreateRubyRun( | 191 LayoutRubyRun* LayoutRubyRun::staticCreateRubyRun( |
| 192 const LayoutObject* parentRuby) { | 192 const LayoutObject* parentRuby) { |
| 193 ASSERT(parentRuby && parentRuby->isRuby()); | 193 ASSERT(parentRuby && parentRuby->isRuby()); |
| 194 LayoutRubyRun* rr = new LayoutRubyRun(); | 194 LayoutRubyRun* rr = new LayoutRubyRun(); |
| 195 rr->setDocumentForAnonymous(&parentRuby->document()); | 195 rr->setDocumentForAnonymous(&parentRuby->document()); |
| 196 RefPtr<ComputedStyle> newStyle = | 196 RefPtr<ComputedStyle> newStyle = |
| 197 ComputedStyle::createAnonymousStyleWithDisplay(parentRuby->styleRef(), | 197 ComputedStyle::createAnonymousStyleWithDisplay(parentRuby->styleRef(), |
| 198 EDisplay::InlineBlock); | 198 EDisplay::InlineBlock); |
| 199 rr->setStyle(newStyle.release()); | 199 rr->setStyle(std::move(newStyle)); |
| 200 return rr; | 200 return rr; |
| 201 } | 201 } |
| 202 | 202 |
| 203 LayoutObject* LayoutRubyRun::layoutSpecialExcludedChild( | 203 LayoutObject* LayoutRubyRun::layoutSpecialExcludedChild( |
| 204 bool relayoutChildren, | 204 bool relayoutChildren, |
| 205 SubtreeLayoutScope& layoutScope) { | 205 SubtreeLayoutScope& layoutScope) { |
| 206 // Don't bother positioning the LayoutRubyRun yet. | 206 // Don't bother positioning the LayoutRubyRun yet. |
| 207 LayoutRubyText* rt = rubyText(); | 207 LayoutRubyText* rt = rubyText(); |
| 208 if (!rt) | 208 if (!rt) |
| 209 return nullptr; | 209 return nullptr; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 case U_LB_GLUE: | 343 case U_LB_GLUE: |
| 344 case U_LB_OPEN_PUNCTUATION: | 344 case U_LB_OPEN_PUNCTUATION: |
| 345 return false; | 345 return false; |
| 346 default: | 346 default: |
| 347 break; | 347 break; |
| 348 } | 348 } |
| 349 return true; | 349 return true; |
| 350 } | 350 } |
| 351 | 351 |
| 352 } // namespace blink | 352 } // namespace blink |
| OLD | NEW |