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

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

Issue 23742003: Use css-device-adapt constraining for legacy viewport tags. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review issue: one assignent per line/statement Created 7 years, 3 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
« no previous file with comments | « Source/core/page/PageScaleConstraintsSet.cpp ('k') | Source/web/WebViewImpl.cpp » ('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 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 es.throwDOMException(InvalidAccessError); 971 es.throwDOMException(InvalidAccessError);
972 return String(); 972 return String();
973 } 973 }
974 Page* page = document->page(); 974 Page* page = document->page();
975 975
976 // Update initial viewport size. 976 // Update initial viewport size.
977 IntSize initialViewportSize(availableWidth, availableHeight); 977 IntSize initialViewportSize(availableWidth, availableHeight);
978 document->page()->mainFrame()->view()->setFrameRect(IntRect(IntPoint::zero() , initialViewportSize)); 978 document->page()->mainFrame()->view()->setFrameRect(IntRect(IntPoint::zero() , initialViewportSize));
979 979
980 ViewportArguments arguments = page->viewportArguments(); 980 ViewportArguments arguments = page->viewportArguments();
981 PageScaleConstraints constraints = arguments.resolve(initialViewportSize, 98 0 /* defaultLayoutWidthForNonMobilePages */); 981 PageScaleConstraints constraints = arguments.resolve(initialViewportSize);
982 982
983 constraints.fitToContentsWidth(constraints.layoutSize.width(), availableWidt h); 983 constraints.fitToContentsWidth(constraints.layoutSize.width(), availableWidt h);
984 984
985 StringBuilder builder; 985 StringBuilder builder;
986 986
987 builder.appendLiteral("viewport size "); 987 builder.appendLiteral("viewport size ");
988 builder.append(String::number(constraints.layoutSize.width())); 988 builder.append(String::number(constraints.layoutSize.width()));
989 builder.append('x'); 989 builder.append('x');
990 builder.append(String::number(constraints.layoutSize.height())); 990 builder.append(String::number(constraints.layoutSize.height()));
991 991
(...skipping 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after
2211 return false; 2211 return false;
2212 sharedContext->getExtensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CON TEXT_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); 2212 sharedContext->getExtensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CON TEXT_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB);
2213 // To prevent tests that call loseSharedGraphicsContext3D from being 2213 // To prevent tests that call loseSharedGraphicsContext3D from being
2214 // flaky, we call finish so that the context is guaranteed to be lost 2214 // flaky, we call finish so that the context is guaranteed to be lost
2215 // synchronously (i.e. before returning). 2215 // synchronously (i.e. before returning).
2216 sharedContext->finish(); 2216 sharedContext->finish();
2217 return true; 2217 return true;
2218 } 2218 }
2219 2219
2220 } 2220 }
OLDNEW
« no previous file with comments | « Source/core/page/PageScaleConstraintsSet.cpp ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698