-
rniwa@webkit.org authored
Reviewed by Darin Adler. Deploy EditingStyle in removeInlineStyleFromElement and removeCSSStyle https://bugs.webkit.org/show_bug.cgi?id=54944 Deployed EditingStyle in removeInlineStyleFromElement and removeCSSStyle. Also extracted EditingStyle::conflictsWithInlineStyleOfElement from ApplyStyleCommand::removeCSSStyle, which returns true iff the specified element has inline style that conflicts or matches the editing style. It also appends conflicting property IDs to the vector of property IDs if one is specified. * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyBlockStyle): Calls removeCSSStyle. (WebCore::ApplyStyleCommand::applyInlineStyle): Calls shouldSplitTextElement. (WebCore::ApplyStyleCommand::removeStyleFromRunBeforeApplyingStyle): Calls removeInlineStyleFromElement. (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Takes EditingStyle* instead of CSSMutableStyleDeclaration*. (WebCore::ApplyStyleCommand::removeCSSStyle): Ditto; extracted the logic to decide properties to remove as conflictsWithInlineStyleOfElement. (WebCore::ApplyStyleCommand::highestAncestorWithConflictingInlineStyle): Calls shouldRemoveInlineStyleFromElement. (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): Calls removeInlineStyleFromElement. (WebCore::ApplyStyleCommand::removeInlineStyle): Ditto. (WebCore::ApplyStyleCommand::shouldSplitTextElement): Takes EditingStyle* instead of CSSMutableStyleDeclaration*. * editing/ApplyStyleCommand.h: (WebCore::ApplyStyleCommand::shouldRemoveInlineStyleFromElement): Ditto. * editing/EditingStyle.cpp: (WebCore::EditingStyle::conflictsWithInlineStyleOfElement): Extracted from ApplyStyleCommand::removeCSSStyle. * editing/EditingStyle.h: (WebCore::EditingStyle::conflictsWithInlineStyleOfElement): Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79382 268f45cc-cd09-0410-ab3c-d52691b4dbfc
84b451c8