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

Unified Diff: ui/gfx/render_text.h

Issue 10638015: RenderText: Only clip if necessary to workaround a Skia bug in the PDF path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | « no previous file | ui/gfx/render_text.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text.h
===================================================================
--- ui/gfx/render_text.h (revision 143691)
+++ ui/gfx/render_text.h (working copy)
@@ -168,6 +168,9 @@
bool focused() const { return focused_; }
void set_focused(bool focused) { focused_ = focused; }
+ bool clip_to_display_rect() const { return clip_to_display_rect_; }
+ void set_clip_to_display_rect(bool clip) { clip_to_display_rect_ = clip; }
+
const StyleRange& default_style() const { return default_style_; }
void set_default_style(const StyleRange& style) { default_style_ = style; }
@@ -480,6 +483,12 @@
// The local display area for rendering the text.
Rect display_rect_;
+ // Flag to work around a Skia bug with the PDF path (http://crbug.com/133548)
+ // that results in incorrect clipping when drawing to the document margins.
+ // This field allows disabling clipping to work around the issue.
+ // TODO(asvitkine): Remove this when the underlying Skia bug is fixed.
+ bool clip_to_display_rect_;
+
// The offset for the text to be drawn, relative to the display area.
// Get this point with GetUpdatedDisplayOffset (or risk using a stale value).
Point display_offset_;
« no previous file with comments | « no previous file | ui/gfx/render_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698