Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 530653002: Use page popup pixel readback for calendar-picker-appearance.html (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1589 { 1589 {
1590 ASSERT(popup); 1590 ASSERT(popup);
1591 WebPagePopupImpl* popupImpl = toWebPagePopupImpl(popup); 1591 WebPagePopupImpl* popupImpl = toWebPagePopupImpl(popup);
1592 ASSERT(m_pagePopup.get() == popupImpl); 1592 ASSERT(m_pagePopup.get() == popupImpl);
1593 if (m_pagePopup.get() != popupImpl) 1593 if (m_pagePopup.get() != popupImpl)
1594 return; 1594 return;
1595 m_pagePopup->closePopup(); 1595 m_pagePopup->closePopup();
1596 m_pagePopup = nullptr; 1596 m_pagePopup = nullptr;
1597 } 1597 }
1598 1598
1599 LocalDOMWindow* WebViewImpl::pagePopupWindow()
1600 {
1601 return m_pagePopup ? m_pagePopup->window() : nullptr;
1602 }
1603
1599 Frame* WebViewImpl::focusedCoreFrame() const 1604 Frame* WebViewImpl::focusedCoreFrame() const
1600 { 1605 {
1601 return m_page ? m_page->focusController().focusedOrMainFrame() : 0; 1606 return m_page ? m_page->focusController().focusedOrMainFrame() : 0;
1602 } 1607 }
1603 1608
1604 WebViewImpl* WebViewImpl::fromPage(Page* page) 1609 WebViewImpl* WebViewImpl::fromPage(Page* page)
1605 { 1610 {
1606 if (!page) 1611 if (!page)
1607 return 0; 1612 return 0;
1608 return static_cast<WebViewImpl*>(page->chrome().client().webView()); 1613 return static_cast<WebViewImpl*>(page->chrome().client().webView());
(...skipping 2805 matching lines...) Expand 10 before | Expand all | Expand 10 after
4414 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4419 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4415 4420
4416 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4421 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4417 return false; 4422 return false;
4418 4423
4419 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4424 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4420 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4425 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4421 } 4426 }
4422 4427
4423 } // namespace blink 4428 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698