Bug 151979

Summary: Make paintTextWithShadows a member function (TextPainter).
Product: WebKit Reporter: alan <zalan>
Component: Layout and RenderingAssignee: alan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, kondapallykalyan, mmaxfield, simon.fraser
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

alan
Reported 2015-12-07 18:48:35 PST
SSIA.
Attachments
Patch (9.57 KB, patch)
2015-12-07 18:55 PST, alan
no flags
Patch (9.57 KB, patch)
2015-12-07 19:00 PST, alan
no flags
alan
Comment 1 2015-12-07 18:55:56 PST
Created attachment 266840 [details] Patch Simplified version: void TextPainter::paintTextWithShadows(const ShadowData* shadow, const FontCascade& font, const TextRun& textRun, const AtomicString& emphasisMark, int emphasisMarkOffset, int startOffset, int endOffset, const FloatPoint& textOrigin, bool stroked) { if (!shadow) { drawTextOrEmphasisMarks(font, textRun, emphasisMark, emphasisMarkOffset, textOrigin, startOffset, endOffset); return; } Color fillColor = m_context.fillColor(); bool opaque = !fillColor.hasAlpha(); bool lastShadowIterationShouldDrawText = !stroked && opaque; if (!opaque) m_context.setFillColor(Color::black); while (shadow) { ShadowApplier shadowApplier(m_context, shadow, m_boxRect, lastShadowIterationShouldDrawText, opaque, m_textBoxIsHorizontal ? Horizontal : Vertical); if (!shadowApplier.nothingToDraw()) drawTextOrEmphasisMarks(font, textRun, emphasisMark, emphasisMarkOffset, textOrigin + shadowApplier.extraOffset(), startOffset, endOffset); shadow = shadow->next(); } if (!lastShadowIterationShouldDrawText) { if (!opaque) m_context.setFillColor(fillColor); drawTextOrEmphasisMarks(font, textRun, emphasisMark, emphasisMarkOffset, textOrigin, startOffset, endOffset); } }
WebKit Commit Bot
Comment 2 2015-12-07 18:57:30 PST
Attachment 266840 [details] did not pass style-queue: ERROR: Source/WebCore/rendering/TextPainter.cpp:110: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/WebCore/rendering/TextPainter.cpp:197: Extra space after ( in function call [whitespace/parens] [4] Total errors found: 2 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
alan
Comment 3 2015-12-07 19:00:36 PST
WebKit Commit Bot
Comment 4 2015-12-07 20:34:46 PST
Comment on attachment 266841 [details] Patch Clearing flags on attachment: 266841 Committed r193688: <http://trac.webkit.org/changeset/193688>
WebKit Commit Bot
Comment 5 2015-12-07 20:34:50 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.