[Webkit-unassigned] [Bug 27325] New: copyInheritableProperties and removeComputedInheritablePropertiesFrom should be deprecated

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 15 17:46:23 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27325

           Summary: copyInheritableProperties and
                    removeComputedInheritablePropertiesFrom should be
                    deprecated
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML Editing
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ryosuke.niwa at gmail.com
                CC: eric at webkit.org, darin at apple.com, mitz at webkit.org,
                    justin.garcia at apple.com


removeComputedInheritablePropertiesFrom is not used anywhere and
copyInheritableProperties is used across the editing code but very
inconsistently.  copyInheritableProperties is poorly named considering the
usage of the function.  copyInheritableProperties should be deprecated and
callers should use a better named function.

Below are just examples of how copyInheritableProperties is used:

553 at ReplaceSelectionCommand.cpp
    RefPtr<CSSMutableStyleDeclaration> styleAtInsertionPos =
rangeCompliantEquivalent(insertionPos).computedStyle()->copyInheritableProperties();
    String styleText = styleAtInsertionPos->cssText();

    if (styleText ==
static_cast<Element*>(sourceDocumentStyleSpan)->getAttribute(styleAttr)) {

Here, it's used to compare the styles of the source and destination.


55 at RemoveFormatCommand.cpp
    // Get the default style for this editable root, it's the style that we'll
give the
    // content that we're operating on.
    Node* root = frame->selection()->rootEditableElement();
    RefPtr<CSSMutableStyleDeclaration> defaultStyle =
computedStyle(root)->copyInheritableProperties();

Here, it's used to copy styles.


281 at DeleteSelectionCommand.cpp
    // Figure out the typing style in effect before the delete is done.
    RefPtr<CSSComputedStyleDeclaration> computedStyle =
positionBeforeTabSpan(m_selectionToDelete.start()).computedStyle();
    m_typingStyle = computedStyle->copyInheritableProperties();

And here, it's used to retrieve the typing style.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list