void LayoutTextControl::adjustInnerEditorStyle(ComputedStyle& textBlockStyle) const
{
    // The inner block, if present, always has its direction set to LTR,
    // so we need to inherit the direction and unicode-bidi style from the element.
    textBlockStyle.setDirection(style()->direction());
    textBlockStyle.setUnicodeBidi(style()->unicodeBidi());

    updateUserModifyProperty(*textFormControlElement(), textBlockStyle);
}
예제 #2
0
void RenderTextControl::adjustInnerTextStyle(const RenderStyle* startStyle, RenderStyle* textBlockStyle) const
{
    // The inner block, if present, always has its direction set to LTR,
    // so we need to inherit the direction and unicode-bidi style from the element.
    textBlockStyle->setDirection(style()->direction());
    textBlockStyle->setUnicodeBidi(style()->unicodeBidi());

    bool disabled = updateUserModifyProperty(node(), textBlockStyle);
    if (disabled)
        textBlockStyle->setColor(theme()->disabledTextColor(textBlockStyle->visitedDependentColor(CSSPropertyColor), startStyle->visitedDependentColor(CSSPropertyBackgroundColor)));
}
예제 #3
0
void RenderTextControl::adjustInnerTextStyle(const RenderStyle* startStyle, RenderStyle* textBlockStyle) const
{
    // The inner block, if present, always has its direction set to LTR,
    // so we need to inherit the direction and unicode-bidi style from the element.
    textBlockStyle->setDirection(style().direction());
    textBlockStyle->setUnicodeBidi(style().unicodeBidi());

    bool disabled = updateUserModifyProperty(textFormControlElement(), textBlockStyle);
    if (disabled)
        textBlockStyle->setColor(theme()->disabledTextColor(textBlockStyle->visitedDependentColor(CSSPropertyColor), startStyle->visitedDependentColor(CSSPropertyBackgroundColor)));
#if PLATFORM(IOS)
    if (textBlockStyle->textSecurity() != TSNONE && !textBlockStyle->isLeftToRightDirection()) {
        // Preserve the alignment but force the direction to LTR so that the last-typed, unmasked character
        // (which cannot have RTL directionality) will appear to the right of the masked characters. See <rdar://problem/7024375>.
        
        switch (textBlockStyle->textAlign()) {
        case TASTART:
        case JUSTIFY:
            textBlockStyle->setTextAlign(RIGHT);
            break;
        case TAEND:
            textBlockStyle->setTextAlign(LEFT);
            break;
        case LEFT:
        case RIGHT:
        case CENTER:
        case WEBKIT_LEFT:
        case WEBKIT_RIGHT:
        case WEBKIT_CENTER:
            break;
        }

        textBlockStyle->setDirection(LTR);
    }
#endif
}
예제 #4
0
void RenderTextControl::updateFromElement()
{
    Element* innerText = innerTextElement();
    if (innerText)
        updateUserModifyProperty(node(), innerText->renderer()->style());
}
예제 #5
0
void LayoutTextControl::updateFromElement() {
    Element* innerEditor = innerEditorElement();
    if (innerEditor && innerEditor->layoutObject())
        updateUserModifyProperty(*textControlElement(),
                                 innerEditor->layoutObject()->mutableStyleRef());
}
void RenderTextControl::updateFromElement()
{
    Element* innerEditor = innerEditorElement();
    if (innerEditor && innerEditor->renderer())
        updateUserModifyProperty(textFormControlElement(), innerEditor->renderer()->style());
}
예제 #7
0
void RenderTextControl::updateFromElement()
{
    TextControlInnerTextElement* innerText = innerTextElement();
    if (innerText && innerText->renderer())
        updateUserModifyProperty(textFormControlElement(), &innerText->renderer()->style());
}