Changeset 176147 in webkit
- Timestamp:
- Nov 14, 2014 4:26:56 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r176146 r176147 1 2014-11-14 Zalan Bujtas <zalan@apple.com> 2 3 Remove computeTextPaintStyle's RenderText dependency. 4 https://bugs.webkit.org/show_bug.cgi?id=138754 5 6 Reviewed by Simon Fraser. 7 8 So that we can compute text paint style across renderers in simple line layout. 9 10 No change in functionality. 11 12 * rendering/InlineTextBox.cpp: 13 (WebCore::InlineTextBox::paint): 14 * rendering/SimpleLineLayoutFunctions.cpp: 15 (WebCore::SimpleLineLayout::paintFlow): 16 * rendering/TextPaintStyle.cpp: 17 (WebCore::computeTextPaintStyle): 18 * rendering/TextPaintStyle.h: 19 1 20 2014-11-14 Myles C. Maxfield <mmaxfield@apple.com> 2 21 -
trunk/Source/WebCore/rendering/InlineTextBox.cpp
r174876 r176147 531 531 532 532 // Determine the text colors and selection colors. 533 TextPaintStyle textPaintStyle = computeTextPaintStyle(renderer() , lineStyle, paintInfo);533 TextPaintStyle textPaintStyle = computeTextPaintStyle(renderer().frame(), lineStyle, paintInfo); 534 534 535 535 bool paintSelectedTextOnly; -
trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp
r174504 r176147 68 68 return; 69 69 70 RenderText& textRenderer = downcast<RenderText>(*flow.firstChild());71 ASSERT(!textRenderer.firstTextBox());72 73 70 bool debugBordersEnabled = flow.frame().settings().simpleLineLayoutDebugBordersEnabled(); 74 71 75 72 GraphicsContext& context = *paintInfo.context; 76 77 73 const Font& font = style.font(); 78 TextPaintStyle textPaintStyle = computeTextPaintStyle( textRenderer, style, paintInfo);74 TextPaintStyle textPaintStyle = computeTextPaintStyle(flow.frame(), style, paintInfo); 79 75 GraphicsContextStateSaver stateSaver(context, textPaintStyle.strokeWidth > 0); 80 76 -
trunk/Source/WebCore/rendering/TextPaintStyle.cpp
r174283 r176147 75 75 } 76 76 77 TextPaintStyle computeTextPaintStyle(const RenderText& renderer, const RenderStyle& lineStyle, const PaintInfo& paintInfo)77 TextPaintStyle computeTextPaintStyle(const Frame& frame, const RenderStyle& lineStyle, const PaintInfo& paintInfo) 78 78 { 79 79 TextPaintStyle paintStyle(lineStyle.colorSpace()); … … 92 92 93 93 if (lineStyle.insideDefaultButton()) { 94 Page* page = renderer.frame().page();94 Page* page = frame.page(); 95 95 if (page && page->focusController().isActive()) { 96 paintStyle.fillColor = renderer.theme().systemColor(CSSValueActivebuttontext);96 paintStyle.fillColor = page->theme().systemColor(CSSValueActivebuttontext); 97 97 return paintStyle; 98 98 } … … 102 102 103 103 bool forceBackgroundToWhite = false; 104 if ( renderer.document().printing()) {104 if (frame.document() && frame.document()->printing()) { 105 105 if (lineStyle.printColorAdjust() == PrintColorAdjustEconomy) 106 106 forceBackgroundToWhite = true; 107 if ( renderer.frame().settings().shouldPrintBackgrounds())107 if (frame.settings().shouldPrintBackgrounds()) 108 108 forceBackgroundToWhite = false; 109 109 } -
trunk/Source/WebCore/rendering/TextPaintStyle.h
r158803 r176147 32 32 namespace WebCore { 33 33 34 class Frame; 34 35 class GraphicsContext; 35 36 class RenderText; … … 52 53 }; 53 54 54 TextPaintStyle computeTextPaintStyle(const RenderText&, const RenderStyle&, const PaintInfo&);55 TextPaintStyle computeTextPaintStyle(const Frame&, const RenderStyle&, const PaintInfo&); 55 56 TextPaintStyle computeTextSelectionPaintStyle(const TextPaintStyle&, const RenderText&, const RenderStyle&, const PaintInfo&, bool& paintSelectedTextOnly, bool& paintSelectedTextSeparately, const ShadowData*& selectionShadow); 56 57
Note: See TracChangeset
for help on using the changeset viewer.