void setCursor(const Cursor& cursor, LocalFrame* localRoot) override
 {
     toChromeClientImpl(m_client)->setCursorOverridden(false);
     toChromeClientImpl(m_client)->setCursor(cursor, localRoot);
     bool overrideCursor = m_overlay->m_layoutEditor;
     toChromeClientImpl(m_client)->setCursorOverridden(overrideCursor);
 }
示例#2
0
static WebWidgetClient* toWebWidgetClient(Widget* widget)
{
    ChromeClientImpl* chromeClientImpl = toChromeClientImpl(widget);
    if (!chromeClientImpl || !chromeClientImpl->webView())
        return 0;
    return chromeClientImpl->webView()->client();
}
void InspectorOverlay::initializeLayoutEditorIfNeeded(Node* node)
{
    if (m_inspectMode != InspectorDOMAgent::ShowLayoutEditor || !node || !node->isElementNode() || !node->ownerDocument()->isActive())
        return;
    m_layoutEditor = LayoutEditor::create(toElement(node), m_cssAgent, m_domAgent, &overlayMainFrame()->script());
    toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridden(true);
}
void InspectorOverlay::overlayClearSelection(bool commitChanges)
{
    ASSERT(m_layoutEditor);
    m_hoveredNodeForInspectMode = m_layoutEditor->element();

    if (commitChanges)
        m_layoutEditor->commitChanges();

    if (m_layoutEditor) {
        m_layoutEditor->dispose();
        m_layoutEditor.clear();
    }

    if (m_inspectModeHighlightConfig)
        highlightNode(m_hoveredNodeForInspectMode.get(), *m_inspectModeHighlightConfig, false);

    toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursorOverridden(false);
    toChromeClientImpl(m_webViewImpl->page()->chromeClient()).setCursor(pointerCursor(), overlayMainFrame());
}
示例#5
0
 void setCursor(const Cursor& cursor, LocalFrame* localRoot) override {
   toChromeClientImpl(m_client)->setCursorOverridden(false);
   toChromeClientImpl(m_client)->setCursor(cursor,
                                           m_overlay->m_frameImpl->frame());
   toChromeClientImpl(m_client)->setCursorOverridden(false);
 }
示例#6
0
void ChromiumBridge::widgetSetFocus(Widget* widget)
{
    ChromeClientImpl* client = toChromeClientImpl(widget);
    if (client)
        client->focus();
}
示例#7
0
void ChromiumBridge::widgetSetCursor(Widget* widget, const Cursor& cursor)
{
    ChromeClientImpl* client = toChromeClientImpl(widget);
    if (client)
        client->setCursor(WebCursorInfo(cursor));
}