Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1354)

Unified Diff: Source/core/rendering/InlineTextBox.h

Issue 203273003: Underline Thickness is not uniform (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Comment fix Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/InlineFlowBox.cpp ('k') | Source/core/rendering/InlineTextBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/InlineTextBox.h
diff --git a/Source/core/rendering/InlineTextBox.h b/Source/core/rendering/InlineTextBox.h
index 69b2a1d756b7b46c8c1a6644f7f9326de83774fd..372a4e99acb5b2c8a6d4aa0d5025438e982d1766 100644
--- a/Source/core/rendering/InlineTextBox.h
+++ b/Source/core/rendering/InlineTextBox.h
@@ -50,6 +50,7 @@ public:
, m_start(0)
, m_len(0)
, m_truncation(cNoTruncation)
+ , m_textDecorationThickness(0)
{
}
@@ -119,6 +120,8 @@ public:
protected:
virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom) OVERRIDE;
+ virtual void paintDecorationStyle(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom, float decorationThickness) OVERRIDE;
+ virtual void getPaintDecorationSyle(PaintInfo&, const LayoutPoint&, float *) OVERRIDE;
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom) OVERRIDE;
public:
@@ -175,6 +178,8 @@ private:
unsigned short m_truncation; // Where to truncate when text overflow is applied. We use special constants to
// denote no truncation (the whole run paints) and full truncation (nothing paints at all).
+ float m_textDecorationThickness;
+
protected:
void paintCompositionBackground(GraphicsContext*, const FloatPoint& boxOrigin, RenderStyle*, const Font&, int startPos, int endPos);
void paintDocumentMarkers(GraphicsContext*, const FloatPoint& boxOrigin, RenderStyle*, const Font&, bool background);
@@ -185,14 +190,18 @@ protected:
virtual void paintTextMatchMarker(GraphicsContext*, const FloatPoint& boxOrigin, DocumentMarker*, RenderStyle*, const Font&);
private:
- void paintDecoration(GraphicsContext*, const FloatPoint& boxOrigin, TextDecoration, const ShadowList*);
+ void paintDecoration(GraphicsContext*, const FloatPoint& boxOrigin, TextDecoration, const ShadowList*, float decorationThickness = 0);
void paintSelection(GraphicsContext*, const FloatPoint& boxOrigin, RenderStyle*, const Font&, Color textColor);
+ bool isLogicalStartEndCorrect(PaintInfo& , const LayoutPoint&);
TextRun::ExpansionBehavior expansionBehavior() const
{
return (canHaveLeadingExpansion() ? TextRun::AllowLeadingExpansion : TextRun::ForbidLeadingExpansion)
| (expansion() && nextLeafChild() ? TextRun::AllowTrailingExpansion : TextRun::ForbidTrailingExpansion);
}
+
+ float getDecorationThickness() { return m_textDecorationThickness; }
+ void setDecorationThickness(float textDecorationThickness) { m_textDecorationThickness = textDecorationThickness; }
};
DEFINE_INLINE_BOX_TYPE_CASTS(InlineTextBox);
« no previous file with comments | « Source/core/rendering/InlineFlowBox.cpp ('k') | Source/core/rendering/InlineTextBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698