p***@samsung.com
2018-09-11 10:07:09 UTC
Hi All,
HbbTV 2.0.1 has a requirement that dvb://xxx.xxx.xxx.xxx/ URLs have an
origin (and only an origin) of hbbtv-carousel://xxx.x/, while the rest of
the URL and components stay the same.
I can generate the correct origin in the hbbtv plugin. But the only way I
can see to get this into the frame is by passing the data via the Embedders
Data in the isolate (I know I can do the same thing in the context).
I have the following change that works:
in WebKit/Source/core/frame/*Location.cpp:*
String Location::origin() const {
#if defined(OS_TIZEN_TV_PRODUCT)
v8::Isolate* isolate = v8::Isolate::GetCurrent();
String set_origin;
bool have_origin = false;
uint32_t number = isolate->GetNumberOfDataSlots();
for (uint32_t index=0; index < number; index++)
{
set_origin = (const char*) isolate->GetData(index);
if (set_origin != NULL)
{
if (set_origin.StartsWith(url::kHbbTVCarouselScheme
<:kHbbTVCarouselScheme>))
{
have_origin = true;
break;
}
}
}
if (have_origin)
return set_origin;
else
return DOMURLUtilsReadOnly::origin(Url());
#else
return DOMURLUtilsReadOnly::origin(Url());
#endif
}
Is there a better way of doing this? Is there any problems I have missed?
Thanks for any help,
Peter.
PS: The code is from the chromium-efl fork, but the change is required in
the core part of chromium.
HbbTV 2.0.1 has a requirement that dvb://xxx.xxx.xxx.xxx/ URLs have an
origin (and only an origin) of hbbtv-carousel://xxx.x/, while the rest of
the URL and components stay the same.
I can generate the correct origin in the hbbtv plugin. But the only way I
can see to get this into the frame is by passing the data via the Embedders
Data in the isolate (I know I can do the same thing in the context).
I have the following change that works:
in WebKit/Source/core/frame/*Location.cpp:*
String Location::origin() const {
#if defined(OS_TIZEN_TV_PRODUCT)
v8::Isolate* isolate = v8::Isolate::GetCurrent();
String set_origin;
bool have_origin = false;
uint32_t number = isolate->GetNumberOfDataSlots();
for (uint32_t index=0; index < number; index++)
{
set_origin = (const char*) isolate->GetData(index);
if (set_origin != NULL)
{
if (set_origin.StartsWith(url::kHbbTVCarouselScheme
<:kHbbTVCarouselScheme>))
{
have_origin = true;
break;
}
}
}
if (have_origin)
return set_origin;
else
return DOMURLUtilsReadOnly::origin(Url());
#else
return DOMURLUtilsReadOnly::origin(Url());
#endif
}
Is there a better way of doing this? Is there any problems I have missed?
Thanks for any help,
Peter.
PS: The code is from the chromium-efl fork, but the change is required in
the core part of chromium.
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss
---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss
---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.