diff options
Diffstat (limited to 'WebCore/bindings/generic/GenericBinding.h')
-rw-r--r-- | WebCore/bindings/generic/GenericBinding.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/WebCore/bindings/generic/GenericBinding.h b/WebCore/bindings/generic/GenericBinding.h index d030b45..8bf1343 100644 --- a/WebCore/bindings/generic/GenericBinding.h +++ b/WebCore/bindings/generic/GenericBinding.h @@ -31,6 +31,9 @@ #ifndef GenericBinding_h #define GenericBinding_h +#include "Frame.h" +#include "FrameLoader.h" + namespace WebCore { // Used to instantiate binding templates for any methods shared among all @@ -47,6 +50,17 @@ class State<GenericBinding> { // Any methods shared across bindings can go here. }; +template <class Binding> +KURL completeURL(State<Binding>* state, const String& relativeURL) +{ + // For historical reasons, we need to complete the URL using the + // dynamic frame. + Frame* frame = state->getFirstFrame(); + if (!frame) + return KURL(); + return frame->loader()->completeURL(relativeURL); +} + } #endif // GenericBinding_h |