Commit b2fe5017 authored by hamaji@chromium.org's avatar hamaji@chromium.org

2010-02-05 Shinichiro Hamaji <hamaji@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@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@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: svn://svn.chromium.org/blink/trunk@54461 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent dd5604e7
2010-02-05 Shinichiro Hamaji <hamaji@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@apple.com>
Reviewed by Beth Dakin.
......
......@@ -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
......
2010-02-05 Shinichiro Hamaji <hamaji@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@twotoasts.de>
Reviewed by Gustavo Noronha Silva.
......
......@@ -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);
......
......@@ -843,6 +843,29 @@ gchar* webkit_web_frame_counter_value_for_element_by_id(WebKitWebFrame* frame, c
return g_strdup(counterValue.utf8().data());
}
/**
* 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
......
2010-02-05 Shinichiro Hamaji <hamaji@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@chromium.org>
Reviewed by Eric Seidel.
......
......@@ -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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment