Chromium Code Reviews| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 #include "VisibleUnits.h" | 89 #include "VisibleUnits.h" |
| 90 #include "WebKitFontFamilyNames.h" | 90 #include "WebKitFontFamilyNames.h" |
| 91 #include "XMLNSNames.h" | 91 #include "XMLNSNames.h" |
| 92 #include "XMLNames.h" | 92 #include "XMLNames.h" |
| 93 #include "htmlediting.h" | 93 #include "htmlediting.h" |
| 94 #include "markup.h" | 94 #include "markup.h" |
| 95 #include "npruntime_impl.h" | 95 #include "npruntime_impl.h" |
| 96 #include <wtf/PassOwnPtr.h> | 96 #include <wtf/PassOwnPtr.h> |
| 97 #include <wtf/RefCountedLeakCounter.h> | 97 #include <wtf/RefCountedLeakCounter.h> |
| 98 #include <wtf/StdLibExtras.h> | 98 #include <wtf/StdLibExtras.h> |
| 99 #include <wtf/text/StringStatics.h> | |
| 99 | 100 |
| 100 #include "MathMLNames.h" | 101 #include "MathMLNames.h" |
| 101 #include "SVGNames.h" | 102 #include "SVGNames.h" |
| 102 #include "XLinkNames.h" | 103 #include "XLinkNames.h" |
| 103 | 104 |
| 104 #if ENABLE(SVG) | 105 #if ENABLE(SVG) |
| 105 #include "SVGDocument.h" | 106 #include "SVGDocument.h" |
| 106 #include "SVGDocumentExtensions.h" | 107 #include "SVGDocumentExtensions.h" |
| 107 #endif | 108 #endif |
| 108 | 109 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 130 } | 131 } |
| 131 | 132 |
| 132 static inline float parentTextZoomFactor(Frame* frame) | 133 static inline float parentTextZoomFactor(Frame* frame) |
| 133 { | 134 { |
| 134 Frame* parent = frame->tree()->parent(); | 135 Frame* parent = frame->tree()->parent(); |
| 135 if (!parent) | 136 if (!parent) |
| 136 return 1; | 137 return 1; |
| 137 return parent->textZoomFactor(); | 138 return parent->textZoomFactor(); |
| 138 } | 139 } |
| 139 | 140 |
| 141 void init() | |
|
eseidel
2013/04/10 20:53:50
We should just move this to its own file. WebCore
abarth-chromium
2013/04/10 21:00:51
Yes. Would you mind if I do that in the next CL?
| |
| 142 { | |
| 143 AtomicString::init(); | |
| 144 HTMLNames::init(); | |
| 145 SVGNames::init(); | |
| 146 XLinkNames::init(); | |
| 147 MathMLNames::init(); | |
| 148 XMLNSNames::init(); | |
| 149 XMLNames::init(); | |
| 150 WebKitFontFamilyNames::init(); | |
| 151 MediaFeatureNames::init(); | |
| 152 WTF::StringStatics::init(); | |
| 153 QualifiedName::init(); | |
| 154 } | |
| 155 | |
| 140 inline Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoader Client* frameLoaderClient) | 156 inline Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoader Client* frameLoaderClient) |
| 141 : m_page(page) | 157 : m_page(page) |
| 142 , m_treeNode(this, parentFromOwnerElement(ownerElement)) | 158 , m_treeNode(this, parentFromOwnerElement(ownerElement)) |
| 143 , m_loader(this, frameLoaderClient) | 159 , m_loader(this, frameLoaderClient) |
| 144 , m_navigationScheduler(this) | 160 , m_navigationScheduler(this) |
| 145 , m_ownerElement(ownerElement) | 161 , m_ownerElement(ownerElement) |
| 146 , m_script(this) | 162 , m_script(this) |
| 147 , m_editor(this) | 163 , m_editor(this) |
| 148 , m_selection(this) | 164 , m_selection(this) |
| 149 , m_eventHandler(this) | 165 , m_eventHandler(this) |
| 150 , m_animationController(this) | 166 , m_animationController(this) |
| 151 , m_pageZoomFactor(parentPageZoomFactor(this)) | 167 , m_pageZoomFactor(parentPageZoomFactor(this)) |
| 152 , m_textZoomFactor(parentTextZoomFactor(this)) | 168 , m_textZoomFactor(parentTextZoomFactor(this)) |
| 153 #if ENABLE(ORIENTATION_EVENTS) | 169 #if ENABLE(ORIENTATION_EVENTS) |
| 154 , m_orientation(0) | 170 , m_orientation(0) |
| 155 #endif | 171 #endif |
| 156 , m_inViewSourceMode(false) | 172 , m_inViewSourceMode(false) |
| 157 , m_activeDOMObjectsAndAnimationsSuspendedCount(0) | 173 , m_activeDOMObjectsAndAnimationsSuspendedCount(0) |
| 158 { | 174 { |
| 159 ASSERT(page); | 175 ASSERT(page); |
| 160 AtomicString::init(); | 176 WebCore::init(); |
| 161 HTMLNames::init(); | |
| 162 QualifiedName::init(); | |
| 163 MediaFeatureNames::init(); | |
| 164 SVGNames::init(); | |
| 165 XLinkNames::init(); | |
| 166 MathMLNames::init(); | |
| 167 XMLNSNames::init(); | |
| 168 XMLNames::init(); | |
| 169 WebKitFontFamilyNames::init(); | |
| 170 | 177 |
| 171 if (ownerElement) { | 178 if (ownerElement) { |
| 172 page->incrementSubframeCount(); | 179 page->incrementSubframeCount(); |
| 173 ownerElement->setContentFrame(this); | 180 ownerElement->setContentFrame(this); |
| 174 } | 181 } |
| 175 | 182 |
| 176 #ifndef NDEBUG | 183 #ifndef NDEBUG |
| 177 frameCounter.increment(); | 184 frameCounter.increment(); |
| 178 #endif | 185 #endif |
| 179 | 186 |
| (...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1039 buffer->context()->translate(-paintingRect.x(), -paintingRect.y()); | 1046 buffer->context()->translate(-paintingRect.x(), -paintingRect.y()); |
| 1040 buffer->context()->clip(FloatRect(0, 0, paintingRect.maxX(), paintingRect.ma xY())); | 1047 buffer->context()->clip(FloatRect(0, 0, paintingRect.maxX(), paintingRect.ma xY())); |
| 1041 | 1048 |
| 1042 m_view->paintContents(buffer->context(), paintingRect); | 1049 m_view->paintContents(buffer->context(), paintingRect); |
| 1043 | 1050 |
| 1044 RefPtr<Image> image = buffer->copyImage(); | 1051 RefPtr<Image> image = buffer->copyImage(); |
| 1045 return createDragImageFromImage(image.get()); | 1052 return createDragImageFromImage(image.get()); |
| 1046 } | 1053 } |
| 1047 | 1054 |
| 1048 } // namespace WebCore | 1055 } // namespace WebCore |
| OLD | NEW |