Changeset 225791 in webkit
- Timestamp:
- Dec 12, 2017 11:15:50 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r225790 r225791 1 2017-12-12 Simon Fraser <simon.fraser@apple.com> 2 3 HTML-page with <object type="image/svg+xml" data="foo.svg"> often is blank 4 https://bugs.webkit.org/show_bug.cgi?id=180524 5 <rdar://problem/35920554> 6 7 Reviewed by Antti Koivisto. 8 9 Adjust a test where the new layout is triggering scrollbar creation. 10 11 * fast/dom/iframe-inner-size-scaling-expected.txt: 12 * fast/dom/iframe-inner-size-scaling.html: 13 * fast/dom/iframe-innerWidth-expected.txt: Added. 14 * fast/dom/iframe-innerWidth.html: Added. 15 1 16 2017-12-11 Antoine Quint <graouts@apple.com> 2 17 -
trunk/LayoutTests/fast/dom/iframe-inner-size-scaling-expected.txt
r105512 r225791 7 7 PASS frame.contentWindow.innerHeight is non-zero. 8 8 PASS frame.contentWindow.innerWidth is originalWidth 9 PASS frame.contentWindow.innerHeight is originalHeight 9 PASS frame.contentWindow.innerHeight is originalHeight - scrollbarWidth 10 10 PASS successfullyParsed is true 11 11 -
trunk/LayoutTests/fast/dom/iframe-inner-size-scaling.html
r155265 r225791 1 1 <html> 2 2 <script src="../../resources/js-test-pre.js"></script> 3 <script src="../../resources/ui-helper.js"></script> 3 4 <script> 4 5 description("This tests that innerWidth/innerHeight on an frame window returns the size of the frame itself in CSS pixels, regardless of page scale."); … … 16 17 shouldBeNonZero("frame.contentWindow.innerHeight"); 17 18 shouldBe("frame.contentWindow.innerWidth", "originalWidth"); 18 shouldBe("frame.contentWindow.innerHeight", "originalHeight"); 19 20 scrollbarWidth = UIHelper.isIOS() ? 0 : 15; 21 shouldBe("frame.contentWindow.innerHeight", "originalHeight - scrollbarWidth"); 19 22 finishJSTest(); 20 23 } -
trunk/Source/WebCore/ChangeLog
r225790 r225791 1 2017-12-12 Simon Fraser <simon.fraser@apple.com> 2 3 HTML-page with <object type="image/svg+xml" data="foo.svg"> often is blank 4 https://bugs.webkit.org/show_bug.cgi?id=180524 5 <rdar://problem/35920554> 6 7 Reviewed by Antti Koivisto. 8 9 The test case has script that conditionalizes behavior on whether window.innerWidth/Height 10 are zero during the load event. We didn't force layout in innerWidth/Height, so whether 11 they would zero depended on whether the parent frame had laid out, which was timing-sensitive. 12 13 Fix by triggering enough layout in the parent document so that the FrameView is resized before 14 fetching its dimensions in innerWidth/Height. This causes our behavior to match Chrome and Firefox. 15 16 Test: fast/dom/iframe-innerWidth.html 17 18 * dom/EventDispatcher.cpp: 19 (WebCore::EventDispatcher::dispatchEvent): Add some logging that helped me diagnose this. 20 * page/DOMWindow.cpp: 21 (WebCore::DOMWindow::innerHeight const): 22 (WebCore::DOMWindow::innerWidth const): 23 1 24 2017-12-11 Antoine Quint <graouts@apple.com> 2 25 -
trunk/Source/WebCore/dom/EventDispatcher.cpp
r224459 r225791 35 35 #include "InputEvent.h" 36 36 #include "KeyboardEvent.h" 37 #include "Logging.h" 37 38 #include "MainFrame.h" 38 39 #include "MouseEvent.h" … … 131 132 { 132 133 ASSERT_WITH_SECURITY_IMPLICATION(NoEventDispatchAssertion::InMainThread::isEventDispatchAllowedInSubtree(node)); 134 135 LOG(Events, "EventDispatcher::dispatchEvent %s on node %s", event.type().string().utf8().data(), node.nodeName().utf8().data()); 133 136 134 137 auto protectedNode = makeRef(node); -
trunk/Source/WebCore/page/DOMWindow.cpp
r225656 r225791 63 63 #include "FrameTree.h" 64 64 #include "FrameView.h" 65 #include "HTMLFrameOwnerElement.h"66 65 #include "History.h" 67 66 #include "InspectorInstrumentation.h" … … 1261 1260 return 0; 1262 1261 1262 // Force enough layout in the parent document to ensure that the FrameView has been resized. 1263 if (auto* frameElement = this->frameElement()) 1264 frameElement->document().updateLayoutIfDimensionsOutOfDate(*frameElement, HeightDimensionsCheck); 1265 1263 1266 FrameView* view = m_frame->view(); 1264 1267 if (!view) … … 1272 1275 if (!m_frame) 1273 1276 return 0; 1277 1278 // Force enough layout in the parent document to ensure that the FrameView has been resized. 1279 if (auto* frameElement = this->frameElement()) 1280 frameElement->document().updateLayoutIfDimensionsOutOfDate(*frameElement, WidthDimensionsCheck); 1274 1281 1275 1282 FrameView* view = m_frame->view();
Note: See TracChangeset
for help on using the changeset viewer.