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

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

Issue 17585006: Remove HTMLDocument.width and height properties (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix device metrics test with Internals API Created 7 years, 6 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
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 if (!s_pagePopupDriver) 735 if (!s_pagePopupDriver)
736 s_pagePopupDriver = MockPagePopupDriver::create(page->mainFrame()).leakP tr(); 736 s_pagePopupDriver = MockPagePopupDriver::create(page->mainFrame()).leakP tr();
737 page->chrome().client()->setPagePopupDriver(s_pagePopupDriver); 737 page->chrome().client()->setPagePopupDriver(s_pagePopupDriver);
738 } 738 }
739 739
740 PassRefPtr<PagePopupController> Internals::pagePopupController() 740 PassRefPtr<PagePopupController> Internals::pagePopupController()
741 { 741 {
742 return s_pagePopupDriver ? s_pagePopupDriver->pagePopupController() : 0; 742 return s_pagePopupDriver ? s_pagePopupDriver->pagePopupController() : 0;
743 } 743 }
744 744
745 PassRefPtr<ClientRect> Internals::unscaledViewportRect(ExceptionCode& ec)
746 {
747 Document* document = contextDocument();
748 if (!document || !document->view()) {
749 ec = INVALID_ACCESS_ERR;
750 return ClientRect::create();
751 }
752
753 return ClientRect::create(document->view()->visibleContentRect());
754 }
755
745 PassRefPtr<ClientRect> Internals::absoluteCaretBounds(ExceptionCode& ec) 756 PassRefPtr<ClientRect> Internals::absoluteCaretBounds(ExceptionCode& ec)
746 { 757 {
747 Document* document = contextDocument(); 758 Document* document = contextDocument();
748 if (!document || !document->frame() || !document->frame()->selection()) { 759 if (!document || !document->frame() || !document->frame()->selection()) {
749 ec = INVALID_ACCESS_ERR; 760 ec = INVALID_ACCESS_ERR;
750 return ClientRect::create(); 761 return ClientRect::create();
751 } 762 }
752 763
753 return ClientRect::create(document->frame()->selection()->absoluteCaretBound s()); 764 return ClientRect::create(document->frame()->selection()->absoluteCaretBound s());
754 } 765 }
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1946 1957
1947 RenderObject* renderer = select->renderer(); 1958 RenderObject* renderer = select->renderer();
1948 if (!renderer->isMenuList()) 1959 if (!renderer->isMenuList())
1949 return false; 1960 return false;
1950 1961
1951 RenderMenuList* menuList = toRenderMenuList(renderer); 1962 RenderMenuList* menuList = toRenderMenuList(renderer);
1952 return menuList->popupIsVisible(); 1963 return menuList->popupIsVisible();
1953 } 1964 }
1954 1965
1955 } 1966 }
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698