| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |