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

Side by Side Diff: Source/core/layout/TextAutosizer.cpp

Issue 1231673007: Don't zoom in TextFinder if autosizing is disabled (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: removed frame() helper from test Created 5 years, 5 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
« no previous file with comments | « Source/core/layout/TextAutosizer.h ('k') | Source/web/TextFinder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « Source/core/layout/TextAutosizer.h ('k') | Source/web/TextFinder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698