OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Simon Hausmann <hausmann@kde.org> | 5 * 2000 Simon Hausmann <hausmann@kde.org> |
6 * 2000 Stefan Schimanski <1Stein@gmx.de> | 6 * 2000 Stefan Schimanski <1Stein@gmx.de> |
7 * 2001 George Staikos <staikos@kde.org> | 7 * 2001 George Staikos <staikos@kde.org> |
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 if (RefPtr<Range> nextCharacterRange = makeRange(position, next)) { | 441 if (RefPtr<Range> nextCharacterRange = makeRange(position, next)) { |
442 LayoutRect rect = editor().firstRectForRange(nextCharacterRange.get()); | 442 LayoutRect rect = editor().firstRectForRange(nextCharacterRange.get()); |
443 if (rect.contains(framePoint)) | 443 if (rect.contains(framePoint)) |
444 return nextCharacterRange.release(); | 444 return nextCharacterRange.release(); |
445 } | 445 } |
446 | 446 |
447 return 0; | 447 return 0; |
448 } | 448 } |
449 | 449 |
450 void Frame::createView(const IntSize& viewportSize, const Color& backgroundColor
, bool transparent, | 450 void Frame::createView(const IntSize& viewportSize, const Color& backgroundColor
, bool transparent, |
451 const IntSize& fixedLayoutSize, bool useFixedLayout, ScrollbarMode horizonta
lScrollbarMode, bool horizontalLock, | 451 ScrollbarMode horizontalScrollbarMode, bool horizontalLock, |
452 ScrollbarMode verticalScrollbarMode, bool verticalLock) | 452 ScrollbarMode verticalScrollbarMode, bool verticalLock) |
453 { | 453 { |
454 ASSERT(this); | 454 ASSERT(this); |
455 ASSERT(m_page); | 455 ASSERT(m_page); |
456 | 456 |
457 bool isMainFrame = this == m_page->mainFrame(); | 457 bool isMainFrame = this == m_page->mainFrame(); |
458 | 458 |
459 if (isMainFrame && view()) | 459 if (isMainFrame && view()) |
460 view()->setParentVisible(false); | 460 view()->setParentVisible(false); |
461 | 461 |
462 setView(0); | 462 setView(0); |
463 | 463 |
464 RefPtr<FrameView> frameView; | 464 RefPtr<FrameView> frameView; |
465 if (isMainFrame) { | 465 if (isMainFrame) { |
466 frameView = FrameView::create(this, viewportSize); | 466 frameView = FrameView::create(this, viewportSize); |
467 frameView->setFixedLayoutSize(fixedLayoutSize); | 467 |
468 frameView->setUseFixedLayout(useFixedLayout); | 468 // The layout size is set by WebViewImpl to support @viewport |
| 469 frameView->setLayoutSizeFixedToFrameSize(false); |
469 } else | 470 } else |
470 frameView = FrameView::create(this); | 471 frameView = FrameView::create(this); |
471 | 472 |
472 frameView->setScrollbarModes(horizontalScrollbarMode, verticalScrollbarMode,
horizontalLock, verticalLock); | 473 frameView->setScrollbarModes(horizontalScrollbarMode, verticalScrollbarMode,
horizontalLock, verticalLock); |
473 | 474 |
474 setView(frameView); | 475 setView(frameView); |
475 | 476 |
476 if (backgroundColor.isValid()) | 477 if (backgroundColor.isValid()) |
477 frameView->updateBackgroundRecursively(backgroundColor, transparent); | 478 frameView->updateBackgroundRecursively(backgroundColor, transparent); |
478 | 479 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 if (!m_page) | 695 if (!m_page) |
695 return 0; | 696 return 0; |
696 | 697 |
697 double ratio = m_page->deviceScaleFactor(); | 698 double ratio = m_page->deviceScaleFactor(); |
698 if (RuntimeEnabledFeatures::devicePixelRatioIncludesZoomEnabled()) | 699 if (RuntimeEnabledFeatures::devicePixelRatioIncludesZoomEnabled()) |
699 ratio *= pageZoomFactor(); | 700 ratio *= pageZoomFactor(); |
700 return ratio; | 701 return ratio; |
701 } | 702 } |
702 | 703 |
703 } // namespace WebCore | 704 } // namespace WebCore |
OLD | NEW |