Changeset 107289 in webkit
- Timestamp:
- Feb 9, 2012, 1:59:07 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 deleted
- 22 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/line-grid/line-grid-contains-value.html (modified) (2 diffs)
-
LayoutTests/fast/line-grid/line-grid-floating.html (modified) (1 diff)
-
LayoutTests/fast/line-grid/line-grid-inside-columns.html (modified) (1 diff)
-
LayoutTests/fast/line-grid/line-grid-into-columns.html (modified) (1 diff)
-
LayoutTests/fast/line-grid/line-grid-into-floats.html (modified) (1 diff)
-
LayoutTests/fast/line-grid/line-grid-positioned.html (modified) (1 diff)
-
LayoutTests/fast/line-grid/line-grid-snap-parsing-expected.txt (deleted)
-
LayoutTests/fast/line-grid/line-grid-snap-parsing.html (deleted)
-
LayoutTests/fast/line-grid/line-snap-parsing-expected.txt (added)
-
LayoutTests/fast/line-grid/line-snap-parsing.html (added)
-
LayoutTests/fast/line-grid/script-tests/line-grid-snap-parsing.js (deleted)
-
LayoutTests/fast/line-grid/script-tests/line-snap-parsing.js (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/CSSComputedStyleDeclaration.cpp (modified) (2 diffs)
-
Source/WebCore/css/CSSParser.cpp (modified) (1 diff)
-
Source/WebCore/css/CSSPrimitiveValueMappings.h (modified) (2 diffs)
-
Source/WebCore/css/CSSProperty.cpp (modified) (1 diff)
-
Source/WebCore/css/CSSPropertyNames.in (modified) (1 diff)
-
Source/WebCore/css/CSSStyleApplyProperty.cpp (modified) (1 diff)
-
Source/WebCore/css/CSSStyleSelector.cpp (modified) (1 diff)
-
Source/WebCore/rendering/RootInlineBox.cpp (modified) (4 diffs)
-
Source/WebCore/rendering/RootInlineBox.h (modified) (1 diff)
-
Source/WebCore/rendering/style/RenderStyle.cpp (modified) (1 diff)
-
Source/WebCore/rendering/style/RenderStyle.h (modified) (3 diffs)
-
Source/WebCore/rendering/style/RenderStyleConstants.h (modified) (1 diff)
-
Source/WebCore/rendering/style/StyleRareInheritedData.cpp (modified) (3 diffs)
-
Source/WebCore/rendering/style/StyleRareInheritedData.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r107281 r107289 1 2012-02-09 David Hyatt <hyatt@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=78256 4 5 Rename line-grid-snap to line-snap so that it matches the draft proposal for the 6 property. 7 8 Reviewed by Dan Bernstein. 9 10 * fast/line-grid/line-grid-contains-value.html: 11 * fast/line-grid/line-grid-floating.html: 12 * fast/line-grid/line-grid-inside-columns.html: 13 * fast/line-grid/line-grid-into-columns.html: 14 * fast/line-grid/line-grid-into-floats.html: 15 * fast/line-grid/line-grid-nested.html: 16 * fast/line-grid/line-grid-positioned.html: 17 * fast/line-grid/line-grid-snap-parsing.html: Removed. 18 * fast/line-grid/line-snap-parsing-expected.txt: Added. 19 * fast/line-grid/line-snap-parsing.html: Added. 20 * fast/line-grid/script-tests/line-grid-snap-parsing.js: Removed. 21 * fast/line-grid/script-tests/line-snap-parsing.js: Added. 22 1 23 2012-02-09 Julien Chaffraix <jchaffraix@webkit.org> 2 24 -
trunk/LayoutTests/fast/line-grid/line-grid-contains-value.html
r107099 r107289 3 3 <head> 4 4 <style> 5 .grid { -webkit-line-grid: simple; -webkit-line- grid-snap: baseline;5 .grid { -webkit-line-grid: simple; -webkit-line-snap: baseline; 6 6 font-size:36px; position:absolute; 7 7 padding:10px; } … … 10 10 <body> 11 11 <div style="left:10px; top:10px; width:600px" class="grid"> 12 <div style="-webkit-line- grid-snap:contain;font-size:48px">12 <div style="-webkit-line-snap:contain;font-size:48px"> 13 13 This header should be centered in the grid lines. 14 14 </div> -
trunk/LayoutTests/fast/line-grid/line-grid-floating.html
r105176 r107289 3 3 <head> 4 4 <style> 5 .grid { -webkit-line-grid: simple; -webkit-line- grid-snap: baseline;5 .grid { -webkit-line-grid: simple; -webkit-line-snap: baseline; 6 6 font-size:36px; float:left;border:2px solid black; 7 7 padding:10px; margin:5px } -
trunk/LayoutTests/fast/line-grid/line-grid-inside-columns.html
r105176 r107289 3 3 <head> 4 4 <style> 5 .grid { -webkit-line-grid: simple; -webkit-line- grid-snap: baseline;5 .grid { -webkit-line-grid: simple; -webkit-line-snap: baseline; 6 6 font-size:36px; }</style> 7 7 </head> -
trunk/LayoutTests/fast/line-grid/line-grid-into-columns.html
r107160 r107289 3 3 <head> 4 4 <style> 5 .grid { -webkit-line-grid: simple; -webkit-line- grid-snap: baseline;5 .grid { -webkit-line-grid: simple; -webkit-line-snap: baseline; 6 6 font-size:36px; position:relative; width:800px}</style> 7 7 </head> -
trunk/LayoutTests/fast/line-grid/line-grid-into-floats.html
r105176 r107289 3 3 <head> 4 4 <style> 5 .grid { -webkit-line-grid: simple; -webkit-line- grid-snap: baseline;5 .grid { -webkit-line-grid: simple; -webkit-line-snap: baseline; 6 6 font-size:36px; 7 7 padding:10px; } -
trunk/LayoutTests/fast/line-grid/line-grid-positioned.html
r105176 r107289 3 3 <head> 4 4 <style> 5 .grid { -webkit-line-grid: simple; -webkit-line- grid-snap: baseline;5 .grid { -webkit-line-grid: simple; -webkit-line-snap: baseline; 6 6 font-size:36px; position:absolute;border:2px solid black; 7 7 padding:10px; } -
trunk/Source/WebCore/ChangeLog
r107288 r107289 1 2012-02-09 David Hyatt <hyatt@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=78256 4 5 Rename line-grid-snap to line-snap so that it matches the draft proposal for the 6 property. 7 8 Reviewed by Dan Bernstein. 9 10 * css/CSSComputedStyleDeclaration.cpp: 11 (WebCore): 12 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 13 * css/CSSParser.cpp: 14 (WebCore::CSSParser::parseValue): 15 * css/CSSPrimitiveValueMappings.h: 16 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): 17 (WebCore::CSSPrimitiveValue::operator LineSnap): 18 * css/CSSProperty.cpp: 19 (WebCore::CSSProperty::isInheritedProperty): 20 * css/CSSPropertyNames.in: 21 * css/CSSStyleApplyProperty.cpp: 22 (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): 23 * css/CSSStyleSelector.cpp: 24 (WebCore::CSSStyleSelector::applyProperty): 25 * rendering/RootInlineBox.cpp: 26 (WebCore::RootInlineBox::alignBoxesInBlockDirection): 27 (WebCore::RootInlineBox::lineSnapAdjustment): 28 * rendering/RootInlineBox.h: 29 (RootInlineBox): 30 * rendering/style/RenderStyle.cpp: 31 (WebCore::RenderStyle::diff): 32 * rendering/style/RenderStyle.h: 33 * rendering/style/RenderStyleConstants.h: 34 * rendering/style/StyleRareInheritedData.cpp: 35 (WebCore::StyleRareInheritedData::StyleRareInheritedData): 36 (WebCore::StyleRareInheritedData::operator==): 37 * rendering/style/StyleRareInheritedData.h: 38 (StyleRareInheritedData): 39 1 40 2012-02-09 Benjamin Poulain <bpoulain@apple.com> 2 41 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r106884 r107289 244 244 CSSPropertyWebkitLineClamp, 245 245 CSSPropertyWebkitLineGrid, 246 CSSPropertyWebkitLine GridSnap,246 CSSPropertyWebkitLineSnap, 247 247 CSSPropertyWebkitLocale, 248 248 CSSPropertyWebkitMarginBeforeCollapse, … … 2208 2208 return cssValuePool->createIdentifierValue(CSSValueNone); 2209 2209 return cssValuePool->createValue(style->lineGrid(), CSSPrimitiveValue::CSS_STRING); 2210 case CSSPropertyWebkitLine GridSnap:2211 return CSSPrimitiveValue::create(style->line GridSnap());2210 case CSSPropertyWebkitLineSnap: 2211 return CSSPrimitiveValue::create(style->lineSnap()); 2212 2212 case CSSPropertyWebkitWritingMode: 2213 2213 return cssValuePool->createValue(style->writingMode()); -
trunk/Source/WebCore/css/CSSParser.cpp
r107162 r107289 2050 2050 } 2051 2051 break; 2052 case CSSPropertyWebkitLine GridSnap:2052 case CSSPropertyWebkitLineSnap: 2053 2053 if (id == CSSValueNone || id == CSSValueBaseline || id == CSSValueContain) 2054 2054 validPrimitive = true; -
trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
r106980 r107289 3159 3159 } 3160 3160 3161 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(Line GridSnap gridSnap)3161 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineSnap gridSnap) 3162 3162 : CSSValue(PrimitiveClass) 3163 3163 { 3164 3164 m_primitiveUnitType = CSS_IDENT; 3165 3165 switch (gridSnap) { 3166 case Line GridSnapNone:3166 case LineSnapNone: 3167 3167 m_value.ident = CSSValueNone; 3168 3168 break; 3169 case Line GridSnapBaseline:3169 case LineSnapBaseline: 3170 3170 m_value.ident = CSSValueBaseline; 3171 3171 break; 3172 case Line GridSnapContain:3172 case LineSnapContain: 3173 3173 m_value.ident = CSSValueContain; 3174 3174 break; … … 3176 3176 } 3177 3177 3178 template<> inline CSSPrimitiveValue::operator Line GridSnap() const3178 template<> inline CSSPrimitiveValue::operator LineSnap() const 3179 3179 { 3180 3180 switch (m_value.ident) { 3181 3181 case CSSValueNone: 3182 return Line GridSnapNone;3182 return LineSnapNone; 3183 3183 case CSSValueBaseline: 3184 return Line GridSnapBaseline;3184 return LineSnapBaseline; 3185 3185 case CSSValueContain: 3186 return Line GridSnapContain;3186 return LineSnapContain; 3187 3187 default: 3188 3188 ASSERT_NOT_REACHED(); 3189 return Line GridSnapNone;3189 return LineSnapNone; 3190 3190 } 3191 3191 } -
trunk/Source/WebCore/css/CSSProperty.cpp
r105015 r107289 332 332 case CSSPropertyWebkitLineBreak: 333 333 case CSSPropertyWebkitLineGrid: 334 case CSSPropertyWebkitLine GridSnap:334 case CSSPropertyWebkitLineSnap: 335 335 case CSSPropertyWebkitNbspMode: 336 336 case CSSPropertyWebkitPrintColorAdjust: -
trunk/Source/WebCore/css/CSSPropertyNames.in
r107026 r107289 275 275 -webkit-line-clamp 276 276 -webkit-line-grid 277 -webkit-line- grid-snap277 -webkit-line-snap 278 278 -webkit-logical-width 279 279 -webkit-logical-height -
trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp
r106704 r107289 1927 1927 1928 1928 setPropertyHandler(CSSPropertyWebkitLineGrid, ApplyPropertyString<MapNoneToNull, &RenderStyle::lineGrid, &RenderStyle::setLineGrid, &RenderStyle::initialLineGrid>::createHandler()); 1929 setPropertyHandler(CSSPropertyWebkitLine GridSnap, ApplyPropertyDefault<LineGridSnap, &RenderStyle::lineGridSnap, LineGridSnap, &RenderStyle::setLineGridSnap, LineGridSnap, &RenderStyle::initialLineGridSnap>::createHandler());1929 setPropertyHandler(CSSPropertyWebkitLineSnap, ApplyPropertyDefault<LineSnap, &RenderStyle::lineSnap, LineSnap, &RenderStyle::setLineSnap, LineSnap, &RenderStyle::initialLineSnap>::createHandler()); 1930 1930 1931 1931 setPropertyHandler(CSSPropertyWebkitTextCombine, ApplyPropertyDefault<TextCombine, &RenderStyle::textCombine, TextCombine, &RenderStyle::setTextCombine, TextCombine, &RenderStyle::initialTextCombine>::createHandler()); -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r107279 r107289 4071 4071 case CSSPropertyWebkitHyphenateLimitLines: 4072 4072 case CSSPropertyWebkitLineGrid: 4073 case CSSPropertyWebkitLine GridSnap:4073 case CSSPropertyWebkitLineSnap: 4074 4074 case CSSPropertyWebkitTextCombine: 4075 4075 case CSSPropertyWebkitTextEmphasisPosition: -
trunk/Source/WebCore/rendering/RootInlineBox.cpp
r107160 r107289 287 287 } 288 288 289 LayoutUnit gridSnapAdjustment = line GridSnapAdjustment();289 LayoutUnit gridSnapAdjustment = lineSnapAdjustment(); 290 290 if (gridSnapAdjustment) { 291 291 adjustBlockDirectionPosition(gridSnapAdjustment); … … 327 327 } 328 328 329 LayoutUnit RootInlineBox::line GridSnapAdjustment(LayoutUnit delta) const329 LayoutUnit RootInlineBox::lineSnapAdjustment(LayoutUnit delta) const 330 330 { 331 331 // If our block doesn't have snapping turned on, do nothing. 332 332 // FIXME: Implement bounds snapping. 333 if (block()->style()->line GridSnap() == LineGridSnapNone)333 if (block()->style()->lineSnap() == LineSnapNone) 334 334 return 0; 335 335 … … 378 378 } 379 379 380 if (block()->style()->line GridSnap() == LineGridSnapContain) {380 if (block()->style()->lineSnap() == LineSnapContain) { 381 381 // Compute the desired offset from the text-top of a grid line. 382 382 // Look at our height (logicalHeight()). … … 415 415 416 416 // Put ourselves at the top of the next page to force a snap onto the new grid established by that page. 417 return line GridSnapAdjustment(newPageLogicalTop - (blockOffset + lineTopWithLeading()));417 return lineSnapAdjustment(newPageLogicalTop - (blockOffset + lineTopWithLeading())); 418 418 } 419 419 -
trunk/Source/WebCore/rendering/RootInlineBox.h
r106900 r107289 184 184 void setHasEllipsisBox(bool hasEllipsisBox) { m_hasEllipsisBoxOrHyphen = hasEllipsisBox; } 185 185 186 LayoutUnit line GridSnapAdjustment(LayoutUnit delta = 0) const;186 LayoutUnit lineSnapAdjustment(LayoutUnit delta = 0) const; 187 187 188 188 int beforeAnnotationsAdjustment() const; -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r105403 r107289 467 467 || rareInheritedData->m_lineBoxContain != other->rareInheritedData->m_lineBoxContain 468 468 || rareInheritedData->m_lineGrid != other->rareInheritedData->m_lineGrid 469 || rareInheritedData->m_line GridSnap != other->rareInheritedData->m_lineGridSnap)469 || rareInheritedData->m_lineSnap != other->rareInheritedData->m_lineSnap) 470 470 return StyleDifferenceLayout; 471 471 -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r105903 r107289 904 904 905 905 const AtomicString& lineGrid() const { return rareInheritedData->m_lineGrid; } 906 Line GridSnap lineGridSnap() const { return static_cast<LineGridSnap>(rareInheritedData->m_lineGridSnap); }906 LineSnap lineSnap() const { return static_cast<LineSnap>(rareInheritedData->m_lineSnap); } 907 907 908 908 WrapFlow wrapFlow() const { return static_cast<WrapFlow>(rareNonInheritedData->m_wrapFlow); } … … 1303 1303 1304 1304 void setLineGrid(const AtomicString& lineGrid) { SET_VAR(rareInheritedData, m_lineGrid, lineGrid); } 1305 void setLine GridSnap(LineGridSnap lineGridSnap) { SET_VAR(rareInheritedData, m_lineGridSnap, lineGridSnap); }1305 void setLineSnap(LineSnap lineSnap) { SET_VAR(rareInheritedData, m_lineSnap, lineSnap); } 1306 1306 1307 1307 void setFlowThread(const AtomicString& flowThread) { SET_VAR(rareNonInheritedData, m_flowThread, flowThread); } … … 1632 1632 1633 1633 static const AtomicString& initialLineGrid() { return nullAtom; } 1634 static Line GridSnap initialLineGridSnap() { return LineGridSnapNone; }1634 static LineSnap initialLineSnap() { return LineSnapNone; } 1635 1635 1636 1636 static const AtomicString& initialFlowThread() { return nullAtom; } -
trunk/Source/WebCore/rendering/style/RenderStyleConstants.h
r106980 r107289 455 455 enum ColumnAxis { HorizontalColumnAxis, VerticalColumnAxis, AutoColumnAxis }; 456 456 457 enum Line GridSnap { LineGridSnapNone, LineGridSnapBaseline, LineGridSnapContain };457 enum LineSnap { LineSnapNone, LineSnapBaseline, LineSnapContain }; 458 458 459 459 enum WrapFlow { WrapFlowAuto, WrapFlowBoth, WrapFlowLeft, WrapFlowRight, WrapFlowMaximum, WrapFlowClear }; -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp
r99902 r107289 54 54 , m_lineBoxContain(RenderStyle::initialLineBoxContain()) 55 55 , m_imageRendering(RenderStyle::initialImageRendering()) 56 , m_line GridSnap(RenderStyle::initialLineGridSnap())56 , m_lineSnap(RenderStyle::initialLineSnap()) 57 57 , hyphenationLimitBefore(-1) 58 58 , hyphenationLimitAfter(-1) … … 98 98 , m_lineBoxContain(o.m_lineBoxContain) 99 99 , m_imageRendering(o.m_imageRendering) 100 , m_line GridSnap(o.m_lineGridSnap)100 , m_lineSnap(o.m_lineSnap) 101 101 , hyphenationString(o.hyphenationString) 102 102 , hyphenationLimitBefore(o.hyphenationLimitBefore) … … 169 169 && m_lineGrid == o.m_lineGrid 170 170 && m_imageRendering == o.m_imageRendering 171 && m_line GridSnap == o.m_lineGridSnap;171 && m_lineSnap == o.m_lineSnap; 172 172 } 173 173 -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h
r99902 r107289 92 92 // CSS Image Values Level 3 93 93 unsigned m_imageRendering : 2; // EImageRendering 94 unsigned m_line GridSnap : 2; // LineGridSnap94 unsigned m_lineSnap : 2; // LineSnap 95 95 96 96 AtomicString hyphenationString;
Note:
See TracChangeset
for help on using the changeset viewer.