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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 212 |
213 HashSet<FrameDestructionObserver*>::iterator stop = m_destructionObservers.e
nd(); | 213 HashSet<FrameDestructionObserver*>::iterator stop = m_destructionObservers.e
nd(); |
214 for (HashSet<FrameDestructionObserver*>::iterator it = m_destructionObserver
s.begin(); it != stop; ++it) | 214 for (HashSet<FrameDestructionObserver*>::iterator it = m_destructionObserver
s.begin(); it != stop; ++it) |
215 (*it)->willDetachFrameHost(); | 215 (*it)->willDetachFrameHost(); |
216 | 216 |
217 // FIXME: Page should take care of updating focus/scrolling instead of Frame
. | 217 // FIXME: Page should take care of updating focus/scrolling instead of Frame
. |
218 // FIXME: It's unclear as to why this is called more than once, but it is, | 218 // FIXME: It's unclear as to why this is called more than once, but it is, |
219 // so page() could be null. | 219 // so page() could be null. |
220 if (page() && page()->focusController().focusedFrame() == this) | 220 if (page() && page()->focusController().focusedFrame() == this) |
221 page()->focusController().setFocusedFrame(nullptr); | 221 page()->focusController().setFocusedFrame(nullptr); |
222 | |
223 if (page() && page()->scrollingCoordinator() && m_view) | |
224 page()->scrollingCoordinator()->willDestroyScrollableArea(m_view.get()); | |
225 } | 222 } |
226 | 223 |
227 void LocalFrame::detachFromFrameHost() | 224 void LocalFrame::detachFromFrameHost() |
228 { | 225 { |
229 // We should never be detatching the page during a Layout. | 226 // We should never be detatching the page during a Layout. |
230 RELEASE_ASSERT(!m_view || !m_view->isInPerformLayout()); | 227 RELEASE_ASSERT(!m_view || !m_view->isInPerformLayout()); |
231 m_host = 0; | 228 m_host = 0; |
232 } | 229 } |
233 | 230 |
234 String LocalFrame::selectedText() const | 231 String LocalFrame::selectedText() const |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 view()->setParentVisible(false); | 311 view()->setParentVisible(false); |
315 | 312 |
316 setView(nullptr); | 313 setView(nullptr); |
317 | 314 |
318 RefPtr<FrameView> frameView; | 315 RefPtr<FrameView> frameView; |
319 frameView = FrameView::create(this, viewportSize); | 316 frameView = FrameView::create(this, viewportSize); |
320 | 317 |
321 // The layout size is set by WebViewImpl to support @viewport | 318 // The layout size is set by WebViewImpl to support @viewport |
322 frameView->setLayoutSizeFixedToFrameSize(false); | 319 frameView->setLayoutSizeFixedToFrameSize(false); |
323 | 320 |
324 frameView->setScrollbarModes(horizontalScrollbarMode, verticalScrollbarMode,
horizontalLock, verticalLock); | |
325 | |
326 setView(frameView); | 321 setView(frameView); |
327 | 322 |
328 frameView->updateBackgroundRecursively(backgroundColor, transparent); | 323 frameView->updateBackgroundRecursively(backgroundColor, transparent); |
329 | 324 |
330 frameView->setParentVisible(true); | 325 frameView->setParentVisible(true); |
331 } | 326 } |
332 | 327 |
333 | 328 |
334 void LocalFrame::countObjectsNeedingLayout(unsigned& needsLayoutObjects, unsigne
d& totalObjects, bool& isPartial) | 329 void LocalFrame::countObjectsNeedingLayout(unsigned& needsLayoutObjects, unsigne
d& totalObjects, bool& isPartial) |
335 { | 330 { |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 { | 430 { |
436 if (!m_host) | 431 if (!m_host) |
437 return 0; | 432 return 0; |
438 | 433 |
439 double ratio = m_host->deviceScaleFactor(); | 434 double ratio = m_host->deviceScaleFactor(); |
440 ratio *= pageZoomFactor(); | 435 ratio *= pageZoomFactor(); |
441 return ratio; | 436 return ratio; |
442 } | 437 } |
443 | 438 |
444 } // namespace blink | 439 } // namespace blink |
OLD | NEW |