This commit fixes some of the EWK_BRINGUPs added during M120 upversion.
Change-Id: I3e496b6fc9f11efb6332a1de20ebcf550a2440e9
Signed-off-by: Mayank Kumar <mayank.k@samsung.com>
Document* document = MainFrameImpl()->GetFrame()->GetDocument();
if (!document)
return false;
-#if !defined(EWK_BRINGUP) // FIXME: m120 bringup
+
StaticElementList* canvas_elements =
- document->QuerySelectorAll("canvas", ASSERT_NO_EXCEPTION);
+ document->QuerySelectorAll(AtomicString("canvas"), ASSERT_NO_EXCEPTION);
if (!canvas_elements)
return false;
return true;
}
}
-#endif
+
return false;
}
if (!owner_document)
return 0;
-#if !defined(EWK_BRINGUP) // FIXME: m120 bringup
- previous_element = ParentNode::lastElementChild(*owner_document);
+ previous_element = owner_document->lastElementChild();
while (previous_element && ElementTraversal::FirstWithin(*previous_element))
- previous_element = ParentNode::lastElementChild(*previous_element);
-#endif
+ previous_element = previous_element->lastElementChild();
if (!previous_element)
return 0;
html_element->hasAttribute(html_names::kHrefAttr)) ||
(node->HasTagName(html_names::kAreaTag) &&
html_element->hasAttribute(html_names::kHrefAttr)) ||
-#if !defined(EWK_BRINGUP) // FIXME: m120 bringup
(node->HasTagName(html_names::kSummaryTag) &&
- html_element->SupportsFocus()) ||
-#endif
+ html_element->IsFocusable()) ||
node->HasTagName(html_names::kButtonTag) ||
node->HasTagName(html_names::kInputTag) ||
node->HasTagName(html_names::kSelectTag) ||
}
void ClipboardEfl::WriteText(base::StringPiece text) {
-#if !defined(EWK_BRINGUP) // FIXME: m120 bringup
- ClipboardHelperEfl::GetInstance()->SetData(std::string(text_data, text_len),
- ClipboardDataTypeEfl::PLAIN_TEXT);
-#endif
+ ClipboardHelperEfl::GetInstance()->SetData(
+ std::string(text.data(), text.length()),
+ ClipboardDataTypeEfl::PLAIN_TEXT);
}
void ClipboardEfl::WriteHTML(base::StringPiece markup,
absl::optional<base::StringPiece> source_url) {
-#if !defined(EWK_BRINGUP) // FIXME: m120 bringup
ClipboardHelperEfl::GetInstance()->SetData(
- std::string(markup_data, markup_len), ClipboardDataTypeEfl::MARKUP);
-#endif
+ std::string(markup.data(), markup.length()),
+ ClipboardDataTypeEfl::MARKUP);
}
void ClipboardEfl::WriteUnsanitizedHTML(
base::StringPiece markup,
absl::optional<base::StringPiece> source_url) {
-#if !defined(EWK_BRINGUP) // FIXME: m120 bringup
- WriteHTML(markup_data, markup_len, url_data, url_len);
-#endif
+ WriteHTML(markup, source_url);
}
void ClipboardEfl::WriteSvg(base::StringPiece markup) {
const network::ResourceRequest& request,
const base::RepeatingCallback<content::WebContents*()>&
web_contents_getter) {
-#if !defined(EWK_BRINGUP) // FIXME: m120 bringup
if (IsMobileProfile() &&
- !blink::IsResourceTypeFrame(
- static_cast<blink::mojom::ResourceType>(request.resource_type))) {
+ !blink::IsRequestDestinationFrame(request.destination)) {
return nullptr;
}
-#endif
if (!request.url.SchemeIsHTTPOrHTTPS() && !request.url.SchemeIsFile())
return nullptr;
RenderFrameHost* render_frame_host,
const PermissionRequestDescription& request_description,
base::OnceCallback<void(const std::vector<PermissionStatus>&)> callback) {
-#if !defined(EWK_BRINGUP) // FIXME: m120 bringup
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (permissions.empty()) {
+ if (request_description.permissions.empty()) {
std::move(callback).Run(std::vector<PermissionStatus>());
return;
}
WebContents* web_contents =
WebContents::FromRenderFrameHost(render_frame_host);
- PendingRequest* pending_request =
- new PendingRequest(permissions, render_frame_host, std::move(callback));
+ PendingRequest* pending_request = new PendingRequest(
+ request_description.permissions, render_frame_host, std::move(callback));
int request_id = pending_requests_.Add(pending_request);
- for (auto i = 0; i < permissions.size(); ++i) {
- const auto& permission = permissions[i];
+ for (auto i = 0; i < request_description.permissions.size(); ++i) {
+ const auto& permission = request_description.permissions[i];
switch (permission) {
case PermissionType::GEOLOCATION: {
BrowserContextEfl* browser_context =
geolocation_permission_context.RequestPermission(
pending_request->render_process_id_,
- pending_request->render_frame_id_, requesting_origin,
+ pending_request->render_frame_id_,
+ request_description.requesting_origin,
base::BindOnce(
&PermissionControllerDelegateEfl::OnPermissionRequestResponse,
weak_ptr_factory_.GetWeakPtr(), request_id, i));
}
cbce->GetNotificationController()->RequestPermission(
- web_contents, requesting_origin,
+ web_contents, request_description.requesting_origin,
base::BindOnce(
&PermissionControllerDelegateEfl::OnPermissionRequestResponse,
weak_ptr_factory_.GetWeakPtr(), request_id, i));
}
}
}
-#endif
}
void PermissionControllerDelegateEfl::OnPermissionRequestResponse(
RenderFrameHost* render_frame_host,
const PermissionRequestDescription& request_description,
base::OnceCallback<void(const std::vector<PermissionStatus>&)> callback) {
-#if !defined(EWK_BRINGUP) // FIXME: m120 bringup
- const GURL& requesting_origin =
- permissions::PermissionUtil::GetLastCommittedOriginAsURL(
- render_frame_host);
-
- RequestPermissions(
- permissions, render_frame_host,
- requesting_origin, user_gesture, std::move(callback));
-#endif
+ RequestPermissions(render_frame_host, request_description,
+ std::move(callback));
}
PermissionStatus PermissionControllerDelegateEfl::GetPermissionStatus(
webkit_print_params->printer_dpi = dpi;
webkit_print_params->print_scaling_option = print_params.print_scaling_option;
+ webkit_print_params->printable_area_in_css_pixels.set_x(ConvertUnit(
+ print_params.printable_area.x(), dpi, print_params.desired_dpi));
+ webkit_print_params->printable_area_in_css_pixels.set_y(ConvertUnit(
+ print_params.printable_area.y(), dpi, print_params.desired_dpi));
webkit_print_params->printable_area_in_css_pixels.set_width(ConvertUnit(
print_params.content_size.width(), dpi, print_params.desired_dpi));
webkit_print_params->printable_area_in_css_pixels.set_height(ConvertUnit(
print_params.content_size.height(), dpi, print_params.desired_dpi));
-#if !defined(EWK_BRINGUP) // FIXME: m120 bringup
- webkit_print_params->printable_area.set_x(ConvertUnit(
- print_params.printable_area.x(), dpi, print_params.desired_dpi));
- webkit_print_params->printable_area.set_y(ConvertUnit(
- print_params.printable_area.y(), dpi, print_params.desired_dpi));
- webkit_print_params->printable_area.set_width(ConvertUnit(
- print_params.printable_area.width(), dpi, print_params.desired_dpi));
- webkit_print_params->printable_area.set_height(ConvertUnit(
- print_params.printable_area.height(), dpi, print_params.desired_dpi));
- webkit_print_params->paper_size.set_width(ConvertUnit(
+ webkit_print_params->default_page_description.size.set_width(ConvertUnit(
print_params.page_size.width(), dpi, print_params.desired_dpi));
- webkit_print_params->paper_size.set_height(ConvertUnit(
+ webkit_print_params->default_page_description.size.set_height(ConvertUnit(
print_params.page_size.height(), dpi, print_params.desired_dpi));
-#endif
}
} //namespace