Bug 1210341 - (v3) Reduce accessiblecaret size. r=TYLin

This commit is contained in:
Jeremy Chen 2015-10-19 01:53:00 +02:00
parent 927d906586
commit a97fbcf54e
18 changed files with 62 additions and 20 deletions

View File

@ -800,6 +800,18 @@
@RESPATH@/res/table-remove-row-active.gif
@RESPATH@/res/table-remove-row-hover.gif
@RESPATH@/res/table-remove-row.gif
@RESPATH@/res/accessiblecaret.png
@RESPATH@/res/accessiblecaret@1.5x.png
@RESPATH@/res/accessiblecaret@2.25x.png
@RESPATH@/res/accessiblecaret@2x.png
@RESPATH@/res/accessiblecaret_tilt_left.png
@RESPATH@/res/accessiblecaret_tilt_left@1.5x.png
@RESPATH@/res/accessiblecaret_tilt_left@2.25x.png
@RESPATH@/res/accessiblecaret_tilt_left@2x.png
@RESPATH@/res/accessiblecaret_tilt_right.png
@RESPATH@/res/accessiblecaret_tilt_right@1.5x.png
@RESPATH@/res/accessiblecaret_tilt_right@2.25x.png
@RESPATH@/res/accessiblecaret_tilt_right@2x.png
@RESPATH@/res/text_caret.png
@RESPATH@/res/text_caret@1.5x.png
@RESPATH@/res/text_caret@2.25x.png

View File

@ -749,6 +749,18 @@
@RESPATH@/res/table-remove-row-active.gif
@RESPATH@/res/table-remove-row-hover.gif
@RESPATH@/res/table-remove-row.gif
@RESPATH@/res/accessiblecaret.png
@RESPATH@/res/accessiblecaret@1.5x.png
@RESPATH@/res/accessiblecaret@2.25x.png
@RESPATH@/res/accessiblecaret@2x.png
@RESPATH@/res/accessiblecaret_tilt_left.png
@RESPATH@/res/accessiblecaret_tilt_left@1.5x.png
@RESPATH@/res/accessiblecaret_tilt_left@2.25x.png
@RESPATH@/res/accessiblecaret_tilt_left@2x.png
@RESPATH@/res/accessiblecaret_tilt_right.png
@RESPATH@/res/accessiblecaret_tilt_right@1.5x.png
@RESPATH@/res/accessiblecaret_tilt_right@2.25x.png
@RESPATH@/res/accessiblecaret_tilt_right@2x.png
@RESPATH@/res/text_caret.png
@RESPATH@/res/text_caret@1.5x.png
@RESPATH@/res/text_caret@2.25x.png

View File

@ -27,6 +27,18 @@ UNIFIED_SOURCES += [
FINAL_LIBRARY = 'xul'
RESOURCE_FILES += [
'res/accessiblecaret.png',
'res/accessiblecaret@1.5x.png',
'res/accessiblecaret@2.25x.png',
'res/accessiblecaret@2x.png',
'res/accessiblecaret_tilt_left.png',
'res/accessiblecaret_tilt_left@1.5x.png',
'res/accessiblecaret_tilt_left@2.25x.png',
'res/accessiblecaret_tilt_left@2x.png',
'res/accessiblecaret_tilt_right.png',
'res/accessiblecaret_tilt_right@1.5x.png',
'res/accessiblecaret_tilt_right@2.25x.png',
'res/accessiblecaret_tilt_right@2x.png',
'res/EditorOverride.css',
'res/grabber.gif',
'res/table-add-column-after-active.gif',

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -299,11 +299,17 @@ class CommonCaretsTestCase(object):
# draggable.
(caret3_x, caret3_y), (caret4_x, caret4_y) = sel.selection_carets_location()
# The following values are from ua.css.
caret_width = 44
caret_margin_left = -23
tilt_right_margin_left = 18
tilt_left_margin_left = -17
# The following values are from ua.css and all.js
if self.carets_tested_pref == 'selectioncaret.enabled':
caret_width = 44
caret_margin_left = -23
tilt_right_margin_left = 18
tilt_left_margin_left = -17
elif self.carets_tested_pref == 'layout.accessiblecaret.enabled':
caret_width = float(self.marionette.get_pref('layout.accessiblecaret.width'))
caret_margin_left = float(self.marionette.get_pref('layout.accessiblecaret.margin-left'))
tilt_right_margin_left = 0.41 * caret_width;
tilt_left_margin_left = -0.39 * caret_width;
left_caret_left_edge_x = caret3_x + caret_margin_left + tilt_left_margin_left
el.tap(left_caret_left_edge_x + 2, caret3_y)

View File

@ -343,16 +343,16 @@ div:-moz-native-anonymous.moz-accessiblecaret.no-bar > div.bar {
}
div:-moz-native-anonymous.moz-accessiblecaret.normal > div.image {
background-image: url("resource://gre/res/text_caret.png");
background-image: url("resource://gre/res/accessiblecaret.png");
}
div:-moz-native-anonymous.moz-accessiblecaret.left > div.image {
background-image: url("resource://gre/res/text_caret_tilt_left.png");
background-image: url("resource://gre/res/accessiblecaret_tilt_left.png");
margin-left: -39%;
}
div:-moz-native-anonymous.moz-accessiblecaret.right > div.image {
background-image: url("resource://gre/res/text_caret_tilt_right.png");
background-image: url("resource://gre/res/accessiblecaret_tilt_right.png");
margin-left: 41%;
}
@ -362,43 +362,43 @@ div:-moz-native-anonymous.moz-accessiblecaret.none {
@media (min-resolution: 1.5dppx) {
div:-moz-native-anonymous.moz-accessiblecaret.normal > div.image {
background-image: url("resource://gre/res/text_caret@1.5x.png");
background-image: url("resource://gre/res/accessiblecaret@1.5x.png");
}
div:-moz-native-anonymous.moz-accessiblecaret.left > div.image {
background-image: url("resource://gre/res/text_caret_tilt_left@1.5x.png");
background-image: url("resource://gre/res/accessiblecaret_tilt_left@1.5x.png");
}
div:-moz-native-anonymous.moz-accessiblecaret.right > div.image {
background-image: url("resource://gre/res/text_caret_tilt_right@1.5x.png");
background-image: url("resource://gre/res/accessiblecaret_tilt_right@1.5x.png");
}
}
@media (min-resolution: 2dppx) {
div:-moz-native-anonymous.moz-accessiblecaret.normal > div.image {
background-image: url("resource://gre/res/text_caret@2x.png");
background-image: url("resource://gre/res/accessiblecaret@2x.png");
}
div:-moz-native-anonymous.moz-accessiblecaret.left > div.image {
background-image: url("resource://gre/res/text_caret_tilt_left@2x.png");
background-image: url("resource://gre/res/accessiblecaret_tilt_left@2x.png");
}
div:-moz-native-anonymous.moz-accessiblecaret.right > div.image {
background-image: url("resource://gre/res/text_caret_tilt_right@2x.png");
background-image: url("resource://gre/res/accessiblecaret_tilt_right@2x.png");
}
}
@media (min-resolution: 2.25dppx) {
div:-moz-native-anonymous.moz-accessiblecaret.normal > div.image {
background-image: url("resource://gre/res/text_caret@2.25x.png");
background-image: url("resource://gre/res/accessiblecaret@2.25x.png");
}
div:-moz-native-anonymous.moz-accessiblecaret.left > div.image {
background-image: url("resource://gre/res/text_caret_tilt_left@2.25x.png");
background-image: url("resource://gre/res/accessiblecaret_tilt_left@2.25x.png");
}
div:-moz-native-anonymous.moz-accessiblecaret.right > div.image {
background-image: url("resource://gre/res/text_caret_tilt_right@2.25x.png");
background-image: url("resource://gre/res/accessiblecaret_tilt_right@2.25x.png");
}
}

View File

@ -4864,9 +4864,9 @@ pref("caret.manages-android-actionbar", false);
pref("layout.accessiblecaret.enabled", false);
// CSS attributes of the AccessibleCaret in CSS pixels.
pref("layout.accessiblecaret.width", "44.0");
pref("layout.accessiblecaret.height", "47.0");
pref("layout.accessiblecaret.margin-left", "-23.5");
pref("layout.accessiblecaret.width", "34.0");
pref("layout.accessiblecaret.height", "36.0");
pref("layout.accessiblecaret.margin-left", "-18.5");
pref("layout.accessiblecaret.bar.width", "2.0");
// Timeout in milliseconds to hide the accessiblecaret under cursor mode while