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

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

Issue 218863002: [FastTextAutosizer] Fix the inline overlap issue. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update expectations Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fast/text-autosizing/table-inline-width-expected.txt ('k') | no next file » | 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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 descendant = descendant->nextInPreOrderAfterChildren(block); 405 descendant = descendant->nextInPreOrderAfterChildren(block);
406 continue; 406 continue;
407 } 407 }
408 if (descendant->isText()) { 408 if (descendant->isText()) {
409 // We only calculate this multiplier on-demand to ensure the parent block of this text 409 // We only calculate this multiplier on-demand to ensure the parent block of this text
410 // has entered layout. 410 // has entered layout.
411 if (!multiplier) 411 if (!multiplier)
412 multiplier = cluster->m_autosize ? clusterMultiplier(cluster) : 1.0f; 412 multiplier = cluster->m_autosize ? clusterMultiplier(cluster) : 1.0f;
413 applyMultiplier(descendant, multiplier); 413 applyMultiplier(descendant, multiplier);
414 applyMultiplier(descendant->parent(), multiplier); // Parent handles line spacing. 414 applyMultiplier(descendant->parent(), multiplier); // Parent handles line spacing.
415 // FIXME: Investigate why MarkOnlyThis is sufficient.
416 if (descendant->parent()->isRenderInline())
417 descendant->setPreferredLogicalWidthsDirty(MarkOnlyThis);
415 } 418 }
416 descendant = descendant->nextInPreOrder(block); 419 descendant = descendant->nextInPreOrder(block);
417 } 420 }
418 } 421 }
419 422
420 bool FastTextAutosizer::enabled() 423 bool FastTextAutosizer::enabled()
421 { 424 {
422 if (!m_document->settings() || !m_document->page() || m_document->printing() ) 425 if (!m_document->settings() || !m_document->page() || m_document->printing() )
423 return false; 426 return false;
424 427
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 FastTextAutosizer::DeferUpdatePageInfo::~DeferUpdatePageInfo() 1003 FastTextAutosizer::DeferUpdatePageInfo::~DeferUpdatePageInfo()
1001 { 1004 {
1002 if (FastTextAutosizer* textAutosizer = m_mainFrame->document()->fastTextAuto sizer()) { 1005 if (FastTextAutosizer* textAutosizer = m_mainFrame->document()->fastTextAuto sizer()) {
1003 ASSERT(textAutosizer->m_updatePageInfoDeferred); 1006 ASSERT(textAutosizer->m_updatePageInfoDeferred);
1004 textAutosizer->m_updatePageInfoDeferred = false; 1007 textAutosizer->m_updatePageInfoDeferred = false;
1005 textAutosizer->updatePageInfoInAllFrames(); 1008 textAutosizer->updatePageInfoInAllFrames();
1006 } 1009 }
1007 } 1010 }
1008 1011
1009 } // namespace WebCore 1012 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/text-autosizing/table-inline-width-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698