Changeset 77253 in webkit
- Timestamp:
- Feb 1, 2011 9:09:26 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r77250 r77253 1 2011-02-01 Balazs Kelemen <kbalazs@webkit.org> 2 3 Reviewed by Andreas Kling. 4 5 [Qt][WK2] Add a way to use shared process model in MiniBrowser 6 https://bugs.webkit.org/show_bug.cgi?id=53090 7 8 * MiniBrowser/qt/BrowserView.cpp: 9 (BrowserView::BrowserView): Removed the m_context member. 10 From now the context is guaranteed to be non-null and we 11 don't need to store that in the object. 12 * MiniBrowser/qt/BrowserView.h: 13 * MiniBrowser/qt/BrowserWindow.cpp: 14 Added static bool to determine that new windows need to be 15 created with their own context or not. Use the same context 16 and web process by default to be inilne with the other ports. 17 (BrowserWindow::BrowserWindow): 18 (BrowserWindow::newWindow): 19 * MiniBrowser/qt/BrowserWindow.h: 20 * MiniBrowser/qt/main.cpp: 21 (main): Added command line switch to be able to use the 22 non-shared process model. Simplify the handling of the command line 23 switches a little bit. 24 1 25 2011-02-01 Zoltan Horvath <zoltan@webkit.org> 2 26 -
trunk/Tools/MiniBrowser/qt/BrowserView.cpp
r75373 r77253 34 34 : QGraphicsView(parent) 35 35 , m_item(0) 36 , m_context(context ? context : new QWKContext(this))37 36 { 38 m_item = new QGraphicsWKView( m_context, backingStoreType, 0);37 m_item = new QGraphicsWKView(context, backingStoreType, 0); 39 38 setScene(new QGraphicsScene(this)); 40 39 scene()->addItem(m_item); -
trunk/Tools/MiniBrowser/qt/BrowserView.h
r75373 r77253 49 49 private: 50 50 QGraphicsWKView* m_item; 51 QWKContext* m_context;52 51 }; 53 52 -
trunk/Tools/MiniBrowser/qt/BrowserWindow.cpp
r77250 r77253 38 38 39 39 QGraphicsWKView::BackingStoreType BrowserWindow::backingStoreTypeForNewWindow = QGraphicsWKView::Simple; 40 bool BrowserWindow::useSeparateWebProcessPerWindow = false; 40 41 41 42 QVector<qreal> BrowserWindow::m_zoomLevels; … … 44 45 : m_isZoomTextOnly(false) 45 46 , m_currentZoom(1) 47 , m_context(context) 46 48 , m_browser(new BrowserView(backingStoreTypeForNewWindow, context)) 47 49 { … … 142 144 BrowserWindow* BrowserWindow::newWindow(const QString& url) 143 145 { 144 BrowserWindow* window = new BrowserWindow; 146 BrowserWindow* window; 147 if (useSeparateWebProcessPerWindow) { 148 QWKContext* context = new QWKContext(); 149 window = new BrowserWindow(context); 150 context->setParent(window); 151 } else 152 window = new BrowserWindow(m_context); 153 145 154 window->load(url); 146 155 return window; -
trunk/Tools/MiniBrowser/qt/BrowserWindow.h
r77250 r77253 39 39 40 40 public: 41 BrowserWindow(QWKContext* = 0);41 BrowserWindow(QWKContext*); 42 42 ~BrowserWindow(); 43 43 void load(const QString& url); … … 46 46 47 47 static QGraphicsWKView::BackingStoreType backingStoreTypeForNewWindow; 48 static bool useSeparateWebProcessPerWindow; 48 49 49 50 public slots: … … 84 85 qreal m_currentZoom; 85 86 87 QWKContext* m_context; 86 88 BrowserView* m_browser; 87 89 QLineEdit* m_addressBar; -
trunk/Tools/MiniBrowser/qt/main.cpp
r75124 r77253 39 39 args.removeAt(0); 40 40 41 QGraphicsWKView::BackingStoreType backingStoreTypeToUse = QGraphicsWKView::Simple;42 41 int indexOfTiledOption; 43 if ((indexOfTiledOption = args.indexOf(Q RegExp(QLatin1String("-tiled")))) != -1) {44 backingStoreTypeToUse= QGraphicsWKView::Tiled;42 if ((indexOfTiledOption = args.indexOf(QString::fromLatin1("-tiled"))) != -1) { 43 BrowserWindow::backingStoreTypeForNewWindow = QGraphicsWKView::Tiled; 45 44 args.removeAt(indexOfTiledOption); 45 } 46 47 int indexOfSeparateWebProcessOption; 48 if ((indexOfSeparateWebProcessOption = args.indexOf(QString::fromLatin1("-separate-web-process-per-window"))) != -1) { 49 BrowserWindow::useSeparateWebProcessPerWindow = true; 50 args.removeAt(indexOfSeparateWebProcessOption); 46 51 } 47 52 … … 54 59 } 55 60 56 BrowserWindow::backingStoreTypeForNewWindow = backingStoreTypeToUse; 57 BrowserWindow* window = new BrowserWindow; 61 QWKContext* context = new QWKContext; 62 BrowserWindow* window = new BrowserWindow(context); 63 if (BrowserWindow::useSeparateWebProcessPerWindow) 64 context->setParent(window); 65 58 66 window->load(args[0]); 59 67
Note: See TracChangeset
for help on using the changeset viewer.