Changeset 116723 in webkit
- Timestamp:
- May 10, 2012 8:28:46 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r116698 r116723 1 2012-05-10 MORITA Hajime <morrita@google.com> 2 3 WebKit should support tab-size. 4 https://bugs.webkit.org/show_bug.cgi?id=52994 5 6 Reviewed by Simon Fraser. 7 8 * fast/css/tab-size-expected.html: Added. 9 * fast/css/tab-size.html: Added. 10 * platform/chromium-linux/svg/css/getComputedStyle-basic-expected.txt: 11 * platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt: 12 * platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: 13 1 14 2012-05-10 Abhishek Arya <inferno@chromium.org> 2 15 -
trunk/LayoutTests/platform/chromium-linux/svg/css/getComputedStyle-basic-expected.txt
r114777 r116723 165 165 rect: style.getPropertyValue(table-layout) : auto 166 166 rect: style.getPropertyCSSValue(table-layout) : [object CSSPrimitiveValue] 167 rect: style.getPropertyValue(tab-size) : 8 168 rect: style.getPropertyCSSValue(tab-size) : [object CSSPrimitiveValue] 167 169 rect: style.getPropertyValue(text-align) : -webkit-auto 168 170 rect: style.getPropertyCSSValue(text-align) : [object CSSPrimitiveValue] … … 693 695 g: style.getPropertyValue(table-layout) : auto 694 696 g: style.getPropertyCSSValue(table-layout) : [object CSSPrimitiveValue] 697 g: style.getPropertyValue(tab-size) : 8 698 g: style.getPropertyCSSValue(tab-size) : [object CSSPrimitiveValue] 695 699 g: style.getPropertyValue(text-align) : -webkit-auto 696 700 g: style.getPropertyCSSValue(text-align) : [object CSSPrimitiveValue] -
trunk/LayoutTests/platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt
r114766 r116723 84 84 speak: normal; 85 85 table-layout: auto; 86 tab-size: 8; 86 87 text-align: -webkit-auto; 87 88 text-decoration: none; -
trunk/LayoutTests/platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
r114766 r116723 83 83 speak: normal 84 84 table-layout: auto 85 tab-size: 8 85 86 text-align: -webkit-auto 86 87 text-decoration: none -
trunk/Source/WebCore/ChangeLog
r116722 r116723 1 2012-05-10 Hajime Morrita <morrita@google.com> 2 3 WebKit should support tab-size. 4 https://bugs.webkit.org/show_bug.cgi?id=52994 5 6 - Added boilerplate for "tab-size" CSS property. 7 - Added RenderStye::tabSize() as a RareInheritedData. 8 - Replaced TextRun::m_allowTabs into TextRun::m_tabSize. 9 10 Reviewed by Simon Fraser. 11 12 Tests: fast/css/tab-size-expected.html 13 fast/css/tab-size.html 14 15 * css/CSSComputedStyleDeclaration.cpp: 16 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): 17 * css/CSSParser.cpp: 18 (WebCore::CSSParser::parseValue): 19 * css/CSSProperty.cpp: 20 (WebCore::CSSProperty::isInheritedProperty): 21 * css/CSSPropertyNames.in: 22 * css/CSSStyleSelector.cpp: 23 (WebCore::CSSStyleSelector::applyProperty): 24 * html/canvas/CanvasRenderingContext2D.cpp: 25 (WebCore::CanvasRenderingContext2D::drawTextInternal): 26 * platform/chromium/PopupListBox.cpp: 27 (WebCore::PopupListBox::paintRow): 28 * platform/graphics/Font.h: 29 (WebCore::Font::tabWidth): 30 * platform/graphics/TextRun.h: 31 (WebCore::TextRun::TextRun): 32 (WebCore::TextRun::allowTabs): 33 (WebCore::TextRun::tabSize): 34 (WebCore::TextRun::setTabSize): 35 * platform/graphics/WidthIterator.cpp: 36 (WebCore::WidthIterator::advance): 37 * platform/graphics/mac/ComplexTextController.cpp: 38 (WebCore::ComplexTextController::adjustGlyphsAndAdvances): 39 * platform/win/PopupMenuWin.cpp: 40 (WebCore::PopupMenuWin::paint): 41 * rendering/InlineTextBox.cpp: 42 (WebCore::InlineTextBox::constructTextRun): 43 * rendering/RenderBlock.cpp: 44 (WebCore::RenderBlock::constructTextRun): 45 * rendering/RenderBlockLineLayout.cpp: 46 (WebCore::textWidth): 47 (WebCore::tryHyphenating): 48 * rendering/RenderText.cpp: 49 (WebCore::RenderText::widthFromCache): 50 (WebCore::RenderText::computePreferredLogicalWidths): 51 (WebCore::RenderText::width): 52 * rendering/RenderText.h: 53 * rendering/style/RenderStyle.cpp: 54 (WebCore::RenderStyle::diff): 55 * rendering/style/RenderStyle.h: 56 (WebCore::RenderStyleBitfields::tabSize): 57 (WebCore::RenderStyleBitfields::collapsedTabSize): 58 (WebCore::RenderStyleBitfields::setTabSize): 59 (WebCore::RenderStyleBitfields::initialTabSize): 60 * rendering/style/StyleRareInheritedData.cpp: 61 (WebCore::StyleRareInheritedData::StyleRareInheritedData): 62 (WebCore::StyleRareInheritedData::operator==): 63 * rendering/style/StyleRareInheritedData.h: 64 * rendering/svg/SVGInlineTextBox.cpp: 65 (WebCore::SVGInlineTextBox::constructTextRun): 66 * rendering/svg/SVGTextMetrics.cpp: 67 (WebCore::constructTextRun): 68 1 69 2012-05-10 Antoine Labour <piman@chromium.org> 2 70 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r116645 r116723 158 158 CSSPropertySpeak, 159 159 CSSPropertyTableLayout, 160 CSSPropertyTabSize, 160 161 CSSPropertyTextAlign, 161 162 CSSPropertyTextDecoration, … … 1592 1593 return cssValuePool().createIdentifierValue(CSSValueAuto); 1593 1594 return zoomAdjustedPixelValue(style->columnWidth(), style.get()); 1595 case CSSPropertyTabSize: 1596 return cssValuePool().createValue(style->tabSize(), CSSPrimitiveValue::CSS_NUMBER); 1594 1597 case CSSPropertyWebkitRegionBreakAfter: 1595 1598 return cssValuePool().createValue(style->regionBreakAfter()); -
trunk/Source/WebCore/css/CSSParser.cpp
r116645 r116723 1974 1974 return true; 1975 1975 } 1976 case CSSPropertyTabSize: 1977 validPrimitive = validUnit(value, FInteger | FNonNeg); 1978 break; 1976 1979 case CSSPropertyWebkitAspectRatio: 1977 1980 return parseAspectRatio(important); -
trunk/Source/WebCore/css/CSSProperty.cpp
r113031 r116723 280 280 case CSSPropertyResize: 281 281 case CSSPropertySpeak: 282 case CSSPropertyTabSize: 282 283 case CSSPropertyTextAlign: 283 284 case CSSPropertyTextDecoration: -
trunk/Source/WebCore/css/CSSPropertyNames.in
r112968 r116723 151 151 speak 152 152 table-layout 153 tab-size 153 154 text-align 154 155 text-decoration -
trunk/Source/WebCore/css/StyleBuilder.cpp
r115953 r116723 1880 1880 setPropertyHandler(CSSPropertySpeak, ApplyPropertyDefault<ESpeak, &RenderStyle::speak, ESpeak, &RenderStyle::setSpeak, ESpeak, &RenderStyle::initialSpeak>::createHandler()); 1881 1881 setPropertyHandler(CSSPropertyTableLayout, ApplyPropertyDefault<ETableLayout, &RenderStyle::tableLayout, ETableLayout, &RenderStyle::setTableLayout, ETableLayout, &RenderStyle::initialTableLayout>::createHandler()); 1882 setPropertyHandler(CSSPropertyTabSize, ApplyPropertyDefault<unsigned, &RenderStyle::tabSize, unsigned, &RenderStyle::setTabSize, unsigned, &RenderStyle::initialTabSize>::createHandler()); 1882 1883 setPropertyHandler(CSSPropertyTextAlign, ApplyPropertyTextAlign::createHandler()); 1883 1884 setPropertyHandler(CSSPropertyTextDecoration, ApplyPropertyTextDecoration::createHandler()); -
trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
r115215 r116723 2054 2054 bool override = computedStyle ? isOverride(computedStyle->unicodeBidi()) : false; 2055 2055 2056 unsigned length = text.length(); 2057 const UChar* string = text.characters(); 2058 TextRun textRun(string, length, false, 0, 0, TextRun::AllowTrailingExpansion, direction, override, true, TextRun::NoRounding); 2059 2056 TextRun textRun(text, 0, 0, TextRun::AllowTrailingExpansion, direction, override, true, TextRun::NoRounding); 2060 2057 // Draw the item text at the correct point. 2061 2058 FloatPoint location(x, y); … … 2078 2075 } 2079 2076 2080 float fontWidth = font.width(TextRun(text, false,0, 0, TextRun::AllowTrailingExpansion, direction, override));2077 float fontWidth = font.width(TextRun(text, 0, 0, TextRun::AllowTrailingExpansion, direction, override)); 2081 2078 2082 2079 useMaxWidth = (useMaxWidth && maxWidth < fontWidth); -
trunk/Source/WebCore/platform/chromium/PopupListBox.cpp
r114568 r116723 480 480 481 481 // Prepare the directionality to draw text. 482 TextRun textRun(itemText .characters(), itemText.length(), false, 0, 0, TextRun::AllowTrailingExpansion, style.textDirection(), style.hasTextDirectionOverride());482 TextRun textRun(itemText, 0, 0, TextRun::AllowTrailingExpansion, style.textDirection(), style.hasTextDirectionOverride()); 483 483 // If the text is right-to-left, make it right-aligned by adjusting its 484 484 // beginning position. … … 518 518 } 519 519 520 TextRun labelTextRun(itemLabel .characters(), itemLabel.length(), false, 0, 0, TextRun::AllowTrailingExpansion, style.textDirection(), style.hasTextDirectionOverride());520 TextRun labelTextRun(itemLabel, 0, 0, TextRun::AllowTrailingExpansion, style.textDirection(), style.hasTextDirectionOverride()); 521 521 if (rightAligned) 522 522 textX = max<int>(0, m_popupClient->clientPaddingLeft() - m_popupClient->clientInsetLeft()); -
trunk/Source/WebCore/platform/graphics/Font.h
r114032 r116723 161 161 const FontMetrics& fontMetrics() const { return primaryFont()->fontMetrics(); } 162 162 float spaceWidth() const { return primaryFont()->spaceWidth() + m_letterSpacing; } 163 float tabWidth(const SimpleFontData& fontData) const { return 8 * fontData.spaceWidth() + letterSpacing(); } 163 float tabWidth(const SimpleFontData&, unsigned tabSize, float position) const; 164 float tabWidth(unsigned tabSize, float position) const { return tabWidth(*primaryFont(), tabSize, position); } 165 164 166 int emphasisMarkAscent(const AtomicString&) const; 165 167 int emphasisMarkDescent(const AtomicString&) const; … … 304 306 } 305 307 306 } 307 308 #endif 308 inline float Font::tabWidth(const SimpleFontData& fontData, unsigned tabSize, float position) const 309 { 310 if (!tabSize) 311 return letterSpacing(); 312 float tabWidth = tabSize * fontData.spaceWidth() + letterSpacing(); 313 return tabWidth - fmodf(position, tabWidth); 314 } 315 316 } 317 318 #endif -
trunk/Source/WebCore/platform/graphics/TextRun.cpp
r116262 r116723 38 38 float float3; 39 39 uint32_t bitfields : 9; 40 unsigned anUnsigned; 40 41 RefPtr<TextRun::RenderingContext> renderingContext; 41 42 }; -
trunk/Source/WebCore/platform/graphics/TextRun.h
r116260 r116723 59 59 typedef unsigned RoundingHacks; 60 60 61 TextRun(const UChar* c, int len, bool allowTabs = false,float xpos = 0, float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextDirection direction = LTR, bool directionalOverride = false, bool characterScanForCodePath = true, RoundingHacks roundingHacks = RunRounding | WordRounding)61 TextRun(const UChar* c, int len, float xpos = 0, float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextDirection direction = LTR, bool directionalOverride = false, bool characterScanForCodePath = true, RoundingHacks roundingHacks = RunRounding | WordRounding) 62 62 : m_characters(c) 63 63 , m_charactersLength(len) … … 69 69 , m_expansion(expansion) 70 70 , m_expansionBehavior(expansionBehavior) 71 , m_allowTabs( allowTabs)71 , m_allowTabs(false) 72 72 , m_direction(direction) 73 73 , m_directionalOverride(directionalOverride) … … 76 76 , m_applyWordRounding((roundingHacks & WordRounding) && s_allowsRoundingHacks) 77 77 , m_disableSpacing(false) 78 , m_tabSize(0) 78 79 { 79 80 } 80 81 81 TextRun(const String& s, bool allowTabs = false,float xpos = 0, float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextDirection direction = LTR, bool directionalOverride = false, bool characterScanForCodePath = true, RoundingHacks roundingHacks = RunRounding | WordRounding)82 TextRun(const String& s, float xpos = 0, float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, TextDirection direction = LTR, bool directionalOverride = false, bool characterScanForCodePath = true, RoundingHacks roundingHacks = RunRounding | WordRounding) 82 83 : m_characters(s.characters()) 83 84 , m_charactersLength(s.length()) … … 89 90 , m_expansion(expansion) 90 91 , m_expansionBehavior(expansionBehavior) 91 , m_allowTabs( allowTabs)92 , m_allowTabs(false) 92 93 , m_direction(direction) 93 94 , m_directionalOverride(directionalOverride) … … 96 97 , m_applyWordRounding((roundingHacks & WordRounding) && s_allowsRoundingHacks) 97 98 , m_disableSpacing(false) 99 , m_tabSize(0) 98 100 { 99 101 } … … 115 117 116 118 bool allowTabs() const { return m_allowTabs; } 117 void setAllowTabs(bool allowTabs) { m_allowTabs = allowTabs; } 119 unsigned tabSize() const { return m_tabSize; } 120 void setTabSize(bool, unsigned); 121 118 122 float xPos() const { return m_xpos; } 119 123 void setXPos(float xPos) { m_xpos = xPos; } … … 167 171 float m_horizontalGlyphStretch; 168 172 #endif 173 169 174 float m_expansion; 170 175 ExpansionBehavior m_expansionBehavior : 2; … … 176 181 unsigned m_applyWordRounding : 1; 177 182 unsigned m_disableSpacing : 1; 183 unsigned m_tabSize; 178 184 RefPtr<RenderingContext> m_renderingContext; 179 185 }; 186 187 inline void TextRun::setTabSize(bool allow, unsigned size) 188 { 189 m_allowTabs = allow; 190 m_tabSize = size; 191 } 180 192 181 193 } -
trunk/Source/WebCore/platform/graphics/WidthIterator.cpp
r104545 r116723 118 118 // Now that we have a glyph and font data, get its width. 119 119 float width; 120 if (character == '\t' && m_run.allowTabs()) { 121 float tabWidth = m_font->tabWidth(*fontData); 122 width = tabWidth - fmodf(m_run.xPos() + m_runWidthSoFar + widthSinceLastRounding, tabWidth); 123 } else { 120 if (character == '\t' && m_run.allowTabs()) 121 width = m_font->tabWidth(*fontData, m_run.tabSize(), m_run.xPos() + m_runWidthSoFar + widthSinceLastRounding); 122 else { 124 123 width = fontData->widthForGlyph(glyph); 125 124 -
trunk/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
r111589 r116723 517 517 CGSize advance = treatAsSpace ? CGSizeMake(spaceWidth, advances[i].height) : advances[i]; 518 518 519 if (ch == '\t' && m_run.allowTabs()) { 520 float tabWidth = m_font.tabWidth(*fontData); 521 advance.width = tabWidth - fmodf(m_run.xPos() + m_totalWidth + widthSinceLastCommit, tabWidth); 522 } else if (Font::treatAsZeroWidthSpace(ch) && !treatAsSpace) { 519 if (ch == '\t' && m_run.allowTabs()) 520 advance.width = m_font.tabWidth(*fontData, m_run.tabSize(), m_run.xPos() + m_totalWidth + widthSinceLastCommit); 521 else if (Font::treatAsZeroWidthSpace(ch) && !treatAsSpace) { 523 522 advance.width = 0; 524 523 glyph = fontData->spaceGlyph(); -
trunk/Source/WebCore/platform/win/PopupMenuWin.cpp
r115672 r116723 637 637 String itemText = client()->itemText(index); 638 638 639 unsigned length = itemText.length();640 const UChar* string = itemText.characters();641 639 TextDirection direction = (itemText.defaultWritingDirection() == WTF::Unicode::RightToLeft) ? RTL : LTR; 642 TextRun textRun( string, length, false, 0, 0, TextRun::AllowTrailingExpansion, direction);640 TextRun textRun(itemText, 0, 0, TextRun::AllowTrailingExpansion, direction); 643 641 644 642 context.setFillColor(optionTextColor, ColorSpaceDeviceRGB); -
trunk/Source/WebCore/rendering/InlineTextBox.cpp
r116373 r116723 1332 1332 ASSERT(maximumLength >= length); 1333 1333 1334 TextRun run(characters, length, textRenderer->allowTabs(), textPos(), expansion(), expansionBehavior(), direction(), dirOverride() || style->rtlOrdering() == VisualOrder, !textRenderer->canUseSimpleFontCodePath()); 1334 TextRun run(characters, length, textPos(), expansion(), expansionBehavior(), direction(), dirOverride() || style->rtlOrdering() == VisualOrder, !textRenderer->canUseSimpleFontCodePath()); 1335 run.setTabSize(!style->collapseWhiteSpace(), style->tabSize()); 1335 1336 if (textRunNeedsRenderingContext(font)) 1336 1337 run.setRenderingContext(SVGTextRunRenderingContext::create(textRenderer)); -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r116438 r116723 7275 7275 } 7276 7276 7277 TextRun run(characters, length, false,0, 0, expansion, textDirection, directionalOverride);7277 TextRun run(characters, length, 0, 0, expansion, textDirection, directionalOverride); 7278 7278 if (textRunNeedsRenderingContext(font)) 7279 7279 run.setRenderingContext(SVGTextRunRenderingContext::create(context)); -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r115691 r116723 1949 1949 1950 1950 run.setCharacterScanForCodePath(!text->canUseSimpleFontCodePath()); 1951 run.set AllowTabs(!collapseWhiteSpace);1951 run.setTabSize(!collapseWhiteSpace, text->style()->tabSize()); 1952 1952 run.setXPos(xPos); 1953 1953 return font.width(run); … … 1981 1981 ASSERT(run.charactersLength() >= run.length()); 1982 1982 1983 run.set AllowTabs(!collapseWhiteSpace);1983 run.setTabSize(!collapseWhiteSpace, text->style()->tabSize()); 1984 1984 run.setXPos(xPos + lastSpaceWordSpacing); 1985 1985 -
trunk/Source/WebCore/rendering/RenderListBox.cpp
r116476 r116723 408 408 paintInfo.context->setFillColor(textColor, colorSpace); 409 409 410 unsigned length = itemText.length(); 411 const UChar* string = itemText.characters(); 412 TextRun textRun(string, length, false, 0, 0, TextRun::AllowTrailingExpansion, itemStyle->direction(), isOverride(itemStyle->unicodeBidi()), true, TextRun::NoRounding); 410 TextRun textRun(itemText, 0, 0, TextRun::AllowTrailingExpansion, itemStyle->direction(), isOverride(itemStyle->unicodeBidi()), true, TextRun::NoRounding); 413 411 Font itemFont = style()->font(); 414 412 LayoutRect r = itemBoundingBoxRect(paintOffset, listIndex); -
trunk/Source/WebCore/rendering/RenderText.cpp
r115177 r116723 730 730 if (f.isFixedPitch() && !f.isSmallCaps() && m_isAllASCII && (!glyphOverflow || !glyphOverflow->computeBounds)) { 731 731 float monospaceCharacterWidth = f.spaceWidth(); 732 float tabWidth = allowTabs() ? monospaceCharacterWidth * 8 : 0;733 732 float w = 0; 734 733 bool isSpace; … … 743 742 isSpace = true; 744 743 } else if (c == '\t') { 745 w += tabWidth ? tabWidth - fmodf(xPos + w, tabWidth) : monospaceCharacterWidth;744 w += style()->collapseWhiteSpace() ? monospaceCharacterWidth : f.tabWidth(style()->tabSize(), xPos + w); 746 745 isSpace = true; 747 746 } else … … 763 762 764 763 run.setCharacterScanForCodePath(!canUseSimpleFontCodePath()); 765 run.set AllowTabs(allowTabs());764 run.setTabSize(!style()->collapseWhiteSpace(), style()->tabSize()); 766 765 run.setXPos(xPos); 767 766 return f.width(run, fallbackFonts, glyphOverflow); … … 1062 1061 run.setCharactersLength(len - i); 1063 1062 ASSERT(run.charactersLength() >= run.length()); 1064 1065 run.setAllowTabs(allowTabs()); 1063 run.setTabSize(!style()->collapseWhiteSpace(), style()->tabSize()); 1066 1064 run.setXPos(leadWidth + currMaxWidth); 1067 1065 … … 1478 1476 1479 1477 run.setCharacterScanForCodePath(!canUseSimpleFontCodePath()); 1480 run.set AllowTabs(allowTabs());1478 run.setTabSize(!style()->collapseWhiteSpace(), style()->tabSize()); 1481 1479 run.setXPos(xPos); 1482 1480 w = f.width(run, fallbackFonts, glyphOverflow); -
trunk/Source/WebCore/rendering/RenderText.h
r115177 r116723 123 123 124 124 InlineTextBox* findNextInlineTextBox(int offset, int& pos) const; 125 126 bool allowTabs() const { return !style()->collapseWhiteSpace(); }127 125 128 126 void checkConsistency() const; -
trunk/Source/WebCore/rendering/style/RenderStyle.cpp
r116174 r116723 463 463 || rareInheritedData->textEmphasisPosition != other->rareInheritedData->textEmphasisPosition 464 464 || rareInheritedData->textEmphasisCustomMark != other->rareInheritedData->textEmphasisCustomMark 465 || rareInheritedData->m_tabSize != other->rareInheritedData->m_tabSize 465 466 || rareInheritedData->m_lineBoxContain != other->rareInheritedData->m_lineBoxContain 466 467 || rareInheritedData->m_lineGrid != other->rareInheritedData->m_lineGrid -
trunk/Source/WebCore/rendering/style/RenderStyle.h
r116174 r116723 910 910 TextCombine textCombine() const { return static_cast<TextCombine>(rareNonInheritedData->m_textCombine); } 911 911 bool hasTextCombine() const { return textCombine() != TextCombineNone; } 912 913 unsigned tabSize() const { return rareInheritedData->m_tabSize; } 914 912 915 // End CSS3 Getters 913 916 … … 1325 1328 void setFilter(const FilterOperations& ops) { SET_VAR(rareNonInheritedData.access()->m_filter, m_operations, ops); } 1326 1329 #endif 1330 1331 void setTabSize(unsigned size) { SET_VAR(rareInheritedData, m_tabSize, size); } 1327 1332 1328 1333 // End CSS3 Setters … … 1665 1670 #endif 1666 1671 1672 static unsigned initialTabSize() { return 8; } 1673 1667 1674 static const AtomicString& initialLineGrid() { return nullAtom; } 1668 1675 static LineSnap initialLineSnap() { return LineSnapNone; } -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp
r108133 r116723 63 63 , hyphenationLimitLines(-1) 64 64 , m_lineGrid(RenderStyle::initialLineGrid()) 65 , m_tabSize(RenderStyle::initialTabSize()) 65 66 #if ENABLE(TOUCH_EVENTS) 66 67 , tapHighlightColor(RenderStyle::initialTapHighlightColor()) … … 114 115 , textEmphasisCustomMark(o.textEmphasisCustomMark) 115 116 , m_lineGrid(o.m_lineGrid) 117 , m_tabSize(o.m_tabSize) 116 118 #if ENABLE(TOUCH_EVENTS) 117 119 , tapHighlightColor(o.tapHighlightColor) … … 178 180 && textEmphasisCustomMark == o.textEmphasisCustomMark 179 181 && QuotesData::equal(quotes.get(), o.quotes.get()) 182 && m_tabSize == o.m_tabSize 180 183 && m_lineGrid == o.m_lineGrid 181 184 && m_imageRendering == o.m_imageRendering -
trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h
r108133 r116723 107 107 AtomicString textEmphasisCustomMark; 108 108 RefPtr<QuotesData> quotes; 109 109 110 110 AtomicString m_lineGrid; 111 unsigned m_tabSize; 111 112 112 113 #if ENABLE(TOUCH_EVENTS) -
trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
r116343 r116723 432 432 TextRun run(text->characters() + fragment.characterOffset 433 433 , fragment.length 434 , false /* allowTabs */435 434 , 0 /* xPos, only relevant with allowTabs=true */ 436 435 , 0 /* padding, only relevant for justified text, not relevant for SVG */ -
trunk/Source/WebCore/rendering/svg/SVGTextMetrics.cpp
r109806 r116723 71 71 TextRun run(characters + position 72 72 , length 73 , false /* allowTabs */74 73 , 0 /* xPos, only relevant with allowTabs=true */ 75 74 , 0 /* padding, only relevant for justified text, not relevant for SVG */ -
trunk/Source/WebKit/chromium/ChangeLog
r116714 r116723 1 2012-05-10 Hajime Morrita <morrita@google.com> 2 3 WebKit should support tab-size. 4 https://bugs.webkit.org/show_bug.cgi?id=52994 5 6 Reviewed by Simon Fraser. 7 8 * src/WebTextRun.cpp: 9 (WebKit::WebTextRun::operator WebCore::TextRun): 10 1 11 2012-05-10 Kent Tamura <tkent@chromium.org> 2 12 -
trunk/Source/WebKit/chromium/src/WebTextRun.cpp
r95901 r116723 40 40 WebTextRun::operator WebCore::TextRun() const 41 41 { 42 return TextRun(text, false,0, 0, TextRun::AllowTrailingExpansion, rtl ? RTL : LTR, directionalOverride);42 return TextRun(text, 0, 0, TextRun::AllowTrailingExpansion, rtl ? RTL : LTR, directionalOverride); 43 43 } 44 44
Note: See TracChangeset
for help on using the changeset viewer.