OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 if (scrollbarRect.size() == graphicsLayer->size()) | 909 if (scrollbarRect.size() == graphicsLayer->size()) |
910 return; | 910 return; |
911 | 911 |
912 graphicsLayer->setSize(scrollbarRect.size()); | 912 graphicsLayer->setSize(scrollbarRect.size()); |
913 | 913 |
914 if (graphicsLayer->hasContentsLayer()) { | 914 if (graphicsLayer->hasContentsLayer()) { |
915 graphicsLayer->setContentsRect(IntRect(0, 0, scrollbarRect.width(), scro
llbarRect.height())); | 915 graphicsLayer->setContentsRect(IntRect(0, 0, scrollbarRect.width(), scro
llbarRect.height())); |
916 return; | 916 return; |
917 } | 917 } |
918 | 918 |
| 919 #if OS(ANDROID) |
| 920 graphicsLayer->setDrawsContent(false); |
| 921 #else |
919 graphicsLayer->setDrawsContent(true); | 922 graphicsLayer->setDrawsContent(true); |
| 923 #endif |
920 graphicsLayer->setNeedsDisplay(); | 924 graphicsLayer->setNeedsDisplay(); |
921 } | 925 } |
922 | 926 |
923 static void positionScrollCornerLayer(GraphicsLayer* graphicsLayer, const IntRec
t& cornerRect) | 927 static void positionScrollCornerLayer(GraphicsLayer* graphicsLayer, const IntRec
t& cornerRect) |
924 { | 928 { |
925 if (!graphicsLayer) | 929 if (!graphicsLayer) |
926 return; | 930 return; |
927 graphicsLayer->setDrawsContent(!cornerRect.isEmpty()); | 931 graphicsLayer->setDrawsContent(!cornerRect.isEmpty()); |
928 graphicsLayer->setPosition(cornerRect.location()); | 932 graphicsLayer->setPosition(cornerRect.location()); |
929 if (cornerRect.size() != graphicsLayer->size()) | 933 if (cornerRect.size() != graphicsLayer->size()) |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1431 } | 1435 } |
1432 | 1436 |
1433 bool ScrollView::platformIsOffscreen() const | 1437 bool ScrollView::platformIsOffscreen() const |
1434 { | 1438 { |
1435 return false; | 1439 return false; |
1436 } | 1440 } |
1437 | 1441 |
1438 #endif | 1442 #endif |
1439 | 1443 |
1440 } | 1444 } |
OLD | NEW |