| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 m_view = view; | 152 m_view = view; |
| 153 | 153 |
| 154 if (m_view && isMainFrame()) { | 154 if (m_view && isMainFrame()) { |
| 155 if (settings()->pinchVirtualViewportEnabled()) | 155 if (settings()->pinchVirtualViewportEnabled()) |
| 156 m_host->pinchViewport().mainFrameDidChangeSize(); | 156 m_host->pinchViewport().mainFrameDidChangeSize(); |
| 157 else | 157 else |
| 158 m_view->setVisibleContentScaleFactor(page()->pageScaleFactor()); | 158 m_view->setVisibleContentScaleFactor(page()->pageScaleFactor()); |
| 159 } | 159 } |
| 160 } | 160 } |
| 161 | 161 |
| 162 void LocalFrame::sendOrientationChangeEvent() | |
| 163 { | |
| 164 if (!RuntimeEnabledFeatures::orientationEventEnabled() && !RuntimeEnabledFea
tures::screenOrientationEnabled()) | |
| 165 return; | |
| 166 | |
| 167 if (page()->visibilityState() != PageVisibilityStateVisible) | |
| 168 return; | |
| 169 | |
| 170 LocalDOMWindow* window = domWindow(); | |
| 171 if (!window) | |
| 172 return; | |
| 173 window->dispatchEvent(Event::create(EventTypeNames::orientationchange)); | |
| 174 | |
| 175 // Notify subframes. | |
| 176 Vector<RefPtr<LocalFrame> > childFrames; | |
| 177 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi
bling()) { | |
| 178 if (child->isLocalFrame()) | |
| 179 childFrames.append(toLocalFrame(child)); | |
| 180 } | |
| 181 | |
| 182 for (size_t i = 0; i < childFrames.size(); ++i) | |
| 183 childFrames[i]->sendOrientationChangeEvent(); | |
| 184 } | |
| 185 | |
| 186 void LocalFrame::setPrinting(bool printing, const FloatSize& pageSize, const Flo
atSize& originalPageSize, float maximumShrinkRatio) | 162 void LocalFrame::setPrinting(bool printing, const FloatSize& pageSize, const Flo
atSize& originalPageSize, float maximumShrinkRatio) |
| 187 { | 163 { |
| 188 // In setting printing, we should not validate resources already cached for
the document. | 164 // In setting printing, we should not validate resources already cached for
the document. |
| 189 // See https://bugs.webkit.org/show_bug.cgi?id=43704 | 165 // See https://bugs.webkit.org/show_bug.cgi?id=43704 |
| 190 ResourceCacheValidationSuppressor validationSuppressor(document()->fetcher()
); | 166 ResourceCacheValidationSuppressor validationSuppressor(document()->fetcher()
); |
| 191 | 167 |
| 192 document()->setPrinting(printing); | 168 document()->setPrinting(printing); |
| 193 view()->adjustMediaTypeForPrinting(printing); | 169 view()->adjustMediaTypeForPrinting(printing); |
| 194 | 170 |
| 195 document()->styleResolverChanged(); | 171 document()->styleResolverChanged(); |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 LocalFrame* LocalFrame::localFrameRoot() | 621 LocalFrame* LocalFrame::localFrameRoot() |
| 646 { | 622 { |
| 647 LocalFrame* curFrame = this; | 623 LocalFrame* curFrame = this; |
| 648 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i
sLocalFrame()) | 624 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i
sLocalFrame()) |
| 649 curFrame = toLocalFrame(curFrame->tree().parent()); | 625 curFrame = toLocalFrame(curFrame->tree().parent()); |
| 650 | 626 |
| 651 return curFrame; | 627 return curFrame; |
| 652 } | 628 } |
| 653 | 629 |
| 654 } // namespace WebCore | 630 } // namespace WebCore |
| OLD | NEW |