OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved. |
3 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2009. 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1601 COMPtr<IDOMElement> formElement(AdoptCOM, DOMElement::createInstance(formSta
te->form())); | 1601 COMPtr<IDOMElement> formElement(AdoptCOM, DOMElement::createInstance(formSta
te->form())); |
1602 | 1602 |
1603 HashMap<String, String> formValuesMap; | 1603 HashMap<String, String> formValuesMap; |
1604 const StringPairVector& textFieldValues = formState->textFieldValues(); | 1604 const StringPairVector& textFieldValues = formState->textFieldValues(); |
1605 size_t size = textFieldValues.size(); | 1605 size_t size = textFieldValues.size(); |
1606 for (size_t i = 0; i < size; ++i) | 1606 for (size_t i = 0; i < size; ++i) |
1607 formValuesMap.add(textFieldValues[i].first, textFieldValues[i].second); | 1607 formValuesMap.add(textFieldValues[i].first, textFieldValues[i].second); |
1608 | 1608 |
1609 COMPtr<IPropertyBag> formValuesPropertyBag(AdoptCOM, COMPropertyBag<String>:
:createInstance(formValuesMap)); | 1609 COMPtr<IPropertyBag> formValuesPropertyBag(AdoptCOM, COMPropertyBag<String>:
:createInstance(formValuesMap)); |
1610 | 1610 |
1611 COMPtr<WebFrame> sourceFrame(kit(formState->sourceFrame())); | 1611 COMPtr<WebFrame> sourceFrame(kit(formState->sourceDocument()->frame())); |
1612 if (SUCCEEDED(formDelegate->willSubmitForm(this, sourceFrame.get(), formElem
ent.get(), formValuesPropertyBag.get(), setUpPolicyListener(function).get()))) | 1612 if (SUCCEEDED(formDelegate->willSubmitForm(this, sourceFrame.get(), formElem
ent.get(), formValuesPropertyBag.get(), setUpPolicyListener(function).get()))) |
1613 return; | 1613 return; |
1614 | 1614 |
1615 // FIXME: Add a sane default implementation | 1615 // FIXME: Add a sane default implementation |
1616 (coreFrame->loader()->policyChecker()->*function)(PolicyUse); | 1616 (coreFrame->loader()->policyChecker()->*function)(PolicyUse); |
1617 } | 1617 } |
1618 | 1618 |
1619 void WebFrame::revertToProvisionalState(DocumentLoader*) | 1619 void WebFrame::revertToProvisionalState(DocumentLoader*) |
1620 { | 1620 { |
1621 notImplemented(); | 1621 notImplemented(); |
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2671 if (!coreFrame || !coreFrame->view()) | 2671 if (!coreFrame || !coreFrame->view()) |
2672 return; | 2672 return; |
2673 | 2673 |
2674 coreFrame->view()->updateBackgroundRecursively(backgroundColor, webView()->t
ransparent()); | 2674 coreFrame->view()->updateBackgroundRecursively(backgroundColor, webView()->t
ransparent()); |
2675 } | 2675 } |
2676 | 2676 |
2677 PassRefPtr<FrameNetworkingContext> WebFrame::createNetworkingContext() | 2677 PassRefPtr<FrameNetworkingContext> WebFrame::createNetworkingContext() |
2678 { | 2678 { |
2679 return WebFrameNetworkingContext::create(core(this), userAgent(url())); | 2679 return WebFrameNetworkingContext::create(core(this), userAgent(url())); |
2680 } | 2680 } |
OLD | NEW |