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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp

Issue 2683233005: Set caret width based on device scale factor (Closed)
Patch Set: Sync with ToT again Created 3 years, 10 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 | « third_party/WebKit/Source/core/layout/LayoutText.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
index f7f24a49b51b6e1e814aa8b6655e533cc4bbfb95..400657520327f84a0842944d872b1ac077ec44af 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
@@ -28,6 +28,7 @@
#include "core/dom/StyleEngine.h"
#include "core/editing/TextAffinity.h"
#include "core/editing/VisiblePosition.h"
+#include "core/frame/FrameView.h"
#include "core/layout/svg/LayoutSVGText.h"
#include "core/layout/svg/SVGLayoutSupport.h"
#include "core/layout/svg/line/SVGInlineTextBox.h"
@@ -111,12 +112,12 @@ LayoutRect LayoutSVGInlineText::localCaretRect(InlineBox* box,
if (static_cast<unsigned>(caretOffset) < textBox->start() + textBox->len()) {
LayoutRect rect = textBox->localSelectionRect(caretOffset, caretOffset + 1);
LayoutUnit x = box->isLeftToRightDirection() ? rect.x() : rect.maxX();
- return LayoutRect(x, rect.y(), caretWidth(), rect.height());
+ return LayoutRect(x, rect.y(), frameView()->caretWidth(), rect.height());
}
LayoutRect rect = textBox->localSelectionRect(caretOffset - 1, caretOffset);
LayoutUnit x = box->isLeftToRightDirection() ? rect.maxX() : rect.x();
- return LayoutRect(x, rect.y(), caretWidth(), rect.height());
+ return LayoutRect(x, rect.y(), frameView()->caretWidth(), rect.height());
}
FloatRect LayoutSVGInlineText::floatLinesBoundingBox() const {
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutText.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698