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

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 14643011: Reset page scale factor to 1.0 on navigation to a new page. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revise, add test. Created 7 years, 7 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 { 1773 {
1774 Document* document = contextDocument(); 1774 Document* document = contextDocument();
1775 if (!document || !document->page()) { 1775 if (!document || !document->page()) {
1776 ec = INVALID_ACCESS_ERR; 1776 ec = INVALID_ACCESS_ERR;
1777 return; 1777 return;
1778 } 1778 }
1779 Page* page = document->page(); 1779 Page* page = document->page();
1780 page->setPageScaleFactor(scaleFactor, IntPoint(x, y)); 1780 page->setPageScaleFactor(scaleFactor, IntPoint(x, y));
1781 } 1781 }
1782 1782
1783 float Internals::pageScaleFactor(ExceptionCode& ec)
1784 {
1785 Document* document = contextDocument();
1786 if (!document || !document->page()) {
1787 ec = INVALID_ACCESS_ERR;
1788 return 1;
1789 }
1790 return document->page()->pageScaleFactor();
1791 }
1792
1783 void Internals::webkitWillEnterFullScreenForElement(Document* document, Element* element) 1793 void Internals::webkitWillEnterFullScreenForElement(Document* document, Element* element)
1784 { 1794 {
1785 if (!document) 1795 if (!document)
1786 return; 1796 return;
1787 document->webkitWillEnterFullScreenForElement(element); 1797 document->webkitWillEnterFullScreenForElement(element);
1788 } 1798 }
1789 1799
1790 void Internals::webkitDidEnterFullScreenForElement(Document* document, Element* element) 1800 void Internals::webkitDidEnterFullScreenForElement(Document* document, Element* element)
1791 { 1801 {
1792 if (!document) 1802 if (!document)
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1997 2007
1998 RenderObject* renderer = select->renderer(); 2008 RenderObject* renderer = select->renderer();
1999 if (!renderer->isMenuList()) 2009 if (!renderer->isMenuList())
2000 return false; 2010 return false;
2001 2011
2002 RenderMenuList* menuList = toRenderMenuList(renderer); 2012 RenderMenuList* menuList = toRenderMenuList(renderer);
2003 return menuList->popupIsVisible(); 2013 return menuList->popupIsVisible();
2004 } 2014 }
2005 2015
2006 } 2016 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698