• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/WebKit2-7600.1.25/WebProcess/WebPage/ios/

Lines Matching +refs:frame +refs:width

136     float oldWidth = m_viewportConfiguration.viewportArguments().width;
145 if (oldWidth != viewportArguments.width)
146 send(Messages::WebPageProxy::ViewportMetaTagWidthDidChange(viewportArguments.width));
173 // When the content size changes, we keep the same relative horizontal content width in view, otherwise we would
175 double widthToKeepInView = visibleHorizontalFraction * newContentSize.width();
186 float relativeHorizontalPosition = oldContentCenter.x() / oldContentSize.width();
188 return FloatPoint(relativeHorizontalPosition * newContentSize.width(), relativeVerticalPosition * newContentSize.height());
193 double overscaledWidth = exposedRect.width();
194 double missingHorizonalMargin = exposedRect.width() * exposedRectScale / newScale - overscaledWidth;
199 return FloatRect(exposedRect.x() - missingHorizonalMargin / 2, exposedRect.y() - missingVerticalMargin / 2, exposedRect.width() + missingHorizonalMargin, exposedRect.height() + missingVerticalMargin);
227 double visibleHorizontalFraction = static_cast<float>(historyItem.unobscuredContentRect().width()) / oldContentSize.width();
229 double newScale = scaleAfterViewportWidthChange(historyItem.pageScaleFactor(), !historyItem.scaleIsInitial(), m_viewportConfiguration, currentMinimumLayoutSizeInScrollViewCoordinates.width(), newContentSize, oldContentSize, visibleHorizontalFraction);
423 Frame& frame = m_page->focusController().focusedOrMainFrame();
424 if (!frame.editor().ignoreCompositionSelectionChange() && (frame.editor().hasComposition() || !frame.selection().selection().isNone()))
520 if (!node->document().frame()->isMainFrame()) {
521 FrameView* view = node->document().frame()->view();
667 static FloatQuad innerFrameQuad(Frame* frame, Node* assistedNode)
669 frame->document()->updateLayoutIgnorePendingStylesheets();
683 boundingBox.setWidth(boundingBox.width() - style.borderLeftWidth() - style.borderRightWidth());
689 static IntPoint constrainPoint(const IntPoint& point, Frame* frame, Node* assistedNode)
692 IntRect innerFrame = innerFrameQuad(frame, assistedNode).enclosingBoundingBox();
750 if (boundingRectInScrollViewCoordinates.width() > m_blockSelectionDesiredSize.width() && boundingRectInScrollViewCoordinates.height() > m_blockSelectionDesiredSize.height())
763 if (boundingRectInScrollViewCoordinates.width() > m_blockSelectionDesiredSize.width() && boundingRectInScrollViewCoordinates.height() > m_blockSelectionDesiredSize.height())
822 Frame& frame = m_page->focusController().focusedOrMainFrame();
823 IntPoint adjustedPoint(frame.view()->rootViewToContents(point));
825 IntPoint constrainedPoint = m_assistedNode ? constrainPoint(adjustedPoint, &frame, m_assistedNode.get()) : adjustedPoint;
826 VisiblePosition position = frame.visiblePositionForPoint(constrainedPoint);
837 if (!frame.editor().hasComposition())
839 RefPtr<Range> markedRange = frame.editor().compositionRange();
845 flags = distanceBetweenPositions(markedRange->startPosition(), frame.selection().selection().start()) != distanceBetweenPositions(markedRange->startPosition(), position) ? PhraseBoundaryChanged : None;
848 range = Range::create(*frame.document(), position, position);
879 range = Range::create(*frame.document(), result, result);
885 range = Range::create(*frame.document(), position, position);
894 m_currentWordRange = Range::create(*frame.document(), range->startPosition(), range->endPosition());
897 range = Range::create(*frame.document(), m_currentWordRange->startPosition(), m_currentWordRange->endPosition());
918 range = Range::create(*frame.document(), position, position);
933 range = Range::create(*frame.document(), position, position);
953 frame.selection().setSelectedRange(range.get(), position.affinity(), true);
958 static PassRefPtr<Range> rangeForPosition(Frame* frame, const VisiblePosition& position, bool baseIsStart)
964 VisiblePosition selectionStart = frame->selection().selection().visibleStart();
971 range = Range::create(*frame->document(), selectionStart, result);
973 VisiblePosition selectionEnd = frame->selection().selection().visibleEnd();
980 range = Range::create(*frame->document(), result, selectionEnd);
986 static PassRefPtr<Range> rangeAtWordBoundaryForPosition(Frame* frame, const VisiblePosition& position, bool baseIsStart, SelectionDirection direction)
990 VisiblePosition base = baseIsStart ? frame->selection().selection().visibleStart() : frame->selection().selection().visibleEnd();
991 VisiblePosition extent = baseIsStart ? frame->selection().selection().visibleEnd() : frame->selection().selection().visibleStart();
1011 return (base < extent) ? Range::create(*frame->document(), base, extent) : Range::create(*frame->document(), extent, base);
1033 return (base < extent) ? Range::create(*frame->document(), base, extent) : Range::create(*frame->document(), extent, base);
1057 float xOriginShiftRatio = abs(first.x() - second.x())/std::min(first.width(), second.width());
1060 float widthRatio = std::min(first.width() / second.width(), second.width() / first.width());
1092 return IntPoint(box.x() + box.width() / 2, box.y());
1096 return IntPoint(box.x() + box.width() / 2, box.maxY());
1163 isBetterChoice = (copyRect.width() > currentBox.width());
1178 isBetterChoice = (copyRect.width() < bestRect.width());
1214 maxDistance = currentBox.width();
1233 shrankDistance = abs(currentBox.width() - bestRect.width());
1282 isBetterChoice = (copyRect.width() > bestRect.width());
1295 isBetterChoice = (copyRect.width() > bestRect.width());
1326 Frame& frame = m_page->focusController().focusedOrMainFrame();
1327 RefPtr<Range> currentRange = m_currentBlockSelection ? m_currentBlockSelection.get() : frame.selection().selection().toNormalizedRange();
1406 Frame& frame = m_page->focusController().focusedOrMainFrame();
1407 RefPtr<Range> currentRange = m_currentBlockSelection ? m_currentBlockSelection.get() : frame.selection().selection().toNormalizedRange();
1412 frame.selection().setSelectedRange(newRange.get(), VP_DEFAULT_AFFINITY, true);
1421 Frame& frame = m_page->focusController().focusedOrMainFrame();
1422 IntPoint adjustedPoint = frame.view()->rootViewToContents(point);
1452 Frame& frame = m_page->focusController().focusedOrMainFrame();
1453 VisiblePosition position = frame.visiblePositionForPoint(frame.view()->rootViewToContents(point));
1468 if (frame.selection().selection().isContentEditable()) {
1471 range = Range::create(*frame.document(), result, result);
1473 range = rangeForPosition(&frame, position, baseIsStart);
1477 range = rangeAtWordBoundaryForPosition(&frame, position, baseIsStart, DirectionForward);
1481 range = rangeAtWordBoundaryForPosition(&frame, position, baseIsStart, DirectionBackward);
1485 range = rangeForPosition(&frame, position, baseIsStart);
1489 frame.selection().setSelectedRange(range.get(), position.affinity(), true);
1496 Frame& frame = m_page->focusController().focusedOrMainFrame();
1497 VisiblePosition fromPosition = frame.visiblePositionForPoint(frame.view()->rootViewToContents(from));
1498 VisiblePosition toPosition = frame.visiblePositionForPoint(frame.view()->rootViewToContents(to));
1502 range = Range::create(*frame.document(), fromPosition, toPosition);
1504 range = Range::create(*frame.document(), toPosition, fromPosition);
1505 frame.selection().setSelectedRange(range.get(), fromPosition.affinity(), true);
1514 Frame& frame = m_page->focusController().focusedOrMainFrame();
1516 if (granularity != WordGranularity || !frame.selection().isCaret())
1519 VisiblePosition position = frame.selection().selection().start();
1520 frame.selection().setSelectedRange(wordRangeFromPosition(position).get(), position.affinity(), true);
1525 Frame& frame = m_page->focusController().focusedOrMainFrame();
1526 if (!frame.selection().isCaret())
1529 VisiblePosition position = frame.selection().selection().start();
1532 frame.selection().setSelectedRange(Range::create(*frame.document(), startPosition, position).get(), position.affinity(), true);
1537 Frame& frame = m_page->focusController().focusedOrMainFrame();
1539 VisiblePosition startPosition = frame.selection().selection().end();
1550 frame.selection().setSelectedRange(Range::create(*frame.document(), position, position).get(), position.affinity(), true);
1564 Frame& frame = m_page->focusController().focusedOrMainFrame();
1565 VisiblePosition startPosition = frame.selection().selection().start();
1566 VisiblePosition endPosition = frame.selection().selection().end();
1570 if (frame.selection().isRange())
1571 selectedText = plainTextReplacingNoBreakSpace(frame.selection().selection().toNormalizedRange().get());
1584 contextBefore = plainTextReplacingNoBreakSpace(Range::create(*frame.document(), lastPosition, startPosition).get());
1598 contextAfter = plainTextReplacingNoBreakSpace(Range::create(*frame.document(), endPosition, lastPosition).get());
1606 Frame& frame = m_page->focusController().focusedOrMainFrame();
1607 RefPtr<Range> wordRange = frame.selection().isCaret() ? wordRangeFromPosition(frame.selection().selection().start()) : frame.selection().toNormalizedRange();
1611 frame.editor().setIgnoreCompositionSelectionChange(true);
1612 frame.selection().setSelectedRange(wordRange.get(), UPSTREAM, true);
1613 frame.editor().insertText(newText, 0);
1614 frame.editor().setIgnoreCompositionSelectionChange(false);
1619 Frame& frame = m_page->focusController().focusedOrMainFrame();
1620 if (frame.selection().isNone())
1623 if (frame.selection().isRange()) {
1624 frame.editor().deleteSelectionWithSmartDelete(false);
1627 VisiblePosition position = frame.selection().selection().start();
1631 position = startOfDocument(static_cast<Node*>(frame.document()->documentElement()));
1632 RefPtr<Range> range = Range::create(*frame.document(), position, frame.selection().selection().start());
1638 frame.editor().setIgnoreCompositionSelectionChange(true);
1639 frame.selection().setSelectedRange(range.get(), UPSTREAM, true);
1640 frame.editor().insertText(newText, 0);
1641 frame.editor().setIgnoreCompositionSelectionChange(false);
1646 Frame& frame = m_page->focusController().focusedOrMainFrame();
1647 if (!frame.selection().isCaret()) {
1652 VisiblePosition position = frame.selection().selection().start();
1666 range = Range::create(*frame.document(), wordRangeFromPosition(position)->startPosition(), range->endPosition());
1677 convertSelectionRectsToRootView(frame.view(), selectionRects);
1683 if (const SimpleFontData* fontData = frame.editor().fontForSelection(multipleFonts))
1717 Frame& frame = m_page->focusController().focusedOrMainFrame();
1718 if (!frame.selection().isCaret())
1720 VisiblePosition position = frame.selection().selection().start();
1728 position = startOfDocument(static_cast<Node*>(frame.document()->documentElement()));
1729 range = Range::create(*frame.document(), position, frame.selection().selection().start());
1736 if (position.isNotNull() && position >= frame.selection().selection().start())
1739 range = Range::create(*frame.document(), position, frame.selection().selection().start());
1749 frame.selection().setSelectedRange(range.get(), UPSTREAM, true);
1751 frame.editor().insertText(correction, 0);
1753 frame.editor().deleteWithDirection(DirectionBackward, CharacterGranularity, false, true);
1757 static void computeAutocorrectionContext(Frame& frame, String& contextBefore, String& markedText, String& selectedText, String& contextAfter, uint64_t& location, uint64_t& length)
1760 VisiblePosition startPosition = frame.selection().selection().start();
1761 VisiblePosition endPosition = frame.selection().selection().end();
1768 if (frame.selection().isRange())
1769 selectedText = plainTextReplacingNoBreakSpace(frame.selection().selection().toNormalizedRange().get());
1771 if (frame.editor().hasComposition()) {
1772 range = Range::create(*frame.document(), frame.editor().compositionRange()->startPosition(), startPosition);
1776 range = Range::create(*frame.document(), endPosition, frame.editor().compositionRange()->endPosition());
1796 String currentWord = plainTextReplacingNoBreakSpace(Range::create(*frame.document(), previousPosition, currentPosition).get());
1803 contextBefore = plainTextReplacingNoBreakSpace(Range::create(*frame.document(), currentPosition, startPosition).get());
1814 contextAfter = plainTextReplacingNoBreakSpace(Range::create(*frame.document(), endPosition, nextPosition).get());
1854 Frame& frame = m_page->focusController().focusedOrMainFrame();
1855 if (frame.editor().hasComposition()) {
1858 FrameView& view = *frame.view();
1860 IntPoint constrainedPoint = m_assistedNode ? constrainPoint(adjustedPoint, &frame, m_assistedNode.get()) : adjustedPoint;
1861 VisiblePosition position = frame.visiblePositionForPoint(constrainedPoint);
1863 RefPtr<Range> compositionRange = frame.editor().compositionRange();
1869 float deltaX = abs(caretRect.x() + (caretRect.width() / 2) - point.x());
1954 m_interactionNode->document().frame()->editor().writeImageToPasteboard(*Pasteboard::createForCopyAndPaste(), *element, toRenderImage(element->renderer())->cachedImage()->url(), String());
1956 m_interactionNode->document().frame()->editor().copyURL(linkElement->document().completeURL(stripLeadingAndTrailingHTMLSpaces(linkElement->getAttribute(HTMLNames::hrefAttr))), linkElement->textContent());
1958 m_interactionNode->document().frame()->editor().copyURL(element->document().completeURL(stripLeadingAndTrailingHTMLSpaces(element->getAttribute(HTMLNames::hrefAttr))), element->textContent());
2152 m_formClient->willBeginInputSession(this, toElement(node), WebFrame::fromCoreFrame(*node->document().frame()), userData);
2207 if (oldSize.width() == newSize.width())
2210 for (Frame* frame = &m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
2211 Document* document = frame->document();
2235 visibleHorizontalFraction = frameView.unobscuredContentSize().width() / oldContentSize.width();
2247 FrameView& containingView = *node->document().frame()->view();
2249 relativeHorizontalPositionInNodeAtCenter = (unobscuredContentRectCenter.x() - boundingBox.x()) / boundingBox.width();
2269 double scale = scaleAfterViewportWidthChange(targetScale, m_userHasChangedPageScaleFactor, m_viewportConfiguration, targetUnobscuredRectInScrollViewCoordinates.width(), newContentSize, oldContentSize, visibleHorizontalFraction);
2280 double newUnobscuredRectWidth = targetUnobscuredRect.width() * scaleDifference;
2282 double newUnobscuredRectX = targetUnobscuredRect.x() - (newUnobscuredRectWidth - targetUnobscuredRect.width()) / 2;
2299 newUnobscuredContentRect.setWidth(std::min(static_cast<float>(newContentSize.width()), newUnobscuredContentRect.width()));
2314 FrameView& containingView = *oldNodeAtCenter->document().frame()->view();
2316 newRelativeContentCenter = FloatPoint(newBoundingBox.x() + relativeHorizontalPositionInNodeAtCenter * newBoundingBox.width(), newBoundingBox.y() + relativeVerticalPositionInNodeAtCenter * newBoundingBox.height());
2338 bool likelyResponsiveDesignViewport = newLayoutSize.width() == minimumLayoutSize.width() && withinEpsilon(scale, 1);
2339 bool contentBleedsOutsideLayoutWidth = newContentSize.width() > newLayoutSize.width();
2343 // to have content "bleeding" outside of the minimal layout width, usually from an image or table larger than expected.
2344 // In those cases, the design usually does not adapt to the new width and remain at the newLayoutSize except for the
2353 if (newUnobscuredContentRect.maxX() > newContentSize.width())
2354 horizontalAdjustment -= newUnobscuredContentRect.maxX() - newContentSize.width();
2394 void WebPage::resetViewportDefaultConfiguration(WebFrame* frame)
2401 if (!frame) {
2406 Document* document = frame->coreFrame()->document();