Summary: | Auto-sized frames may be taller than expected | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andrei Burago <aburago> | ||||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Andrei Burago
2012-04-16 17:45:31 PDT
Created attachment 137445 [details]
Patch
Comment on attachment 137445 [details] Patch >Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 114315) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,18 @@ >+2012-04-02 Andrei Burago <aburago@chromium.org> >+ >+ Auto-size may not work on first load >+ https://bugs.webkit.org/show_bug.cgi?id=84106 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests. The repro steps require use of Chrome notifications on Win. >+ >+ >+ * page/FrameView.cpp: >+ (WebCore::FrameView::autoSizeIfEnabled): >+ > 2012-04-16 Levi Weintraub <leviw@chromium.org> > > Make borderBoxRect sub-pixel precise and add a pixel snapped version >Index: Source/WebCore/page/FrameView.cpp >=================================================================== >--- Source/WebCore/page/FrameView.cpp (revision 114315) >+++ Source/WebCore/page/FrameView.cpp (working copy) >@@ -2434,12 +2434,13 @@ void FrameView::autoSizeIfEnabled() > if (!m_didRunAutosize) > resize(frameRect().width(), m_minAutoSize.height()); > >+ IntSize size = frameRect().size(); >+ > // Do the resizing twice. The first time is basically a rough calculation using the preferred width > // which may result in a height change during the second iteration. > for (int i = 0; i < 2; i++) { > // Update various sizes including contentsSize, scrollHeight, etc. > document->updateLayoutIgnorePendingStylesheets(); >- IntSize size = frameRect().size(); > int width = documentView->minPreferredLogicalWidth(); > int height = documentRenderBox->scrollHeight(); > IntSize newSize(width, height); Created attachment 137448 [details]
Patch
Comment on attachment 137448 [details] Patch Clearing flags on attachment: 137448 Committed r114342: <http://trac.webkit.org/changeset/114342> All reviewed patches have been landed. Closing bug. |