Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2520)

Side by Side Diff: Source/core/rendering/FastTextAutosizer.cpp

Issue 317493002: Change FrameTree to return Frames instead of LocalFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed conflicts Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 469
470 bool FastTextAutosizer::shouldHandleLayout() const 470 bool FastTextAutosizer::shouldHandleLayout() const
471 { 471 {
472 return m_pageInfo.m_settingEnabled && m_pageInfo.m_pageNeedsAutosizing && !m _updatePageInfoDeferred; 472 return m_pageInfo.m_settingEnabled && m_pageInfo.m_pageNeedsAutosizing && !m _updatePageInfoDeferred;
473 } 473 }
474 474
475 void FastTextAutosizer::updatePageInfoInAllFrames() 475 void FastTextAutosizer::updatePageInfoInAllFrames()
476 { 476 {
477 ASSERT(!m_document->frame() || m_document->frame()->isMainFrame()); 477 ASSERT(!m_document->frame() || m_document->frame()->isMainFrame());
478 478
479 for (LocalFrame* frame = m_document->frame(); frame; frame = frame->tree().t raverseNext()) { 479 for (Frame* frame = m_document->frame(); frame; frame = frame->tree().traver seNext()) {
480 if (FastTextAutosizer* textAutosizer = frame->document()->fastTextAutosi zer()) 480 if (!frame->isLocalFrame())
481 continue;
482 if (FastTextAutosizer* textAutosizer = toLocalFrame(frame)->document()-> fastTextAutosizer())
481 textAutosizer->updatePageInfo(); 483 textAutosizer->updatePageInfo();
482 } 484 }
483 } 485 }
484 486
485 void FastTextAutosizer::updatePageInfo() 487 void FastTextAutosizer::updatePageInfo()
486 { 488 {
487 if (m_updatePageInfoDeferred || !m_document->page() || !m_document->settings ()) 489 if (m_updatePageInfoDeferred || !m_document->page() || !m_document->settings ())
488 return; 490 return;
489 491
490 PageInfo previousPageInfo(m_pageInfo); 492 PageInfo previousPageInfo(m_pageInfo);
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 FastTextAutosizer::DeferUpdatePageInfo::~DeferUpdatePageInfo() 1112 FastTextAutosizer::DeferUpdatePageInfo::~DeferUpdatePageInfo()
1111 { 1113 {
1112 if (FastTextAutosizer* textAutosizer = m_mainFrame->document()->fastTextAuto sizer()) { 1114 if (FastTextAutosizer* textAutosizer = m_mainFrame->document()->fastTextAuto sizer()) {
1113 ASSERT(textAutosizer->m_updatePageInfoDeferred); 1115 ASSERT(textAutosizer->m_updatePageInfoDeferred);
1114 textAutosizer->m_updatePageInfoDeferred = false; 1116 textAutosizer->m_updatePageInfoDeferred = false;
1115 textAutosizer->updatePageInfoInAllFrames(); 1117 textAutosizer->updatePageInfoInAllFrames();
1116 } 1118 }
1117 } 1119 }
1118 1120
1119 } // namespace WebCore 1121 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698