Fixed transfer annotation for default web context
https://bugs.webkit.org/show_bug.cgi?id=94314

Patch by Jesse van den Kieboom <jessevdk@gnome.org> on 2012-10-30
Reviewed by Martin Robinson.

Add a missing colon which prevented the transfer annotation of
webkit_web_context_get_default to be parsed correctly.

* UIProcess/API/gtk/WebKitWebContext.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132940 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid unnecessary style recalcs on class attribute mutation
https://bugs.webkit.org/show_bug.cgi?id=100776

Reviewed by Andreas Kling.

There is no need to invalidate element style on class attribute change if neither the added
or removed classes featured in any active stylesheet.

* css/RuleFeature.cpp:
(WebCore::RuleFeatureSet::add):
(WebCore::RuleFeatureSet::clear):
(WebCore::RuleFeatureSet::reportMemoryUsage):
* css/RuleFeature.h:
(RuleFeatureSet):
* css/RuleSet.cpp:
(WebCore::collectFeaturesFromSelector):
        
    Collect classes mentioned in CSS selectors the same way ids and attribute names are
    already collected.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::hasSelectorForClass):
        
    Add a method to test if a given class name is mentioned anywhere in stylehseets.

(WebCore):
* css/StyleResolver.h:
* css/StyleScopeResolver.h:
(WebCore):
* dom/Element.cpp:
(WebCore::collectAddedAndRemovedClasses):
(WebCore):
(WebCore::Element::classAttributeChanged):
        
    Figure out which classes were added and removed. Test if they are present in any style
    rule and invalidate the style only if they are.

* dom/SpaceSplitString.cpp:
(WebCore::SpaceSplitStringData::add):
(WebCore::SpaceSplitStringData::remove):
(WebCore::SpaceSplitString::add):
(WebCore::SpaceSplitString::remove):
        
    Added bool return value to indicate if anything was actually removed. Reorganized 
    the code a bit to avoid unnecessary uniquing when nothing changes.

* dom/SpaceSplitString.h:
(SpaceSplitStringData):
(SpaceSplitString):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132941 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS] Expand -webkit-line-break value space
https://bugs.webkit.org/show_bug.cgi?id=100739

Patch by Glenn Adams <glenn@skynav.com> on 2012-10-30
Reviewed by Eric Seidel.

Source/WebCore:

(1) expand -webkit-line-break to include new values defined by CSS3 Text [1], i.e., 'auto', 'strict', 'loose';
(2) change default (initial) value for -webkit-line-break to 'auto' to match CSS3 Text;
(3) rename enum EKHTMLLineBreak to LineBreak, renaming enum values appropriately;

New tests to be added when functionality of new values is added. No rendering behavior change at this time.
Only externally visible change is default (initial) value returning 'auto' rather than 'normal', for which 3 existing
tests that were sensitive to this value have been updated. Note that until the functionality for the new values is
added, any actual use of the new values will be treated as the same as the pre-existing 'normal' value, i.e., the
default semantics.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
Update from kthmlLineBreak() to lineBreak().

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
Update values supported for CSSPropertyWebkitLineBreak.

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator LineBreak):
Update LineBreak enumeration values (previously EKHTMLLineBreak).

* css/CSSValueKeywords.in:
Update keywords used for -webkit-line-break.

* css/StyleBuilder.cpp:
(WebCore::StyleBuilder::StyleBuilder):
Update names for line break style getter/setter.

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
Remove khtml prefix on line break related state.

* rendering/style/RenderStyle.h:
Remove khtml prefix on line break related methods. Update to redefined LineBreak
enumeration type.

* rendering/style/RenderStyleConstants.h:
Rename EKHTMLLineBreak enumeration to LineBreak.
Redefine LineBreak enumeration to include new CSS3 Text modes (auto, loose, strict) and
use better names.

* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
Remove khtml prefix on line break related state references.

* rendering/style/StyleRareInheritedData.h:
(StyleRareInheritedData):
Remove khtml prefix on line break related state. Widen field to 3 bits to support 8 values,
of which 5 are now used.

LayoutTests:

Change default (initial) value for -webkit-line-break to 'auto' to match CSS3 Text.

* fast/css/getComputedStyle/computed-style-expected.txt:
Fix for change of initial (default) value on -webkit-line-break from 'normal' to 'auto'.

* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
Fix for change of initial (default) value on -webkit-line-break from 'normal' to 'auto'.

* svg/css/getComputedStyle-basic-expected.txt:
Fix for change of initial (default) value on -webkit-line-break from 'normal' to 'auto'.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132942 268f45cc-cd09-0410-ab3c-d52691b4dbfc