summaryrefslogtreecommitdiffstats
path: root/layout/base
diff options
context:
space:
mode:
Diffstat (limited to 'layout/base')
-rw-r--r--layout/base/nsCaret.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/layout/base/nsCaret.cpp b/layout/base/nsCaret.cpp
index 8ad435950..eca22f3ba 100644
--- a/layout/base/nsCaret.cpp
+++ b/layout/base/nsCaret.cpp
@@ -117,6 +117,12 @@ IsBidiUI()
return Preferences::GetBool("bidi.browser.ui");
}
+static bool
+CjkThickCaret()
+{
+ return Preferences::GetBool("layout.cjkthickcaret");
+}
+
nsCaret::nsCaret()
: mOverrideOffset(0)
, mBlinkCount(-1)
@@ -190,7 +196,7 @@ nsCaret::ComputeMetrics(nsIFrame* aFrame, int32_t aOffset, nscoord aCaretHeight)
nsPresContext::CSSPixelsToAppUnits(
LookAndFeel::GetInt(LookAndFeel::eIntID_CaretWidth, 1));
- if (DrawCJKCaret(aFrame, aOffset)) {
+ if (DrawCJKCaret(aFrame, aOffset) && CjkThickCaret()) {
caretWidth += nsPresContext::CSSPixelsToAppUnits(1);
}
nscoord bidiIndicatorSize = nsPresContext::CSSPixelsToAppUnits(kMinBidiIndicatorPixels);