[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.20-204-g221d8e8
hamaji at chromium.org
hamaji at chromium.org
Wed Feb 10 22:17:51 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit e3231bad9da726a226f7fef08c8a41affb28cafb
Author: hamaji at chromium.org <hamaji at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Feb 6 05:37:58 2010 +0000
2010-02-05 Shinichiro Hamaji <hamaji at chromium.org>
Reviewed by Gustavo Noronha Silva.
[Gtk] Implement layoutTestController.pageNumberForElementById
https://bugs.webkit.org/show_bug.cgi?id=34572
* platform/gtk/Skipped:
2010-02-05 Shinichiro Hamaji <hamaji at chromium.org>
Reviewed by Gustavo Noronha Silva.
[Gtk] Implement layoutTestController.pageNumberForElementById
https://bugs.webkit.org/show_bug.cgi?id=34572
* webkit/webkitprivate.h:
* webkit/webkitwebframe.cpp:
(webkit_web_frame_page_number_for_element_by_id):
2010-02-05 Shinichiro Hamaji <hamaji at chromium.org>
Reviewed by Gustavo Noronha Silva.
[Gtk] Implement layoutTestController.pageNumberForElementById
https://bugs.webkit.org/show_bug.cgi?id=34572
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
(LayoutTestController::pageNumberForElementById):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5f865b5..5f27239 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2010-02-05 Shinichiro Hamaji <hamaji at chromium.org>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [Gtk] Implement layoutTestController.pageNumberForElementById
+ https://bugs.webkit.org/show_bug.cgi?id=34572
+
+ * platform/gtk/Skipped:
+
2010-02-05 Geoffrey Garen <ggaren at apple.com>
Reviewed by Beth Dakin.
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index a9d3d71..6e8b0b6 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5793,10 +5793,6 @@ fast/loader/crash-copying-backforwardlist.html
# https://bugs.webkit.org/show_bug.cgi?id=34086
media/video-reverse-play-duration.html
-# Implement LayoutTestController::pageNumberForElementById().
-printing/page-break-always.html
-printing/pageNumerForElementById.html
-
# Intermittently timing out on Gtk Debug Bot:
# https://bugs.webkit.org/show_bug.cgi?id=33445
http/tests/incremental/split-hex-entities.pl
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index fd29d98..5c55670 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,14 @@
+2010-02-05 Shinichiro Hamaji <hamaji at chromium.org>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [Gtk] Implement layoutTestController.pageNumberForElementById
+ https://bugs.webkit.org/show_bug.cgi?id=34572
+
+ * webkit/webkitprivate.h:
+ * webkit/webkitwebframe.cpp:
+ (webkit_web_frame_page_number_for_element_by_id):
+
2010-02-04 Christian Dywan <christian at twotoasts.de>
Reviewed by Gustavo Noronha Silva.
diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h
index e9d61a6..44b4d0c 100644
--- a/WebKit/gtk/webkit/webkitprivate.h
+++ b/WebKit/gtk/webkit/webkitprivate.h
@@ -298,6 +298,9 @@ extern "C" {
WEBKIT_API gchar*
webkit_web_frame_counter_value_for_element_by_id (WebKitWebFrame* frame, const gchar* id);
+ WEBKIT_API int
+ webkit_web_frame_page_number_for_element_by_id(WebKitWebFrame* frame, const gchar* id, float pageWidth, float pageHeight);
+
WEBKIT_API guint
webkit_web_frame_get_pending_unload_event_count(WebKitWebFrame* frame);
diff --git a/WebKit/gtk/webkit/webkitwebframe.cpp b/WebKit/gtk/webkit/webkitwebframe.cpp
index cf40f91..fbd246d 100644
--- a/WebKit/gtk/webkit/webkitwebframe.cpp
+++ b/WebKit/gtk/webkit/webkitwebframe.cpp
@@ -844,6 +844,29 @@ gchar* webkit_web_frame_counter_value_for_element_by_id(WebKitWebFrame* frame, c
}
/**
+ * webkit_web_frame_page_number_for_element_by_id
+ * @frame: a #WebKitWebFrame
+ * @id: an element ID string
+ * @pageWidth: width of a page
+ * @pageHeight: height of a page
+ *
+ * Return value: The number of page where the specified element will be put
+ */
+int webkit_web_frame_page_number_for_element_by_id(WebKitWebFrame* frame, const gchar* id, float pageWidth, float pageHeight)
+{
+ g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), NULL);
+
+ Frame* coreFrame = core(frame);
+ if (!coreFrame)
+ return -1;
+
+ Element* coreElement = coreFrame->document()->getElementById(AtomicString(id));
+ if (!coreElement)
+ return -1;
+ return PrintContext::pageNumberForElement(coreElement, FloatSize(pageWidth, pageHeight));
+}
+
+/**
* webkit_web_frame_get_pending_unload_event_count:
* @frame: a #WebKitWebFrame
*
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index c21032a..d5f9e15 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,13 @@
+2010-02-05 Shinichiro Hamaji <hamaji at chromium.org>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [Gtk] Implement layoutTestController.pageNumberForElementById
+ https://bugs.webkit.org/show_bug.cgi?id=34572
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::pageNumberForElementById):
+
2010-02-03 Dirk Pranke <dpranke at chromium.org>
Reviewed by Eric Seidel.
diff --git a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
index bad09fb..e3a82a9 100644
--- a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
@@ -55,6 +55,7 @@ void webkit_application_cache_set_maximum_size(unsigned long long size);
unsigned int webkit_worker_thread_count(void);
void webkit_white_list_access_from_origin(const gchar* sourceOrigin, const gchar* destinationProtocol, const gchar* destinationHost, bool allowDestinationSubdomains);
gchar* webkit_web_frame_counter_value_for_element_by_id(WebKitWebFrame* frame, const gchar* id);
+int webkit_web_frame_page_number_for_element_by_id(WebKitWebFrame* frame, const gchar* id, float pageWidth, float pageHeight);
void webkit_web_inspector_execute_script(WebKitWebInspector* inspector, long callId, const gchar* script);
}
@@ -140,10 +141,12 @@ void LayoutTestController::keepWebHistory()
// FIXME: implement
}
-int LayoutTestController::pageNumberForElementById(JSStringRef, float, float)
+int LayoutTestController::pageNumberForElementById(JSStringRef id, float pageWidth, float pageHeight)
{
- // FIXME: implement
- return -1;
+ gchar* idGChar = JSStringCopyUTF8CString(id);
+ int pageNumber = webkit_web_frame_page_number_for_element_by_id(mainFrame, idGChar, pageWidth, pageHeight);
+ g_free(idGChar);
+ return pageNumber;
}
size_t LayoutTestController::webHistoryItemCount()
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list