| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 } | 546 } |
| 547 renderer = renderer->nextInPreOrder(); | 547 renderer = renderer->nextInPreOrder(); |
| 548 } | 548 } |
| 549 } | 549 } |
| 550 | 550 |
| 551 void FastTextAutosizer::setAllTextNeedsLayout() | 551 void FastTextAutosizer::setAllTextNeedsLayout() |
| 552 { | 552 { |
| 553 RenderObject* renderer = m_document->renderer(); | 553 RenderObject* renderer = m_document->renderer(); |
| 554 while (renderer) { | 554 while (renderer) { |
| 555 if (renderer->isText()) | 555 if (renderer->isText()) |
| 556 renderer->setNeedsLayout(); | 556 renderer->setNeedsLayoutAndFullRepaint(); |
| 557 renderer = renderer->nextInPreOrder(); | 557 renderer = renderer->nextInPreOrder(); |
| 558 } | 558 } |
| 559 } | 559 } |
| 560 | 560 |
| 561 FastTextAutosizer::BlockFlags FastTextAutosizer::classifyBlock(const RenderObjec
t* renderer, BlockFlags mask) | 561 FastTextAutosizer::BlockFlags FastTextAutosizer::classifyBlock(const RenderObjec
t* renderer, BlockFlags mask) |
| 562 { | 562 { |
| 563 if (!renderer->isRenderBlock()) | 563 if (!renderer->isRenderBlock()) |
| 564 return 0; | 564 return 0; |
| 565 | 565 |
| 566 const RenderBlock* block = toRenderBlock(renderer); | 566 const RenderBlock* block = toRenderBlock(renderer); |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 948 style->setTextAutosizingMultiplier(multiplier); | 948 style->setTextAutosizingMultiplier(multiplier); |
| 949 style->setUnique(); | 949 style->setUnique(); |
| 950 | 950 |
| 951 switch (relayoutBehavior) { | 951 switch (relayoutBehavior) { |
| 952 case AlreadyInLayout: | 952 case AlreadyInLayout: |
| 953 // Don't free currentStyle until the end of the layout pass. This allows
other parts of the system | 953 // Don't free currentStyle until the end of the layout pass. This allows
other parts of the system |
| 954 // to safely hold raw RenderStyle* pointers during layout, e.g. Breaking
Context::m_currentStyle. | 954 // to safely hold raw RenderStyle* pointers during layout, e.g. Breaking
Context::m_currentStyle. |
| 955 m_stylesRetainedDuringLayout.append(currentStyle); | 955 m_stylesRetainedDuringLayout.append(currentStyle); |
| 956 | 956 |
| 957 renderer->setStyleInternal(style.release()); | 957 renderer->setStyleInternal(style.release()); |
| 958 renderer->setNeedsLayout(); | 958 renderer->setNeedsLayoutAndFullRepaint(); |
| 959 if (renderer->isRenderBlock()) | 959 if (renderer->isRenderBlock()) |
| 960 toRenderBlock(renderer)->invalidateLineHeight(); | 960 toRenderBlock(renderer)->invalidateLineHeight(); |
| 961 break; | 961 break; |
| 962 | 962 |
| 963 case LayoutNeeded: | 963 case LayoutNeeded: |
| 964 renderer->setStyle(style.release()); | 964 renderer->setStyle(style.release()); |
| 965 break; | 965 break; |
| 966 } | 966 } |
| 967 | 967 |
| 968 if (multiplier != 1) | 968 if (multiplier != 1) |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 FastTextAutosizer::DeferUpdatePageInfo::~DeferUpdatePageInfo() | 1113 FastTextAutosizer::DeferUpdatePageInfo::~DeferUpdatePageInfo() |
| 1114 { | 1114 { |
| 1115 if (FastTextAutosizer* textAutosizer = m_mainFrame->document()->fastTextAuto
sizer()) { | 1115 if (FastTextAutosizer* textAutosizer = m_mainFrame->document()->fastTextAuto
sizer()) { |
| 1116 ASSERT(textAutosizer->m_updatePageInfoDeferred); | 1116 ASSERT(textAutosizer->m_updatePageInfoDeferred); |
| 1117 textAutosizer->m_updatePageInfoDeferred = false; | 1117 textAutosizer->m_updatePageInfoDeferred = false; |
| 1118 textAutosizer->updatePageInfoInAllFrames(); | 1118 textAutosizer->updatePageInfoInAllFrames(); |
| 1119 } | 1119 } |
| 1120 } | 1120 } |
| 1121 | 1121 |
| 1122 } // namespace WebCore | 1122 } // namespace WebCore |
| OLD | NEW |