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 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 if (!element->hasTagName(inputTag)) { | 1073 if (!element->hasTagName(inputTag)) { |
1074 es.throwUninformativeAndGenericDOMException(InvalidNodeTypeError); | 1074 es.throwUninformativeAndGenericDOMException(InvalidNodeTypeError); |
1075 return; | 1075 return; |
1076 } | 1076 } |
1077 | 1077 |
1078 toHTMLInputElement(element)->setEditingValue(value); | 1078 toHTMLInputElement(element)->setEditingValue(value); |
1079 } | 1079 } |
1080 | 1080 |
1081 void Internals::setAutofilled(Element* element, bool enabled, ExceptionState& es
) | 1081 void Internals::setAutofilled(Element* element, bool enabled, ExceptionState& es
) |
1082 { | 1082 { |
1083 if (!element->hasTagName(inputTag)) { | 1083 if (!element->isFormControlElement()) { |
1084 es.throwUninformativeAndGenericDOMException(InvalidAccessError); | 1084 es.throwUninformativeAndGenericDOMException(InvalidAccessError); |
1085 return; | 1085 return; |
1086 } | 1086 } |
1087 toHTMLInputElement(element)->setAutofilled(enabled); | 1087 toHTMLFormControlElement(element)->setAutofilled(enabled); |
1088 } | 1088 } |
1089 | 1089 |
1090 void Internals::scrollElementToRect(Element* element, long x, long y, long w, lo
ng h, ExceptionState& es) | 1090 void Internals::scrollElementToRect(Element* element, long x, long y, long w, lo
ng h, ExceptionState& es) |
1091 { | 1091 { |
1092 if (!element || !element->document().view()) { | 1092 if (!element || !element->document().view()) { |
1093 es.throwUninformativeAndGenericDOMException(InvalidAccessError); | 1093 es.throwUninformativeAndGenericDOMException(InvalidAccessError); |
1094 return; | 1094 return; |
1095 } | 1095 } |
1096 FrameView* frameView = element->document().view(); | 1096 FrameView* frameView = element->document().view(); |
1097 frameView->scrollElementToRect(element, IntRect(x, y, w, h)); | 1097 frameView->scrollElementToRect(element, IntRect(x, y, w, h)); |
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2280 return false; | 2280 return false; |
2281 sharedContext->extensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CONTEX
T_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); | 2281 sharedContext->extensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CONTEX
T_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); |
2282 // To prevent tests that call loseSharedGraphicsContext3D from being | 2282 // To prevent tests that call loseSharedGraphicsContext3D from being |
2283 // flaky, we call finish so that the context is guaranteed to be lost | 2283 // flaky, we call finish so that the context is guaranteed to be lost |
2284 // synchronously (i.e. before returning). | 2284 // synchronously (i.e. before returning). |
2285 sharedContext->finish(); | 2285 sharedContext->finish(); |
2286 return true; | 2286 return true; |
2287 } | 2287 } |
2288 | 2288 |
2289 } | 2289 } |
OLD | NEW |