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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 // from the box's parent (we want to avoid having significantly different | 554 // from the box's parent (we want to avoid having significantly different |
555 // width blocks within a cluster, since the narrower blocks would end up | 555 // width blocks within a cluster, since the narrower blocks would end up |
556 // larger than would otherwise be necessary). | 556 // larger than would otherwise be necessary). |
557 RenderBlock* containingBlock = renderer->containingBlock(); | 557 RenderBlock* containingBlock = renderer->containingBlock(); |
558 return renderer->isRenderView() | 558 return renderer->isRenderView() |
559 || renderer->isFloating() | 559 || renderer->isFloating() |
560 || renderer->isOutOfFlowPositioned() | 560 || renderer->isOutOfFlowPositioned() |
561 || renderer->isTableCell() | 561 || renderer->isTableCell() |
562 || renderer->isTableCaption() | 562 || renderer->isTableCaption() |
563 || renderer->isFlexibleBoxIncludingDeprecated() | 563 || renderer->isFlexibleBoxIncludingDeprecated() |
564 || renderer->hasColumns() | |
565 || (containingBlock && containingBlock->isHorizontalWritingMode() != ren
derer->isHorizontalWritingMode()) | 564 || (containingBlock && containingBlock->isHorizontalWritingMode() != ren
derer->isHorizontalWritingMode()) |
566 || renderer->style()->isDisplayReplacedType() | 565 || renderer->style()->isDisplayReplacedType() |
567 || renderer->isTextArea() | 566 || renderer->isTextArea() |
568 || renderer->style()->userModify() != READ_ONLY; | 567 || renderer->style()->userModify() != READ_ONLY; |
569 // FIXME: Tables need special handling to multiply all their columns by | 568 // FIXME: Tables need special handling to multiply all their columns by |
570 // the same amount even if they're different widths; so do hasColumns() | 569 // the same amount even if they're different widths; so do probably flexboxe
s... |
571 // containers, and probably flexboxes... | |
572 } | 570 } |
573 | 571 |
574 bool TextAutosizer::isAutosizingCluster(const RenderBlock* renderer, TextAutosiz
ingClusterInfo& parentClusterInfo) | 572 bool TextAutosizer::isAutosizingCluster(const RenderBlock* renderer, TextAutosiz
ingClusterInfo& parentClusterInfo) |
575 { | 573 { |
576 ASSERT(isAutosizingContainer(renderer)); | 574 ASSERT(isAutosizingContainer(renderer)); |
577 | 575 |
578 return isNarrowDescendant(renderer, parentClusterInfo) | 576 return isNarrowDescendant(renderer, parentClusterInfo) |
579 || isWiderDescendant(renderer, parentClusterInfo) | 577 || isWiderDescendant(renderer, parentClusterInfo) |
580 || isIndependentDescendant(renderer); | 578 || isIndependentDescendant(renderer); |
581 } | 579 } |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 if (i + 1 < clusterInfos.size()) { | 824 if (i + 1 < clusterInfos.size()) { |
827 float currentWidth = clusterInfos[i].root->contentLogicalWidth(); | 825 float currentWidth = clusterInfos[i].root->contentLogicalWidth(); |
828 float nextWidth = clusterInfos[i + 1].root->contentLogicalWidth(); | 826 float nextWidth = clusterInfos[i + 1].root->contentLogicalWidth(); |
829 if (currentWidth - nextWidth > maxWidthDifferenceWithinGroup) | 827 if (currentWidth - nextWidth > maxWidthDifferenceWithinGroup) |
830 groups.grow(groups.size() + 1); | 828 groups.grow(groups.size() + 1); |
831 } | 829 } |
832 } | 830 } |
833 } | 831 } |
834 | 832 |
835 } // namespace WebCore | 833 } // namespace WebCore |
OLD | NEW |