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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutListMarker.cpp

Issue 2023433002: Use 1em margin for list-style:inside items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix fast/events/onclick-list-marker.html test Created 4 years, 7 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/LayoutTests/fast/events/onclick-list-marker.html ('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/LayoutListMarker.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutListMarker.cpp b/third_party/WebKit/Source/core/layout/LayoutListMarker.cpp
index 095c8f9776966c273bc90c35b4b76ccb54b91fbd..dc47aca32637ddfd6022683e918d8f4df7ddab39 100644
--- a/third_party/WebKit/Source/core/layout/LayoutListMarker.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutListMarker.cpp
@@ -36,6 +36,11 @@ namespace blink {
const int cMarkerPaddingPx = 7;
+// TODO(glebl): Move to WebKit/Source/core/css/html.css after
+// Blink starts to support ::marker crbug.com/457718
+// Recommended UA margin for list markers.
+const int cUAMarkerMarginEm = 1;
+
LayoutListMarker::LayoutListMarker(LayoutListItem* item)
: LayoutBox(nullptr)
, m_listItem(item)
@@ -261,7 +266,7 @@ void LayoutListMarker::updateMargins()
switch (getListStyleCategory()) {
case ListStyleCategory::Symbol:
marginStart = LayoutUnit(-1);
- marginEnd = fontMetrics.ascent() - minPreferredLogicalWidth() + 1;
+ marginEnd = fontMetrics.ascent() - minPreferredLogicalWidth() + 1 + LayoutUnit(cUAMarkerMarginEm * style()->computedFontSize());
break;
default:
break;
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/onclick-list-marker.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698