Changeset 53527 in webkit
- Timestamp:
- Jan 20, 2010 12:26:18 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r53525 r53527 1 2010-01-20 Shinichiro Hamaji <hamaji@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 [Chromium] computePageRectsForFrame seems to be unnecessary 6 https://bugs.webkit.org/show_bug.cgi?id=33881 7 8 * WebCore.gypi: Removed FrameChromium.h 9 * page/chromium/FrameChromium.cpp: Removed computePageRectsForFrame. 10 * page/chromium/FrameChromium.h: Removed. 11 1 12 2010-01-20 Roland Steiner <rolandsteiner@chromium.org> 2 13 -
trunk/WebCore/WebCore.gypi
r53512 r53527 1744 1744 'page/chromium/EventHandlerChromium.cpp', 1745 1745 'page/chromium/FrameChromium.cpp', 1746 'page/chromium/FrameChromium.h',1747 1746 'page/gtk/DragControllerGtk.cpp', 1748 1747 'page/gtk/EventHandlerGtk.cpp', -
trunk/WebCore/page/chromium/FrameChromium.cpp
r47451 r53527 26 26 27 27 #include "config.h" 28 #include "FrameChromium.h"29 28 30 29 #include "Document.h" … … 37 36 namespace WebCore { 38 37 39 void computePageRectsForFrame(Frame* frame, const IntRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, Vector<IntRect>& pages, int& outPageHeight)40 {41 ASSERT(frame);42 43 pages.clear();44 outPageHeight = 0;45 46 if (!frame->document() || !frame->view() || !frame->document()->renderer())47 return;48 49 RenderView* root = toRenderView(frame->document()->renderer());50 51 if (!root) {52 LOG_ERROR("document to be printed has no renderer");53 return;54 }55 56 if (userScaleFactor <= 0) {57 LOG_ERROR("userScaleFactor has bad value %.2f", userScaleFactor);58 return;59 }60 61 float ratio = static_cast<float>(printRect.height()) / static_cast<float>(printRect.width());62 63 float pageWidth = static_cast<float>(root->rightLayoutOverflow());64 float pageHeight = pageWidth * ratio;65 outPageHeight = static_cast<int>(pageHeight); // this is the height of the page adjusted by margins66 pageHeight -= (headerHeight + footerHeight);67 68 if (pageHeight <= 0) {69 LOG_ERROR("pageHeight has bad value %.2f", pageHeight);70 return;71 }72 73 float currPageHeight = pageHeight / userScaleFactor;74 float docHeight = root->layer()->height();75 float currPageWidth = pageWidth / userScaleFactor;76 77 78 // always return at least one page, since empty files should print a blank page79 float printedPagesHeight = 0.0f;80 do {81 float proposedBottom = min(docHeight, printedPagesHeight + pageHeight);82 frame->view()->adjustPageHeight(&proposedBottom, printedPagesHeight, proposedBottom, printedPagesHeight);83 currPageHeight = max(1.0f, proposedBottom - printedPagesHeight);84 85 pages.append(IntRect(0, printedPagesHeight, currPageWidth, currPageHeight));86 printedPagesHeight += currPageHeight;87 } while (printedPagesHeight < docHeight);88 }89 90 38 DragImageRef Frame::dragImageForSelection() 91 39 { -
trunk/WebKit/chromium/ChangeLog
r53515 r53527 1 2010-01-20 Shinichiro Hamaji <hamaji@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 [Chromium] computePageRectsForFrame seems to be unnecessary 6 https://bugs.webkit.org/show_bug.cgi?id=33881 7 8 * src/WebFrameImpl.cpp: Stop including FrameChromium.h 9 1 10 2010-01-19 Jon Honeycutt <jhoneycutt@apple.com> 2 11 -
trunk/WebKit/chromium/src/WebFrameImpl.cpp
r53046 r53527 85 85 #include "EventHandler.h" 86 86 #include "FormState.h" 87 #include "FrameChromium.h"88 87 #include "FrameLoader.h" 89 88 #include "FrameLoadRequest.h"
Note: See TracChangeset
for help on using the changeset viewer.