| 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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 } | 474 } |
| 475 | 475 |
| 476 return multiplier; | 476 return multiplier; |
| 477 } | 477 } |
| 478 | 478 |
| 479 bool TextAutosizer::shouldHandleLayout() const | 479 bool TextAutosizer::shouldHandleLayout() const |
| 480 { | 480 { |
| 481 return m_pageInfo.m_settingEnabled && m_pageInfo.m_pageNeedsAutosizing && !m
_updatePageInfoDeferred; | 481 return m_pageInfo.m_settingEnabled && m_pageInfo.m_pageNeedsAutosizing && !m
_updatePageInfoDeferred; |
| 482 } | 482 } |
| 483 | 483 |
| 484 bool TextAutosizer::pageNeedsAutosizing() const |
| 485 { |
| 486 return m_pageInfo.m_pageNeedsAutosizing; |
| 487 } |
| 488 |
| 484 void TextAutosizer::updatePageInfoInAllFrames() | 489 void TextAutosizer::updatePageInfoInAllFrames() |
| 485 { | 490 { |
| 486 ASSERT(!m_document->frame() || m_document->frame()->isMainFrame()); | 491 ASSERT(!m_document->frame() || m_document->frame()->isMainFrame()); |
| 487 | 492 |
| 488 for (Frame* frame = m_document->frame(); frame; frame = frame->tree().traver
seNext()) { | 493 for (Frame* frame = m_document->frame(); frame; frame = frame->tree().traver
seNext()) { |
| 489 if (!frame->isLocalFrame()) | 494 if (!frame->isLocalFrame()) |
| 490 continue; | 495 continue; |
| 491 | 496 |
| 492 Document* document = toLocalFrame(frame)->document(); | 497 Document* document = toLocalFrame(frame)->document(); |
| 493 // If document is being detached, skip updatePageInfo. | 498 // If document is being detached, skip updatePageInfo. |
| (...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1168 } | 1173 } |
| 1169 return computedSize; | 1174 return computedSize; |
| 1170 } | 1175 } |
| 1171 | 1176 |
| 1172 DEFINE_TRACE(TextAutosizer) | 1177 DEFINE_TRACE(TextAutosizer) |
| 1173 { | 1178 { |
| 1174 visitor->trace(m_document); | 1179 visitor->trace(m_document); |
| 1175 } | 1180 } |
| 1176 | 1181 |
| 1177 } // namespace blink | 1182 } // namespace blink |
| OLD | NEW |