diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-30 16:58:06 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-30 17:03:09 +0100 |
commit | 32ea33253afbbdefd2680aa95ab5f57455272ae7 (patch) | |
tree | 2389569585b666c310fbb36d3fb8e6ab94462967 /Source/WebCore/rendering | |
parent | 41c25f231cbca1babc445187283524cc6c751c71 (diff) | |
download | qtwebkit-32ea33253afbbdefd2680aa95ab5f57455272ae7.tar.gz |
Imported WebKit commit 6a4a1d32e1d779548c726c4826cba9d69eb87601 (http://svn.webkit.org/repository/webkit/trunk@136242)
Final import for the Qt 5.x series that implements the QtWebKit / QtWebKitWidgets split
Extra fixes will be cherry-picked.
Change-Id: I844f1ebb99c6d6b75db31d6538c2acd628e79681
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'Source/WebCore/rendering')
-rw-r--r-- | Source/WebCore/rendering/InlineFlowBox.cpp | 25 | ||||
-rw-r--r-- | Source/WebCore/rendering/RenderBox.cpp | 4 | ||||
-rw-r--r-- | Source/WebCore/rendering/RenderBoxModelObject.cpp | 2 | ||||
-rw-r--r-- | Source/WebCore/rendering/RenderGrid.cpp | 21 | ||||
-rw-r--r-- | Source/WebCore/rendering/RenderMultiColumnSet.cpp | 4 | ||||
-rw-r--r-- | Source/WebCore/rendering/RenderMultiColumnSet.h | 29 | ||||
-rw-r--r-- | Source/WebCore/rendering/RenderRubyRun.cpp | 2 | ||||
-rw-r--r-- | Source/WebCore/rendering/style/GridTrackSize.h | 77 | ||||
-rw-r--r-- | Source/WebCore/rendering/style/RenderStyle.cpp | 1 | ||||
-rw-r--r-- | Source/WebCore/rendering/style/RenderStyle.h | 27 | ||||
-rw-r--r-- | Source/WebCore/rendering/style/RenderStyleConstants.h | 2 | ||||
-rw-r--r-- | Source/WebCore/rendering/style/StyleGridData.h | 9 | ||||
-rw-r--r-- | Source/WebCore/rendering/style/StyleRareInheritedData.cpp | 3 | ||||
-rw-r--r-- | Source/WebCore/rendering/style/StyleRareInheritedData.h | 1 |
14 files changed, 174 insertions, 33 deletions
diff --git a/Source/WebCore/rendering/InlineFlowBox.cpp b/Source/WebCore/rendering/InlineFlowBox.cpp index f2eed4b95..a0ef3c6c3 100644 --- a/Source/WebCore/rendering/InlineFlowBox.cpp +++ b/Source/WebCore/rendering/InlineFlowBox.cpp @@ -670,7 +670,7 @@ void InlineFlowBox::placeBoxesInBlockDirection(LayoutUnit top, LayoutUnit maxHei // Treat the leading on the first and last lines of ruby runs as not being part of the overall lineTop/lineBottom. // Really this is a workaround hack for the fact that ruby should have been done as line layout and not done using // inline-block. - if (!renderer()->style()->isFlippedLinesWritingMode()) + if (renderer()->style()->isFlippedLinesWritingMode() == (curr->renderer()->style()->rubyPosition() == RubyPositionAfter)) hasAnnotationsBefore = true; else hasAnnotationsAfter = true; @@ -1461,7 +1461,7 @@ LayoutUnit InlineFlowBox::computeOverAnnotationAdjustment(LayoutUnit allowedPosi if (curr->isInlineFlowBox()) result = max(result, toInlineFlowBox(curr)->computeOverAnnotationAdjustment(allowedPosition)); - if (curr->renderer()->isReplaced() && curr->renderer()->isRubyRun()) { + if (curr->renderer()->isReplaced() && curr->renderer()->isRubyRun() && curr->renderer()->style()->rubyPosition() == RubyPositionBefore) { RenderRubyRun* rubyRun = toRenderRubyRun(curr->renderer()); RenderRubyText* rubyText = rubyRun->rubyText(); if (!rubyText) @@ -1509,6 +1509,27 @@ LayoutUnit InlineFlowBox::computeUnderAnnotationAdjustment(LayoutUnit allowedPos if (curr->isInlineFlowBox()) result = max(result, toInlineFlowBox(curr)->computeUnderAnnotationAdjustment(allowedPosition)); + if (curr->renderer()->isReplaced() && curr->renderer()->isRubyRun() && curr->renderer()->style()->rubyPosition() == RubyPositionAfter) { + RenderRubyRun* rubyRun = toRenderRubyRun(curr->renderer()); + RenderRubyText* rubyText = rubyRun->rubyText(); + if (!rubyText) + continue; + + if (rubyRun->style()->isFlippedLinesWritingMode()) { + LayoutUnit topOfFirstRubyTextLine = rubyText->logicalTop() + (rubyText->firstRootBox() ? rubyText->firstRootBox()->lineTop() : LayoutUnit()); + if (topOfFirstRubyTextLine >= 0) + continue; + topOfFirstRubyTextLine += curr->logicalTop(); + result = max(result, allowedPosition - topOfFirstRubyTextLine); + } else { + LayoutUnit bottomOfLastRubyTextLine = rubyText->logicalTop() + (rubyText->lastRootBox() ? rubyText->lastRootBox()->lineBottom() : rubyText->logicalHeight()); + if (bottomOfLastRubyTextLine <= curr->logicalHeight()) + continue; + bottomOfLastRubyTextLine += curr->logicalTop(); + result = max(result, bottomOfLastRubyTextLine - allowedPosition); + } + } + if (curr->isInlineTextBox()) { RenderStyle* style = curr->renderer()->style(isFirstLineStyle()); if (style->textEmphasisMark() != TextEmphasisMarkNone && style->textEmphasisPosition() == TextEmphasisPositionUnder) { diff --git a/Source/WebCore/rendering/RenderBox.cpp b/Source/WebCore/rendering/RenderBox.cpp index 44f3de11a..33dc945e9 100644 --- a/Source/WebCore/rendering/RenderBox.cpp +++ b/Source/WebCore/rendering/RenderBox.cpp @@ -3624,6 +3624,10 @@ LayoutRect RenderBox::localCaretRect(InlineBox* box, int caretOffset, LayoutUnit // Move to local coords rect.moveBy(-location()); + + if (!isHorizontalWritingMode()) + return rect.transposedRect(); + return rect; } diff --git a/Source/WebCore/rendering/RenderBoxModelObject.cpp b/Source/WebCore/rendering/RenderBoxModelObject.cpp index 293591d76..cd1822f3e 100644 --- a/Source/WebCore/rendering/RenderBoxModelObject.cpp +++ b/Source/WebCore/rendering/RenderBoxModelObject.cpp @@ -2758,7 +2758,7 @@ LayoutRect RenderBoxModelObject::localCaretRectForEmptyElement(LayoutUnit width, LayoutUnit y = paddingTop() + borderTop(); - return LayoutRect(x, y, caretWidth, height); + return currentStyle->isHorizontalWritingMode() ? LayoutRect(x, y, caretWidth, height) : LayoutRect(y, x, height, caretWidth); } bool RenderBoxModelObject::shouldAntialiasLines(GraphicsContext* context) diff --git a/Source/WebCore/rendering/RenderGrid.cpp b/Source/WebCore/rendering/RenderGrid.cpp index 492a83f88..e7a351c86 100644 --- a/Source/WebCore/rendering/RenderGrid.cpp +++ b/Source/WebCore/rendering/RenderGrid.cpp @@ -116,10 +116,10 @@ void RenderGrid::computePreferredLogicalWidths() // FIXME: We don't take our own logical width into account. - const Vector<Length>& trackStyles = style()->gridColumns(); + const Vector<GridTrackSize>& trackStyles = style()->gridColumns(); for (size_t i = 0; i < trackStyles.size(); ++i) { - Length trackLength = trackStyles[i]; + Length trackLength = trackStyles[i].length(); if (!trackLength.isFixed()) { notImplemented(); continue; @@ -138,11 +138,11 @@ void RenderGrid::computePreferredLogicalWidths() void RenderGrid::computedUsedBreadthOfGridTracks(TrackSizingDirection direction, Vector<GridTrack>& tracks) { - const Vector<Length>& trackStyles = (direction == ForColumns) ? style()->gridColumns() : style()->gridRows(); + const Vector<GridTrackSize>& trackStyles = (direction == ForColumns) ? style()->gridColumns() : style()->gridRows(); for (size_t i = 0; i < trackStyles.size(); ++i) { GridTrack track; - if (trackStyles[i].isFixed()) - track.m_usedBreadth = trackStyles[i].getFloatValue(); + if (trackStyles[i].length().isFixed()) + track.m_usedBreadth = trackStyles[i].length().getFloatValue(); else notImplemented(); @@ -165,10 +165,13 @@ void RenderGrid::layoutGridItems() size_t columnTrack = resolveGridPosition(child->style()->gridItemColumn()); size_t rowTrack = resolveGridPosition(child->style()->gridItemRow()); - // Because the grid area cannot be styled, we don't need to adjust - // the grid breadth to account for 'box-sizing'. - child->setOverrideContainingBlockContentLogicalWidth(columnTracks[columnTrack].m_usedBreadth); - child->setOverrideContainingBlockContentLogicalHeight(rowTracks[rowTrack].m_usedBreadth); + // FIXME: Properly support implicit rows and columns (bug 103573). + if (columnTrack < columnTracks.size() && rowTrack < rowTracks.size()) { + // Because the grid area cannot be styled, we don't need to adjust + // the grid breadth to account for 'box-sizing'. + child->setOverrideContainingBlockContentLogicalWidth(columnTracks[columnTrack].m_usedBreadth); + child->setOverrideContainingBlockContentLogicalHeight(rowTracks[rowTrack].m_usedBreadth); + } // FIXME: Grid items should stretch to fill their cells. Once we // implement grid-{column,row}-align, we can also shrink to fit. For diff --git a/Source/WebCore/rendering/RenderMultiColumnSet.cpp b/Source/WebCore/rendering/RenderMultiColumnSet.cpp index 686fc3cf0..21bf10fe7 100644 --- a/Source/WebCore/rendering/RenderMultiColumnSet.cpp +++ b/Source/WebCore/rendering/RenderMultiColumnSet.cpp @@ -41,6 +41,10 @@ RenderMultiColumnSet::RenderMultiColumnSet(Node* node, RenderFlowThread* flowThr , m_computedColumnCount(1) , m_computedColumnWidth(0) , m_computedColumnHeight(0) + , m_minimumColumnHeight(0) + , m_forcedBreaksCount(0) + , m_maximumDistanceBetweenForcedBreaks(0) + , m_forcedBreakOffset(0) { } diff --git a/Source/WebCore/rendering/RenderMultiColumnSet.h b/Source/WebCore/rendering/RenderMultiColumnSet.h index d9578ea85..88653035c 100644 --- a/Source/WebCore/rendering/RenderMultiColumnSet.h +++ b/Source/WebCore/rendering/RenderMultiColumnSet.h @@ -61,6 +61,29 @@ public: m_computedColumnHeight = height; } + void updateMinimumColumnHeight(LayoutUnit height) { m_minimumColumnHeight = std::max(height, m_minimumColumnHeight); } + LayoutUnit minimumColumnHeight() const { return m_minimumColumnHeight; } + + unsigned forcedBreaksCount() const { return m_forcedBreaksCount; } + LayoutUnit forcedBreakOffset() const { return m_forcedBreakOffset; } + LayoutUnit maximumDistanceBetweenForcedBreaks() const { return m_maximumDistanceBetweenForcedBreaks; } + void clearForcedBreaks() + { + m_forcedBreaksCount = 0; + m_maximumDistanceBetweenForcedBreaks = 0; + m_forcedBreakOffset = 0; + } + void addForcedBreak(LayoutUnit offsetFromFirstPage) + { + ASSERT(!computedColumnHeight()); + LayoutUnit distanceFromLastBreak = offsetFromFirstPage - m_forcedBreakOffset; + if (!distanceFromLastBreak) + return; + m_forcedBreaksCount++; + m_maximumDistanceBetweenForcedBreaks = std::max(m_maximumDistanceBetweenForcedBreaks, distanceFromLastBreak); + m_forcedBreakOffset = offsetFromFirstPage; + } + private: virtual void updateLogicalWidth() OVERRIDE; virtual void updateLogicalHeight() OVERRIDE; @@ -96,6 +119,12 @@ private: unsigned m_computedColumnCount; LayoutUnit m_computedColumnWidth; LayoutUnit m_computedColumnHeight; + + // The following variables are used when balancing the column set. + LayoutUnit m_minimumColumnHeight; + unsigned m_forcedBreaksCount; // FIXME: We will ultimately need to cache more information to balance around forced breaks properly. + LayoutUnit m_maximumDistanceBetweenForcedBreaks; + LayoutUnit m_forcedBreakOffset; }; } // namespace WebCore diff --git a/Source/WebCore/rendering/RenderRubyRun.cpp b/Source/WebCore/rendering/RenderRubyRun.cpp index 8481546f3..498d17d10 100644 --- a/Source/WebCore/rendering/RenderRubyRun.cpp +++ b/Source/WebCore/rendering/RenderRubyRun.cpp @@ -246,7 +246,7 @@ void RenderRubyRun::layout() lastLineRubyTextBottom = rootBox->logicalBottomLayoutOverflow(); } - if (!style()->isFlippedLinesWritingMode()) { + if (style()->isFlippedLinesWritingMode() == (style()->rubyPosition() == RubyPositionAfter)) { LayoutUnit firstLineTop = 0; if (RenderRubyBase* rb = rubyBase()) { RootInlineBox* rootBox = rb->firstRootBox(); diff --git a/Source/WebCore/rendering/style/GridTrackSize.h b/Source/WebCore/rendering/style/GridTrackSize.h new file mode 100644 index 000000000..1bc1d06a5 --- /dev/null +++ b/Source/WebCore/rendering/style/GridTrackSize.h @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2012 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef GridTrackSize_h +#define GridTrackSize_h + +#include "Length.h" + +namespace WebCore { + +enum GridTrackSizeType { + LengthTrackSizing +}; + +class GridTrackSize { +public: + GridTrackSize() + : m_type(LengthTrackSizing) + , m_length(Undefined) + { + } + + const Length& length() const + { + ASSERT(m_type == LengthTrackSizing); + ASSERT(!m_length.isUndefined()); + return m_length; + } + + void setLength(const Length& length) + { + m_type = LengthTrackSizing; + m_length = length; + } + + GridTrackSizeType type() const { return m_type; } + + bool operator==(const GridTrackSize& other) const + { + return m_type == other.m_type && m_length == other.m_length; + } + +private: + GridTrackSizeType m_type; + Length m_length; +}; + +} // namespace WebCore + +#endif // GridTrackSize_h diff --git a/Source/WebCore/rendering/style/RenderStyle.cpp b/Source/WebCore/rendering/style/RenderStyle.cpp index a51658b00..653f30fdf 100644 --- a/Source/WebCore/rendering/style/RenderStyle.cpp +++ b/Source/WebCore/rendering/style/RenderStyle.cpp @@ -478,6 +478,7 @@ StyleDifference RenderStyle::diff(const RenderStyle* other, unsigned& changedCon || rareInheritedData->hyphenationLimitAfter != other->rareInheritedData->hyphenationLimitAfter || rareInheritedData->hyphenationString != other->rareInheritedData->hyphenationString || rareInheritedData->locale != other->rareInheritedData->locale + || rareInheritedData->m_rubyPosition != other->rareInheritedData->m_rubyPosition || rareInheritedData->textEmphasisMark != other->rareInheritedData->textEmphasisMark || rareInheritedData->textEmphasisPosition != other->rareInheritedData->textEmphasisPosition || rareInheritedData->textEmphasisCustomMark != other->rareInheritedData->textEmphasisCustomMark diff --git a/Source/WebCore/rendering/style/RenderStyle.h b/Source/WebCore/rendering/style/RenderStyle.h index 74044f82f..06e5bb269 100644 --- a/Source/WebCore/rendering/style/RenderStyle.h +++ b/Source/WebCore/rendering/style/RenderStyle.h @@ -758,8 +758,8 @@ public: EFlexWrap flexWrap() const { return static_cast<EFlexWrap>(rareNonInheritedData->m_flexibleBox->m_flexWrap); } EJustifyContent justifyContent() const { return static_cast<EJustifyContent>(rareNonInheritedData->m_justifyContent); } - const Vector<Length>& gridColumns() const { return rareNonInheritedData->m_grid->m_gridColumns; } - const Vector<Length>& gridRows() const { return rareNonInheritedData->m_grid->m_gridRows; } + const Vector<GridTrackSize>& gridColumns() const { return rareNonInheritedData->m_grid->m_gridColumns; } + const Vector<GridTrackSize>& gridRows() const { return rareNonInheritedData->m_grid->m_gridRows; } const GridPosition& gridItemColumn() const { return rareNonInheritedData->m_gridItem->m_gridColumn; } const GridPosition& gridItemRow() const { return rareNonInheritedData->m_gridItem->m_gridRow; } @@ -835,7 +835,9 @@ public: const AtomicString& textEmphasisCustomMark() const { return rareInheritedData->textEmphasisCustomMark; } TextEmphasisPosition textEmphasisPosition() const { return static_cast<TextEmphasisPosition>(rareInheritedData->textEmphasisPosition); } const AtomicString& textEmphasisMarkString() const; - + + RubyPosition rubyPosition() const { return static_cast<RubyPosition>(rareInheritedData->m_rubyPosition); } + // Return true if any transform related property (currently transform, transformStyle3D or perspective) // indicates that we are transforming bool hasTransformRelatedProperty() const { return hasTransform() || preserves3D() || hasPerspective(); } @@ -1238,8 +1240,8 @@ public: void setFlexDirection(EFlexDirection direction) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexDirection, direction); } void setFlexWrap(EFlexWrap w) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexWrap, w); } void setJustifyContent(EJustifyContent p) { SET_VAR(rareNonInheritedData, m_justifyContent, p); } - void setGridColumns(const Vector<Length>& lengths) { SET_VAR(rareNonInheritedData.access()->m_grid, m_gridColumns, lengths); } - void setGridRows(const Vector<Length>& lengths) { SET_VAR(rareNonInheritedData.access()->m_grid, m_gridRows, lengths); } + void setGridColumns(const Vector<GridTrackSize>& lengths) { SET_VAR(rareNonInheritedData.access()->m_grid, m_gridColumns, lengths); } + void setGridRows(const Vector<GridTrackSize>& lengths) { SET_VAR(rareNonInheritedData.access()->m_grid, m_gridRows, lengths); } void setGridItemColumn(const GridPosition& columnPosition) { SET_VAR(rareNonInheritedData.access()->m_gridItem, m_gridColumn, columnPosition); } void setGridItemRow(const GridPosition& rowPosition) { SET_VAR(rareNonInheritedData.access()->m_gridItem, m_gridRow, rowPosition); } @@ -1300,6 +1302,8 @@ public: void setTextEmphasisCustomMark(const AtomicString& mark) { SET_VAR(rareInheritedData, textEmphasisCustomMark, mark); } void setTextEmphasisPosition(TextEmphasisPosition position) { SET_VAR(rareInheritedData, textEmphasisPosition, position); } + void setRubyPosition(RubyPosition position) { SET_VAR(rareInheritedData, m_rubyPosition, position); } + #if ENABLE(CSS_FILTERS) void setFilter(const FilterOperations& ops) { SET_VAR(rareNonInheritedData.access()->m_filter, m_operations, ops); } #endif @@ -1616,6 +1620,7 @@ public: static TextEmphasisMark initialTextEmphasisMark() { return TextEmphasisMarkNone; } static const AtomicString& initialTextEmphasisCustomMark() { return nullAtom; } static TextEmphasisPosition initialTextEmphasisPosition() { return TextEmphasisPositionOver; } + static RubyPosition initialRubyPosition() { return RubyPositionBefore; } static LineBoxContain initialLineBoxContain() { return LineBoxContainBlock | LineBoxContainInline | LineBoxContainReplaced; } static ImageOrientationEnum initialImageOrientation() { return OriginTopLeft; } static EImageRendering initialImageRendering() { return ImageRenderingAuto; } @@ -1627,16 +1632,8 @@ public: static PrintColorAdjust initialPrintColorAdjust() { return PrintColorAdjustEconomy; } // The initial value is 'none' for grid tracks. - static Vector<Length> initialGridTrackValue() - { - DEFINE_STATIC_LOCAL(Vector<Length>, defaultLength, ()); - // We need to manually add the Length here as the Length(0) is 'auto'. - if (!defaultLength.size()) - defaultLength.append(Length(Undefined)); - return defaultLength; - } - static Vector<Length> initialGridColumns() { return initialGridTrackValue(); } - static Vector<Length> initialGridRows() { return initialGridTrackValue(); } + static Vector<GridTrackSize> initialGridColumns() { return Vector<GridTrackSize>(); } + static Vector<GridTrackSize> initialGridRows() { return Vector<GridTrackSize>(); } // 'auto' is the default. static GridPosition initialGridItemColumn() { return GridPosition(); } diff --git a/Source/WebCore/rendering/style/RenderStyleConstants.h b/Source/WebCore/rendering/style/RenderStyleConstants.h index bfc1a5eab..341813299 100644 --- a/Source/WebCore/rendering/style/RenderStyleConstants.h +++ b/Source/WebCore/rendering/style/RenderStyleConstants.h @@ -475,6 +475,8 @@ enum WrapFlow { WrapFlowAuto, WrapFlowBoth, WrapFlowStart, WrapFlowEnd, WrapFlow enum WrapThrough { WrapThroughWrap, WrapThroughNone }; +enum RubyPosition { RubyPositionBefore, RubyPositionAfter }; + #if ENABLE(DRAGGABLE_REGION) enum DraggableRegionMode { DraggableRegionNone, DraggableRegionDrag, DraggableRegionNoDrag }; #endif diff --git a/Source/WebCore/rendering/style/StyleGridData.h b/Source/WebCore/rendering/style/StyleGridData.h index ddceadbbc..18ffcaba6 100644 --- a/Source/WebCore/rendering/style/StyleGridData.h +++ b/Source/WebCore/rendering/style/StyleGridData.h @@ -26,7 +26,7 @@ #ifndef StyleGridData_h #define StyleGridData_h -#include "Length.h" +#include "GridTrackSize.h" #include <wtf/PassRefPtr.h> #include <wtf/RefCounted.h> #include <wtf/Vector.h> @@ -48,10 +48,9 @@ public: return !(*this == o); } - // FIXME: For the moment, we only support a subset of the grammar which correspond to: - // 'auto' | <length> | <percentage> | 'none' - Vector<Length> m_gridColumns; - Vector<Length> m_gridRows; + // FIXME: Update the naming of the following variables. + Vector<GridTrackSize> m_gridColumns; + Vector<GridTrackSize> m_gridRows; private: StyleGridData(); diff --git a/Source/WebCore/rendering/style/StyleRareInheritedData.cpp b/Source/WebCore/rendering/style/StyleRareInheritedData.cpp index c02c10591..14715e0a5 100644 --- a/Source/WebCore/rendering/style/StyleRareInheritedData.cpp +++ b/Source/WebCore/rendering/style/StyleRareInheritedData.cpp @@ -102,6 +102,7 @@ StyleRareInheritedData::StyleRareInheritedData() #if ENABLE(CSS3_TEXT) , m_textAlignLast(RenderStyle::initialTextAlignLast()) #endif // CSS3_TEXT + , m_rubyPosition(RenderStyle::initialRubyPosition()) , hyphenationLimitBefore(-1) , hyphenationLimitAfter(-1) , hyphenationLimitLines(-1) @@ -168,6 +169,7 @@ StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o) #if ENABLE(CSS3_TEXT) , m_textAlignLast(o.m_textAlignLast) #endif // CSS3_TEXT + , m_rubyPosition(o.m_rubyPosition) , hyphenationString(o.hyphenationString) , hyphenationLimitBefore(o.hyphenationLimitBefore) , hyphenationLimitAfter(o.hyphenationLimitAfter) @@ -260,6 +262,7 @@ bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const #if ENABLE(CSS3_TEXT) && m_textAlignLast == o.m_textAlignLast #endif // CSS3_TEXT + && m_rubyPosition == o.m_rubyPosition && m_lineSnap == o.m_lineSnap #if ENABLE(CSS_VARIABLES) && m_variables == o.m_variables diff --git a/Source/WebCore/rendering/style/StyleRareInheritedData.h b/Source/WebCore/rendering/style/StyleRareInheritedData.h index 22388336a..216c10179 100644 --- a/Source/WebCore/rendering/style/StyleRareInheritedData.h +++ b/Source/WebCore/rendering/style/StyleRareInheritedData.h @@ -116,6 +116,7 @@ public: #if ENABLE(CSS3_TEXT) unsigned m_textAlignLast : 3; // ETextAlignLast #endif // CSS3_TEXT + unsigned m_rubyPosition : 1; // RubyPosition AtomicString hyphenationString; short hyphenationLimitBefore; |