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

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

Issue 1110233003: Update list markers in notify change. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 7 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
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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 child = child->nextSibling(); 468 child = child->nextSibling();
469 } 469 }
470 470
471 if (hasTextChild) { 471 if (hasTextChild) {
472 applyMultiplier(parent, multiplier); // Parent handles line spacing. 472 applyMultiplier(parent, multiplier); // Parent handles line spacing.
473 } else if (!parent->isListItem()) { 473 } else if (!parent->isListItem()) {
474 // For consistency, a block with no immediate text child should always h ave a 474 // For consistency, a block with no immediate text child should always h ave a
475 // multiplier of 1 (except for list items which are handled in inflateLi stItem). 475 // multiplier of 1 (except for list items which are handled in inflateLi stItem).
476 applyMultiplier(parent, 1); 476 applyMultiplier(parent, 1);
477 } 477 }
478
479 if (parent->isListItem()) {
ojan 2015/04/30 02:56:45 I think it'd be better to keep this code in Layout
dsinclair 2015/04/30 17:52:30 From reading the comment in the old LayoutListItem
ojan 2015/05/01 01:09:55 Yeah. I don't really understand this comment. pdr
skobes 2015/05/01 17:58:16 TextAutosizer::inflateListItem was introduced beca
480 LayoutListItem* item = toLayoutListItem(parent);
481 if (item->marker()) {
482 inflateListItem(item, item->marker());
483 item->marker()->setPreferredLogicalWidthsDirty(MarkOnlyThis);
484 }
485 }
486
478 return multiplier; 487 return multiplier;
479 } 488 }
480 489
481 bool TextAutosizer::shouldHandleLayout() const 490 bool TextAutosizer::shouldHandleLayout() const
482 { 491 {
483 return m_pageInfo.m_settingEnabled && m_pageInfo.m_pageNeedsAutosizing && !m _updatePageInfoDeferred; 492 return m_pageInfo.m_settingEnabled && m_pageInfo.m_pageNeedsAutosizing && !m _updatePageInfoDeferred;
484 } 493 }
485 494
486 void TextAutosizer::updatePageInfoInAllFrames() 495 void TextAutosizer::updatePageInfoInAllFrames()
487 { 496 {
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 } 1180 }
1172 return computedSize; 1181 return computedSize;
1173 } 1182 }
1174 1183
1175 DEFINE_TRACE(TextAutosizer) 1184 DEFINE_TRACE(TextAutosizer)
1176 { 1185 {
1177 visitor->trace(m_document); 1186 visitor->trace(m_document);
1178 } 1187 }
1179 1188
1180 } // namespace blink 1189 } // namespace blink
OLDNEW
« Source/core/layout/LayoutListItem.cpp ('K') | « Source/core/layout/LayoutListItem.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698