| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 5248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5259 | 5259 |
| 5260 virtual void requestCheckingOfText( | 5260 virtual void requestCheckingOfText( |
| 5261 const WebString&, | 5261 const WebString&, |
| 5262 const WebVector<uint32_t>&, | 5262 const WebVector<uint32_t>&, |
| 5263 const WebVector<unsigned>&, | 5263 const WebVector<unsigned>&, |
| 5264 WebTextCheckingCompletion* completion) override | 5264 WebTextCheckingCompletion* completion) override |
| 5265 { | 5265 { |
| 5266 m_completion = completion; | 5266 m_completion = completion; |
| 5267 } | 5267 } |
| 5268 | 5268 |
| 5269 void cancelAllPendingRequests() override |
| 5270 { |
| 5271 if (!m_completion) |
| 5272 return; |
| 5273 m_completion->didCancelCheckingText(); |
| 5274 m_completion = nullptr; |
| 5275 } |
| 5276 |
| 5269 void kickNoResults() | 5277 void kickNoResults() |
| 5270 { | 5278 { |
| 5271 kick(-1, -1, WebTextDecorationTypeSpelling); | 5279 kick(-1, -1, WebTextDecorationTypeSpelling); |
| 5272 } | 5280 } |
| 5273 | 5281 |
| 5274 void kick() | 5282 void kick() |
| 5275 { | 5283 { |
| 5276 kick(1, 8, WebTextDecorationTypeSpelling); | 5284 kick(1, 8, WebTextDecorationTypeSpelling); |
| 5277 } | 5285 } |
| 5278 | 5286 |
| (...skipping 3546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8825 request.setRequestorOrigin(WebSecurityOrigin::createUnique()); | 8833 request.setRequestorOrigin(WebSecurityOrigin::createUnique()); |
| 8826 helper.webView()->mainFrameImpl()->loadRequest(request); | 8834 helper.webView()->mainFrameImpl()->loadRequest(request); |
| 8827 | 8835 |
| 8828 // Normally, the result of the JS url replaces the existing contents on the | 8836 // Normally, the result of the JS url replaces the existing contents on the |
| 8829 // Document. However, if the JS triggers a navigation, the contents should | 8837 // Document. However, if the JS triggers a navigation, the contents should |
| 8830 // not be replaced. | 8838 // not be replaced. |
| 8831 EXPECT_EQ("", toLocalFrame(helper.webView()->page()->mainFrame())->document(
)->documentElement()->innerText()); | 8839 EXPECT_EQ("", toLocalFrame(helper.webView()->page()->mainFrame())->document(
)->documentElement()->innerText()); |
| 8832 } | 8840 } |
| 8833 | 8841 |
| 8834 } // namespace blink | 8842 } // namespace blink |
| OLD | NEW |