示例#1
0
RefPtr<ImageControlsButtonElementMac> ImageControlsButtonElementMac::tryCreate(Document& document)
{
    if (!document.page())
        return nullptr;

    auto button = adoptRef(*new ImageControlsButtonElementMac(document));
    button->setAttributeWithoutSynchronization(HTMLNames::classAttr, AtomicString("x-webkit-image-controls-button", AtomicString::ConstructFromLiteral));

    IntSize positionOffset = document.page()->theme().imageControlsButtonPositionOffset();
    button->setInlineStyleProperty(CSSPropertyTop, positionOffset.height(), CSSPrimitiveValue::CSS_PX);

    // FIXME: Why is right: 0px off the right edge of the parent?
    button->setInlineStyleProperty(CSSPropertyRight, positionOffset.width(), CSSPrimitiveValue::CSS_PX);

    return WTFMove(button);
}
void HTMLTableHeaderCellElement::setScope(const AtomicString& scope)
{
    setAttributeWithoutSynchronization(HTMLNames::scopeAttr, scope);
}
示例#3
0
void SVGSVGElement::setContentStyleType(const AtomicString& type)
{
    setAttributeWithoutSynchronization(SVGNames::contentStyleTypeAttr, type);
}