Skip to content

Instantly share code, notes, and snippets.

@yellows8
Created July 14, 2015 05:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yellows8/9fb509fde4112339f342 to your computer and use it in GitHub Desktop.
Save yellows8/9fb509fde4112339f342 to your computer and use it in GitHub Desktop.
SKATER v9.6 -> v9.9 OSS diff, without WebKitLibraries.
diff --git a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/webkit/WebCore/page/FrameView.cpp b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/webkit/WebCore/page/FrameView.cpp
index 265b20a..09e36f7 100644
--- a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/webkit/WebCore/page/FrameView.cpp
+++ b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/webkit/WebCore/page/FrameView.cpp
@@ -1672,6 +1672,7 @@ bool FrameView::scrollToAnchor(const String& name)
if (!anchorNode && !(name.isEmpty() || equalIgnoringCase(name, "top")))
return false;
+ RefPtr<FrameView> protect(this);
maintainScrollPositionAtAnchor(anchorNode ? static_cast<Node*>(anchorNode) : m_frame->document());
#if PLATFORM(WKC)
updateFixedElementsAfterScrolling();
diff --git a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/WKC/WebCore/platform/network/WKC/ResourceHandleManagerWKCSSL.cpp b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/WKC/WebCore/platform/network/WKC/ResourceHandleManagerWKCSSL.cpp
index 705cc83..9ac35d4 100644
--- a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/WKC/WebCore/platform/network/WKC/ResourceHandleManagerWKCSSL.cpp
+++ b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/WKC/WebCore/platform/network/WKC/ResourceHandleManagerWKCSSL.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2014 ACCESS CO., LTD. All rights reserved.
+ * Copyright (c) 2010-2015 ACCESS CO., LTD. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -1379,7 +1379,7 @@ void ResourceHandleManagerSSL::SSLEnableProtocols(unsigned int versions)
unsigned int ver;
if (!versions) {
- ver = CURL_SSLVERSION_NoUse;
+ ver = CURL_SSLVERSION_LAST;
}
else {
ver = CURL_SSLVERSION_DEFAULT;
diff --git a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/WKC/WebCore/platform/network/WKC/SocketStreamHandleWKC.cpp b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/WKC/WebCore/platform/network/WKC/SocketStreamHandleWKC.cpp
index c8ceaeb..771cc5b 100644
--- a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/WKC/WebCore/platform/network/WKC/SocketStreamHandleWKC.cpp
+++ b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/WKC/WebCore/platform/network/WKC/SocketStreamHandleWKC.cpp
@@ -272,6 +272,7 @@ void SocketStreamHandle::construct(void)
// add handle
curl_multi_add_handle(multiHandle, handle);
+ curl_easy_setopt(handle, CURLOPT_MULTI_EASY, multiHandle);
m_multiHandle = (void*)multiHandle;
m_handle = (void*)handle;
diff --git a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/WKC/WebKit/WKC/helpers/WKCResourceRequest.h b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/WKC/WebKit/WKC/helpers/WKCResourceRequest.h
index ed3a3cc..d51fec7 100644
--- a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/WKC/WebKit/WKC/helpers/WKCResourceRequest.h
+++ b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/WKC/WebKit/WKC/helpers/WKCResourceRequest.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2014 ACCESS CO., LTD. All rights reserved.
+ * Copyright (c) 2011-2015 ACCESS CO., LTD. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -40,6 +40,7 @@ public:
void setHTTPHeaderField(const char*, const char*);
void setHTTPBody(FormData*);
void setHTTPMethod(const String&);
+ String httpHeaderField(const char*) const;
const String& httpMethod() const;
bool isNull() const;
diff --git a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/WKC/WebKit/WKC/helpers/privates/WKCResourceRequest.cpp b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/WKC/WebKit/WKC/helpers/privates/WKCResourceRequest.cpp
index 8fdf9bb..bf0c0ff 100644
--- a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/WKC/WebKit/WKC/helpers/privates/WKCResourceRequest.cpp
+++ b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/WKC/WebKit/WKC/helpers/privates/WKCResourceRequest.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2014 ACCESS CO., LTD. All rights reserved.
+ * Copyright (c) 2011-2015 ACCESS CO., LTD. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -89,6 +89,12 @@ ResourceRequestPrivate::setHTTPMethod(const String& httpMethod)
((WebCore::ResourceRequest&)m_webcore).setHTTPMethod(httpMethod);
}
+String
+ResourceRequestPrivate::httpHeaderField(const char* name) const
+{
+ return ((WebCore::ResourceRequest&)m_webcore).httpHeaderField(name);
+}
+
const String&
ResourceRequestPrivate::httpMethod()
{
@@ -161,6 +167,12 @@ ResourceRequest::setHTTPMethod(const String& httpMethod)
m_private.setHTTPMethod(httpMethod);
}
+String
+ResourceRequest::httpHeaderField(const char* name) const
+{
+ return m_private.httpHeaderField(name);
+}
+
const String&
ResourceRequest::httpMethod() const
{
diff --git a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/WKC/WebKit/WKC/helpers/privates/WKCResourceRequestPrivate.h b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/WKC/WebKit/WKC/helpers/privates/WKCResourceRequestPrivate.h
index e871320..c81d6ad 100644
--- a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/WKC/WebKit/WKC/helpers/privates/WKCResourceRequestPrivate.h
+++ b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/WKC/WebKit/WKC/helpers/privates/WKCResourceRequestPrivate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2014 ACCESS CO., LTD. All rights reserved.
+ * Copyright (c) 2011-2015 ACCESS CO., LTD. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -45,6 +45,7 @@ public:
void setHTTPHeaderField(const char*, const char*);
void setHTTPBody(FormData*);
void setHTTPMethod(const String&);
+ String httpHeaderField(const char*) const;
const String& httpMethod();
bool isNull() const;
diff --git a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/WKC/WebKit/WKC/webkit/WKCVersion.h b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/WKC/WebKit/WKC/webkit/WKCVersion.h
index f31843d..4543297 100644
--- a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/WKC/WebKit/WKC/webkit/WKCVersion.h
+++ b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/WKC/WebKit/WKC/webkit/WKCVersion.h
@@ -29,7 +29,7 @@
#define WKC_VERSION_CHECK(major, minor, micro) \
(((major)*10000) + ((minor)*100) + (micro)) >= ((WKC_VERSION_MAJOR*10000) + (WKC_VERSION_MINOR*100) + (WKC_VERSION_MICRO))
-#define WKC_CUSTOMER_RELEASE_VERSION "0.5.13"
+#define WKC_CUSTOMER_RELEASE_VERSION "0.5.15"
#define WKC_WEBKIT_VERSION "536.30"
diff --git a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/WKC/WebKit/WKC/webkit/WKCWebView.cpp b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/WKC/WebKit/WKC/webkit/WKCWebView.cpp
index e881f1e..ae8eacb 100644
--- a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/WKC/WebKit/WKC/webkit/WKCWebView.cpp
+++ b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/WKC/WebKit/WKC/webkit/WKCWebView.cpp
@@ -11,7 +11,7 @@
Copyright (C) 2009 Igalia S.L.
Copyright (C) 2009 Movial Creative Technologies Inc.
Copyright (C) 2009 Bobby Powers
- Copyright (c) 2010-2014 ACCESS CO., LTD. All rights reserved.
+ Copyright (c) 2010-2015 ACCESS CO., LTD. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -99,6 +99,7 @@
#include "helpers/privates/WKCSecurityOriginPrivate.h"
#include "Chrome.h"
+#include "Cookie.h"
#include "Page.h"
#include "PageGroup.h"
#include "Frame.h"
@@ -3414,12 +3415,58 @@ int WKCWebKitCookieGet(const char* uri, char* buf, unsigned int len)
WTF::String path = ki.path();
bool secure = ki.protocolIs("https");
- WTF::String cookie = WebCore::ResourceHandleManager::sharedInstance()->getCookie(domain, path, secure);
+ WTF::Vector<WebCore::Cookie> rawCookiesList;
+ bool rawCookiesImplemented = WebCore::ResourceHandleManager::sharedInstance()->getRawCookies(domain, path, secure, rawCookiesList);
+ if (!rawCookiesImplemented) {
+ return 0;
+ }
+
+ char* pbuf = buf;
+ unsigned int remaining_buf_len = len;
+ unsigned int cookies_len = 0;
+ unsigned int cookies_size = rawCookiesList.size();
+
+ for (int i = 0; i < cookies_size; i++) {
+ unsigned int name_len = rawCookiesList[i].name.utf8().length();
+ unsigned int value_len = rawCookiesList[i].value.utf8().length();
+ unsigned int cookie_len = name_len + value_len + 2; // 2: length of '=' and ';'.
+
+ if (name_len == 0)
+ continue;
+
+ cookies_len += cookie_len;
+
+ if (!pbuf)
+ continue;
- if (buf && len > cookie.utf8().length())
- strncpy(buf, cookie.utf8().data(), cookie.utf8().length());
+ if (cookie_len > remaining_buf_len)
+ break;
+
+ strncpy(pbuf, rawCookiesList[i].name.utf8().data(), name_len);
+ pbuf[name_len] = '=';
+ pbuf += name_len + 1;
+ remaining_buf_len -= name_len + 1;
+
+ if (value_len > 0) {
+ strncpy(pbuf, rawCookiesList[i].value.utf8().data(), value_len);
+ pbuf += value_len;
+ remaining_buf_len -= value_len;
+ }
+
+ *pbuf = ';';
+ pbuf += 1;
+ remaining_buf_len -= 1;
+ }
+
+ if (!pbuf)
+ return cookies_len;
+
+ if (pbuf - buf > 0) {
+ pbuf -= 1;
+ *pbuf = '\0'; // replace the last ';' with null terminator.
+ }
- return cookie.utf8().length();
+ return pbuf - buf;
}
WKC_API void
diff --git a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/WKC/WebKit/WKC/webkit/WKCWebView.h b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/WKC/WebKit/WKC/webkit/WKCWebView.h
index d8ae592..302cda2 100644
--- a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/WKC/WebKit/WKC/webkit/WKCWebView.h
+++ b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/WKC/WebKit/WKC/webkit/WKCWebView.h
@@ -1,7 +1,7 @@
/*
* WKCWebView.h
*
- * Copyright (c) 2010-2014 ACCESS CO., LTD. All rights reserved.
+ * Copyright (c) 2010-2015 ACCESS CO., LTD. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -629,21 +629,23 @@ Registers serialized cookies.
*/
WKC_API void WKCWebKitCookieDeserialize(const char* buff, bool restart);
/**
-@brief Gets cookie of specified uri
-@param uri URI to get cookie
-@param buf Buffer for storing cookie
+@brief Gets cookies of specified uri
+@param uri URI to get cookies
+@param buf Buffer for storing cookies
@param len Max length of buffer
-@retval Length of cookie
+@retval Length of cookies string
@details
-Gets cookie of specified uri
+Gets cookies of specified uri, which the cookies is null terminated string.
+@attention
+- If buff is null, just return buffer length to write.
*/
WKC_API int WKCWebKitCookieGet(const char* uri, char* buf, unsigned int len);
/**
-@brief Sets cookie of specified uri
-@param uri URI to set cookie
-@param cookie Cookie string
+@brief Sets cookies of specified uri
+@param uri URI to set cookies
+@param cookie Cookies string
@details
-Sets cookie of specified uri
+Sets cookies of specified uri
*/
WKC_API void WKCWebKitCookieSet(const char* uri, const char* cookie);
/**
diff --git a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/WKC/include/wkccairorename.h b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/WKC/include/wkccairorename.h
index ecba490..0be52ff 100644
--- a/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.6.0-/WKC/include/wkccairorename.h
+++ b/home/yellows8/Downloads/NewNintendo3DS_OpenSources9.9.0-/WKC/include/wkccairorename.h
@@ -285,6 +285,7 @@
#define cairo_device_status wkc_cairo_device_status
#define _cairo_error wkc__cairo_error
#define _cairo_fallback_compositor wkc__cairo_fallback_compositor
+#define _cairo_font_face_destroy wkc__cairo_font_face_destroy
#define _cairo_font_face_init wkc__cairo_font_face_init
#define _cairo_font_face_nil wkc__cairo_font_face_nil
#define _cairo_font_face_set_error wkc__cairo_font_face_set_error
@@ -422,6 +423,7 @@
#define _pixman_image_add_traps wkc__pixman_image_add_traps
#define _pixman_image_add_tristrip wkc__pixman_image_add_tristrip
#define wkcResetVariables_cairo_image_compositor_c wkc_wkcResetVariables_cairo_image_compositor_c
+#define _cairo_image_info_get_jbig2_info wkc__cairo_image_info_get_jbig2_info
#define _cairo_image_info_get_jpeg_info wkc__cairo_image_info_get_jpeg_info
#define _cairo_image_info_get_jpx_info wkc__cairo_image_info_get_jpx_info
#define _cairo_image_info_get_png_info wkc__cairo_image_info_get_png_info
@@ -473,6 +475,7 @@
#define cairo_image_surface_get_height wkc_cairo_image_surface_get_height
#define cairo_image_surface_get_stride wkc_cairo_image_surface_get_stride
#define cairo_image_surface_get_width wkc_cairo_image_surface_get_width
+#define cairo_lines_compare_at_y wkc_cairo_lines_compare_at_y
#define _cairo_lzw_compress wkc__cairo_lzw_compress
#define _cairo_mask_compositor_init wkc__cairo_mask_compositor_init
#define _cairo_matrix_compute_basis_scale_factors wkc__cairo_matrix_compute_basis_scale_factors
@@ -514,6 +517,7 @@
#define _cairo_operator_bounded_by_source wkc__cairo_operator_bounded_by_source
#define _cairo_validate_text_clusters wkc__cairo_validate_text_clusters
#define _cairo_win32_tmpfile wkc__cairo_win32_tmpfile
+#define cairo_get_locale_decimal_point wkc_cairo_get_locale_decimal_point
#define cairo_glyph_allocate wkc_cairo_glyph_allocate
#define cairo_glyph_free wkc_cairo_glyph_free
#define cairo_status_to_string wkc_cairo_status_to_string
@@ -553,6 +557,7 @@
#define _cairo_output_stream_get_status wkc__cairo_output_stream_get_status
#define _cairo_output_stream_init wkc__cairo_output_stream_init
#define _cairo_output_stream_nil wkc__cairo_output_stream_nil
+#define _cairo_output_stream_print_matrix wkc__cairo_output_stream_print_matrix
#define _cairo_output_stream_printf wkc__cairo_output_stream_printf
#define _cairo_output_stream_vprintf wkc__cairo_output_stream_vprintf
#define _cairo_output_stream_write wkc__cairo_output_stream_write
@@ -644,6 +649,7 @@
#define _cairo_pattern_is_clear wkc__cairo_pattern_is_clear
#define _cairo_pattern_is_opaque wkc__cairo_pattern_is_opaque
#define _cairo_pattern_is_opaque_solid wkc__cairo_pattern_is_opaque_solid
+#define _cairo_pattern_pretransform wkc__cairo_pattern_pretransform
#define _cairo_pattern_reset_static_data wkc__cairo_pattern_reset_static_data
#define _cairo_pattern_sampled_area wkc__cairo_pattern_sampled_area
#define _cairo_pattern_transform wkc__cairo_pattern_transform
@@ -736,6 +742,8 @@
#define _cairo_recording_surface_get_bbox wkc__cairo_recording_surface_get_bbox
#define _cairo_recording_surface_get_ink_bbox wkc__cairo_recording_surface_get_ink_bbox
#define _cairo_recording_surface_get_path wkc__cairo_recording_surface_get_path
+#define _cairo_recording_surface_has_only_bilevel_alpha wkc__cairo_recording_surface_has_only_bilevel_alpha
+#define _cairo_recording_surface_has_only_op_over wkc__cairo_recording_surface_has_only_op_over
#define _cairo_recording_surface_replay wkc__cairo_recording_surface_replay
#define _cairo_recording_surface_replay_and_create_regions wkc__cairo_recording_surface_replay_and_create_regions
#define _cairo_recording_surface_replay_one wkc__cairo_recording_surface_replay_one
@@ -874,8 +882,7 @@
#define _cairo_surface_begin_modification wkc__cairo_surface_begin_modification
#define _cairo_surface_copy_mime_data wkc__cairo_surface_copy_mime_data
#define _cairo_surface_create_in_error wkc__cairo_surface_create_in_error
-#define _cairo_surface_create_similar_scratch wkc__cairo_surface_create_similar_scratch
-#define _cairo_surface_create_similar_solid wkc__cairo_surface_create_similar_solid
+#define _cairo_surface_create_scratch wkc__cairo_surface_create_scratch
#define _cairo_surface_default_acquire_source_image wkc__cairo_surface_default_acquire_source_image
#define _cairo_surface_default_release_source_image wkc__cairo_surface_default_release_source_image
#define _cairo_surface_default_source wkc__cairo_surface_default_source
@@ -893,7 +900,6 @@
#define _cairo_surface_paint wkc__cairo_surface_paint
#define _cairo_surface_release_device_reference wkc__cairo_surface_release_device_reference
#define _cairo_surface_release_source_image wkc__cairo_surface_release_source_image
-#define _cairo_surface_set_device_scale wkc__cairo_surface_set_device_scale
#define _cairo_surface_set_error wkc__cairo_surface_set_error
#define _cairo_surface_set_font_options wkc__cairo_surface_set_font_options
#define _cairo_surface_set_resolution wkc__cairo_surface_set_resolution
@@ -909,6 +915,7 @@
#define cairo_surface_get_content wkc_cairo_surface_get_content
#define cairo_surface_get_device wkc_cairo_surface_get_device
#define cairo_surface_get_device_offset wkc_cairo_surface_get_device_offset
+#define cairo_surface_get_device_scale wkc_cairo_surface_get_device_scale
#define cairo_surface_get_fallback_resolution wkc_cairo_surface_get_fallback_resolution
#define cairo_surface_get_font_options wkc_cairo_surface_get_font_options
#define cairo_surface_get_mime_data wkc_cairo_surface_get_mime_data
@@ -921,6 +928,7 @@
#define cairo_surface_mark_dirty_rectangle wkc_cairo_surface_mark_dirty_rectangle
#define cairo_surface_reference wkc_cairo_surface_reference
#define cairo_surface_set_device_offset wkc_cairo_surface_set_device_offset
+#define cairo_surface_set_device_scale wkc_cairo_surface_set_device_scale
#define cairo_surface_set_fallback_resolution wkc_cairo_surface_set_fallback_resolution
#define cairo_surface_set_mime_data wkc_cairo_surface_set_mime_data
#define cairo_surface_set_user_data wkc_cairo_surface_set_user_data
@@ -1011,7 +1019,7 @@
#define _cairo_traps_path wkc__cairo_traps_path
#define _cairo_traps_tessellate_convex_quad wkc__cairo_traps_tessellate_convex_quad
#define _cairo_traps_tessellate_rectangle wkc__cairo_traps_tessellate_rectangle
-#define _cairo_traps_tessellate_triangle wkc__cairo_traps_tessellate_triangle
+#define _cairo_traps_tessellate_triangle_with_edges wkc__cairo_traps_tessellate_triangle_with_edges
#define _cairo_traps_to_boxes wkc__cairo_traps_to_boxes
#define _cairo_traps_translate wkc__cairo_traps_translate
#define _cairo_traps_compositor_init wkc__cairo_traps_compositor_init
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment