Changeset 154272 in webkit


Ignore:
Timestamp:
Aug 19, 2013 3:56:27 AM (11 years ago)
Author:
akling@apple.com
Message:

<https://webkit.org/b/120000> Chrome::client() should return a reference.

Reviewed by Antti Koivisto.

Chrome::m_client should never be null.

Location:
trunk/Source
Files:
54 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r154271 r154272  
     12013-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
    192013-08-19  Antti Koivisto  <antti@apple.com>
    210
  • trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.cpp

    r153927 r154272  
    221221        Document* document = toDocument(m_scriptExecutionContext);
    222222        if (Page* page = document->page())
    223             page->chrome().client()->exceededDatabaseQuota(document->frame(), name, details);
     223            page->chrome().client().exceededDatabaseQuota(document->frame(), name, details);
    224224        return;
    225225    }
  • trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

    r154239 r154272  
    15411541        // If we have an empty chrome client (like SVG) then we should use the page
    15421542        // 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())
    15441544            page = parent->page();
    15451545       
     
    30903090            Page* page = m_object->page();
    30913091            if (page && frameView) {
    3092                 ChromeClient* client = page->chrome().client();
    3093                 client->focus();
     3092                ChromeClient& chromeClient = page->chrome().client();
     3093                chromeClient.focus();
    30943094                if (frameView->platformWidget())
    3095                     client->makeFirstResponder(frameView->platformWidget());
     3095                    chromeClient.makeFirstResponder(frameView->platformWidget());
    30963096                else
    3097                     client->makeFirstResponder();
     3097                    chromeClient.makeFirstResponder();
    30983098            }
    30993099        }
  • trunk/Source/WebCore/accessibility/win/AXObjectCacheWin.cpp

    r152065 r154272  
    143143
    144144    if (notification == AXLoadingStarted)
    145         page->chrome().client()->AXStartFrameLoad();
     145        page->chrome().client().AXStartFrameLoad();
    146146    else if (notification == AXLoadingFinished)
    147         page->chrome().client()->AXFinishFrameLoad();
     147        page->chrome().client().AXFinishFrameLoad();
    148148}
    149149
  • trunk/Source/WebCore/css/CSSDefaultStyleSheets.cpp

    r152814 r154272  
    204204
    205205    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();
    207207        if (plugInsRules.isEmpty())
    208208            plugInsRules = String(plugInsUserAgentStyleSheet, sizeof(plugInsUserAgentStyleSheet));
  • trunk/Source/WebCore/dom/Document.cpp

    r154264 r154272  
    49824982            break;
    49834983
    4984         if (!page()->chrome().client()->supportsFullScreenForElement(element, flags & Element::ALLOW_KEYBOARD_INPUT)) {
     4984        if (!page()->chrome().client().supportsFullScreenForElement(element, flags & Element::ALLOW_KEYBOARD_INPUT)) {
    49854985            // The new full screen API does not accept a "flags" parameter, so fall back to disallowing
    49864986            // keyboard input if the chrome client refuses to allow keyboard input.
    49874987            if (!inLegacyMozillaMode && flags & Element::ALLOW_KEYBOARD_INPUT) {
    49884988                flags &= ~Element::ALLOW_KEYBOARD_INPUT;
    4989                 if (!page()->chrome().client()->supportsFullScreenForElement(element, false))
     4989                if (!page()->chrome().client().supportsFullScreenForElement(element, false))
    49904990                    break;
    49914991            } else
     
    50425042        // 6. Optionally, perform some animation.
    50435043        m_areKeysEnabledInFullScreen = flags & Element::ALLOW_KEYBOARD_INPUT;
    5044         page()->chrome().client()->enterFullScreenForElement(element);
     5044        page()->chrome().client().enterFullScreenForElement(element);
    50455045
    50465046        // 7. Optionally, display a message indicating how the user can exit displaying the context object fullscreen.
     
    51335133    // full screen stack.
    51345134    if (!newTop) {
    5135         page()->chrome().client()->exitFullScreenForElement(m_fullScreenElement.get());
     5135        page()->chrome().client().exitFullScreenForElement(m_fullScreenElement.get());
    51365136        return;
    51375137    }
    51385138
    51395139    // Otherwise, notify the chrome of the new full screen element.
    5140     page()->chrome().client()->enterFullScreenForElement(newTop);
     5140    page()->chrome().client().enterFullScreenForElement(newTop);
    51415141}
    51425142
     
    52635263    // This notification can come in after the page has been destroyed.
    52645264    if (page())
    5265         page()->chrome().client()->fullScreenRendererChanged(m_fullScreenRenderer);
     5265        page()->chrome().client().fullScreenRendererChanged(m_fullScreenRenderer);
    52665266}
    52675267
     
    52715271
    52725272    if (page())
    5273         page()->chrome().client()->fullScreenRendererChanged(0);
     5273        page()->chrome().client().fullScreenRendererChanged(0);
    52745274}
    52755275
     
    55545554#endif
    55555555        if (m_touchEventTargets->size() == 1)
    5556             page->chrome().client()->needTouchEvents(true);
     5556            page->chrome().client().needTouchEvents(true);
    55575557    }
    55585558#else
     
    55865586            return;
    55875587    }
    5588     page->chrome().client()->needTouchEvents(false);
     5588    page->chrome().client().needTouchEvents(false);
    55895589#else
    55905590    UNUSED_PARAM(handler);
     
    59435943void Document::didAssociateFormControl(Element* element)
    59445944{
    5945     if (!frame() || !frame()->page() || !frame()->page()->chrome().client()->shouldNotifyOnFormChanges())
     5945    if (!frame() || !frame()->page() || !frame()->page()->chrome().client().shouldNotifyOnFormChanges())
    59465946        return;
    59475947    m_associatedFormControls.add(element);
     
    59595959    copyToVector(m_associatedFormControls, associatedFormControls);
    59605960
    5961     frame()->page()->chrome().client()->didAssociateFormControls(associatedFormControls);
     5961    frame()->page()->chrome().client().didAssociateFormControls(associatedFormControls);
    59625962    m_associatedFormControls.clear();
    59635963}
     
    59695969
    59705970    // 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();
    59725972    if (!jsString)
    59735973        jsString = plugInsJavaScript;
  • trunk/Source/WebCore/dom/Element.cpp

    r154257 r154272  
    475475    // platform supports immediate invalidations on the ChromeClient, so bail if
    476476    // that isn't supported.
    477     if (!document()->page()->chrome().client()->supportsImmediateInvalidation())
     477    if (!document()->page()->chrome().client().supportsImmediateInvalidation())
    478478        return;
    479479
     
    20142014{
    20152015    if (document()->page())
    2016         document()->page()->chrome().client()->elementDidFocus(this);
     2016        document()->page()->chrome().client().elementDidFocus(this);
    20172017
    20182018    RefPtr<FocusEvent> event = FocusEvent::create(eventNames().focusEvent, false, false, document()->defaultView(), 0, oldFocusedElement);
     
    20232023{
    20242024    if (document()->page())
    2025         document()->page()->chrome().client()->elementDidBlur(this);
     2025        document()->page()->chrome().client().elementDidBlur(this);
    20262026
    20272027    RefPtr<FocusEvent> event = FocusEvent::create(eventNames().blurEvent, false, false, document()->defaultView(), 0, newFocusedElement);
  • trunk/Source/WebCore/history/CachedFrame.cpp

    r154192 r154272  
    144144#if ENABLE(TOUCH_EVENTS)
    145145    if (m_document->hasTouchEventHandlers())
    146         m_document->page()->chrome().client()->needTouchEvents(true);
     146        m_document->page()->chrome().client().needTouchEvents(true);
    147147#endif
    148148
  • trunk/Source/WebCore/html/HTMLFormControlElementWithState.cpp

    r150946 r154272  
    7272
    7373    if (Page* page = frame->page())
    74         page->chrome().client()->formStateDidChange(this);
     74        page->chrome().client().formStateDidChange(this);
    7575}
    7676
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r154254 r154272  
    16851685        return;
    16861686
    1687     ChromeClient* client = page->chrome().client();
     1687    ChromeClient& chromeClient = page->chrome().client();
    16881688
    16891689    if (!succeeded) {
    1690         client->logDiagnosticMessage(DiagnosticLoggingKeys::mediaLoadingFailedKey(), errorMessage, DiagnosticLoggingKeys::failKey());
    1691         return;
    1692     }
    1693 
    1694     client->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());
    16951695
    16961696    if (!page->hasSeenAnyMediaEngine())
    1697         client->logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsAtLeastOneMediaEngineKey(), emptyString(), DiagnosticLoggingKeys::noopKey());
     1697        chromeClient.logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsAtLeastOneMediaEngineKey(), emptyString(), DiagnosticLoggingKeys::noopKey());
    16981698
    16991699    if (!page->hasSeenMediaEngine(mediaEngine))
    1700         client->logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsMediaEngineKey(), mediaEngine, DiagnosticLoggingKeys::noopKey());
     1700        chromeClient.logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsMediaEngineKey(), mediaEngine, DiagnosticLoggingKeys::noopKey());
    17011701
    17021702    page->sawMediaEngine(mediaEngine);
     
    38243824        return 0;
    38253825
    3826     return document()->page()->chrome().client()->graphicsDeviceAdapter();
     3826    return document()->page()->chrome().client().graphicsDeviceAdapter();
    38273827}
    38283828#endif
     
    44134413        mediaControls()->enteredFullscreen();
    44144414    if (document() && document()->page()) {
    4415         document()->page()->chrome().client()->enterFullscreenForNode(this);
     4415        document()->page()->chrome().client().enterFullscreenForNode(this);
    44164416        scheduleEvent(eventNames().webkitbeginfullscreenEvent);
    44174417    }
     
    44364436        if (document()->page()->chrome().requiresFullscreenForVideoPlayback())
    44374437            pauseInternal();
    4438         document()->page()->chrome().client()->exitFullscreenForNode(this);
     4438        document()->page()->chrome().client().exitFullscreenForNode(this);
    44394439        scheduleEvent(eventNames().webkitendfullscreenEvent);
    44404440    }
  • trunk/Source/WebCore/html/HTMLPlugInImageElement.cpp

    r154257 r154272  
    7676        return titleText;
    7777
    78     titleText = page->chrome().client()->plugInStartLabelTitle(mimeType);
     78    titleText = page->chrome().client().plugInStartLabelTitle(mimeType);
    7979    if (titleText.isEmpty())
    8080        titleText = snapshottedPlugInLabelTitle();
     
    9090        return subtitleText;
    9191
    92     subtitleText = page->chrome().client()->plugInStartLabelSubtitle(mimeType);
     92    subtitleText = page->chrome().client().plugInStartLabelSubtitle(mimeType);
    9393    if (subtitleText.isEmpty())
    9494        subtitleText = snapshottedPlugInLabelSubtitle();
  • trunk/Source/WebCore/html/HTMLVideoElement.cpp

    r154254 r154272  
    141141    // If the full screen API is enabled and is supported for the current element
    142142    // 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))
    144144        return true;
    145145#endif
     
    148148        return false;
    149149
    150     return page->chrome().client()->supportsFullscreenForNode(this);
     150    return page->chrome().client().supportsFullscreenForNode(this);
    151151}
    152152
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r154265 r154272  
    18341834#if ENABLE(TOUCH_EVENTS)
    18351835    if (isLoadingMainFrame())
    1836         m_frame->page()->chrome().client()->needTouchEvents(false);
     1836        m_frame->page()->chrome().client().needTouchEvents(false);
    18371837#endif
    18381838
  • trunk/Source/WebCore/loader/SubframeLoader.cpp

    r154219 r154272  
    200200    String description = !pluginFile ? newMIMEType : pluginFile;
    201201
    202     ChromeClient* client = page->chrome().client();
    203     client->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());
    204204
    205205    if (!page->hasSeenAnyPlugin())
    206         client->logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey(), emptyString(), DiagnosticLoggingKeys::noopKey());
     206        chromeClient.logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey(), emptyString(), DiagnosticLoggingKeys::noopKey());
    207207   
    208208    if (!page->hasSeenPlugin(description))
    209         client->logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsPluginKey(), description, DiagnosticLoggingKeys::noopKey());
     209        chromeClient.logDiagnosticMessage(DiagnosticLoggingKeys::pageContainsPluginKey(), description, DiagnosticLoggingKeys::noopKey());
    210210
    211211    page->sawPlugin(description);
  • trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp

    r154265 r154272  
    822822    ASSERT(m_frame);
    823823    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()));
    825825    m_calledReachedMaxAppCacheSize = true;
    826826    checkIfLoadIsComplete();
     
    831831    // Inform the client the origin quota has been reached, they may decide to increase the quota.
    832832    // 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);
    834834}
    835835
  • trunk/Source/WebCore/page/AutoscrollController.cpp

    r154178 r154272  
    164164
    165165    Page* page = frame->page();
    166     if (!page || !page->chrome().client()->shouldAutoscrollForDragAndDrop(scrollable)) {
     166    if (!page || !page->chrome().client().shouldAutoscrollForDragAndDrop(scrollable)) {
    167167        stopAutoscrollTimer();
    168168        return;
  • trunk/Source/WebCore/page/Chrome.cpp

    r154142 r154272  
    6565Chrome::Chrome(Page* page, ChromeClient* client)
    6666    : m_page(page)
    67     , m_client(client)
     67    , m_client(*client)
    6868    , m_displayID(0)
    6969{
    70     ASSERT(m_client);
     70    ASSERT(client);
    7171}
    7272
    7373Chrome::~Chrome()
    7474{
    75     m_client->chromeDestroyed();
     75    m_client.chromeDestroyed();
    7676}
    7777
     
    8383void Chrome::invalidateRootView(const IntRect& updateRect, bool immediate)
    8484{
    85     m_client->invalidateRootView(updateRect, immediate);
     85    m_client.invalidateRootView(updateRect, immediate);
    8686}
    8787
    8888void Chrome::invalidateContentsAndRootView(const IntRect& updateRect, bool immediate)
    8989{
    90     m_client->invalidateContentsAndRootView(updateRect, immediate);
     90    m_client.invalidateContentsAndRootView(updateRect, immediate);
    9191}
    9292
    9393void Chrome::invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate)
    9494{
    95     m_client->invalidateContentsForSlowScroll(updateRect, immediate);
     95    m_client.invalidateContentsForSlowScroll(updateRect, immediate);
    9696}
    9797
    9898void Chrome::scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect)
    9999{
    100     m_client->scroll(scrollDelta, rectToScroll, clipRect);
     100    m_client.scroll(scrollDelta, rectToScroll, clipRect);
    101101    InspectorInstrumentation::didScroll(m_page);
    102102}
     
    105105void Chrome::delegatedScrollRequested(const IntPoint& scrollPoint)
    106106{
    107     m_client->delegatedScrollRequested(scrollPoint);
     107    m_client.delegatedScrollRequested(scrollPoint);
    108108}
    109109#endif
     
    111111IntPoint Chrome::screenToRootView(const IntPoint& point) const
    112112{
    113     return m_client->screenToRootView(point);
     113    return m_client.screenToRootView(point);
    114114}
    115115
    116116IntRect Chrome::rootViewToScreen(const IntRect& rect) const
    117117{
    118     return m_client->rootViewToScreen(rect);
     118    return m_client.rootViewToScreen(rect);
    119119}
    120120
    121121PlatformPageClient Chrome::platformPageClient() const
    122122{
    123     return m_client->platformPageClient();
     123    return m_client.platformPageClient();
    124124}
    125125
    126126void Chrome::contentsSizeChanged(Frame* frame, const IntSize& size) const
    127127{
    128     m_client->contentsSizeChanged(frame, size);
     128    m_client.contentsSizeChanged(frame, size);
    129129}
    130130
    131131void Chrome::layoutUpdated(Frame* frame) const
    132132{
    133     m_client->layoutUpdated(frame);
     133    m_client.layoutUpdated(frame);
    134134}
    135135
    136136void Chrome::scrollRectIntoView(const IntRect& rect) const
    137137{
    138     m_client->scrollRectIntoView(rect);
     138    m_client.scrollRectIntoView(rect);
    139139}
    140140
    141141void Chrome::scrollbarsModeDidChange() const
    142142{
    143     m_client->scrollbarsModeDidChange();
     143    m_client.scrollbarsModeDidChange();
    144144}
    145145
    146146void Chrome::setWindowRect(const FloatRect& rect) const
    147147{
    148     m_client->setWindowRect(rect);
     148    m_client.setWindowRect(rect);
    149149}
    150150
    151151FloatRect Chrome::windowRect() const
    152152{
    153     return m_client->windowRect();
     153    return m_client.windowRect();
    154154}
    155155
    156156FloatRect Chrome::pageRect() const
    157157{
    158     return m_client->pageRect();
     158    return m_client.pageRect();
    159159}
    160160
    161161void Chrome::focus() const
    162162{
    163     m_client->focus();
     163    m_client.focus();
    164164}
    165165
    166166void Chrome::unfocus() const
    167167{
    168     m_client->unfocus();
     168    m_client.unfocus();
    169169}
    170170
    171171bool Chrome::canTakeFocus(FocusDirection direction) const
    172172{
    173     return m_client->canTakeFocus(direction);
     173    return m_client.canTakeFocus(direction);
    174174}
    175175
    176176void Chrome::takeFocus(FocusDirection direction) const
    177177{
    178     m_client->takeFocus(direction);
     178    m_client.takeFocus(direction);
    179179}
    180180
    181181void Chrome::focusedElementChanged(Element* element) const
    182182{
    183     m_client->focusedElementChanged(element);
     183    m_client.focusedElementChanged(element);
    184184}
    185185
    186186void Chrome::focusedFrameChanged(Frame* frame) const
    187187{
    188     m_client->focusedFrameChanged(frame);
     188    m_client.focusedFrameChanged(frame);
    189189}
    190190
    191191Page* Chrome::createWindow(Frame* frame, const FrameLoadRequest& request, const WindowFeatures& features, const NavigationAction& action) const
    192192{
    193     Page* newPage = m_client->createWindow(frame, request, features, action);
     193    Page* newPage = m_client.createWindow(frame, request, features, action);
    194194    if (!newPage)
    195195        return 0;
     
    203203void Chrome::show() const
    204204{
    205     m_client->show();
     205    m_client.show();
    206206}
    207207
    208208bool Chrome::canRunModal() const
    209209{
    210     return m_client->canRunModal();
     210    return m_client.canRunModal();
    211211}
    212212
     
    216216        FrameLoader::PageDismissalType dismissal = frame->loader().pageDismissalEventBeingDispatched();
    217217        if (dismissal != FrameLoader::NoDismissal)
    218             return page->chrome().client()->shouldRunModalDialogDuringPageDismissal(dialog, message, dismissal);
     218            return page->chrome().client().shouldRunModalDialogDuringPageDismissal(dialog, message, dismissal);
    219219    }
    220220    return true;
     
    236236
    237237    TimerBase::fireTimersInNestedEventLoop();
    238     m_client->runModal();
     238    m_client.runModal();
    239239}
    240240
    241241void Chrome::setToolbarsVisible(bool b) const
    242242{
    243     m_client->setToolbarsVisible(b);
     243    m_client.setToolbarsVisible(b);
    244244}
    245245
    246246bool Chrome::toolbarsVisible() const
    247247{
    248     return m_client->toolbarsVisible();
     248    return m_client.toolbarsVisible();
    249249}
    250250
    251251void Chrome::setStatusbarVisible(bool b) const
    252252{
    253     m_client->setStatusbarVisible(b);
     253    m_client.setStatusbarVisible(b);
    254254}
    255255
    256256bool Chrome::statusbarVisible() const
    257257{
    258     return m_client->statusbarVisible();
     258    return m_client.statusbarVisible();
    259259}
    260260
    261261void Chrome::setScrollbarsVisible(bool b) const
    262262{
    263     m_client->setScrollbarsVisible(b);
     263    m_client.setScrollbarsVisible(b);
    264264}
    265265
    266266bool Chrome::scrollbarsVisible() const
    267267{
    268     return m_client->scrollbarsVisible();
     268    return m_client.scrollbarsVisible();
    269269}
    270270
    271271void Chrome::setMenubarVisible(bool b) const
    272272{
    273     m_client->setMenubarVisible(b);
     273    m_client.setMenubarVisible(b);
    274274}
    275275
    276276bool Chrome::menubarVisible() const
    277277{
    278     return m_client->menubarVisible();
     278    return m_client.menubarVisible();
    279279}
    280280
    281281void Chrome::setResizable(bool b) const
    282282{
    283     m_client->setResizable(b);
     283    m_client.setResizable(b);
    284284}
    285285
    286286bool Chrome::canRunBeforeUnloadConfirmPanel()
    287287{
    288     return m_client->canRunBeforeUnloadConfirmPanel();
     288    return m_client.canRunBeforeUnloadConfirmPanel();
    289289}
    290290
     
    296296
    297297    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(m_page, message);
    298     bool ok = m_client->runBeforeUnloadConfirmPanel(message, frame);
     298    bool ok = m_client.runBeforeUnloadConfirmPanel(message, frame);
    299299    InspectorInstrumentation::didRunJavaScriptDialog(cookie);
    300300    return ok;
     
    303303void Chrome::closeWindowSoon()
    304304{
    305     m_client->closeWindowSoon();
     305    m_client.closeWindowSoon();
    306306}
    307307
     
    320320
    321321    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(m_page, displayMessage);
    322     m_client->runJavaScriptAlert(frame, displayMessage);
     322    m_client.runJavaScriptAlert(frame, displayMessage);
    323323    InspectorInstrumentation::didRunJavaScriptDialog(cookie);
    324324}
     
    338338
    339339    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(m_page, displayMessage);
    340     bool ok = m_client->runJavaScriptConfirm(frame, displayMessage);
     340    bool ok = m_client.runJavaScriptConfirm(frame, displayMessage);
    341341    InspectorInstrumentation::didRunJavaScriptDialog(cookie);
    342342    return ok;
     
    357357
    358358    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);
    360360    InspectorInstrumentation::didRunJavaScriptDialog(cookie);
    361361
     
    369369{
    370370    ASSERT(frame);
    371     m_client->setStatusbarText(frame->displayStringModifiedByEncoding(status));
     371    m_client.setStatusbarText(frame->displayStringModifiedByEncoding(status));
    372372}
    373373
     
    378378    PageGroupLoadDeferrer deferrer(m_page, true);
    379379
    380     return m_client->shouldInterruptJavaScript();
     380    return m_client.shouldInterruptJavaScript();
    381381}
    382382
    383383IntRect Chrome::windowResizerRect() const
    384384{
    385     return m_client->windowResizerRect();
     385    return m_client.windowResizerRect();
    386386}
    387387
     
    393393            prefetchDNS(result.absoluteLinkURL().host());
    394394    }
    395     m_client->mouseDidMoveOverElement(result, modifierFlags);
     395    m_client.mouseDidMoveOverElement(result, modifierFlags);
    396396
    397397    InspectorInstrumentation::mouseDidMoveOverElement(m_page, result, modifierFlags);
     
    454454    }
    455455
    456     m_client->setToolTip(toolTip, toolTipDirection);
     456    m_client.setToolTip(toolTip, toolTipDirection);
    457457}
    458458
     
    460460{
    461461    // 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);
    463463}
    464464
    465465void Chrome::enableSuddenTermination()
    466466{
    467     m_client->enableSuddenTermination();
     467    m_client.enableSuddenTermination();
    468468}
    469469
    470470void Chrome::disableSuddenTermination()
    471471{
    472     m_client->disableSuddenTermination();
     472    m_client.disableSuddenTermination();
    473473}
    474474
     
    476476void Chrome::enumerateChosenDirectory(FileChooser* fileChooser)
    477477{
    478     m_client->enumerateChosenDirectory(fileChooser);
     478    m_client.enumerateChosenDirectory(fileChooser);
    479479}
    480480#endif
     
    484484{
    485485    notifyPopupOpeningObservers();
    486     return m_client->createColorChooser(client, initialColor);
     486    return m_client.createColorChooser(client, initialColor);
    487487}
    488488#endif
     
    492492{
    493493    notifyPopupOpeningObservers();
    494     return m_client->openDateTimeChooser(client, parameters);
     494    return m_client.openDateTimeChooser(client, parameters);
    495495}
    496496#endif
     
    499499{
    500500    notifyPopupOpeningObservers();
    501     m_client->runOpenPanel(frame, fileChooser);
     501    m_client.runOpenPanel(frame, fileChooser);
    502502}
    503503
    504504void Chrome::loadIconForFiles(const Vector<String>& filenames, FileIconLoader* loader)
    505505{
    506     m_client->loadIconForFiles(filenames, loader);
     506    m_client.loadIconForFiles(filenames, loader);
    507507}
    508508
    509509void Chrome::dispatchViewportPropertiesDidChange(const ViewportArguments& arguments) const
    510510{
    511     m_client->dispatchViewportPropertiesDidChange(arguments);
     511    m_client.dispatchViewportPropertiesDidChange(arguments);
    512512}
    513513
    514514void Chrome::setCursor(const Cursor& cursor)
    515515{
    516     m_client->setCursor(cursor);
     516    m_client.setCursor(cursor);
    517517}
    518518
    519519void Chrome::setCursorHiddenUntilMouseMoves(bool hiddenUntilMouseMoves)
    520520{
    521     m_client->setCursorHiddenUntilMouseMoves(hiddenUntilMouseMoves);
     521    m_client.setCursorHiddenUntilMouseMoves(hiddenUntilMouseMoves);
    522522}
    523523
     
    526526{
    527527#if !USE(REQUEST_ANIMATION_FRAME_TIMER)
    528     m_client->scheduleAnimation();
     528    m_client.scheduleAnimation();
    529529#endif
    530530}
     
    588588bool Chrome::selectItemWritingDirectionIsNatural()
    589589{
    590     return m_client->selectItemWritingDirectionIsNatural();
     590    return m_client.selectItemWritingDirectionIsNatural();
    591591}
    592592
    593593bool Chrome::selectItemAlignmentFollowsMenuWritingDirection()
    594594{
    595     return m_client->selectItemAlignmentFollowsMenuWritingDirection();
     595    return m_client.selectItemAlignmentFollowsMenuWritingDirection();
    596596}
    597597
    598598bool Chrome::hasOpenedPopup() const
    599599{
    600     return m_client->hasOpenedPopup();
     600    return m_client.hasOpenedPopup();
    601601}
    602602
     
    604604{
    605605    notifyPopupOpeningObservers();
    606     return m_client->createPopupMenu(client);
     606    return m_client.createPopupMenu(client);
    607607}
    608608
     
    610610{
    611611    notifyPopupOpeningObservers();
    612     return m_client->createSearchPopupMenu(client);
     612    return m_client.createSearchPopupMenu(client);
    613613}
    614614
    615615bool Chrome::requiresFullscreenForVideoPlayback()
    616616{
    617     return m_client->requiresFullscreenForVideoPlayback();
     617    return m_client.requiresFullscreenForVideoPlayback();
    618618}
    619619
  • trunk/Source/WebCore/page/Chrome.h

    r153356 r154272  
    6868    static PassOwnPtr<Chrome> create(Page*, ChromeClient*);
    6969
    70     ChromeClient* client() { return m_client; }
     70    ChromeClient& client() { return m_client; }
    7171
    7272    // HostWindow methods.
     
    189189
    190190    Page* m_page;
    191     ChromeClient* m_client;
     191    ChromeClient& m_client;
    192192    PlatformDisplayID m_displayID;
    193193    Vector<PopupOpeningObserver*> m_popupOpeningObservers;
  • trunk/Source/WebCore/page/Console.cpp

    r153927 r154272  
    8888
    8989    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());
    9191
    9292    if (!page->settings().logsPageMessagesToSystemConsoleEnabled() && !PageConsole::shouldPrintExceptions())
  • trunk/Source/WebCore/page/DOMWindow.cpp

    r154219 r154272  
    340340        window.setHeight(pendingChanges.height());
    341341
    342     FloatSize minimumSize = page->chrome().client()->minimumWindowSize();
     342    FloatSize minimumSize = page->chrome().client().minimumWindowSize();
    343343    window.setWidth(min(max(minimumSize.width(), window.width()), screen.width()));
    344344    window.setHeight(min(max(minimumSize.height(), window.height()), screen.height()));
  • trunk/Source/WebCore/page/EventHandler.cpp

    r154229 r154272  
    37083708        return false;
    37093709
    3710     bool tabsToLinksClientCallResult = page->chrome().client()->keyboardUIMode() & KeyboardAccessTabsToLinks;
     3710    bool tabsToLinksClientCallResult = page->chrome().client().keyboardUIMode() & KeyboardAccessTabsToLinks;
    37113711    return eventInvertsTabsToLinksClientCallResult(event) ? !tabsToLinksClientCallResult : tabsToLinksClientCallResult;
    37123712}
  • trunk/Source/WebCore/page/Frame.cpp

    r154240 r154272  
    309309#if ENABLE(TOUCH_EVENTS)
    310310        if (m_doc && m_doc->hasTouchEventHandlers())
    311             m_page->chrome().client()->needTouchEvents(true);
     311            m_page->chrome().client().needTouchEvents(true);
    312312#endif
    313313    }
     
    846846    if (!m_page)
    847847        return IntRect();
    848     return m_page->chrome().client()->visibleRectForTiledBackingStore();
     848    return m_page->chrome().client().visibleRectForTiledBackingStore();
    849849}
    850850
     
    10081008    }
    10091009
    1010     m_page->chrome().client()->numWheelEventHandlersChanged(count);
     1010    m_page->chrome().client().numWheelEventHandlersChanged(count);
    10111011}
    10121012
  • trunk/Source/WebCore/page/FrameView.cpp

    r154265 r154272  
    346346
    347347    Page* page = frame().page();
    348     if (page && page->chrome().client()->shouldPaintEntireContents())
     348    if (page && page->chrome().client().shouldPaintEntireContents())
    349349        setPaintsEntireContents(true);
    350350}
     
    918918{
    919919    if (Page* page = frame().page())
    920         page->chrome().client()->setNeedsOneShotDrawingSynchronization();
     920        page->chrome().client().setNeedsOneShotDrawingSynchronization();
    921921}
    922922
     
    13811381
    13821382    if (Page* page = frame().page())
    1383         page->chrome().client()->layoutUpdated(&frame());
     1383        page->chrome().client().layoutUpdated(&frame());
    13841384}
    13851385
     
    20502050{
    20512051    if (Page* page = frame().page())
    2052         return page->chrome().client()->shouldRubberBandInDirection(direction);
     2052        return page->chrome().client().shouldRubberBandInDirection(direction);
    20532053    return ScrollView::shouldRubberBandInDirection(direction);
    20542054}
     
    30893089        return;
    30903090
    3091     frame().page()->chrome().client()->notifyScrollerThumbIsVisibleInRect(scrollerThumb);
     3091    frame().page()->chrome().client().notifyScrollerThumbIsVisibleInRect(scrollerThumb);
    30923092}
    30933093
     
    31773177        return;
    31783178
    3179     frame().page()->chrome().client()->recommendedScrollbarStyleDidChange(newStyle);
     3179    frame().page()->chrome().client().recommendedScrollbarStyleDidChange(newStyle);
    31803180
    31813181    if (forceUpdate)
     
    32483248    if (!page)
    32493249        return;
    3250     page->chrome().client()->annotatedRegionsChanged();
     3250    page->chrome().client().annotatedRegionsChanged();
    32513251}
    32523252#endif
     
    36583658        return;
    36593659
    3660     if (isMainFrameView() && frame().page()->chrome().client()->paintCustomOverhangArea(context, horizontalOverhangArea, verticalOverhangArea, dirtyRect))
     3660    if (isMainFrameView() && frame().page()->chrome().client().paintCustomOverhangArea(context, horizontalOverhangArea, verticalOverhangArea, dirtyRect))
    36613661        return;
    36623662
  • trunk/Source/WebCore/page/PageConsole.cpp

    r153927 r154272  
    172172        return;
    173173
    174     page->chrome().client()->addMessageToConsole(source, level, message, lineNumber, columnNumber, url);
     174    page->chrome().client().addMessageToConsole(source, level, message, lineNumber, columnNumber, url);
    175175
    176176    if (!page->settings().logsPageMessagesToSystemConsoleEnabled() && !shouldPrintExceptions())
  • trunk/Source/WebCore/page/PageGroup.cpp

    r153788 r154272  
    196196        m_visitedLinksPopulated = true;
    197197        ASSERT(!m_pages.isEmpty());
    198         (*m_pages.begin())->chrome().client()->populateVisitedLinks();
     198        (*m_pages.begin())->chrome().client().populateVisitedLinks();
    199199    }
    200200    return m_visitedLinkHashes.contains(visitedLinkHash);
  • trunk/Source/WebCore/page/PageThrottler.cpp

    r152402 r154272  
    4242    , m_throttleHysteresisTimer(this, &PageThrottler::throttleHysteresisTimerFired)
    4343{
    44     if (ChromeClient* chromeClient = m_page->chrome().client())
    45         chromeClient->incrementActivePageCount();
     44    m_page->chrome().client().incrementActivePageCount();
    4645}
    4746
     
    5352        (*i)->invalidate();
    5453
    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();
    5956}
    6057
     
    6360    m_throttleState = PageThrottledState;
    6461
    65     if (ChromeClient* chromeClient = m_page->chrome().client())
    66         chromeClient->decrementActivePageCount();
     62    m_page->chrome().client().decrementActivePageCount();
    6763
    6864    for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
     
    8278        return;
    8379
    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();
    8882   
    8983    for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree()->traverseNext()) {
  • trunk/Source/WebCore/page/PointerLockController.cpp

    r150214 r154272  
    6969        enqueueEvent(eventNames().webkitpointerlockchangeEvent, target);
    7070        m_element = target;
    71     } else if (m_page->chrome().client()->requestPointerLock()) {
     71    } else if (m_page->chrome().client().requestPointerLock()) {
    7272        m_lockPending = true;
    7373        m_element = target;
     
    7979void PointerLockController::requestPointerUnlock()
    8080{
    81     return m_page->chrome().client()->requestPointerUnlock();
     81    return m_page->chrome().client().requestPointerUnlock();
    8282}
    8383
  • trunk/Source/WebCore/page/mac/ChromeMac.mm

    r86806 r154272  
    3333    // Handle the WK2 case where there is no view passed in.
    3434    if (!view) {
    35         client()->makeFirstResponder();
     35        client().makeFirstResponder();
    3636        return;
    3737    }
    3838   
    39     NSResponder *firstResponder = client()->firstResponder();
     39    NSResponder *firstResponder = client().firstResponder();
    4040    if (firstResponder == view)
    4141        return;
     
    4444        return;
    4545
    46     client()->makeFirstResponder(view);
     46    client().makeFirstResponder(view);
    4747
    4848    // Setting focus can actually cause a style change which might
     
    5151    // the old first responder.
    5252    if (![view superview])
    53         client()->makeFirstResponder(firstResponder);
     53        client().makeFirstResponder(firstResponder);
    5454
    5555    END_BLOCK_OBJC_EXCEPTIONS;
  • trunk/Source/WebCore/page/mac/EventHandlerMac.mm

    r154224 r154272  
    204204        return true;
    205205
    206     if (page->chrome().client()->firstResponder() != view) {
     206    if (page->chrome().client().firstResponder() != view) {
    207207        // Normally [NSWindow sendEvent:] handles setting the first responder.
    208208        // But in our case, the event was sent to the view representing the entire web page.
    209209        if ([currentNSEvent() clickCount] <= 1 && [view acceptsFirstResponder] && [view needsPanelToBecomeKey])
    210             page->chrome().client()->makeFirstResponder(view);
     210            page->chrome().client().makeFirstResponder(view);
    211211    }
    212212
     
    689689        return false;
    690690
    691     KeyboardUIMode keyboardUIMode = page->chrome().client()->keyboardUIMode();
     691    KeyboardUIMode keyboardUIMode = page->chrome().client().keyboardUIMode();
    692692    bool handlingOptionTab = isKeyboardOptionTab(event);
    693693
  • trunk/Source/WebCore/platform/blackberry/LocalFileSystemBlackBerry.cpp

    r152080 r154272  
    9595        Page* page = static_cast<Document*>(context)->page();
    9696        if (page)
    97             playerId = page->chrome().client()->platformPageClient()->playerID();
     97            playerId = page->chrome().client().platformPageClient()->playerID();
    9898        AsyncFileSystemBlackBerry::openFileSystem(rootURL, basePath, context->securityOrigin()->databaseIdentifier(), type, size, create, playerId, callbacks);
    9999    } else {
  • trunk/Source/WebCore/platform/network/FormData.cpp

    r150214 r154272  
    236236                        if (Page* page = document->page()) {
    237237                            String generatedFileName;
    238                             shouldGenerateFile = page->chrome().client()->shouldReplaceWithGeneratedFileForUpload(path, generatedFileName);
     238                            shouldGenerateFile = page->chrome().client().shouldReplaceWithGeneratedFileForUpload(path, generatedFileName);
    239239                            if (shouldGenerateFile)
    240240                                name = generatedFileName;
     
    395395    if (!page)
    396396        return;
    397     ChromeClient* client = page->chrome().client();
    398397
    399398    size_t n = m_elements.size();
     
    401400        FormDataElement& e = m_elements[i];
    402401        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);
    404403            m_hasGeneratedFiles = true;
    405404        }
  • trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp

    r151677 r154272  
    907907
    908908            AuthenticationChallengeManager::instance()->authenticationChallenge(newURL, protectionSpace,
    909                 Credential(), this, m_frame->page()->chrome().client()->platformPageClient());
     909                Credential(), this, m_frame->page()->chrome().client().platformPageClient());
    910910            return SendRequestWaiting;
    911911        }
     
    963963        BlackBerry::Platform::Settings::instance()->storeProxyCredentials(proxyInfo);
    964964        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());
    966966    }
    967967}
  • trunk/Source/WebCore/platform/qt/RenderThemeQStyle.cpp

    r154270 r154272  
    132132        return;
    133133
    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())
    139135        palette = pageClient->palette();
    140136}
  • trunk/Source/WebCore/plugins/blackberry/PluginViewBlackBerry.cpp

    r153592 r154272  
    10751075
    10761076#if USE(ACCELERATED_COMPOSITING)
    1077     if (m_parentFrame->page()->chrome().client()->allowsAcceleratedCompositing()
     1077    if (m_parentFrame->page()->chrome().client().allowsAcceleratedCompositing()
    10781078        && m_parentFrame->page()->settings()
    10791079        && m_parentFrame->page()->settings()->acceleratedCompositingEnabled()) {
  • trunk/Source/WebCore/plugins/win/PluginViewWin.cpp

    r152142 r154272  
    779779    ignoreNextSetCursor = true;
    780780    if (Page* page = m_parentFrame->page())
    781         page->chrome().client()->setLastSetCursorToCurrentCursor();
     781        page->chrome().client().setLastSetCursorToCurrentCursor();
    782782#endif
    783783}
  • trunk/Source/WebCore/rendering/InlineTextBox.cpp

    r151894 r154272  
    953953    FloatRect textRect(paintOffset.x() + x(), rootRect.y(), logicalWidth(), rootRect.height());
    954954
    955     page->chrome().client()->paintCustomHighlight(renderer()->node(), type, textRect, rootRect, true, false);
     955    page->chrome().client().paintCustomHighlight(renderer()->node(), type, textRect, rootRect, true, false);
    956956}
    957957
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r154072 r154272  
    15981598        FloatRect rootRect(paintOffset.x() + r->x(), paintOffset.y() + r->selectionTop(), r->logicalWidth(), r->selectionHeight());
    15991599        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);
    16011601    } else {
    16021602        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);
    16041604    }
    16051605}
  • trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp

    r154178 r154272  
    153153{
    154154    Page* page = document->page();
    155     return page && page->chrome().client()->shouldUnavailablePluginMessageBeButton(pluginUnavailabilityReason);
     155    return page && page->chrome().client().shouldUnavailablePluginMessageBeButton(pluginUnavailabilityReason);
    156156}
    157157
     
    634634        if (m_mouseDownWasInUnavailablePluginIndicator && isInUnavailablePluginIndicator(mouseEvent)) {
    635635            if (Page* page = document()->page())
    636                 page->chrome().client()->unavailablePluginButtonClicked(element, m_pluginUnavailabilityReason);
     636                page->chrome().client().unavailablePluginButtonClicked(element, m_pluginUnavailabilityReason);
    637637        }
    638638        m_mouseDownWasInUnavailablePluginIndicator = false;
  • trunk/Source/WebCore/rendering/RenderLayerBacking.cpp

    r154265 r154272  
    176176    GraphicsLayerFactory* graphicsLayerFactory = 0;
    177177    if (Page* page = renderer()->frame()->page())
    178         graphicsLayerFactory = page->chrome().client()->graphicsLayerFactory();
     178        graphicsLayerFactory = page->chrome().client().graphicsLayerFactory();
    179179
    180180    OwnPtr<GraphicsLayer> graphicsLayer = GraphicsLayer::create(graphicsLayerFactory, this);
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r154184 r154272  
    286286        if (hasAcceleratedCompositing) {
    287287            if (Page* page = this->page()) {
    288                 ChromeClient* chromeClient = page->chrome().client();
    289                 m_compositingTriggers = chromeClient->allowedCompositingTriggers();
     288                m_compositingTriggers = page->chrome().client().allowedCompositingTriggers();
    290289                hasAcceleratedCompositing = m_compositingTriggers;
    291290            }
     
    358357    m_hasPendingLayerFlush = false;
    359358    if (Page* page = this->page())
    360         page->chrome().client()->scheduleCompositingLayerFlush();
     359        page->chrome().client().scheduleCompositingLayerFlush();
    361360}
    362361
     
    26322631
    26332632    if (Page* page = this->page())
    2634         page->chrome().client()->didAddHeaderLayer(m_layerForHeader.get());
     2633        page->chrome().client().didAddHeaderLayer(m_layerForHeader.get());
    26352634
    26362635    return m_layerForHeader.get();
     
    26712670
    26722671    if (Page* page = this->page())
    2673         page->chrome().client()->didAddFooterLayer(m_layerForFooter.get());
     2672        page->chrome().client().didAddFooterLayer(m_layerForFooter.get());
    26742673
    26752674    return m_layerForFooter.get();
     
    27092708            m_layerForOverhangAreas->setSize(m_renderView->frameView()->frameRect().size());
    27102709
    2711             ScrollbarTheme::theme()->setUpOverhangAreasLayerContents(m_layerForOverhangAreas.get(), this->page()->chrome().client()->underlayColor());
     2710            ScrollbarTheme::theme()->setUpOverhangAreasLayerContents(m_layerForOverhangAreas.get(), this->page()->chrome().client().underlayColor());
    27122711
    27132712            // We want the overhang areas layer to be positioned below the frame contents,
     
    29342933                return;
    29352934
    2936             page->chrome().client()->attachRootGraphicsLayer(&frame, rootGraphicsLayer());
     2935            page->chrome().client().attachRootGraphicsLayer(&frame, rootGraphicsLayer());
    29372936            break;
    29382937        }
     
    29782977            return;
    29792978
    2980         page->chrome().client()->attachRootGraphicsLayer(&frame, 0);
     2979        page->chrome().client().attachRootGraphicsLayer(&frame, 0);
    29812980    }
    29822981    break;
     
    32413240{
    32423241    if (Page* page = this->page())
    3243         return page->chrome().client()->graphicsLayerFactory();
     3242        return page->chrome().client().graphicsLayerFactory();
    32443243
    32453244    return 0;
     
    33083307
    33093308    // 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())
    33113310        return;
    33123311
  • trunk/Source/WebCore/rendering/RootInlineBox.cpp

    r151575 r154272  
    189189    // Highlight acts as a selection inflation.
    190190    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));
    192192    setOverflowFromLogicalRects(inflatedRect, inflatedRect, lineTop(), lineBottom());
    193193}
     
    207207    // Get the inflated rect so that we can properly hit test.
    208208    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);
    210210    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);
    212212}
    213213
  • trunk/Source/WebCore/svg/graphics/SVGImage.cpp

    r154142 r154272  
    403403        return false;
    404404
    405     ChromeClient* chromeClient = page->chrome().client();
    406     return chromeClient && chromeClient->isSVGImageChromeClient();
     405    return page->chrome().client().isSVGImageChromeClient();
    407406}
    408407
  • trunk/Source/WebKit/blackberry/Api/WebPage.cpp

    r154192 r154272  
    52685268WebCore::GraphicsLayerFactory* WebPagePrivate::graphicsLayerFactory() const
    52695269{
    5270     return m_page->chrome().client()->graphicsLayerFactory();
     5270    return m_page->chrome().client().graphicsLayerFactory();
    52715271}
    52725272
     
    60156015    m_pagePopup = PagePopup::create(this, popupClient);
    60166016
    6017     WebCore::IntRect popupRect = m_page->chrome().client()->rootViewToScreen(originBoundsInRootView);
     6017    WebCore::IntRect popupRect = m_page->chrome().client().rootViewToScreen(originBoundsInRootView);
    60186018    popupRect.setSize(popupClient->contentSize());
    60196019    if (!m_client->createPopupWebView(popupRect)) {
  • trunk/Source/WebKit/efl/WebCoreSupport/PopupMenuEfl.cpp

    r154184 r154272  
    5252{
    5353    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());
    5655
    5756    m_view = view;
    58     chromeClient->createSelectPopup(m_popupClient, index, rect);
     57    chromeClient.createSelectPopup(m_popupClient, index, rect);
    5958}
    6059
     
    6261{
    6362    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());
    6664
    67     chromeClient->destroySelectPopup();
     65    chromeClient.destroySelectPopup();
    6866}
    6967
  • trunk/Source/WebKit/efl/ewk/ewk_view.cpp

    r154265 r154272  
    12341234{
    12351235    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());
    12381238
    12391239    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  
    439439    g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
    440440
    441     static_cast<WebKit::ChromeClient*>(core(webView)->chrome().client())->forcePaint();
     441    static_cast<WebKit::ChromeClient&>(core(webView)->chrome().client()).forcePaint();
    442442}
    443443
  • trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp

    r154265 r154272  
    471471    Page* page = core(webView);
    472472    if (page)
    473         static_cast<WebKit::ChromeClient*>(page->chrome().client())->adjustmentWatcher()->setHorizontalAdjustment(adjustment);
     473        static_cast<WebKit::ChromeClient&>(page->chrome().client()).adjustmentWatcher()->setHorizontalAdjustment(adjustment);
    474474}
    475475
     
    479479    Page* page = core(webView);
    480480    if (page)
    481         static_cast<WebKit::ChromeClient*>(page->chrome().client())->adjustmentWatcher()->setVerticalAdjustment(adjustment);
     481        static_cast<WebKit::ChromeClient&>(page->chrome().client()).adjustmentWatcher()->setVerticalAdjustment(adjustment);
    482482}
    483483
     
    487487    Page* page = core(webView);
    488488    if (page)
    489         return static_cast<WebKit::ChromeClient*>(page->chrome().client())->adjustmentWatcher()->horizontalAdjustment();
     489        return static_cast<WebKit::ChromeClient&>(page->chrome().client()).adjustmentWatcher()->horizontalAdjustment();
    490490    return 0;
    491491}
     
    495495    Page* page = core(webView);
    496496    if (page)
    497         return static_cast<WebKit::ChromeClient*>(page->chrome().client())->adjustmentWatcher()->verticalAdjustment();
     497        return static_cast<WebKit::ChromeClient&>(page->chrome().client()).adjustmentWatcher()->verticalAdjustment();
    498498    return 0;
    499499}
     
    868868        return;
    869869
    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();
    873873}
    874874
     
    55425542        return 0;
    55435543
    5544     WebCore::ChromeClient* chromeClient = corePage->chrome().client();
    5545     if (chromeClient->isEmptyChromeClient())
     5544    WebCore::ChromeClient& chromeClient = corePage->chrome().client();
     5545    if (chromeClient.isEmptyChromeClient())
    55465546        return 0;
    55475547
    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  
    246246        return nil;
    247247
    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();
    253252}
    254253
  • trunk/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp

    r153736 r154272  
    6262    QWebPageAdapter* pageAdapter = 0;
    6363    if (page)
    64         pageAdapter = static_cast<WebCore::ChromeClientQt*>(page->chrome().client())->m_webPage;
     64        pageAdapter = static_cast<WebCore::ChromeClientQt&>(page->chrome().client()).m_webPage;
    6565    return initCallback(pageAdapter);
    6666}
  • trunk/Source/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.cpp

    r153517 r154272  
    139139{
    140140    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;
    143143
    144144    QWebPluginFactory* factory;
  • trunk/Source/WebKit/qt/WebCoreSupport/QWebFrameAdapter.cpp

    r154192 r154272  
    442442    if (!page)
    443443        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())
    445445        client->renderCompositedLayers(context, clip);
    446446}
  • trunk/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp

    r154265 r154272  
    301301QWebPageAdapter* QWebPageAdapter::kit(Page* page)
    302302{
    303     return static_cast<ChromeClientQt*>(page->chrome().client())->m_webPage;
     303    return static_cast<ChromeClientQt&>(page->chrome().client()).m_webPage;
    304304}
    305305
  • trunk/Source/WebKit/win/WebView.cpp

    r154265 r154272  
    205205        return 0;
    206206   
    207     ChromeClient* chromeClient = page->chrome().client();
    208     if (chromeClient->isEmptyChromeClient())
     207    if (page->chrome().client().isEmptyChromeClient())
    209208        return 0;
    210209   
    211     return static_cast<WebChromeClient*>(chromeClient)->webView();
     210    return static_cast<WebChromeClient&>(page->chrome().client()).webView();
    212211}
    213212
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r154239 r154272  
    10651065WebPage* WebPage::fromCorePage(Page* page)
    10661066{
    1067     return static_cast<WebChromeClient*>(page->chrome().client())->page();
     1067    return static_cast<WebChromeClient&>(page->chrome().client()).page();
    10681068}
    10691069
Note: See TracChangeset for help on using the changeset viewer.