Changeset 154272 in webkit
- Timestamp:
- Aug 19, 2013 3:56:27 AM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 54 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r154271 r154272 1 2013-08-19 Andreas Kling <akling@apple.com> 2 3 <https://webkit.org/b/120000> Chrome::client() should return a reference. 4 5 Reviewed by Antti Koivisto. 6 7 Chrome::m_client should never be null. 8 1 9 2013-08-19 Antti Koivisto <antti@apple.com> 2 10 -
trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.cpp
r153927 r154272 221 221 Document* document = toDocument(m_scriptExecutionContext); 222 222 if (Page* page = document->page()) 223 page->chrome().client() ->exceededDatabaseQuota(document->frame(), name, details);223 page->chrome().client().exceededDatabaseQuota(document->frame(), name, details); 224 224 return; 225 225 } -
trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
r154239 r154272 1541 1541 // If we have an empty chrome client (like SVG) then we should use the page 1542 1542 // of the scroll view parent to help us get to the screen rect. 1543 if (parent && page && page->chrome().client() ->isEmptyChromeClient())1543 if (parent && page && page->chrome().client().isEmptyChromeClient()) 1544 1544 page = parent->page(); 1545 1545 … … 3090 3090 Page* page = m_object->page(); 3091 3091 if (page && frameView) { 3092 ChromeClient * client = page->chrome().client();3093 c lient->focus();3092 ChromeClient& chromeClient = page->chrome().client(); 3093 chromeClient.focus(); 3094 3094 if (frameView->platformWidget()) 3095 c lient->makeFirstResponder(frameView->platformWidget());3095 chromeClient.makeFirstResponder(frameView->platformWidget()); 3096 3096 else 3097 c lient->makeFirstResponder();3097 chromeClient.makeFirstResponder(); 3098 3098 } 3099 3099 } -
trunk/Source/WebCore/accessibility/win/AXObjectCacheWin.cpp
r152065 r154272 143 143 144 144 if (notification == AXLoadingStarted) 145 page->chrome().client() ->AXStartFrameLoad();145 page->chrome().client().AXStartFrameLoad(); 146 146 else if (notification == AXLoadingFinished) 147 page->chrome().client() ->AXFinishFrameLoad();147 page->chrome().client().AXFinishFrameLoad(); 148 148 } 149 149 -
trunk/Source/WebCore/css/CSSDefaultStyleSheets.cpp
r152814 r154272 204 204 205 205 if (!plugInsStyleSheet && (element->hasTagName(objectTag) || element->hasTagName(embedTag))) { 206 String plugInsRules = RenderTheme::themeForPage(element->document()->page())->extraPlugInsStyleSheet() + element->document()->page()->chrome().client() ->plugInExtraStyleSheet();206 String plugInsRules = RenderTheme::themeForPage(element->document()->page())->extraPlugInsStyleSheet() + element->document()->page()->chrome().client().plugInExtraStyleSheet(); 207 207 if (plugInsRules.isEmpty()) 208 208 plugInsRules = String(plugInsUserAgentStyleSheet, sizeof(plugInsUserAgentStyleSheet)); -
trunk/Source/WebCore/dom/Document.cpp
r154264 r154272 4982 4982 break; 4983 4983 4984 if (!page()->chrome().client() ->supportsFullScreenForElement(element, flags & Element::ALLOW_KEYBOARD_INPUT)) {4984 if (!page()->chrome().client().supportsFullScreenForElement(element, flags & Element::ALLOW_KEYBOARD_INPUT)) { 4985 4985 // The new full screen API does not accept a "flags" parameter, so fall back to disallowing 4986 4986 // keyboard input if the chrome client refuses to allow keyboard input. 4987 4987 if (!inLegacyMozillaMode && flags & Element::ALLOW_KEYBOARD_INPUT) { 4988 4988 flags &= ~Element::ALLOW_KEYBOARD_INPUT; 4989 if (!page()->chrome().client() ->supportsFullScreenForElement(element, false))4989 if (!page()->chrome().client().supportsFullScreenForElement(element, false)) 4990 4990 break; 4991 4991 } else … … 5042 5042 // 6. Optionally, perform some animation. 5043 5043 m_areKeysEnabledInFullScreen = flags & Element::ALLOW_KEYBOARD_INPUT; 5044 page()->chrome().client() ->enterFullScreenForElement(element);5044 page()->chrome().client().enterFullScreenForElement(element); 5045 5045 5046 5046 // 7. Optionally, display a message indicating how the user can exit displaying the context object fullscreen. … … 5133 5133 // full screen stack. 5134 5134 if (!newTop) { 5135 page()->chrome().client() ->exitFullScreenForElement(m_fullScreenElement.get());5135 page()->chrome().client().exitFullScreenForElement(m_fullScreenElement.get()); 5136 5136 return; 5137 5137 } 5138 5138 5139 5139 // Otherwise, notify the chrome of the new full screen element. 5140 page()->chrome().client() ->enterFullScreenForElement(newTop);5140 page()->chrome().client().enterFullScreenForElement(newTop); 5141 5141 } 5142 5142 … … 5263 5263 // This notification can come in after the page has been destroyed. 5264 5264 if (page()) 5265 page()->chrome().client() ->fullScreenRendererChanged(m_fullScreenRenderer);5265 page()->chrome().client().fullScreenRendererChanged(m_fullScreenRenderer); 5266 5266 } 5267 5267 … … 5271 5271 5272 5272 if (page()) 5273 page()->chrome().client() ->fullScreenRendererChanged(0);5273 page()->chrome().client().fullScreenRendererChanged(0); 5274 5274 } 5275 5275 … … 5554 5554 #endif 5555 5555 if (m_touchEventTargets->size() == 1) 5556 page->chrome().client() ->needTouchEvents(true);5556 page->chrome().client().needTouchEvents(true); 5557 5557 } 5558 5558 #else … … 5586 5586 return; 5587 5587 } 5588 page->chrome().client() ->needTouchEvents(false);5588 page->chrome().client().needTouchEvents(false); 5589 5589 #else 5590 5590 UNUSED_PARAM(handler); … … 5943 5943 void Document::didAssociateFormControl(Element* element) 5944 5944 { 5945 if (!frame() || !frame()->page() || !frame()->page()->chrome().client() ->shouldNotifyOnFormChanges())5945 if (!frame() || !frame()->page() || !frame()->page()->chrome().client().shouldNotifyOnFormChanges()) 5946 5946 return; 5947 5947 m_associatedFormControls.add(element); … … 5959 5959 copyToVector(m_associatedFormControls, associatedFormControls); 5960 5960 5961 frame()->page()->chrome().client() ->didAssociateFormControls(associatedFormControls);5961 frame()->page()->chrome().client().didAssociateFormControls(associatedFormControls); 5962 5962 m_associatedFormControls.clear(); 5963 5963 } … … 5969 5969 5970 5970 // Use the JS file provided by the Chrome client, or fallback to the default one. 5971 String jsString = page()->chrome().client() ->plugInExtraScript();5971 String jsString = page()->chrome().client().plugInExtraScript(); 5972 5972 if (!jsString) 5973 5973 jsString = plugInsJavaScript; -
trunk/Source/WebCore/dom/Element.cpp
r154257 r154272 475 475 // platform supports immediate invalidations on the ChromeClient, so bail if 476 476 // that isn't supported. 477 if (!document()->page()->chrome().client() ->supportsImmediateInvalidation())477 if (!document()->page()->chrome().client().supportsImmediateInvalidation()) 478 478 return; 479 479 … … 2014 2014 { 2015 2015 if (document()->page()) 2016 document()->page()->chrome().client() ->elementDidFocus(this);2016 document()->page()->chrome().client().elementDidFocus(this); 2017 2017 2018 2018 RefPtr<FocusEvent> event = FocusEvent::create(eventNames().focusEvent, false, false, document()->defaultView(), 0, oldFocusedElement); … … 2023 2023 { 2024 2024 if (document()->page()) 2025 document()->page()->chrome().client() ->elementDidBlur(this);2025 document()->page()->chrome().client().elementDidBlur(this); 2026 2026 2027 2027 RefPtr<FocusEvent> event = FocusEvent::create(eventNames().blurEvent, false, false, document()->defaultView(), 0, newFocusedElement); -
trunk/Source/WebCore/history/CachedFrame.cpp
r154192 r154272 144 144 #if ENABLE(TOUCH_EVENTS) 145 145 if (m_document->hasTouchEventHandlers()) 146 m_document->page()->chrome().client() ->needTouchEvents(true);146 m_document->page()->chrome().client().needTouchEvents(true); 147 147 #endif 148 148 -
trunk/Source/WebCore/html/HTMLFormControlElementWithState.cpp
r150946 r154272 72 72 73 73 if (Page* page = frame->page()) 74 page->chrome().client() ->formStateDidChange(this);74 page->chrome().client().formStateDidChange(this); 75 75 } 76 76 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r154254 r154272 1685 1685 return; 1686 1686 1687 ChromeClient * client = page->chrome().client();1687 ChromeClient& chromeClient = page->chrome().client(); 1688 1688 1689 1689 if (!succeeded) { 1690 c lient->logDiagnosticMessage(DiagnosticLoggingKeys::mediaLoadingFailedKey(), errorMessage, DiagnosticLoggingKeys::failKey());1691 return; 1692 } 1693 1694 c lient->logDiagnosticMessage(DiagnosticLoggingKeys::mediaLoadedKey(), mediaEngine, DiagnosticLoggingKeys::noopKey());1690 chromeClient.logDiagnosticMessage(DiagnosticLoggingKeys::mediaLoadingFailedKey(), errorMessage, DiagnosticLoggingKeys::failKey()); 1691 return; 1692 } 1693 1694 chromeClient.logDiagnosticMessage(DiagnosticLoggingKeys::mediaLoadedKey(), mediaEngine, DiagnosticLoggingKeys::noopKey()); 1695 1695 1696 1696 if (!page->hasSeenAnyMediaEngine()) 1697 c lient->logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsAtLeastOneMediaEngineKey(), emptyString(), DiagnosticLoggingKeys::noopKey());1697 chromeClient.logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsAtLeastOneMediaEngineKey(), emptyString(), DiagnosticLoggingKeys::noopKey()); 1698 1698 1699 1699 if (!page->hasSeenMediaEngine(mediaEngine)) 1700 c lient->logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsMediaEngineKey(), mediaEngine, DiagnosticLoggingKeys::noopKey());1700 chromeClient.logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsMediaEngineKey(), mediaEngine, DiagnosticLoggingKeys::noopKey()); 1701 1701 1702 1702 page->sawMediaEngine(mediaEngine); … … 3824 3824 return 0; 3825 3825 3826 return document()->page()->chrome().client() ->graphicsDeviceAdapter();3826 return document()->page()->chrome().client().graphicsDeviceAdapter(); 3827 3827 } 3828 3828 #endif … … 4413 4413 mediaControls()->enteredFullscreen(); 4414 4414 if (document() && document()->page()) { 4415 document()->page()->chrome().client() ->enterFullscreenForNode(this);4415 document()->page()->chrome().client().enterFullscreenForNode(this); 4416 4416 scheduleEvent(eventNames().webkitbeginfullscreenEvent); 4417 4417 } … … 4436 4436 if (document()->page()->chrome().requiresFullscreenForVideoPlayback()) 4437 4437 pauseInternal(); 4438 document()->page()->chrome().client() ->exitFullscreenForNode(this);4438 document()->page()->chrome().client().exitFullscreenForNode(this); 4439 4439 scheduleEvent(eventNames().webkitendfullscreenEvent); 4440 4440 } -
trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp
r154257 r154272 76 76 return titleText; 77 77 78 titleText = page->chrome().client() ->plugInStartLabelTitle(mimeType);78 titleText = page->chrome().client().plugInStartLabelTitle(mimeType); 79 79 if (titleText.isEmpty()) 80 80 titleText = snapshottedPlugInLabelTitle(); … … 90 90 return subtitleText; 91 91 92 subtitleText = page->chrome().client() ->plugInStartLabelSubtitle(mimeType);92 subtitleText = page->chrome().client().plugInStartLabelSubtitle(mimeType); 93 93 if (subtitleText.isEmpty()) 94 94 subtitleText = snapshottedPlugInLabelSubtitle(); -
trunk/Source/WebCore/html/HTMLVideoElement.cpp
r154254 r154272 141 141 // If the full screen API is enabled and is supported for the current element 142 142 // do not require that the player has a video track to enter full screen. 143 if (page->chrome().client() ->supportsFullScreenForElement(this, false))143 if (page->chrome().client().supportsFullScreenForElement(this, false)) 144 144 return true; 145 145 #endif … … 148 148 return false; 149 149 150 return page->chrome().client() ->supportsFullscreenForNode(this);150 return page->chrome().client().supportsFullscreenForNode(this); 151 151 } 152 152 -
trunk/Source/WebCore/loader/FrameLoader.cpp
r154265 r154272 1834 1834 #if ENABLE(TOUCH_EVENTS) 1835 1835 if (isLoadingMainFrame()) 1836 m_frame->page()->chrome().client() ->needTouchEvents(false);1836 m_frame->page()->chrome().client().needTouchEvents(false); 1837 1837 #endif 1838 1838 -
trunk/Source/WebCore/loader/SubframeLoader.cpp
r154219 r154272 200 200 String description = !pluginFile ? newMIMEType : pluginFile; 201 201 202 ChromeClient * client = page->chrome().client();203 c lient->logDiagnosticMessage(success ? DiagnosticLoggingKeys::pluginLoadedKey() : DiagnosticLoggingKeys::pluginLoadingFailedKey(), description, DiagnosticLoggingKeys::noopKey());202 ChromeClient& chromeClient = page->chrome().client(); 203 chromeClient.logDiagnosticMessage(success ? DiagnosticLoggingKeys::pluginLoadedKey() : DiagnosticLoggingKeys::pluginLoadingFailedKey(), description, DiagnosticLoggingKeys::noopKey()); 204 204 205 205 if (!page->hasSeenAnyPlugin()) 206 c lient->logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey(), emptyString(), DiagnosticLoggingKeys::noopKey());206 chromeClient.logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey(), emptyString(), DiagnosticLoggingKeys::noopKey()); 207 207 208 208 if (!page->hasSeenPlugin(description)) 209 c lient->logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsPluginKey(), description, DiagnosticLoggingKeys::noopKey());209 chromeClient.logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsPluginKey(), description, DiagnosticLoggingKeys::noopKey()); 210 210 211 211 page->sawPlugin(description); -
trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp
r154265 r154272 822 822 ASSERT(m_frame); 823 823 ASSERT(m_cacheBeingUpdated); 824 m_frame->page()->chrome().client() ->reachedMaxAppCacheSize(cacheStorage().spaceNeeded(m_cacheBeingUpdated->estimatedSizeInStorage()));824 m_frame->page()->chrome().client().reachedMaxAppCacheSize(cacheStorage().spaceNeeded(m_cacheBeingUpdated->estimatedSizeInStorage())); 825 825 m_calledReachedMaxAppCacheSize = true; 826 826 checkIfLoadIsComplete(); … … 831 831 // Inform the client the origin quota has been reached, they may decide to increase the quota. 832 832 // We expect quota to be increased synchronously while waiting for the call to return. 833 m_frame->page()->chrome().client() ->reachedApplicationCacheOriginQuota(m_origin.get(), totalSpaceNeeded);833 m_frame->page()->chrome().client().reachedApplicationCacheOriginQuota(m_origin.get(), totalSpaceNeeded); 834 834 } 835 835 -
trunk/Source/WebCore/page/AutoscrollController.cpp
r154178 r154272 164 164 165 165 Page* page = frame->page(); 166 if (!page || !page->chrome().client() ->shouldAutoscrollForDragAndDrop(scrollable)) {166 if (!page || !page->chrome().client().shouldAutoscrollForDragAndDrop(scrollable)) { 167 167 stopAutoscrollTimer(); 168 168 return; -
trunk/Source/WebCore/page/Chrome.cpp
r154142 r154272 65 65 Chrome::Chrome(Page* page, ChromeClient* client) 66 66 : m_page(page) 67 , m_client( client)67 , m_client(*client) 68 68 , m_displayID(0) 69 69 { 70 ASSERT( m_client);70 ASSERT(client); 71 71 } 72 72 73 73 Chrome::~Chrome() 74 74 { 75 m_client ->chromeDestroyed();75 m_client.chromeDestroyed(); 76 76 } 77 77 … … 83 83 void Chrome::invalidateRootView(const IntRect& updateRect, bool immediate) 84 84 { 85 m_client ->invalidateRootView(updateRect, immediate);85 m_client.invalidateRootView(updateRect, immediate); 86 86 } 87 87 88 88 void Chrome::invalidateContentsAndRootView(const IntRect& updateRect, bool immediate) 89 89 { 90 m_client ->invalidateContentsAndRootView(updateRect, immediate);90 m_client.invalidateContentsAndRootView(updateRect, immediate); 91 91 } 92 92 93 93 void Chrome::invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate) 94 94 { 95 m_client ->invalidateContentsForSlowScroll(updateRect, immediate);95 m_client.invalidateContentsForSlowScroll(updateRect, immediate); 96 96 } 97 97 98 98 void Chrome::scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect) 99 99 { 100 m_client ->scroll(scrollDelta, rectToScroll, clipRect);100 m_client.scroll(scrollDelta, rectToScroll, clipRect); 101 101 InspectorInstrumentation::didScroll(m_page); 102 102 } … … 105 105 void Chrome::delegatedScrollRequested(const IntPoint& scrollPoint) 106 106 { 107 m_client ->delegatedScrollRequested(scrollPoint);107 m_client.delegatedScrollRequested(scrollPoint); 108 108 } 109 109 #endif … … 111 111 IntPoint Chrome::screenToRootView(const IntPoint& point) const 112 112 { 113 return m_client ->screenToRootView(point);113 return m_client.screenToRootView(point); 114 114 } 115 115 116 116 IntRect Chrome::rootViewToScreen(const IntRect& rect) const 117 117 { 118 return m_client ->rootViewToScreen(rect);118 return m_client.rootViewToScreen(rect); 119 119 } 120 120 121 121 PlatformPageClient Chrome::platformPageClient() const 122 122 { 123 return m_client ->platformPageClient();123 return m_client.platformPageClient(); 124 124 } 125 125 126 126 void Chrome::contentsSizeChanged(Frame* frame, const IntSize& size) const 127 127 { 128 m_client ->contentsSizeChanged(frame, size);128 m_client.contentsSizeChanged(frame, size); 129 129 } 130 130 131 131 void Chrome::layoutUpdated(Frame* frame) const 132 132 { 133 m_client ->layoutUpdated(frame);133 m_client.layoutUpdated(frame); 134 134 } 135 135 136 136 void Chrome::scrollRectIntoView(const IntRect& rect) const 137 137 { 138 m_client ->scrollRectIntoView(rect);138 m_client.scrollRectIntoView(rect); 139 139 } 140 140 141 141 void Chrome::scrollbarsModeDidChange() const 142 142 { 143 m_client ->scrollbarsModeDidChange();143 m_client.scrollbarsModeDidChange(); 144 144 } 145 145 146 146 void Chrome::setWindowRect(const FloatRect& rect) const 147 147 { 148 m_client ->setWindowRect(rect);148 m_client.setWindowRect(rect); 149 149 } 150 150 151 151 FloatRect Chrome::windowRect() const 152 152 { 153 return m_client ->windowRect();153 return m_client.windowRect(); 154 154 } 155 155 156 156 FloatRect Chrome::pageRect() const 157 157 { 158 return m_client ->pageRect();158 return m_client.pageRect(); 159 159 } 160 160 161 161 void Chrome::focus() const 162 162 { 163 m_client ->focus();163 m_client.focus(); 164 164 } 165 165 166 166 void Chrome::unfocus() const 167 167 { 168 m_client ->unfocus();168 m_client.unfocus(); 169 169 } 170 170 171 171 bool Chrome::canTakeFocus(FocusDirection direction) const 172 172 { 173 return m_client ->canTakeFocus(direction);173 return m_client.canTakeFocus(direction); 174 174 } 175 175 176 176 void Chrome::takeFocus(FocusDirection direction) const 177 177 { 178 m_client ->takeFocus(direction);178 m_client.takeFocus(direction); 179 179 } 180 180 181 181 void Chrome::focusedElementChanged(Element* element) const 182 182 { 183 m_client ->focusedElementChanged(element);183 m_client.focusedElementChanged(element); 184 184 } 185 185 186 186 void Chrome::focusedFrameChanged(Frame* frame) const 187 187 { 188 m_client ->focusedFrameChanged(frame);188 m_client.focusedFrameChanged(frame); 189 189 } 190 190 191 191 Page* Chrome::createWindow(Frame* frame, const FrameLoadRequest& request, const WindowFeatures& features, const NavigationAction& action) const 192 192 { 193 Page* newPage = m_client ->createWindow(frame, request, features, action);193 Page* newPage = m_client.createWindow(frame, request, features, action); 194 194 if (!newPage) 195 195 return 0; … … 203 203 void Chrome::show() const 204 204 { 205 m_client ->show();205 m_client.show(); 206 206 } 207 207 208 208 bool Chrome::canRunModal() const 209 209 { 210 return m_client ->canRunModal();210 return m_client.canRunModal(); 211 211 } 212 212 … … 216 216 FrameLoader::PageDismissalType dismissal = frame->loader().pageDismissalEventBeingDispatched(); 217 217 if (dismissal != FrameLoader::NoDismissal) 218 return page->chrome().client() ->shouldRunModalDialogDuringPageDismissal(dialog, message, dismissal);218 return page->chrome().client().shouldRunModalDialogDuringPageDismissal(dialog, message, dismissal); 219 219 } 220 220 return true; … … 236 236 237 237 TimerBase::fireTimersInNestedEventLoop(); 238 m_client ->runModal();238 m_client.runModal(); 239 239 } 240 240 241 241 void Chrome::setToolbarsVisible(bool b) const 242 242 { 243 m_client ->setToolbarsVisible(b);243 m_client.setToolbarsVisible(b); 244 244 } 245 245 246 246 bool Chrome::toolbarsVisible() const 247 247 { 248 return m_client ->toolbarsVisible();248 return m_client.toolbarsVisible(); 249 249 } 250 250 251 251 void Chrome::setStatusbarVisible(bool b) const 252 252 { 253 m_client ->setStatusbarVisible(b);253 m_client.setStatusbarVisible(b); 254 254 } 255 255 256 256 bool Chrome::statusbarVisible() const 257 257 { 258 return m_client ->statusbarVisible();258 return m_client.statusbarVisible(); 259 259 } 260 260 261 261 void Chrome::setScrollbarsVisible(bool b) const 262 262 { 263 m_client ->setScrollbarsVisible(b);263 m_client.setScrollbarsVisible(b); 264 264 } 265 265 266 266 bool Chrome::scrollbarsVisible() const 267 267 { 268 return m_client ->scrollbarsVisible();268 return m_client.scrollbarsVisible(); 269 269 } 270 270 271 271 void Chrome::setMenubarVisible(bool b) const 272 272 { 273 m_client ->setMenubarVisible(b);273 m_client.setMenubarVisible(b); 274 274 } 275 275 276 276 bool Chrome::menubarVisible() const 277 277 { 278 return m_client ->menubarVisible();278 return m_client.menubarVisible(); 279 279 } 280 280 281 281 void Chrome::setResizable(bool b) const 282 282 { 283 m_client ->setResizable(b);283 m_client.setResizable(b); 284 284 } 285 285 286 286 bool Chrome::canRunBeforeUnloadConfirmPanel() 287 287 { 288 return m_client ->canRunBeforeUnloadConfirmPanel();288 return m_client.canRunBeforeUnloadConfirmPanel(); 289 289 } 290 290 … … 296 296 297 297 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(m_page, message); 298 bool ok = m_client ->runBeforeUnloadConfirmPanel(message, frame);298 bool ok = m_client.runBeforeUnloadConfirmPanel(message, frame); 299 299 InspectorInstrumentation::didRunJavaScriptDialog(cookie); 300 300 return ok; … … 303 303 void Chrome::closeWindowSoon() 304 304 { 305 m_client ->closeWindowSoon();305 m_client.closeWindowSoon(); 306 306 } 307 307 … … 320 320 321 321 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(m_page, displayMessage); 322 m_client ->runJavaScriptAlert(frame, displayMessage);322 m_client.runJavaScriptAlert(frame, displayMessage); 323 323 InspectorInstrumentation::didRunJavaScriptDialog(cookie); 324 324 } … … 338 338 339 339 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(m_page, displayMessage); 340 bool ok = m_client ->runJavaScriptConfirm(frame, displayMessage);340 bool ok = m_client.runJavaScriptConfirm(frame, displayMessage); 341 341 InspectorInstrumentation::didRunJavaScriptDialog(cookie); 342 342 return ok; … … 357 357 358 358 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(m_page, displayPrompt); 359 bool ok = m_client ->runJavaScriptPrompt(frame, displayPrompt, frame->displayStringModifiedByEncoding(defaultValue), result);359 bool ok = m_client.runJavaScriptPrompt(frame, displayPrompt, frame->displayStringModifiedByEncoding(defaultValue), result); 360 360 InspectorInstrumentation::didRunJavaScriptDialog(cookie); 361 361 … … 369 369 { 370 370 ASSERT(frame); 371 m_client ->setStatusbarText(frame->displayStringModifiedByEncoding(status));371 m_client.setStatusbarText(frame->displayStringModifiedByEncoding(status)); 372 372 } 373 373 … … 378 378 PageGroupLoadDeferrer deferrer(m_page, true); 379 379 380 return m_client ->shouldInterruptJavaScript();380 return m_client.shouldInterruptJavaScript(); 381 381 } 382 382 383 383 IntRect Chrome::windowResizerRect() const 384 384 { 385 return m_client ->windowResizerRect();385 return m_client.windowResizerRect(); 386 386 } 387 387 … … 393 393 prefetchDNS(result.absoluteLinkURL().host()); 394 394 } 395 m_client ->mouseDidMoveOverElement(result, modifierFlags);395 m_client.mouseDidMoveOverElement(result, modifierFlags); 396 396 397 397 InspectorInstrumentation::mouseDidMoveOverElement(m_page, result, modifierFlags); … … 454 454 } 455 455 456 m_client ->setToolTip(toolTip, toolTipDirection);456 m_client.setToolTip(toolTip, toolTipDirection); 457 457 } 458 458 … … 460 460 { 461 461 // FIXME: This should have PageGroupLoadDeferrer, like runModal() or runJavaScriptAlert(), becasue it's no different from those. 462 m_client ->print(frame);462 m_client.print(frame); 463 463 } 464 464 465 465 void Chrome::enableSuddenTermination() 466 466 { 467 m_client ->enableSuddenTermination();467 m_client.enableSuddenTermination(); 468 468 } 469 469 470 470 void Chrome::disableSuddenTermination() 471 471 { 472 m_client ->disableSuddenTermination();472 m_client.disableSuddenTermination(); 473 473 } 474 474 … … 476 476 void Chrome::enumerateChosenDirectory(FileChooser* fileChooser) 477 477 { 478 m_client ->enumerateChosenDirectory(fileChooser);478 m_client.enumerateChosenDirectory(fileChooser); 479 479 } 480 480 #endif … … 484 484 { 485 485 notifyPopupOpeningObservers(); 486 return m_client ->createColorChooser(client, initialColor);486 return m_client.createColorChooser(client, initialColor); 487 487 } 488 488 #endif … … 492 492 { 493 493 notifyPopupOpeningObservers(); 494 return m_client ->openDateTimeChooser(client, parameters);494 return m_client.openDateTimeChooser(client, parameters); 495 495 } 496 496 #endif … … 499 499 { 500 500 notifyPopupOpeningObservers(); 501 m_client ->runOpenPanel(frame, fileChooser);501 m_client.runOpenPanel(frame, fileChooser); 502 502 } 503 503 504 504 void Chrome::loadIconForFiles(const Vector<String>& filenames, FileIconLoader* loader) 505 505 { 506 m_client ->loadIconForFiles(filenames, loader);506 m_client.loadIconForFiles(filenames, loader); 507 507 } 508 508 509 509 void Chrome::dispatchViewportPropertiesDidChange(const ViewportArguments& arguments) const 510 510 { 511 m_client ->dispatchViewportPropertiesDidChange(arguments);511 m_client.dispatchViewportPropertiesDidChange(arguments); 512 512 } 513 513 514 514 void Chrome::setCursor(const Cursor& cursor) 515 515 { 516 m_client ->setCursor(cursor);516 m_client.setCursor(cursor); 517 517 } 518 518 519 519 void Chrome::setCursorHiddenUntilMouseMoves(bool hiddenUntilMouseMoves) 520 520 { 521 m_client ->setCursorHiddenUntilMouseMoves(hiddenUntilMouseMoves);521 m_client.setCursorHiddenUntilMouseMoves(hiddenUntilMouseMoves); 522 522 } 523 523 … … 526 526 { 527 527 #if !USE(REQUEST_ANIMATION_FRAME_TIMER) 528 m_client ->scheduleAnimation();528 m_client.scheduleAnimation(); 529 529 #endif 530 530 } … … 588 588 bool Chrome::selectItemWritingDirectionIsNatural() 589 589 { 590 return m_client ->selectItemWritingDirectionIsNatural();590 return m_client.selectItemWritingDirectionIsNatural(); 591 591 } 592 592 593 593 bool Chrome::selectItemAlignmentFollowsMenuWritingDirection() 594 594 { 595 return m_client ->selectItemAlignmentFollowsMenuWritingDirection();595 return m_client.selectItemAlignmentFollowsMenuWritingDirection(); 596 596 } 597 597 598 598 bool Chrome::hasOpenedPopup() const 599 599 { 600 return m_client ->hasOpenedPopup();600 return m_client.hasOpenedPopup(); 601 601 } 602 602 … … 604 604 { 605 605 notifyPopupOpeningObservers(); 606 return m_client ->createPopupMenu(client);606 return m_client.createPopupMenu(client); 607 607 } 608 608 … … 610 610 { 611 611 notifyPopupOpeningObservers(); 612 return m_client ->createSearchPopupMenu(client);612 return m_client.createSearchPopupMenu(client); 613 613 } 614 614 615 615 bool Chrome::requiresFullscreenForVideoPlayback() 616 616 { 617 return m_client ->requiresFullscreenForVideoPlayback();617 return m_client.requiresFullscreenForVideoPlayback(); 618 618 } 619 619 -
trunk/Source/WebCore/page/Chrome.h
r153356 r154272 68 68 static PassOwnPtr<Chrome> create(Page*, ChromeClient*); 69 69 70 ChromeClient *client() { return m_client; }70 ChromeClient& client() { return m_client; } 71 71 72 72 // HostWindow methods. … … 189 189 190 190 Page* m_page; 191 ChromeClient *m_client;191 ChromeClient& m_client; 192 192 PlatformDisplayID m_displayID; 193 193 Vector<PopupOpeningObserver*> m_popupOpeningObservers; -
trunk/Source/WebCore/page/Console.cpp
r153927 r154272 88 88 89 89 if (gotMessage) 90 page->chrome().client() ->addMessageToConsole(ConsoleAPIMessageSource, type, level, message, lastCaller.lineNumber(), lastCaller.columnNumber(), lastCaller.sourceURL());90 page->chrome().client().addMessageToConsole(ConsoleAPIMessageSource, type, level, message, lastCaller.lineNumber(), lastCaller.columnNumber(), lastCaller.sourceURL()); 91 91 92 92 if (!page->settings().logsPageMessagesToSystemConsoleEnabled() && !PageConsole::shouldPrintExceptions()) -
trunk/Source/WebCore/page/DOMWindow.cpp
r154219 r154272 340 340 window.setHeight(pendingChanges.height()); 341 341 342 FloatSize minimumSize = page->chrome().client() ->minimumWindowSize();342 FloatSize minimumSize = page->chrome().client().minimumWindowSize(); 343 343 window.setWidth(min(max(minimumSize.width(), window.width()), screen.width())); 344 344 window.setHeight(min(max(minimumSize.height(), window.height()), screen.height())); -
trunk/Source/WebCore/page/EventHandler.cpp
r154229 r154272 3708 3708 return false; 3709 3709 3710 bool tabsToLinksClientCallResult = page->chrome().client() ->keyboardUIMode() & KeyboardAccessTabsToLinks;3710 bool tabsToLinksClientCallResult = page->chrome().client().keyboardUIMode() & KeyboardAccessTabsToLinks; 3711 3711 return eventInvertsTabsToLinksClientCallResult(event) ? !tabsToLinksClientCallResult : tabsToLinksClientCallResult; 3712 3712 } -
trunk/Source/WebCore/page/Frame.cpp
r154240 r154272 309 309 #if ENABLE(TOUCH_EVENTS) 310 310 if (m_doc && m_doc->hasTouchEventHandlers()) 311 m_page->chrome().client() ->needTouchEvents(true);311 m_page->chrome().client().needTouchEvents(true); 312 312 #endif 313 313 } … … 846 846 if (!m_page) 847 847 return IntRect(); 848 return m_page->chrome().client() ->visibleRectForTiledBackingStore();848 return m_page->chrome().client().visibleRectForTiledBackingStore(); 849 849 } 850 850 … … 1008 1008 } 1009 1009 1010 m_page->chrome().client() ->numWheelEventHandlersChanged(count);1010 m_page->chrome().client().numWheelEventHandlersChanged(count); 1011 1011 } 1012 1012 -
trunk/Source/WebCore/page/FrameView.cpp
r154265 r154272 346 346 347 347 Page* page = frame().page(); 348 if (page && page->chrome().client() ->shouldPaintEntireContents())348 if (page && page->chrome().client().shouldPaintEntireContents()) 349 349 setPaintsEntireContents(true); 350 350 } … … 918 918 { 919 919 if (Page* page = frame().page()) 920 page->chrome().client() ->setNeedsOneShotDrawingSynchronization();920 page->chrome().client().setNeedsOneShotDrawingSynchronization(); 921 921 } 922 922 … … 1381 1381 1382 1382 if (Page* page = frame().page()) 1383 page->chrome().client() ->layoutUpdated(&frame());1383 page->chrome().client().layoutUpdated(&frame()); 1384 1384 } 1385 1385 … … 2050 2050 { 2051 2051 if (Page* page = frame().page()) 2052 return page->chrome().client() ->shouldRubberBandInDirection(direction);2052 return page->chrome().client().shouldRubberBandInDirection(direction); 2053 2053 return ScrollView::shouldRubberBandInDirection(direction); 2054 2054 } … … 3089 3089 return; 3090 3090 3091 frame().page()->chrome().client() ->notifyScrollerThumbIsVisibleInRect(scrollerThumb);3091 frame().page()->chrome().client().notifyScrollerThumbIsVisibleInRect(scrollerThumb); 3092 3092 } 3093 3093 … … 3177 3177 return; 3178 3178 3179 frame().page()->chrome().client() ->recommendedScrollbarStyleDidChange(newStyle);3179 frame().page()->chrome().client().recommendedScrollbarStyleDidChange(newStyle); 3180 3180 3181 3181 if (forceUpdate) … … 3248 3248 if (!page) 3249 3249 return; 3250 page->chrome().client() ->annotatedRegionsChanged();3250 page->chrome().client().annotatedRegionsChanged(); 3251 3251 } 3252 3252 #endif … … 3658 3658 return; 3659 3659 3660 if (isMainFrameView() && frame().page()->chrome().client() ->paintCustomOverhangArea(context, horizontalOverhangArea, verticalOverhangArea, dirtyRect))3660 if (isMainFrameView() && frame().page()->chrome().client().paintCustomOverhangArea(context, horizontalOverhangArea, verticalOverhangArea, dirtyRect)) 3661 3661 return; 3662 3662 -
trunk/Source/WebCore/page/PageConsole.cpp
r153927 r154272 172 172 return; 173 173 174 page->chrome().client() ->addMessageToConsole(source, level, message, lineNumber, columnNumber, url);174 page->chrome().client().addMessageToConsole(source, level, message, lineNumber, columnNumber, url); 175 175 176 176 if (!page->settings().logsPageMessagesToSystemConsoleEnabled() && !shouldPrintExceptions()) -
trunk/Source/WebCore/page/PageGroup.cpp
r153788 r154272 196 196 m_visitedLinksPopulated = true; 197 197 ASSERT(!m_pages.isEmpty()); 198 (*m_pages.begin())->chrome().client() ->populateVisitedLinks();198 (*m_pages.begin())->chrome().client().populateVisitedLinks(); 199 199 } 200 200 return m_visitedLinkHashes.contains(visitedLinkHash); -
trunk/Source/WebCore/page/PageThrottler.cpp
r152402 r154272 42 42 , m_throttleHysteresisTimer(this, &PageThrottler::throttleHysteresisTimerFired) 43 43 { 44 if (ChromeClient* chromeClient = m_page->chrome().client()) 45 chromeClient->incrementActivePageCount(); 44 m_page->chrome().client().incrementActivePageCount(); 46 45 } 47 46 … … 53 52 (*i)->invalidate(); 54 53 55 if (m_throttleState != PageThrottledState) { 56 if (ChromeClient* chromeClient = m_page->chrome().client()) 57 chromeClient->decrementActivePageCount(); 58 } 54 if (m_throttleState != PageThrottledState) 55 m_page->chrome().client().decrementActivePageCount(); 59 56 } 60 57 … … 63 60 m_throttleState = PageThrottledState; 64 61 65 if (ChromeClient* chromeClient = m_page->chrome().client()) 66 chromeClient->decrementActivePageCount(); 62 m_page->chrome().client().decrementActivePageCount(); 67 63 68 64 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->traverseNext()) { … … 82 78 return; 83 79 84 if (oldState == PageThrottledState) { 85 if (ChromeClient* chromeClient = m_page->chrome().client()) 86 chromeClient->incrementActivePageCount(); 87 } 80 if (oldState == PageThrottledState) 81 m_page->chrome().client().incrementActivePageCount(); 88 82 89 83 for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->traverseNext()) { -
trunk/Source/WebCore/page/PointerLockController.cpp
r150214 r154272 69 69 enqueueEvent(eventNames().webkitpointerlockchangeEvent, target); 70 70 m_element = target; 71 } else if (m_page->chrome().client() ->requestPointerLock()) {71 } else if (m_page->chrome().client().requestPointerLock()) { 72 72 m_lockPending = true; 73 73 m_element = target; … … 79 79 void PointerLockController::requestPointerUnlock() 80 80 { 81 return m_page->chrome().client() ->requestPointerUnlock();81 return m_page->chrome().client().requestPointerUnlock(); 82 82 } 83 83 -
trunk/Source/WebCore/page/mac/ChromeMac.mm
r86806 r154272 33 33 // Handle the WK2 case where there is no view passed in. 34 34 if (!view) { 35 client() ->makeFirstResponder();35 client().makeFirstResponder(); 36 36 return; 37 37 } 38 38 39 NSResponder *firstResponder = client() ->firstResponder();39 NSResponder *firstResponder = client().firstResponder(); 40 40 if (firstResponder == view) 41 41 return; … … 44 44 return; 45 45 46 client() ->makeFirstResponder(view);46 client().makeFirstResponder(view); 47 47 48 48 // Setting focus can actually cause a style change which might … … 51 51 // the old first responder. 52 52 if (![view superview]) 53 client() ->makeFirstResponder(firstResponder);53 client().makeFirstResponder(firstResponder); 54 54 55 55 END_BLOCK_OBJC_EXCEPTIONS; -
trunk/Source/WebCore/page/mac/EventHandlerMac.mm
r154224 r154272 204 204 return true; 205 205 206 if (page->chrome().client() ->firstResponder() != view) {206 if (page->chrome().client().firstResponder() != view) { 207 207 // Normally [NSWindow sendEvent:] handles setting the first responder. 208 208 // But in our case, the event was sent to the view representing the entire web page. 209 209 if ([currentNSEvent() clickCount] <= 1 && [view acceptsFirstResponder] && [view needsPanelToBecomeKey]) 210 page->chrome().client() ->makeFirstResponder(view);210 page->chrome().client().makeFirstResponder(view); 211 211 } 212 212 … … 689 689 return false; 690 690 691 KeyboardUIMode keyboardUIMode = page->chrome().client() ->keyboardUIMode();691 KeyboardUIMode keyboardUIMode = page->chrome().client().keyboardUIMode(); 692 692 bool handlingOptionTab = isKeyboardOptionTab(event); 693 693 -
trunk/Source/WebCore/platform/blackberry/LocalFileSystemBlackBerry.cpp
r152080 r154272 95 95 Page* page = static_cast<Document*>(context)->page(); 96 96 if (page) 97 playerId = page->chrome().client() ->platformPageClient()->playerID();97 playerId = page->chrome().client().platformPageClient()->playerID(); 98 98 AsyncFileSystemBlackBerry::openFileSystem(rootURL, basePath, context->securityOrigin()->databaseIdentifier(), type, size, create, playerId, callbacks); 99 99 } else { -
trunk/Source/WebCore/platform/network/FormData.cpp
r150214 r154272 236 236 if (Page* page = document->page()) { 237 237 String generatedFileName; 238 shouldGenerateFile = page->chrome().client() ->shouldReplaceWithGeneratedFileForUpload(path, generatedFileName);238 shouldGenerateFile = page->chrome().client().shouldReplaceWithGeneratedFileForUpload(path, generatedFileName); 239 239 if (shouldGenerateFile) 240 240 name = generatedFileName; … … 395 395 if (!page) 396 396 return; 397 ChromeClient* client = page->chrome().client();398 397 399 398 size_t n = m_elements.size(); … … 401 400 FormDataElement& e = m_elements[i]; 402 401 if (e.m_type == FormDataElement::encodedFile && e.m_shouldGenerateFile) { 403 e.m_generatedFilename = client->generateReplacementFile(e.m_filename);402 e.m_generatedFilename = page->chrome().client().generateReplacementFile(e.m_filename); 404 403 m_hasGeneratedFiles = true; 405 404 } -
trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp
r151677 r154272 907 907 908 908 AuthenticationChallengeManager::instance()->authenticationChallenge(newURL, protectionSpace, 909 Credential(), this, m_frame->page()->chrome().client() ->platformPageClient());909 Credential(), this, m_frame->page()->chrome().client().platformPageClient()); 910 910 return SendRequestWaiting; 911 911 } … … 963 963 BlackBerry::Platform::Settings::instance()->storeProxyCredentials(proxyInfo); 964 964 if (m_frame && m_frame->page()) 965 m_frame->page()->chrome().client() ->platformPageClient()->syncProxyCredential(challenge.proposedCredential());965 m_frame->page()->chrome().client().platformPageClient()->syncProxyCredential(challenge.proposedCredential()); 966 966 } 967 967 } -
trunk/Source/WebCore/platform/qt/RenderThemeQStyle.cpp
r154270 r154272 132 132 return; 133 133 134 ChromeClient* chromeClient = m_page->chrome().client(); 135 if (!chromeClient) 136 return; 137 138 if (QWebPageClient* pageClient = chromeClient->platformPageClient()) 134 if (QWebPageClient* pageClient = m_page->chrome().client().platformPageClient()) 139 135 palette = pageClient->palette(); 140 136 } -
trunk/Source/WebCore/plugins/blackberry/PluginViewBlackBerry.cpp
r153592 r154272 1075 1075 1076 1076 #if USE(ACCELERATED_COMPOSITING) 1077 if (m_parentFrame->page()->chrome().client() ->allowsAcceleratedCompositing()1077 if (m_parentFrame->page()->chrome().client().allowsAcceleratedCompositing() 1078 1078 && m_parentFrame->page()->settings() 1079 1079 && m_parentFrame->page()->settings()->acceleratedCompositingEnabled()) { -
trunk/Source/WebCore/plugins/win/PluginViewWin.cpp
r152142 r154272 779 779 ignoreNextSetCursor = true; 780 780 if (Page* page = m_parentFrame->page()) 781 page->chrome().client() ->setLastSetCursorToCurrentCursor();781 page->chrome().client().setLastSetCursorToCurrentCursor(); 782 782 #endif 783 783 } -
trunk/Source/WebCore/rendering/InlineTextBox.cpp
r151894 r154272 953 953 FloatRect textRect(paintOffset.x() + x(), rootRect.y(), logicalWidth(), rootRect.height()); 954 954 955 page->chrome().client() ->paintCustomHighlight(renderer()->node(), type, textRect, rootRect, true, false);955 page->chrome().client().paintCustomHighlight(renderer()->node(), type, textRect, rootRect, true, false); 956 956 } 957 957 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r154072 r154272 1598 1598 FloatRect rootRect(paintOffset.x() + r->x(), paintOffset.y() + r->selectionTop(), r->logicalWidth(), r->selectionHeight()); 1599 1599 FloatRect imageRect(paintOffset.x() + x(), rootRect.y(), width(), rootRect.height()); 1600 page->chrome().client() ->paintCustomHighlight(node(), type, imageRect, rootRect, behindText, false);1600 page->chrome().client().paintCustomHighlight(node(), type, imageRect, rootRect, behindText, false); 1601 1601 } else { 1602 1602 FloatRect imageRect(paintOffset.x() + x(), paintOffset.y() + y(), width(), height()); 1603 page->chrome().client() ->paintCustomHighlight(node(), type, imageRect, imageRect, behindText, false);1603 page->chrome().client().paintCustomHighlight(node(), type, imageRect, imageRect, behindText, false); 1604 1604 } 1605 1605 } -
trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp
r154178 r154272 153 153 { 154 154 Page* page = document->page(); 155 return page && page->chrome().client() ->shouldUnavailablePluginMessageBeButton(pluginUnavailabilityReason);155 return page && page->chrome().client().shouldUnavailablePluginMessageBeButton(pluginUnavailabilityReason); 156 156 } 157 157 … … 634 634 if (m_mouseDownWasInUnavailablePluginIndicator && isInUnavailablePluginIndicator(mouseEvent)) { 635 635 if (Page* page = document()->page()) 636 page->chrome().client() ->unavailablePluginButtonClicked(element, m_pluginUnavailabilityReason);636 page->chrome().client().unavailablePluginButtonClicked(element, m_pluginUnavailabilityReason); 637 637 } 638 638 m_mouseDownWasInUnavailablePluginIndicator = false; -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r154265 r154272 176 176 GraphicsLayerFactory* graphicsLayerFactory = 0; 177 177 if (Page* page = renderer()->frame()->page()) 178 graphicsLayerFactory = page->chrome().client() ->graphicsLayerFactory();178 graphicsLayerFactory = page->chrome().client().graphicsLayerFactory(); 179 179 180 180 OwnPtr<GraphicsLayer> graphicsLayer = GraphicsLayer::create(graphicsLayerFactory, this); -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r154184 r154272 286 286 if (hasAcceleratedCompositing) { 287 287 if (Page* page = this->page()) { 288 ChromeClient* chromeClient = page->chrome().client(); 289 m_compositingTriggers = chromeClient->allowedCompositingTriggers(); 288 m_compositingTriggers = page->chrome().client().allowedCompositingTriggers(); 290 289 hasAcceleratedCompositing = m_compositingTriggers; 291 290 } … … 358 357 m_hasPendingLayerFlush = false; 359 358 if (Page* page = this->page()) 360 page->chrome().client() ->scheduleCompositingLayerFlush();359 page->chrome().client().scheduleCompositingLayerFlush(); 361 360 } 362 361 … … 2632 2631 2633 2632 if (Page* page = this->page()) 2634 page->chrome().client() ->didAddHeaderLayer(m_layerForHeader.get());2633 page->chrome().client().didAddHeaderLayer(m_layerForHeader.get()); 2635 2634 2636 2635 return m_layerForHeader.get(); … … 2671 2670 2672 2671 if (Page* page = this->page()) 2673 page->chrome().client() ->didAddFooterLayer(m_layerForFooter.get());2672 page->chrome().client().didAddFooterLayer(m_layerForFooter.get()); 2674 2673 2675 2674 return m_layerForFooter.get(); … … 2709 2708 m_layerForOverhangAreas->setSize(m_renderView->frameView()->frameRect().size()); 2710 2709 2711 ScrollbarTheme::theme()->setUpOverhangAreasLayerContents(m_layerForOverhangAreas.get(), this->page()->chrome().client() ->underlayColor());2710 ScrollbarTheme::theme()->setUpOverhangAreasLayerContents(m_layerForOverhangAreas.get(), this->page()->chrome().client().underlayColor()); 2712 2711 2713 2712 // We want the overhang areas layer to be positioned below the frame contents, … … 2934 2933 return; 2935 2934 2936 page->chrome().client() ->attachRootGraphicsLayer(&frame, rootGraphicsLayer());2935 page->chrome().client().attachRootGraphicsLayer(&frame, rootGraphicsLayer()); 2937 2936 break; 2938 2937 } … … 2978 2977 return; 2979 2978 2980 page->chrome().client() ->attachRootGraphicsLayer(&frame, 0);2979 page->chrome().client().attachRootGraphicsLayer(&frame, 0); 2981 2980 } 2982 2981 break; … … 3241 3240 { 3242 3241 if (Page* page = this->page()) 3243 return page->chrome().client() ->graphicsLayerFactory();3242 return page->chrome().client().graphicsLayerFactory(); 3244 3243 3245 3244 return 0; … … 3308 3307 3309 3308 // If the layer tree is frozen, we'll paint when it's unfrozen and schedule the timer again. 3310 if (page->chrome().client() ->layerTreeStateIsFrozen())3309 if (page->chrome().client().layerTreeStateIsFrozen()) 3311 3310 return; 3312 3311 -
trunk/Source/WebCore/rendering/RootInlineBox.cpp
r151575 r154272 189 189 // Highlight acts as a selection inflation. 190 190 FloatRect rootRect(0, selectionTop(), logicalWidth(), selectionHeight()); 191 IntRect inflatedRect = enclosingIntRect(page->chrome().client() ->customHighlightRect(renderer()->node(), renderer()->style()->highlight(), rootRect));191 IntRect inflatedRect = enclosingIntRect(page->chrome().client().customHighlightRect(renderer()->node(), renderer()->style()->highlight(), rootRect)); 192 192 setOverflowFromLogicalRects(inflatedRect, inflatedRect, lineTop(), lineBottom()); 193 193 } … … 207 207 // Get the inflated rect so that we can properly hit test. 208 208 FloatRect rootRect(paintOffset.x() + x(), paintOffset.y() + selectionTop(), logicalWidth(), selectionHeight()); 209 FloatRect inflatedRect = page->chrome().client() ->customHighlightRect(renderer()->node(), highlightType, rootRect);209 FloatRect inflatedRect = page->chrome().client().customHighlightRect(renderer()->node(), highlightType, rootRect); 210 210 if (inflatedRect.intersects(paintInfo.rect)) 211 page->chrome().client() ->paintCustomHighlight(renderer()->node(), highlightType, rootRect, rootRect, false, true);211 page->chrome().client().paintCustomHighlight(renderer()->node(), highlightType, rootRect, rootRect, false, true); 212 212 } 213 213 -
trunk/Source/WebCore/svg/graphics/SVGImage.cpp
r154142 r154272 403 403 return false; 404 404 405 ChromeClient* chromeClient = page->chrome().client(); 406 return chromeClient && chromeClient->isSVGImageChromeClient(); 405 return page->chrome().client().isSVGImageChromeClient(); 407 406 } 408 407 -
trunk/Source/WebKit/blackberry/Api/WebPage.cpp
r154192 r154272 5268 5268 WebCore::GraphicsLayerFactory* WebPagePrivate::graphicsLayerFactory() const 5269 5269 { 5270 return m_page->chrome().client() ->graphicsLayerFactory();5270 return m_page->chrome().client().graphicsLayerFactory(); 5271 5271 } 5272 5272 … … 6015 6015 m_pagePopup = PagePopup::create(this, popupClient); 6016 6016 6017 WebCore::IntRect popupRect = m_page->chrome().client() ->rootViewToScreen(originBoundsInRootView);6017 WebCore::IntRect popupRect = m_page->chrome().client().rootViewToScreen(originBoundsInRootView); 6018 6018 popupRect.setSize(popupClient->contentSize()); 6019 6019 if (!m_client->createPopupWebView(popupRect)) { -
trunk/Source/WebKit/efl/WebCoreSupport/PopupMenuEfl.cpp
r154184 r154272 52 52 { 53 53 ASSERT(m_popupClient); 54 ChromeClientEfl* chromeClient = static_cast<ChromeClientEfl*>(view->frame().page()->chrome().client()); 55 ASSERT(chromeClient); 54 ChromeClientEfl& chromeClient = static_cast<ChromeClientEfl&>(view->frame().page()->chrome().client()); 56 55 57 56 m_view = view; 58 chromeClient ->createSelectPopup(m_popupClient, index, rect);57 chromeClient.createSelectPopup(m_popupClient, index, rect); 59 58 } 60 59 … … 62 61 { 63 62 ASSERT(m_view); 64 ChromeClientEfl* chromeClient = static_cast<ChromeClientEfl*>(m_view->frame().page()->chrome().client()); 65 ASSERT(chromeClient); 63 ChromeClientEfl& chromeClient = static_cast<ChromeClientEfl&>(m_view->frame().page()->chrome().client()); 66 64 67 chromeClient ->destroySelectPopup();65 chromeClient.destroySelectPopup(); 68 66 } 69 67 -
trunk/Source/WebKit/efl/ewk/ewk_view.cpp
r154265 r154272 1234 1234 { 1235 1235 int desktopWidth = 980; 1236 WebCore::IntRect availableRect = enclosingIntRect(priv->page->chrome().client() ->pageRect());1237 WebCore::IntRect deviceRect = enclosingIntRect(priv->page->chrome().client() ->windowRect());1236 WebCore::IntRect availableRect = enclosingIntRect(priv->page->chrome().client().pageRect()); 1237 WebCore::IntRect deviceRect = enclosingIntRect(priv->page->chrome().client().windowRect()); 1238 1238 1239 1239 WebCore::ViewportAttributes attributes = WebCore::computeViewportAttributes(priv->viewportArguments, desktopWidth, deviceRect.width(), deviceRect.height(), priv->page->deviceScaleFactor(), availableRect.size()); -
trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
r154142 r154272 439 439 g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView)); 440 440 441 static_cast<WebKit::ChromeClient *>(core(webView)->chrome().client())->forcePaint();441 static_cast<WebKit::ChromeClient&>(core(webView)->chrome().client()).forcePaint(); 442 442 } 443 443 -
trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp
r154265 r154272 471 471 Page* page = core(webView); 472 472 if (page) 473 static_cast<WebKit::ChromeClient *>(page->chrome().client())->adjustmentWatcher()->setHorizontalAdjustment(adjustment);473 static_cast<WebKit::ChromeClient&>(page->chrome().client()).adjustmentWatcher()->setHorizontalAdjustment(adjustment); 474 474 } 475 475 … … 479 479 Page* page = core(webView); 480 480 if (page) 481 static_cast<WebKit::ChromeClient *>(page->chrome().client())->adjustmentWatcher()->setVerticalAdjustment(adjustment);481 static_cast<WebKit::ChromeClient&>(page->chrome().client()).adjustmentWatcher()->setVerticalAdjustment(adjustment); 482 482 } 483 483 … … 487 487 Page* page = core(webView); 488 488 if (page) 489 return static_cast<WebKit::ChromeClient *>(page->chrome().client())->adjustmentWatcher()->horizontalAdjustment();489 return static_cast<WebKit::ChromeClient&>(page->chrome().client()).adjustmentWatcher()->horizontalAdjustment(); 490 490 return 0; 491 491 } … … 495 495 Page* page = core(webView); 496 496 if (page) 497 return static_cast<WebKit::ChromeClient *>(page->chrome().client())->adjustmentWatcher()->verticalAdjustment();497 return static_cast<WebKit::ChromeClient&>(page->chrome().client()).adjustmentWatcher()->verticalAdjustment(); 498 498 return 0; 499 499 } … … 868 868 return; 869 869 870 WebKit::ChromeClient * chromeClient = static_cast<WebKit::ChromeClient*>(page->chrome().client());871 chromeClient ->widgetSizeChanged(oldSize, IntSize(allocation->width, allocation->height));872 chromeClient ->adjustmentWatcher()->updateAdjustmentsFromScrollbars();870 WebKit::ChromeClient& chromeClient = static_cast<WebKit::ChromeClient&>(page->chrome().client()); 871 chromeClient.widgetSizeChanged(oldSize, IntSize(allocation->width, allocation->height)); 872 chromeClient.adjustmentWatcher()->updateAdjustmentsFromScrollbars(); 873 873 } 874 874 … … 5542 5542 return 0; 5543 5543 5544 WebCore::ChromeClient *chromeClient = corePage->chrome().client();5545 if (chromeClient ->isEmptyChromeClient())5544 WebCore::ChromeClient& chromeClient = corePage->chrome().client(); 5545 if (chromeClient.isEmptyChromeClient()) 5546 5546 return 0; 5547 5547 5548 return static_cast<WebKit::ChromeClient *>(chromeClient)->webView();5549 } 5550 5551 } 5548 return static_cast<WebKit::ChromeClient&>(chromeClient).webView(); 5549 } 5550 5551 } -
trunk/Source/WebKit/mac/WebView/WebFrame.mm
r154192 r154272 246 246 return nil; 247 247 248 ChromeClient* chromeClient = page->chrome().client(); 249 if (chromeClient->isEmptyChromeClient()) 250 return nil; 251 252 return static_cast<WebChromeClient*>(chromeClient)->webView(); 248 if (page->chrome().client().isEmptyChromeClient()) 249 return nil; 250 251 return static_cast<WebChromeClient&>(page->chrome().client()).webView(); 253 252 } 254 253 -
trunk/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp
r153736 r154272 62 62 QWebPageAdapter* pageAdapter = 0; 63 63 if (page) 64 pageAdapter = static_cast<WebCore::ChromeClientQt *>(page->chrome().client())->m_webPage;64 pageAdapter = static_cast<WebCore::ChromeClientQt&>(page->chrome().client()).m_webPage; 65 65 return initCallback(pageAdapter); 66 66 } -
trunk/Source/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.cpp
r153517 r154272 139 139 { 140 140 QWebPageAdapter* qPage = 0; 141 if (!page->chrome().client() ->isEmptyChromeClient())142 qPage = static_cast<ChromeClientQt *>(page->chrome().client())->m_webPage;141 if (!page->chrome().client().isEmptyChromeClient()) 142 qPage = static_cast<ChromeClientQt&>(page->chrome().client()).m_webPage; 143 143 144 144 QWebPluginFactory* factory; -
trunk/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp
r154192 r154272 442 442 if (!page) 443 443 return; 444 if (TextureMapperLayerClientQt* client = static_cast<ChromeClientQt *>(page->chrome().client())->m_textureMapperLayerClient.get())444 if (TextureMapperLayerClientQt* client = static_cast<ChromeClientQt&>(page->chrome().client()).m_textureMapperLayerClient.get()) 445 445 client->renderCompositedLayers(context, clip); 446 446 } -
trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
r154265 r154272 301 301 QWebPageAdapter* QWebPageAdapter::kit(Page* page) 302 302 { 303 return static_cast<ChromeClientQt *>(page->chrome().client())->m_webPage;303 return static_cast<ChromeClientQt&>(page->chrome().client()).m_webPage; 304 304 } 305 305 -
trunk/Source/WebKit/win/WebView.cpp
r154265 r154272 205 205 return 0; 206 206 207 ChromeClient* chromeClient = page->chrome().client(); 208 if (chromeClient->isEmptyChromeClient()) 207 if (page->chrome().client().isEmptyChromeClient()) 209 208 return 0; 210 209 211 return static_cast<WebChromeClient *>(chromeClient)->webView();210 return static_cast<WebChromeClient&>(page->chrome().client()).webView(); 212 211 } 213 212 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r154239 r154272 1065 1065 WebPage* WebPage::fromCorePage(Page* page) 1066 1066 { 1067 return static_cast<WebChromeClient *>(page->chrome().client())->page();1067 return static_cast<WebChromeClient&>(page->chrome().client()).page(); 1068 1068 } 1069 1069
Note: See TracChangeset
for help on using the changeset viewer.