[webkit-reviews] review denied: [Bug 49058] CSSStyleDeclaration.getPropertyPriority() fails for CSS shorthand properties with 'important' priority : [Attachment 124948] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Feb 1 09:50:20 PST 2012
Andreas Kling <kling at webkit.org> has denied Alexis Menard (darktears)
<alexis.menard at openbossa.org>'s request for review:
Bug 49058: CSSStyleDeclaration.getPropertyPriority() fails for CSS shorthand
properties with 'important' priority
https://bugs.webkit.org/show_bug.cgi?id=49058
Attachment 124948: Patch
https://bugs.webkit.org/attachment.cgi?id=124948&action=review
------- Additional Comments from Andreas Kling <kling at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=124948&action=review
> Source/WebCore/ChangeLog:31
> +2012-02-01 Alexis Menard <alexis.menard at openbossa.org>
Double ChangeLog.
> Source/WebCore/css/CSSMutableStyleDeclaration.cpp:661
> +bool CSSMutableStyleDeclaration::hasPropertyImportantPriority(int
propertyID) const
I like propertyIsImportant(int propertyID) better.
> Source/WebCore/css/CSSMutableStyleDeclaration.cpp:689
> +// Only returns true if all properties have the same priority false
otherwise.
> +bool CSSMutableStyleDeclaration::hasImportantCommonPriority(const int*
properties, size_t size) const
> +{
> + bool res = hasPropertyImportantPriority(properties[0]);
> + // The first longhand doesn't have priority, we can assume the others
have equal priority.
> + // If not it doesn't matter as we can't anyway resolve the priority of
the shorthand.
> + if (!res)
> + return false;
> +
> + for (size_t i = 1; i < size; ++i) {
> + bool priority = hasPropertyImportantPriority(properties[i]);
> + if (res != priority)
> + return false;
> + }
> + return res;
> }
This function doesn't do what its name implies. It only checks that all
properties return true for hasPropertyImportantPriority() (since you return
early if !res)
> Source/WebCore/css/CSSMutableStyleDeclaration.h:147
> + bool hasImportantCommonPriority(const int* properties, size_t) const;
Should be static as it doesn't require an object.
More information about the webkit-reviews
mailing list