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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 } | 557 } |
558 renderer = renderer->nextInPreOrder(); | 558 renderer = renderer->nextInPreOrder(); |
559 } | 559 } |
560 } | 560 } |
561 | 561 |
562 void FastTextAutosizer::setAllTextNeedsLayout() | 562 void FastTextAutosizer::setAllTextNeedsLayout() |
563 { | 563 { |
564 RenderObject* renderer = m_document->renderView(); | 564 RenderObject* renderer = m_document->renderView(); |
565 while (renderer) { | 565 while (renderer) { |
566 if (renderer->isText()) | 566 if (renderer->isText()) |
567 renderer->setNeedsLayoutAndFullRepaint(); | 567 renderer->setNeedsLayoutAndFullPaintInvalidation(); |
568 renderer = renderer->nextInPreOrder(); | 568 renderer = renderer->nextInPreOrder(); |
569 } | 569 } |
570 } | 570 } |
571 | 571 |
572 FastTextAutosizer::BlockFlags FastTextAutosizer::classifyBlock(const RenderObjec
t* renderer, BlockFlags mask) | 572 FastTextAutosizer::BlockFlags FastTextAutosizer::classifyBlock(const RenderObjec
t* renderer, BlockFlags mask) |
573 { | 573 { |
574 if (!renderer->isRenderBlock()) | 574 if (!renderer->isRenderBlock()) |
575 return 0; | 575 return 0; |
576 | 576 |
577 const RenderBlock* block = toRenderBlock(renderer); | 577 const RenderBlock* block = toRenderBlock(renderer); |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 style->setTextAutosizingMultiplier(multiplier); | 959 style->setTextAutosizingMultiplier(multiplier); |
960 style->setUnique(); | 960 style->setUnique(); |
961 | 961 |
962 switch (relayoutBehavior) { | 962 switch (relayoutBehavior) { |
963 case AlreadyInLayout: | 963 case AlreadyInLayout: |
964 // Don't free currentStyle until the end of the layout pass. This allows
other parts of the system | 964 // Don't free currentStyle until the end of the layout pass. This allows
other parts of the system |
965 // to safely hold raw RenderStyle* pointers during layout, e.g. Breaking
Context::m_currentStyle. | 965 // to safely hold raw RenderStyle* pointers during layout, e.g. Breaking
Context::m_currentStyle. |
966 m_stylesRetainedDuringLayout.append(currentStyle); | 966 m_stylesRetainedDuringLayout.append(currentStyle); |
967 | 967 |
968 renderer->setStyleInternal(style.release()); | 968 renderer->setStyleInternal(style.release()); |
969 renderer->setNeedsLayoutAndFullRepaint(); | 969 renderer->setNeedsLayoutAndFullPaintInvalidation(); |
970 if (renderer->isRenderBlock()) | 970 if (renderer->isRenderBlock()) |
971 toRenderBlock(renderer)->invalidateLineHeight(); | 971 toRenderBlock(renderer)->invalidateLineHeight(); |
972 break; | 972 break; |
973 | 973 |
974 case LayoutNeeded: | 974 case LayoutNeeded: |
975 renderer->setStyle(style.release()); | 975 renderer->setStyle(style.release()); |
976 break; | 976 break; |
977 } | 977 } |
978 | 978 |
979 if (multiplier != 1) | 979 if (multiplier != 1) |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1124 FastTextAutosizer::DeferUpdatePageInfo::~DeferUpdatePageInfo() | 1124 FastTextAutosizer::DeferUpdatePageInfo::~DeferUpdatePageInfo() |
1125 { | 1125 { |
1126 if (FastTextAutosizer* textAutosizer = m_mainFrame->document()->fastTextAuto
sizer()) { | 1126 if (FastTextAutosizer* textAutosizer = m_mainFrame->document()->fastTextAuto
sizer()) { |
1127 ASSERT(textAutosizer->m_updatePageInfoDeferred); | 1127 ASSERT(textAutosizer->m_updatePageInfoDeferred); |
1128 textAutosizer->m_updatePageInfoDeferred = false; | 1128 textAutosizer->m_updatePageInfoDeferred = false; |
1129 textAutosizer->updatePageInfoInAllFrames(); | 1129 textAutosizer->updatePageInfoInAllFrames(); |
1130 } | 1130 } |
1131 } | 1131 } |
1132 | 1132 |
1133 } // namespace WebCore | 1133 } // namespace WebCore |
OLD | NEW |