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

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

Issue 2569013006: Changed EOverflow to an enum class and renamed its members (Closed)
Patch Set: Rebase Created 4 years 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 229 }
230 230
231 static bool blockHeightConstrained(const LayoutBlock* block) { 231 static bool blockHeightConstrained(const LayoutBlock* block) {
232 // FIXME: Propagate constrainedness down the tree, to avoid inefficiently 232 // FIXME: Propagate constrainedness down the tree, to avoid inefficiently
233 // walking back up from each box. 233 // walking back up from each box.
234 // FIXME: This code needs to take into account vertical writing modes. 234 // FIXME: This code needs to take into account vertical writing modes.
235 // FIXME: Consider additional heuristics, such as ignoring fixed heights if 235 // FIXME: Consider additional heuristics, such as ignoring fixed heights if
236 // the content is already overflowing before autosizing kicks in. 236 // the content is already overflowing before autosizing kicks in.
237 for (; block; block = block->containingBlock()) { 237 for (; block; block = block->containingBlock()) {
238 const ComputedStyle& style = block->styleRef(); 238 const ComputedStyle& style = block->styleRef();
239 if (style.overflowY() >= OverflowScroll) 239 if (style.overflowY() >= EOverflow::Scroll)
240 return false; 240 return false;
241 if (style.height().isSpecified() || style.maxHeight().isSpecified() || 241 if (style.height().isSpecified() || style.maxHeight().isSpecified() ||
242 block->isOutOfFlowPositioned()) { 242 block->isOutOfFlowPositioned()) {
243 // Some sites (e.g. wikipedia) set their html and/or body elements to 243 // Some sites (e.g. wikipedia) set their html and/or body elements to
244 // height:100%, without intending to constrain the height of the content 244 // height:100%, without intending to constrain the height of the content
245 // within them. 245 // within them.
246 return !block->isDocumentElement() && !block->isBody() && 246 return !block->isDocumentElement() && !block->isBody() &&
247 !block->isLayoutView(); 247 !block->isLayoutView();
248 } 248 }
249 if (block->isFloating()) 249 if (block->isFloating())
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 computedSize = specifiedSize; 1300 computedSize = specifiedSize;
1301 } 1301 }
1302 return computedSize; 1302 return computedSize;
1303 } 1303 }
1304 1304
1305 DEFINE_TRACE(TextAutosizer) { 1305 DEFINE_TRACE(TextAutosizer) {
1306 visitor->trace(m_document); 1306 visitor->trace(m_document);
1307 } 1307 }
1308 1308
1309 } // namespace blink 1309 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698