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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 if (RefPtr<Range> nextCharacterRange = makeRange(position, next)) { | 456 if (RefPtr<Range> nextCharacterRange = makeRange(position, next)) { |
457 LayoutRect rect = editor().firstRectForRange(nextCharacterRange.get()); | 457 LayoutRect rect = editor().firstRectForRange(nextCharacterRange.get()); |
458 if (rect.contains(framePoint)) | 458 if (rect.contains(framePoint)) |
459 return nextCharacterRange.release(); | 459 return nextCharacterRange.release(); |
460 } | 460 } |
461 | 461 |
462 return 0; | 462 return 0; |
463 } | 463 } |
464 | 464 |
465 void Frame::createView(const IntSize& viewportSize, const Color& backgroundColor
, bool transparent, | 465 void Frame::createView(const IntSize& viewportSize, const Color& backgroundColor
, bool transparent, |
466 const IntSize& fixedLayoutSize, bool useFixedLayout, ScrollbarMode horizonta
lScrollbarMode, bool horizontalLock, | 466 ScrollbarMode horizontalScrollbarMode, bool horizontalLock, |
467 ScrollbarMode verticalScrollbarMode, bool verticalLock) | 467 ScrollbarMode verticalScrollbarMode, bool verticalLock) |
468 { | 468 { |
469 ASSERT(this); | 469 ASSERT(this); |
470 ASSERT(m_page); | 470 ASSERT(m_page); |
471 | 471 |
472 bool isMainFrame = this == m_page->mainFrame(); | 472 bool isMainFrame = this == m_page->mainFrame(); |
473 | 473 |
474 if (isMainFrame && view()) | 474 if (isMainFrame && view()) |
475 view()->setParentVisible(false); | 475 view()->setParentVisible(false); |
476 | 476 |
477 setView(0); | 477 setView(0); |
478 | 478 |
479 RefPtr<FrameView> frameView; | 479 RefPtr<FrameView> frameView; |
480 if (isMainFrame) { | 480 if (isMainFrame) |
481 frameView = FrameView::create(this, viewportSize); | 481 frameView = FrameView::create(this, viewportSize); |
482 frameView->setFixedLayoutSize(fixedLayoutSize); | 482 else |
483 frameView->setUseFixedLayout(useFixedLayout); | |
484 } else | |
485 frameView = FrameView::create(this); | 483 frameView = FrameView::create(this); |
486 | 484 |
487 frameView->setScrollbarModes(horizontalScrollbarMode, verticalScrollbarMode,
horizontalLock, verticalLock); | 485 frameView->setScrollbarModes(horizontalScrollbarMode, verticalScrollbarMode,
horizontalLock, verticalLock); |
488 | 486 |
489 setView(frameView); | 487 setView(frameView); |
490 | 488 |
491 if (backgroundColor.isValid()) | 489 if (backgroundColor.isValid()) |
492 frameView->updateBackgroundRecursively(backgroundColor, transparent); | 490 frameView->updateBackgroundRecursively(backgroundColor, transparent); |
493 | 491 |
494 if (isMainFrame) | 492 if (isMainFrame) |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 if (!m_page) | 707 if (!m_page) |
710 return 0; | 708 return 0; |
711 | 709 |
712 double ratio = m_page->deviceScaleFactor(); | 710 double ratio = m_page->deviceScaleFactor(); |
713 if (RuntimeEnabledFeatures::devicePixelRatioIncludesZoomEnabled()) | 711 if (RuntimeEnabledFeatures::devicePixelRatioIncludesZoomEnabled()) |
714 ratio *= pageZoomFactor(); | 712 ratio *= pageZoomFactor(); |
715 return ratio; | 713 return ratio; |
716 } | 714 } |
717 | 715 |
718 } // namespace WebCore | 716 } // namespace WebCore |
OLD | NEW |