| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 2161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2172 if (!node || !isHTMLSelectElement(*node)) | 2172 if (!node || !isHTMLSelectElement(*node)) |
| 2173 return false; | 2173 return false; |
| 2174 | 2174 |
| 2175 HTMLSelectElement& select = toHTMLSelectElement(*node); | 2175 HTMLSelectElement& select = toHTMLSelectElement(*node); |
| 2176 if (itemIndex < 0 || static_cast<size_t>(itemIndex) >= select.listItems().si
ze()) | 2176 if (itemIndex < 0 || static_cast<size_t>(itemIndex) >= select.listItems().si
ze()) |
| 2177 return false; | 2177 return false; |
| 2178 const ComputedStyle* itemStyle = select.itemComputedStyle(*select.listItems(
)[itemIndex]); | 2178 const ComputedStyle* itemStyle = select.itemComputedStyle(*select.listItems(
)[itemIndex]); |
| 2179 return itemStyle ? itemStyle->font().fontMetrics().height() : 0; | 2179 return itemStyle ? itemStyle->font().fontMetrics().height() : 0; |
| 2180 } | 2180 } |
| 2181 | 2181 |
| 2182 void Internals::resetTypeAheadSession(HTMLSelectElement* select) |
| 2183 { |
| 2184 ASSERT(select); |
| 2185 select->resetTypeAheadSessionForTesting(); |
| 2186 } |
| 2187 |
| 2182 bool Internals::loseSharedGraphicsContext3D() | 2188 bool Internals::loseSharedGraphicsContext3D() |
| 2183 { | 2189 { |
| 2184 OwnPtr<WebGraphicsContext3DProvider> sharedProvider = adoptPtr(Platform::cur
rent()->createSharedOffscreenGraphicsContext3DProvider()); | 2190 OwnPtr<WebGraphicsContext3DProvider> sharedProvider = adoptPtr(Platform::cur
rent()->createSharedOffscreenGraphicsContext3DProvider()); |
| 2185 if (!sharedProvider) | 2191 if (!sharedProvider) |
| 2186 return false; | 2192 return false; |
| 2187 WebGraphicsContext3D* sharedContext = sharedProvider->context3d(); | 2193 WebGraphicsContext3D* sharedContext = sharedProvider->context3d(); |
| 2188 sharedContext->loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_EXT, GL_INNOCENT_
CONTEXT_RESET_EXT); | 2194 sharedContext->loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_EXT, GL_INNOCENT_
CONTEXT_RESET_EXT); |
| 2189 // To prevent tests that call loseSharedGraphicsContext3D from being | 2195 // To prevent tests that call loseSharedGraphicsContext3D from being |
| 2190 // flaky, we call finish so that the context is guaranteed to be lost | 2196 // flaky, we call finish so that the context is guaranteed to be lost |
| 2191 // synchronously (i.e. before returning). | 2197 // synchronously (i.e. before returning). |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2479 | 2485 |
| 2480 return animator->setScrollbarsVisibleForTesting(visible); | 2486 return animator->setScrollbarsVisibleForTesting(visible); |
| 2481 } | 2487 } |
| 2482 | 2488 |
| 2483 void Internals::forceRestrictIFramePermissions() | 2489 void Internals::forceRestrictIFramePermissions() |
| 2484 { | 2490 { |
| 2485 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true); | 2491 RuntimeEnabledFeatures::setRestrictIFramePermissionsEnabled(true); |
| 2486 } | 2492 } |
| 2487 | 2493 |
| 2488 } // namespace blink | 2494 } // namespace blink |
| OLD | NEW |