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

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

Issue 219123002: Read the default min-width value from the UA style sheets (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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/html/HTMLMetaElement-in.cpp ('k') | Source/web/PageScaleConstraintsSet.h » ('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 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 935
936 document->updateLayoutIgnorePendingStylesheets(); 936 document->updateLayoutIgnorePendingStylesheets();
937 937
938 Page* page = document->page(); 938 Page* page = document->page();
939 939
940 // Update initial viewport size. 940 // Update initial viewport size.
941 IntSize initialViewportSize(availableWidth, availableHeight); 941 IntSize initialViewportSize(availableWidth, availableHeight);
942 document->page()->mainFrame()->view()->setFrameRect(IntRect(IntPoint::zero() , initialViewportSize)); 942 document->page()->mainFrame()->view()->setFrameRect(IntRect(IntPoint::zero() , initialViewportSize));
943 943
944 ViewportDescription description = page->viewportDescription(); 944 ViewportDescription description = page->viewportDescription();
945 PageScaleConstraints constraints = description.resolve(initialViewportSize); 945 PageScaleConstraints constraints = description.resolve(initialViewportSize, Length());
946 946
947 constraints.fitToContentsWidth(constraints.layoutSize.width(), availableWidt h); 947 constraints.fitToContentsWidth(constraints.layoutSize.width(), availableWidt h);
948 948
949 StringBuilder builder; 949 StringBuilder builder;
950 950
951 builder.appendLiteral("viewport size "); 951 builder.appendLiteral("viewport size ");
952 builder.append(String::number(constraints.layoutSize.width())); 952 builder.append(String::number(constraints.layoutSize.width()));
953 builder.append('x'); 953 builder.append('x');
954 builder.append(String::number(constraints.layoutSize.height())); 954 builder.append(String::number(constraints.layoutSize.height()));
955 955
(...skipping 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after
2452 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma xLength) 2452 String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long ma xLength)
2453 { 2453 {
2454 if (!node) 2454 if (!node)
2455 return String(); 2455 return String();
2456 blink::WebPoint point(x, y); 2456 blink::WebPoint point(x, y);
2457 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo rPoint(static_cast<IntPoint>(point))), maxLength); 2457 SurroundingText surroundingText(VisiblePosition(node->renderer()->positionFo rPoint(static_cast<IntPoint>(point))), maxLength);
2458 return surroundingText.content(); 2458 return surroundingText.content();
2459 } 2459 }
2460 2460
2461 } 2461 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLMetaElement-in.cpp ('k') | Source/web/PageScaleConstraintsSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698