Changeset 55381 in webkit
- Timestamp:
- Mar 1, 2010 2:51:25 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r55379 r55381 1 2010-03-01 Thatcher Ulrich <tulrich@google.com> 2 3 Reviewed by Darin Fisher. 4 5 Fix chromium iframe shims. Add another test case to the 6 iframes-shims test. After r53637, the plugin widget doesn't get 7 moved every paint. This used to hide the bug that if an iframe 8 gets added, the plugin's cutout rectangles don't get updated until 9 a layout happens. 10 https://bugs.webkit.org/show_bug.cgi?id=35184 11 12 * plugins/iframe-shims.html: test case that adds an iframe shim dynamically 13 1 14 2010-03-01 Gavin Barraclough <barraclough@apple.com> 2 15 -
trunk/LayoutTests/plugins/iframe-shims-expected.txt
r48638 r55381 21 21 22 22 23 24 -
trunk/LayoutTests/plugins/iframe-shims.html
r48638 r55381 49 49 return o; 50 50 } 51 52 function appendOverlay(overlayDivZIframe, overlayDivZOverlay, overlayInsideDiv, expectClickable, caseId) 53 { 54 var id = makeIframeDiv(); 55 var root = document.getElementById(caseId); 56 if (overlayDivZIframe) 57 id.style.zIndex = overlayDivZIframe; 58 59 var od = makeOverlayDiv(expectClickable ? 'green' : 'red', caseId); 60 od.style.position = 'absolute'; 61 if (overlayDivZOverlay) 62 od.style.zIndex = overlayDivZOverlay; 63 64 if (overlayInsideDiv) { 65 var parentdiv = document.createElement('div'); 66 if (overlayDivZOverlay) 67 parentdiv.style.zIndex = overlayDivZOverlay; 68 69 parentdiv.style.position = 'absolute'; 70 parentdiv.style.top = '0px'; 71 parentdiv.style.left = '0px'; 72 parentdiv.appendChild(id); 73 parentdiv.appendChild(od); 74 root.appendChild(parentdiv); 75 } else { 76 root.appendChild(id); 77 root.appendChild(od); 78 } 79 }; 51 80 52 81 function addCase(x, y, tags) … … 63 92 root.style.left = x * (width + 40) + 'px'; 64 93 root.style.top = y * (height + 20) + 'px'; 94 root.id = caseId; 65 95 container.appendChild(root); 66 96 … … 103 133 }; 104 134 105 var appendOverlay = function()106 {107 var id = makeIframeDiv();108 if (overlayDivZIframe)109 id.style.zIndex = overlayDivZIframe;110 111 var od = makeOverlayDiv(expectClickable ? 'green' : 'red', caseId);112 od.style.position = 'absolute';113 if (overlayDivZOverlay)114 od.style.zIndex = overlayDivZOverlay;115 116 if (tags.overlayInsideDiv) {117 var parentdiv = document.createElement('div');118 if (overlayDivZOverlay)119 parentdiv.style.zIndex = overlayDivZOverlay;120 121 parentdiv.style.position = 'absolute';122 parentdiv.style.top = '0px';123 parentdiv.style.left = '0px';124 parentdiv.appendChild(id);125 parentdiv.appendChild(od);126 root.appendChild(parentdiv);127 } else {128 root.appendChild(id);129 root.appendChild(od);130 }131 };132 133 135 if (tags.overlayEarlier) { 134 appendOverlay( );136 appendOverlay(overlayDivZIframe, overlayDivZOverlay, tags.overlayInsideDiv, expectClickable, caseId); 135 137 appendPlugin(); 136 138 } else { 137 139 appendPlugin(); 138 appendOverlay(); 140 if (tags.overlayOnTimeout) { 141 setTimeout('appendOverlay('+overlayDivZIframe+', '+overlayDivZOverlay +', ' + tags.overlayInsideDiv + ', ' + expectClickable + ', ' + caseId + ')', 0); 142 } else { 143 appendOverlay(overlayDivZIframe, overlayDivZOverlay, tags.overlayInsideDiv, expectClickable, caseId); 144 } 139 145 } 140 146 } … … 178 184 addCase(1, 3, {'overlayEarlier':1, 'pluginNorelative':1, 'pluginInsideDiv':1, expect:'overlay OVER'}); 179 185 addCase(2, 3, {'pluginNorelative':1, 'pluginInsideDiv':1, expect:'overlay OVER'}); 186 addCase(3, 3, {'pluginLowerz':1, 'overlayOnTimeout':1, expect:'overlay OVER'}); 180 187 181 188 runTest(); -
trunk/WebCore/ChangeLog
r55377 r55381 1 2010-03-01 Thatcher Ulrich <tulrich@google.com> 2 3 Reviewed by Darin Fisher. 4 5 Fix chromium iframe shims. Add another test case to the 6 iframes-shims test. After r53637, the plugin widget doesn't get 7 moved every paint. This used to hide the bug that if an iframe 8 gets added, the plugin's cutout rectangles don't get updated until 9 a layout happens. 10 https://bugs.webkit.org/show_bug.cgi?id=35184 11 12 * platform/Widget.h: 13 (WebCore::Widget::widgetPositionsUpdated): new virtual method 14 widgetPositionsUpdated() to notify widgets when other widgets on 15 the page have been repositioned. 16 * rendering/RenderView.cpp: 17 (WebCore::RenderView::updateWidgetPositions): call widgetPositionsUpdated() on the widgets 18 * rendering/RenderWidget.cpp: 19 (WebCore::RenderWidget::widgetPositionsUpdated): call widgetPositionsUpdated() on the widget 20 * rendering/RenderWidget.h: 21 1 22 2010-03-01 Fridrich Strba <fridrich.strba@bluewin.ch> 2 23 -
trunk/WebCore/platform/Widget.h
r52885 r55381 187 187 virtual void frameRectsChanged() {} 188 188 189 // Notifies this widget that other widgets on the page have been repositioned. 190 virtual void widgetPositionsUpdated() {} 191 189 192 #if PLATFORM(MAC) 190 193 NSView* getOuterView() const; -
trunk/WebCore/rendering/RenderView.cpp
r52757 r55381 542 542 for (RenderWidgetSet::iterator it = m_widgets.begin(); it != end; ++it) 543 543 (*it)->updateWidgetPosition(); 544 for (RenderWidgetSet::iterator it = m_widgets.begin(); it != end; ++it) 545 (*it)->widgetPositionsUpdated(); 544 546 } 545 547 -
trunk/WebCore/rendering/RenderWidget.cpp
r53637 r55381 326 326 } 327 327 328 void RenderWidget::widgetPositionsUpdated() 329 { 330 if (!m_widget) 331 return; 332 m_widget->widgetPositionsUpdated(); 333 } 334 328 335 void RenderWidget::setSelectionState(SelectionState state) 329 336 { -
trunk/WebCore/rendering/RenderWidget.h
r50470 r55381 40 40 41 41 void updateWidgetPosition(); 42 void widgetPositionsUpdated(); 42 43 43 44 void showSubstituteImage(PassRefPtr<Image>); -
trunk/WebKit/chromium/ChangeLog
r55364 r55381 1 2010-03-01 Thatcher Ulrich <tulrich@google.com> 2 3 Reviewed by Darin Fisher. 4 5 Fix chromium iframe shims. Add another test case to the 6 iframes-shims test. After r53637, the plugin widget doesn't get 7 moved every paint. This used to hide the bug that if an iframe 8 gets added, the plugin's cutout rectangles don't get updated until 9 a layout happens. 10 https://bugs.webkit.org/show_bug.cgi?id=35184 11 12 * src/WebPluginContainerImpl.cpp: 13 (WebKit::WebPluginContainerImpl::widgetPositionsUpdated): do reportGeometry() to ensure that 14 the plugin is aware of the positions of cutouts on the page (for iframe shim behavior). 15 * src/WebPluginContainerImpl.h: 16 1 17 2010-02-27 Pavel Feldman <pfeldman@chromium.org> 2 18 -
trunk/WebKit/chromium/src/WebPluginContainerImpl.cpp
r52791 r55381 171 171 } 172 172 173 void WebPluginContainerImpl::widgetPositionsUpdated() 174 { 175 Widget::widgetPositionsUpdated(); 176 reportGeometry(); 177 } 178 173 179 void WebPluginContainerImpl::setParentVisible(bool parentVisible) 174 180 { -
trunk/WebKit/chromium/src/WebPluginContainerImpl.h
r50722 r55381 74 74 virtual void setParentVisible(bool); 75 75 virtual void setParent(WebCore::ScrollView*); 76 virtual void widgetPositionsUpdated(); 76 77 77 78 // WebPluginContainer methods
Note: See TracChangeset
for help on using the changeset viewer.