OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2012 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 { | 487 { |
488 // "Autosizing containers" are the smallest unit for which we can | 488 // "Autosizing containers" are the smallest unit for which we can |
489 // enable/disable Text Autosizing. | 489 // enable/disable Text Autosizing. |
490 // - Must not be inline, as different multipliers on one line looks terrible
. | 490 // - Must not be inline, as different multipliers on one line looks terrible
. |
491 // Exceptions are inline-block and alike elements (inline-table, -webkit-i
nline-*), | 491 // Exceptions are inline-block and alike elements (inline-table, -webkit-i
nline-*), |
492 // as they often contain entire multi-line columns of text. | 492 // as they often contain entire multi-line columns of text. |
493 // - Must not be list items, as items in the same list should look consisten
t (*). | 493 // - Must not be list items, as items in the same list should look consisten
t (*). |
494 // - Must not be normal list items, as items in the same list should look | 494 // - Must not be normal list items, as items in the same list should look |
495 // consistent, unless they are floating or position:absolute/fixed. | 495 // consistent, unless they are floating or position:absolute/fixed. |
496 Node* node = renderer->generatingNode(); | 496 Node* node = renderer->generatingNode(); |
497 if ((node && !node->hasChildNodes()) | 497 if ((node && !node->hasChildren()) |
498 || !renderer->isRenderBlock() | 498 || !renderer->isRenderBlock() |
499 || (renderer->isInline() && !renderer->style()->isDisplayReplacedType())
) | 499 || (renderer->isInline() && !renderer->style()->isDisplayReplacedType())
) |
500 return false; | 500 return false; |
501 if (renderer->isListItem()) | 501 if (renderer->isListItem()) |
502 return renderer->isFloating() || renderer->isOutOfFlowPositioned(); | 502 return renderer->isFloating() || renderer->isOutOfFlowPositioned(); |
503 // Avoid creating containers for text within text controls, buttons, or <sel
ect> buttons. | 503 // Avoid creating containers for text within text controls, buttons, or <sel
ect> buttons. |
504 Node* parentNode = renderer->parent() ? renderer->parent()->generatingNode()
: 0; | 504 Node* parentNode = renderer->parent() ? renderer->parent()->generatingNode()
: 0; |
505 if (parentNode && parentNode->isElementNode() && formInputTags().contains(to
Element(parentNode)->tagQName())) | 505 if (parentNode && parentNode->isElementNode() && formInputTags().contains(to
Element(parentNode)->tagQName())) |
506 return false; | 506 return false; |
507 | 507 |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 if (i + 1 < clusterInfos.size()) { | 835 if (i + 1 < clusterInfos.size()) { |
836 float currentWidth = clusterInfos[i].root->contentLogicalWidth(); | 836 float currentWidth = clusterInfos[i].root->contentLogicalWidth(); |
837 float nextWidth = clusterInfos[i + 1].root->contentLogicalWidth(); | 837 float nextWidth = clusterInfos[i + 1].root->contentLogicalWidth(); |
838 if (currentWidth - nextWidth > maxWidthDifferenceWithinGroup) | 838 if (currentWidth - nextWidth > maxWidthDifferenceWithinGroup) |
839 groups.grow(groups.size() + 1); | 839 groups.grow(groups.size() + 1); |
840 } | 840 } |
841 } | 841 } |
842 } | 842 } |
843 | 843 |
844 } // namespace WebCore | 844 } // namespace WebCore |
OLD | NEW |