Changeset 79167 in webkit
- Timestamp:
- Feb 20, 2011 7:06:48 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r79161 r79167 1 2011-02-20 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Maciej Stachowiak. 4 5 <rdar://problem/9028929> REGRESSION (r75897): Scaling applied twice to an iframe with a transformed ancestor 6 7 * fast/frames/iframe-scale-applied-twice-expected.txt: Added. 8 * fast/frames/iframe-scale-applied-twice.html: Added. 9 1 10 2011-02-20 Ami Fischman <fischman@chromium.org> 2 11 -
trunk/Source/WebCore/ChangeLog
r79159 r79167 1 2011-02-20 Dan Bernstein <mitz@apple.com> 2 3 Reviewed by Maciej Stachowiak. 4 5 <rdar://problem/9028929> REGRESSION (r75897): Scaling applied twice to an iframe with a transformed ancestor 6 7 Test: fast/frames/iframe-scale-applied-twice.html 8 9 * page/FrameView.cpp: 10 (WebCore::FrameView::create): Set the initial bounds of the view to match the 11 frame size. 12 * platform/ScrollView.cpp: 13 (WebCore::ScrollView::visibleContentRect): Based on bounds, not frame size. 14 (WebCore::ScrollView::updateScrollbars): Ditto. 15 (WebCore::ScrollView::setFrameRect): Moved code that really handles bounds size 16 change to setBoundsSize(). 17 (WebCore::ScrollView::setBoundsSize): Added. 18 (WebCore::ScrollView::setInitialBoundsSize): Added. Sets the bounds size but does 19 not update anything. 20 (WebCore::ScrollView::frameRectsChanged): Based on bounds, not frame size. 21 (WebCore::ScrollView::scrollbarCornerPresent): Ditto. 22 * platform/ScrollView.h: 23 (WebCore::ScrollView::boundsSize): Added this getter. 24 * platform/Widget.h: 25 (WebCore::Widget::resize): Set the bounds size to the frame size. 26 * platform/mac/ScrollbarThemeMac.mm: 27 (WebCore::ScrollbarThemeMac::paint): Fixed an error in the indirect drawing code 28 path where the buffer rect was resized to capture only the damaged part, but was 29 still drawn in the original location. 30 1 31 2011-02-20 Alexey Proskuryakov <ap@apple.com> 2 32 -
trunk/Source/WebCore/page/FrameView.cpp
r79053 r79167 157 157 RefPtr<FrameView> view = adoptRef(new FrameView(frame)); 158 158 view->Widget::setFrameRect(IntRect(view->pos(), initialSize)); 159 view->setInitialBoundsSize(initialSize); 159 160 view->show(); 160 161 return view.release(); -
trunk/Source/WebCore/platform/ScrollView.cpp
r78928 r79167 241 241 242 242 return IntRect(IntPoint(m_scrollOffset.width(), m_scrollOffset.height()), 243 IntSize(max(0, width() - verticalScrollbarWidth),244 max(0, height() - horizontalScrollbarHeight)));243 IntSize(max(0, m_boundsSize.width() - verticalScrollbarWidth), 244 max(0, m_boundsSize.height() - horizontalScrollbarHeight))); 245 245 } 246 246 #endif … … 471 471 472 472 IntSize docSize = contentsSize(); 473 IntSize frameSize = frameRect().size();473 IntSize frameSize = m_boundsSize; 474 474 475 475 if (hScroll == ScrollbarAuto) { … … 536 536 IntRect oldRect(m_horizontalScrollbar->frameRect()); 537 537 IntRect hBarRect = IntRect(0, 538 height() - m_horizontalScrollbar->height(),539 width() - (m_verticalScrollbar ? m_verticalScrollbar->width() : 0),538 m_boundsSize.height() - m_horizontalScrollbar->height(), 539 m_boundsSize.width() - (m_verticalScrollbar ? m_verticalScrollbar->width() : 0), 540 540 m_horizontalScrollbar->height()); 541 541 m_horizontalScrollbar->setFrameRect(hBarRect); … … 556 556 int pageStep = max(max<int>(clientHeight * Scrollbar::minFractionToStepWhenPaging(), clientHeight - Scrollbar::maxOverlapBetweenPages()), 1); 557 557 IntRect oldRect(m_verticalScrollbar->frameRect()); 558 IntRect vBarRect = IntRect( width() - m_verticalScrollbar->width(),558 IntRect vBarRect = IntRect(m_boundsSize.width() - m_verticalScrollbar->width(), 559 559 0, 560 560 m_verticalScrollbar->width(), 561 height() - (m_horizontalScrollbar ? m_horizontalScrollbar->height() : 0));561 m_boundsSize.height() - (m_horizontalScrollbar ? m_horizontalScrollbar->height() : 0)); 562 562 m_verticalScrollbar->setFrameRect(vBarRect); 563 563 if (!m_scrollbarsSuppressed && oldRect != m_verticalScrollbar->frameRect()) … … 795 795 796 796 Widget::setFrameRect(newRect); 797 798 if (platformWidget()) 799 return; 800 801 if (newRect.width() != oldRect.width() || newRect.height() != oldRect.height()) { 802 updateScrollbars(m_scrollOffset); 803 if (!m_useFixedLayout) 804 contentsResized(); 805 } 797 } 798 799 void ScrollView::setBoundsSize(const IntSize& newSize) 800 { 801 if (newSize == m_boundsSize) 802 return; 803 804 Widget::setBoundsSize(newSize); 805 m_boundsSize = newSize; 806 807 if (platformWidget()) 808 return; 809 810 updateScrollbars(m_scrollOffset); 811 if (!m_useFixedLayout) 812 contentsResized(); 806 813 807 814 frameRectsChanged(); 815 } 816 817 void ScrollView::setInitialBoundsSize(const IntSize& newSize) 818 { 819 ASSERT(m_boundsSize.isZero()); 820 m_boundsSize = newSize; 808 821 } 809 822 … … 842 855 return cornerRect; 843 856 844 if (m_horizontalScrollbar && width() - m_horizontalScrollbar->width() > 0) {857 if (m_horizontalScrollbar && m_boundsSize.width() - m_horizontalScrollbar->width() > 0) { 845 858 cornerRect.unite(IntRect(m_horizontalScrollbar->width(), 846 height() - m_horizontalScrollbar->height(),847 width() - m_horizontalScrollbar->width(),859 m_boundsSize.height() - m_horizontalScrollbar->height(), 860 m_boundsSize.width() - m_horizontalScrollbar->width(), 848 861 m_horizontalScrollbar->height())); 849 862 } 850 863 851 if (m_verticalScrollbar && height() - m_verticalScrollbar->height() > 0) {852 cornerRect.unite(IntRect( width() - m_verticalScrollbar->width(),864 if (m_verticalScrollbar && m_boundsSize.height() - m_verticalScrollbar->height() > 0) { 865 cornerRect.unite(IntRect(m_boundsSize.width() - m_verticalScrollbar->width(), 853 866 m_verticalScrollbar->height(), 854 867 m_verticalScrollbar->width(), 855 height() - m_verticalScrollbar->height()));868 m_boundsSize.height() - m_verticalScrollbar->height())); 856 869 } 857 870 … … 1013 1026 bool ScrollView::scrollbarCornerPresent() const 1014 1027 { 1015 return (m_horizontalScrollbar && width() - m_horizontalScrollbar->width() > 0) ||1016 (m_verticalScrollbar && height() - m_verticalScrollbar->height() > 0);1028 return (m_horizontalScrollbar && m_boundsSize.width() - m_horizontalScrollbar->width() > 0) || 1029 (m_verticalScrollbar && m_boundsSize.height() - m_verticalScrollbar->height() > 0); 1017 1030 } 1018 1031 -
trunk/Source/WebCore/platform/ScrollView.h
r78928 r79167 223 223 // Widget override to update our scrollbars and notify our contents of the resize. 224 224 virtual void setFrameRect(const IntRect&); 225 virtual void setBoundsSize(const IntSize&); 225 226 226 227 // For platforms that need to hit test scrollbars from within the engine's event handlers (like Win32). … … 287 288 virtual void contentsResized() = 0; 288 289 virtual void visibleContentsResized() = 0; 290 291 IntSize boundsSize() const { return m_boundsSize; } 292 void setInitialBoundsSize(const IntSize&); 289 293 290 294 // These functions are used to create/destroy scrollbars. … … 356 360 // vertical-rl / rtl YES YES 357 361 IntPoint m_scrollOrigin; 362 363 IntSize m_boundsSize; 358 364 359 365 void init(); -
trunk/Source/WebCore/platform/Widget.h
r75897 r79167 158 158 IntRect boundsRect() const { return IntRect(0, 0, width(), height()); } 159 159 160 void resize(int w, int h) { setFrameRect(IntRect(x(), y(), w, h)); }161 void resize(const IntSize& s) { setFrameRect(IntRect(pos(), s)); }160 void resize(int w, int h) { setFrameRect(IntRect(x(), y(), w, h)); setBoundsSize(IntSize(w, h)); } 161 void resize(const IntSize& s) { setFrameRect(IntRect(pos(), s)); setBoundsSize(s); } 162 162 void move(int x, int y) { setFrameRect(IntRect(x, y, width(), height())); } 163 163 void move(const IntPoint& p) { setFrameRect(IntRect(p, size())); } -
trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm
r78917 r79167 514 514 IntRect bufferRect(scrollbar->frameRect()); 515 515 bufferRect.intersect(damageRect); 516 bufferRect.move(-scrollbar->frameRect().x(), -scrollbar->frameRect().y());517 516 518 517 OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(bufferRect.size()); 519 518 if (!imageBuffer) 520 519 return true; 521 520 521 imageBuffer->context()->translate(scrollbar->frameRect().x() - bufferRect.x(), scrollbar->frameRect().y() - bufferRect.y()); 522 522 HIThemeDrawTrack(&trackInfo, 0, imageBuffer->context()->platformContext(), kHIThemeOrientationNormal); 523 context->drawImageBuffer(imageBuffer.get(), ColorSpaceDeviceRGB, scrollbar->frameRect().location());523 context->drawImageBuffer(imageBuffer.get(), ColorSpaceDeviceRGB, bufferRect.location()); 524 524 } 525 525
Note: See TracChangeset
for help on using the changeset viewer.