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

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

Issue 14576017: Implement CSS3TextDecorations runtime flag in favor of CSS3_TEXT (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated css-properties-as-js-properties.html layout test expectations to match new properties. Created 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 } 726 }
727 lineBottom = max<LayoutUnit>(lineBottom, pixelSnappedLogicalBottom() ); 727 lineBottom = max<LayoutUnit>(lineBottom, pixelSnappedLogicalBottom() );
728 lineBottomIncludingMargins = max(lineBottom, lineBottomIncludingMarg ins); 728 lineBottomIncludingMargins = max(lineBottom, lineBottomIncludingMarg ins);
729 } 729 }
730 730
731 if (renderer()->style()->isFlippedLinesWritingMode()) 731 if (renderer()->style()->isFlippedLinesWritingMode())
732 flipLinesInBlockDirection(lineTopIncludingMargins, lineBottomIncludi ngMargins); 732 flipLinesInBlockDirection(lineTopIncludingMargins, lineBottomIncludi ngMargins);
733 } 733 }
734 } 734 }
735 735
736 #if ENABLE(CSS3_TEXT)
737 void InlineFlowBox::computeMaxLogicalTop(float& maxLogicalTop) 736 void InlineFlowBox::computeMaxLogicalTop(float& maxLogicalTop)
738 { 737 {
739 for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) { 738 for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
740 if (curr->renderer()->isOutOfFlowPositioned()) 739 if (curr->renderer()->isOutOfFlowPositioned())
741 continue; // Positioned placeholders don't affect calculations. 740 continue; // Positioned placeholders don't affect calculations.
742 741
743 if (descendantsHaveSameLineHeightAndBaseline()) 742 if (descendantsHaveSameLineHeightAndBaseline())
744 continue; 743 continue;
745 744
746 maxLogicalTop = max<float>(maxLogicalTop, curr->y()); 745 maxLogicalTop = max<float>(maxLogicalTop, curr->y());
747 float localMaxLogicalTop = 0; 746 float localMaxLogicalTop = 0;
748 if (curr->isInlineFlowBox()) 747 if (curr->isInlineFlowBox())
749 toInlineFlowBox(curr)->computeMaxLogicalTop(localMaxLogicalTop); 748 toInlineFlowBox(curr)->computeMaxLogicalTop(localMaxLogicalTop);
750 maxLogicalTop = max<float>(maxLogicalTop, localMaxLogicalTop); 749 maxLogicalTop = max<float>(maxLogicalTop, localMaxLogicalTop);
751 } 750 }
752 } 751 }
753 #endif // CSS3_TEXT
754 752
755 void InlineFlowBox::flipLinesInBlockDirection(LayoutUnit lineTop, LayoutUnit lin eBottom) 753 void InlineFlowBox::flipLinesInBlockDirection(LayoutUnit lineTop, LayoutUnit lin eBottom)
756 { 754 {
757 // Flip the box on the line such that the top is now relative to the lineBot tom instead of the lineTop. 755 // Flip the box on the line such that the top is now relative to the lineBot tom instead of the lineTop.
758 setLogicalTop(lineBottom - (logicalTop() - lineTop) - logicalHeight()); 756 setLogicalTop(lineBottom - (logicalTop() - lineTop) - logicalHeight());
759 757
760 for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) { 758 for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
761 if (curr->renderer()->isOutOfFlowPositioned()) 759 if (curr->renderer()->isOutOfFlowPositioned())
762 continue; // Positioned placeholders aren't affected here. 760 continue; // Positioned placeholders aren't affected here.
763 761
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Rendering); 1649 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Rendering);
1652 InlineBox::reportMemoryUsage(memoryObjectInfo); 1650 InlineBox::reportMemoryUsage(memoryObjectInfo);
1653 info.addMember(m_overflow, "overflow"); 1651 info.addMember(m_overflow, "overflow");
1654 info.addMember(m_firstChild, "firstChild"); 1652 info.addMember(m_firstChild, "firstChild");
1655 info.addMember(m_lastChild, "lastChild"); 1653 info.addMember(m_lastChild, "lastChild");
1656 info.addMember(m_prevLineBox, "prevLineBox"); 1654 info.addMember(m_prevLineBox, "prevLineBox");
1657 info.addMember(m_nextLineBox, "nextLineBox"); 1655 info.addMember(m_nextLineBox, "nextLineBox");
1658 } 1656 }
1659 1657
1660 } // namespace WebCore 1658 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698