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

Side by Side Diff: LayoutTests/scrollbars/rtl/div-horizontal-with-vertical-scrollbar.html

Issue 25373006: Correction to layoutOverflowRect in case of direction:rtl (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Bug 85856</title>
5 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
6 </head> 5 </head>
7 <body dir="ltr"> 6 <body dir="ltr">
8 <div dir="ltr" id="outer-ltr" style="width: 200px; height: 200px; overflow: scro ll;"> 7 <div dir="ltr" id="outer-ltr" style="width: 200px; height: 200px; overflow: auto ;">
9 <div id="inner-ltr" style="text-align: left; width: 300px; height: 300px;">ABC</ div> 8 <div id="inner-ltr" style="text-align: left; width: 195px; height: 300px;">ABC</ div>
10 </div> 9 </div>
11 <div dir="rtl" id="outer-rtl" style="width: 200px; height: 200px; overflow: scro ll;"> 10 <div dir="rtl" id="outer-rtl" style="width: 200px; height: 200px; overflow: auto ;">
12 <div id="inner-rtl" style="text-align: left; width: 300px; height: 300px;">ABC</ div> 11 <div id="inner-rtl" style="text-align: left; width: 195px; height: 300px;">ABC</ div>
13 </div> 12 </div>
14 <script type="text/javascript"> 13 <script type="text/javascript">
15 description('Test if WebKit can show the left side of the inner elements regardl ess of the position of its scrollbars. To test manually, open this document and verify we can see "ABC" both in the LTR element and in the RTL element.'); 14 description('Test that horizontal scrollbar should appear as the content width e ncroaches upon the vertical scrollbar and also test if WebKit can show the left side of the inner elements regardless of the position of its scrollbars. To test manually, open this document and verify we can see "ABC" both in the LTR elemen t and in the RTL element.');
16 15
17 var outerLTR = document.getElementById('outer-ltr'); 16 var outerLTR = document.getElementById('outer-ltr');
18 var innerLTR = document.getElementById('inner-ltr'); 17 var innerLTR = document.getElementById('inner-ltr');
19 var outerRTL = document.getElementById('outer-rtl'); 18 var outerRTL = document.getElementById('outer-rtl');
20 var innerRTL = document.getElementById('inner-rtl'); 19 var innerRTL = document.getElementById('inner-rtl');
21 outerLTR.scrollLeft = 0; 20 outerLTR.scrollLeft = 0;
22 outerRTL.scrollLeft = 0; 21 outerRTL.scrollLeft = 0;
23 22
24 debug('Verify the widths of the outer RTL elements are the same as the widths of the outer LTR elements.'); 23 debug('Verify the widths of the outer RTL elements are the same as the widths of the outer LTR elements.');
25 shouldBeTrue('outerLTR.offsetWidth == outerRTL.offsetWidth'); 24 shouldBeTrue('outerLTR.offsetWidth == outerRTL.offsetWidth');
26 shouldBeTrue('outerLTR.clientWidth == outerRTL.clientWidth'); 25 shouldBeTrue('outerLTR.clientWidth == outerRTL.clientWidth');
27 shouldBeTrue('outerLTR.scrollWidth == outerRTL.scrollWidth'); 26 shouldBeTrue('outerLTR.scrollWidth == outerRTL.scrollWidth');
28 27
29 debug('Verify the widths of the inner RTL elements are the same as the widths of the inner LTR elements.'); 28 debug('Verify the widths of the inner RTL elements are the same as the widths of the inner LTR elements.');
30 shouldBeTrue('innerLTR.offsetWidth == innerRTL.offsetWidth'); 29 shouldBeTrue('innerLTR.offsetWidth == innerRTL.offsetWidth');
31 shouldBeTrue('innerLTR.clientWidth == innerRTL.clientWidth'); 30 shouldBeTrue('innerLTR.clientWidth == innerRTL.clientWidth');
32 shouldBeTrue('innerLTR.scrollWidth == innerRTL.scrollWidth'); 31 shouldBeTrue('innerLTR.scrollWidth == innerRTL.scrollWidth');
33 32
34 debug('Verify the width of the vertical scrollbar of the outer RTL element is th e same as the one of the outer LTR element regardless of their scrollbar positio ns.'); 33 debug('Verify the width of the vertical scrollbar of the outer RTL element is th e same as the one of the outer LTR element regardless of their scrollbar positio ns.');
35 var scrollbarWidthLTR = outerLTR.offsetWidth - outerLTR.clientWidth; 34 var scrollbarWidthLTR = outerLTR.offsetWidth - outerLTR.clientWidth;
36 var scrollbarWidthRTL = outerRTL.offsetWidth - outerRTL.clientWidth; 35 var scrollbarWidthRTL = outerRTL.offsetWidth - outerRTL.clientWidth;
37 shouldBeTrue('scrollbarWidthLTR == scrollbarWidthRTL'); 36 shouldBeTrue('scrollbarWidthLTR == scrollbarWidthRTL');
38 </script> 37 </script>
39 </body> 38 </body>
40 </html> 39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698