• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/WebCore-7600.1.25/rendering/

Lines Matching refs:style

121     const RenderStyle& style = flow.style();
122 if (style.textDecorationsInEffect() != TextDecorationNone)
124 if (style.textAlign() == JUSTIFY)
127 if (style.overflowX() != OVISIBLE || style.overflowY() != OVISIBLE)
129 if (!style.textIndent().isZero())
131 if (!style.wordSpacing().isZero() || style.letterSpacing())
133 if (style.textTransform() != TTNONE)
135 if (!style.isLeftToRightDirection())
137 if (style.lineBoxContain() != RenderStyle::initialLineBoxContain())
139 if (style.writingMode() != TopToBottomWritingMode)
141 if (style.lineBreak() != LineBreakAuto)
143 if (style.wordBreak() != NormalWordBreak)
145 if (style.unicodeBidi() != UBNormal || style.rtlOrdering() != LogicalOrder)
147 if (style.lineAlign() != LineAlignNone || style.lineSnap() != LineSnapNone)
149 if (style.hyphens() == HyphensAuto)
151 if (style.textEmphasisFill() != TextEmphasisFillFilled || style.textEmphasisMark() != TextEmphasisMarkNone)
153 if (style.textShadow())
155 if (style.textOverflow() || (flow.isAnonymousBlock() && flow.parent()->style().textOverflow()))
157 if (style.hasPseudoStyle(FIRST_LINE) || style.hasPseudoStyle(FIRST_LETTER))
159 if (style.hasTextCombine())
161 if (style.backgroundClip() == TextFillBox)
163 if (style.borderFit() == BorderFitLines)
179 if (style.font().codePath(TextRun(textRenderer.text())) != Font::Simple)
181 if (style.font().primaryFont()->isSVGFont())
185 auto& primaryFontData = *style.font().primaryFont();
195 Style(const RenderStyle& style)
196 : font(style.font())
197 , textAlign(style.textAlign())
198 , collapseWhitespace(style.collapseWhiteSpace())
199 , preserveNewline(style.preserveNewline())
200 , wrapLines(style.autoWrap())
201 , breakWordOnOverflow(style.overflowWrap() == BreakOverflowWrap && (wrapLines || preserveNewline))
203 , tabWidth(collapseWhitespace ? 0 : style.tabSize())
232 static float textWidth(const RenderText& renderText, const CharacterType* text, unsigned textLength, unsigned from, unsigned to, float xPosition, const Style& style)
234 if (style.font.isFixedPitch() || (!from && to == textLength))
235 return renderText.width(from, to - from, style.font, xPosition, nullptr, nullptr);
240 run.setTabSize(!!style.tabWidth, style.tabWidth);
244 return style.font.width(run);
248 static float measureWord(unsigned start, unsigned end, float lineWidth, const Style& style, const CharacterType* text, unsigned textLength, const RenderText& textRenderer)
251 return style.spaceWidth;
253 bool measureWithEndSpace = style.collapseWhitespace && end < textLength && text[end] == ' ';
256 float width = textWidth(textRenderer, text, textLength, start, end, lineWidth, style);
258 return measureWithEndSpace ? width - style.spaceWidth : width;
262 Vector<Run, 4> createLineRuns(unsigned lineStart, LineWidth& lineWidth, LazyLineBreakIterator& lineBreakIterator, const Style& style, const CharacterType* text, unsigned textLength, const RenderText& textRenderer)
269 ASSERT(!style.collapseWhitespace || !isWhitespace(text[wordEnd], style.preserveNewline));
273 if (style.preserveNewline && text[wordStart] == '\n') {
283 if (!style.collapseWhitespace && isWhitespace(text[wordStart], style.preserveNewline))
288 bool wordIsPrecededByWhitespace = style.collapseWhitespace && wordStart > lineStart && isWhitespace(text[wordStart - 1], style.preserveNewline);
292 float wordWidth = measureWord(wordStart, wordEnd, lineWidth.committedWidth(), style, text, textLength, textRenderer);
296 if (style.wrapLines) {
302 if (!style.collapseWhitespace && lineWidth.fitsOnLine() && wordEnd < textLength && isWhitespace(text[wordEnd], style.preserveNewline)) {
304 float whitespaceWidth = textWidth(textRenderer, text, textLength, wordEnd, wordEnd + 1, lineWidth.committedWidth(), style);
307 unsigned whitespaceEnd = skipWhitespaces(text, wordEnd, textLength, style.preserveNewline);
323 lineRuns.last().right += style.spaceWidth;
328 if (!lineWidth.fitsOnLine() && style.breakWordOnOverflow) {
333 float charWidth = textWidth(textRenderer, text, textLength, splitEnd, splitEnd + 1, 0, style);
352 if (style.collapseWhitespace)
353 wordEnd = skipWhitespaces(text, wordEnd, textLength, style.preserveNewline);
355 if (!lineWidth.fitsOnLine() && style.wrapLines) {
400 const Style style(flow.style());
408 LazyLineBreakIterator lineBreakIterator(textRenderer.text(), flow.style().locale());
412 if (style.collapseWhitespace)
413 lineEnd = skipWhitespaces(text, lineEnd, textLength, style.preserveNewline);
421 auto lineRuns = createLineRuns(lineStart, lineWidth, lineBreakIterator, style, text, textLength, textRenderer);
429 float lineLeft = computeLineLeft(style.textAlign, lineWidth);