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; }
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); } }
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; }
void LayoutMenuList::styleDidChange(StyleDifference diff, const ComputedStyle* oldStyle) { LayoutBlock::styleDidChange(diff, oldStyle); if (!m_innerBlock) createInnerBlock(); m_buttonText->setStyle(mutableStyle()); adjustInnerStyle(); updateInnerBlockHeight(); }
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 }
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); }