Title: [111646] branches/chromium/1025
- Revision
- 111646
- Author
- [email protected]
- Date
- 2012-03-21 20:25:31 -0700 (Wed, 21 Mar 2012)
Log Message
Revert 106232 - .: Manual test of number of resize events emitted during page generation.
https://bugs.webkit.org/show_bug.cgi?id=77212
Is needed to test if too many resize events are send when using fixed
layout, and needs to be a manual test because the test framework does
not currently support testing fixed layout.
Patch by Allan Sandfeld Jensen <[email protected]> on 2012-01-30
Reviewed by Kenneth Rohde Christiansen.
* ManualTests/resize-events.html: Added.
Source/WebCore: Only send resize events when layout size changes.
https://bugs.webkit.org/show_bug.cgi?id=77212
When using fixed layout the widget size is the size of content, therefore
resize checks must check against layoutsize and not widget size.
Patch by Allan Sandfeld Jensen <[email protected]> on 2012-01-30
Reviewed by Kenneth Rohde Christiansen.
Needs to be manual tests because the test framework does not currently
support testing fixed layout.
Tests: ManualTests/resize-events.html
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::performPostLayoutTasks):
[email protected]
Review URL: https://chromiumcodereview.appspot.com/9812042
Modified Paths
Removed Paths
Diff
Deleted: branches/chromium/1025/ManualTests/resize-events.html (111645 => 111646)
--- branches/chromium/1025/ManualTests/resize-events.html 2012-03-22 03:08:25 UTC (rev 111645)
+++ branches/chromium/1025/ManualTests/resize-events.html 2012-03-22 03:25:31 UTC (rev 111646)
@@ -1,48 +0,0 @@
-<html>
-<head>
- <style>
- div.block { height: 100px; border: 1px solid black; margin:10px; }
- </style>
- <script>
- var resizecount = 0;
- var loaded = false;
- window._onresize_ = function() {
- resizecount++;
- document.getElementById('count1').innerHTML = resizecount;
- }
- </script>
-</head>
-<body>
- <div>
- Test how many resize events are emitted during page load and dynamic content generation.
-
- Do not resize the page. It invalidates the test.
- <p style="text-indent: 10px" id=result1>
- Resize events (should be 0 or 1): <span id=count1>0</span>
- </div>
- <div id=expandingblock>
- </div>
- <script>
- var blockcount = 0;
- function addBlock() {
- var el = document.createElement('div');
- el.setAttribute('class','block');
- document.getElementById('expandingblock').appendChild(el);
- if (++blockcount < 30)
- setTimeout(addBlock, 20);
- else
- finish();
- }
- function finish() {
- var result;
- // 0 or 1 resize events are acceptable.
- if (resizecount < 2)
- result = '<p style="color: green">PASS';
- else
- result = '<p style="color: red">FAIL';
- var resultElement = document.getElementById('result1')
- resultElement.innerHTML += result;
- }
- _onload_ = addBlock;
- </script>
-</body>
\ No newline at end of file
Modified: branches/chromium/1025/Source/WebCore/page/FrameView.cpp (111645 => 111646)
--- branches/chromium/1025/Source/WebCore/page/FrameView.cpp 2012-03-22 03:08:25 UTC (rev 111645)
+++ branches/chromium/1025/Source/WebCore/page/FrameView.cpp 2012-03-22 03:25:31 UTC (rev 111646)
@@ -1059,7 +1059,7 @@
m_firstLayout = false;
m_firstLayoutCallbackPending = true;
- m_lastLayoutSize = LayoutSize(layoutWidth(), layoutHeight());
+ m_lastLayoutSize = LayoutSize(width(), height());
m_lastZoomFactor = root->style()->zoom();
// Set the initial vMode to AlwaysOn if we're auto.
@@ -2308,7 +2308,7 @@
m_actionScheduler->resume();
if (!root->printing()) {
- LayoutSize currentSize = LayoutSize(layoutWidth(), layoutHeight());
+ LayoutSize currentSize = LayoutSize(width(), height());
float currentZoomFactor = root->style()->zoom();
bool resized = !m_firstLayout && (currentSize != m_lastLayoutSize || currentZoomFactor != m_lastZoomFactor);
m_lastLayoutSize = currentSize;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes