[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
yuzo at google.com
yuzo at google.com
Wed Mar 17 18:39:59 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 6cdc58910a0dc49bc38438ee29fbbe5eac310921
Author: yuzo at google.com <yuzo at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Mar 15 08:33:18 2010 +0000
2010-03-14 Yuzo Fujishima <yuzo at google.com>
Reviewed by Shinichiro Hamaji.
Always call PrintContext.end() from PrintContext::pageNumberForElement().
Without this change, WebKit remains in printing mode after determining the page number if the specified element is found.
https://bugs.webkit.org/show_bug.cgi?id=36049
* platform/gtk/Skipped:
* platform/mac/printing/return-from-printing-mode-expected.checksum: Added.
* platform/mac/printing/return-from-printing-mode-expected.png: Added.
* platform/mac/printing/return-from-printing-mode-expected.txt: Added.
* platform/qt/Skipped:
* platform/win/Skipped:
* printing/return-from-printing-mode.html: Added.
2010-03-14 Yuzo Fujishima <yuzo at google.com>
Reviewed by Shinichiro Hamaji.
Always call PrintContext.end() from PrintContext::pageNumberForElement().
Without this change, WebKit remains in printing mode after determining the page number if the specified element is found.
https://bugs.webkit.org/show_bug.cgi?id=36049
Test: printing/return-from-printing-mode.html
* page/PrintContext.cpp:
(WebCore::PrintContext::pageNumberForElement):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55988 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e0cf26b..59d08b6 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,21 @@
+2010-03-14 Yuzo Fujishima <yuzo at google.com>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Always call PrintContext.end() from PrintContext::pageNumberForElement().
+
+ Without this change, WebKit remains in printing mode after determining the page number if the specified element is found.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36049
+
+ * platform/gtk/Skipped:
+ * platform/mac/printing/return-from-printing-mode-expected.checksum: Added.
+ * platform/mac/printing/return-from-printing-mode-expected.png: Added.
+ * platform/mac/printing/return-from-printing-mode-expected.txt: Added.
+ * platform/qt/Skipped:
+ * platform/win/Skipped:
+ * printing/return-from-printing-mode.html: Added.
+
2010-03-14 Yael Aharon <yael.aharon at nokia.com>
Reviewed by Darin Adler.
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index ef21a2c..1f021ea 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -3594,8 +3594,9 @@ plugins/netscape-dom-access.html
# Tests in printing/ directory
# Tests generating new results
-printing/media-queries-print.html
printing/compositing-layer-printing.html
+printing/media-queries-print.html
+printing/return-from-printing-mode.html
# Tests in scrollbars/ directory
# Tests generating new results
diff --git a/LayoutTests/platform/mac/printing/return-from-printing-mode-expected.checksum b/LayoutTests/platform/mac/printing/return-from-printing-mode-expected.checksum
new file mode 100644
index 0000000..3656339
--- /dev/null
+++ b/LayoutTests/platform/mac/printing/return-from-printing-mode-expected.checksum
@@ -0,0 +1 @@
+be531a6071bdfb500ed0651b88f23723
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/printing/return-from-printing-mode-expected.png b/LayoutTests/platform/mac/printing/return-from-printing-mode-expected.png
new file mode 100644
index 0000000..167875d
Binary files /dev/null and b/LayoutTests/platform/mac/printing/return-from-printing-mode-expected.png differ
diff --git a/LayoutTests/platform/mac/printing/return-from-printing-mode-expected.txt b/LayoutTests/platform/mac/printing/return-from-printing-mode-expected.txt
new file mode 100644
index 0000000..a5ffcf1
--- /dev/null
+++ b/LayoutTests/platform/mac/printing/return-from-printing-mode-expected.txt
@@ -0,0 +1,8 @@
+layer at (0,0) size 1656x585
+ RenderView at (0,0) size 800x585
+layer at (0,0) size 1656x48
+ RenderBlock {HTML} at (0,0) size 800x48
+ RenderBody {BODY} at (8,16) size 784x16
+ RenderBlock {P} at (0,0) size 784x16
+ RenderText {#text} at (0,0) size 1648x16
+ text run at (0,0) width 1648: "The_content_of_this_paragraph_must_be_long_enough_such_that_a_scroll_bar_is_shown_in_non_printing_mode."
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index d361fd1..df9c045 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -3679,6 +3679,7 @@ fonts/monospace.html
fonts/sans-serif.html
fonts/serif.html
plugins/embed-attributes-style.html
+printing/return-from-printing-mode.html
scrollbars/basic-scrollbar.html
scrollbars/disabled-scrollbar.html
scrollbars/listbox-scrollbar-combinations.html
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index efaafbc..a6111e1 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -432,6 +432,8 @@ accessibility/visible-elements.html
# No support for print-to-pdf in Windows DRT
printing/compositing-layer-printing.html
printing/media-queries-print.html
+# Tests generating new results
+printing/return-from-printing-mode.html
# No upload progress events on windows
http/tests/xmlhttprequest/upload-onload-event.html
diff --git a/LayoutTests/printing/return-from-printing-mode.html b/LayoutTests/printing/return-from-printing-mode.html
new file mode 100644
index 0000000..4bf0da0
--- /dev/null
+++ b/LayoutTests/printing/return-from-printing-mode.html
@@ -0,0 +1,20 @@
+<!doctype html>
+<html>
+<head>
+<style type="text/css">
+* {font: 16px/1 Ahem;}
+</style>
+<script type="text/javascript">
+function test()
+{
+ if (window.layoutTestController)
+ layoutTestController.pageNumberForElementById('test1');
+}
+</script>
+<head>
+<body onload="test()">
+<p id='test1'>
+The_content_of_this_paragraph_must_be_long_enough_such_that_a_scroll_bar_is_shown_in_non_printing_mode.
+</p>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ae87ec5..5bba101 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-03-14 Yuzo Fujishima <yuzo at google.com>
+
+ Reviewed by Shinichiro Hamaji.
+
+ Always call PrintContext.end() from PrintContext::pageNumberForElement().
+
+ Without this change, WebKit remains in printing mode after determining the page number if the specified element is found.
+
+ https://bugs.webkit.org/show_bug.cgi?id=36049
+
+ Test: printing/return-from-printing-mode.html
+
+ * page/PrintContext.cpp:
+ (WebCore::PrintContext::pageNumberForElement):
+
2010-03-11 Philippe Normand <pnormand at igalia.com>
Reviewed by Gustavo Noronha Silva.
diff --git a/WebCore/page/PrintContext.cpp b/WebCore/page/PrintContext.cpp
index 31c8777..b6806eb 100644
--- a/WebCore/page/PrintContext.cpp
+++ b/WebCore/page/PrintContext.cpp
@@ -179,13 +179,14 @@ int PrintContext::pageNumberForElement(Element* element, const FloatSize& pageSi
int top = box->offsetTop();
int left = box->offsetLeft();
- for (int pageNumber = 0; pageNumber < printContext.pageCount(); pageNumber++) {
+ int pageNumber = 0;
+ for (; pageNumber < printContext.pageCount(); pageNumber++) {
const IntRect& page = printContext.pageRect(pageNumber);
if (page.x() <= left && left < page.right() && page.y() <= top && top < page.bottom())
- return pageNumber;
+ break;
}
printContext.end();
- return -1;
+ return (pageNumber < printContext.pageCount() ? pageNumber : -1);
}
int PrintContext::numberOfPages(Frame* frame, const FloatSize& pageSizeInPixels)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list