コード例 #1
0
ファイル: WebEditorClient.cpp プロジェクト: endlessm/WebKit
bool WebEditorClient::shouldApplyStyle(StyleProperties* style, Range* range)
{
    Ref<MutableStyleProperties> mutableStyle(style->isMutable() ? Ref<MutableStyleProperties>(static_cast<MutableStyleProperties&>(*style)) : style->mutableCopy());
    bool result = m_page->injectedBundleEditorClient().shouldApplyStyle(m_page, mutableStyle->ensureCSSStyleDeclaration(), range);
    notImplemented();
    return result;
}
コード例 #2
0
ファイル: LayoutQuote.cpp プロジェクト: joone/blink-crosswalk
void LayoutQuote::updateText()
{
    String text = computeText();
    if (m_text == text)
        return;

    m_text = text;

    LayoutTextFragment* fragment = findFragmentChild();
    if (fragment) {
        fragment->setStyle(mutableStyle());
        fragment->setContentString(m_text.impl());
    } else {
        fragment = new LayoutTextFragment(&document(), m_text.impl());
        fragment->setStyle(mutableStyle());
        addChild(fragment);
    }
}
コード例 #3
0
ファイル: EditorClientGtk.cpp プロジェクト: MYSHLIFE/webkit
bool EditorClient::shouldApplyStyle(WebCore::StyleProperties* set, WebCore::Range* range)
{
    gboolean accept = TRUE;
    Ref<MutableStyleProperties> mutableStyle(set->mutableCopy());
    GRefPtr<WebKitDOMCSSStyleDeclaration> kitDeclaration(kit(mutableStyle->ensureCSSStyleDeclaration()));
    GRefPtr<WebKitDOMRange> kitRange(adoptGRef(kit(range)));
    g_signal_emit_by_name(m_webView, "should-apply-style", kitDeclaration.get(), kitRange.get(), &accept);
    return accept;
}
コード例 #4
0
void LayoutMenuList::styleDidChange(StyleDifference diff,
                                    const ComputedStyle* oldStyle) {
  LayoutBlock::styleDidChange(diff, oldStyle);

  if (!m_innerBlock)
    createInnerBlock();

  m_buttonText->setStyle(mutableStyle());
  adjustInnerStyle();
  updateInnerBlockHeight();
}
コード例 #5
0
ファイル: WebEditorClient.cpp プロジェクト: sinoory/webv8
bool WebEditorClient::shouldApplyStyle(StyleProperties* style, Range* range)
{
    Ref<MutableStyleProperties> mutableStyle(style->isMutable() ? static_cast<MutableStyleProperties&>(*style) : style->mutableCopy());
#if ENABLE(INJECT_BUNDLE)
    bool result = m_page->injectedBundleEditorClient().shouldApplyStyle(m_page, mutableStyle->ensureCSSStyleDeclaration(), range);
    notImplemented();
    return result;
#else
    return false;
#endif
}
コード例 #6
0
void LayoutMenuList::createInnerBlock() {
  if (m_innerBlock) {
    ASSERT(firstChild() == m_innerBlock);
    ASSERT(!m_innerBlock->nextSibling());
    return;
  }

  // Create an anonymous block.
  ASSERT(!firstChild());
  m_innerBlock = createAnonymousBlock();

  m_buttonText = new LayoutText(&document(), StringImpl::empty());
  // We need to set the text explicitly though it was specified in the
  // constructor because LayoutText doesn't refer to the text
  // specified in the constructor in a case of re-transforming.
  m_buttonText->setStyle(mutableStyle());
  m_innerBlock->addChild(m_buttonText);

  adjustInnerStyle();
  LayoutFlexibleBox::addChild(m_innerBlock);
}