[webkit-changes] [140642] trunk
Title: [140642] trunk Revision 140642 Author macpher...@chromium.org Date 2013-01-23 20:44:10 -0800 (Wed, 23 Jan 2013) Log Message Support variables inside -webkit-box-reflect CSS property. https://bugs.webkit.org/show_bug.cgi?id=106856 Source/WebCore: Reviewed by Tony Chang. The primary change is to make the direction parameter a CSSPrimitiveValue style ident, so that it can also be a variable reference. Covered by existing LayoutTests/compositing/reflections/ tests. Added Test: fast/css/variables/var-inside-box-reflect.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForReflection): * css/CSSParser.cpp: (WebCore::CSSParser::parseReflect): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore): (WebCore::CSSPrimitiveValue::operator CSSReflectionDirection): (WebCore::CSSPrimitiveValue::convertToLength): * css/CSSReflectValue.cpp: (WebCore::CSSReflectValue::customCssText): Use String addition operator instead of StringBuilder. (WebCore): (WebCore::CSSReflectValue::customSerializeResolvingVariables): Use String addition operator instead of StringBuilder. * css/CSSReflectValue.h: (WebCore::CSSReflectValue::create): (WebCore::CSSReflectValue::direction): (CSSReflectValue): (WebCore::CSSReflectValue::CSSReflectValue): * css/CSSValue.cpp: (WebCore::CSSValue::serializeResolvingVariables): * css/StyleResolver.cpp: (WebCore::hasVariableReference): (WebCore::StyleResolver::applyProperty): LayoutTests: Adds test for variables as -webkit-box-reflect parameters. Reviewed by Tony Chang. * fast/css/variables/var-inside-box-reflect-expected.html: Added. * fast/css/variables/var-inside-box-reflect.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp trunk/Source/WebCore/css/CSSParser.cpp trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h trunk/Source/WebCore/css/CSSReflectValue.cpp trunk/Source/WebCore/css/CSSReflectValue.h trunk/Source/WebCore/css/CSSValue.cpp trunk/Source/WebCore/css/StyleResolver.cpp Added Paths trunk/LayoutTests/fast/css/variables/var-inside-box-reflect-expected.html trunk/LayoutTests/fast/css/variables/var-inside-box-reflect.html Diff Modified: trunk/LayoutTests/ChangeLog (140641 => 140642) --- trunk/LayoutTests/ChangeLog 2013-01-24 04:29:04 UTC (rev 140641) +++ trunk/LayoutTests/ChangeLog 2013-01-24 04:44:10 UTC (rev 140642) @@ -1,3 +1,15 @@ +2013-01-23 Luke Macpherson + +Support variables inside -webkit-box-reflect CSS property. +https://bugs.webkit.org/show_bug.cgi?id=106856 + +Adds test for variables as -webkit-box-reflect parameters. + +Reviewed by Tony Chang. + +* fast/css/variables/var-inside-box-reflect-expected.html: Added. +* fast/css/variables/var-inside-box-reflect.html: Added. + 2013-01-23 Rafael Weinstein Template element should parse in XHTML just as it does in HTML Added: trunk/LayoutTests/fast/css/variables/var-inside-box-reflect-expected.html (0 => 140642) --- trunk/LayoutTests/fast/css/variables/var-inside-box-reflect-expected.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/var-inside-box-reflect-expected.html 2013-01-24 04:44:10 UTC (rev 140642) @@ -0,0 +1,9 @@ + + + +div { + -webkit-box-reflect: below 5px; +} + +This text should be reflected on the right. + Added: trunk/LayoutTests/fast/css/variables/var-inside-box-reflect.html (0 => 140642) --- trunk/LayoutTests/fast/css/variables/var-inside-box-reflect.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/var-inside-box-reflect.html 2013-01-24 04:44:10 UTC (rev 140642) @@ -0,0 +1,15 @@ + + + +if (window.internals) +internals.settings.setCSSVariablesEnabled(true); + + +div { + -webkit-box-reflect: -webkit-var(a) -webkit-calc(-webkit-var(b)); + -webkit-var-a: below; + -webkit-var-b: 5px; +} + +This text should be reflected on the right. + Modified: trunk/Source/WebCore/ChangeLog (140641 => 140642) --- trunk/Source/WebCore/ChangeLog 2013-01-24 04:29:04 UTC (rev 140641) +++ trunk/Source/WebCore/ChangeLog 2013-01-24 04:44:10 UTC (rev 140642) @@ -1,3 +1,42 @@ +2013-01-23 Luke Macpherson + +Support variables inside -webkit-box-reflect CSS property. +https://bugs.webkit.org/show_bug.cgi?id=106856 + +Reviewed by Tony Chang. + +The primary change is to make the direction parameter a CSSPrimitiveValue style ident, +so that it can also be a variable reference. + +Covered by existing LayoutTests/compositing/reflections/ tests. +Added Test: fast/css/variables/var-inside-box-reflect.html + +* css/CSSComputedStyleDeclaration.cpp: +(WebCore::valueForReflection): +* css/CSSParser.cpp: +(WebCore::CSSParser::parseReflect): +* css/CSSPrimitiveValueMappings.h: +(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): +
[webkit-changes] [139808] trunk/Source/WebCore
Title: [139808] trunk/Source/WebCore Revision 139808 Author macpher...@chromium.org Date 2013-01-15 16:16:22 -0800 (Tue, 15 Jan 2013) Log Message Don't do indiscriminate cast & call in StylePropertySet::PropertyReference::cssName() on release builds. https://bugs.webkit.org/show_bug.cgi?id=106867 Reviewed by Darin Adler. Check CSSValue::isVariableValue() before casting to CSSVariableValue. Covered by existing variables tests. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::PropertyReference::cssName): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/StylePropertySet.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (139807 => 139808) --- trunk/Source/WebCore/ChangeLog 2013-01-16 00:14:57 UTC (rev 139807) +++ trunk/Source/WebCore/ChangeLog 2013-01-16 00:16:22 UTC (rev 139808) @@ -1,3 +1,17 @@ +2013-01-15 Luke Macpherson + +Don't do indiscriminate cast & call in StylePropertySet::PropertyReference::cssName() on release builds. +https://bugs.webkit.org/show_bug.cgi?id=106867 + +Reviewed by Darin Adler. + +Check CSSValue::isVariableValue() before casting to CSSVariableValue. + +Covered by existing variables tests. + +* css/StylePropertySet.cpp: +(WebCore::StylePropertySet::PropertyReference::cssName): + 2013-01-15 Emil A Eklund [Sub pixel layout] RTL cells with padding wraps Modified: trunk/Source/WebCore/css/StylePropertySet.cpp (139807 => 139808) --- trunk/Source/WebCore/css/StylePropertySet.cpp 2013-01-16 00:14:57 UTC (rev 139807) +++ trunk/Source/WebCore/css/StylePropertySet.cpp 2013-01-16 00:16:22 UTC (rev 139808) @@ -1247,6 +1247,8 @@ #if ENABLE(CSS_VARIABLES) if (id() == CSSPropertyVariable) { ASSERT(propertyValue()->isVariableValue()); +if (!propertyValue()->isVariableValue()) +return emptyString(); // Should not happen, but if it does, avoid a bad cast. return "-webkit-var-" + static_cast(propertyValue())->name(); } #endif ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [138685] trunk/LayoutTests
Title: [138685] trunk/LayoutTests Revision 138685 Author macpher...@chromium.org Date 2013-01-02 17:11:01 -0800 (Wed, 02 Jan 2013) Log Message Unreviewed Chromium gardening. Rebaseline win-xp image for svg/dynamic-updates/SVGFEComponentTransferElement-dom-tableValues-attr-expected.html. * platform/chromium-win-xp/svg/dynamic-updates/SVGFEComponentTransferElement-dom-tableValues-attr-expected.png: Added. Modified Paths trunk/LayoutTests/ChangeLog Added Paths trunk/LayoutTests/platform/chromium-win-xp/svg/dynamic-updates/SVGFEComponentTransferElement-dom-tableValues-attr-expected.png Diff Modified: trunk/LayoutTests/ChangeLog (138684 => 138685) --- trunk/LayoutTests/ChangeLog 2013-01-03 01:10:24 UTC (rev 138684) +++ trunk/LayoutTests/ChangeLog 2013-01-03 01:11:01 UTC (rev 138685) @@ -1,3 +1,11 @@ +2013-01-02 Luke Macpherson + +Unreviewed Chromium gardening. + +Rebaseline win-xp image for svg/dynamic-updates/SVGFEComponentTransferElement-dom-tableValues-attr-expected.html. + +* platform/chromium-win-xp/svg/dynamic-updates/SVGFEComponentTransferElement-dom-tableValues-attr-expected.png: Added. + 2013-01-02 Bem Jones-Bey When a block's height is determined by min-height/max-height, children with percentage heights are sized incorrectly Added: trunk/LayoutTests/platform/chromium-win-xp/svg/dynamic-updates/SVGFEComponentTransferElement-dom-tableValues-attr-expected.png (Binary files differ) Property changes on: trunk/LayoutTests/platform/chromium-win-xp/svg/dynamic-updates/SVGFEComponentTransferElement-dom-tableValues-attr-expected.png ___ Added: svn:mime-type ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [137984] trunk/Source/WebCore
Title: [137984] trunk/Source/WebCore Revision 137984 Author macpher...@chromium.org Date 2012-12-17 21:35:34 -0800 (Mon, 17 Dec 2012) Log Message Add ASSERTions to ensure that CSSPropertys that are variables only ever refer to CSSValues that are variables. https://bugs.webkit.org/show_bug.cgi?id=104876 Reviewed by Steve Block. Add assertions to CSSProperty constructors to make that if it is initialized with CSSPropertyVariable that the value type associated with it is also a variable. This is already asserted at read time, but ASSERTing here will produce a more useful backtrace. No new tests as functionality unchanged. * css/CSSProperty.h: (WebCore::CSSProperty::CSSProperty): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSProperty.h Diff Modified: trunk/Source/WebCore/ChangeLog (137983 => 137984) --- trunk/Source/WebCore/ChangeLog 2012-12-18 05:30:10 UTC (rev 137983) +++ trunk/Source/WebCore/ChangeLog 2012-12-18 05:35:34 UTC (rev 137984) @@ -1,3 +1,19 @@ +2012-12-17 Luke Macpherson + +Add ASSERTions to ensure that CSSPropertys that are variables only ever refer to CSSValues that are variables. +https://bugs.webkit.org/show_bug.cgi?id=104876 + +Reviewed by Steve Block. + +Add assertions to CSSProperty constructors to make that if it is initialized with CSSPropertyVariable that +the value type associated with it is also a variable. This is already asserted at read time, but ASSERTing +here will produce a more useful backtrace. + +No new tests as functionality unchanged. + +* css/CSSProperty.h: +(WebCore::CSSProperty::CSSProperty): + 2012-12-17 Vsevolod Vlasov Web Inspector: Make inspector scripts sourceURL absolute. Modified: trunk/Source/WebCore/css/CSSProperty.h (137983 => 137984) --- trunk/Source/WebCore/css/CSSProperty.h 2012-12-18 05:30:10 UTC (rev 137983) +++ trunk/Source/WebCore/css/CSSProperty.h 2012-12-18 05:35:34 UTC (rev 137984) @@ -57,6 +57,9 @@ : m_metadata(propertyID, shorthandID, important, implicit, isInheritedProperty(propertyID)) , m_value(value) { +#if ENABLE(CSS_VARIABLES) +ASSERT((propertyID == CSSPropertyVariable) == (m_value && m_value->isVariableValue())); +#endif } // FIXME: Remove this. @@ -64,6 +67,9 @@ : m_metadata(metadata) , m_value(value) { +#if ENABLE(CSS_VARIABLES) +ASSERT((metadata.m_propertyID == CSSPropertyVariable) == (m_value && m_value->isVariableValue())); +#endif } CSSPropertyID id() const { return static_cast(m_metadata.m_propertyID); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [137569] trunk/Source/WebCore
Title: [137569] trunk/Source/WebCore Revision 137569 Author macpher...@chromium.org Date 2012-12-12 22:15:10 -0800 (Wed, 12 Dec 2012) Log Message Add ASSERTions to ensure that CSSPropertys that are variables only ever refer to CSSValues that are variables. https://bugs.webkit.org/show_bug.cgi?id=104876 Reviewed by Steve Block. Add assertions to CSSProperty constructors to make that if it is initialized with CSSPropertyVariable that the value type associated with it is also a variable. This is already asserted at read time, but ASSERTing here will produce a more useful backtrace. No new tests as functionality unchanged. * css/CSSProperty.h: (WebCore::CSSProperty::CSSProperty): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSProperty.h Diff Modified: trunk/Source/WebCore/ChangeLog (137568 => 137569) --- trunk/Source/WebCore/ChangeLog 2012-12-13 05:51:43 UTC (rev 137568) +++ trunk/Source/WebCore/ChangeLog 2012-12-13 06:15:10 UTC (rev 137569) @@ -1,3 +1,19 @@ +2012-12-12 Luke Macpherson + +Add ASSERTions to ensure that CSSPropertys that are variables only ever refer to CSSValues that are variables. +https://bugs.webkit.org/show_bug.cgi?id=104876 + +Reviewed by Steve Block. + +Add assertions to CSSProperty constructors to make that if it is initialized with CSSPropertyVariable that +the value type associated with it is also a variable. This is already asserted at read time, but ASSERTing +here will produce a more useful backtrace. + +No new tests as functionality unchanged. + +* css/CSSProperty.h: +(WebCore::CSSProperty::CSSProperty): + 2012-12-12 Gyuyoung Kim NetworkInfoController needs to support destructor Modified: trunk/Source/WebCore/css/CSSProperty.h (137568 => 137569) --- trunk/Source/WebCore/css/CSSProperty.h 2012-12-13 05:51:43 UTC (rev 137568) +++ trunk/Source/WebCore/css/CSSProperty.h 2012-12-13 06:15:10 UTC (rev 137569) @@ -57,6 +57,9 @@ : m_metadata(propertyID, shorthandID, important, implicit, isInheritedProperty(propertyID)) , m_value(value) { +#if ENABLE(CSS_VARIABLES) +ASSERT((propertyID == CSSPropertyVariable) == (value && value->isVariableValue())); +#endif } // FIXME: Remove this. @@ -64,6 +67,9 @@ : m_metadata(metadata) , m_value(value) { +#if ENABLE(CSS_VARIABLES) +ASSERT((metadata.m_propertyID == CSSPropertyVariable) == (value && value->isVariableValue())); +#endif } CSSPropertyID id() const { return static_cast(m_metadata.m_propertyID); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [135760] trunk/Source/WebCore
Title: [135760] trunk/Source/WebCore Revision 135760 Author macpher...@chromium.org Date 2012-11-26 13:44:10 -0800 (Mon, 26 Nov 2012) Log Message Make StyleResolver::applyProperty use isInherit in CSSPropertyWebkitMarquee instead of calculating equivalent in-place. https://bugs.webkit.org/show_bug.cgi?id=102446 Reviewed by Tony Chang. !m_parentNode || !value->isInheritedValue() is equivalent to !isInherit (by De Morgan's law). No new tests / code is provably equivalent. * css/StyleResolver.cpp: (WebCore::StyleResolver::applyProperty): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/StyleResolver.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (135759 => 135760) --- trunk/Source/WebCore/ChangeLog 2012-11-26 21:41:28 UTC (rev 135759) +++ trunk/Source/WebCore/ChangeLog 2012-11-26 21:44:10 UTC (rev 135760) @@ -1,3 +1,17 @@ +2012-11-26 Luke Macpherson + +Make StyleResolver::applyProperty use isInherit in CSSPropertyWebkitMarquee instead of calculating equivalent in-place. +https://bugs.webkit.org/show_bug.cgi?id=102446 + +Reviewed by Tony Chang. + +!m_parentNode || !value->isInheritedValue() is equivalent to !isInherit (by De Morgan's law). + +No new tests / code is provably equivalent. + +* css/StyleResolver.cpp: +(WebCore::StyleResolver::applyProperty): + 2012-11-26 Pratik Solanki Add ResourceBuffer::append(CFDataRef) to get code to compile with USE(NETWORK_CFDATA_ARRAY_CALLBACK) Modified: trunk/Source/WebCore/css/StyleResolver.cpp (135759 => 135760) --- trunk/Source/WebCore/css/StyleResolver.cpp 2012-11-26 21:41:28 UTC (rev 135759) +++ trunk/Source/WebCore/css/StyleResolver.cpp 2012-11-26 21:44:10 UTC (rev 135760) @@ -3190,7 +3190,7 @@ m_style->resetColumnRule(); return; case CSSPropertyWebkitMarquee: -if (!m_parentNode || !value->isInheritedValue()) +if (!isInherit) return; m_style->setMarqueeDirection(m_parentStyle->marqueeDirection()); m_style->setMarqueeIncrement(m_parentStyle->marqueeIncrement()); ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [134861] trunk/Source/WebCore
Title: [134861] trunk/Source/WebCore Revision 134861 Author macpher...@chromium.org Date 2012-11-15 16:49:03 -0800 (Thu, 15 Nov 2012) Log Message Remove unused macro HANDLE_INHERIT_AND_INITIAL_WITH_VALUE in StyleResolver.cpp https://bugs.webkit.org/show_bug.cgi?id=102036 Reviewed by Darin Adler. Remove HANDLE_INHERIT_AND_INITIAL_WITH_VALUE macro, as it is not used anywhere. No tests added because code is unused, and compile is enough to verify that conculsively. * css/StyleResolver.cpp: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/StyleResolver.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (134860 => 134861) --- trunk/Source/WebCore/ChangeLog 2012-11-16 00:47:01 UTC (rev 134860) +++ trunk/Source/WebCore/ChangeLog 2012-11-16 00:49:03 UTC (rev 134861) @@ -1,3 +1,16 @@ +2012-11-15 Luke Macpherson + +Remove unused macro HANDLE_INHERIT_AND_INITIAL_WITH_VALUE in StyleResolver.cpp +https://bugs.webkit.org/show_bug.cgi?id=102036 + +Reviewed by Darin Adler. + +Remove HANDLE_INHERIT_AND_INITIAL_WITH_VALUE macro, as it is not used anywhere. + +No tests added because code is unused, and compile is enough to verify that conculsively. + +* css/StyleResolver.cpp: + 2012-11-15 Erik Arvidsson Update DOMException name: SyntaxError Modified: trunk/Source/WebCore/css/StyleResolver.cpp (134860 => 134861) --- trunk/Source/WebCore/css/StyleResolver.cpp 2012-11-16 00:47:01 UTC (rev 134860) +++ trunk/Source/WebCore/css/StyleResolver.cpp 2012-11-16 00:49:03 UTC (rev 134861) @@ -202,13 +202,6 @@ return; \ } -#define HANDLE_INHERIT_AND_INITIAL_WITH_VALUE(prop, Prop, Value) \ -HANDLE_INHERIT(prop, Prop) \ -if (isInitial) { \ -m_style->set##Prop(RenderStyle::initial##Value());\ -return;\ -} - static RuleSet* defaultStyle; static RuleSet* defaultQuirksStyle; static RuleSet* defaultPrintStyle; ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [134846] trunk/Source/WebCore
Title: [134846] trunk/Source/WebCore Revision 134846 Author macpher...@chromium.org Date 2012-11-15 16:13:29 -0800 (Thu, 15 Nov 2012) Log Message Make assumptions about m_parentStyle consistent within StyleResolver::applyProperty() https://bugs.webkit.org/show_bug.cgi?id=101696 Reviewed by Tony Chang. Most of the code in StyleResolver::applyProperty assumes that isInherit implies that m_parentStyle is available. This patch ASSERTs that this assumption is correct, and removes the few existing checks to maintain consistency. No new tests / covered by all existing CSS tests. * css/StyleResolver.cpp: (WebCore::StyleResolver::applyProperty): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/StyleResolver.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (134845 => 134846) --- trunk/Source/WebCore/ChangeLog 2012-11-16 00:12:17 UTC (rev 134845) +++ trunk/Source/WebCore/ChangeLog 2012-11-16 00:13:29 UTC (rev 134846) @@ -1,3 +1,18 @@ +2012-11-15 Luke Macpherson + +Make assumptions about m_parentStyle consistent within StyleResolver::applyProperty() +https://bugs.webkit.org/show_bug.cgi?id=101696 + +Reviewed by Tony Chang. + +Most of the code in StyleResolver::applyProperty assumes that isInherit implies that m_parentStyle is available. +This patch ASSERTs that this assumption is correct, and removes the few existing checks to maintain consistency. + +No new tests / covered by all existing CSS tests. + +* css/StyleResolver.cpp: +(WebCore::StyleResolver::applyProperty): + 2012-11-15 Kentaro Hara [V8] Remove redundant $interfaceName from function parameters Modified: trunk/Source/WebCore/css/StyleResolver.cpp (134845 => 134846) --- trunk/Source/WebCore/css/StyleResolver.cpp 2012-11-16 00:12:17 UTC (rev 134845) +++ trunk/Source/WebCore/css/StyleResolver.cpp 2012-11-16 00:13:29 UTC (rev 134846) @@ -2817,13 +2817,14 @@ bool isInitial = value->isInitialValue() || (!m_parentNode && value->isInheritedValue()); ASSERT(!isInherit || !isInitial); // isInherit -> !isInitial && isInitial -> !isInherit +ASSERT(!isInherit || (m_parentNode && m_parentStyle)); // isInherit -> (m_parentNode && m_parentStyle) if (!applyPropertyToRegularStyle() && (!applyPropertyToVisitedLinkStyle() || !isValidVisitedLinkProperty(id))) { // Limit the properties that can be applied to only the ones honored by :visited. return; } -if (isInherit && m_parentStyle && !m_parentStyle->hasExplicitlyInheritedProperties() && !CSSProperty::isInheritedProperty(id)) +if (isInherit && !m_parentStyle->hasExplicitlyInheritedProperties() && !CSSProperty::isInheritedProperty(id)) m_parentStyle->setHasExplicitlyInheritedProperties(); #if ENABLE(CSS_VARIABLES) @@ -2953,8 +2954,7 @@ } case CSSPropertyQuotes: if (isInherit) { -if (m_parentStyle) -m_style->setQuotes(m_parentStyle->quotes()); +m_style->setQuotes(m_parentStyle->quotes()); return; } if (isInitial) { ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [131968] trunk/Source/WebCore
Title: [131968] trunk/Source/WebCore Revision 131968 Author macpher...@chromium.org Date 2012-10-19 18:02:34 -0700 (Fri, 19 Oct 2012) Log Message Remove HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro in StyleResolver. https://bugs.webkit.org/show_bug.cgi?id=99782 Reviewed by Sam Weinig. Removes last usage of HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro, so that in future there will be no temptation to use it instead of adding a line to StyleBuilder. Also removes redundant checks for inital and inherit (HANDLE_INHERIT_AND_INTIAL already returns in those cases). I don't want to move this code into StyleBuilder until the FIXME that is already there is fixed. Covered by many existing writing mode tests (eg. fast/html/details-writing-mode.html) * css/StyleResolver.cpp: (WebCore): (WebCore::StyleResolver::applyProperty): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/StyleResolver.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (131967 => 131968) --- trunk/Source/WebCore/ChangeLog 2012-10-20 00:55:33 UTC (rev 131967) +++ trunk/Source/WebCore/ChangeLog 2012-10-20 01:02:34 UTC (rev 131968) @@ -1,3 +1,21 @@ +2012-10-19 Luke Macpherson + +Remove HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro in StyleResolver. +https://bugs.webkit.org/show_bug.cgi?id=99782 + +Reviewed by Sam Weinig. + +Removes last usage of HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro, so that in future there will be no temptation +to use it instead of adding a line to StyleBuilder. +Also removes redundant checks for inital and inherit (HANDLE_INHERIT_AND_INTIAL already returns in those cases). +I don't want to move this code into StyleBuilder until the FIXME that is already there is fixed. + +Covered by many existing writing mode tests (eg. fast/html/details-writing-mode.html) + +* css/StyleResolver.cpp: +(WebCore): +(WebCore::StyleResolver::applyProperty): + 2012-10-19 Joshua Bell IndexedDB: Hidden indexing events are visible to script via bubbling/capture Modified: trunk/Source/WebCore/css/StyleResolver.cpp (131967 => 131968) --- trunk/Source/WebCore/css/StyleResolver.cpp 2012-10-20 00:55:33 UTC (rev 131967) +++ trunk/Source/WebCore/css/StyleResolver.cpp 2012-10-20 01:02:34 UTC (rev 131968) @@ -199,12 +199,6 @@ return;\ } -#define HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(prop, Prop) \ -HANDLE_INHERIT_AND_INITIAL(prop, Prop) \ -if (primitiveValue) \ -m_style->set##Prop(*primitiveValue); - - static RuleSet* defaultStyle; static RuleSet* defaultQuirksStyle; static RuleSet* defaultPrintStyle; @@ -3538,9 +3532,13 @@ // CSS Text Layout Module Level 3: Vertical writing support case CSSPropertyWebkitWritingMode: { -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(writingMode, WritingMode) +HANDLE_INHERIT_AND_INITIAL(writingMode, WritingMode); + +if (primitiveValue) +m_style->setWritingMode(*primitiveValue); + // FIXME: It is not ok to modify document state while applying style. -if (!isInherit && !isInitial && m_element && m_element == m_element->document()->documentElement()) +if (m_element && m_element == m_element->document()->documentElement()) m_element->document()->setWritingModeSetOnDocumentElement(true); FontDescription fontDescription = m_style->fontDescription(); fontDescription.setOrientation(m_style->isHorizontalWritingMode() ? Horizontal : Vertical); ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [131677] trunk/Source/WebCore
Title: [131677] trunk/Source/WebCore Revision 131677 Author macpher...@chromium.org Date 2012-10-17 17:18:16 -0700 (Wed, 17 Oct 2012) Log Message Move handling of CSSPropertyWebkitLineClamp from StyleResolver into StyleBuilder. https://bugs.webkit.org/show_bug.cgi?id=99534 Reviewed by Alexis Menard. One small step towards removing the giant switch statement in StyleResolver, this patch moves line clamp handling into StyleBuilder. Covered by fast/overflow/line-clamp.html * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): * css/StyleResolver.cpp: (WebCore::StyleResolver::applyProperty): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/StyleBuilder.cpp trunk/Source/WebCore/css/StyleResolver.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (131676 => 131677) --- trunk/Source/WebCore/ChangeLog 2012-10-18 00:09:04 UTC (rev 131676) +++ trunk/Source/WebCore/ChangeLog 2012-10-18 00:18:16 UTC (rev 131677) @@ -1,3 +1,19 @@ +2012-10-17 Luke Macpherson + +Move handling of CSSPropertyWebkitLineClamp from StyleResolver into StyleBuilder. +https://bugs.webkit.org/show_bug.cgi?id=99534 + +Reviewed by Alexis Menard. + +One small step towards removing the giant switch statement in StyleResolver, this patch moves line clamp handling into StyleBuilder. + +Covered by fast/overflow/line-clamp.html + +* css/StyleBuilder.cpp: +(WebCore::StyleBuilder::StyleBuilder): +* css/StyleResolver.cpp: +(WebCore::StyleResolver::applyProperty): + 2012-10-17 Andy Estes [WebKit2] Add removeChild: to WKDOMNode and make WKDOMText.data read/write Modified: trunk/Source/WebCore/css/StyleBuilder.cpp (131676 => 131677) --- trunk/Source/WebCore/css/StyleBuilder.cpp 2012-10-18 00:09:04 UTC (rev 131676) +++ trunk/Source/WebCore/css/StyleBuilder.cpp 2012-10-18 00:18:16 UTC (rev 131677) @@ -2003,6 +2003,7 @@ setPropertyHandler(CSSPropertyWebkitHyphens, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitLineAlign, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitLineBreak, ApplyPropertyDefault::createHandler()); +setPropertyHandler(CSSPropertyWebkitLineClamp, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitLineGrid, ApplyPropertyString::createHandler()); setPropertyHandler(CSSPropertyWebkitLineSnap, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitMarginAfterCollapse, ApplyPropertyDefault::createHandler()); Modified: trunk/Source/WebCore/css/StyleResolver.cpp (131676 => 131677) --- trunk/Source/WebCore/css/StyleResolver.cpp 2012-10-18 00:09:04 UTC (rev 131676) +++ trunk/Source/WebCore/css/StyleResolver.cpp 2012-10-18 00:18:16 UTC (rev 131677) @@ -3318,9 +3318,6 @@ } return; } -case CSSPropertyWebkitLineClamp: -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(lineClamp, LineClamp) -return; case CSSPropertyWebkitLocale: { HANDLE_INHERIT_AND_INITIAL(locale, Locale); if (!primitiveValue) @@ -3835,6 +3832,7 @@ case CSSPropertyWebkitHyphens: case CSSPropertyWebkitLineAlign: case CSSPropertyWebkitLineBreak: +case CSSPropertyWebkitLineClamp: case CSSPropertyWebkitLineGrid: case CSSPropertyWebkitLineSnap: case CSSPropertyWebkitMarqueeDirection: ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [131586] trunk/Source/WebCore
Title: [131586] trunk/Source/WebCore Revision 131586 Author macpher...@chromium.org Date 2012-10-17 04:30:23 -0700 (Wed, 17 Oct 2012) Log Message Move handling of CSSPropertyPointerEvents from StyleResolver into StyleBuilder. https://bugs.webkit.org/show_bug.cgi?id=99536 Reviewed by Alexis Menard. One small step towards removing the giant switch statement in StyleResolver, this patch moves pointer event property into StyleBuilder. Covered by fast/events/pointer-events.html and fast/events/pointer-events-2.html. * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): * css/StyleResolver.cpp: (WebCore::StyleResolver::applyProperty): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/StyleBuilder.cpp trunk/Source/WebCore/css/StyleResolver.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (131585 => 131586) --- trunk/Source/WebCore/ChangeLog 2012-10-17 11:28:39 UTC (rev 131585) +++ trunk/Source/WebCore/ChangeLog 2012-10-17 11:30:23 UTC (rev 131586) @@ -1,3 +1,20 @@ +2012-10-17 Luke Macpherson + +Move handling of CSSPropertyPointerEvents from StyleResolver into StyleBuilder. +https://bugs.webkit.org/show_bug.cgi?id=99536 + +Reviewed by Alexis Menard. + +One small step towards removing the giant switch statement in StyleResolver, +this patch moves pointer event property into StyleBuilder. + +Covered by fast/events/pointer-events.html and fast/events/pointer-events-2.html. + +* css/StyleBuilder.cpp: +(WebCore::StyleBuilder::StyleBuilder): +* css/StyleResolver.cpp: +(WebCore::StyleResolver::applyProperty): + 2012-10-17 Keishi Hattori Localized date should be based on LDML Modified: trunk/Source/WebCore/css/StyleBuilder.cpp (131585 => 131586) --- trunk/Source/WebCore/css/StyleBuilder.cpp 2012-10-17 11:28:39 UTC (rev 131585) +++ trunk/Source/WebCore/css/StyleBuilder.cpp 2012-10-17 11:30:23 UTC (rev 131586) @@ -1906,6 +1906,7 @@ setPropertyHandler(CSSPropertyPageBreakAfter, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyPageBreakBefore, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyPageBreakInside, ApplyPropertyDefault::createHandler()); +setPropertyHandler(CSSPropertyPointerEvents, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyPosition, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyResize, ApplyPropertyResize::createHandler()); setPropertyHandler(CSSPropertyRight, ApplyPropertyLength<&RenderStyle::right, &RenderStyle::setRight, &RenderStyle::initialOffset, AutoEnabled>::createHandler()); Modified: trunk/Source/WebCore/css/StyleResolver.cpp (131585 => 131586) --- trunk/Source/WebCore/css/StyleResolver.cpp 2012-10-17 11:28:39 UTC (rev 131585) +++ trunk/Source/WebCore/css/StyleResolver.cpp 2012-10-17 11:30:23 UTC (rev 131586) @@ -3459,11 +3459,6 @@ else if (isInherit) m_style->inheritTransitions(m_parentStyle->transitions()); return; -case CSSPropertyPointerEvents: -{ -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(pointerEvents, PointerEvents) -return; -} #if ENABLE(TOUCH_EVENTS) case CSSPropertyWebkitTapHighlightColor: { HANDLE_INHERIT_AND_INITIAL(tapHighlightColor, TapHighlightColor); @@ -3747,6 +3742,7 @@ case CSSPropertyPageBreakAfter: case CSSPropertyPageBreakBefore: case CSSPropertyPageBreakInside: +case CSSPropertyPointerEvents: case CSSPropertyPosition: case CSSPropertyResize: case CSSPropertyRight: ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [131443] trunk/Source/WebCore
Title: [131443] trunk/Source/WebCore Revision 131443 Author macpher...@chromium.org Date 2012-10-16 05:13:55 -0700 (Tue, 16 Oct 2012) Log Message Handle CSSPropertyOpacity in StyleBuilder. https://bugs.webkit.org/show_bug.cgi?id=99418 Reviewed by Alexis Menard. One small step in moving from the huge switch in StyleResolver::applyProperty() to the StyleBuilder approach. Covered by many existing tests, for example fast/text/complex-text-opacity.html. * css/StyleBuilder.cpp: (WebCore::StyleBuilder::StyleBuilder): * css/StyleResolver.cpp: (WebCore::StyleResolver::applyProperty): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/StyleBuilder.cpp trunk/Source/WebCore/css/StyleResolver.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (131442 => 131443) --- trunk/Source/WebCore/ChangeLog 2012-10-16 12:05:02 UTC (rev 131442) +++ trunk/Source/WebCore/ChangeLog 2012-10-16 12:13:55 UTC (rev 131443) @@ -1,3 +1,19 @@ +2012-10-16 Luke Macpherson + +Handle CSSPropertyOpacity in StyleBuilder. +https://bugs.webkit.org/show_bug.cgi?id=99418 + +Reviewed by Alexis Menard. + +One small step in moving from the huge switch in StyleResolver::applyProperty() to the StyleBuilder approach. + +Covered by many existing tests, for example fast/text/complex-text-opacity.html. + +* css/StyleBuilder.cpp: +(WebCore::StyleBuilder::StyleBuilder): +* css/StyleResolver.cpp: +(WebCore::StyleResolver::applyProperty): + 2012-10-16 Kent Tamura Fix some appearance glitches of multiple fields input elements Modified: trunk/Source/WebCore/css/StyleBuilder.cpp (131442 => 131443) --- trunk/Source/WebCore/css/StyleBuilder.cpp 2012-10-16 12:05:02 UTC (rev 131442) +++ trunk/Source/WebCore/css/StyleBuilder.cpp 2012-10-16 12:13:55 UTC (rev 131443) @@ -1887,6 +1887,7 @@ setPropertyHandler(CSSPropertyMaxWidth, ApplyPropertyLength<&RenderStyle::maxWidth, &RenderStyle::setMaxWidth, &RenderStyle::initialMaxSize, AutoEnabled, LegacyIntrinsicEnabled, IntrinsicEnabled, NoneEnabled, UndefinedEnabled>::createHandler()); setPropertyHandler(CSSPropertyMinHeight, ApplyPropertyLength<&RenderStyle::minHeight, &RenderStyle::setMinHeight, &RenderStyle::initialMinSize, AutoEnabled, LegacyIntrinsicEnabled, IntrinsicDisabled>::createHandler()); setPropertyHandler(CSSPropertyMinWidth, ApplyPropertyLength<&RenderStyle::minWidth, &RenderStyle::setMinWidth, &RenderStyle::initialMinSize, AutoEnabled, LegacyIntrinsicEnabled, IntrinsicEnabled>::createHandler()); +setPropertyHandler(CSSPropertyOpacity, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyOrphans, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyOutline, ApplyPropertyExpanding::createHandler()); setPropertyHandler(CSSPropertyOutlineColor, ApplyPropertyColor::createHandler()); Modified: trunk/Source/WebCore/css/StyleResolver.cpp (131442 => 131443) --- trunk/Source/WebCore/css/StyleResolver.cpp 2012-10-16 12:05:02 UTC (rev 131442) +++ trunk/Source/WebCore/css/StyleResolver.cpp 2012-10-16 12:13:55 UTC (rev 131443) @@ -3235,9 +3235,6 @@ m_style->setBoxReflect(reflection.release()); return; } -case CSSPropertyOpacity: -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(opacity, Opacity) -return; case CSSPropertySrc: // Only used in @font-face rules. return; case CSSPropertyUnicodeRange: // Only used in @font-face rules. @@ -3724,6 +3721,7 @@ case CSSPropertyMaxWidth: case CSSPropertyMinHeight: case CSSPropertyMinWidth: +case CSSPropertyOpacity: case CSSPropertyOrphans: case CSSPropertyOutline: case CSSPropertyOutlineColor: ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [131313] trunk
Title: [131313] trunk Revision 131313 Author macpher...@chromium.org Date 2012-10-15 10:09:25 -0700 (Mon, 15 Oct 2012) Log Message Make CSS variable names case-insensitive. https://bugs.webkit.org/show_bug.cgi?id=98712 Reviewed by Tony Chang. Source/WebCore: This patch modifies the parser to normalize all variable names to lower case, making variable definitions consistent with other property names, which are also case insensitive. Spec: http://dev.w3.org/csswg/css-variables/#defining-variables Test: fast/css/variables/case-insensitive.html * css/CSSParser.cpp: (WebCore::CSSParser::createPrimitiveNumericValue): (WebCore): (WebCore::CSSParser::createPrimitiveVariableNameValue): (WebCore::CSSParser::parseValidPrimitive): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::storeVariableDeclaration): (WebCore::CSSParserString::lowerSubstring): Added function to compute a lower case substring as an AtomicString from a CSSParserString. * css/CSSParser.h: (CSSParser): * css/CSSParserValues.h: (CSSParserString): (WebCore::CSSParserString::lowerSubstring): LayoutTests: Add test that variable names are match correctly when different case is used. * fast/css/variables/case-insensitive-expected.html: Added. * fast/css/variables/case-insensitive.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParser.cpp trunk/Source/WebCore/css/CSSParser.h trunk/Source/WebCore/css/CSSParserValues.h Added Paths trunk/LayoutTests/fast/css/variables/case-insensitive-expected.html trunk/LayoutTests/fast/css/variables/case-insensitive.html Diff Modified: trunk/LayoutTests/ChangeLog (131312 => 131313) --- trunk/LayoutTests/ChangeLog 2012-10-15 17:06:33 UTC (rev 131312) +++ trunk/LayoutTests/ChangeLog 2012-10-15 17:09:25 UTC (rev 131313) @@ -1,3 +1,15 @@ +2012-10-15 Luke Macpherson + +Make CSS variable names case-insensitive. +https://bugs.webkit.org/show_bug.cgi?id=98712 + +Reviewed by Tony Chang. + +Add test that variable names are match correctly when different case is used. + +* fast/css/variables/case-insensitive-expected.html: Added. +* fast/css/variables/case-insensitive.html: Added. + 2012-10-15 Vsevolod Vlasov Unreviewed inspector tests fix. Added: trunk/LayoutTests/fast/css/variables/case-insensitive-expected.html (0 => 131313) --- trunk/LayoutTests/fast/css/variables/case-insensitive-expected.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/case-insensitive-expected.html 2012-10-15 17:09:25 UTC (rev 131313) @@ -0,0 +1,9 @@ + + + +div { +background-color: green; +} + +This text should have a green background. + Added: trunk/LayoutTests/fast/css/variables/case-insensitive.html (0 => 131313) --- trunk/LayoutTests/fast/css/variables/case-insensitive.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/case-insensitive.html 2012-10-15 17:09:25 UTC (rev 131313) @@ -0,0 +1,13 @@ + + + +internals.settings.setCSSVariablesEnabled(true); + + +div { + background-color: -webkit-var(NaMe); + -webkit-var-nAmE: green; +} + +This text should have a green background. + Modified: trunk/Source/WebCore/ChangeLog (131312 => 131313) --- trunk/Source/WebCore/ChangeLog 2012-10-15 17:06:33 UTC (rev 131312) +++ trunk/Source/WebCore/ChangeLog 2012-10-15 17:09:25 UTC (rev 131313) @@ -1,3 +1,31 @@ +2012-10-15 Luke Macpherson + +Make CSS variable names case-insensitive. +https://bugs.webkit.org/show_bug.cgi?id=98712 + +Reviewed by Tony Chang. + +This patch modifies the parser to normalize all variable names to lower case, +making variable definitions consistent with other property names, which are also case insensitive. +Spec: http://dev.w3.org/csswg/css-variables/#defining-variables + +Test: fast/css/variables/case-insensitive.html + +* css/CSSParser.cpp: +(WebCore::CSSParser::createPrimitiveNumericValue): +(WebCore): +(WebCore::CSSParser::createPrimitiveVariableNameValue): +(WebCore::CSSParser::parseValidPrimitive): +(WebCore::CSSParser::parseValue): +(WebCore::CSSParser::storeVariableDeclaration): +(WebCore::CSSParserString::lowerSubstring): +Added function to compute a lower case substring as an AtomicString from a CSSParserString. +* css/CSSParser.h: +(CSSParser): +* css/CSSParserValues.h: +(CSSParserString): +(WebCore::CSSParserString::lowerSubstring): + 2012-10-15 Michael Saboff Update RenderText to use String instead of UChar* for text Modified: trunk/Source/WebCore/css/CSSParser.cpp (131312 => 131313) --- trunk/Source/WebCore/css/CSSParser.cpp 2012-10-15 17:06:33 UTC (rev 131312) +++ trunk/Source/WebCore/css/CSSParser.cpp 2012-10-15 17:09:25 UTC (rev 131313) @@ -291,33 +291,52 @@ } template -ALWAYS_INLINE static
[webkit-changes] [129831] trunk/Source/WebCore
Title: [129831] trunk/Source/WebCore Revision 129831 Author macpher...@chromium.org Date 2012-09-27 19:16:38 -0700 (Thu, 27 Sep 2012) Log Message Implement reviewer feedback that I missed on bug 95930. https://bugs.webkit.org/show_bug.cgi?id=97752 Reviewed by Alexey Proskuryakov. This patch updates the indentation of function parameters in a few places, and reserves an appropriate amount of space when using StringBuilder. * css/CSSBasicShapes.cpp: (WebCore::buildRectangleString): (WebCore::CSSBasicShapeRectangle::cssText): (WebCore::CSSBasicShapeRectangle::serializeResolvingVariables): (WebCore::CSSBasicShapeCircle::serializeResolvingVariables): (WebCore::CSSBasicShapeEllipse::serializeResolvingVariables): (WebCore::buildPolygonString): * css/Rect.h: (WebCore::Rect::serializeResolvingVariables): (WebCore::Quad::serializeResolvingVariables): (WebCore::Quad::generateCSSString): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSBasicShapes.cpp trunk/Source/WebCore/css/Rect.h Diff Modified: trunk/Source/WebCore/ChangeLog (129830 => 129831) --- trunk/Source/WebCore/ChangeLog 2012-09-28 01:43:52 UTC (rev 129830) +++ trunk/Source/WebCore/ChangeLog 2012-09-28 02:16:38 UTC (rev 129831) @@ -1,3 +1,25 @@ +2012-09-27 Luke Macpherson + +Implement reviewer feedback that I missed on bug 95930. +https://bugs.webkit.org/show_bug.cgi?id=97752 + +Reviewed by Alexey Proskuryakov. + +This patch updates the indentation of function parameters in a few places, +and reserves an appropriate amount of space when using StringBuilder. + +* css/CSSBasicShapes.cpp: +(WebCore::buildRectangleString): +(WebCore::CSSBasicShapeRectangle::cssText): +(WebCore::CSSBasicShapeRectangle::serializeResolvingVariables): +(WebCore::CSSBasicShapeCircle::serializeResolvingVariables): +(WebCore::CSSBasicShapeEllipse::serializeResolvingVariables): +(WebCore::buildPolygonString): +* css/Rect.h: +(WebCore::Rect::serializeResolvingVariables): +(WebCore::Quad::serializeResolvingVariables): +(WebCore::Quad::generateCSSString): + 2012-09-27 Sheriff Bot Unreviewed, rolling out r129823. Modified: trunk/Source/WebCore/css/CSSBasicShapes.cpp (129830 => 129831) --- trunk/Source/WebCore/css/CSSBasicShapes.cpp 2012-09-28 01:43:52 UTC (rev 129830) +++ trunk/Source/WebCore/css/CSSBasicShapes.cpp 2012-09-28 02:16:38 UTC (rev 129831) @@ -39,20 +39,24 @@ static String buildRectangleString(const String& x, const String& y, const String& width, const String& height, const String& radiusX, const String& radiusY) { +char opening[] = "rectangle("; +char separator[] = ", "; StringBuilder result; -result.appendLiteral("rectangle("); +// Compute the required capacity in advance to reduce allocations. +result.reserveCapacity((sizeof(opening) - 1) + (5 * (sizeof(separator) -1 )) + 1 + x.length() + y.length() + width.length() + height.length() + radiusX.length() + radiusY.length()); +result.appendLiteral(opening); result.append(x); -result.appendLiteral(", "); +result.appendLiteral(separator); result.append(y); -result.appendLiteral(", "); +result.appendLiteral(separator); result.append(width); -result.appendLiteral(", "); +result.appendLiteral(separator); result.append(height); if (!radiusX.isNull()) { -result.appendLiteral(", "); +result.appendLiteral(separator); result.append(radiusX); if (!radiusY.isNull()) { -result.appendLiteral(", "); +result.appendLiteral(separator); result.append(radiusY); } } @@ -63,22 +67,22 @@ String CSSBasicShapeRectangle::cssText() const { return buildRectangleString(m_x->cssText(), -m_y->cssText(), -m_width->cssText(), -m_height->cssText(), -m_radiusX.get() ? m_radiusX->cssText() : String(), -m_radiusY.get() ? m_radiusY->cssText() : String()); +m_y->cssText(), +m_width->cssText(), +m_height->cssText(), +m_radiusX.get() ? m_radiusX->cssText() : String(), +m_radiusY.get() ? m_radiusY->cssText() : String()); } #if ENABLE(CSS_VARIABLES) String CSSBasicShapeRectangle::serializeResolvingVariables(const HashMap& variables) const { return buildRectangleString(m_x->serializeResolvingVariables(variables), -m_y->serializeResolvingVariables(variables), -m_width->serializeResolvingVariables(variables), -m_h
[webkit-changes] [129579] trunk
Title: [129579] trunk Revision 129579 Author macpher...@chromium.org Date 2012-09-25 18:17:50 -0700 (Tue, 25 Sep 2012) Log Message Ensure variables are resolved for specialized CSS primitive value types. https://bugs.webkit.org/show_bug.cgi?id=95930 Reviewed by Tony Chang. Source/WebCore: Sometimes CSSPrimitiveValue contains a collection of other CSSPrimitiveValues (eg. 2, 4 or n). This patch makes sure any variables contained inside those child values are resolved. Tests: fast/css/variables/root-background-size.html fast/css/variables/var-inside-pair.html fast/css/variables/var-inside-quad.html fast/css/variables/var-inside-shape.html * css/CSSBasicShapes.cpp: (WebCore::buildRectangleString): (WebCore::CSSBasicShapeRectangle::cssText): (WebCore): (WebCore::CSSBasicShapeRectangle::serializeResolvingVariables): Generates a string representation of this value with variables resolved from the provided HashMap of variables. (WebCore::CSSBasicShapeRectangle::hasVariableReference): Returns true if any of the values used to describe the rectange depend on the value of a variable. (WebCore::buildCircleString): (WebCore::CSSBasicShapeCircle::cssText): (WebCore::CSSBasicShapeCircle::serializeResolvingVariables): (WebCore::CSSBasicShapeCircle::hasVariableReference): (WebCore::buildEllipseString): (WebCore::CSSBasicShapeEllipse::cssText): (WebCore::CSSBasicShapeEllipse::serializeResolvingVariables): (WebCore::CSSBasicShapeEllipse::hasVariableReference): (WebCore::CSSBasicShapePolygon::serializeResolvingVariables): (WebCore::CSSBasicShapePolygon::hasVariableReference): * css/CSSBasicShapes.h: (CSSBasicShapeRectangle): (CSSBasicShapeCircle): (CSSBasicShapeEllipse): (CSSBasicShapePolygon): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::customCssText): Move the logic for generating the strings for Rects, Quads, Pairs and Shapes into their respective classes. (WebCore::CSSPrimitiveValue::customSerializeResolvingVariables): Handle Rects, Quads, Pairs and Shapes when they contain variables, by calling their serializeResolvingVariables method. (WebCore): (WebCore::CSSPrimitiveValue::hasVariableReference): Handle Rects, Quads, Pairs and Shapes by calling their respective hasVariableReference methods. * css/CSSPrimitiveValue.h: (CSSPrimitiveValue): * css/Pair.h: (WebCore::Pair::pairString): (Pair): (WebCore::Pair::cssText): (WebCore::Pair::serializeResolvingVariables): (WebCore::Pair::hasVariableReference): * css/Rect.h: (RectBase): (WebCore::RectBase::hasVariableReference): (WebCore::Rect::rectString): (Rect): (WebCore::Rect::cssText): (WebCore::Rect::serializeResolvingVariables): (WebCore::Quad::quadString): (Quad): (WebCore::Quad::cssText): (WebCore::Quad::serializeResolvingVariables): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): LayoutTests: Add tests that use specialized CSS values (eg. pairs, quads, rectangle, circle, ellipse etc.). * fast/css/variables/root-background-size-expected.html: Added. * fast/css/variables/root-background-size.html: Added. * fast/css/variables/var-inside-pair-expected.html: Added. * fast/css/variables/var-inside-pair.html: Added. * fast/css/variables/var-inside-quad-expected.html: Added. * fast/css/variables/var-inside-quad.html: Added. * fast/css/variables/var-inside-shape-expected.html: Added. * fast/css/variables/var-inside-shape.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSBasicShapes.cpp trunk/Source/WebCore/css/CSSBasicShapes.h trunk/Source/WebCore/css/CSSPrimitiveValue.cpp trunk/Source/WebCore/css/CSSPrimitiveValue.h trunk/Source/WebCore/css/Pair.h trunk/Source/WebCore/css/Rect.h trunk/Source/WebCore/css/StyleResolver.cpp Added Paths trunk/LayoutTests/fast/css/variables/root-background-size-expected.html trunk/LayoutTests/fast/css/variables/root-background-size.html trunk/LayoutTests/fast/css/variables/var-inside-pair-expected.html trunk/LayoutTests/fast/css/variables/var-inside-pair.html trunk/LayoutTests/fast/css/variables/var-inside-quad-expected.html trunk/LayoutTests/fast/css/variables/var-inside-quad.html trunk/LayoutTests/fast/css/variables/var-inside-shape-expected.html trunk/LayoutTests/fast/css/variables/var-inside-shape.html Diff Modified: trunk/LayoutTests/ChangeLog (129578 => 129579) --- trunk/LayoutTests/ChangeLog 2012-09-26 00:24:02 UTC (rev 129578) +++ trunk/LayoutTests/ChangeLog 2012-09-26 01:17:50 UTC (rev 129579) @@ -1,3 +1,21 @@ +2012-09-25 Luke Macpherson + +Ensure variables are resolved for specialized CSS primitive value types. +https://bugs.webkit.org/show_bug.cgi?id=95930 + +Reviewed by Tony Chang. + +Add tests that use specialized CSS values (eg. pairs, quads, rectangle, circle, ellipse etc.). + +* fast/css/variables/root-background-size-expected.html: Added. +* fast/css/variables/root-background-size.html: Added. +* fast/css/variables/
[webkit-changes] [129189] trunk
Title: [129189] trunk Revision 129189 Author macpher...@chromium.org Date 2012-09-20 21:15:18 -0700 (Thu, 20 Sep 2012) Log Message Source/WebCore: Fix use-after free when using a variable to specify a -webkit-filter. https://bugs.webkit.org/show_bug.cgi?id=97153 Reviewed by Abhishek Arya. Make StyleResolver's m_pendingSVGDocuments a hashmap of RefPtr instead of raw pointers such that the document values cannot be freed prematurely. Present assumption is that storing raw pointers is ok because CSSValues will live as long as the StyleResolver instance, however that it no longer true when variables are used, so we must ensure we increment the reference counter to ensure the CSSValues are not freed prematurely. Test: fast/css/variables/var-filter.html * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * css/StyleResolver.h: (StyleResolver): LayoutTests: Fix bug when using a variable to specify a -webkit-filter. https://bugs.webkit.org/show_bug.cgi?id=97153 Reviewed by Abhishek Arya. Use a variable in a -webkit-filter css property. * fast/css/variables/var-filter-expected.txt: Added. * fast/css/variables/var-filter.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/StyleResolver.cpp trunk/Source/WebCore/css/StyleResolver.h Added Paths trunk/LayoutTests/fast/css/variables/var-filter-expected.txt trunk/LayoutTests/fast/css/variables/var-filter.html Diff Modified: trunk/LayoutTests/ChangeLog (129188 => 129189) --- trunk/LayoutTests/ChangeLog 2012-09-21 04:00:21 UTC (rev 129188) +++ trunk/LayoutTests/ChangeLog 2012-09-21 04:15:18 UTC (rev 129189) @@ -1,3 +1,15 @@ +2012-09-20 Luke Macpherson + +Fix bug when using a variable to specify a -webkit-filter. +https://bugs.webkit.org/show_bug.cgi?id=97153 + +Reviewed by Abhishek Arya. + +Use a variable in a -webkit-filter css property. + +* fast/css/variables/var-filter-expected.txt: Added. +* fast/css/variables/var-filter.html: Added. + 2012-09-20 Noel Gordon Unreviewed test expectations edit. Added: trunk/LayoutTests/fast/css/variables/var-filter-expected.txt (0 => 129189) --- trunk/LayoutTests/fast/css/variables/var-filter-expected.txt (rev 0) +++ trunk/LayoutTests/fast/css/variables/var-filter-expected.txt 2012-09-21 04:15:18 UTC (rev 129189) @@ -0,0 +1 @@ +This test is successful if it does not crash. Added: trunk/LayoutTests/fast/css/variables/var-filter.html (0 => 129189) --- trunk/LayoutTests/fast/css/variables/var-filter.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/var-filter.html 2012-09-21 04:15:18 UTC (rev 129189) @@ -0,0 +1,15 @@ + + + +if (window.testRunner) +testRunner.dumpAsText(); +internals.settings.setCSSVariablesEnabled(true); + + +body { + -webkit-var-a: url(1); + -webkit-filter: -webkit-var(a); +} + +This test is successful if it does not crash. + Modified: trunk/Source/WebCore/ChangeLog (129188 => 129189) --- trunk/Source/WebCore/ChangeLog 2012-09-21 04:00:21 UTC (rev 129188) +++ trunk/Source/WebCore/ChangeLog 2012-09-21 04:15:18 UTC (rev 129189) @@ -1,3 +1,21 @@ +2012-09-20 Luke Macpherson + +Fix use-after free when using a variable to specify a -webkit-filter. +https://bugs.webkit.org/show_bug.cgi?id=97153 + +Reviewed by Abhishek Arya. + +Make StyleResolver's m_pendingSVGDocuments a hashmap of RefPtr instead of raw pointers such that the document values cannot be freed prematurely. +Present assumption is that storing raw pointers is ok because CSSValues will live as long as the StyleResolver instance, however that it no longer +true when variables are used, so we must ensure we increment the reference counter to ensure the CSSValues are not freed prematurely. + +Test: fast/css/variables/var-filter.html + +* css/StyleResolver.cpp: +(WebCore::StyleResolver::collectMatchingRulesForList): +* css/StyleResolver.h: +(StyleResolver): + 2012-09-20 Levi Weintraub Prevent reading stale data from InlineTextBoxes Modified: trunk/Source/WebCore/css/StyleResolver.cpp (129188 => 129189) --- trunk/Source/WebCore/css/StyleResolver.cpp 2012-09-21 04:00:21 UTC (rev 129188) +++ trunk/Source/WebCore/css/StyleResolver.cpp 2012-09-21 04:15:18 UTC (rev 129189) @@ -5191,7 +5191,7 @@ if (filterOperation->getOperationType() == FilterOperation::REFERENCE) { ReferenceFilterOperation* referenceFilter = static_cast(filterOperation.get()); -WebKitCSSSVGDocumentValue* value = m_pendingSVGDocuments.get(referenceFilter); +WebKitCSSSVGDocumentValue* value = m_pendingSVGDocuments.get(referenceFilter).get(); if (!value) continue; CachedSVGDocument* cachedDocument = value->load(cachedResourceLoader); Mod
[webkit-changes] [127838] trunk/Source/WebCore
Title: [127838] trunk/Source/WebCore Revision 127838 Author macpher...@chromium.org Date 2012-09-07 00:48:18 -0700 (Fri, 07 Sep 2012) Log Message Make CSSPrimitiveValue::cleanup() handle all UnitTypes, fixing memory leak in the process. https://bugs.webkit.org/show_bug.cgi?id=95938 Reviewed by Andreas Kling. Several unit types have been added without updating the cleanup function, including CSS_VARIABLE_NAME. I've added all the existing unit types back in and cast m_primitiveUnitType (a bitfield in CSSValue) to the enum type to ensure the compiler catches any future errors. No test added, but switch made to use enum type so we can't accidentally fail to update this function again. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::cleanup): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParserValues.cpp trunk/Source/WebCore/css/CSSPrimitiveValue.cpp trunk/Source/WebCore/css/CSSPrimitiveValue.h Diff Modified: trunk/Source/WebCore/ChangeLog (127837 => 127838) --- trunk/Source/WebCore/ChangeLog 2012-09-07 07:45:49 UTC (rev 127837) +++ trunk/Source/WebCore/ChangeLog 2012-09-07 07:48:18 UTC (rev 127838) @@ -1,3 +1,19 @@ +2012-09-07 Luke Macpherson + +Make CSSPrimitiveValue::cleanup() handle all UnitTypes, fixing memory leak in the process. +https://bugs.webkit.org/show_bug.cgi?id=95938 + +Reviewed by Andreas Kling. + +Several unit types have been added without updating the cleanup function, including CSS_VARIABLE_NAME. +I've added all the existing unit types back in and cast m_primitiveUnitType (a bitfield in CSSValue) +to the enum type to ensure the compiler catches any future errors. + +No test added, but switch made to use enum type so we can't accidentally fail to update this function again. + +* css/CSSPrimitiveValue.cpp: +(WebCore::CSSPrimitiveValue::cleanup): + 2012-09-07 Tim Horton Add optional debug logging when we fall into/out of threaded scrolling Modified: trunk/Source/WebCore/css/CSSParserValues.cpp (127837 => 127838) --- trunk/Source/WebCore/css/CSSParserValues.cpp 2012-09-07 07:45:49 UTC (rev 127837) +++ trunk/Source/WebCore/css/CSSParserValues.cpp 2012-09-07 07:48:18 UTC (rev 127838) @@ -124,7 +124,9 @@ case CSSPrimitiveValue::CSS_DPI: case CSSPrimitiveValue::CSS_DPCM: case CSSPrimitiveValue::CSS_PAIR: +#if ENABLE(DASHBOARD_SUPPORT) || ENABLE(WIDGET_REGION) case CSSPrimitiveValue::CSS_DASHBOARD_REGION: +#endif case CSSPrimitiveValue::CSS_UNICODE_RANGE: case CSSPrimitiveValue::CSS_PARSER_OPERATOR: case CSSPrimitiveValue::CSS_PARSER_INTEGER: Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.cpp (127837 => 127838) --- trunk/Source/WebCore/css/CSSPrimitiveValue.cpp 2012-09-07 07:45:49 UTC (rev 127837) +++ trunk/Source/WebCore/css/CSSPrimitiveValue.cpp 2012-09-07 07:48:18 UTC (rev 127838) @@ -91,7 +91,9 @@ case CSSPrimitiveValue:: CSS_ATTR: case CSSPrimitiveValue:: CSS_COUNTER: case CSSPrimitiveValue:: CSS_COUNTER_NAME: +#if ENABLE(DASHBOARD_SUPPORT) || ENABLE(WIDGET_REGION) case CSSPrimitiveValue:: CSS_DASHBOARD_REGION: +#endif #if !ENABLE(CSS_IMAGE_RESOLUTION) case CSSPrimitiveValue:: CSS_DPPX: case CSSPrimitiveValue:: CSS_DPI: @@ -365,11 +367,14 @@ void CSSPrimitiveValue::cleanup() { -switch (m_primitiveUnitType) { +switch (static_cast(m_primitiveUnitType)) { case CSS_STRING: case CSS_URI: case CSS_ATTR: case CSS_COUNTER_NAME: +#if ENABLE(CSS_VARIABLES) +case CSS_VARIABLE_NAME: +#endif case CSS_PARSER_HEXCOLOR: if (m_value.string) m_value.string->deref(); @@ -386,7 +391,7 @@ case CSS_PAIR: m_value.pair->deref(); break; -#if ENABLE(DASHBOARD_SUPPORT) +#if ENABLE(DASHBOARD_SUPPORT) || ENABLE(WIDGET_REGION) case CSS_DASHBOARD_REGION: if (m_value.region) m_value.region->deref(); @@ -395,6 +400,10 @@ case CSS_CALC: m_value.calc->deref(); break; +case CSS_CALC_PERCENTAGE_WITH_NUMBER: +case CSS_CALC_PERCENTAGE_WITH_LENGTH: +ASSERT_NOT_REACHED(); +break; case CSS_SHAPE: m_value.shape->deref(); break; @@ -421,10 +430,14 @@ case CSS_VW: case CSS_VH: case CSS_VMIN: +case CSS_DPPX: +case CSS_DPI: +case CSS_DPCM: case CSS_IDENT: case CSS_RGBCOLOR: case CSS_DIMENSION: case CSS_UNKNOWN: +case CSS_UNICODE_RANGE: case CSS_PARSER_OPERATOR: case CSS_PARSER_IDENTIFIER: break; Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.h (127837 => 127838) --- trunk/Source/WebCore/css/CSSPrimitiveValue.h 2012-09-07 07:45:49 UTC (rev 127837) +++ trunk/Source/WebCore/css/CSSPrimitiveValue.h 2012-09-07 07:48:18 UTC (rev 127838) @@ -99,7 +99,9 @@ CSS_DPI = 30, CSS_DPCM = 31, CSS_PAI
[webkit-changes] [127220] trunk
s/fast/css/variables/calc-invalid-value.html 2012-08-31 01:13:50 UTC (rev 127220) @@ -0,0 +1,15 @@ + + + +internals.settings.setCSSVariablesEnabled(true); + + +div { + border-color: green; + border-style: solid; + border-width: -webkit-calc(-webkit-var(a) + 1px); + -webkit-var-a: black; +} + +This text should have the default border width + Added: trunk/LayoutTests/fast/css/variables/calc-invalid-variable-expected.html (0 => 127220) --- trunk/LayoutTests/fast/css/variables/calc-invalid-variable-expected.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/calc-invalid-variable-expected.html 2012-08-31 01:13:50 UTC (rev 127220) @@ -0,0 +1,10 @@ + + + +div { +border-color: green; +border-style: solid; +} + +This text should have the default border width + Added: trunk/LayoutTests/fast/css/variables/calc-invalid-variable.html (0 => 127220) --- trunk/LayoutTests/fast/css/variables/calc-invalid-variable.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/calc-invalid-variable.html 2012-08-31 01:13:50 UTC (rev 127220) @@ -0,0 +1,14 @@ + + + +internals.settings.setCSSVariablesEnabled(true); + + +div { + border-color: green; + border-style: solid; + border-width: -webkit-calc(-webkit-var(a) + 1px); +} + +This text should have the default border width + Added: trunk/LayoutTests/fast/css/variables/calc-negated-variable-expected.html (0 => 127220) --- trunk/LayoutTests/fast/css/variables/calc-negated-variable-expected.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/calc-negated-variable-expected.html 2012-08-31 01:13:50 UTC (rev 127220) @@ -0,0 +1,10 @@ + + + +div { +border-color: green; +border-style: solid; +} + +This text should have the default border width + Added: trunk/LayoutTests/fast/css/variables/calc-negated-variable.html (0 => 127220) --- trunk/LayoutTests/fast/css/variables/calc-negated-variable.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/calc-negated-variable.html 2012-08-31 01:13:50 UTC (rev 127220) @@ -0,0 +1,15 @@ + + + +internals.settings.setCSSVariablesEnabled(true); + + +div { + border-color: green; + border-style: solid; + border-width: -webkit-calc(--webkit-var(a) + 1px); + -webkit-var-a: 5px; +} + +This text should have the default border width + Added: trunk/LayoutTests/fast/css/variables/calc.html (0 => 127220) --- trunk/LayoutTests/fast/css/variables/calc.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/calc.html 2012-08-31 01:13:50 UTC (rev 127220) @@ -0,0 +1,19 @@ + + + +internals.settings.setCSSVariablesEnabled(true); + + +div { + border-color: green; + border-style: solid; + border-width: -webkit-calc(-webkit-var(a) + -webkit-var(b)) -webkit-calc(-webkit-var(c) * -webkit-var(d)); + -webkit-var-a: 2px; + -webkit-var-b: 1px; + -webkit-var-c: 5; + -webkit-var-d: 2px; + +} + +This text should have top and bottom borders of 3px and left and right borders of 10px + Modified: trunk/Source/WebCore/ChangeLog (127219 => 127220) --- trunk/Source/WebCore/ChangeLog 2012-08-31 00:43:15 UTC (rev 127219) +++ trunk/Source/WebCore/ChangeLog 2012-08-31 01:13:50 UTC (rev 127220) @@ -1,3 +1,47 @@ +2012-08-30 Luke Macpherson + +Make it possible to use CSS Variables inside Calc expressions. +https://bugs.webkit.org/show_bug.cgi?id=95284 + +Reviewed by Tony Chang. + +Allows calc expressions to contain unevaluated variables, which are then resolved in StyleResolver.cpp when building the RenderStyle tree. + +Tests: +fast/css/variables/calc.html + +* css/CSSCalculationValue.cpp: +(WebCore::unitCategory): +(WebCore): +(WebCore::CSSCalcValue::customSerializeResolvingVariables): +Generates a CSS _expression_ with variables resolved into their corresponding values. +(WebCore::CSSCalcValue::hasVariableReference): +Returns true if the calculation's _expression_ tree refers to a variable (that needs to be resolved). +(CSSCalcPrimitiveValue): +(WebCore::CSSCalcPrimitiveValue::serializeResolvingVariables): +Resolves the variable using the underlying CSSPrimitiveValue's serializeResolvingVariables function. +(WebCore::CSSCalcPrimitiveValue::hasVariableReference): +(WebCore::CSSCalcPrimitiveValue::toCalcValue): +(WebCore::CSSCalcPrimitiveValue::doubleValue): +(WebCore::CSSCalcPrimitiveValue::computeLengthPx): +(WebCore::CSSCalcBinaryOperation::create): +(CSSCalcBinaryOperation): +(WebCore::CSSCalcBinaryOperation::serializeResolvingVariables): +Builds a CSS _expression_ for contained subtrees. +(WebCore::CSSCalcBinaryOperation::hasVariableReference): +Returns true if either subtree contains a variable. +* css/CSSCalculationValue.h: +(CSSCalcExpressionNode): +(CSSCalcValue): +
[webkit-changes] [126828] trunk
Title: [126828] trunk Revision 126828 Author macpher...@chromium.org Date 2012-08-27 17:45:43 -0700 (Mon, 27 Aug 2012) Log Message Fix CSSParserValue::createCSSValue() for viewport based units. https://bugs.webkit.org/show_bug.cgi?id=94772 Reviewed by Tony Chang. Source/WebCore: Viewport units were not added to CSSParserValue::createCSSValue(). This patch handles that case. Patch also converts from list of if clauses to a switch statement to catch future errors. Test: fast/css/variables/calc-vw-crash.html * css/CSSParserValues.cpp: (WebCore::CSSParserValue::createCSSValue): LayoutTests: Add test that uses variables, calc and viewport units together. * fast/css/variables/calc-vw-crash-expected.txt: Added. * fast/css/variables/calc-vw-crash.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParserValues.cpp Added Paths trunk/LayoutTests/fast/css/variables/calc-vw-crash-expected.txt trunk/LayoutTests/fast/css/variables/calc-vw-crash.html Diff Modified: trunk/LayoutTests/ChangeLog (126827 => 126828) --- trunk/LayoutTests/ChangeLog 2012-08-28 00:42:53 UTC (rev 126827) +++ trunk/LayoutTests/ChangeLog 2012-08-28 00:45:43 UTC (rev 126828) @@ -1,3 +1,15 @@ +2012-08-27 Luke Macpherson + +Fix CSSParserValue::createCSSValue() for viewport based units. +https://bugs.webkit.org/show_bug.cgi?id=94772 + +Reviewed by Tony Chang. + +Add test that uses variables, calc and viewport units together. + +* fast/css/variables/calc-vw-crash-expected.txt: Added. +* fast/css/variables/calc-vw-crash.html: Added. + 2012-08-27 Mark Lam Gardening: skipping tests due to WebCore::JSEventListener::jsFunction(WebCore::ScriptExecutionContext*) crashes. Added: trunk/LayoutTests/fast/css/variables/calc-vw-crash-expected.txt (0 => 126828) --- trunk/LayoutTests/fast/css/variables/calc-vw-crash-expected.txt (rev 0) +++ trunk/LayoutTests/fast/css/variables/calc-vw-crash-expected.txt 2012-08-28 00:45:43 UTC (rev 126828) @@ -0,0 +1 @@ +This test is successful if it does not crash. Added: trunk/LayoutTests/fast/css/variables/calc-vw-crash.html (0 => 126828) --- trunk/LayoutTests/fast/css/variables/calc-vw-crash.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/calc-vw-crash.html 2012-08-28 00:45:43 UTC (rev 126828) @@ -0,0 +1,15 @@ + + + +if (window.testRunner) { +testRunner.dumpAsText(); +internals.settings.setCSSVariablesEnabled(true); +} + + +#foo { + -webkit-var-var23: -webkit-calc(0vw); +} + +This test is successful if it does not crash. + Modified: trunk/Source/WebCore/ChangeLog (126827 => 126828) --- trunk/Source/WebCore/ChangeLog 2012-08-28 00:42:53 UTC (rev 126827) +++ trunk/Source/WebCore/ChangeLog 2012-08-28 00:45:43 UTC (rev 126828) @@ -1,3 +1,36 @@ +2012-08-27 Luke Macpherson + +Fix CSSParserValue::createCSSValue() for viewport based units. +https://bugs.webkit.org/show_bug.cgi?id=94772 + +Reviewed by Tony Chang. + +Viewport units were not added to CSSParserValue::createCSSValue(). This patch handles that case. +Patch also converts from list of if clauses to a switch statement to catch future errors. + +Test: fast/css/variables/calc-vw-crash.html + +* css/CSSParserValues.cpp: +(WebCore::CSSParserValue::createCSSValue): + +2012-08-27 Dimitri Glazkov + +Rename ContentDistributor::distributeShadowChildrenTo to distributeNodeChildrenTo. +https://bugs.webkit.org/show_bug.cgi?id=95150 + +Reviewed by Hajime Morita. + +Also, made the function take ContainerNode, which decouples it from the callsite's context. + +No new tests, simple rename. + +* html/shadow/ContentDistributor.cpp: +(WebCore::ContentDistributor::distribute): Changed the callsite. +(WebCore::ContentDistributor::distributeNodeChildrenTo): Renamed from distributeShadowChildrenTo. +* html/shadow/ContentDistributor.h: +(WebCore): Added forward decl for ContainerNode. +(ContentDistributor): Changed the decl name. + 2012-08-27 Adam Barth [V8] V8DOMWindowShell::setContext has no callers Modified: trunk/Source/WebCore/css/CSSParserValues.cpp (126827 => 126828) --- trunk/Source/WebCore/css/CSSParserValues.cpp 2012-08-28 00:42:53 UTC (rev 126827) +++ trunk/Source/WebCore/css/CSSParserValues.cpp 2012-08-28 00:45:43 UTC (rev 126828) @@ -67,31 +67,79 @@ { RefPtr parsedValue; if (id) -parsedValue = CSSPrimitiveValue::createIdentifier(id); -else if (unit == CSSPrimitiveValue::CSS_IDENT) -parsedValue = CSSPrimitiveValue::create(string, CSSPrimitiveValue::CSS_PARSER_IDENTIFIER); -else if (unit == CSSPrimitiveValue::CSS_NUMBER && isInt) -parsedValue = CSSPrimitiveValue::create(fValue, CSSPrimitiveValue::CSS_PARSER_
[webkit-changes] [126118] trunk
Title: [126118] trunk Revision 126118 Author macpher...@chromium.org Date 2012-08-20 19:00:42 -0700 (Mon, 20 Aug 2012) Log Message Fix inspector with variables enabled and enable inspector variables tests by default. https://bugs.webkit.org/show_bug.cgi?id=94296 Reviewed by Hajime Morita. Source/WebCore: Change from using getPropertyName static function to CSSProperty::cssName(), which can resolve variables if needed. Covered by inspector/styles/variables. * css/PropertySetCSSStyleDeclaration.cpp: (WebCore::PropertySetCSSStyleDeclaration::item): LayoutTests: Fix paths to included _javascript_ and enable tests by default on Chromium port. * inspector/styles/variables/css-variables.html: * platform/chromium/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/inspector/styles/variables/css-variables.html trunk/LayoutTests/platform/chromium/TestExpectations trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp Diff Modified: trunk/LayoutTests/ChangeLog (126117 => 126118) --- trunk/LayoutTests/ChangeLog 2012-08-21 01:59:26 UTC (rev 126117) +++ trunk/LayoutTests/ChangeLog 2012-08-21 02:00:42 UTC (rev 126118) @@ -1,3 +1,15 @@ +2012-08-20 Luke Macpherson + +Fix inspector with variables enabled and enable inspector variables tests by default. +https://bugs.webkit.org/show_bug.cgi?id=94296 + +Reviewed by Hajime Morita. + +Fix paths to included _javascript_ and enable tests by default on Chromium port. + +* inspector/styles/variables/css-variables.html: +* platform/chromium/TestExpectations: + 2012-08-20 Kenneth Russell Unreviewed. Fixed lint errors in TestExpectations after r126110. Modified: trunk/LayoutTests/inspector/styles/variables/css-variables.html (126117 => 126118) --- trunk/LayoutTests/inspector/styles/variables/css-variables.html 2012-08-21 01:59:26 UTC (rev 126117) +++ trunk/LayoutTests/inspector/styles/variables/css-variables.html 2012-08-21 02:00:42 UTC (rev 126118) @@ -10,8 +10,8 @@ } -
[webkit-changes] [125243] trunk
Title: [125243] trunk Revision 125243 Author macpher...@chromium.org Date 2012-08-09 20:37:03 -0700 (Thu, 09 Aug 2012) Log Message Fix null pointer deref in RenderFileUploadControl::computePreferredLogicalWidth(). https://bugs.webkit.org/show_bug.cgi?id=93579 Reviewed by Kent Tamura. Source/WebCore: Checks the upload control has a non-null button renderer before dereferencing. Test: fast/forms/file/file-crash-by-display-none-button.html * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::computePreferredLogicalWidths): LayoutTests: Exercise code path that causes an upload button to exist without a renderer. * fast/forms/file/file-crash-by-display-none-button.html: Added. * fast/forms/file/file-crash-by-display-none-button-expected.txt: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp Added Paths trunk/LayoutTests/fast/forms/file/file-crash-by-display-none-button-expected.txt trunk/LayoutTests/fast/forms/file/file-crash-by-display-none-button.html Diff Modified: trunk/LayoutTests/ChangeLog (125242 => 125243) --- trunk/LayoutTests/ChangeLog 2012-08-10 03:05:10 UTC (rev 125242) +++ trunk/LayoutTests/ChangeLog 2012-08-10 03:37:03 UTC (rev 125243) @@ -1,3 +1,15 @@ +2012-08-09 Luke Macpherson + +Fix null pointer deref in RenderFileUploadControl::computePreferredLogicalWidth(). +https://bugs.webkit.org/show_bug.cgi?id=93579 + +Reviewed by Kent Tamura. + +Exercise code path that causes an upload button to exist without a renderer. + +* fast/forms/file/file-crash-by-display-none-button.html: Added. +* fast/forms/file/file-crash-by-display-none-button-expected.txt: Added. + 2012-08-09 Yuta Kitamura Unreviewed. Remove duplicate test expectation entry causing a lint error. Added: trunk/LayoutTests/fast/forms/file/file-crash-by-display-none-button-expected.txt (0 => 125243) --- trunk/LayoutTests/fast/forms/file/file-crash-by-display-none-button-expected.txt (rev 0) +++ trunk/LayoutTests/fast/forms/file/file-crash-by-display-none-button-expected.txt 2012-08-10 03:37:03 UTC (rev 125243) @@ -0,0 +1 @@ +This test is successful it it does not crash. Added: trunk/LayoutTests/fast/forms/file/file-crash-by-display-none-button.html (0 => 125243) --- trunk/LayoutTests/fast/forms/file/file-crash-by-display-none-button.html (rev 0) +++ trunk/LayoutTests/fast/forms/file/file-crash-by-display-none-button.html 2012-08-10 03:37:03 UTC (rev 125243) @@ -0,0 +1,11 @@ + + +if (window.internals) +testRunner.dumpAsText(); + + +input::-webkit-file-upload-button { display: none; } + +This test is successful it it does not crash. + + Modified: trunk/Source/WebCore/ChangeLog (125242 => 125243) --- trunk/Source/WebCore/ChangeLog 2012-08-10 03:05:10 UTC (rev 125242) +++ trunk/Source/WebCore/ChangeLog 2012-08-10 03:37:03 UTC (rev 125243) @@ -1,3 +1,17 @@ +2012-08-09 Luke Macpherson + +Fix null pointer deref in RenderFileUploadControl::computePreferredLogicalWidth(). +https://bugs.webkit.org/show_bug.cgi?id=93579 + +Reviewed by Kent Tamura. + +Checks the upload control has a non-null button renderer before dereferencing. + +Test: fast/forms/file/file-crash-by-display-none-button.html + +* rendering/RenderFileUploadControl.cpp: +(WebCore::RenderFileUploadControl::computePreferredLogicalWidths): + 2012-08-09 Kentaro Hara [V8] Rename V8BindingPerContextData to V8PerContextData Modified: trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp (125242 => 125243) --- trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp 2012-08-10 03:05:10 UTC (rev 125242) +++ trunk/Source/WebCore/rendering/RenderFileUploadControl.cpp 2012-08-10 03:37:03 UTC (rev 125243) @@ -194,7 +194,8 @@ const String label = theme()->fileListDefaultLabel(node()->toInputElement()->multiple()); float defaultLabelWidth = font.width(constructTextRun(this, font, label, style, TextRun::AllowTrailingExpansion)); if (HTMLInputElement* button = uploadButton()) -defaultLabelWidth += button->renderer()->maxPreferredLogicalWidth() + afterButtonSpacing; +if (RenderObject* buttonRenderer = button->renderer()) +defaultLabelWidth += buttonRenderer->maxPreferredLogicalWidth() + afterButtonSpacing; m_maxPreferredLogicalWidth = static_cast(ceilf(max(minDefaultLabelWidth, defaultLabelWidth))); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [124833] trunk
Title: [124833] trunk Revision 124833 Author macpher...@chromium.org Date 2012-08-06 18:57:28 -0700 (Mon, 06 Aug 2012) Log Message Handle variables in CSSParser::parseValidPrimitive(), preventing null return value. https://bugs.webkit.org/show_bug.cgi?id=93235 Reviewed by Tony Chang. Source/WebCore: By returning null here (and failing to handle the variable) the current code would cause null pointer dereferences in StyleResolver at several points. Instead we create a primitive value for the variable reference and return it. Test: fast/css/variables/invalid-font-reference.html * css/CSSParser.cpp: (WebCore::CSSParser::parseValidPrimitive): LayoutTests: Exercises the code path where variables are parsed in CSSParser::parseValidPrimitive(). * fast/css/variables/invalid-font-reference-expected.txt: Added. * fast/css/variables/invalid-font-reference.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParser.cpp Added Paths trunk/LayoutTests/fast/css/variables/invalid-font-reference-expected.txt trunk/LayoutTests/fast/css/variables/invalid-font-reference.html Diff Modified: trunk/LayoutTests/ChangeLog (124832 => 124833) --- trunk/LayoutTests/ChangeLog 2012-08-07 01:46:25 UTC (rev 124832) +++ trunk/LayoutTests/ChangeLog 2012-08-07 01:57:28 UTC (rev 124833) @@ -1,3 +1,15 @@ +2012-08-06 Luke Macpherson + +Handle variables in CSSParser::parseValidPrimitive(), preventing null return value. +https://bugs.webkit.org/show_bug.cgi?id=93235 + +Reviewed by Tony Chang. + +Exercises the code path where variables are parsed in CSSParser::parseValidPrimitive(). + +* fast/css/variables/invalid-font-reference-expected.txt: Added. +* fast/css/variables/invalid-font-reference.html: Added. + 2012-08-06 Roger Fong LayoutTest: fast/forms/validation-message-user-modify.html fails. Added: trunk/LayoutTests/fast/css/variables/invalid-font-reference-expected.txt (0 => 124833) --- trunk/LayoutTests/fast/css/variables/invalid-font-reference-expected.txt (rev 0) +++ trunk/LayoutTests/fast/css/variables/invalid-font-reference-expected.txt 2012-08-07 01:57:28 UTC (rev 124833) @@ -0,0 +1 @@ +This test is successful if it does not crash. Added: trunk/LayoutTests/fast/css/variables/invalid-font-reference.html (0 => 124833) --- trunk/LayoutTests/fast/css/variables/invalid-font-reference.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/invalid-font-reference.html 2012-08-07 01:57:28 UTC (rev 124833) @@ -0,0 +1,15 @@ + + + +if (window.testRunner) { +testRunner.dumpAsText(); +internals.settings.setCSSVariablesEnabled(true); +} + + +body { + font: -webkit-var(var6) hangul mongolian; +} + +This test is successful if it does not crash. + Modified: trunk/Source/WebCore/ChangeLog (124832 => 124833) --- trunk/Source/WebCore/ChangeLog 2012-08-07 01:46:25 UTC (rev 124832) +++ trunk/Source/WebCore/ChangeLog 2012-08-07 01:57:28 UTC (rev 124833) @@ -1,3 +1,18 @@ +2012-08-06 Luke Macpherson + +Handle variables in CSSParser::parseValidPrimitive(), preventing null return value. +https://bugs.webkit.org/show_bug.cgi?id=93235 + +Reviewed by Tony Chang. + +By returning null here (and failing to handle the variable) the current code would cause null pointer dereferences in StyleResolver at several points. +Instead we create a primitive value for the variable reference and return it. + +Test: fast/css/variables/invalid-font-reference.html + +* css/CSSParser.cpp: +(WebCore::CSSParser::parseValidPrimitive): + 2012-08-06 David Reveman [Chromium] Rename CCTextureUpdater to CCTextureUpdateQueue. Modified: trunk/Source/WebCore/css/CSSParser.cpp (124832 => 124833) --- trunk/Source/WebCore/css/CSSParser.cpp 2012-08-07 01:46:25 UTC (rev 124832) +++ trunk/Source/WebCore/css/CSSParser.cpp 2012-08-07 01:57:28 UTC (rev 124833) @@ -1639,6 +1639,10 @@ if (value->unit >= CSSPrimitiveValue::CSS_DPPX && value->unit <= CSSPrimitiveValue::CSS_DPCM) return createPrimitiveNumericValue(value); #endif +#if ENABLE(CSS_VARIABLES) +if (value->unit == CSSPrimitiveValue::CSS_VARIABLE_NAME) +return CSSPrimitiveValue::create(value->string, CSSPrimitiveValue::CSS_VARIABLE_NAME); +#endif if (value->unit >= CSSParserValue::Q_EMS) return CSSPrimitiveValue::createAllowingMarginQuirk(value->fValue, CSSPrimitiveValue::CSS_EMS); if (isCalculation(value)) ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [124726] trunk/LayoutTests
Title: [124726] trunk/LayoutTests Revision 124726 Author macpher...@chromium.org Date 2012-08-05 19:35:53 -0700 (Sun, 05 Aug 2012) Log Message Enable fast/css/variables tests by default for chromium. https://bugs.webkit.org/show_bug.cgi?id=92610 Reviewed by Tony Chang. Since variables are now compiled in by default on chromium there is no reason not to run these tests. * platform/chromium/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/chromium/TestExpectations Diff Modified: trunk/LayoutTests/ChangeLog (124725 => 124726) --- trunk/LayoutTests/ChangeLog 2012-08-06 01:50:27 UTC (rev 124725) +++ trunk/LayoutTests/ChangeLog 2012-08-06 02:35:53 UTC (rev 124726) @@ -1,3 +1,14 @@ +2012-08-05 Luke Macpherson + +Enable fast/css/variables tests by default for chromium. +https://bugs.webkit.org/show_bug.cgi?id=92610 + +Reviewed by Tony Chang. + +Since variables are now compiled in by default on chromium there is no reason not to run these tests. + +* platform/chromium/TestExpectations: + 2012-08-05 Joone Hur Unreviewed EFL gardening. Modified: trunk/LayoutTests/platform/chromium/TestExpectations (124725 => 124726) --- trunk/LayoutTests/platform/chromium/TestExpectations 2012-08-06 01:50:27 UTC (rev 124725) +++ trunk/LayoutTests/platform/chromium/TestExpectations 2012-08-06 02:35:53 UTC (rev 124726) @@ -142,7 +142,6 @@ BUGGBILLOCK SKIP : webintents/intent-tag.html = PASS // CSS Variables are not yet enabled. -BUGWK85580 SKIP : fast/css/variables = PASS BUGWK85580 SKIP : inspector/styles/variables = PASS // CSS image-resolution is not yet enabled. ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [124723] trunk
Title: [124723] trunk Revision 124723 Author macpher...@chromium.org Date 2012-08-05 18:22:40 -0700 (Sun, 05 Aug 2012) Log Message Fix null pointer dereference when CSSParser::sinkFloatingValueList() returns null and is passed to storeVariableDeclaration(). https://bugs.webkit.org/show_bug.cgi?id=92461 Reviewed by Eric Seidel. Source/WebCore: Invalid variable lists could cause CSSGrammar.y to pass null as value to storeVariableDeclaration, so we now check for null. Test: fast/css/variables/invalid-value-list-crash.html * css/CSSParser.cpp: (WebCore::CSSParser::storeVariableDeclaration): LayoutTests: Test case that causes CSSParser::storeVariableDeclaration to be passed a null value. * fast/css/variables/invalid-value-list-crash-expected.txt: Added. * fast/css/variables/invalid-value-list-crash.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParser.cpp Added Paths trunk/LayoutTests/fast/css/variables/invalid-value-list-crash-expected.txt trunk/LayoutTests/fast/css/variables/invalid-value-list-crash.html Diff Modified: trunk/LayoutTests/ChangeLog (124722 => 124723) --- trunk/LayoutTests/ChangeLog 2012-08-06 01:19:58 UTC (rev 124722) +++ trunk/LayoutTests/ChangeLog 2012-08-06 01:22:40 UTC (rev 124723) @@ -1,3 +1,15 @@ +2012-08-05 Luke Macpherson + +Fix null pointer dereference when CSSParser::sinkFloatingValueList() returns null and is passed to storeVariableDeclaration(). +https://bugs.webkit.org/show_bug.cgi?id=92461 + +Reviewed by Eric Seidel. + +Test case that causes CSSParser::storeVariableDeclaration to be passed a null value. + +* fast/css/variables/invalid-value-list-crash-expected.txt: Added. +* fast/css/variables/invalid-value-list-crash.html: Added. + 2012-08-05 Kent Tamura [Chromium] Updte text expectation. Added: trunk/LayoutTests/fast/css/variables/invalid-value-list-crash-expected.txt (0 => 124723) --- trunk/LayoutTests/fast/css/variables/invalid-value-list-crash-expected.txt (rev 0) +++ trunk/LayoutTests/fast/css/variables/invalid-value-list-crash-expected.txt 2012-08-06 01:22:40 UTC (rev 124723) @@ -0,0 +1 @@ +This test is successful if it does not crash. Added: trunk/LayoutTests/fast/css/variables/invalid-value-list-crash.html (0 => 124723) --- trunk/LayoutTests/fast/css/variables/invalid-value-list-crash.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/invalid-value-list-crash.html 2012-08-06 01:22:40 UTC (rev 124723) @@ -0,0 +1,11 @@ + +if (window.testRunner) +testRunner.dumpAsText(); +internals.settings.setCSSVariablesEnabled(true); + + +div { +-webkit-var-a: -webkit-var(b) � +} + +This test is successful if it does not crash. Modified: trunk/Source/WebCore/ChangeLog (124722 => 124723) --- trunk/Source/WebCore/ChangeLog 2012-08-06 01:19:58 UTC (rev 124722) +++ trunk/Source/WebCore/ChangeLog 2012-08-06 01:22:40 UTC (rev 124723) @@ -1,3 +1,17 @@ +2012-08-05 Luke Macpherson + +Fix null pointer dereference when CSSParser::sinkFloatingValueList() returns null and is passed to storeVariableDeclaration(). +https://bugs.webkit.org/show_bug.cgi?id=92461 + +Reviewed by Eric Seidel. + +Invalid variable lists could cause CSSGrammar.y to pass null as value to storeVariableDeclaration, so we now check for null. + +Test: fast/css/variables/invalid-value-list-crash.html + +* css/CSSParser.cpp: +(WebCore::CSSParser::storeVariableDeclaration): + 2012-08-03 Kent Tamura [Chromium-win] Use the default locale only if the browser locale matches to it Modified: trunk/Source/WebCore/css/CSSParser.cpp (124722 => 124723) --- trunk/Source/WebCore/css/CSSParser.cpp 2012-08-06 01:19:58 UTC (rev 124722) +++ trunk/Source/WebCore/css/CSSParser.cpp 2012-08-06 01:22:40 UTC (rev 124723) @@ -3025,6 +3025,10 @@ void CSSParser::storeVariableDeclaration(const CSSParserString& name, PassOwnPtr value, bool important) { +// When CSSGrammar.y encounters an invalid declaration it passes null for the CSSParserValueList, just bail. +if (!value) +return; + ASSERT(name.length > 12); AtomicString variableName = String(name.characters + 12, name.length - 12); ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [124258] trunk
Title: [124258] trunk Revision 124258 Author macpher...@chromium.org Date 2012-07-31 15:36:20 -0700 (Tue, 31 Jul 2012) Log Message Heap-use-after-free in WebCore::StyleResolver::loadPendingImage https://bugs.webkit.org/show_bug.cgi?id=92606 Reviewed by Abhishek Arya. Source/WebCore: Changes StyleResolver's m_pendingImageProperties set to a map, such that for each property we keep a RefPtr to the CSSValue used to set that property. This ensures that CSSValues are not freed before they are needed by loadPendingImage. Test: fast/css/variables/deferred-image-load-from-variable.html * css/StyleResolver.cpp: * css/StyleResolver.h: LayoutTests: Exercises the codepath where an image is loaded using a url specified via a variable. * fast/css/variables/deferred-image-load-from-variable-expected.txt: Added. * fast/css/variables/deferred-image-load-from-variable.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/StyleResolver.cpp trunk/Source/WebCore/css/StyleResolver.h Added Paths trunk/LayoutTests/fast/css/variables/deferred-image-load-from-variable-expected.txt trunk/LayoutTests/fast/css/variables/deferred-image-load-from-variable.html Diff Modified: trunk/LayoutTests/ChangeLog (124257 => 124258) --- trunk/LayoutTests/ChangeLog 2012-07-31 22:34:18 UTC (rev 124257) +++ trunk/LayoutTests/ChangeLog 2012-07-31 22:36:20 UTC (rev 124258) @@ -1,3 +1,15 @@ +2012-07-31 Luke Macpherson + +Heap-use-after-free in WebCore::StyleResolver::loadPendingImage +https://bugs.webkit.org/show_bug.cgi?id=92606 + +Reviewed by Abhishek Arya. + +Exercises the codepath where an image is loaded using a url specified via a variable. + +* fast/css/variables/deferred-image-load-from-variable-expected.txt: Added. +* fast/css/variables/deferred-image-load-from-variable.html: Added. + 2012-07-31 Peter Kasting [Chromium] Rebaselines. Added: trunk/LayoutTests/fast/css/variables/deferred-image-load-from-variable-expected.txt (0 => 124258) --- trunk/LayoutTests/fast/css/variables/deferred-image-load-from-variable-expected.txt (rev 0) +++ trunk/LayoutTests/fast/css/variables/deferred-image-load-from-variable-expected.txt 2012-07-31 22:36:20 UTC (rev 124258) @@ -0,0 +1 @@ +This test is successful if it does not crash. Added: trunk/LayoutTests/fast/css/variables/deferred-image-load-from-variable.html (0 => 124258) --- trunk/LayoutTests/fast/css/variables/deferred-image-load-from-variable.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/deferred-image-load-from-variable.html 2012-07-31 22:36:20 UTC (rev 124258) @@ -0,0 +1,15 @@ + + +if (window.testRunner) { +testRunner.dumpAsText(); +internals.settings.setCSSVariablesEnabled(true); +} + + +div { + -webkit-var-a: url(1); + -webkit-mask: -webkit-var(a); +} + + +This test is successful if it does not crash. Modified: trunk/Source/WebCore/ChangeLog (124257 => 124258) --- trunk/Source/WebCore/ChangeLog 2012-07-31 22:34:18 UTC (rev 124257) +++ trunk/Source/WebCore/ChangeLog 2012-07-31 22:36:20 UTC (rev 124258) @@ -1,3 +1,19 @@ +2012-07-31 Luke Macpherson + +Heap-use-after-free in WebCore::StyleResolver::loadPendingImage +https://bugs.webkit.org/show_bug.cgi?id=92606 + +Reviewed by Abhishek Arya. + +Changes StyleResolver's m_pendingImageProperties set to a map, such that for each property we keep +a RefPtr to the CSSValue used to set that property. This ensures that CSSValues are not freed before +they are needed by loadPendingImage. + +Test: fast/css/variables/deferred-image-load-from-variable.html + +* css/StyleResolver.cpp: +* css/StyleResolver.h: + 2012-07-31 Chris Rogers Add stub implementation for MediaStreamAudioSourceNode Modified: trunk/Source/WebCore/css/StyleResolver.cpp (124257 => 124258) --- trunk/Source/WebCore/css/StyleResolver.cpp 2012-07-31 22:34:18 UTC (rev 124257) +++ trunk/Source/WebCore/css/StyleResolver.cpp 2012-07-31 22:36:20 UTC (rev 124258) @@ -4464,14 +4464,14 @@ { RefPtr image = value->cachedOrPendingImage(); if (image && image->isPendingImage()) -m_pendingImageProperties.add(property); +m_pendingImageProperties.set(property, value); return image.release(); } PassRefPtr StyleResolver::generatedOrPendingFromValue(CSSPropertyID property, CSSImageGeneratorValue* value) { if (value->isPending()) { -m_pendingImageProperties.add(property); +m_pendingImageProperties.set(property, value); return StylePendingImage::create(value); } return StyleGeneratedImage::create(value); @@ -4482,7 +4482,7 @@ { RefPtr image = value->cachedOrPendingImageSet(document()); if (image && image->isPendingImage()) -m_pendingImageProperties.add(p
[webkit-changes] [123714] trunk
Title: [123714] trunk Revision 123714 Author macpher...@chromium.org Date 2012-07-26 01:32:35 -0700 (Thu, 26 Jul 2012) Log Message Fix null ptr deref in CSSParser::storeVariableDeclaration(). https://bugs.webkit.org/show_bug.cgi?id=92333 Reviewed by Andreas Kling. Fix null pointer deref that occurs if the CSSParserValue couldn't be converted to a CSSValue. Test fast/css/variables/variable-unparseable-value-crash.html added. * css/CSSParser.cpp: (WebCore::CSSParser::storeVariableDeclaration): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParser.cpp Added Paths trunk/LayoutTests/fast/css/variables/variable-unparseable-value-crash-expected.txt trunk/LayoutTests/fast/css/variables/variable-unparseable-value-crash.html Diff Added: trunk/LayoutTests/fast/css/variables/variable-unparseable-value-crash-expected.txt (0 => 123714) --- trunk/LayoutTests/fast/css/variables/variable-unparseable-value-crash-expected.txt (rev 0) +++ trunk/LayoutTests/fast/css/variables/variable-unparseable-value-crash-expected.txt 2012-07-26 08:32:35 UTC (rev 123714) @@ -0,0 +1 @@ +This test is successful if it does not crash. Added: trunk/LayoutTests/fast/css/variables/variable-unparseable-value-crash.html (0 => 123714) --- trunk/LayoutTests/fast/css/variables/variable-unparseable-value-crash.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/variable-unparseable-value-crash.html 2012-07-26 08:32:35 UTC (rev 123714) @@ -0,0 +1,11 @@ + +if (window.testRunner) +testRunner.dumpAsText(); +internals.settings.setCSSVariablesEnabled(true); + + +div { +-webkit-var-b: 1pxpx; +} + +This test is successful if it does not crash. Modified: trunk/Source/WebCore/ChangeLog (123713 => 123714) --- trunk/Source/WebCore/ChangeLog 2012-07-26 08:11:37 UTC (rev 123713) +++ trunk/Source/WebCore/ChangeLog 2012-07-26 08:32:35 UTC (rev 123714) @@ -1,3 +1,17 @@ +2012-07-26 Luke Macpherson + +Fix null ptr deref in CSSParser::storeVariableDeclaration(). +https://bugs.webkit.org/show_bug.cgi?id=92333 + +Reviewed by Andreas Kling. + +Fix null pointer deref that occurs if the CSSParserValue couldn't be converted to a CSSValue. + +Test fast/css/variables/variable-unparseable-value-crash.html added. + +* css/CSSParser.cpp: +(WebCore::CSSParser::storeVariableDeclaration): + 2012-07-26 Shinya Kawanaka Add UserAgentShadowDOM to FormControlElement just before adding AuthorShadowDOM Modified: trunk/Source/WebCore/css/CSSParser.cpp (123713 => 123714) --- trunk/Source/WebCore/css/CSSParser.cpp 2012-07-26 08:11:37 UTC (rev 123713) +++ trunk/Source/WebCore/css/CSSParser.cpp 2012-07-26 08:32:35 UTC (rev 123714) @@ -3022,7 +3022,10 @@ for (unsigned i = 0, size = value->size(); i < size; i++) { if (i) builder.append(' '); -builder.append(value->valueAt(i)->createCSSValue()->cssText()); +RefPtr cssValue = value->valueAt(i)->createCSSValue(); +if (!cssValue) +return; +builder.append(cssValue->cssText()); } addProperty(CSSPropertyVariable, CSSVariableValue::create(variableName, builder.toString()), important, false); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [123176] trunk/Source/WebKit/chromium
Title: [123176] trunk/Source/WebKit/chromium Revision 123176 Author macpher...@chromium.org Date 2012-07-19 21:29:39 -0700 (Thu, 19 Jul 2012) Log Message Enable CSS variables compile time flag in Chrome. https://bugs.webkit.org/show_bug.cgi?id=91708 Reviewed by Dimitri Glazkov. Flips the ENABLE_CSS_VARIABLES compile flag on for Chrome. There is also a run-time flag that is off by default, so this should not have a user visible effect other than making the variables runtime flag visible at chrome://flags/ * features.gypi: Modified Paths trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/features.gypi Diff Modified: trunk/Source/WebKit/chromium/ChangeLog (123175 => 123176) --- trunk/Source/WebKit/chromium/ChangeLog 2012-07-20 04:27:18 UTC (rev 123175) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-07-20 04:29:39 UTC (rev 123176) @@ -1,3 +1,15 @@ +2012-07-19 Luke Macpherson + +Enable CSS variables compile time flag in Chrome. +https://bugs.webkit.org/show_bug.cgi?id=91708 + +Reviewed by Dimitri Glazkov. + +Flips the ENABLE_CSS_VARIABLES compile flag on for Chrome. There is also a run-time flag that is off by default, +so this should not have a user visible effect other than making the variables runtime flag visible at chrome://flags/ + +* features.gypi: + 2012-07-19 Wei James enable Web Audio for chromium android port Modified: trunk/Source/WebKit/chromium/features.gypi (123175 => 123176) --- trunk/Source/WebKit/chromium/features.gypi 2012-07-20 04:27:18 UTC (rev 123175) +++ trunk/Source/WebKit/chromium/features.gypi 2012-07-20 04:29:39 UTC (rev 123176) @@ -46,7 +46,7 @@ 'ENABLE_CSS_IMAGE_RESOLUTION=0', 'ENABLE_CSS_REGIONS=1', 'ENABLE_CSS_SHADERS=1', - 'ENABLE_CSS_VARIABLES=0', + 'ENABLE_CSS_VARIABLES=1', 'ENABLE_CUSTOM_SCHEME_HANDLER=0', 'ENABLE_DATALIST=1', 'ENABLE_DASHBOARD_SUPPORT=0', ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [122923] trunk/Source/WebCore
Title: [122923] trunk/Source/WebCore Revision 122923 Author macpher...@chromium.org Date 2012-07-18 00:09:21 -0700 (Wed, 18 Jul 2012) Log Message Fix null pointer dereference introduced by Changeset 121874. https://bugs.webkit.org/show_bug.cgi?id=91578 Reviewed by Pavel Feldman. In http://trac.webkit.org/changeset/121874/trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp I introduced code that dereferences the return value of ownerDocument() without doing a null check. This was a bad idea. No new tests. I don't have a repro case, but it is clear from reading the code for ownerDocument() that it can return null. * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheet::ensureSourceData): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (122922 => 122923) --- trunk/Source/WebCore/ChangeLog 2012-07-18 06:50:25 UTC (rev 122922) +++ trunk/Source/WebCore/ChangeLog 2012-07-18 07:09:21 UTC (rev 122923) @@ -1,3 +1,18 @@ +2012-07-18 Luke Macpherson + +Fix null pointer dereference introduced by Changeset 121874. +https://bugs.webkit.org/show_bug.cgi?id=91578 + +Reviewed by Pavel Feldman. + +In http://trac.webkit.org/changeset/121874/trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp I introduced code that +dereferences the return value of ownerDocument() without doing a null check. This was a bad idea. + +No new tests. I don't have a repro case, but it is clear from reading the code for ownerDocument() that it can return null. + +* inspector/InspectorStyleSheet.cpp: +(WebCore::InspectorStyleSheet::ensureSourceData): + 2012-07-17 Yoshifumi Inoue Decimal constructor with 9 loses last digit Modified: trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp (122922 => 122923) --- trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp 2012-07-18 06:50:25 UTC (rev 122922) +++ trunk/Source/WebCore/inspector/InspectorStyleSheet.cpp 2012-07-18 07:09:21 UTC (rev 122923) @@ -1116,7 +1116,8 @@ return false; RefPtr newStyleSheet = StyleSheetContents::create(); -CSSParser p(m_pageStyleSheet->ownerDocument()); +Document* ownerDocument = m_pageStyleSheet->ownerDocument(); +CSSParser p(ownerDocument ? CSSParserContext(ownerDocument) : strictCSSParserContext()); OwnPtr ruleSourceDataResult = adoptPtr(new RuleSourceDataList()); p.parseSheet(newStyleSheet.get(), m_parsedStyleSheet->text(), 0, ruleSourceDataResult.get()); m_parsedStyleSheet->setSourceData(ruleSourceDataResult.release()); ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [122700] trunk/Source/WebCore
Title: [122700] trunk/Source/WebCore Revision 122700 Author macpher...@chromium.org Date 2012-07-16 00:11:03 -0700 (Mon, 16 Jul 2012) Log Message Compilation failure in StyleResolver.cpp (clang) https://bugs.webkit.org/show_bug.cgi?id=89892 Reviewed by Ryosuke Niwa. Patch adds assertions that unreachable code is in fact not reached. Covered by fast/css/variables tests. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParser.cpp trunk/Source/WebCore/css/StyleResolver.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (122699 => 122700) --- trunk/Source/WebCore/ChangeLog 2012-07-16 06:50:28 UTC (rev 122699) +++ trunk/Source/WebCore/ChangeLog 2012-07-16 07:11:03 UTC (rev 122700) @@ -1,3 +1,19 @@ +2012-07-16 Luke Macpherson + +Compilation failure in StyleResolver.cpp (clang) +https://bugs.webkit.org/show_bug.cgi?id=89892 + +Reviewed by Ryosuke Niwa. + +Patch adds assertions that unreachable code is in fact not reached. + +Covered by fast/css/variables tests. + +* css/CSSParser.cpp: +(WebCore::CSSParser::parseValue): +* css/StyleResolver.cpp: +(WebCore::StyleResolver::collectMatchingRulesForList): + 2012-07-15 Mike Lawther Fix calculation of rgba's alpha in CSS custom text Modified: trunk/Source/WebCore/css/CSSParser.cpp (122699 => 122700) --- trunk/Source/WebCore/css/CSSParser.cpp 2012-07-16 06:50:28 UTC (rev 122699) +++ trunk/Source/WebCore/css/CSSParser.cpp 2012-07-16 07:11:03 UTC (rev 122700) @@ -1682,6 +1682,7 @@ m_valueList->next(); return true; } +ASSERT(propId != CSSPropertyVariable); #endif if (isKeywordPropertyID(propId)) { @@ -2694,11 +2695,6 @@ m_valueList->next(); break; #endif -#if ENABLE(CSS_VARIABLES) -case CSSPropertyVariable: -// FIXME: This should have an actual implementation. -return false; -#endif case CSSPropertyBorderBottomStyle: case CSSPropertyBorderCollapse: case CSSPropertyBorderLeftStyle: @@ -2735,6 +2731,9 @@ case CSSPropertyTextTransform: case CSSPropertyTextUnderlineMode: case CSSPropertyTextUnderlineStyle: +#if ENABLE(CSS_VARIABLES) +case CSSPropertyVariable: +#endif case CSSPropertyVisibility: case CSSPropertyWebkitAppearance: case CSSPropertyWebkitBackfaceVisibility: Modified: trunk/Source/WebCore/css/StyleResolver.cpp (122699 => 122700) --- trunk/Source/WebCore/css/StyleResolver.cpp 2012-07-16 06:50:28 UTC (rev 122699) +++ trunk/Source/WebCore/css/StyleResolver.cpp 2012-07-16 07:11:03 UTC (rev 122700) @@ -4105,11 +4105,6 @@ m_style->setGridItemRow(row); return; } -#if ENABLE(CSS_VARIABLES) -case CSSPropertyVariable: -// FIXME: This should have an actual implementation. -return; -#endif // These properties are implemented in the StyleBuilder lookup table. case CSSPropertyBackgroundAttachment: case CSSPropertyBackgroundClip: @@ -4226,6 +4221,9 @@ case CSSPropertyTextTransform: case CSSPropertyTop: case CSSPropertyUnicodeBidi: +#if ENABLE(CSS_VARIABLES) +case CSSPropertyVariable: +#endif case CSSPropertyVerticalAlign: case CSSPropertyVisibility: case CSSPropertyWebkitAnimationDelay: ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [121874] trunk
// UndoManager is not yet enabled. BUGWK87908 SKIP : editing/undomanager = PASS Modified: trunk/LayoutTests/platform/qt/TestExpectations (121873 => 121874) --- trunk/LayoutTests/platform/qt/TestExpectations 2012-07-04 22:41:17 UTC (rev 121873) +++ trunk/LayoutTests/platform/qt/TestExpectations 2012-07-05 00:15:54 UTC (rev 121874) @@ -73,6 +73,7 @@ // CSS Variables are not yet enabled. BUGWK85580 SKIP : fast/css/variables = PASS +BUGWK85580 SKIP : inspector/styles/variables = PASS // UndoManager is not yet enabled. BUGWK87908 SKIP : editing/undomanager = PASS Modified: trunk/Source/WebCore/ChangeLog (121873 => 121874) --- trunk/Source/WebCore/ChangeLog 2012-07-04 22:41:17 UTC (rev 121873) +++ trunk/Source/WebCore/ChangeLog 2012-07-05 00:15:54 UTC (rev 121874) @@ -1,3 +1,29 @@ +2012-07-04 Luke Macpherson + +Inspector crashes when trying to inspect a page with CSS variables +https://bugs.webkit.org/show_bug.cgi?id=89818 + +Reviewed by Antti Koivisto. + +Patch works by fixing treating handling of CSSPropertyID == CSSPropertyVariable as a special case, +and looking up the author-defined property name from the CSSValue. + +Added test inspector/styles/variables/css-variables.html that inspects an element using CSS variables. +Test is skipped when variables are compiled out. + +* css/CSSProperty.cpp: +(WebCore::CSSProperty::cssName): +(WebCore): +(WebCore::CSSProperty::cssText): +* css/CSSProperty.h: +(CSSProperty): +* css/PropertySetCSSStyleDeclaration.cpp: +(WebCore::PropertySetCSSStyleDeclaration::item): +* css/StylePropertySet.cpp: +(WebCore::StylePropertySet::asText): +* inspector/InspectorStyleSheet.cpp: +(WebCore::InspectorStyle::populateAllProperties): + 2012-07-04 Anthony Scian Web Inspector [JSC]: Implement ScriptCallStack::stackTrace Modified: trunk/Source/WebCore/css/CSSGrammar.y (121873 => 121874) --- trunk/Source/WebCore/css/CSSGrammar.y 2012-07-04 22:41:17 UTC (rev 121873) +++ trunk/Source/WebCore/css/CSSGrammar.y 2012-07-05 00:15:54 UTC (rev 121874) @@ -1360,7 +1360,7 @@ CSSParser* p = static_cast(parser); p->storeVariableDeclaration($1, p->sinkFloatingValueList($4), $5); $$ = true; -p->markPropertyEnd($5, $$); +p->markPropertyEnd($5, true); #else $$ = false; #endif Modified: trunk/Source/WebCore/css/CSSParser.cpp (121873 => 121874) --- trunk/Source/WebCore/css/CSSParser.cpp 2012-07-04 22:41:17 UTC (rev 121873) +++ trunk/Source/WebCore/css/CSSParser.cpp 2012-07-05 00:15:54 UTC (rev 121874) @@ -3012,13 +3012,16 @@ void CSSParser::storeVariableDeclaration(const CSSParserString& name, PassOwnPtr value, bool important) { +ASSERT(name.length > 12); +AtomicString variableName = String(name.characters + 12, name.length - 12); + StringBuilder builder; for (unsigned i = 0, size = value->size(); i < size; i++) { if (i) builder.append(' '); builder.append(value->valueAt(i)->createCSSValue()->cssText()); } -addProperty(CSSPropertyVariable, CSSVariableValue::create(name, builder.toString()), important, false); +addProperty(CSSPropertyVariable, CSSVariableValue::create(variableName, builder.toString()), important, false); } #endif @@ -8981,21 +8984,16 @@ } case CharacterDash: -#if ENABLE(CSS_VARIABLES) -if (cssVariablesEnabled() && isEqualToCSSIdentifier(m_currentCharacter, "webkit-var") && m_currentCharacter[10] == '-' && isIdentifierStartAfterDash(m_currentCharacter + 11)) { -// handle variable declarations -m_currentCharacter += 11; -parseIdentifier(result, hasEscape); -m_token = VAR_DEFINITION; -yylval->string.characters = m_tokenStart; -yylval->string.length = result - m_tokenStart; -} else -#endif if (isIdentifierStartAfterDash(m_currentCharacter)) { --m_currentCharacter; parseIdentifier(result, hasEscape); m_token = IDENT; +#if ENABLE(CSS_VARIABLES) +if (cssVariablesEnabled() && isEqualToCSSIdentifier(m_tokenStart + 1, "webkit-var") && m_tokenStart[11] == '-' && isIdentifierStartAfterDash(m_tokenStart + 12)) +m_token = VAR_DEFINITION; +else +#endif if (*m_currentCharacter == '(') { m_token = FUNCTION; if (!hasEscape) Modified: trunk/Source/WebCore/css/CSSProperty.cpp (121873 => 121874) --- trunk/Source/WebCore/css/CSSProperty.cpp 2012-07-04 22:41:17 UTC (rev 121873) +++ trunk/Source/WebCore/css/CSSProperty.cpp 2012-07-05 00:15:54 UTC (rev 121874) @@ -26,6 +26,10 @@ #include "RenderStyleConstants.h&quo
[webkit-changes] [121320] trunk/Source/WebCore
Title: [121320] trunk/Source/WebCore Revision 121320 Author macpher...@chromium.org Date 2012-06-26 22:40:18 -0700 (Tue, 26 Jun 2012) Log Message Return correct value for css variables enabled runtime flag. https://bugs.webkit.org/show_bug.cgi?id=90040 Reviewed by Dimitri Glazkov. Was always returning true for the runtime flag when the compile time flag was on. That was good for testing, but not so much for production. * page/Settings.h: (WebCore::Settings::cssVariablesEnabled): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/page/Settings.h Diff Modified: trunk/Source/WebCore/ChangeLog (121319 => 121320) --- trunk/Source/WebCore/ChangeLog 2012-06-27 04:22:47 UTC (rev 121319) +++ trunk/Source/WebCore/ChangeLog 2012-06-27 05:40:18 UTC (rev 121320) @@ -1,3 +1,16 @@ +2012-06-26 Luke Macpherson + +Return correct value for css variables enabled runtime flag. +https://bugs.webkit.org/show_bug.cgi?id=90040 + +Reviewed by Dimitri Glazkov. + +Was always returning true for the runtime flag when the compile time flag was on. That was good for testing, +but not so much for production. + +* page/Settings.h: +(WebCore::Settings::cssVariablesEnabled): + 2012-06-26 Xueqing Huang DragData::asFilenames should not push same file names to result in Windows. Modified: trunk/Source/WebCore/page/Settings.h (121319 => 121320) --- trunk/Source/WebCore/page/Settings.h 2012-06-27 04:22:47 UTC (rev 121319) +++ trunk/Source/WebCore/page/Settings.h 2012-06-27 05:40:18 UTC (rev 121320) @@ -333,7 +333,7 @@ #if ENABLE(CSS_VARIABLES) void setCSSVariablesEnabled(bool enabled) { m_cssVariablesEnabled = enabled; } -bool cssVariablesEnabled() const { return true; } +bool cssVariablesEnabled() const { return m_cssVariablesEnabled; } #else void setCSSVariablesEnabled(bool) { } bool cssVariablesEnabled() const { return false; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [121311] trunk
Title: [121311] trunk Revision 121311 Author macpher...@chromium.org Date 2012-06-26 18:57:13 -0700 (Tue, 26 Jun 2012) Log Message Be careful not to read past the end of input in CSSParser::lex() when looking for variable definitions. https://bugs.webkit.org/show_bug.cgi?id=89949 Reviewed by Abhishek Arya. Added repro case as fast/css/short-inline-style.html. * css/CSSParser.cpp: (WebCore::CSSParser::lex): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParser.cpp Added Paths trunk/LayoutTests/fast/css/short-inline-style-expected.txt trunk/LayoutTests/fast/css/short-inline-style.html Diff Added: trunk/LayoutTests/fast/css/short-inline-style-expected.txt (0 => 121311) --- trunk/LayoutTests/fast/css/short-inline-style-expected.txt (rev 0) +++ trunk/LayoutTests/fast/css/short-inline-style-expected.txt 2012-06-27 01:57:13 UTC (rev 121311) @@ -0,0 +1 @@ +Test successful if it does not crash. Added: trunk/LayoutTests/fast/css/short-inline-style.html (0 => 121311) --- trunk/LayoutTests/fast/css/short-inline-style.html (rev 0) +++ trunk/LayoutTests/fast/css/short-inline-style.html 2012-06-27 01:57:13 UTC (rev 121311) @@ -0,0 +1,5 @@ + +if (window.testRunner) +testRunner.dumpAsText(); + +Test successful if it does not crash. Modified: trunk/Source/WebCore/ChangeLog (121310 => 121311) --- trunk/Source/WebCore/ChangeLog 2012-06-27 01:49:20 UTC (rev 121310) +++ trunk/Source/WebCore/ChangeLog 2012-06-27 01:57:13 UTC (rev 121311) @@ -1,3 +1,15 @@ +2012-06-26 Luke Macpherson + +Be careful not to read past the end of input in CSSParser::lex() when looking for variable definitions. +https://bugs.webkit.org/show_bug.cgi?id=89949 + +Reviewed by Abhishek Arya. + +Added repro case as fast/css/short-inline-style.html. + +* css/CSSParser.cpp: +(WebCore::CSSParser::lex): + 2012-06-26 James Robinson [chromium] Remove WebView::graphicsContext3D getter Modified: trunk/Source/WebCore/css/CSSParser.cpp (121310 => 121311) --- trunk/Source/WebCore/css/CSSParser.cpp 2012-06-27 01:49:20 UTC (rev 121310) +++ trunk/Source/WebCore/css/CSSParser.cpp 2012-06-27 01:57:13 UTC (rev 121311) @@ -8972,7 +8972,7 @@ case CharacterDash: #if ENABLE(CSS_VARIABLES) -if (cssVariablesEnabled() && m_currentCharacter[10] == '-' && isEqualToCSSIdentifier(m_currentCharacter, "webkit-var") && isIdentifierStartAfterDash(m_currentCharacter + 11)) { +if (cssVariablesEnabled() && isEqualToCSSIdentifier(m_currentCharacter, "webkit-var") && m_currentCharacter[10] == '-' && isIdentifierStartAfterDash(m_currentCharacter + 11)) { // handle variable declarations m_currentCharacter += 11; parseIdentifier(result, hasEscape); ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [121229] trunk
Title: [121229] trunk Revision 121229 Author macpher...@chromium.org Date 2012-06-25 22:23:57 -0700 (Mon, 25 Jun 2012) Log Message Add runtime flag to enable/disable CSS variables (in addition to existing compile-time flag). https://bugs.webkit.org/show_bug.cgi?id=89542 Reviewed by Dimitri Glazkov. Source/WebCore: Added fast/css/variables/build-supports-variables.html to test runtime flag in test environment. Updated all other css variables tests to enable the runtime flag from JS. * css/CSSParser.cpp: (WebCore::CSSParserContext::CSSParserContext): (WebCore::operator==): (WebCore::CSSParser::cssVariablesEnabled): (WebCore): (WebCore::CSSParser::detectDashToken): (WebCore::CSSParser::lex): * css/CSSParser.h: (CSSParser): * css/CSSParserMode.h: (CSSParserContext): * page/Settings.h: (Settings): (WebCore::Settings::setCSSVariablesEnabled): (WebCore::Settings::cssVariablesEnabled): Source/WebKit/chromium: * features.gypi: * public/WebSettings.h: * src/WebSettingsImpl.cpp: (WebKit::WebSettingsImpl::setExperimentalCSSVariablesEnabled): (WebKit): * src/WebSettingsImpl.h: (WebSettingsImpl): Modified Paths trunk/LayoutTests/fast/css/variables/border-width.html trunk/LayoutTests/fast/css/variables/colors-test.html trunk/LayoutTests/fast/css/variables/complex-cycle.html trunk/LayoutTests/fast/css/variables/computed-style.html trunk/LayoutTests/fast/css/variables/inherited-values.html trunk/LayoutTests/fast/css/variables/inline-styles.html trunk/LayoutTests/fast/css/variables/invalid-shorthand.html trunk/LayoutTests/fast/css/variables/invalid-variable-value.html trunk/LayoutTests/fast/css/variables/multi-level-cycle.html trunk/LayoutTests/fast/css/variables/redefinition.html trunk/LayoutTests/fast/css/variables/shorthand.html trunk/LayoutTests/fast/css/variables/simple-cycle.html trunk/LayoutTests/fast/css/variables/transform-test.html trunk/LayoutTests/fast/css/variables/undefined.html trunk/LayoutTests/fast/css/variables/use-before-defined.html trunk/LayoutTests/fast/css/variables/var-inside-shorthand.html trunk/LayoutTests/fast/css/variables/variable-chain.html trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParser.cpp trunk/Source/WebCore/css/CSSParser.h trunk/Source/WebCore/css/CSSParserMode.h trunk/Source/WebCore/css/StyleResolver.cpp trunk/Source/WebCore/page/Settings.h trunk/Source/WebCore/testing/InternalSettings.cpp trunk/Source/WebCore/testing/InternalSettings.h trunk/Source/WebCore/testing/InternalSettings.idl trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/public/WebSettings.h trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp trunk/Source/WebKit/chromium/src/WebSettingsImpl.h Added Paths trunk/LayoutTests/fast/css/variables/build-supports-variables-expected.txt trunk/LayoutTests/fast/css/variables/build-supports-variables.html Diff Modified: trunk/LayoutTests/fast/css/variables/border-width.html (121228 => 121229) --- trunk/LayoutTests/fast/css/variables/border-width.html 2012-06-26 04:47:14 UTC (rev 121228) +++ trunk/LayoutTests/fast/css/variables/border-width.html 2012-06-26 05:23:57 UTC (rev 121229) @@ -1,3 +1,6 @@ + +internals.settings.setCSSVariablesEnabled(true); +
[webkit-changes] [121129] trunk
Title: [121129] trunk Revision 121129 Author macpher...@chromium.org Date 2012-06-24 19:03:45 -0700 (Sun, 24 Jun 2012) Log Message Add runtime flag to enable/disable CSS variables (in addition to existing compile-time flag). https://bugs.webkit.org/show_bug.cgi?id=89542 Reviewed by Dimitri Glazkov. Source/WebCore: Added fast/css/variables/build-supports-variables.html to test runtime flag in test environment. Updated all other css variables tests to enable the runtime flag from JS. * css/CSSParser.cpp: (WebCore::CSSParserContext::CSSParserContext): (WebCore::operator==): (WebCore::CSSParser::cssVariablesEnabled): (WebCore): (WebCore::CSSParser::detectDashToken): (WebCore::CSSParser::lex): * css/CSSParser.h: (CSSParser): * css/CSSParserMode.h: (CSSParserContext): * page/Settings.h: (Settings): (WebCore::Settings::setCSSVariablesEnabled): (WebCore::Settings::cssVariablesEnabled): Source/WebKit/chromium: * features.gypi: * public/WebSettings.h: * src/WebSettingsImpl.cpp: (WebKit::WebSettingsImpl::setExperimentalCSSVariablesEnabled): (WebKit): * src/WebSettingsImpl.h: (WebSettingsImpl): Modified Paths trunk/LayoutTests/fast/css/variables/border-width.html trunk/LayoutTests/fast/css/variables/colors-test.html trunk/LayoutTests/fast/css/variables/complex-cycle.html trunk/LayoutTests/fast/css/variables/computed-style.html trunk/LayoutTests/fast/css/variables/inherited-values.html trunk/LayoutTests/fast/css/variables/inline-styles.html trunk/LayoutTests/fast/css/variables/invalid-shorthand.html trunk/LayoutTests/fast/css/variables/invalid-variable-value.html trunk/LayoutTests/fast/css/variables/multi-level-cycle.html trunk/LayoutTests/fast/css/variables/redefinition.html trunk/LayoutTests/fast/css/variables/shorthand.html trunk/LayoutTests/fast/css/variables/simple-cycle.html trunk/LayoutTests/fast/css/variables/transform-test.html trunk/LayoutTests/fast/css/variables/undefined.html trunk/LayoutTests/fast/css/variables/use-before-defined.html trunk/LayoutTests/fast/css/variables/var-inside-shorthand.html trunk/LayoutTests/fast/css/variables/variable-chain.html trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParser.cpp trunk/Source/WebCore/css/CSSParser.h trunk/Source/WebCore/css/CSSParserMode.h trunk/Source/WebCore/css/StyleResolver.cpp trunk/Source/WebCore/page/Settings.h trunk/Source/WebCore/testing/InternalSettings.cpp trunk/Source/WebCore/testing/InternalSettings.h trunk/Source/WebCore/testing/InternalSettings.idl trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/features.gypi trunk/Source/WebKit/chromium/public/WebSettings.h trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp trunk/Source/WebKit/chromium/src/WebSettingsImpl.h Added Paths trunk/LayoutTests/fast/css/variables/build-supports-variables-expected.txt trunk/LayoutTests/fast/css/variables/build-supports-variables.html Diff Modified: trunk/LayoutTests/fast/css/variables/border-width.html (121128 => 121129) --- trunk/LayoutTests/fast/css/variables/border-width.html 2012-06-25 01:47:35 UTC (rev 121128) +++ trunk/LayoutTests/fast/css/variables/border-width.html 2012-06-25 02:03:45 UTC (rev 121129) @@ -1,3 +1,6 @@ + +internals.settings.setCSSVariablesEnabled(true); +
[webkit-changes] [118885] trunk/Source/WebCore
Title: [118885] trunk/Source/WebCore Revision 118885 Author macpher...@chromium.org Date 2012-05-29 20:30:23 -0700 (Tue, 29 May 2012) Log Message Implement post-landing feedback for WebKitCSSTransformValue::customCSSText(). https://bugs.webkit.org/show_bug.cgi?id=87684 Reviewed by Darin Adler. Darin provided some style suggesting on https://bugs.webkit.org/show_bug.cgi?id=87462 after it landed. This patch incorporates those suggestions, namely using 0 instead of empty string for UnknownTransformOperation and WTF_ARRAY_LENGTH instead of hard coding the array length. Covered by existing transform tests. * css/WebKitCSSTransformValue.cpp: (WebCore): (WebCore::WebKitCSSTransformValue::customCssText): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/WebKitCSSTransformValue.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (118884 => 118885) --- trunk/Source/WebCore/ChangeLog 2012-05-30 03:15:25 UTC (rev 118884) +++ trunk/Source/WebCore/ChangeLog 2012-05-30 03:30:23 UTC (rev 118885) @@ -1,3 +1,20 @@ +2012-05-29 Luke Macpherson + +Implement post-landing feedback for WebKitCSSTransformValue::customCSSText(). +https://bugs.webkit.org/show_bug.cgi?id=87684 + +Reviewed by Darin Adler. + +Darin provided some style suggesting on https://bugs.webkit.org/show_bug.cgi?id=87462 after it landed. +This patch incorporates those suggestions, namely using 0 instead of empty string for UnknownTransformOperation +and WTF_ARRAY_LENGTH instead of hard coding the array length. + +Covered by existing transform tests. + +* css/WebKitCSSTransformValue.cpp: +(WebCore): +(WebCore::WebKitCSSTransformValue::customCssText): + 2012-05-29 Eric Seidel Fix ENABLE_IFRAME_SEAMLESS to actually fully disable Modified: trunk/Source/WebCore/css/WebKitCSSTransformValue.cpp (118884 => 118885) --- trunk/Source/WebCore/css/WebKitCSSTransformValue.cpp 2012-05-30 03:15:25 UTC (rev 118884) +++ trunk/Source/WebCore/css/WebKitCSSTransformValue.cpp 2012-05-30 03:30:23 UTC (rev 118885) @@ -33,9 +33,9 @@ namespace WebCore { -const int transformNameSize = 22; -const char* const transformName[transformNameSize] = { - "", +// These names must be kept in sync with TransformOperationType. +const char* const transformName[] = { + 0, "translate", "translateX", "translateY", @@ -69,7 +69,7 @@ { StringBuilder result; if (m_type != UnknownTransformOperation) { -ASSERT(m_type < transformNameSize); +ASSERT(static_cast(m_type) < WTF_ARRAY_LENGTH(transformName)); result.append(transformName[m_type]); result.append('('); result.append(CSSValueList::customCssText()); ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [118712] trunk/Source/WebCore
Title: [118712] trunk/Source/WebCore Revision 118712 Author macpher...@chromium.org Date 2012-05-28 16:56:36 -0700 (Mon, 28 May 2012) Log Message Make CSSParser::filteredProperties() O(n) instead of O(n^2) and improve readability. https://bugs.webkit.org/show_bug.cgi?id=87078 Reviewed by Darin Adler. This patch implements a number of improvements to filteredProperties: 1) Make the code more linearly readable by separating out handling of important and non-important properties. 2) Eliminate one BitArray instance (reduces hot memory so more cache friendly). 3) Remove O(n^2) behavior caused by scanning for and removing previously encountered definitions of each property. The key algorithmic change is to add properties in decreasing precedence: a) Iterating once per (important, !important) so that important properties are visited first. b) Reverse iteration of m_parsedProperties visits the properties in decreasing precedence. Covered by loads of existing tests - getting CSS property precedence wrong results in too many errors to list. In particular fast/css contains test cases for important corner cases like duplicated important properties. * css/CSSParser.cpp: (WebCore::CSSParser::createStylePropertySet): * css/CSSProperty.h: Add vector traits so that CSSProperty can just be memset by vector without calling constructor. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParser.cpp trunk/Source/WebCore/css/CSSParser.h trunk/Source/WebCore/css/CSSProperty.h Diff Modified: trunk/Source/WebCore/ChangeLog (118711 => 118712) --- trunk/Source/WebCore/ChangeLog 2012-05-28 23:52:47 UTC (rev 118711) +++ trunk/Source/WebCore/ChangeLog 2012-05-28 23:56:36 UTC (rev 118712) @@ -1,3 +1,26 @@ +2012-05-28 Luke Macpherson + +Make CSSParser::filteredProperties() O(n) instead of O(n^2) and improve readability. +https://bugs.webkit.org/show_bug.cgi?id=87078 + +Reviewed by Darin Adler. + +This patch implements a number of improvements to filteredProperties: +1) Make the code more linearly readable by separating out handling of important and non-important properties. +2) Eliminate one BitArray instance (reduces hot memory so more cache friendly). +3) Remove O(n^2) behavior caused by scanning for and removing previously encountered definitions of each property. +The key algorithmic change is to add properties in decreasing precedence: +a) Iterating once per (important, !important) so that important properties are visited first. +b) Reverse iteration of m_parsedProperties visits the properties in decreasing precedence. + +Covered by loads of existing tests - getting CSS property precedence wrong results in too many errors to list. +In particular fast/css contains test cases for important corner cases like duplicated important properties. + +* css/CSSParser.cpp: +(WebCore::CSSParser::createStylePropertySet): +* css/CSSProperty.h: +Add vector traits so that CSSProperty can just be memset by vector without calling constructor. + 2012-05-28 MORITA Hajime Can't edit elements with :first-letter Modified: trunk/Source/WebCore/css/CSSParser.cpp (118711 => 118712) --- trunk/Source/WebCore/css/CSSParser.cpp 2012-05-28 23:52:47 UTC (rev 118711) +++ trunk/Source/WebCore/css/CSSParser.cpp 2012-05-28 23:56:36 UTC (rev 118712) @@ -1177,38 +1177,33 @@ return m_mediaQuery.release(); } -PassRefPtr CSSParser::createStylePropertySet() +static inline void filterProperties(bool important, const CSSParser::ParsedPropertyVector& input, StylePropertyVector& output, size_t& unusedEntries, BitArray& seenProperties) { -BitArray seenProperties; -BitArray seenImportantProperties; - -StylePropertyVector results; -results.reserveInitialCapacity(m_parsedProperties.size()); - -for (unsigned i = 0; i < m_parsedProperties.size(); ++i) { -const CSSProperty& property = m_parsedProperties[i]; +// Add properties in reverse order so that highest priority definitions are reached first. Duplicate definitions can then be ignored when found. +for (int i = input.size() - 1; i >= 0; --i) { +const CSSProperty& property = input[i]; +if (property.isImportant() != important) +continue; const unsigned propertyIDIndex = property.id() - firstCSSProperty; - -// Ignore non-important properties if we already have an important property with the same ID. -if (!property.isImportant() && seenImportantProperties.get(propertyIDIndex)) +if (seenProperties.get(propertyIDIndex)) continue; +seenProperties.set(propertyIDIndex); +output[--unusedEntries] = property; +} +} -// If we already had this property, this new one takes precedence, so wipe out the old one. -if (seenProperties.get(propertyIDIndex)) { -
[webkit-changes] [118656] trunk/Tools
Title: [118656] trunk/Tools Revision 118656 Author macpher...@chromium.org Date 2012-05-28 02:03:41 -0700 (Mon, 28 May 2012) Log Message Fix mac build with older XCode by defining NSEC_PER_MSEC. https://bugs.webkit.org/show_bug.cgi?id=87616 Reviewed by Hajime Morita. The following patch introduced the use of NSEC_PER_MSEC which is not defined for older XCode versions. http://trac.webkit.org/changeset/118631/trunk/Tools/DumpRenderTree/mac/FrameLoadDelegate.mm Patch just adds a #ifndef / #define check. * DumpRenderTree/mac/FrameLoadDelegate.mm: (-[FrameLoadDelegate webView:didStartProvisionalLoadForFrame:]): Modified Paths trunk/Tools/ChangeLog trunk/Tools/DumpRenderTree/mac/FrameLoadDelegate.mm Diff Modified: trunk/Tools/ChangeLog (118655 => 118656) --- trunk/Tools/ChangeLog 2012-05-28 08:53:45 UTC (rev 118655) +++ trunk/Tools/ChangeLog 2012-05-28 09:03:41 UTC (rev 118656) @@ -1,3 +1,17 @@ +2012-05-28 Luke Macpherson + +Fix mac build with older XCode by defining NSEC_PER_MSEC. +https://bugs.webkit.org/show_bug.cgi?id=87616 + +Reviewed by Hajime Morita. + +The following patch introduced the use of NSEC_PER_MSEC which is not defined for older XCode versions. +http://trac.webkit.org/changeset/118631/trunk/Tools/DumpRenderTree/mac/FrameLoadDelegate.mm +Patch just adds a #ifndef / #define check. + +* DumpRenderTree/mac/FrameLoadDelegate.mm: +(-[FrameLoadDelegate webView:didStartProvisionalLoadForFrame:]): + 2012-05-27 Sudarsana Nagineni [EFL] Enable blob support for the EFL port Modified: trunk/Tools/DumpRenderTree/mac/FrameLoadDelegate.mm (118655 => 118656) --- trunk/Tools/DumpRenderTree/mac/FrameLoadDelegate.mm 2012-05-28 08:53:45 UTC (rev 118655) +++ trunk/Tools/DumpRenderTree/mac/FrameLoadDelegate.mm 2012-05-28 09:03:41 UTC (rev 118656) @@ -54,6 +54,10 @@ #import #import +#ifndef NSEC_PER_MSEC +#define NSEC_PER_MSEC 100ull +#endif + @interface NSURL (DRTExtras) - (NSString *)_drt_descriptionSuitableForTestResult; @end ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [118639] trunk/Source/WebCore
Title: [118639] trunk/Source/WebCore Revision 118639 Author macpher...@chromium.org Date 2012-05-27 18:53:17 -0700 (Sun, 27 May 2012) Log Message Use StringBuilder in WebKitCSSTransformValue::customCssText() to allow code reuse with CSS Variables. https://bugs.webkit.org/show_bug.cgi?id=87462 Reviewed by Dimitri Glazkov. Factor out strings into a const char* array, and use a StringBuilder instead of String concatenation. This will allow future code to re-use the array of transform names, and StringBuilder is generally faster. Covered by existing CSS transform tests. * css/WebKitCSSTransformValue.cpp: (WebCore): (WebCore::WebKitCSSTransformValue::customCssText): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/WebKitCSSTransformValue.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (118638 => 118639) --- trunk/Source/WebCore/ChangeLog 2012-05-28 01:52:50 UTC (rev 118638) +++ trunk/Source/WebCore/ChangeLog 2012-05-28 01:53:17 UTC (rev 118639) @@ -1,3 +1,19 @@ +2012-05-27 Luke Macpherson + +Use StringBuilder in WebKitCSSTransformValue::customCssText() to allow code reuse with CSS Variables. +https://bugs.webkit.org/show_bug.cgi?id=87462 + +Reviewed by Dimitri Glazkov. + +Factor out strings into a const char* array, and use a StringBuilder instead of String concatenation. +This will allow future code to re-use the array of transform names, and StringBuilder is generally faster. + +Covered by existing CSS transform tests. + +* css/WebKitCSSTransformValue.cpp: +(WebCore): +(WebCore::WebKitCSSTransformValue::customCssText): + 2012-05-27 Arvid Nilsson [BlackBerry] Update color for tap highlight and selection Modified: trunk/Source/WebCore/css/WebKitCSSTransformValue.cpp (118638 => 118639) --- trunk/Source/WebCore/css/WebKitCSSTransformValue.cpp 2012-05-28 01:52:50 UTC (rev 118638) +++ trunk/Source/WebCore/css/WebKitCSSTransformValue.cpp 2012-05-28 01:53:17 UTC (rev 118639) @@ -29,9 +29,36 @@ #include "CSSValueList.h" #include "PlatformString.h" #include +#include namespace WebCore { +const int transformNameSize = 22; +const char* const transformName[transformNameSize] = { + "", + "translate", + "translateX", + "translateY", + "rotate", + "scale", + "scaleX", + "scaleY", + "skew", + "skewX", + "skewY", + "matrix", + "translateZ", + "translate3d", + "rotateX", + "rotateY", + "rotateZ", + "rotate3d", + "scaleZ", + "scale3d", + "perspective", + "matrix3d" +}; + WebKitCSSTransformValue::WebKitCSSTransformValue(TransformOperationType op) : CSSValueList(WebKitCSSTransformClass, CommaSeparator) , m_type(op) @@ -40,79 +67,15 @@ String WebKitCSSTransformValue::customCssText() const { -String result; -switch (m_type) { -case TranslateTransformOperation: -result += "translate("; -break; -case TranslateXTransformOperation: -result += "translateX("; -break; -case TranslateYTransformOperation: -result += "translateY("; -break; -case RotateTransformOperation: -result += "rotate("; -break; -case ScaleTransformOperation: -result += "scale("; -break; -case ScaleXTransformOperation: -result += "scaleX("; -break; -case ScaleYTransformOperation: -result += "scaleY("; -break; -case SkewTransformOperation: -result += "skew("; -break; -case SkewXTransformOperation: -result += "skewX("; -break; -case SkewYTransformOperation: -result += "skewY("; -break; -case MatrixTransformOperation: -result += "matrix("; -break; -case TranslateZTransformOperation: -result += "translateZ("; -break; -case Translate3DTransformOperation: -result += "translate3d("; -break; -case RotateXTransformOperation: -result += "rotateX("; -break; -case RotateYTransformOperation: -result += "rotateY("; -break; -case RotateZTransformOperation: -result += "rotateZ("; -break; -case Rotate3DTransformOperation: -result += "rotate3d("; -break; -case ScaleZTransformOpe
[webkit-changes] [117791] trunk/LayoutTests
Title: [117791] trunk/LayoutTests Revision 117791 Author macpher...@chromium.org Date 2012-05-21 09:13:52 -0700 (Mon, 21 May 2012) Log Message Add additional test cases for CSS variables. https://bugs.webkit.org/show_bug.cgi?id=86987 Reviewed by Dimitri Glazkov. * fast/css/variables/border-width-expected.html: Added. * fast/css/variables/border-width.html: Added. * fast/css/variables/transform-test-expected.html: Added. * fast/css/variables/transform-test.html: Added. Modified Paths trunk/LayoutTests/ChangeLog Added Paths trunk/LayoutTests/fast/css/variables/border-width-expected.html trunk/LayoutTests/fast/css/variables/border-width.html trunk/LayoutTests/fast/css/variables/transform-test-expected.html trunk/LayoutTests/fast/css/variables/transform-test.html Diff Modified: trunk/LayoutTests/ChangeLog (117790 => 117791) --- trunk/LayoutTests/ChangeLog 2012-05-21 16:12:10 UTC (rev 117790) +++ trunk/LayoutTests/ChangeLog 2012-05-21 16:13:52 UTC (rev 117791) @@ -1,3 +1,15 @@ +2012-05-21 Luke Macpherson + +Add additional test cases for CSS variables. +https://bugs.webkit.org/show_bug.cgi?id=86987 + +Reviewed by Dimitri Glazkov. + +* fast/css/variables/border-width-expected.html: Added. +* fast/css/variables/border-width.html: Added. +* fast/css/variables/transform-test-expected.html: Added. +* fast/css/variables/transform-test.html: Added. + 2012-05-21 Stephen Chenney [Chromium] REGRESSION: Assertion failure on svg/custom/acid3-test-77.html Added: trunk/LayoutTests/fast/css/variables/border-width-expected.html (0 => 117791) --- trunk/LayoutTests/fast/css/variables/border-width-expected.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/border-width-expected.html 2012-05-21 16:13:52 UTC (rev 117791) @@ -0,0 +1,8 @@ + +div { +border-color: green; +border-style: solid; +border-width: 3px 10px; +} + +This text should have top and bottom borders of 3px and left and right borders of 10px Added: trunk/LayoutTests/fast/css/variables/border-width.html (0 => 117791) --- trunk/LayoutTests/fast/css/variables/border-width.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/border-width.html 2012-05-21 16:13:52 UTC (rev 117791) @@ -0,0 +1,10 @@ + +div { + border-color: green; + border-style: solid; + border-width: -webkit-var(a) -webkit-var(b); + -webkit-var-a: 3px; + -webkit-var-b: 10px +} + +This text should have top and bottom borders of 3px and left and right borders of 10px Added: trunk/LayoutTests/fast/css/variables/transform-test-expected.html (0 => 117791) --- trunk/LayoutTests/fast/css/variables/transform-test-expected.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/transform-test-expected.html 2012-05-21 16:13:52 UTC (rev 117791) @@ -0,0 +1,8 @@ + +div { +display: inline-block; +-webkit-transform: matrix(0.866,0.5,-0.5,0.866,0,0); +background-color: green; +} + +Rotated Added: trunk/LayoutTests/fast/css/variables/transform-test.html (0 => 117791) --- trunk/LayoutTests/fast/css/variables/transform-test.html (rev 0) +++ trunk/LayoutTests/fast/css/variables/transform-test.html 2012-05-21 16:13:52 UTC (rev 117791) @@ -0,0 +1,12 @@ + +div { +display: inline-block; +-webkit-var-a: 0.866; +-webkit-var-b: 0.5; +-webkit-var-c: -0.5; +-webkit-var-d: 0; +-webkit-transform: matrix(-webkit-var(a),-webkit-var(b),-webkit-var(c),-webkit-var(a),-webkit-var(d),-webkit-var(d)); +background-color: green; +} + +Rotated ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [117390] trunk/LayoutTests
Title: [117390] trunk/LayoutTests Revision 117390 Author macpher...@chromium.org Date 2012-05-16 20:55:41 -0700 (Wed, 16 May 2012) Log Message Add tests for CSS Variables. https://bugs.webkit.org/show_bug.cgi?id=86575 Reviewed by Dimitri Glazkov. * fast/css/variables/colors-test-expected.html: Added. * fast/css/variables/colors-test.html: Added. * fast/css/variables/complex-cycle-expected.html: Added. * fast/css/variables/complex-cycle.html: Added. * fast/css/variables/computed-style-expected.html: Added. * fast/css/variables/computed-style.html: Added. * fast/css/variables/inherited-values-expected.html: Added. * fast/css/variables/inherited-values.html: Added. * fast/css/variables/inline-styles-expected.html: Added. * fast/css/variables/inline-styles.html: Added. * fast/css/variables/invalid-shorthand-expected.html: Added. * fast/css/variables/invalid-shorthand.html: Added. * fast/css/variables/invalid-variable-value-expected.html: Added. * fast/css/variables/invalid-variable-value.html: Added. * fast/css/variables/multi-level-cycle-expected.html: Added. * fast/css/variables/multi-level-cycle.html: Added. * fast/css/variables/redefinition-expected.html: Added. * fast/css/variables/redefinition.html: Added. * fast/css/variables/shorthand-expected.html: Added. * fast/css/variables/shorthand.html: Added. * fast/css/variables/simple-cycle-expected.html: Added. * fast/css/variables/simple-cycle.html: Added. * fast/css/variables/undefined-expected.html: Added. * fast/css/variables/undefined.html: Added. * fast/css/variables/use-before-defined-expected.html: Added. * fast/css/variables/use-before-defined.html: Added. * fast/css/variables/var-inside-shorthand-expected.html: Added. * fast/css/variables/var-inside-shorthand.html: Added. * fast/css/variables/variable-chain-expected.html: Added. * fast/css/variables/variable-chain.html: Added. * platform/chromium/test_expectations.txt: Skip tests until variables implementation lands. * platform/efl/test_expectations.txt: Skip tests until variables implementation lands. * platform/gtk/test_expectations.txt: Skip tests until variables implementation lands. * platform/mac/test_expectations.txt: Skip tests until variables implementation lands. * platform/qt/test_expectations.txt: Skip tests until variables implementation lands. Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/chromium/test_expectations.txt trunk/LayoutTests/platform/efl/test_expectations.txt trunk/LayoutTests/platform/gtk/test_expectations.txt trunk/LayoutTests/platform/mac/test_expectations.txt trunk/LayoutTests/platform/qt/test_expectations.txt Added Paths trunk/LayoutTests/fast/css/variables/ trunk/LayoutTests/fast/css/variables/colors-test-expected.html trunk/LayoutTests/fast/css/variables/colors-test.html trunk/LayoutTests/fast/css/variables/complex-cycle-expected.html trunk/LayoutTests/fast/css/variables/complex-cycle.html trunk/LayoutTests/fast/css/variables/computed-style-expected.html trunk/LayoutTests/fast/css/variables/computed-style.html trunk/LayoutTests/fast/css/variables/inherited-values-expected.html trunk/LayoutTests/fast/css/variables/inherited-values.html trunk/LayoutTests/fast/css/variables/inline-styles-expected.html trunk/LayoutTests/fast/css/variables/inline-styles.html trunk/LayoutTests/fast/css/variables/invalid-shorthand-expected.html trunk/LayoutTests/fast/css/variables/invalid-shorthand.html trunk/LayoutTests/fast/css/variables/invalid-variable-value-expected.html trunk/LayoutTests/fast/css/variables/invalid-variable-value.html trunk/LayoutTests/fast/css/variables/multi-level-cycle-expected.html trunk/LayoutTests/fast/css/variables/multi-level-cycle.html trunk/LayoutTests/fast/css/variables/redefinition-expected.html trunk/LayoutTests/fast/css/variables/redefinition.html trunk/LayoutTests/fast/css/variables/shorthand-expected.html trunk/LayoutTests/fast/css/variables/shorthand.html trunk/LayoutTests/fast/css/variables/simple-cycle-expected.html trunk/LayoutTests/fast/css/variables/simple-cycle.html trunk/LayoutTests/fast/css/variables/undefined-expected.html trunk/LayoutTests/fast/css/variables/undefined.html trunk/LayoutTests/fast/css/variables/use-before-defined-expected.html trunk/LayoutTests/fast/css/variables/use-before-defined.html trunk/LayoutTests/fast/css/variables/var-inside-shorthand-expected.html trunk/LayoutTests/fast/css/variables/var-inside-shorthand.html trunk/LayoutTests/fast/css/variables/variable-chain-expected.html trunk/LayoutTests/fast/css/variables/variable-chain.html Diff Modified: trunk/LayoutTests/ChangeLog (117389 => 117390) --- trunk/LayoutTests/ChangeLog 2012-05-17 03:52:17 UTC (rev 117389) +++ trunk/LayoutTests/ChangeLog 2012-05-17 03:55:41 UTC (rev 117390) @@ -1,3 +1,46 @@ +2012-05-16 Luke Macpherson + +Add tests for CSS Variables. +https://bugs.webkit.org/show_bug.cgi?id=86575 + +Reviewed by Dimitri Glazkov. + +* fast/css/variables/colors-test-expected.html: Ad
[webkit-changes] [117034] trunk/Source/WebCore
Title: [117034] trunk/Source/WebCore Revision 117034 Author macpher...@chromium.org Date 2012-05-14 23:36:25 -0700 (Mon, 14 May 2012) Log Message Make StyleResolver::applyMatchedProperties and ::applyProperties use enum template parameter instead of bool. https://bugs.webkit.org/show_bug.cgi?id=86424 Reviewed by Dimitri Glazkov. This patch changes from using a boolean template parameter for StyleResolver::applyMatchedProperties and StyleResolver::applyProperties functions. The motivation for this change is that it paves the way for CSS Variables to make the value tri-state, which is a requirement because variable definitions must occur before high priority CSS properties such that they can be referenced by the latter. This change affects only the type signatures of those functions, and not their behavior. * css/StyleResolver.cpp: (WebCore::StyleResolver::collectMatchingRulesForList): * css/StyleResolver.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/StyleResolver.cpp trunk/Source/WebCore/css/StyleResolver.h Diff Modified: trunk/Source/WebCore/ChangeLog (117033 => 117034) --- trunk/Source/WebCore/ChangeLog 2012-05-15 06:30:25 UTC (rev 117033) +++ trunk/Source/WebCore/ChangeLog 2012-05-15 06:36:25 UTC (rev 117034) @@ -1,3 +1,20 @@ +2012-05-14 Luke Macpherson + +Make StyleResolver::applyMatchedProperties and ::applyProperties use enum template parameter instead of bool. +https://bugs.webkit.org/show_bug.cgi?id=86424 + +Reviewed by Dimitri Glazkov. + +This patch changes from using a boolean template parameter for StyleResolver::applyMatchedProperties and +StyleResolver::applyProperties functions. The motivation for this change is that it paves the way for +CSS Variables to make the value tri-state, which is a requirement because variable definitions must occur +before high priority CSS properties such that they can be referenced by the latter. This change affects +only the type signatures of those functions, and not their behavior. + +* css/StyleResolver.cpp: +(WebCore::StyleResolver::collectMatchingRulesForList): +* css/StyleResolver.h: + 2012-05-14 MORITA Hajime [Refactoring] Get rid of ContentDistribution::Item Modified: trunk/Source/WebCore/css/StyleResolver.cpp (117033 => 117034) --- trunk/Source/WebCore/css/StyleResolver.cpp 2012-05-15 06:30:25 UTC (rev 117033) +++ trunk/Source/WebCore/css/StyleResolver.cpp 2012-05-15 06:36:25 UTC (rev 117034) @@ -1692,7 +1692,7 @@ // decl, there's nothing to override. So just add the first properties. bool inheritedOnly = false; if (keyframe->properties()) -applyMatchedProperties(result, false, 0, result.matchedProperties.size() - 1, inheritedOnly); +applyMatchedProperties(result, false, 0, result.matchedProperties.size() - 1, inheritedOnly); // If our font got dirtied, go ahead and update it now. updateFont(); @@ -1703,7 +1703,7 @@ // Now do rest of the properties. if (keyframe->properties()) -applyMatchedProperties(result, false, 0, result.matchedProperties.size() - 1, inheritedOnly); +applyMatchedProperties(result, false, 0, result.matchedProperties.size() - 1, inheritedOnly); // If our font got dirtied by one of the non-essential font props, // go ahead and update it a second time. @@ -1860,7 +1860,7 @@ matchPageRules(result, m_authorStyle.get(), isLeft, isFirst, page); m_lineHeightValue = 0; bool inheritedOnly = false; -applyMatchedProperties(result, false, 0, result.matchedProperties.size() - 1, inheritedOnly); +applyMatchedProperties(result, false, 0, result.matchedProperties.size() - 1, inheritedOnly); // If our font got dirtied, go ahead and update it now. updateFont(); @@ -1869,7 +1869,7 @@ if (m_lineHeightValue) applyProperty(CSSPropertyLineHeight, m_lineHeightValue); -applyMatchedProperties(result, false, 0, result.matchedProperties.size() - 1, inheritedOnly); +applyMatchedProperties(result, false, 0, result.matchedProperties.size() - 1, inheritedOnly); // Start loading images referenced by this style. loadPendingImages(); @@ -2626,7 +2626,7 @@ return primitiveValue ? primitiveValue->convertToLength(style, rootStyle, multiplier) : Length(Undefined); } -template +template void StyleResolver::applyProperties(const StylePropertySet* properties, StyleRule* rule, bool isImportant, bool inheritedOnly, bool filterRegionProperties) { ASSERT(!filterRegionProperties || m_regionForStyling); @@ -2649,7 +2649,7 @@ if (filterRegionProperties && !StyleResolver::isValidRegionStyleProperty(property)) continue; -if (applyFirst) { +if (pass == HighPriorityProperties) { COMPILE_ASSERT(firstCSSProperty == CSSPropertyColor, CSS_color_is_first_property); CO
[webkit-changes] [117028] trunk
Title: [117028] trunk Revision 117028 Author macpher...@chromium.org Date 2012-05-14 21:39:07 -0700 (Mon, 14 May 2012) Log Message Introduce ENABLE_CSS_VARIABLES compile flag. https://bugs.webkit.org/show_bug.cgi?id=86338 Reviewed by Dimitri Glazkov. Add a configuration option for CSS Variables support, disabling it by default. .: * Source/cmake/WebKitFeatures.cmake: Source/_javascript_Core: * Configurations/FeatureDefines.xcconfig: Source/WebCore: No new tests. This patch only introduces an unused build flag. * Configurations/FeatureDefines.xcconfig: Source/WebKit/chromium: * features.gypi: Source/WebKit/mac: * Configurations/FeatureDefines.xcconfig: Source/WebKit2: * Configurations/FeatureDefines.xcconfig: Tools: * Scripts/webkitperl/FeatureList.pm: * Scripts/webkitpy/layout_tests/port/webkit.py: (WebKitPort._missing_symbol_to_skipped_tests): * qmake/mkspecs/features/features.pri: Modified Paths trunk/ChangeLog trunk/Source/_javascript_Core/ChangeLog trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/features.gypi trunk/Source/WebKit/mac/ChangeLog trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig trunk/Source/WebKit2/ChangeLog trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig trunk/Source/cmake/WebKitFeatures.cmake trunk/Tools/ChangeLog trunk/Tools/Scripts/webkitperl/FeatureList.pm trunk/Tools/Scripts/webkitpy/layout_tests/port/webkit.py trunk/Tools/qmake/mkspecs/features/features.pri Diff Modified: trunk/ChangeLog (117027 => 117028) --- trunk/ChangeLog 2012-05-15 04:36:26 UTC (rev 117027) +++ trunk/ChangeLog 2012-05-15 04:39:07 UTC (rev 117028) @@ -1,3 +1,14 @@ +2012-05-14 Luke Macpherson + +Introduce ENABLE_CSS_VARIABLES compile flag. +https://bugs.webkit.org/show_bug.cgi?id=86338 + +Reviewed by Dimitri Glazkov. + +Add a configuration option for CSS Variables support, disabling it by default. + +* Source/cmake/WebKitFeatures.cmake: + 2012-05-14 Kevin Ollivier [wx] Unreviewed build fix. Fix wxMSW build, and make sure we properly Modified: trunk/Source/_javascript_Core/ChangeLog (117027 => 117028) --- trunk/Source/_javascript_Core/ChangeLog 2012-05-15 04:36:26 UTC (rev 117027) +++ trunk/Source/_javascript_Core/ChangeLog 2012-05-15 04:39:07 UTC (rev 117028) @@ -1,3 +1,14 @@ +2012-05-14 Luke Macpherson + +Introduce ENABLE_CSS_VARIABLES compile flag. +https://bugs.webkit.org/show_bug.cgi?id=86338 + +Reviewed by Dimitri Glazkov. + +Add a configuration option for CSS Variables support, disabling it by default. + +* Configurations/FeatureDefines.xcconfig: + 2012-05-14 Gavin Barraclough Cannot login to iCloud Modified: trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig (117027 => 117028) --- trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig 2012-05-15 04:36:26 UTC (rev 117027) +++ trunk/Source/_javascript_Core/Configurations/FeatureDefines.xcconfig 2012-05-15 04:39:07 UTC (rev 117028) @@ -38,6 +38,7 @@ ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING; ENABLE_CSS_FILTERS = ENABLE_CSS_FILTERS; ENABLE_CSS_GRID_LAYOUT = ENABLE_CSS_GRID_LAYOUT; +ENABLE_CSS_VARIABLES = ; ENABLE_DASHBOARD_SUPPORT = $(ENABLE_DASHBOARD_SUPPORT_$(REAL_PLATFORM_NAME)); ENABLE_DASHBOARD_SUPPORT_macosx = ENABLE_DASHBOARD_SUPPORT; ENABLE_DATALIST = ; @@ -122,4 +123,4 @@ ENABLE_WORKERS = ENABLE_WORKERS; ENABLE_XSLT = ENABLE_XSLT; -FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_SHADERS) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LINK_PREFETCH) $(ENABLE_LINK_PRERENDER) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_TAG) $(ENABLE_MICRODATA) $(ENABLE_MUTATION_OBSERVERS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PROGRESS_TAG) $(ENABLE_QUOTA) $(ENABLE_REGISTER_PROTOCOL_HANDLER) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(E
[webkit-changes] [115602] trunk/Source/WebCore
Title: [115602] trunk/Source/WebCore Revision 115602 Author macpher...@chromium.org Date 2012-04-29 18:28:34 -0700 (Sun, 29 Apr 2012) Log Message Initialize member variables in CSSParser's constructor. https://bugs.webkit.org/show_bug.cgi?id=84377 Reviewed by Kentaro Hara. It is good practice not to leave member variables uninitialized. They make debugging more difficult by reducing repeatability, and in some cases lead to the possibility of information leakage occuring. This patch simply adds initialization of m_numParsedPropertiesBeforeMarginBox to CSSParser's constructor to INVALID_NUM_PARSED_PROPERTIES so that the initial state is the same as the state after the properties are cleared. No tests added because this is a code style fix, not an actual bug so long as the bison generated code calls startDeclarationsForMarginBox() and endDeclarationsForMarginBox() symmetrically. The lack of initialization was originally detected by coverity. * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParser.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (115601 => 115602) --- trunk/Source/WebCore/ChangeLog 2012-04-30 01:22:08 UTC (rev 115601) +++ trunk/Source/WebCore/ChangeLog 2012-04-30 01:28:34 UTC (rev 115602) @@ -1,3 +1,22 @@ +2012-04-29 Luke Macpherson + +Initialize member variables in CSSParser's constructor. +https://bugs.webkit.org/show_bug.cgi?id=84377 + +Reviewed by Kentaro Hara. + +It is good practice not to leave member variables uninitialized. They make debugging more difficult by reducing +repeatability, and in some cases lead to the possibility of information leakage occuring. This patch simply adds +initialization of m_numParsedPropertiesBeforeMarginBox to CSSParser's constructor to INVALID_NUM_PARSED_PROPERTIES +so that the initial state is the same as the state after the properties are cleared. + +No tests added because this is a code style fix, not an actual bug so long as the bison generated code calls +startDeclarationsForMarginBox() and endDeclarationsForMarginBox() symmetrically. The lack of initialization was +originally detected by coverity. + +* css/CSSParser.cpp: +(WebCore::CSSParser::CSSParser): + 2012-04-29 Kent Tamura [Mac] Add LocalizedDateMac Modified: trunk/Source/WebCore/css/CSSParser.cpp (115601 => 115602) --- trunk/Source/WebCore/css/CSSParser.cpp 2012-04-30 01:22:08 UTC (rev 115601) +++ trunk/Source/WebCore/css/CSSParser.cpp 2012-04-30 01:28:34 UTC (rev 115602) @@ -222,6 +222,7 @@ , m_id(CSSPropertyInvalid) , m_styleSheet(0) , m_selectorListForParseSelector(0) +, m_numParsedPropertiesBeforeMarginBox(INVALID_NUM_PARSED_PROPERTIES) , m_inParseShorthand(0) , m_currentShorthand(CSSPropertyInvalid) , m_implicitShorthand(false) ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [114678] trunk/Source/WebCore
Title: [114678] trunk/Source/WebCore Revision 114678 Author macpher...@chromium.org Date 2012-04-19 15:03:01 -0700 (Thu, 19 Apr 2012) Log Message Eliminate potential null pointer dereference in CSSStyleSelector::containsUncommonAttributeSelector(). https://bugs.webkit.org/show_bug.cgi?id=84366 Reviewed by Kentaro Hara. No new tests / code cleanup only. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (114677 => 114678) --- trunk/Source/WebCore/ChangeLog 2012-04-19 22:00:09 UTC (rev 114677) +++ trunk/Source/WebCore/ChangeLog 2012-04-19 22:03:01 UTC (rev 114678) @@ -1,5 +1,17 @@ 2012-04-19 Luke Macpherson +Eliminate potential null pointer dereference in CSSStyleSelector::containsUncommonAttributeSelector(). +https://bugs.webkit.org/show_bug.cgi?id=84366 + +Reviewed by Kentaro Hara. + +No new tests / code cleanup only. + +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): + +2012-04-19 Luke Macpherson + Fix null-pointer dereference in ApplyPropertyZoom::applyValue(). https://bugs.webkit.org/show_bug.cgi?id=84279 Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (114677 => 114678) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-04-19 22:00:09 UTC (rev 114677) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-04-19 22:03:01 UTC (rev 114678) @@ -2307,18 +2307,19 @@ static inline bool containsUncommonAttributeSelector(const CSSSelector* selector) { -while (selector) { +for (; selector; selector = selector->tagHistory()) { // Allow certain common attributes (used in the default style) in the selectors that match the current element. if (selector->isAttributeSelector() && !isCommonAttributeSelectorAttribute(selector->attribute())) return true; if (selectorListContainsUncommonAttributeSelector(selector)) return true; -if (selector->relation() != CSSSelector::SubSelector) +if (selector->relation() != CSSSelector::SubSelector) { +selector = selector->tagHistory(); break; -selector = selector->tagHistory(); -}; +} +} -for (selector = selector->tagHistory(); selector; selector = selector->tagHistory()) { +for (; selector; selector = selector->tagHistory()) { if (selector->isAttributeSelector()) return true; if (selectorListContainsUncommonAttributeSelector(selector)) ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [114677] trunk
Title: [114677] trunk Revision 114677 Author macpher...@chromium.org Date 2012-04-19 15:00:09 -0700 (Thu, 19 Apr 2012) Log Message Fix null-pointer dereference in ApplyPropertyZoom::applyValue(). https://bugs.webkit.org/show_bug.cgi?id=84279 Reviewed by Simon Fraser. Source/WebCore: Test: fast/css/zoom-on-unattached.html * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyZoom::applyValue): LayoutTests: * fast/css/zoom-on-unattached-expected.txt: Added. * fast/css/zoom-on-unattached.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp Added Paths trunk/LayoutTests/fast/css/zoom-on-unattached-expected.txt trunk/LayoutTests/fast/css/zoom-on-unattached.html Diff Modified: trunk/LayoutTests/ChangeLog (114676 => 114677) --- trunk/LayoutTests/ChangeLog 2012-04-19 21:56:59 UTC (rev 114676) +++ trunk/LayoutTests/ChangeLog 2012-04-19 22:00:09 UTC (rev 114677) @@ -1,3 +1,13 @@ +2012-04-19 Luke Macpherson + +Fix null-pointer dereference in ApplyPropertyZoom::applyValue(). +https://bugs.webkit.org/show_bug.cgi?id=84279 + +Reviewed by Simon Fraser. + +* fast/css/zoom-on-unattached-expected.txt: Added. +* fast/css/zoom-on-unattached.html: Added. + 2012-04-19 Jer Noble REGRESSION (r114666): fast/ruby/floating-ruby-text.html, fast/ruby/positioned-ruby-text.html failing on Lion Release (Tests) Added: trunk/LayoutTests/fast/css/zoom-on-unattached-expected.txt (0 => 114677) --- trunk/LayoutTests/fast/css/zoom-on-unattached-expected.txt (rev 0) +++ trunk/LayoutTests/fast/css/zoom-on-unattached-expected.txt 2012-04-19 22:00:09 UTC (rev 114677) @@ -0,0 +1 @@ +This test passes if it does not crash. Added: trunk/LayoutTests/fast/css/zoom-on-unattached.html (0 => 114677) --- trunk/LayoutTests/fast/css/zoom-on-unattached.html (rev 0) +++ trunk/LayoutTests/fast/css/zoom-on-unattached.html 2012-04-19 22:00:09 UTC (rev 114677) @@ -0,0 +1,15 @@ + +if (window.layoutTestController) +layoutTestController.dumpAsText(); + +root = document.createElement("body"); +d = document.implementation.createDocument(); +d.adoptNode(root); +node = document.createElement("title"); +root.appendChild(node); +node.setAttribute("style", "zoom:document;") +node.appendChild(node.cloneNode()); + + +This test passes if it does not crash. + Modified: trunk/Source/WebCore/ChangeLog (114676 => 114677) --- trunk/Source/WebCore/ChangeLog 2012-04-19 21:56:59 UTC (rev 114676) +++ trunk/Source/WebCore/ChangeLog 2012-04-19 22:00:09 UTC (rev 114677) @@ -1,5 +1,17 @@ 2012-04-19 Luke Macpherson +Fix null-pointer dereference in ApplyPropertyZoom::applyValue(). +https://bugs.webkit.org/show_bug.cgi?id=84279 + +Reviewed by Simon Fraser. + +Test: fast/css/zoom-on-unattached.html + +* css/CSSStyleApplyProperty.cpp: +(WebCore::ApplyPropertyZoom::applyValue): + +2012-04-19 Luke Macpherson + Clean up list iteration in MediaQueryExp constructor (avoid unnecessary calls to current()). https://bugs.webkit.org/show_bug.cgi?id=84369 Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (114676 => 114677) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-04-19 21:56:59 UTC (rev 114676) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-04-19 22:00:09 UTC (rev 114677) @@ -1637,7 +1637,7 @@ selector->setEffectiveZoom(RenderStyle::initialZoom()); selector->setZoom(RenderStyle::initialZoom()); } else if (primitiveValue->getIdent() == CSSValueDocument) { -float docZoom = selector->document()->renderer()->style()->zoom(); +float docZoom = selector->rootElementStyle() ? selector->rootElementStyle()->zoom() : RenderStyle::initialZoom(); selector->setEffectiveZoom(docZoom); selector->setZoom(docZoom); } else if (primitiveValue->isPercentage()) { ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [114676] trunk/Source/WebCore
Title: [114676] trunk/Source/WebCore Revision 114676 Author macpher...@chromium.org Date 2012-04-19 14:56:59 -0700 (Thu, 19 Apr 2012) Log Message Clean up list iteration in MediaQueryExp constructor (avoid unnecessary calls to current()). https://bugs.webkit.org/show_bug.cgi?id=84369 Reviewed by Simon Fraser. No new tests / code cleanup only. * css/MediaQueryExp.cpp: (WebCore::MediaQueryExp::MediaQueryExp): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/MediaQueryExp.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (114675 => 114676) --- trunk/Source/WebCore/ChangeLog 2012-04-19 21:55:00 UTC (rev 114675) +++ trunk/Source/WebCore/ChangeLog 2012-04-19 21:56:59 UTC (rev 114676) @@ -1,3 +1,15 @@ +2012-04-19 Luke Macpherson + +Clean up list iteration in MediaQueryExp constructor (avoid unnecessary calls to current()). +https://bugs.webkit.org/show_bug.cgi?id=84369 + +Reviewed by Simon Fraser. + +No new tests / code cleanup only. + +* css/MediaQueryExp.cpp: +(WebCore::MediaQueryExp::MediaQueryExp): + 2012-04-19 Mark Pilgrim [Chromium] Call signedPublicKeyAndChallengeString directly Modified: trunk/Source/WebCore/css/MediaQueryExp.cpp (114675 => 114676) --- trunk/Source/WebCore/css/MediaQueryExp.cpp 2012-04-19 21:55:00 UTC (rev 114675) +++ trunk/Source/WebCore/css/MediaQueryExp.cpp 2012-04-19 21:56:59 UTC (rev 114676) @@ -59,10 +59,10 @@ // currently accepts only / RefPtr list = CSSValueList::createCommaSeparated(); -CSSParserValue* value = 0; +CSSParserValue* value = valueList->current(); bool isValid = true; -while ((value = valueList->current()) && isValid) { +while (value && isValid) { if (value->unit == CSSParserValue::Operator && value->iValue == '/') list->append(CSSPrimitiveValue::create("/", CSSPrimitiveValue::CSS_STRING)); else if (value->unit == CSSPrimitiveValue::CSS_NUMBER) ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [114670] trunk/Source/WebCore
Title: [114670] trunk/Source/WebCore Revision 114670 Author macpher...@chromium.org Date 2012-04-19 14:22:29 -0700 (Thu, 19 Apr 2012) Log Message Remove unnecessary assignment in CSSParser::parseCubicBezierTimingFunctionValue(). https://bugs.webkit.org/show_bug.cgi?id=84368 Reviewed by Simon Fraser. No new tests / code cleanup only. * css/CSSParser.cpp: (WebCore::CSSParser::parseCubicBezierTimingFunctionValue): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParser.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (114669 => 114670) --- trunk/Source/WebCore/ChangeLog 2012-04-19 21:20:23 UTC (rev 114669) +++ trunk/Source/WebCore/ChangeLog 2012-04-19 21:22:29 UTC (rev 114670) @@ -1,5 +1,17 @@ 2012-04-19 Luke Macpherson +Remove unnecessary assignment in CSSParser::parseCubicBezierTimingFunctionValue(). +https://bugs.webkit.org/show_bug.cgi?id=84368 + +Reviewed by Simon Fraser. + +No new tests / code cleanup only. + +* css/CSSParser.cpp: +(WebCore::CSSParser::parseCubicBezierTimingFunctionValue): + +2012-04-19 Luke Macpherson + Initialize all member variables in CSSImageSetValue's copy constructor. https://bugs.webkit.org/show_bug.cgi?id=84379 Modified: trunk/Source/WebCore/css/CSSParser.cpp (114669 => 114670) --- trunk/Source/WebCore/css/CSSParser.cpp 2012-04-19 21:20:23 UTC (rev 114669) +++ trunk/Source/WebCore/css/CSSParser.cpp 2012-04-19 21:22:29 UTC (rev 114670) @@ -3658,7 +3658,7 @@ return true; if (!isComma(v)) return false; -v = args->next(); +args->next(); return true; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [114669] trunk/Source/WebCore
Title: [114669] trunk/Source/WebCore Revision 114669 Author macpher...@chromium.org Date 2012-04-19 14:20:23 -0700 (Thu, 19 Apr 2012) Log Message Initialize all member variables in CSSImageSetValue's copy constructor. https://bugs.webkit.org/show_bug.cgi?id=84379 Reviewed by Simon Fraser. No new tests / code cleanup only. * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::CSSImageSetValue): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSImageSetValue.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (114668 => 114669) --- trunk/Source/WebCore/ChangeLog 2012-04-19 20:53:03 UTC (rev 114668) +++ trunk/Source/WebCore/ChangeLog 2012-04-19 21:20:23 UTC (rev 114669) @@ -1,3 +1,15 @@ +2012-04-19 Luke Macpherson + +Initialize all member variables in CSSImageSetValue's copy constructor. +https://bugs.webkit.org/show_bug.cgi?id=84379 + +Reviewed by Simon Fraser. + +No new tests / code cleanup only. + +* css/CSSImageSetValue.cpp: +(WebCore::CSSImageSetValue::CSSImageSetValue): + 2012-04-19 Ken Buchanan Positioned children of ruby runs not handled correctly during layout Modified: trunk/Source/WebCore/css/CSSImageSetValue.cpp (114668 => 114669) --- trunk/Source/WebCore/css/CSSImageSetValue.cpp 2012-04-19 20:53:03 UTC (rev 114668) +++ trunk/Source/WebCore/css/CSSImageSetValue.cpp 2012-04-19 21:20:23 UTC (rev 114669) @@ -142,6 +142,7 @@ CSSImageSetValue::CSSImageSetValue(const CSSImageSetValue& cloneFrom) : CSSValueList(cloneFrom) , m_accessedBestFitImage(false) +, m_scaleFactor(1) { // Non-CSSValueList data is not accessible through CSS OM, no need to clone. } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [114655] trunk/Source/WebCore
Title: [114655] trunk/Source/WebCore Revision 114655 Author macpher...@chromium.org Date 2012-04-19 11:20:08 -0700 (Thu, 19 Apr 2012) Log Message Fix potential null pointer dereference in RuleSet::addRulesFromSheet(). https://bugs.webkit.org/show_bug.cgi?id=84258 Reviewed by Andreas Kling. Fix variable that is dereferenced without null check here, but checked in code above and below. No new test / code cleanup from coverity analysis. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (114654 => 114655) --- trunk/Source/WebCore/ChangeLog 2012-04-19 18:18:01 UTC (rev 114654) +++ trunk/Source/WebCore/ChangeLog 2012-04-19 18:20:08 UTC (rev 114655) @@ -1,3 +1,17 @@ +2012-04-19 Luke Macpherson + +Fix potential null pointer dereference in RuleSet::addRulesFromSheet(). +https://bugs.webkit.org/show_bug.cgi?id=84258 + +Reviewed by Andreas Kling. + +Fix variable that is dereferenced without null check here, but checked in code above and below. + +No new test / code cleanup from coverity analysis. + +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): + 2012-04-19 Yury Semikhatsky Web Inspector: exception when hovering object while paused Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (114654 => 114655) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-04-19 18:18:01 UTC (rev 114654) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-04-19 18:20:08 UTC (rev 114655) @@ -2526,7 +2526,7 @@ const StyleRuleFontFace* fontFaceRule = static_cast(rule); styleSelector->fontSelector()->addFontFaceRule(fontFaceRule); styleSelector->invalidateMatchedPropertiesCache(); -} else if (rule->isKeyframesRule()) { +} else if (rule->isKeyframesRule() && styleSelector) { // FIXME (BUG 72462): We don't add @keyframe rules of scoped style sheets for the moment. if (scope) continue; ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [114566] trunk/Source/WebCore
Title: [114566] trunk/Source/WebCore Revision 114566 Author macpher...@chromium.org Date 2012-04-18 14:51:48 -0700 (Wed, 18 Apr 2012) Log Message Prevent potential null pointer dereference in CSSStyleSelector::applyProperty(). https://bugs.webkit.org/show_bug.cgi?id=84267 Reviewed by Kentaro Hara. No new tests / code cleanup found via static analysis. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (114565 => 114566) --- trunk/Source/WebCore/ChangeLog 2012-04-18 21:45:54 UTC (rev 114565) +++ trunk/Source/WebCore/ChangeLog 2012-04-18 21:51:48 UTC (rev 114566) @@ -1,5 +1,17 @@ 2012-04-18 Luke Macpherson +Prevent potential null pointer dereference in CSSStyleSelector::applyProperty(). +https://bugs.webkit.org/show_bug.cgi?id=84267 + +Reviewed by Kentaro Hara. + +No new tests / code cleanup found via static analysis. + +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): + +2012-04-18 Luke Macpherson + Prevent switch case fallthrough in StylePropertySet::getPropertyValue(). https://bugs.webkit.org/show_bug.cgi?id=84266 Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (114565 => 114566) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-04-18 21:45:54 UTC (rev 114565) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-04-18 21:51:48 UTC (rev 114566) @@ -3566,6 +3566,8 @@ return; case CSSPropertyWebkitLocale: { HANDLE_INHERIT_AND_INITIAL(locale, Locale); +if (!primitiveValue) +return; if (primitiveValue->getIdent() == CSSValueAuto) m_style->setLocale(nullAtom); else ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [114560] trunk/Source/WebCore
Title: [114560] trunk/Source/WebCore Revision 114560 Author macpher...@chromium.org Date 2012-04-18 14:21:35 -0700 (Wed, 18 Apr 2012) Log Message Prevent switch case fallthrough in StylePropertySet::getPropertyValue(). https://bugs.webkit.org/show_bug.cgi?id=84266 Reviewed by Kentaro Hara. No new tests / code cleanup found by static analysis. * css/StylePropertySet.cpp: (WebCore::StylePropertySet::getPropertyValue): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/StylePropertySet.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (114559 => 114560) --- trunk/Source/WebCore/ChangeLog 2012-04-18 21:04:43 UTC (rev 114559) +++ trunk/Source/WebCore/ChangeLog 2012-04-18 21:21:35 UTC (rev 114560) @@ -1,3 +1,15 @@ +2012-04-18 Luke Macpherson + +Prevent switch case fallthrough in StylePropertySet::getPropertyValue(). +https://bugs.webkit.org/show_bug.cgi?id=84266 + +Reviewed by Kentaro Hara. + +No new tests / code cleanup found by static analysis. + +* css/StylePropertySet.cpp: +(WebCore::StylePropertySet::getPropertyValue): + 2012-04-18 Andreas Kling CSSValuePool: Make numeric value caches fixed-size arrays. Modified: trunk/Source/WebCore/css/StylePropertySet.cpp (114559 => 114560) --- trunk/Source/WebCore/css/StylePropertySet.cpp 2012-04-18 21:04:43 UTC (rev 114559) +++ trunk/Source/WebCore/css/StylePropertySet.cpp 2012-04-18 21:21:35 UTC (rev 114560) @@ -169,6 +169,7 @@ RefPtr value = getPropertyCSSValue(CSSPropertyMarkerStart); if (value) return value->cssText(); +return String(); } #endif case CSSPropertyBorderRadius: ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [114500] trunk/Source/WebCore
Title: [114500] trunk/Source/WebCore Revision 114500 Author macpher...@chromium.org Date 2012-04-18 06:02:41 -0700 (Wed, 18 Apr 2012) Log Message Remove unnecessary variable reassignment in CSSParser::parseImageSet(). https://bugs.webkit.org/show_bug.cgi?id=84204 Reviewed by Kentaro Hara. Code calls next and then current instead of reusing the result of next. No new tests / no functionality changed. * css/CSSParser.cpp: (WebCore::CSSParser::parseImageSet): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParser.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (114499 => 114500) --- trunk/Source/WebCore/ChangeLog 2012-04-18 12:26:33 UTC (rev 114499) +++ trunk/Source/WebCore/ChangeLog 2012-04-18 13:02:41 UTC (rev 114500) @@ -1,3 +1,17 @@ +2012-04-18 Luke Macpherson + +Remove unnecessary variable reassignment in CSSParser::parseImageSet(). +https://bugs.webkit.org/show_bug.cgi?id=84204 + +Reviewed by Kentaro Hara. + +Code calls next and then current instead of reusing the result of next. + +No new tests / no functionality changed. + +* css/CSSParser.cpp: +(WebCore::CSSParser::parseImageSet): + 2012-04-18 Jason Liu [BlackBerry] HTTP GET header has a "Cookie" when refreshing a page after cookies have been cleared. Modified: trunk/Source/WebCore/css/CSSParser.cpp (114499 => 114500) --- trunk/Source/WebCore/css/CSSParser.cpp 2012-04-18 12:26:33 UTC (rev 114499) +++ trunk/Source/WebCore/css/CSSParser.cpp 2012-04-18 13:02:41 UTC (rev 114500) @@ -6754,7 +6754,8 @@ RefPtr imageSet = CSSImageSetValue::create(); -while (CSSParserValue* arg = functionArgs->current()) { +CSSParserValue* arg = functionArgs->current(); +while (arg) { if (arg->unit != CSSPrimitiveValue::CSS_URI) return 0; ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [114468] trunk/Source/WebCore
Title: [114468] trunk/Source/WebCore Revision 114468 Author macpher...@chromium.org Date 2012-04-17 17:24:06 -0700 (Tue, 17 Apr 2012) Log Message Ensure CSSParser member variables are initialized. https://bugs.webkit.org/show_bug.cgi?id=84205 Reviewed by Andreas Kling. No new tests / code cleanup only. * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParser.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (114467 => 114468) --- trunk/Source/WebCore/ChangeLog 2012-04-18 00:19:40 UTC (rev 114467) +++ trunk/Source/WebCore/ChangeLog 2012-04-18 00:24:06 UTC (rev 114468) @@ -1,3 +1,15 @@ +2012-04-17 Luke Macpherson + +Ensure CSSParser member variables are initialized. +https://bugs.webkit.org/show_bug.cgi?id=84205 + +Reviewed by Andreas Kling. + +No new tests / code cleanup only. + +* css/CSSParser.cpp: +(WebCore::CSSParser::CSSParser): + 2012-04-16 Alexandru Chiculita Regression(114172): Use after free in CustomFilterProgram::notifyClients Modified: trunk/Source/WebCore/css/CSSParser.cpp (114467 => 114468) --- trunk/Source/WebCore/css/CSSParser.cpp 2012-04-18 00:19:40 UTC (rev 114467) +++ trunk/Source/WebCore/css/CSSParser.cpp 2012-04-18 00:24:06 UTC (rev 114468) @@ -203,6 +203,7 @@ , m_important(false) , m_id(CSSPropertyInvalid) , m_styleSheet(0) +, m_selectorListForParseSelector(0) , m_inParseShorthand(0) , m_currentShorthand(CSSPropertyInvalid) , m_implicitShorthand(false) @@ -217,6 +218,7 @@ , m_currentRuleData(0) , m_parsingMode(NormalMode) , m_currentCharacter(0) +, m_tokenStart(0) , m_token(0) , m_lineNumber(0) , m_lastSelectorLineNumber(0) ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [114455] trunk/Source/WebCore
Title: [114455] trunk/Source/WebCore Revision 114455 Author macpher...@chromium.org Date 2012-04-17 15:56:23 -0700 (Tue, 17 Apr 2012) Log Message Make CSSParser::parseValue()'s handling of CSSPropertyCursor more obviously correct. https://bugs.webkit.org/show_bug.cgi?id=83544 Reviewed by Kentaro Hara. No new tests / code cleanup only. The code as it stands appears to be correct, but static analysis was concerned that value could become null. This patch adds a null check and ASSERT_NOT_REACHED() to make the code more obviously correct. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParser.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (114454 => 114455) --- trunk/Source/WebCore/ChangeLog 2012-04-17 22:54:11 UTC (rev 114454) +++ trunk/Source/WebCore/ChangeLog 2012-04-17 22:56:23 UTC (rev 114455) @@ -1,3 +1,18 @@ +2012-04-17 Luke Macpherson + +Make CSSParser::parseValue()'s handling of CSSPropertyCursor more obviously correct. +https://bugs.webkit.org/show_bug.cgi?id=83544 + +Reviewed by Kentaro Hara. + +No new tests / code cleanup only. + +The code as it stands appears to be correct, but static analysis was concerned that value could become null. +This patch adds a null check and ASSERT_NOT_REACHED() to make the code more obviously correct. + +* css/CSSParser.cpp: +(WebCore::CSSParser::parseValue): + 2012-04-17 David Reveman [Chromium] Add TextureUploader which allows us to use persistent GC3D state for texture uploads. Modified: trunk/Source/WebCore/css/CSSParser.cpp (114454 => 114455) --- trunk/Source/WebCore/css/CSSParser.cpp 2012-04-17 22:54:11 UTC (rev 114454) +++ trunk/Source/WebCore/css/CSSParser.cpp 2012-04-17 22:56:23 UTC (rev 114455) @@ -1624,18 +1624,22 @@ return false; } else if (inQuirksMode() && value->id == CSSValueHand) // MSIE 5 compatibility :/ list->append(cssValuePool().createIdentifierValue(CSSValuePointer)); -else if (value && ((value->id >= CSSValueAuto && value->id <= CSSValueWebkitGrabbing) || value->id == CSSValueCopy || value->id == CSSValueNone)) +else if ((value->id >= CSSValueAuto && value->id <= CSSValueWebkitGrabbing) || value->id == CSSValueCopy || value->id == CSSValueNone) list->append(cssValuePool().createIdentifierValue(value->id)); m_valueList->next(); parsedValue = list.release(); break; +} else if (value) { +id = value->id; +if (inQuirksMode() && value->id == CSSValueHand) { // MSIE 5 compatibility :/ +id = CSSValuePointer; +validPrimitive = true; +} else if ((value->id >= CSSValueAuto && value->id <= CSSValueWebkitGrabbing) || value->id == CSSValueCopy || value->id == CSSValueNone) +validPrimitive = true; +} else { +ASSERT_NOT_REACHED(); +return false; } -id = value->id; -if (inQuirksMode() && value->id == CSSValueHand) { // MSIE 5 compatibility :/ -id = CSSValuePointer; -validPrimitive = true; -} else if ((value->id >= CSSValueAuto && value->id <= CSSValueWebkitGrabbing) || value->id == CSSValueCopy || value->id == CSSValueNone) -validPrimitive = true; break; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [114444] trunk/Source/WebCore
Title: [11] trunk/Source/WebCore Revision 11 Author macpher...@chromium.org Date 2012-04-17 15:16:55 -0700 (Tue, 17 Apr 2012) Log Message Clean up CSSParser::parseFillRepeat(). https://bugs.webkit.org/show_bug.cgi?id=83547 Reviewed by Kentaro Hara. Removed multiple unnecessary calls to m_valueList->current(). Restructured logic for parsing second value to make it clearer. No new tests / code cleanup only. * css/CSSParser.cpp: (WebCore::CSSParser::parseFillRepeat): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParser.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (114443 => 11) --- trunk/Source/WebCore/ChangeLog 2012-04-17 22:15:54 UTC (rev 114443) +++ trunk/Source/WebCore/ChangeLog 2012-04-17 22:16:55 UTC (rev 11) @@ -1,3 +1,18 @@ +2012-04-17 Luke Macpherson + +Clean up CSSParser::parseFillRepeat(). +https://bugs.webkit.org/show_bug.cgi?id=83547 + +Reviewed by Kentaro Hara. + +Removed multiple unnecessary calls to m_valueList->current(). +Restructured logic for parsing second value to make it clearer. + +No new tests / code cleanup only. + +* css/CSSParser.cpp: +(WebCore::CSSParser::parseFillRepeat): + 2012-04-17 Kentaro Hara [V8] Pass Isolate to toV8Slow() Modified: trunk/Source/WebCore/css/CSSParser.cpp (114443 => 11) --- trunk/Source/WebCore/css/CSSParser.cpp 2012-04-17 22:15:54 UTC (rev 114443) +++ trunk/Source/WebCore/css/CSSParser.cpp 2012-04-17 22:16:55 UTC (rev 11) @@ -3300,8 +3300,6 @@ void CSSParser::parseFillRepeat(RefPtr& value1, RefPtr& value2) { -CSSParserValue* value = m_valueList->current(); - int id = m_valueList->current()->id; if (id == CSSValueRepeatX) { m_implicitShorthand = true; @@ -3324,23 +3322,21 @@ return; } -value = m_valueList->next(); +CSSParserValue* value = m_valueList->next(); -// First check for the comma. If so, we are finished parsing this value or value pair. -if (isComma(value)) -value = 0; - -if (value) -id = m_valueList->current()->id; - -if (value && (id == CSSValueRepeat || id == CSSValueNoRepeat || id == CSSValueRound || id == CSSValueSpace)) { -value2 = cssValuePool().createIdentifierValue(id); -m_valueList->next(); -} else { -// If only one value was specified, value2 is the same as value1. -m_implicitShorthand = true; -value2 = cssValuePool().createIdentifierValue(static_cast(value1.get())->getIdent()); +// Parse the second value if one is available +if (value && !isComma(value)) { +id = value->id; +if (id == CSSValueRepeat || id == CSSValueNoRepeat || id == CSSValueRound || id == CSSValueSpace) { +value2 = cssValuePool().createIdentifierValue(id); +m_valueList->next(); +return; +} } + +// If only one value was specified, value2 is the same as value1. +m_implicitShorthand = true; +value2 = cssValuePool().createIdentifierValue(static_cast(value1.get())->getIdent()); } PassRefPtr CSSParser::parseFillSize(CSSPropertyID propId, bool& allowComma) ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [113854] trunk/Source/WebCore
Title: [113854] trunk/Source/WebCore Revision 113854 Author macpher...@chromium.org Date 2012-04-11 06:29:01 -0700 (Wed, 11 Apr 2012) Log Message Remove unnecessary assignments from CSSParser::parseLinearGradient(). https://bugs.webkit.org/show_bug.cgi?id=83661 Reviewed by Kentaro Hara. No new tests / code cleanup only. * css/CSSParser.cpp: (WebCore::CSSParser::parseLinearGradient): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParser.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (113853 => 113854) --- trunk/Source/WebCore/ChangeLog 2012-04-11 13:23:36 UTC (rev 113853) +++ trunk/Source/WebCore/ChangeLog 2012-04-11 13:29:01 UTC (rev 113854) @@ -1,3 +1,15 @@ +2012-04-11 Luke Macpherson + +Remove unnecessary assignments from CSSParser::parseLinearGradient(). +https://bugs.webkit.org/show_bug.cgi?id=83661 + +Reviewed by Kentaro Hara. + +No new tests / code cleanup only. + +* css/CSSParser.cpp: +(WebCore::CSSParser::parseLinearGradient): + 2012-04-11 Stephen Chenney Shadow tree TreeScope data is not removed by ContainerNode::removeAllChildren Modified: trunk/Source/WebCore/css/CSSParser.cpp (113853 => 113854) --- trunk/Source/WebCore/css/CSSParser.cpp 2012-04-11 13:23:36 UTC (rev 113853) +++ trunk/Source/WebCore/css/CSSParser.cpp 2012-04-11 13:29:01 UTC (rev 113854) @@ -6389,7 +6389,7 @@ if (validUnit(a, FAngle, CSSStrictMode)) { result->setAngle(createPrimitiveNumericValue(a)); -a = args->next(); +args->next(); expectComma = true; } else { // Look one or two optional keywords that indicate a side or corner. @@ -6403,8 +6403,7 @@ else startY = location; -a = args->next(); -if (a) { +if ((a = args->next())) { if ((location = valueFromSideKeyword(a, isHorizontal))) { if (isHorizontal) { if (startX) @@ -6416,7 +6415,7 @@ startY = location; } -a = args->next(); +args->next(); } } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [113753] trunk/Source/WebCore
Title: [113753] trunk/Source/WebCore Revision 113753 Author macpher...@chromium.org Date 2012-04-10 12:36:14 -0700 (Tue, 10 Apr 2012) Log Message Pass PropertyHandler by reference in CSSStyleApplyProperty.h. https://bugs.webkit.org/show_bug.cgi?id=83551 Reviewed by Kentaro Hara. No new tests / cleanup only. * css/CSSStyleApplyProperty.h: (WebCore::CSSStyleApplyProperty::setPropertyHandler): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.h Diff Modified: trunk/Source/WebCore/ChangeLog (113752 => 113753) --- trunk/Source/WebCore/ChangeLog 2012-04-10 19:31:04 UTC (rev 113752) +++ trunk/Source/WebCore/ChangeLog 2012-04-10 19:36:14 UTC (rev 113753) @@ -1,5 +1,17 @@ 2012-04-10 Luke Macpherson +Pass PropertyHandler by reference in CSSStyleApplyProperty.h. +https://bugs.webkit.org/show_bug.cgi?id=83551 + +Reviewed by Kentaro Hara. + +No new tests / cleanup only. + +* css/CSSStyleApplyProperty.h: +(WebCore::CSSStyleApplyProperty::setPropertyHandler): + +2012-04-10 Luke Macpherson + Pass FontDescription as const reference instead of by value in CSSStyleSelector.h. https://bugs.webkit.org/show_bug.cgi?id=83548 Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.h (113752 => 113753) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.h 2012-04-10 19:31:04 UTC (rev 113752) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.h 2012-04-10 19:36:14 UTC (rev 113753) @@ -78,7 +78,7 @@ return i >= 0 && i < numCSSProperties; } -void setPropertyHandler(CSSPropertyID property, PropertyHandler handler) +void setPropertyHandler(CSSPropertyID property, const PropertyHandler& handler) { ASSERT(valid(property)); ASSERT(!propertyHandler(property).isValid()); ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [113752] trunk/Source/WebCore
Title: [113752] trunk/Source/WebCore Revision 113752 Author macpher...@chromium.org Date 2012-04-10 12:31:04 -0700 (Tue, 10 Apr 2012) Log Message Pass FontDescription as const reference instead of by value in CSSStyleSelector.h. https://bugs.webkit.org/show_bug.cgi?id=83548 Reviewed by Kentaro Hara. FontDescription is relatively large, so pass-by-reference is preferred. No new tests / code cleanup only. * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::fontDescription): (WebCore::CSSStyleSelector::parentFontDescription): (WebCore::CSSStyleSelector::setFontDescription): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleSelector.h Diff Modified: trunk/Source/WebCore/ChangeLog (113751 => 113752) --- trunk/Source/WebCore/ChangeLog 2012-04-10 19:23:48 UTC (rev 113751) +++ trunk/Source/WebCore/ChangeLog 2012-04-10 19:31:04 UTC (rev 113752) @@ -1,3 +1,19 @@ +2012-04-10 Luke Macpherson + +Pass FontDescription as const reference instead of by value in CSSStyleSelector.h. +https://bugs.webkit.org/show_bug.cgi?id=83548 + +Reviewed by Kentaro Hara. + +FontDescription is relatively large, so pass-by-reference is preferred. + +No new tests / code cleanup only. + +* css/CSSStyleSelector.h: +(WebCore::CSSStyleSelector::fontDescription): +(WebCore::CSSStyleSelector::parentFontDescription): +(WebCore::CSSStyleSelector::setFontDescription): + 2012-04-10 Adam Klein Add TestNode.idl to run-binding-tests Modified: trunk/Source/WebCore/css/CSSStyleSelector.h (113751 => 113752) --- trunk/Source/WebCore/css/CSSStyleSelector.h 2012-04-10 19:23:48 UTC (rev 113751) +++ trunk/Source/WebCore/css/CSSStyleSelector.h 2012-04-10 19:31:04 UTC (rev 113752) @@ -145,9 +145,9 @@ RenderStyle* rootElementStyle() const { return m_rootElementStyle; } Element* element() const { return m_element; } Document* document() const { return m_checker.document(); } -FontDescription fontDescription() { return style()->fontDescription(); } -FontDescription parentFontDescription() {return parentStyle()->fontDescription(); } -void setFontDescription(FontDescription fontDescription) { m_fontDirty |= style()->setFontDescription(fontDescription); } +const FontDescription& fontDescription() { return style()->fontDescription(); } +const FontDescription& parentFontDescription() { return parentStyle()->fontDescription(); } +void setFontDescription(const FontDescription& fontDescription) { m_fontDirty |= style()->setFontDescription(fontDescription); } void setZoom(float f) { m_fontDirty |= style()->setZoom(f); } void setEffectiveZoom(float f) { m_fontDirty |= style()->setEffectiveZoom(f); } void setTextSizeAdjust(bool b) { m_fontDirty |= style()->setTextSizeAdjust(b); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [113748] trunk/Source/WebCore
Title: [113748] trunk/Source/WebCore Revision 113748 Author macpher...@chromium.org Date 2012-04-10 12:10:53 -0700 (Tue, 10 Apr 2012) Log Message Don't allow fallthrough for CSSPropertyBaselineShift in CSSComputedStyleDeclaration::getSVGPropertyCSSValue(). https://bugs.webkit.org/show_bug.cgi?id=83536 Reviewed by Daniel Bates. Add a return statement to the case CSSPropertyBaselineShift so that we don't fall through to the next case statement. No new tests / code cleanup from coverity static analysis. * css/SVGCSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (113747 => 113748) --- trunk/Source/WebCore/ChangeLog 2012-04-10 19:01:44 UTC (rev 113747) +++ trunk/Source/WebCore/ChangeLog 2012-04-10 19:10:53 UTC (rev 113748) @@ -1,3 +1,17 @@ +2012-04-10 Luke Macpherson + +Don't allow fallthrough for CSSPropertyBaselineShift in CSSComputedStyleDeclaration::getSVGPropertyCSSValue(). +https://bugs.webkit.org/show_bug.cgi?id=83536 + +Reviewed by Daniel Bates. + +Add a return statement to the case CSSPropertyBaselineShift so that we don't fall through to the next case statement. + +No new tests / code cleanup from coverity static analysis. + +* css/SVGCSSComputedStyleDeclaration.cpp: +(WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue): + 2012-04-10 Alejandro G. Castro [GTK] Build fix TextureMapper compilation and solve warning. Modified: trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp (113747 => 113748) --- trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp 2012-04-10 19:01:44 UTC (rev 113747) +++ trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp 2012-04-10 19:10:53 UTC (rev 113748) @@ -174,6 +174,8 @@ case BS_LENGTH: return SVGLength::toCSSPrimitiveValue(svgStyle->baselineShiftValue()); } +ASSERT_NOT_REACHED(); +return 0; } case CSSPropertyGlyphOrientationHorizontal: return glyphOrientationToCSSPrimitiveValue(svgStyle->glyphOrientationHorizontal()); ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [113737] trunk/Source/WebCore
Title: [113737] trunk/Source/WebCore Revision 113737 Author macpher...@chromium.org Date 2012-04-10 11:10:45 -0700 (Tue, 10 Apr 2012) Log Message Remove unnecessary null check in void SimplifyMarkupCommand::doApply(). https://bugs.webkit.org/show_bug.cgi?id=83535 Reviewed by Kentaro Hara. No new tests / code cleanup only. currentNode cannot be null within the loop body. It is dereferenced before and after the removed line without checking. Additionally I have added an assertion to express this loop invariant. * editing/SimplifyMarkupCommand.cpp: (WebCore::SimplifyMarkupCommand::doApply): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/editing/SimplifyMarkupCommand.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (113736 => 113737) --- trunk/Source/WebCore/ChangeLog 2012-04-10 17:47:50 UTC (rev 113736) +++ trunk/Source/WebCore/ChangeLog 2012-04-10 18:10:45 UTC (rev 113737) @@ -1,3 +1,19 @@ +2012-04-10 Luke Macpherson + +Remove unnecessary null check in void SimplifyMarkupCommand::doApply(). +https://bugs.webkit.org/show_bug.cgi?id=83535 + +Reviewed by Kentaro Hara. + +No new tests / code cleanup only. + +currentNode cannot be null within the loop body. +It is dereferenced before and after the removed line without checking. +Additionally I have added an assertion to express this loop invariant. + +* editing/SimplifyMarkupCommand.cpp: +(WebCore::SimplifyMarkupCommand::doApply): + 2012-04-10 David Dorwin Add Encrypted Media Extensions methods to HTMLMediaElement Modified: trunk/Source/WebCore/editing/SimplifyMarkupCommand.cpp (113736 => 113737) --- trunk/Source/WebCore/editing/SimplifyMarkupCommand.cpp 2012-04-10 17:47:50 UTC (rev 113736) +++ trunk/Source/WebCore/editing/SimplifyMarkupCommand.cpp 2012-04-10 18:10:45 UTC (rev 113737) @@ -62,10 +62,12 @@ nodesToRemove.append(currentNode); currentNode = currentNode->parentNode(); +ASSERT(currentNode); + if (!currentNode->renderer() || !currentNode->renderer()->isRenderInline() || toRenderInline(currentNode->renderer())->alwaysCreateLineBoxes()) continue; -if (currentNode && currentNode->firstChild() != currentNode->lastChild()) { +if (currentNode->firstChild() != currentNode->lastChild()) { topNodeWithStartingStyle = 0; break; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [113676] trunk/Source/WebCore
Title: [113676] trunk/Source/WebCore Revision 113676 Author macpher...@chromium.org Date 2012-04-09 21:47:51 -0700 (Mon, 09 Apr 2012) Log Message Don't let CSSPropertyWebkitPerspective dereference primitiveValue without null check. https://bugs.webkit.org/show_bug.cgi?id=83538 Reviewed by Daniel Bates. No new tests / code cleanup only. Coverity pointed out that we potentially dereference primitiveValue here without checking for null. I've added an early out for that case to make sure it can't ever happen. I don't know if it's actually possible to exercise that code path or not - probably the parser prevents it from being hit in practice. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (113675 => 113676) --- trunk/Source/WebCore/ChangeLog 2012-04-10 04:42:20 UTC (rev 113675) +++ trunk/Source/WebCore/ChangeLog 2012-04-10 04:47:51 UTC (rev 113676) @@ -1,3 +1,19 @@ +2012-04-09 Luke Macpherson + +Don't let CSSPropertyWebkitPerspective dereference primitiveValue without null check. +https://bugs.webkit.org/show_bug.cgi?id=83538 + +Reviewed by Daniel Bates. + +No new tests / code cleanup only. + +Coverity pointed out that we potentially dereference primitiveValue here without checking for null. +I've added an early out for that case to make sure it can't ever happen. I don't know if it's actually +possible to exercise that code path or not - probably the parser prevents it from being hit in practice. + +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): + 2012-04-09 Joseph Pecoraro Web Inspector: ASSERT attempting to unbind null contentDocument Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (113675 => 113676) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-04-10 04:42:20 UTC (rev 113675) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-04-10 04:47:51 UTC (rev 113676) @@ -3643,7 +3643,11 @@ } case CSSPropertyWebkitPerspective: { HANDLE_INHERIT_AND_INITIAL(perspective, Perspective) -if (primitiveValue && primitiveValue->getIdent() == CSSValueNone) { + +if (!primitiveValue) +return; + +if (primitiveValue->getIdent() == CSSValueNone) { m_style->setPerspective(0); return; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [113643] trunk/Source/WebCore
Title: [113643] trunk/Source/WebCore Revision 113643 Author macpher...@chromium.org Date 2012-04-09 16:58:56 -0700 (Mon, 09 Apr 2012) Log Message Make CSSValueID's into an enum instead of a collection of integers. https://bugs.webkit.org/show_bug.cgi?id=83246 Reviewed by Simon Fraser. This patch simply converts the list of integers into an enum. Follow-up patches will then convert existing code that uses integers to use the new enum. No new tests / no functionality changed. * css/makevalues.pl: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/makevalues.pl Diff Modified: trunk/Source/WebCore/ChangeLog (113642 => 113643) --- trunk/Source/WebCore/ChangeLog 2012-04-09 23:54:12 UTC (rev 113642) +++ trunk/Source/WebCore/ChangeLog 2012-04-09 23:58:56 UTC (rev 113643) @@ -1,3 +1,17 @@ +2012-04-09 Luke Macpherson + +Make CSSValueID's into an enum instead of a collection of integers. +https://bugs.webkit.org/show_bug.cgi?id=83246 + +Reviewed by Simon Fraser. + +This patch simply converts the list of integers into an enum. +Follow-up patches will then convert existing code that uses integers to use the new enum. + +No new tests / no functionality changed. + +* css/makevalues.pl: + 2012-04-09 Sheriff Bot Unreviewed, rolling out r113609. Modified: trunk/Source/WebCore/css/makevalues.pl (113642 => 113643) --- trunk/Source/WebCore/css/makevalues.pl 2012-04-09 23:54:12 UTC (rev 113642) +++ trunk/Source/WebCore/css/makevalues.pl 2012-04-09 23:58:56 UTC (rev 113643) @@ -130,7 +130,8 @@ namespace WebCore { -const int CSSValueInvalid = 0; +enum CSSValueID { +CSSValueInvalid = 0, EOF my $i = 1; @@ -138,12 +139,14 @@ foreach my $name (@names) { my $id = $name; $id =~ s/(^[^-])|-(.)/uc($1||$2)/ge; - print HEADER "const int CSSValue" . $id . " = " . $i . ";\n"; + print HEADER "CSSValue" . $id . " = " . $i . ",\n"; $i = $i + 1; if (length($name) > $maxLen) { $maxLen = length($name); } } + +print HEADER "};\n\n"; print HEADER "const int numCSSValueKeywords = " . $i . ";\n"; print HEADER "const size_t maxCSSValueKeywordLength = " . $maxLen . ";\n"; print HEADER << "EOF"; ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [113273] trunk/Source/WebCore
Title: [113273] trunk/Source/WebCore Revision 113273 Author macpher...@chromium.org Date 2012-04-04 18:42:05 -0700 (Wed, 04 Apr 2012) Log Message Replace further usage of int with CSSPropertyID. https://bugs.webkit.org/show_bug.cgi?id=83119 Reviewed by Simon Fraser. No new tests / no functionality changed. * css/CSSComputedStyleDeclaration.cpp: (WebCore::logUnimplementedPropertyID): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSGrammar.y: * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): * css/CSSParser.h: (CSSParser): (WebCore::ShorthandScope::~ShorthandScope): * css/CSSProperty.h: (WebCore::CSSProperty::CSSProperty): * css/SVGCSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue): * css/StylePropertySet.h: (StylePropertySet): * css/makeprop.pl: * dom/StyledElement.h: (StyledElement): * editing/EditingStyle.h: (EditingStyle): * html/HTMLElement.h: (HTMLElement): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp trunk/Source/WebCore/css/CSSGrammar.y trunk/Source/WebCore/css/CSSParser.cpp trunk/Source/WebCore/css/CSSParser.h trunk/Source/WebCore/css/CSSProperty.h trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp trunk/Source/WebCore/css/StylePropertySet.h trunk/Source/WebCore/css/makeprop.pl Diff Modified: trunk/Source/WebCore/ChangeLog (113272 => 113273) --- trunk/Source/WebCore/ChangeLog 2012-04-05 01:38:28 UTC (rev 113272) +++ trunk/Source/WebCore/ChangeLog 2012-04-05 01:42:05 UTC (rev 113273) @@ -1,3 +1,35 @@ +2012-04-04 Luke Macpherson + +Replace further usage of int with CSSPropertyID. +https://bugs.webkit.org/show_bug.cgi?id=83119 + +Reviewed by Simon Fraser. + +No new tests / no functionality changed. + +* css/CSSComputedStyleDeclaration.cpp: +(WebCore::logUnimplementedPropertyID): +(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): +* css/CSSGrammar.y: +* css/CSSParser.cpp: +(WebCore::CSSParser::CSSParser): +* css/CSSParser.h: +(CSSParser): +(WebCore::ShorthandScope::~ShorthandScope): +* css/CSSProperty.h: +(WebCore::CSSProperty::CSSProperty): +* css/SVGCSSComputedStyleDeclaration.cpp: +(WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue): +* css/StylePropertySet.h: +(StylePropertySet): +* css/makeprop.pl: +* dom/StyledElement.h: +(StyledElement): +* editing/EditingStyle.h: +(EditingStyle): +* html/HTMLElement.h: +(HTMLElement): + 2012-04-04 Adam Klein Use PassRefPtr in V8DOMWrapper interface to avoid explicit ref() calls Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (113272 => 113273) --- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2012-04-05 01:38:28 UTC (rev 113272) +++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2012-04-05 01:42:05 UTC (rev 113273) @@ -1247,7 +1247,7 @@ static void logUnimplementedPropertyID(CSSPropertyID propertyID) { -DEFINE_STATIC_LOCAL(HashSet, propertyIDSet, ()); +DEFINE_STATIC_LOCAL(HashSet, propertyIDSet, ()); if (!propertyIDSet.add(propertyID).isNewEntry) return; Modified: trunk/Source/WebCore/css/CSSGrammar.y (113272 => 113273) --- trunk/Source/WebCore/css/CSSGrammar.y 2012-04-05 01:38:28 UTC (rev 113272) +++ trunk/Source/WebCore/css/CSSGrammar.y 2012-04-05 01:42:05 UTC (rev 113273) @@ -84,6 +84,7 @@ StyleKeyframe* keyframe; StyleRuleKeyframes* keyframesRule; float val; +CSSPropertyID id; } %{ @@ -250,7 +251,7 @@ %type key_list %type key -%type property +%type property %type specifier %type specifier_list Modified: trunk/Source/WebCore/css/CSSParser.cpp (113272 => 113273) --- trunk/Source/WebCore/css/CSSParser.cpp 2012-04-05 01:38:28 UTC (rev 113272) +++ trunk/Source/WebCore/css/CSSParser.cpp 2012-04-05 01:42:05 UTC (rev 113273) @@ -185,7 +185,7 @@ , m_id(CSSPropertyInvalid) , m_styleSheet(0) , m_inParseShorthand(0) -, m_currentShorthand(0) +, m_currentShorthand(CSSPropertyInvalid) , m_implicitShorthand(false) , m_hasFontFaceOnlyValues(false) , m_hadSyntacticallyValidCSSRule(false) Modified: trunk/Source/WebCore/css/CSSParser.h (113272 => 113273) --- trunk/Source/WebCore/css/CSSParser.h 2012-04-05 01:38:28 UTC (rev 113272) +++ trunk/Source/WebCore/css/CSSParser.h 2012-04-05 01:42:05 UTC (rev 113273) @@ -109,7 +109,7 @@ void parseFillPosition(CSSParserValueList*, RefPtr&, RefPtr&); void parseFillRepeat(RefPtr&, RefPtr&); -PassRefPtr parseFillSize(CSSPropertyID propId, bool &allowComma); +PassRefPtr parseFillSize(CSSPropertyID, bool &allowComma); bool parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1, CSSPropertyID& propId2,
[webkit-changes] [113139] trunk
Title: [113139] trunk Revision 113139 Author macpher...@chromium.org Date 2012-04-03 22:05:37 -0700 (Tue, 03 Apr 2012) Log Message Don't parse "show" and "hide" as valid values for display property. https://bugs.webkit.org/show_bug.cgi?id=83115 Reviewed by Adam Barth. No new tests. * css/CSSParser.cpp: (WebCore::isValidKeywordPropertyAndValue): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSParser.cpp Added Paths trunk/LayoutTests/fast/css/display-no-show-hide-expected.html trunk/LayoutTests/fast/css/display-no-show-hide.html Diff Added: trunk/LayoutTests/fast/css/display-no-show-hide-expected.html (0 => 113139) --- trunk/LayoutTests/fast/css/display-no-show-hide-expected.html (rev 0) +++ trunk/LayoutTests/fast/css/display-no-show-hide-expected.html 2012-04-04 05:05:37 UTC (rev 113139) @@ -0,0 +1,3 @@ + +This text should be visible. +This text should be visible. Added: trunk/LayoutTests/fast/css/display-no-show-hide.html (0 => 113139) --- trunk/LayoutTests/fast/css/display-no-show-hide.html (rev 0) +++ trunk/LayoutTests/fast/css/display-no-show-hide.html 2012-04-04 05:05:37 UTC (rev 113139) @@ -0,0 +1,3 @@ + +This text should be visible. +This text should be visible. Modified: trunk/Source/WebCore/ChangeLog (113138 => 113139) --- trunk/Source/WebCore/ChangeLog 2012-04-04 05:00:54 UTC (rev 113138) +++ trunk/Source/WebCore/ChangeLog 2012-04-04 05:05:37 UTC (rev 113139) @@ -1,3 +1,15 @@ +2012-04-03 Luke Macpherson + +Don't parse "show" and "hide" as valid values for display property. +https://bugs.webkit.org/show_bug.cgi?id=83115 + +Reviewed by Adam Barth. + +No new tests. + +* css/CSSParser.cpp: +(WebCore::isValidKeywordPropertyAndValue): + 2012-04-03 Yuta Kitamura Crash in WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel Modified: trunk/Source/WebCore/css/CSSParser.cpp (113138 => 113139) --- trunk/Source/WebCore/css/CSSParser.cpp 2012-04-04 05:00:54 UTC (rev 113138) +++ trunk/Source/WebCore/css/CSSParser.cpp 2012-04-04 05:05:37 UTC (rev 113139) @@ -531,8 +531,8 @@ #if ENABLE(CSS_GRID_LAYOUT) if (valueID == CSSValueWebkitGrid || valueID == CSSValueWebkitInlineGrid) return true; +#endif break; -#endif case CSSPropertyEmptyCells: // show | hide | inherit if (valueID == CSSValueShow || valueID == CSSValueHide) return true; ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [112336] trunk/Source/WebCore
Title: [112336] trunk/Source/WebCore Revision 112336 Author macpher...@chromium.org Date 2012-03-27 17:12:30 -0700 (Tue, 27 Mar 2012) Log Message Add assertions to valueForLength() and RenderBox::computeLogicalWidthInRegionUsing() to help with debugging. https://bugs.webkit.org/show_bug.cgi?id=82393 Reviewed by Eric Seidel. No new tests / adding assetions only. * css/LengthFunctions.cpp: (WebCore::valueForLength): * rendering/RenderBox.cpp: (WebCore::RenderBox::computeLogicalWidthInRegionUsing): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/LengthFunctions.cpp trunk/Source/WebCore/rendering/RenderBox.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (112335 => 112336) --- trunk/Source/WebCore/ChangeLog 2012-03-28 00:05:13 UTC (rev 112335) +++ trunk/Source/WebCore/ChangeLog 2012-03-28 00:12:30 UTC (rev 112336) @@ -1,3 +1,17 @@ +2012-03-27 Luke Macpherson + +Add assertions to valueForLength() and RenderBox::computeLogicalWidthInRegionUsing() to help with debugging. +https://bugs.webkit.org/show_bug.cgi?id=82393 + +Reviewed by Eric Seidel. + +No new tests / adding assetions only. + +* css/LengthFunctions.cpp: +(WebCore::valueForLength): +* rendering/RenderBox.cpp: +(WebCore::RenderBox::computeLogicalWidthInRegionUsing): + 2012-03-27 Tony Chang use the correct size when computing flex-pack space Modified: trunk/Source/WebCore/css/LengthFunctions.cpp (112335 => 112336) --- trunk/Source/WebCore/css/LengthFunctions.cpp 2012-03-28 00:05:13 UTC (rev 112335) +++ trunk/Source/WebCore/css/LengthFunctions.cpp 2012-03-28 00:12:30 UTC (rev 112336) @@ -80,9 +80,13 @@ return minimumValueForLength(length, maximumValue, renderView, roundPercentages); case Auto: return maximumValue; +// multiple assertions are used below to provide more useful debug output. case Relative: +ASSERT_NOT_REACHED(); case Intrinsic: +ASSERT_NOT_REACHED(); case MinIntrinsic: +ASSERT_NOT_REACHED(); case Undefined: ASSERT_NOT_REACHED(); return 0; Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (112335 => 112336) --- trunk/Source/WebCore/rendering/RenderBox.cpp 2012-03-28 00:05:13 UTC (rev 112335) +++ trunk/Source/WebCore/rendering/RenderBox.cpp 2012-03-28 00:12:30 UTC (rev 112336) @@ -1845,6 +1845,8 @@ else logicalWidth = styleToUse->logicalMaxWidth(); +ASSERT(!logicalWidth.isUndefined()); + if (logicalWidth.isIntrinsicOrAuto()) { RenderView* renderView = view(); LayoutUnit marginStart = minimumValueForLength(styleToUse->marginStart(), availableLogicalWidth, renderView); ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [111631] trunk/Source/WebCore
Title: [111631] trunk/Source/WebCore Revision 111631 Author macpher...@chromium.org Date 2012-03-21 17:58:36 -0700 (Wed, 21 Mar 2012) Log Message Use CSSPrimitiveValue::convertToLength() in a few places. https://bugs.webkit.org/show_bug.cgi?id=81492 Reviewed by Eric Seidel. No new tests - refactoring only. CSSPrimitiveValue::convertToLength() provides the same functionality that is duplicated in many places in CSSStyleSelector. This patch removes some of that code duplication. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyVerticalAlign::applyValue): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (111630 => 111631) --- trunk/Source/WebCore/ChangeLog 2012-03-22 00:43:05 UTC (rev 111630) +++ trunk/Source/WebCore/ChangeLog 2012-03-22 00:58:36 UTC (rev 111631) @@ -1,3 +1,20 @@ +2012-03-21 Luke Macpherson + +Use CSSPrimitiveValue::convertToLength() in a few places. +https://bugs.webkit.org/show_bug.cgi?id=81492 + +Reviewed by Eric Seidel. + +No new tests - refactoring only. + +CSSPrimitiveValue::convertToLength() provides the same functionality that is duplicated +in many places in CSSStyleSelector. This patch removes some of that code duplication. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::ApplyPropertyVerticalAlign::applyValue): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): + 2012-03-21 Patrick Gansterer Build fix for ENABLE(SVG) && !ENABLE(FILTERS) after r111601. Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (111630 => 111631) --- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2012-03-22 00:43:05 UTC (rev 111630) +++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2012-03-22 00:58:36 UTC (rev 111631) @@ -30,8 +30,9 @@ #ifndef CSSPrimitiveValueMappings_h #define CSSPrimitiveValueMappings_h +#include "CSSCalculationValue.h" +#include "CSSPrimitiveValue.h" #include "ColorSpace.h" -#include "CSSPrimitiveValue.h" #include "CSSValueKeywords.h" #include "FontDescription.h" #include "FontSmoothingMode.h" @@ -3767,11 +3768,13 @@ } enum LengthConversion { +AnyConversion = ~0, FixedIntegerConversion = 1 << 0, FixedFloatConversion = 1 << 1, AutoConversion = 1 << 2, PercentConversion = 1 << 3, -FractionConversion = 1 << 4 +FractionConversion = 1 << 4, +CalculatedConversion = 1 << 5 }; template Length CSSPrimitiveValue::convertToLength(RenderStyle* style, RenderStyle* rootStyle, double multiplier, bool computingFontSize) @@ -3788,6 +3791,8 @@ return Length(getDoubleValue() * 100.0, Percent); if ((supported & AutoConversion) && getIdent() == CSSValueAuto) return Length(Auto); +if ((supported & CalculatedConversion) && isCalculated()) +return Length(cssCalcValue()->toCalcValue(style, rootStyle, multiplier)); return Length(Undefined); } Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (111630 => 111631) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-22 00:43:05 UTC (rev 111630) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-22 00:58:36 UTC (rev 111631) @@ -1563,13 +1563,7 @@ if (primitiveValue->getIdent()) return selector->style()->setVerticalAlign(*primitiveValue); -Length length; -if (primitiveValue->isLength()) -length = primitiveValue->computeLength(selector->style(), selector->rootElementStyle(), selector->style()->effectiveZoom()); -else if (primitiveValue->isPercentage()) -length = Length(primitiveValue->getDoubleValue(), Percent); - -selector->style()->setVerticalAlignLength(length); +selector->style()->setVerticalAlignLength(primitiveValue->convertToLength(selector->style(), selector->rootElementStyle(), selector->style()->effectiveZoom())); } static PropertyHandler createHandler() Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (111630 => 111631) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-22 00:43:05 UTC (rev 111630) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-22 00:58:36 UTC (rev 111631) @@ -4199,35 +4199,22 @@ return; } -Pair* pair = primitiveValue->getPairValue(); - -CSSPrimitiveValue* first = pair ? static_cast(pair->first()) : primitiveValue; -CSSPrimitiveValue* second = pair ? static_ca
[webkit-changes] [111460] trunk/Source/WebCore
Title: [111460] trunk/Source/WebCore Revision 111460 Author macpher...@chromium.org Date 2012-03-20 16:18:52 -0700 (Tue, 20 Mar 2012) Log Message Use CSSPrimitiveValue::convertToLength() to handle CSSPropertyWebkitBoxReflect and in createGridTrackBreadth. https://bugs.webkit.org/show_bug.cgi?id=81633 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (111459 => 111460) --- trunk/Source/WebCore/ChangeLog 2012-03-20 23:15:11 UTC (rev 111459) +++ trunk/Source/WebCore/ChangeLog 2012-03-20 23:18:52 UTC (rev 111460) @@ -1,3 +1,15 @@ +2012-03-20 Luke Macpherson + +Use CSSPrimitiveValue::convertToLength() to handle CSSPropertyWebkitBoxReflect and in createGridTrackBreadth. +https://bugs.webkit.org/show_bug.cgi?id=81633 + +Reviewed by Andreas Kling. + +No new tests / refactoring only. + +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): + 2012-03-20 Sheriff Bot Unreviewed, rolling out r111442. Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (111459 => 111460) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-20 23:15:11 UTC (rev 111459) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-20 23:18:52 UTC (rev 111460) @@ -2918,23 +2918,15 @@ static bool createGridTrackBreadth(CSSPrimitiveValue* primitiveValue, CSSStyleSelector* selector, Length& length) { -if (primitiveValue->getIdent() == CSSValueAuto) { -length = Length(); -return true; -} +Length workingLength = primitiveValue->convertToLength(selector->style(), selector->rootElementStyle(), selector->style()->effectiveZoom()); +if (workingLength.isUndefined()) +return false; -if (primitiveValue->isLength()) { -length = primitiveValue->computeLength(selector->style(), selector->rootElementStyle(), selector->style()->effectiveZoom()); -length.setQuirk(primitiveValue->isQuirkValue()); -return true; -} +if (primitiveValue->isLength()) +workingLength.setQuirk(primitiveValue->isQuirkValue()); -if (primitiveValue->isPercentage()) { -length = Length(primitiveValue->getDoubleValue(), Percent); -return true; -} - -return false; +length = workingLength; +return true; } static bool createGridTrackList(CSSValue* value, Vector& lengths, CSSStyleSelector* selector) @@ -3371,12 +3363,8 @@ CSSReflectValue* reflectValue = static_cast(value); RefPtr reflection = StyleReflection::create(); reflection->setDirection(reflectValue->direction()); -if (reflectValue->offset()) { -if (reflectValue->offset()->isPercentage()) -reflection->setOffset(Length(reflectValue->offset()->getDoubleValue(), Percent)); -else -reflection->setOffset(reflectValue->offset()->computeLength(style(), m_rootElementStyle, zoomFactor)); -} +if (reflectValue->offset()) +reflection->setOffset(reflectValue->offset()->convertToLength(style(), m_rootElementStyle, zoomFactor)); NinePieceImage mask; mask.setMaskDefaults(); mapNinePieceImage(property, reflectValue->mask(), mask); ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [111371] trunk/Source/WebCore
Title: [111371] trunk/Source/WebCore Revision 111371 Author macpher...@chromium.org Date 2012-03-20 01:32:11 -0700 (Tue, 20 Mar 2012) Log Message Remove min and max parameters from CSSPrimitiveValue's roundForImpreciseConversion function. https://bugs.webkit.org/show_bug.cgi?id=81629 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLength): * css/CSSPrimitiveValue.h: (WebCore::roundForImpreciseConversion): * rendering/style/RenderStyle.h: (WebCore::adjustForAbsoluteZoom): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSPrimitiveValue.cpp trunk/Source/WebCore/css/CSSPrimitiveValue.h trunk/Source/WebCore/rendering/style/RenderStyle.h Diff Modified: trunk/Source/WebCore/ChangeLog (111370 => 111371) --- trunk/Source/WebCore/ChangeLog 2012-03-20 08:24:37 UTC (rev 111370) +++ trunk/Source/WebCore/ChangeLog 2012-03-20 08:32:11 UTC (rev 111371) @@ -1,3 +1,19 @@ +2012-03-20 Luke Macpherson + +Remove min and max parameters from CSSPrimitiveValue's roundForImpreciseConversion function. +https://bugs.webkit.org/show_bug.cgi?id=81629 + +Reviewed by Andreas Kling. + +No new tests / refactoring only. + +* css/CSSPrimitiveValue.cpp: +(WebCore::CSSPrimitiveValue::computeLength): +* css/CSSPrimitiveValue.h: +(WebCore::roundForImpreciseConversion): +* rendering/style/RenderStyle.h: +(WebCore::adjustForAbsoluteZoom): + 2012-03-20 Jason Liu [BlackBerry]Cookies shouldn't be set into each of webcore's request and platform's request. And this makes a regression. Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.cpp (111370 => 111371) --- trunk/Source/WebCore/css/CSSPrimitiveValue.cpp 2012-03-20 08:24:37 UTC (rev 111370) +++ trunk/Source/WebCore/css/CSSPrimitiveValue.cpp 2012-03-20 08:32:11 UTC (rev 111371) @@ -394,27 +394,27 @@ template<> int CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize) { -return roundForImpreciseConversion(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)); +return roundForImpreciseConversion(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)); } template<> unsigned CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize) { -return roundForImpreciseConversion(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)); +return roundForImpreciseConversion(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)); } template<> Length CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize) { -return Length(roundForImpreciseConversion(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)), Fixed); +return Length(roundForImpreciseConversion(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)), Fixed); } template<> short CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize) { -return roundForImpreciseConversion(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)); +return roundForImpreciseConversion(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)); } template<> unsigned short CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize) { -return roundForImpreciseConversion(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)); +return roundForImpreciseConversion(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)); } template<> float CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize) Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.h (111370 => 111371) --- trunk/Source/WebCore/css/CSSPrimitiveValue.h 2012-03-20 08:24:37 UTC (rev 111370) +++ trunk/Source/WebCore/css/CSSPrimitiveValue.h 2012-03-20 08:32:11 UTC (rev 111371) @@ -42,13 +42,13 @@ struct Length; -template inline T roundForImpreciseConversion(double value) +template inline T roundForImpreciseConversion(double value) { // Dimension calculations are imprecise, often resulting in values of e.g. // 44.8. We need to go ahead and round if we're really close to the // next integer value. value += (value < 0) ? -0.01 : +0.01; -return ((value > max) || (value < min)) ? 0 : static_cast(value); +return ((value > std::numeric_limits::max()) || (value < std::numeric_limits::min())) ? 0 : static_cast(value); } class CSSPrimitiveValue : public CSSValue { Modified: trunk/Source/WebCore/rendering/styl
[webkit-changes] [111156] trunk
Title: [56] trunk Revision 56 Author macpher...@chromium.org Date 2012-03-18 23:37:54 -0700 (Sun, 18 Mar 2012) Log Message Remove remnants of code that assume Lengths are 28 bit integers. https://bugs.webkit.org/show_bug.cgi?id=67976 Reviewed by Eric Seidel. Source/WebCore: Test: LayoutTests/fast/table/max-width-integer-overflow-expected.html * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLength): Bound by INT_MAX and INT_MIN instead of 28 bit bounds. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyBorderRadius::applyValue): Use PrimitiveValue::computeLength function directly. * platform/Length.h: Remove 28 bit integer limit constants. * rendering/AutoTableLayout.cpp: (WebCore::AutoTableLayout::computePreferredLogicalWidths): Use std::numeric_limits. LayoutTests: * platform/mac/fast/table/max-width-integer-overflow-expected.png: * platform/mac/fast/table/max-width-integer-overflow-expected.txt: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/mac/fast/table/max-width-integer-overflow-expected.png trunk/LayoutTests/platform/mac/fast/table/max-width-integer-overflow-expected.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSPrimitiveValue.cpp trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/platform/Length.h trunk/Source/WebCore/rendering/AutoTableLayout.cpp Diff Modified: trunk/LayoutTests/ChangeLog (55 => 56) --- trunk/LayoutTests/ChangeLog 2012-03-19 06:16:44 UTC (rev 55) +++ trunk/LayoutTests/ChangeLog 2012-03-19 06:37:54 UTC (rev 56) @@ -1,3 +1,13 @@ +2012-03-18 Luke Macpherson + +Remove remnants of code that assume Lengths are 28 bit integers. +https://bugs.webkit.org/show_bug.cgi?id=67976 + +Reviewed by Eric Seidel. + +* platform/mac/fast/table/max-width-integer-overflow-expected.png: +* platform/mac/fast/table/max-width-integer-overflow-expected.txt: + 2012-03-16 Shinya Kawanaka Should remove RuntimeEnabledFeatures::multipleShadowSubtreesEnabled Modified: trunk/LayoutTests/platform/mac/fast/table/max-width-integer-overflow-expected.png (Binary files differ) Modified: trunk/LayoutTests/platform/mac/fast/table/max-width-integer-overflow-expected.txt (55 => 56) --- trunk/LayoutTests/platform/mac/fast/table/max-width-integer-overflow-expected.txt 2012-03-19 06:16:44 UTC (rev 55) +++ trunk/LayoutTests/platform/mac/fast/table/max-width-integer-overflow-expected.txt 2012-03-19 06:37:54 UTC (rev 56) @@ -6,16 +6,16 @@ RenderTable {TABLE} at (0,0) size 780x24 [bgcolor=#FF] RenderTableSection {TBODY} at (0,0) size 780x24 RenderTableRow {TR} at (0,0) size 780x24 -RenderTableCell {TD} at (0,0) size 770x24 [r=0 c=0 rs=1 cs=1] - RenderTable {TABLE} at (0,0) size 770x24 -RenderTableSection {TBODY} at (0,0) size 770x24 - RenderTableRow {TR} at (0,0) size 770x24 -RenderTableCell {TD} at (0,0) size 770x24 [r=0 c=0 rs=1 cs=1] - RenderBlock {DIV} at (0,0) size 770x24 -RenderTable {TABLE} at (0,0) size 770x24 [bgcolor=#008000] - RenderTableSection {TBODY} at (0,0) size 770x24 -RenderTableRow {TR} at (0,2) size 770x20 - RenderTableCell {TD} at (2,11) size 762x2 [r=0 c=0 rs=1 cs=1] - RenderTableCell {TD} at (766,11) size 2x2 [r=0 c=1 rs=1 cs=1] -RenderTableCell {TD} at (770,0) size 10x24 [r=0 c=1 rs=1 cs=1] +RenderTableCell {TD} at (0,0) size 780x24 [r=0 c=0 rs=1 cs=1] + RenderTable {TABLE} at (0,0) size 780x24 +RenderTableSection {TBODY} at (0,0) size 780x24 + RenderTableRow {TR} at (0,0) size 780x24 +RenderTableCell {TD} at (0,0) size 780x24 [r=0 c=0 rs=1 cs=1] + RenderBlock {DIV} at (0,0) size 780x24 +RenderTable {TABLE} at (0,0) size 780x24 [bgcolor=#008000] + RenderTableSection {TBODY} at (0,0) size 780x24 +RenderTableRow {TR} at (0,2) size 780x20 + RenderTableCell {TD} at (2,11) size 772x2 [r=0 c=0 rs=1 cs=1] + RenderTableCell {TD} at (776,11) size 2x2 [r=0 c=1 rs=1 cs=1] +RenderTableCell {TD} at (780,0) size 10x24 [r=0 c=1 rs=1 cs=1] RenderBlock {DIV} at (0,0) size 10x24 [bgcolor=#008000] Modified: trunk/Source/WebCore/ChangeLog (55 => 56) --- trunk/Source/WebCore/ChangeLog 2012-03-19 06:16:44 UTC (rev 55) +++ trunk/Source/WebCore/ChangeLog 2012-03-19 06:37:54 UTC (rev 56) @@ -1,3 +1,24 @@ +2012-03-18 Luke Macpherson + +Remove remnants of code that assume Lengths are 28 bit integers. +https://bugs.webkit.org/show_bug.cgi
[webkit-changes] [110985] trunk/Source/WebCore
Title: [110985] trunk/Source/WebCore Revision 110985 Author macpher...@chromium.org Date 2012-03-16 04:25:54 -0700 (Fri, 16 Mar 2012) Log Message Implement cast between CSSPrimitiveValue and LineClampValue. https://bugs.webkit.org/show_bug.cgi?id=76806 Reviewed by Andreas Kling. Covered by many existing LayoutTests. This simplifies code in CSSStyleSelector and future mapping to CSSStyleApplyProperty. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator LineClampValue): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (110984 => 110985) --- trunk/Source/WebCore/ChangeLog 2012-03-16 11:03:23 UTC (rev 110984) +++ trunk/Source/WebCore/ChangeLog 2012-03-16 11:25:54 UTC (rev 110985) @@ -1,3 +1,20 @@ +2012-03-16 Luke Macpherson + +Implement cast between CSSPrimitiveValue and LineClampValue. +https://bugs.webkit.org/show_bug.cgi?id=76806 + +Reviewed by Andreas Kling. + +Covered by many existing LayoutTests. + +This simplifies code in CSSStyleSelector and future mapping to CSSStyleApplyProperty. + +* css/CSSPrimitiveValueMappings.h: +(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): +(WebCore::CSSPrimitiveValue::operator LineClampValue): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::applyProperty): + 2012-03-16 Nat Duca [chromium] Bump textureUpdatesPerFrame to 32 to favor updating the screen over jank prevention Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (110984 => 110985) --- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2012-03-16 11:03:23 UTC (rev 110984) +++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2012-03-16 11:25:54 UTC (rev 110985) @@ -37,6 +37,7 @@ #include "FontSmoothingMode.h" #include "GraphicsTypes.h" #include "Length.h" +#include "LineClampValue.h" #include "Path.h" #include "RenderStyleConstants.h" #include "SVGRenderStyleDefs.h" @@ -121,6 +122,25 @@ return 0.0f; } +template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineClampValue i) +: CSSValue(PrimitiveClass) +{ +m_primitiveUnitType = i.isPercentage() ? CSS_PERCENTAGE : CSS_NUMBER; +m_value.num = static_cast(i.value()); +} + +template<> inline CSSPrimitiveValue::operator LineClampValue() const +{ +if (m_primitiveUnitType == CSS_NUMBER) +return LineClampValue(clampTo(m_value.num), LineClampLineCount); + +if (m_primitiveUnitType == CSS_PERCENTAGE) +return LineClampValue(clampTo(m_value.num), LineClampPercentage); + +ASSERT_NOT_REACHED(); +return LineClampValue(); +} + template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ColumnSpan columnSpan) : CSSValue(PrimitiveClass) { Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (110984 => 110985) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-16 11:03:23 UTC (rev 110984) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-16 11:25:54 UTC (rev 110985) @@ -3466,16 +3466,9 @@ } return; } -case CSSPropertyWebkitLineClamp: { -HANDLE_INHERIT_AND_INITIAL(lineClamp, LineClamp) -if (!primitiveValue) -return; -if (primitiveValue->isNumber()) -m_style->setLineClamp(LineClampValue(primitiveValue->getIntValue(CSSPrimitiveValue::CSS_NUMBER), LineClampLineCount)); -else if (primitiveValue->isPercentage()) -m_style->setLineClamp(LineClampValue(primitiveValue->getIntValue(CSSPrimitiveValue::CSS_PERCENTAGE), LineClampPercentage)); +case CSSPropertyWebkitLineClamp: +HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(lineClamp, LineClamp) return; -} case CSSPropertyWebkitLocale: { HANDLE_INHERIT_AND_INITIAL(locale, Locale); if (primitiveValue->getIdent() == CSSValueAuto) ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [110662] trunk/Source/WebCore
Title: [110662] trunk/Source/WebCore Revision 110662 Author macpher...@chromium.org Date 2012-03-13 20:19:02 -0700 (Tue, 13 Mar 2012) Log Message Move opacity clamping into RenderStyle setter. https://bugs.webkit.org/show_bug.cgi?id=76966 Reviewed by Eric Seidel. Covered by existing tests. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/style/RenderStyle.h: (WebCore::RenderStyleBitfields::setOpacity): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleSelector.cpp trunk/Source/WebCore/rendering/style/RenderStyle.h Diff Modified: trunk/Source/WebCore/ChangeLog (110661 => 110662) --- trunk/Source/WebCore/ChangeLog 2012-03-14 02:54:58 UTC (rev 110661) +++ trunk/Source/WebCore/ChangeLog 2012-03-14 03:19:02 UTC (rev 110662) @@ -1,3 +1,17 @@ +2012-03-13 Luke Macpherson + +Move opacity clamping into RenderStyle setter. +https://bugs.webkit.org/show_bug.cgi?id=76966 + +Reviewed by Eric Seidel. + +Covered by existing tests. + +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::applyProperty): +* rendering/style/RenderStyle.h: +(WebCore::RenderStyleBitfields::setOpacity): + 2012-03-12 Igor Oliveira Split the extra logic out of RenderObjectChildList::updateBeforeAfterContent Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (110661 => 110662) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-14 02:54:58 UTC (rev 110661) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-14 03:19:02 UTC (rev 110662) @@ -3387,11 +3387,7 @@ return; } case CSSPropertyOpacity: -HANDLE_INHERIT_AND_INITIAL(opacity, Opacity) -if (!primitiveValue || !primitiveValue->isNumber()) -return; // Error case. -// Clamp opacity to the range 0-1 -m_style->setOpacity(clampTo(primitiveValue->getDoubleValue(), 0, 1)); +HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(opacity, Opacity) return; case CSSPropertySrc: // Only used in @font-face rules. return; Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (110661 => 110662) --- trunk/Source/WebCore/rendering/style/RenderStyle.h 2012-03-14 02:54:58 UTC (rev 110661) +++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2012-03-14 03:19:02 UTC (rev 110662) @@ -1224,7 +1224,7 @@ void setTextStrokeWidth(float w) { SET_VAR(rareInheritedData, textStrokeWidth, w) } void setTextFillColor(const Color& c) { SET_VAR(rareInheritedData, textFillColor, c) } void setColorSpace(ColorSpace space) { SET_VAR(rareInheritedData, colorSpace, space) } -void setOpacity(float f) { SET_VAR(rareNonInheritedData, opacity, f); } +void setOpacity(float f) { float v = clampTo(f, 0, 1); SET_VAR(rareNonInheritedData, opacity, v); } void setAppearance(ControlPart a) { SET_VAR(rareNonInheritedData, m_appearance, a); } // For valid values of box-align see http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/#alignment void setBoxAlign(EBoxAlignment a) { SET_VAR(rareNonInheritedData.access()->m_deprecatedFlexibleBox, align, a); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [110544] trunk/Source/WebCore
Title: [110544] trunk/Source/WebCore Revision 110544 Author macpher...@chromium.org Date 2012-03-13 01:12:12 -0700 (Tue, 13 Mar 2012) Log Message Implement CSSPropertyTextOverflow in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=80934 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (110543 => 110544) --- trunk/Source/WebCore/ChangeLog 2012-03-13 07:28:46 UTC (rev 110543) +++ trunk/Source/WebCore/ChangeLog 2012-03-13 08:12:12 UTC (rev 110544) @@ -1,3 +1,17 @@ +2012-03-13 Luke Macpherson + +Implement CSSPropertyTextOverflow in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=80934 + +Reviewed by Andreas Kling. + +No new tests / refactoring only. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): + 2012-03-12 Matt Falkenhagen Switch Chromium from LocaleToScriptMappingICU.cpp to LocaleToScriptMappingDefault.cpp Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (110543 => 110544) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-13 07:28:46 UTC (rev 110543) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-13 08:12:12 UTC (rev 110544) @@ -1834,6 +1834,7 @@ setPropertyHandler(CSSPropertyTextAlign, ApplyPropertyTextAlign::createHandler()); setPropertyHandler(CSSPropertyTextDecoration, ApplyPropertyTextDecoration::createHandler()); setPropertyHandler(CSSPropertyTextIndent, ApplyPropertyLength<&RenderStyle::textIndent, &RenderStyle::setTextIndent, &RenderStyle::initialTextIndent>::createHandler()); +setPropertyHandler(CSSPropertyTextOverflow, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyTextRendering, ApplyPropertyFont::createHandler()); setPropertyHandler(CSSPropertyTextTransform, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyTop, ApplyPropertyLength<&RenderStyle::top, &RenderStyle::setTop, &RenderStyle::initialOffset, AutoEnabled>::createHandler()); Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (110543 => 110544) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-13 07:28:46 UTC (rev 110543) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-13 08:12:12 UTC (rev 110544) @@ -3470,12 +3470,6 @@ } return; } -case CSSPropertyTextOverflow: { -// This property is supported by WinIE, and so we leave off the "-webkit-" in order to -// work with WinIE-specific pages that use the property. -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(textOverflow, TextOverflow) -return; -} case CSSPropertyWebkitLineClamp: { HANDLE_INHERIT_AND_INITIAL(lineClamp, LineClamp) if (!primitiveValue) @@ -3927,6 +3921,7 @@ case CSSPropertyTextAlign: case CSSPropertyTextDecoration: case CSSPropertyTextIndent: +case CSSPropertyTextOverflow: case CSSPropertyTextRendering: case CSSPropertyTextTransform: case CSSPropertyTop: ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [110484] trunk/Source/WebCore
Title: [110484] trunk/Source/WebCore Revision 110484 Author macpher...@chromium.org Date 2012-03-12 14:54:35 -0700 (Mon, 12 Mar 2012) Log Message Remove CSSStyleSelector's convertToLength method and use CSSPrimitiveValue's version directly. https://bugs.webkit.org/show_bug.cgi?id=80484 Reviewed by Julien Chaffraix. No new tests / code cleanup only. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::convertToLength): * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyClip::convertToLength): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (110483 => 110484) --- trunk/Source/WebCore/ChangeLog 2012-03-12 21:52:14 UTC (rev 110483) +++ trunk/Source/WebCore/ChangeLog 2012-03-12 21:54:35 UTC (rev 110484) @@ -1,3 +1,19 @@ +2012-03-12 Luke Macpherson + +Remove CSSStyleSelector's convertToLength method and use CSSPrimitiveValue's version directly. +https://bugs.webkit.org/show_bug.cgi?id=80484 + +Reviewed by Julien Chaffraix. + +No new tests / code cleanup only. + +* css/CSSPrimitiveValueMappings.h: +(WebCore::CSSPrimitiveValue::convertToLength): +* css/CSSStyleApplyProperty.cpp: +(WebCore::ApplyPropertyClip::convertToLength): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): + 2012-03-12 Stephen White [chromium] Restore canvas2D acceleration after context loss. Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (110483 => 110484) --- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2012-03-12 21:52:14 UTC (rev 110483) +++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2012-03-12 21:54:35 UTC (rev 110484) @@ -3710,18 +3710,28 @@ } } -enum LengthConversion { UnsupportedConversion = 0, FixedConversion = 1, AutoConversion = 2, PercentConversion = 4, FractionConversion = 8}; +enum LengthConversion { +FixedIntegerConversion = 1 << 0, +FixedFloatConversion = 1 << 1, +AutoConversion = 1 << 2, +PercentConversion = 1 << 3, +FractionConversion = 1 << 4 +}; + template Length CSSPrimitiveValue::convertToLength(RenderStyle* style, RenderStyle* rootStyle, double multiplier, bool computingFontSize) { -if ((supported & FixedConversion) && isLength()) +if (((supported & FixedIntegerConversion) || (supported & FixedFloatConversion)) && isFontRelativeLength() && (!style || !rootStyle)) +return Length(Undefined); +if ((supported & FixedIntegerConversion) && isLength()) return computeLength(style, rootStyle, multiplier, computingFontSize); +if ((supported & FixedFloatConversion) && isLength()) +return Length(computeLength(style, rootStyle, multiplier), Fixed); if ((supported & PercentConversion) && isPercentage()) return Length(getDoubleValue(), Percent); if ((supported & FractionConversion) && isNumber()) return Length(getDoubleValue() * 100.0, Percent); if ((supported & AutoConversion) && getIdent() == CSSValueAuto) return Length(Auto); -ASSERT_NOT_REACHED(); return Length(Undefined); } Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (110483 => 110484) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-12 21:52:14 UTC (rev 110483) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-12 21:54:35 UTC (rev 110484) @@ -221,7 +221,7 @@ private: static Length convertToLength(CSSStyleSelector* selector, CSSPrimitiveValue* value) { -return value->convertToLength(selector->style(), selector->rootElementStyle(), selector->style()->effectiveZoom()); +return value->convertToLength(selector->style(), selector->rootElementStyle(), selector->style()->effectiveZoom()); } public: static void applyInheritValue(CSSStyleSelector* selector) Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (110483 => 110484) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-12 21:52:14 UTC (rev 110483) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-12 21:54:35 UTC (rev 110484) @@ -2528,40 +2528,14 @@ // - // this is mostly boring stuff on how to apply a certain rule to the renderstyle... -static Length convertToLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, bool toFloat, double multiplier = 1) -{ -// This function is tolerant of a null style value. The only
[webkit-changes] [109964] trunk/Source/WebCore
Title: [109964] trunk/Source/WebCore Revision 109964 Author macpher...@chromium.org Date 2012-03-06 15:06:51 -0800 (Tue, 06 Mar 2012) Log Message Make CSSStyleSelector::convertToLength() behave more like CSSPrimitiveValue::convertToLength(). https://bugs.webkit.org/show_bug.cgi?id=80375 Reviewed by Eric Seidel. No new tests / cleanup only. This patch removes the bool* ok parameter from CSSStyleSelector's convertToLength, and instead uses the recently added Length(Undefined) value to indicate failure. This paves the way for a future patch that will call primitiveValue->convertToLength directly. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (109963 => 109964) --- trunk/Source/WebCore/ChangeLog 2012-03-06 22:52:33 UTC (rev 109963) +++ trunk/Source/WebCore/ChangeLog 2012-03-06 23:06:51 UTC (rev 109964) @@ -1,3 +1,19 @@ +2012-03-06 Luke Macpherson + +Make CSSStyleSelector::convertToLength() behave more like CSSPrimitiveValue::convertToLength(). +https://bugs.webkit.org/show_bug.cgi?id=80375 + +Reviewed by Eric Seidel. + +No new tests / cleanup only. + +This patch removes the bool* ok parameter from CSSStyleSelector's convertToLength, +and instead uses the recently added Length(Undefined) value to indicate failure. +This paves the way for a future patch that will call primitiveValue->convertToLength directly. + +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): + 2012-03-06 Raymes Khoury Add state variable and ASSERTs to DocumentWriter to help track down Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (109963 => 109964) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-06 22:52:33 UTC (rev 109963) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-06 23:06:51 UTC (rev 109964) @@ -2521,19 +2521,17 @@ // - // this is mostly boring stuff on how to apply a certain rule to the renderstyle... -static Length convertToLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, bool toFloat, double multiplier = 1, bool *ok = 0) +static Length convertToLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, bool toFloat, double multiplier = 1) { // This function is tolerant of a null style value. The only place style is used is in // length measurements, like 'ems' and 'px'. And in those cases style is only used // when the units are EMS or EXS. So we will just fail in those cases. Length l; if (!primitiveValue) { -if (ok) -*ok = false; +l = Length(Undefined); } else { if (!style && primitiveValue->isFontRelativeLength()) { -if (ok) -*ok = false; +l = Length(Undefined); } else if (primitiveValue->isLength()) { if (toFloat) l = Length(primitiveValue->computeLength(style, rootStyle, multiplier), Fixed); @@ -2543,20 +2541,20 @@ l = Length(primitiveValue->getDoubleValue(), Percent); else if (primitiveValue->isNumber()) l = Length(primitiveValue->getDoubleValue() * 100.0, Percent); -else if (ok) -*ok = false; +else +l = Length(Undefined); } return l; } -static Length convertToIntLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier = 1, bool *ok = 0) +static Length convertToIntLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier = 1) { -return convertToLength(primitiveValue, style, rootStyle, false, multiplier, ok); +return convertToLength(primitiveValue, style, rootStyle, false, multiplier); } -static Length convertToFloatLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier = 1, bool *ok = 0) +static Length convertToFloatLength(CSSPrimitiveValue* primitiveValue, RenderStyle* style, RenderStyle* rootStyle, double multiplier = 1) { -return convertToLength(primitiveValue, style, rootStyle, true, multiplier, ok); +return convertToLength(primitiveValue, style, rootStyle, true, multiplier); } template @@ -3482,9 +3480,8 @@ break; } } else { -bool ok = true; -Length marqueeLength = convertToIntLength(primitiveValue, style(), m_rootElementStyle, 1, &ok); -if (ok) +Length marqueeLength = convertToIntLength(primitiveValue, style(), m_rootElementStyle, 1); +if (!ma
[webkit-changes] [109706] trunk/Source/WebCore
Title: [109706] trunk/Source/WebCore Revision 109706 Author macpher...@chromium.org Date 2012-03-04 22:57:40 -0800 (Sun, 04 Mar 2012) Log Message Remove unused macro HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE. https://bugs.webkit.org/show_bug.cgi?id=80236 Reviewed by Eric Seidel. No new tests / unused code deletion only. * css/CSSStyleSelector.cpp: (WebCore): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (109705 => 109706) --- trunk/Source/WebCore/ChangeLog 2012-03-05 06:52:44 UTC (rev 109705) +++ trunk/Source/WebCore/ChangeLog 2012-03-05 06:57:40 UTC (rev 109706) @@ -1,3 +1,15 @@ +2012-03-04 Luke Macpherson + +Remove unused macro HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE. +https://bugs.webkit.org/show_bug.cgi?id=80236 + +Reviewed by Eric Seidel. + +No new tests / unused code deletion only. + +* css/CSSStyleSelector.cpp: +(WebCore): + 2012-03-04 Filip Pizlo JIT heuristics should be hyperbolic Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (109705 => 109706) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-05 06:52:44 UTC (rev 109705) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-05 06:57:40 UTC (rev 109706) @@ -169,11 +169,6 @@ if (primitiveValue) \ m_style->set##Prop(*primitiveValue); -#define HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(prop, Prop, Value) \ -HANDLE_INHERIT_AND_INITIAL_WITH_VALUE(prop, Prop, Value) \ -if (primitiveValue) \ -m_style->set##Prop(*primitiveValue); - class RuleData { public: RuleData(StyleRule*, CSSSelector*, unsigned position, bool canUseFastCheckSelector, bool inRegionRule); ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [109699] trunk/Source/WebCore
Title: [109699] trunk/Source/WebCore Revision 109699 Author macpher...@chromium.org Date 2012-03-04 19:38:58 -0800 (Sun, 04 Mar 2012) Log Message Handle CSSPropertyWebkitColumnBreakAfter, CSSPropertyWebkitColumnBreakBefore and CSSPropertyWebkitColumnBreakInside in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=80226 Reviewed by Eric Seidel. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (109698 => 109699) --- trunk/Source/WebCore/ChangeLog 2012-03-05 03:29:28 UTC (rev 109698) +++ trunk/Source/WebCore/ChangeLog 2012-03-05 03:38:58 UTC (rev 109699) @@ -1,3 +1,17 @@ +2012-03-04 Luke Macpherson + +Handle CSSPropertyWebkitColumnBreakAfter, CSSPropertyWebkitColumnBreakBefore and CSSPropertyWebkitColumnBreakInside in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=80226 + +Reviewed by Eric Seidel. + +No new tests / refactoring only. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): + 2012-03-04 Jonathan Dong [BlackBerry] Credential backing store implementation Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (109698 => 109699) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-05 03:29:28 UTC (rev 109698) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-05 03:38:58 UTC (rev 109699) @@ -1839,6 +1839,9 @@ setPropertyHandler(CSSPropertyWebkitBoxPack, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitColorCorrection, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitColumnAxis, ApplyPropertyDefault::createHandler()); +setPropertyHandler(CSSPropertyWebkitColumnBreakAfter, ApplyPropertyDefault::createHandler()); +setPropertyHandler(CSSPropertyWebkitColumnBreakBefore, ApplyPropertyDefault::createHandler()); +setPropertyHandler(CSSPropertyWebkitColumnBreakInside, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitColumnCount, ApplyPropertyAuto::createHandler()); setPropertyHandler(CSSPropertyWebkitColumnGap, ApplyPropertyAuto::createHandler()); setPropertyHandler(CSSPropertyWebkitColumnRuleColor, ApplyPropertyColor::createHandler()); Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (109698 => 109699) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-05 03:29:28 UTC (rev 109698) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-05 03:38:58 UTC (rev 109699) @@ -3418,15 +3418,6 @@ return; case CSSPropertyUnicodeRange: // Only used in @font-face rules. return; -case CSSPropertyWebkitColumnBreakBefore: -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(columnBreakBefore, ColumnBreakBefore, PageBreak) -return; -case CSSPropertyWebkitColumnBreakAfter: -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(columnBreakAfter, ColumnBreakAfter, PageBreak) -return; -case CSSPropertyWebkitColumnBreakInside: -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(columnBreakInside, ColumnBreakInside, PageBreak) -return; case CSSPropertyWebkitColumnRule: if (isInherit) { m_style->setColumnRuleColor(m_parentStyle->columnRuleColor().isValid() ? m_parentStyle->columnRuleColor() : m_parentStyle->color()); @@ -3983,6 +3974,9 @@ case CSSPropertyWebkitBoxPack: case CSSPropertyWebkitColorCorrection: case CSSPropertyWebkitColumnAxis: +case CSSPropertyWebkitColumnBreakAfter: +case CSSPropertyWebkitColumnBreakBefore: +case CSSPropertyWebkitColumnBreakInside: case CSSPropertyWebkitColumnCount: case CSSPropertyWebkitColumnGap: case CSSPropertyWebkitColumnRuleColor: ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [109541] trunk/Source/WebCore
Title: [109541] trunk/Source/WebCore Revision 109541 Author macpher...@chromium.org Date 2012-03-02 02:40:42 -0800 (Fri, 02 Mar 2012) Log Message Handle CSSPropertyWebkitColumnRuleStyle in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=80085 Reviewed by Eric Seidel. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (109540 => 109541) --- trunk/Source/WebCore/ChangeLog 2012-03-02 10:39:04 UTC (rev 109540) +++ trunk/Source/WebCore/ChangeLog 2012-03-02 10:40:42 UTC (rev 109541) @@ -1,3 +1,17 @@ +2012-03-02 Luke Macpherson + +Handle CSSPropertyWebkitColumnRuleStyle in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=80085 + +Reviewed by Eric Seidel. + +No new tests / refactoring only. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): + 2012-03-02 Yury Semikhatsky Web Inspector: enable Timeline panel for workers Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (109540 => 109541) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-02 10:39:04 UTC (rev 109540) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-02 10:40:42 UTC (rev 109541) @@ -1833,6 +1833,7 @@ setPropertyHandler(CSSPropertyWebkitColumnRuleWidth, ApplyPropertyComputeLength::createHandler()); setPropertyHandler(CSSPropertyWebkitColumns, ApplyPropertyExpanding::createHandler()); setPropertyHandler(CSSPropertyWebkitColumnSpan, ApplyPropertyDefault::createHandler()); +setPropertyHandler(CSSPropertyWebkitColumnRuleStyle, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitColumnWidth, ApplyPropertyAuto::createHandler()); setPropertyHandler(CSSPropertyWebkitFlexAlign, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitFlexDirection, ApplyPropertyDefault::createHandler()); Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (109540 => 109541) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-02 10:39:04 UTC (rev 109540) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-02 10:40:42 UTC (rev 109541) @@ -3389,9 +3389,6 @@ return; case CSSPropertyUnicodeRange: // Only used in @font-face rules. return; -case CSSPropertyWebkitColumnRuleStyle: -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(columnRuleStyle, ColumnRuleStyle, BorderStyle) -return; case CSSPropertyWebkitColumnBreakBefore: HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(columnBreakBefore, ColumnBreakBefore, PageBreak) return; @@ -3960,6 +3957,7 @@ case CSSPropertyWebkitColumnCount: case CSSPropertyWebkitColumnGap: case CSSPropertyWebkitColumnRuleColor: +case CSSPropertyWebkitColumnRuleStyle: case CSSPropertyWebkitColumnRuleWidth: case CSSPropertyWebkitColumns: case CSSPropertyWebkitColumnSpan: ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [109530] trunk/Source/WebCore
Title: [109530] trunk/Source/WebCore Revision 109530 Author macpher...@chromium.org Date 2012-03-02 01:22:37 -0800 (Fri, 02 Mar 2012) Log Message Handle CSSPropertyWebkitRegionBreakAfter, CSSPropertyWebkitRegionBreakBefore and CSSPropertyWebkitRegionBreakInside in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=80066 Reviewed by Eric Seidel. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (109529 => 109530) --- trunk/Source/WebCore/ChangeLog 2012-03-02 09:20:39 UTC (rev 109529) +++ trunk/Source/WebCore/ChangeLog 2012-03-02 09:22:37 UTC (rev 109530) @@ -1,3 +1,17 @@ +2012-03-02 Luke Macpherson + +Handle CSSPropertyWebkitRegionBreakAfter, CSSPropertyWebkitRegionBreakBefore and CSSPropertyWebkitRegionBreakInside in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=80066 + +Reviewed by Eric Seidel. + +No new tests / refactoring only. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): + 2012-03-02 Pablo Flouret Implement DefaultParagraphSeparator execCommand, to let authors choose the default block element Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (109529 => 109530) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-02 09:20:39 UTC (rev 109529) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-02 09:22:37 UTC (rev 109530) @@ -1887,6 +1887,9 @@ setPropertyHandler(CSSPropertyWebkitPerspectiveOriginX, ApplyPropertyLength<&RenderStyle::perspectiveOriginX, &RenderStyle::setPerspectiveOriginX, &RenderStyle::initialPerspectiveOriginX>::createHandler()); setPropertyHandler(CSSPropertyWebkitPerspectiveOriginY, ApplyPropertyLength<&RenderStyle::perspectiveOriginY, &RenderStyle::setPerspectiveOriginY, &RenderStyle::initialPerspectiveOriginY>::createHandler()); setPropertyHandler(CSSPropertyWebkitPrintColorAdjust, ApplyPropertyDefault::createHandler()); +setPropertyHandler(CSSPropertyWebkitRegionBreakAfter, ApplyPropertyDefault::createHandler()); +setPropertyHandler(CSSPropertyWebkitRegionBreakBefore, ApplyPropertyDefault::createHandler()); +setPropertyHandler(CSSPropertyWebkitRegionBreakInside, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitRegionOverflow, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitRtlOrdering, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitTextCombine, ApplyPropertyDefault::createHandler()); Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (109529 => 109530) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-02 09:20:39 UTC (rev 109529) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-02 09:22:37 UTC (rev 109530) @@ -3410,15 +3410,6 @@ else if (isInitial) m_style->resetColumnRule(); return; -case CSSPropertyWebkitRegionBreakBefore: -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(regionBreakBefore, RegionBreakBefore, PageBreak) -return; -case CSSPropertyWebkitRegionBreakAfter: -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(regionBreakAfter, RegionBreakAfter, PageBreak) -return; -case CSSPropertyWebkitRegionBreakInside: -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(regionBreakInside, RegionBreakInside, PageBreak) -return; case CSSPropertyWebkitMarquee: if (!m_parentNode || !value->isInheritedValue()) return; @@ -4021,6 +4012,9 @@ case CSSPropertyWebkitPerspectiveOriginX: case CSSPropertyWebkitPerspectiveOriginY: case CSSPropertyWebkitPrintColorAdjust: +case CSSPropertyWebkitRegionBreakAfter: +case CSSPropertyWebkitRegionBreakBefore: +case CSSPropertyWebkitRegionBreakInside: case CSSPropertyWebkitRegionOverflow: case CSSPropertyWebkitRtlOrdering: case CSSPropertyWebkitTextCombine: ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [109525] trunk/Source/WebCore
Title: [109525] trunk/Source/WebCore Revision 109525 Author macpher...@chromium.org Date 2012-03-02 00:50:08 -0800 (Fri, 02 Mar 2012) Log Message Handle CSSPropertyWebkitColorCorrection in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=80056 Reviewed by Eric Seidel. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (109524 => 109525) --- trunk/Source/WebCore/ChangeLog 2012-03-02 08:33:36 UTC (rev 109524) +++ trunk/Source/WebCore/ChangeLog 2012-03-02 08:50:08 UTC (rev 109525) @@ -1,3 +1,17 @@ +2012-03-02 Luke Macpherson + +Handle CSSPropertyWebkitColorCorrection in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=80056 + +Reviewed by Eric Seidel. + +No new tests / refactoring only. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): + 2012-03-02 John Bauman [chromium] Send didCommitAndDrawFrame after swap Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (109524 => 109525) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-02 08:33:36 UTC (rev 109524) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-02 08:50:08 UTC (rev 109525) @@ -1825,6 +1825,7 @@ setPropertyHandler(CSSPropertyWebkitBoxOrdinalGroup, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitBoxOrient, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitBoxPack, ApplyPropertyDefault::createHandler()); +setPropertyHandler(CSSPropertyWebkitColorCorrection, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitColumnAxis, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitColumnCount, ApplyPropertyAuto::createHandler()); setPropertyHandler(CSSPropertyWebkitColumnGap, ApplyPropertyAuto::createHandler()); Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (109524 => 109525) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-02 08:33:36 UTC (rev 109524) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-02 08:50:08 UTC (rev 109525) @@ -3644,9 +3644,6 @@ return; } #endif -case CSSPropertyWebkitColorCorrection: -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(colorSpace, ColorSpace); -return; case CSSPropertyInvalid: return; // Directional properties are resolved by resolveDirectionAwareProperty() before the switch. @@ -3967,6 +3964,7 @@ case CSSPropertyWebkitBoxOrdinalGroup: case CSSPropertyWebkitBoxOrient: case CSSPropertyWebkitBoxPack: +case CSSPropertyWebkitColorCorrection: case CSSPropertyWebkitColumnAxis: case CSSPropertyWebkitColumnCount: case CSSPropertyWebkitColumnGap: ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [109488] trunk/Source/WebCore
Title: [109488] trunk/Source/WebCore Revision 109488 Author macpher...@chromium.org Date 2012-03-01 19:18:41 -0800 (Thu, 01 Mar 2012) Log Message Handle CSSPropertyWebkitBorderFit in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=79998 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (109487 => 109488) --- trunk/Source/WebCore/ChangeLog 2012-03-02 03:17:41 UTC (rev 109487) +++ trunk/Source/WebCore/ChangeLog 2012-03-02 03:18:41 UTC (rev 109488) @@ -1,3 +1,17 @@ +2012-03-01 Luke Macpherson + +Handle CSSPropertyWebkitBorderFit in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=79998 + +Reviewed by Andreas Kling. + +No new tests / refactoring only. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): + 2012-03-01 Anders Carlsson Crash when doing repeated double-tap-to-zoom gesture on apple startpage Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (109487 => 109488) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-02 03:17:41 UTC (rev 109487) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-02 03:18:41 UTC (rev 109488) @@ -1812,6 +1812,7 @@ setPropertyHandler(CSSPropertyWebkitBackgroundComposite, ApplyPropertyFillLayer::createHandler()); setPropertyHandler(CSSPropertyWebkitBackgroundOrigin, CSSPropertyBackgroundOrigin); setPropertyHandler(CSSPropertyWebkitBackgroundSize, CSSPropertyBackgroundSize); +setPropertyHandler(CSSPropertyWebkitBorderFit, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitBorderHorizontalSpacing, ApplyPropertyComputeLength::createHandler()); setPropertyHandler(CSSPropertyWebkitBorderImage, ApplyPropertyBorderImage::createHandler()); setPropertyHandler(CSSPropertyWebkitBorderRadius, CSSPropertyBorderRadius); Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (109487 => 109488) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-02 03:17:41 UTC (rev 109487) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-02 03:18:41 UTC (rev 109488) @@ -3511,9 +3511,6 @@ setFontDescription(fontDescription); return; } -case CSSPropertyWebkitBorderFit: -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(borderFit, BorderFit); -return; case CSSPropertyWebkitTextSizeAdjust: { HANDLE_INHERIT_AND_INITIAL(textSizeAdjust, TextSizeAdjust) if (!primitiveValue || !primitiveValue->getIdent()) @@ -3957,6 +3954,7 @@ case CSSPropertyWebkitBackgroundComposite: case CSSPropertyWebkitBackgroundOrigin: case CSSPropertyWebkitBackgroundSize: +case CSSPropertyWebkitBorderFit: case CSSPropertyWebkitBorderHorizontalSpacing: case CSSPropertyWebkitBorderImage: case CSSPropertyWebkitBorderRadius: ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [109472] trunk/Source/WebCore
Title: [109472] trunk/Source/WebCore Revision 109472 Author macpher...@chromium.org Date 2012-03-01 17:44:51 -0800 (Thu, 01 Mar 2012) Log Message Handle CSSPropertyBoxSizing in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=80001 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (109471 => 109472) --- trunk/Source/WebCore/ChangeLog 2012-03-02 01:26:49 UTC (rev 109471) +++ trunk/Source/WebCore/ChangeLog 2012-03-02 01:44:51 UTC (rev 109472) @@ -1,3 +1,17 @@ +2012-03-01 Luke Macpherson + +Handle CSSPropertyBoxSizing in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=80001 + +Reviewed by Andreas Kling. + +No new tests / refactoring only. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): + 2012-03-01 James Robinson [chromium] LayerChromium::contentChanged is redundant with setNeedsDisplay Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (109471 => 109472) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-02 01:26:49 UTC (rev 109471) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-02 01:44:51 UTC (rev 109472) @@ -1731,6 +1731,7 @@ setPropertyHandler(CSSPropertyBorderTopWidth, ApplyPropertyComputeLength::createHandler()); setPropertyHandler(CSSPropertyBorderWidth, ApplyPropertyExpanding::createHandler()); setPropertyHandler(CSSPropertyBottom, ApplyPropertyLength<&RenderStyle::bottom, &RenderStyle::setBottom, &RenderStyle::initialOffset, AutoEnabled>::createHandler()); +setPropertyHandler(CSSPropertyBoxSizing, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyCaptionSide, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyClear, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyClip, ApplyPropertyClip::createHandler()); Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (109471 => 109472) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-02 01:26:49 UTC (rev 109471) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-02 01:44:51 UTC (rev 109472) @@ -3389,9 +3389,6 @@ return; case CSSPropertyUnicodeRange: // Only used in @font-face rules. return; -case CSSPropertyBoxSizing: -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(boxSizing, BoxSizing); -return; case CSSPropertyWebkitColumnRuleStyle: HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(columnRuleStyle, ColumnRuleStyle, BorderStyle) return; @@ -3879,6 +3876,7 @@ case CSSPropertyBorderTopWidth: case CSSPropertyBorderWidth: case CSSPropertyBottom: +case CSSPropertyBoxSizing: case CSSPropertyCaptionSide: case CSSPropertyClear: case CSSPropertyClip: ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [109450] trunk/Source/WebCore
Title: [109450] trunk/Source/WebCore Revision 109450 Author macpher...@chromium.org Date 2012-03-01 15:33:09 -0800 (Thu, 01 Mar 2012) Log Message Implement CSSPropertyImageRendering in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=79855 Reviewed by Eric Seidel. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (109449 => 109450) --- trunk/Source/WebCore/ChangeLog 2012-03-01 23:31:10 UTC (rev 109449) +++ trunk/Source/WebCore/ChangeLog 2012-03-01 23:33:09 UTC (rev 109450) @@ -1,3 +1,17 @@ +2012-03-01 Luke Macpherson + +Implement CSSPropertyImageRendering in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=79855 + +Reviewed by Eric Seidel. + +No new tests / refactoring only. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): + 2012-03-01 Alok Priyadarshi [chromium] Partial texture updates not happening with accelerated painting path Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (109449 => 109450) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-01 23:31:10 UTC (rev 109449) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-01 23:33:09 UTC (rev 109450) @@ -1747,6 +1747,7 @@ setPropertyHandler(CSSPropertyFontVariant, ApplyPropertyFont::createHandler()); setPropertyHandler(CSSPropertyFontWeight, ApplyPropertyFontWeight::createHandler()); setPropertyHandler(CSSPropertyHeight, ApplyPropertyLength<&RenderStyle::height, &RenderStyle::setHeight, &RenderStyle::initialSize, AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled, NoneDisabled, UndefinedDisabled, FlexHeight>::createHandler()); +setPropertyHandler(CSSPropertyImageRendering, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyLeft, ApplyPropertyLength<&RenderStyle::left, &RenderStyle::setLeft, &RenderStyle::initialOffset, AutoEnabled>::createHandler()); setPropertyHandler(CSSPropertyLetterSpacing, ApplyPropertyComputeLength::createHandler()); setPropertyHandler(CSSPropertyLineHeight, ApplyPropertyLineHeight::createHandler()); Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (109449 => 109450) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-01 23:31:10 UTC (rev 109449) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-01 23:33:09 UTC (rev 109450) @@ -3316,9 +3316,6 @@ return; // CSS3 Properties -case CSSPropertyImageRendering: -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(imageRendering, ImageRendering); -return; case CSSPropertyTextShadow: case CSSPropertyBoxShadow: case CSSPropertyWebkitBoxShadow: { @@ -3898,6 +3895,7 @@ case CSSPropertyFontVariant: case CSSPropertyFontWeight: case CSSPropertyHeight: +case CSSPropertyImageRendering: case CSSPropertyLeft: case CSSPropertyLetterSpacing: case CSSPropertyLineHeight: ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [109331] trunk/Source/WebCore
Title: [109331] trunk/Source/WebCore Revision 109331 Author macpher...@chromium.org Date 2012-03-01 03:43:31 -0800 (Thu, 01 Mar 2012) Log Message Handle CSSPropertyWebkitHyphens in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=80004 Reviewed by Eric Seidel. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (109330 => 109331) --- trunk/Source/WebCore/ChangeLog 2012-03-01 11:36:34 UTC (rev 109330) +++ trunk/Source/WebCore/ChangeLog 2012-03-01 11:43:31 UTC (rev 109331) @@ -1,3 +1,17 @@ +2012-03-01 Luke Macpherson + +Handle CSSPropertyWebkitHyphens in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=80004 + +Reviewed by Eric Seidel. + +No new tests / refactoring only. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): + 2012-02-29 Pavel Podivilov Web Inspector: abstract out the common pattern of creating auto-updated locations. Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (109330 => 109331) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-01 11:36:34 UTC (rev 109330) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-01 11:43:31 UTC (rev 109331) @@ -1847,6 +1847,7 @@ setPropertyHandler(CSSPropertyWebkitHyphenateLimitAfter, ApplyPropertyNumber::createHandler()); setPropertyHandler(CSSPropertyWebkitHyphenateLimitBefore, ApplyPropertyNumber::createHandler()); setPropertyHandler(CSSPropertyWebkitHyphenateLimitLines, ApplyPropertyNumber::createHandler()); +setPropertyHandler(CSSPropertyWebkitHyphens, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitLineAlign, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitLineBreak, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitLineGrid, ApplyPropertyString::createHandler()); Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (109330 => 109331) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-01 11:36:34 UTC (rev 109330) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-01 11:43:31 UTC (rev 109331) @@ -3493,9 +3493,6 @@ m_style->setLineClamp(LineClampValue(primitiveValue->getIntValue(CSSPrimitiveValue::CSS_PERCENTAGE), LineClampPercentage)); return; } -case CSSPropertyWebkitHyphens: -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(hyphens, Hyphens); -return; case CSSPropertyWebkitLocale: { HANDLE_INHERIT_AND_INITIAL(locale, Locale); if (primitiveValue->getIdent() == CSSValueAuto) @@ -3988,6 +3985,7 @@ case CSSPropertyWebkitHyphenateLimitAfter: case CSSPropertyWebkitHyphenateLimitBefore: case CSSPropertyWebkitHyphenateLimitLines: +case CSSPropertyWebkitHyphens: case CSSPropertyWebkitLineAlign: case CSSPropertyWebkitLineBreak: case CSSPropertyWebkitLineGrid: ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [109311] trunk/Source/WebCore
Title: [109311] trunk/Source/WebCore Revision 109311 Author macpher...@chromium.org Date 2012-02-29 22:22:39 -0800 (Wed, 29 Feb 2012) Log Message Handle CSSPropertySpeak in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=79879 Reviewed by Eric Seidel. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): * rendering/style/RenderStyle.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp trunk/Source/WebCore/rendering/style/RenderStyle.h Diff Modified: trunk/Source/WebCore/ChangeLog (109310 => 109311) --- trunk/Source/WebCore/ChangeLog 2012-03-01 06:12:22 UTC (rev 109310) +++ trunk/Source/WebCore/ChangeLog 2012-03-01 06:22:39 UTC (rev 109311) @@ -1,5 +1,20 @@ 2012-02-29 Luke Macpherson +Handle CSSPropertySpeak in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=79879 + +Reviewed by Eric Seidel. + +No new tests / refactoring only. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): +* rendering/style/RenderStyle.h: + +2012-02-29 Luke Macpherson + Handle CSSPropertyWebkitColumnAxis in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=79869 Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (109310 => 109311) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-01 06:12:22 UTC (rev 109310) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-01 06:22:39 UTC (rev 109311) @@ -1784,6 +1784,7 @@ setPropertyHandler(CSSPropertyResize, ApplyPropertyResize::createHandler()); setPropertyHandler(CSSPropertyRight, ApplyPropertyLength<&RenderStyle::right, &RenderStyle::setRight, &RenderStyle::initialOffset, AutoEnabled>::createHandler()); setPropertyHandler(CSSPropertySize, ApplyPropertyPageSize::createHandler()); +setPropertyHandler(CSSPropertySpeak, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyTableLayout, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyTextAlign, ApplyPropertyTextAlign::createHandler()); setPropertyHandler(CSSPropertyTextDecoration, ApplyPropertyTextDecoration::createHandler()); Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (109310 => 109311) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-01 06:12:22 UTC (rev 109310) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-01 06:22:39 UTC (rev 109311) @@ -3646,9 +3646,6 @@ case CSSPropertyWebkitColorCorrection: HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(colorSpace, ColorSpace); return; -case CSSPropertySpeak: -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(speak, Speak); -return; case CSSPropertyInvalid: return; // Directional properties are resolved by resolveDirectionAwareProperty() before the switch. @@ -3928,6 +3925,7 @@ case CSSPropertyResize: case CSSPropertyRight: case CSSPropertySize: +case CSSPropertySpeak: case CSSPropertyTableLayout: case CSSPropertyTextAlign: case CSSPropertyTextDecoration: Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (109310 => 109311) --- trunk/Source/WebCore/rendering/style/RenderStyle.h 2012-03-01 06:12:22 UTC (rev 109310) +++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2012-03-01 06:22:39 UTC (rev 109311) @@ -961,7 +961,7 @@ EImageRendering imageRendering() const { return static_cast(rareInheritedData->m_imageRendering); } -ESpeak speak() { return static_cast(rareInheritedData->speak); } +ESpeak speak() const { return static_cast(rareInheritedData->speak); } #if ENABLE(CSS_FILTERS) FilterOperations& filter() { return rareNonInheritedData.access()->m_filter.access()->m_operations; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [109310] trunk/Source/WebCore
Title: [109310] trunk/Source/WebCore Revision 109310 Author macpher...@chromium.org Date 2012-02-29 22:12:22 -0800 (Wed, 29 Feb 2012) Log Message Handle CSSPropertyWebkitColumnAxis in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=79869 Reviewed by Eric Seidel. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (109309 => 109310) --- trunk/Source/WebCore/ChangeLog 2012-03-01 05:57:05 UTC (rev 109309) +++ trunk/Source/WebCore/ChangeLog 2012-03-01 06:12:22 UTC (rev 109310) @@ -1,3 +1,17 @@ +2012-02-29 Luke Macpherson + +Handle CSSPropertyWebkitColumnAxis in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=79869 + +Reviewed by Eric Seidel. + +No new tests / refactoring only. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): + 2012-02-29 Erik Arvidsson Rename DOMSelection to Selection Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (109309 => 109310) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-01 05:57:05 UTC (rev 109309) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-03-01 06:12:22 UTC (rev 109310) @@ -1821,6 +1821,7 @@ setPropertyHandler(CSSPropertyWebkitBoxOrdinalGroup, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitBoxOrient, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitBoxPack, ApplyPropertyDefault::createHandler()); +setPropertyHandler(CSSPropertyWebkitColumnAxis, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitColumnCount, ApplyPropertyAuto::createHandler()); setPropertyHandler(CSSPropertyWebkitColumnGap, ApplyPropertyAuto::createHandler()); setPropertyHandler(CSSPropertyWebkitColumnRuleColor, ApplyPropertyColor::createHandler()); Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (109309 => 109310) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-01 05:57:05 UTC (rev 109309) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-01 06:12:22 UTC (rev 109310) @@ -3741,10 +3741,6 @@ return; } -case CSSPropertyWebkitColumnAxis: -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(columnAxis, ColumnAxis); -return; - case CSSPropertyWebkitWrapShapeInside: HANDLE_INHERIT_AND_INITIAL(wrapShapeInside, WrapShapeInside); if (!primitiveValue) @@ -3969,6 +3965,7 @@ case CSSPropertyWebkitBoxOrdinalGroup: case CSSPropertyWebkitBoxOrient: case CSSPropertyWebkitBoxPack: +case CSSPropertyWebkitColumnAxis: case CSSPropertyWebkitColumnCount: case CSSPropertyWebkitColumnGap: case CSSPropertyWebkitColumnRuleColor: ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [109279] trunk/Source/WebCore
Title: [109279] trunk/Source/WebCore Revision 109279 Author macpher...@chromium.org Date 2012-02-29 16:11:45 -0800 (Wed, 29 Feb 2012) Log Message Clean up CSSPrimitiveValue::computeLengthDouble(). https://bugs.webkit.org/show_bug.cgi?id=77065 Reviewed by Eric Seidel. Refactoring only / no behavioral change. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLengthDouble): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSPrimitiveValue.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (109278 => 109279) --- trunk/Source/WebCore/ChangeLog 2012-02-29 23:59:59 UTC (rev 109278) +++ trunk/Source/WebCore/ChangeLog 2012-03-01 00:11:45 UTC (rev 109279) @@ -1,3 +1,15 @@ +2012-02-29 Luke Macpherson + +Clean up CSSPrimitiveValue::computeLengthDouble(). +https://bugs.webkit.org/show_bug.cgi?id=77065 + +Reviewed by Eric Seidel. + +Refactoring only / no behavioral change. + +* css/CSSPrimitiveValue.cpp: +(WebCore::CSSPrimitiveValue::computeLengthDouble): + 2012-02-29 Beth Dakin Speculative build-fix. Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.cpp (109278 => 109279) --- trunk/Source/WebCore/css/CSSPrimitiveValue.cpp 2012-02-29 23:59:59 UTC (rev 109278) +++ trunk/Source/WebCore/css/CSSPrimitiveValue.cpp 2012-03-01 00:11:45 UTC (rev 109279) @@ -429,33 +429,26 @@ double CSSPrimitiveValue::computeLengthDouble(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize) { -unsigned short type = primitiveType(); +double factor; -// We do not apply the zoom factor when we are computing the value of the font-size property. The zooming -// for font sizes is much more complicated, since we have to worry about enforcing the minimum font size preference -// as well as enforcing the implicit "smart minimum." In addition the CSS property text-size-adjust is used to -// prevent text from zooming at all. Therefore we will not apply the zoom here if we are computing font-size. -bool applyZoomMultiplier = !computingFontSize; - -double factor = 1.0; -switch (type) { +switch (primitiveType()) { case CSS_EMS: -applyZoomMultiplier = false; factor = computingFontSize ? style->fontDescription().specifiedSize() : style->fontDescription().computedSize(); break; case CSS_EXS: // FIXME: We have a bug right now where the zoom will be applied twice to EX units. // We really need to compute EX using fontMetrics for the original specifiedSize and not use // our actual constructed rendering font. -applyZoomMultiplier = false; factor = style->fontMetrics().xHeight(); break; case CSS_REMS: -applyZoomMultiplier = false; if (rootStyle) factor = computingFontSize ? rootStyle->fontDescription().specifiedSize() : rootStyle->fontDescription().computedSize(); +else +factor = 1.0; break; case CSS_PX: +factor = 1.0; break; case CSS_CM: factor = cssPixelsPerInch / 2.54; // (2.54 cm/in) @@ -489,15 +482,19 @@ else computedValue = getDoubleValue(); +// We do not apply the zoom factor when we are computing the value of the font-size property. The zooming +// for font sizes is much more complicated, since we have to worry about enforcing the minimum font size preference +// as well as enforcing the implicit "smart minimum." In addition the CSS property text-size-adjust is used to +// prevent text from zooming at all. Therefore we will not apply the zoom here if we are computing font-size. double result = computedValue * factor; -if (!applyZoomMultiplier || multiplier == 1.0f) +if (computingFontSize || isFontRelativeLength()) return result; // Any original result that was >= 1 should not be allowed to fall below 1. This keeps border lines from // vanishing. double zoomedResult = result * multiplier; -if (result >= 1.0) -zoomedResult = max(1.0, zoomedResult); +if (zoomedResult < 1.0 && result >= 1.0) +return 1.0; return zoomedResult; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [108555] trunk/Source/WebCore
Title: [108555] trunk/Source/WebCore Revision 108555 Author macpher...@chromium.org Date 2012-02-22 14:54:38 -0800 (Wed, 22 Feb 2012) Log Message Re-implement many more HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macros in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=79200 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): * rendering/style/RenderStyle.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp trunk/Source/WebCore/rendering/style/RenderStyle.h Diff Modified: trunk/Source/WebCore/ChangeLog (108554 => 108555) --- trunk/Source/WebCore/ChangeLog 2012-02-22 22:52:26 UTC (rev 108554) +++ trunk/Source/WebCore/ChangeLog 2012-02-22 22:54:38 UTC (rev 108555) @@ -1,3 +1,18 @@ +2012-02-22 Luke Macpherson + +Re-implement many more HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macros in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=79200 + +Reviewed by Andreas Kling. + +No new tests / refactoring only. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): +* rendering/style/RenderStyle.h: + 2012-02-22 Tom Sepez XSSAuditor bypass with tags and html-entities. Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (108554 => 108555) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-02-22 22:52:26 UTC (rev 108554) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-02-22 22:54:38 UTC (rev 108555) @@ -1917,14 +1917,6 @@ setPropertyHandler(CSSPropertyWordBreak, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWordWrap, ApplyPropertyDefault::createHandler()); -setPropertyHandler(CSSPropertyWebkitPerspectiveOriginX, ApplyPropertyLength<&RenderStyle::perspectiveOriginX, &RenderStyle::setPerspectiveOriginX, &RenderStyle::initialPerspectiveOriginX>::createHandler()); -setPropertyHandler(CSSPropertyWebkitPerspectiveOriginY, ApplyPropertyLength<&RenderStyle::perspectiveOriginY, &RenderStyle::setPerspectiveOriginY, &RenderStyle::initialPerspectiveOriginY>::createHandler()); -setPropertyHandler(CSSPropertyWebkitPerspectiveOrigin, ApplyPropertyExpanding::createHandler()); -setPropertyHandler(CSSPropertyWebkitTransformOriginX, ApplyPropertyLength<&RenderStyle::transformOriginX, &RenderStyle::setTransformOriginX, &RenderStyle::initialTransformOriginX>::createHandler()); -setPropertyHandler(CSSPropertyWebkitTransformOriginY, ApplyPropertyLength<&RenderStyle::transformOriginY, &RenderStyle::setTransformOriginY, &RenderStyle::initialTransformOriginY>::createHandler()); -setPropertyHandler(CSSPropertyWebkitTransformOriginZ, ApplyPropertyComputeLength::createHandler()); -setPropertyHandler(CSSPropertyWebkitTransformOrigin, ApplyPropertyExpanding::createHandler()); - setPropertyHandler(CSSPropertyWebkitAnimationDelay, ApplyPropertyAnimation::createHandler()); setPropertyHandler(CSSPropertyWebkitAnimationDirection, ApplyPropertyAnimation::createHandler()); setPropertyHandler(CSSPropertyWebkitAnimationDuration, ApplyPropertyAnimation::createHandler()); @@ -1933,44 +1925,63 @@ setPropertyHandler(CSSPropertyWebkitAnimationName, ApplyPropertyAnimation::createHandler()); setPropertyHandler(CSSPropertyWebkitAnimationPlayState, ApplyPropertyAnimation::createHandler()); setPropertyHandler(CSSPropertyWebkitAnimationTimingFunction, ApplyPropertyAnimation, &Animation::timingFunction, &Animation::setTimingFunction, &Animation::isTimingFunctionSet, &Animation::clearTimingFunction, &Animation::initialAnimationTimingFunction, &CSSStyleSelector::mapAnimationTimingFunction, &RenderStyle::accessAnimations, &RenderStyle::animations>::createHandler()); - -setPropertyHandler(CSSPropertyWebkitTransitionDelay, ApplyPropertyAnimation::createHandler()); -setPropertyHandler(CSSPropertyWebkitTransitionDuration, ApplyPropertyAnimation::createHandler()); -setPropertyHandler(CSSPropertyWebkitTransitionProperty, ApplyPropertyAnimation::createHandler()); -setPropertyHandler(CSSPropertyWebkitTransitionTimingFunction, ApplyPropertyAnimation, &Animation::timingFunction, &Animation::setTimingFunction, &Animation::isTimingFunctionSet, &Animation::clearTimingFunction, &Animation::initialAnimationTimingFunction, &CSSStyleSelector::mapAnimationTimingFunction, &RenderStyle::accessTransitions, &RenderStyle::transitions>::createHandler()); - +
[webkit-changes] [108410] trunk/Source/WebCore
Title: [108410] trunk/Source/WebCore Revision 108410 Author macpher...@chromium.org Date 2012-02-21 16:03:28 -0800 (Tue, 21 Feb 2012) Log Message Implement many instances of HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=79067 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::collectMatchingRulesForList): * rendering/style/RenderStyle.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp trunk/Source/WebCore/rendering/style/RenderStyle.h Diff Modified: trunk/Source/WebCore/ChangeLog (108409 => 108410) --- trunk/Source/WebCore/ChangeLog 2012-02-22 00:00:59 UTC (rev 108409) +++ trunk/Source/WebCore/ChangeLog 2012-02-22 00:03:28 UTC (rev 108410) @@ -1,3 +1,18 @@ +2012-02-21 Luke Macpherson + +Implement many instances of HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=79067 + +Reviewed by Andreas Kling. + +No new tests / refactoring only. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::collectMatchingRulesForList): +* rendering/style/RenderStyle.h: + 2012-02-21 Jon Lee Bring notifications support to WK1 mac Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (108409 => 108410) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-02-22 00:00:59 UTC (rev 108409) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2012-02-22 00:03:28 UTC (rev 108410) @@ -1750,6 +1750,9 @@ setPropertyHandler(CSSPropertyWebkitMaskRepeat, ApplyPropertyExpanding::createHandler()); setPropertyHandler(CSSPropertyBackgroundColor, ApplyPropertyColor::createHandler()); + +setPropertyHandler(CSSPropertyBorderCollapse, ApplyPropertyDefault::createHandler()); + setPropertyHandler(CSSPropertyBorderBottomColor, ApplyPropertyColor::createHandler()); setPropertyHandler(CSSPropertyBorderLeftColor, ApplyPropertyColor::createHandler()); setPropertyHandler(CSSPropertyBorderRightColor, ApplyPropertyColor::createHandler()); @@ -1807,6 +1810,9 @@ setPropertyHandler(CSSPropertyLetterSpacing, ApplyPropertyComputeLength::createHandler()); setPropertyHandler(CSSPropertyWordSpacing, ApplyPropertyComputeLength::createHandler()); +setPropertyHandler(CSSPropertyCaptionSide, ApplyPropertyDefault::createHandler()); +setPropertyHandler(CSSPropertyClear, ApplyPropertyDefault::createHandler()); + setPropertyHandler(CSSPropertyClip, ApplyPropertyClip::createHandler()); setPropertyHandler(CSSPropertyCursor, ApplyPropertyCursor::createHandler()); @@ -1814,6 +1820,8 @@ setPropertyHandler(CSSPropertyCounterIncrement, ApplyPropertyCounter::createHandler()); setPropertyHandler(CSSPropertyCounterReset, ApplyPropertyCounter::createHandler()); +setPropertyHandler(CSSPropertyEmptyCells, ApplyPropertyDefault::createHandler()); + setPropertyHandler(CSSPropertyWebkitFlexOrder, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitFlexPack, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitFlexAlign, ApplyPropertyDefault::createHandler()); @@ -1822,6 +1830,8 @@ setPropertyHandler(CSSPropertyWebkitFlexWrap, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitFlexFlow, ApplyPropertyExpanding::createHandler()); +setPropertyHandler(CSSPropertyFloat, ApplyPropertyDefault::createHandler()); + setPropertyHandler(CSSPropertyFontSize, ApplyPropertyFontSize::createHandler()); setPropertyHandler(CSSPropertyFontStyle, ApplyPropertyFont::createHandler()); setPropertyHandler(CSSPropertyFontVariant, ApplyPropertyFont::createHandler()); @@ -1890,11 +1900,22 @@ setPropertyHandler(CSSPropertyPaddingLeft, ApplyPropertyLength<&RenderStyle::paddingLeft, &RenderStyle::setPaddingLeft, &RenderStyle::initialPadding>::createHandler()); setPropertyHandler(CSSPropertyPadding, ApplyPropertyExpanding::createHandler()); -setPropertyHandler(CSSPropertyResize, ApplyPropertyResize::createHandler()); +setPropertyHandler(CSSPropertyPageBreakAfter, ApplyPropertyDefault::createHandler()); +setPropertyHandler(CSSPropertyPageBreakBefore, ApplyPropertyDefault::createHandler()); +setPropertyHandler(CSSPropertyPageBreakInside, ApplyPropertyDefault::createHandler()); -setPropertyHandler(CSSPropertyVerticalAlign, ApplyPropertyVerticalAlign::createHandler()); +setPropertyHandler(CSSPropertyPosition, ApplyPropertyDefault::createHandler()); +setPropertyH
[webkit-changes] [105693] trunk/Source/WebCore
Title: [105693] trunk/Source/WebCore Revision 105693 Author macpher...@chromium.org Date 2012-01-23 21:44:22 -0800 (Mon, 23 Jan 2012) Log Message Implement CSS clip property in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=74913 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSPrimitiveValue.h: * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::convertToLength): This new function aims to provide a single call for converting many CSSPrimitiveValue values to Lengths. It is templated to allow the caller to specify which conversions are appropriate depending on the context in which the value is used. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyClip::convertToLength): (WebCore::ApplyPropertyClip::applyInheritValue): (WebCore::ApplyPropertyClip::applyInitialValue): (WebCore::ApplyPropertyClip::applyValue): (WebCore::ApplyPropertyClip::createHandler): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSPrimitiveValue.h trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (105692 => 105693) --- trunk/Source/WebCore/ChangeLog 2012-01-24 05:19:25 UTC (rev 105692) +++ trunk/Source/WebCore/ChangeLog 2012-01-24 05:44:22 UTC (rev 105693) @@ -1,3 +1,28 @@ +2012-01-23 Luke Macpherson + +Implement CSS clip property in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=74913 + +Reviewed by Andreas Kling. + +No new tests / refactoring only. + +* css/CSSPrimitiveValue.h: +* css/CSSPrimitiveValueMappings.h: +(WebCore::CSSPrimitiveValue::convertToLength): +This new function aims to provide a single call for converting many CSSPrimitiveValue +values to Lengths. It is templated to allow the caller to specify which conversions +are appropriate depending on the context in which the value is used. +* css/CSSStyleApplyProperty.cpp: +(WebCore::ApplyPropertyClip::convertToLength): +(WebCore::ApplyPropertyClip::applyInheritValue): +(WebCore::ApplyPropertyClip::applyInitialValue): +(WebCore::ApplyPropertyClip::applyValue): +(WebCore::ApplyPropertyClip::createHandler): +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::applyProperty): + 2012-01-23 Tom Sepez decodeEscapeSequences() not correct for some encodings (GBK, Big5, ...). Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.h (105692 => 105693) --- trunk/Source/WebCore/css/CSSPrimitiveValue.h 2012-01-24 05:19:25 UTC (rev 105692) +++ trunk/Source/WebCore/css/CSSPrimitiveValue.h 2012-01-24 05:44:22 UTC (rev 105693) @@ -203,6 +203,9 @@ */ template T computeLength(RenderStyle* currStyle, RenderStyle* rootStyle, float multiplier = 1.0f, bool computingFontSize = false); +// Converts to a Length, mapping various unit types appropriately. +template Length convertToLength(RenderStyle* currStyle, RenderStyle* rootStyle, double multiplier = 1.0, bool computingFontSize = false); + // use with care!!! void setPrimitiveType(unsigned short type) { m_primitiveUnitType = type; } Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (105692 => 105693) --- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2012-01-24 05:19:25 UTC (rev 105692) +++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2012-01-24 05:44:22 UTC (rev 105693) @@ -36,6 +36,7 @@ #include "FontDescription.h" #include "FontSmoothingMode.h" #include "GraphicsTypes.h" +#include "Length.h" #include "Path.h" #include "RenderStyleConstants.h" #include "SVGRenderStyleDefs.h" @@ -3673,6 +3674,21 @@ } } +enum LengthConversion { UnsupportedConversion = 0, FixedConversion = 1, AutoConversion = 2, PercentConversion = 4, FractionConversion = 8}; +template Length CSSPrimitiveValue::convertToLength(RenderStyle* style, RenderStyle* rootStyle, double multiplier, bool computingFontSize) +{ +if ((supported & FixedConversion) && isLength()) +return computeLength(style, rootStyle, multiplier, computingFontSize); +if ((supported & PercentConversion) && isPercentage()) +return Length(getDoubleValue(), Percent); +if ((supported & FractionConversion) && isNumber()) +return Length(getDoubleValue() * 100.0, Percent); +if ((supported & AutoConversion) && getIdent() == CSSValueAuto) +return Length(Auto); +ASSERT_NOT_REACHED(); +return Length(Undefined); +} + #if ENABLE(SVG) template<> inli
[webkit-changes] [105682] trunk/Source/JavaScriptCore
Title: [105682] trunk/Source/_javascript_Core Revision 105682 Author macpher...@chromium.org Date 2012-01-23 19:55:17 -0800 (Mon, 23 Jan 2012) Log Message Unreviewed, rolling out r105676. http://trac.webkit.org/changeset/105676 https://bugs.webkit.org/show_bug.cgi?id=76665 Breaks build on max due to compile warnings. * runtime/JSObject.cpp: (JSC::JSObject::finalize): (JSC::JSObject::visitChildren): (JSC::JSObject::allocatePropertyStorage): * runtime/JSObject.h: Modified Paths trunk/Source/_javascript_Core/ChangeLog trunk/Source/_javascript_Core/runtime/JSObject.cpp trunk/Source/_javascript_Core/runtime/JSObject.h Diff Modified: trunk/Source/_javascript_Core/ChangeLog (105681 => 105682) --- trunk/Source/_javascript_Core/ChangeLog 2012-01-24 03:20:08 UTC (rev 105681) +++ trunk/Source/_javascript_Core/ChangeLog 2012-01-24 03:55:17 UTC (rev 105682) @@ -1,3 +1,17 @@ +2012-01-23 Luke Macpherson + +Unreviewed, rolling out r105676. +http://trac.webkit.org/changeset/105676 +https://bugs.webkit.org/show_bug.cgi?id=76665 + +Breaks build on max due to compile warnings. + +* runtime/JSObject.cpp: +(JSC::JSObject::finalize): +(JSC::JSObject::visitChildren): +(JSC::JSObject::allocatePropertyStorage): +* runtime/JSObject.h: + 2012-01-23 Mark Hahnenberg Use copying collector for out-of-line JSObject property storage Modified: trunk/Source/_javascript_Core/runtime/JSObject.cpp (105681 => 105682) --- trunk/Source/_javascript_Core/runtime/JSObject.cpp 2012-01-24 03:20:08 UTC (rev 105681) +++ trunk/Source/_javascript_Core/runtime/JSObject.cpp 2012-01-24 03:55:17 UTC (rev 105682) @@ -24,7 +24,6 @@ #include "config.h" #include "JSObject.h" -#include "BumpSpaceInlineMethods.h" #include "DatePrototype.h" #include "ErrorConstructor.h" #include "GetterSetter.h" @@ -84,6 +83,11 @@ } } +void JSObject::finalize(JSCell* cell) +{ +delete [] jsCast(cell)->m_propertyStorage.get(); +} + void JSObject::destroy(JSCell* cell) { jsCast(cell)->JSObject::~JSObject(); @@ -102,13 +106,7 @@ PropertyStorage storage = thisObject->propertyStorage(); size_t storageSize = thisObject->structure()->propertyStorageSize(); -if (thisObject->isUsingInlineStorage()) -visitor.appendValues(storage, storageSize); -else { -visitor.copyAndAppend(reinterpret_cast(&storage), thisObject->structure()->propertyStorageCapacity() * sizeof(WriteBarrierBase), storage->slot(), storageSize); -thisObject->m_propertyStorage.set(storage, StorageBarrier::Unchecked); -} - +visitor.appendValues(storage, storageSize); if (thisObject->m_inheritorID) visitor.append(&thisObject->m_inheritorID); @@ -635,23 +633,20 @@ // It's important that this function not rely on structure(), since // we might be in the middle of a transition. +PropertyStorage newPropertyStorage = 0; +newPropertyStorage = new WriteBarrierBase[newSize]; PropertyStorage oldPropertyStorage = m_propertyStorage.get(); -PropertyStorage newPropertyStorage = 0; +ASSERT(newPropertyStorage); -if (isUsingInlineStorage()) { -if (!globalData.heap.tryAllocateStorage(sizeof(WriteBarrierBase) * newSize, reinterpret_cast(&newPropertyStorage))) -CRASH(); +for (unsigned i = 0; i < oldSize; ++i) + newPropertyStorage[i] = oldPropertyStorage[i]; -for (unsigned i = 0; i < oldSize; ++i) -newPropertyStorage[i] = oldPropertyStorage[i]; -} else { -if (!globalData.heap.tryReallocateStorage(reinterpret_cast(&oldPropertyStorage), sizeof(WriteBarrierBase) * oldSize, sizeof(WriteBarrierBase) * newSize)) -CRASH(); -newPropertyStorage = oldPropertyStorage; -} +if (isUsingInlineStorage()) +Heap::heap(this)->addFinalizer(this, &finalize); +else +delete [] oldPropertyStorage; -ASSERT(newPropertyStorage); m_propertyStorage.set(globalData, this, newPropertyStorage); } Modified: trunk/Source/_javascript_Core/runtime/JSObject.h (105681 => 105682) --- trunk/Source/_javascript_Core/runtime/JSObject.h 2012-01-24 03:20:08 UTC (rev 105681) +++ trunk/Source/_javascript_Core/runtime/JSObject.h 2012-01-24 03:55:17 UTC (rev 105682) @@ -90,6 +90,8 @@ JS_EXPORT_PRIVATE static UString className(const JSObject*); +static void finalize(JSCell*); + JSValue prototype() const; void setPrototype(JSGlobalData&, JSValue prototype); bool setPrototypeWithCycleCheck(JSGlobalData&, JSValue prototype); ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [105678] trunk/Source/WebCore
Title: [105678] trunk/Source/WebCore Revision 105678 Author macpher...@chromium.org Date 2012-01-23 18:36:19 -0800 (Mon, 23 Jan 2012) Log Message Make zoom multiplier float instead of double to match RenderStyle::effectiveZoom etc. and thus avoid unnecessary precision conversions. https://bugs.webkit.org/show_bug.cgi?id=69490 Reviewed by Andreas Kling. Covered by existing tests. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLength): Use float multiplier instead of double. (WebCore::CSSPrimitiveValue::computeLengthDouble): Use float multiplier instead of double. * css/CSSPrimitiveValue.h: Change type signatures of computeLength template prototype. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSPrimitiveValue.cpp trunk/Source/WebCore/css/CSSPrimitiveValue.h Diff Modified: trunk/Source/WebCore/ChangeLog (105677 => 105678) --- trunk/Source/WebCore/ChangeLog 2012-01-24 02:33:10 UTC (rev 105677) +++ trunk/Source/WebCore/ChangeLog 2012-01-24 02:36:19 UTC (rev 105678) @@ -1,3 +1,20 @@ +2012-01-23 Luke Macpherson + +Make zoom multiplier float instead of double to match RenderStyle::effectiveZoom etc. and thus avoid unnecessary precision conversions. +https://bugs.webkit.org/show_bug.cgi?id=69490 + +Reviewed by Andreas Kling. + +Covered by existing tests. + +* css/CSSPrimitiveValue.cpp: +(WebCore::CSSPrimitiveValue::computeLength): +Use float multiplier instead of double. +(WebCore::CSSPrimitiveValue::computeLengthDouble): +Use float multiplier instead of double. +* css/CSSPrimitiveValue.h: +Change type signatures of computeLength template prototype. + 2012-01-23 Priit Laes [GTK][PATCH] More build silencing with (AM_V_...) Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.cpp (105677 => 105678) --- trunk/Source/WebCore/css/CSSPrimitiveValue.cpp 2012-01-24 02:33:10 UTC (rev 105677) +++ trunk/Source/WebCore/css/CSSPrimitiveValue.cpp 2012-01-24 02:36:19 UTC (rev 105678) @@ -355,43 +355,43 @@ } } -template<> int CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, double multiplier, bool computingFontSize) +template<> int CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize) { return roundForImpreciseConversion(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)); } -template<> unsigned CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, double multiplier, bool computingFontSize) +template<> unsigned CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize) { return roundForImpreciseConversion(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)); } -template<> Length CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, double multiplier, bool computingFontSize) +template<> Length CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize) { // FIXME: Length.h no longer expects 28 bit integers, so these bounds should be INT_MAX and INT_MIN return Length(roundForImpreciseConversion(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)), Fixed); } -template<> short CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, double multiplier, bool computingFontSize) +template<> short CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize) { return roundForImpreciseConversion(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)); } -template<> unsigned short CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, double multiplier, bool computingFontSize) +template<> unsigned short CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize) { return roundForImpreciseConversion(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)); } -template<> float CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, double multiplier, bool computingFontSize) +template<> float CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize) { return static_cast(computeLengthDouble(style, rootStyle, multiplier, computingFontSize)); } -template<> double CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, double multiplier, bool computingFontSize) +template<> double CSSPrimitiveValue::computeLength(RenderStyle* style, RenderStyle* rootStyle, float multiplier, bool computingFontSize) { return computeLen
[webkit-changes] [105033] trunk/Source/WebCore
Title: [105033] trunk/Source/WebCore Revision 105033 Author macpher...@chromium.org Date 2012-01-15 15:18:28 -0800 (Sun, 15 Jan 2012) Log Message Remove external references to CSSPrimitiveValue::UnitTypes enum. https://bugs.webkit.org/show_bug.cgi?id=76229 Reviewed by Darin Adler. No new tests / refactoring only. * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): * css/CSSGradientValue.cpp: (WebCore::CSSGradientValue::addStops): (WebCore::positionFromValue): (WebCore::CSSGradientValue::isCacheable): (WebCore::CSSRadialGradientValue::resolveRadius): (WebCore::CSSRadialGradientValue::createGradient): * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::isUnitTypeLength): (WebCore::CSSPrimitiveValue::isFontRelativeLength): (WebCore::CSSPrimitiveValue::isIdent): (WebCore::CSSPrimitiveValue::isNumber): (WebCore::CSSPrimitiveValue::isPercentage): (WebCore::CSSPrimitiveValue::isString): (WebCore::CSSPrimitiveValue::isURI): * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyLength::applyValue): (WebCore::ApplyPropertyBorderRadius::applyValue): (WebCore::ApplyPropertyFontSize::applyValue): (WebCore::ApplyPropertyCursor::applyValue): (WebCore::ApplyPropertyPageSize::applyValue): (WebCore::ApplyPropertyTextEmphasisStyle::applyValue): (WebCore::ApplyPropertyZoom::applyValue): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSFontSelector.cpp trunk/Source/WebCore/css/CSSGradientValue.cpp trunk/Source/WebCore/css/CSSPrimitiveValue.h trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (105032 => 105033) --- trunk/Source/WebCore/ChangeLog 2012-01-15 20:14:31 UTC (rev 105032) +++ trunk/Source/WebCore/ChangeLog 2012-01-15 23:18:28 UTC (rev 105033) @@ -1,3 +1,37 @@ +2012-01-15 Luke Macpherson + +Remove external references to CSSPrimitiveValue::UnitTypes enum. +https://bugs.webkit.org/show_bug.cgi?id=76229 + +Reviewed by Darin Adler. + +No new tests / refactoring only. + +* css/CSSFontSelector.cpp: +(WebCore::CSSFontSelector::addFontFaceRule): +* css/CSSGradientValue.cpp: +(WebCore::CSSGradientValue::addStops): +(WebCore::positionFromValue): +(WebCore::CSSGradientValue::isCacheable): +(WebCore::CSSRadialGradientValue::resolveRadius): +(WebCore::CSSRadialGradientValue::createGradient): +* css/CSSPrimitiveValue.h: +(WebCore::CSSPrimitiveValue::isUnitTypeLength): +(WebCore::CSSPrimitiveValue::isFontRelativeLength): +(WebCore::CSSPrimitiveValue::isIdent): +(WebCore::CSSPrimitiveValue::isNumber): +(WebCore::CSSPrimitiveValue::isPercentage): +(WebCore::CSSPrimitiveValue::isString): +(WebCore::CSSPrimitiveValue::isURI): +* css/CSSStyleApplyProperty.cpp: +(WebCore::ApplyPropertyLength::applyValue): +(WebCore::ApplyPropertyBorderRadius::applyValue): +(WebCore::ApplyPropertyFontSize::applyValue): +(WebCore::ApplyPropertyCursor::applyValue): +(WebCore::ApplyPropertyPageSize::applyValue): +(WebCore::ApplyPropertyTextEmphasisStyle::applyValue): +(WebCore::ApplyPropertyZoom::applyValue): + 2012-01-15 Pablo Flouret Fix compilation errors on build-webkit --debug --no-video on mac. Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (105032 => 105033) --- trunk/Source/WebCore/css/CSSFontSelector.cpp 2012-01-15 20:14:31 UTC (rev 105032) +++ trunk/Source/WebCore/css/CSSFontSelector.cpp 2012-01-15 23:18:28 UTC (rev 105033) @@ -285,9 +285,9 @@ for (int i = 0; i < familyLength; i++) { CSSPrimitiveValue* item = static_cast(familyList->itemWithoutBoundsCheck(i)); String familyName; -if (item->primitiveType() == CSSPrimitiveValue::CSS_STRING) +if (item->isString()) familyName = static_cast(item)->familyName(); -else if (item->primitiveType() == CSSPrimitiveValue::CSS_IDENT) { +else if (item->isIdent()) { // We need to use the raw text for all the generic family types, since @font-face is a way of actually // defining what font to use for those types. String familyName; Modified: trunk/Source/WebCore/css/CSSGradientValue.cpp (105032 => 105033) --- trunk/Source/WebCore/css/CSSGradientValue.cpp 2012-01-15 20:14:31 UTC (rev 105032) +++ trunk/Source/WebCore/css/CSSGradientValue.cpp 2012-01-15 23:18:28 UTC (rev 105033) @@ -117,7 +117,7 @@ Color color = renderer->document()->styleSelector()->colorFromPrimitiveValue(stop.m_color.get()); float offset; -if (stop.m_position->primitiveType() == CSSPrimitiveValue::CSS_PERCENTAGE) +if (stop.m_position->isPercentage()) offset = stop.m_position->getFloatValue(CSSPrimitiveValue::CSS_PERCENTAGE) / 100; else
[webkit-changes] [103212] trunk/Source/WebCore
Title: [103212] trunk/Source/WebCore Revision 103212 Author macpher...@chromium.org Date 2011-12-18 19:50:08 -0800 (Sun, 18 Dec 2011) Log Message Implement CSS line-height property in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=74561 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::isNumber): * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyLineHeight::applyValue): (WebCore::ApplyPropertyLineHeight::createHandler): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSPrimitiveValue.h trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (103211 => 103212) --- trunk/Source/WebCore/ChangeLog 2011-12-19 03:27:43 UTC (rev 103211) +++ trunk/Source/WebCore/ChangeLog 2011-12-19 03:50:08 UTC (rev 103212) @@ -1,5 +1,23 @@ 2011-12-18 Luke Macpherson +Implement CSS line-height property in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=74561 + +Reviewed by Andreas Kling. + +No new tests / refactoring only. + +* css/CSSPrimitiveValue.h: +(WebCore::CSSPrimitiveValue::isNumber): +* css/CSSStyleApplyProperty.cpp: +(WebCore::ApplyPropertyLineHeight::applyValue): +(WebCore::ApplyPropertyLineHeight::createHandler): +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::applyProperty): + +2011-12-18 Luke Macpherson + Implement CSS outline shorthand property in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=74467 Modified: trunk/Source/WebCore/css/CSSPrimitiveValue.h (103211 => 103212) --- trunk/Source/WebCore/css/CSSPrimitiveValue.h 2011-12-19 03:27:43 UTC (rev 103211) +++ trunk/Source/WebCore/css/CSSPrimitiveValue.h 2011-12-19 03:50:08 UTC (rev 103212) @@ -121,6 +121,7 @@ bool isLength() const { return isUnitTypeLength(m_primitiveUnitType); } bool isPercentage() const { return m_primitiveUnitType == CSSPrimitiveValue::CSS_PERCENTAGE; } +bool isNumber() const { return m_primitiveUnitType == CSSPrimitiveValue::CSS_NUMBER; } static PassRefPtr createIdentifier(int identifier) { return adoptRef(new CSSPrimitiveValue(identifier)); } static PassRefPtr createColor(unsigned rgbValue) { return adoptRef(new CSSPrimitiveValue(rgbValue)); } Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (103211 => 103212) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2011-12-19 03:27:43 UTC (rev 103211) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2011-12-19 03:50:08 UTC (rev 103212) @@ -1005,6 +1005,42 @@ } }; +class ApplyPropertyLineHeight { +public: +static void applyValue(CSSStyleSelector* selector, CSSValue* value) +{ +if (!value->isPrimitiveValue()) +return; + +CSSPrimitiveValue* primitiveValue = static_cast(value); +Length lineHeight; + +if (primitiveValue->getIdent() == CSSValueNormal) +lineHeight = Length(-100.0, Percent); +else if (primitiveValue->isLength()) { +double multiplier = selector->style()->effectiveZoom(); +if (selector->style()->textSizeAdjust()) { +if (Frame* frame = selector->document()->frame()) +multiplier *= frame->textZoomFactor(); +} +lineHeight = primitiveValue->computeLength(selector->style(), selector->rootElementStyle(), multiplier); +} else if (primitiveValue->isPercentage()) { +// FIXME: percentage should not be restricted to an integer here. +lineHeight = Length((selector->style()->fontSize() * primitiveValue->getIntValue()) / 100, Fixed); +} else if (primitiveValue->isNumber()) { +// FIXME: number and percentage values should produce the same type of Length (ie. Fixed or Percent). +lineHeight = Length(primitiveValue->getDoubleValue() * 100.0, Percent); +} else +return; +selector->style()->setLineHeight(lineHeight); +} +static PropertyHandler createHandler() +{ +PropertyHandler handler = ApplyPropertyDefaultBase::createHandler(); +return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue); +} +}; + class ApplyPropertyPageSize { private: static Length mmLength(double mm) { return CSSPrimitiveValue::create(mm, CSSPrimitiveValue::CSS_MM)->computeLength(0, 0); } @@ -1677,6 +1713,8 @@ setPropertyHandler(CSSPropertyTextIndent, ApplyPropertyLength<&RenderStyle::te
[webkit-changes] [103211] trunk/Source/WebCore
Title: [103211] trunk/Source/WebCore Revision 103211 Author macpher...@chromium.org Date 2011-12-18 19:27:43 -0800 (Sun, 18 Dec 2011) Log Message Implement CSS outline shorthand property in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=74467 Reviewed by Andreas Kling. No new tests / refactoring only. RenderStyle::resetOutline was removed in favor of explicity expanding to the initial values of the shorthand expansion. This improves consistency because the initial values to use are more clearly (and singularly) defined. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/style/RenderStyle.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp trunk/Source/WebCore/rendering/style/RenderStyle.h Diff Modified: trunk/Source/WebCore/ChangeLog (103210 => 103211) --- trunk/Source/WebCore/ChangeLog 2011-12-19 03:13:08 UTC (rev 103210) +++ trunk/Source/WebCore/ChangeLog 2011-12-19 03:27:43 UTC (rev 103211) @@ -1,3 +1,22 @@ +2011-12-18 Luke Macpherson + +Implement CSS outline shorthand property in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=74467 + +Reviewed by Andreas Kling. + +No new tests / refactoring only. + +RenderStyle::resetOutline was removed in favor of explicity expanding to the +initial values of the shorthand expansion. This improves consistency because +the initial values to use are more clearly (and singularly) defined. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::applyProperty): +* rendering/style/RenderStyle.h: + 2011-12-18 Sheriff Bot Unreviewed, rolling out r103205. Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (103210 => 103211) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2011-12-19 03:13:08 UTC (rev 103210) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2011-12-19 03:27:43 UTC (rev 103211) @@ -1656,6 +1656,8 @@ setPropertyHandler(CSSPropertyOutlineColor, ApplyPropertyColor::createHandler()); setPropertyHandler(CSSPropertyOutlineOffset, ApplyPropertyComputeLength::createHandler()); +setPropertyHandler(CSSPropertyOutline, ApplyPropertyExpanding::createHandler()); + setPropertyHandler(CSSPropertyOverflowX, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyOverflowY, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyOverflow, ApplyPropertyExpanding::createHandler()); Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (103210 => 103211) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-12-19 03:13:08 UTC (rev 103210) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-12-19 03:27:43 UTC (rev 103211) @@ -3063,16 +3063,6 @@ } return; -case CSSPropertyOutline: -if (isInherit) { -m_style->setOutlineWidth(m_parentStyle->outlineWidth()); -m_style->setOutlineColor(m_parentStyle->outlineColor().isValid() ? m_parentStyle->outlineColor() : m_parentStyle->color()); -m_style->setOutlineStyle(m_parentStyle->outlineStyle()); -} -else if (isInitial) -m_style->resetOutline(); -return; - // CSS3 Properties case CSSPropertyWebkitAppearance: HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(appearance, Appearance) @@ -3731,6 +3721,7 @@ case CSSPropertyWebkitTextOrientation: case CSSPropertyWebkitFontSmoothing: case CSSPropertyFontWeight: +case CSSPropertyOutline: case CSSPropertyOutlineStyle: case CSSPropertyOutlineWidth: case CSSPropertyOutlineOffset: Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (103210 => 103211) --- trunk/Source/WebCore/rendering/style/RenderStyle.h 2011-12-19 03:13:08 UTC (rev 103210) +++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2011-12-19 03:27:43 UTC (rev 103211) @@ -949,8 +949,6 @@ void resetBorderBottomLeftRadius() { SET_VAR(surround, border.m_bottomLeft, initialBorderRadius()) } void resetBorderBottomRightRadius() { SET_VAR(surround, border.m_bottomRight, initialBorderRadius()) } -void resetOutline() { SET_VAR(m_background, m_outline, OutlineValue()) } - void setBackgroundColor(const Color& v) { SET_VAR(m_background, m_color, v) } void setBackgroundXPosition(Length l) { SET_VAR(m_background, m_background.m_xPosition, l) } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [103209] trunk/Source/WebCore
Title: [103209] trunk/Source/WebCore Revision 103209 Author macpher...@chromium.org Date 2011-12-18 19:07:55 -0800 (Sun, 18 Dec 2011) Log Message Separate box alignment and box pack values into separate enums. https://bugs.webkit.org/show_bug.cgi?id=74580 Reviewed by Andreas Kling. No new tests / refactoring only. Separating these types cleans up the code by removing several assertions that values are in the correct ranges, as this is ensured by the type system. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EBoxPack): (WebCore::CSSPrimitiveValue::operator EBoxAlignment): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): * rendering/RenderFullScreen.cpp: (createFullScreenStyle): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::boxPack): (WebCore::InheritedFlags::setBoxAlign): (WebCore::InheritedFlags::setBoxPack): (WebCore::InheritedFlags::initialBoxPack): * rendering/style/RenderStyleConstants.h: * rendering/style/StyleDeprecatedFlexibleBoxData.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h trunk/Source/WebCore/css/CSSStyleSelector.cpp trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp trunk/Source/WebCore/rendering/RenderFullScreen.cpp trunk/Source/WebCore/rendering/style/RenderStyle.h trunk/Source/WebCore/rendering/style/RenderStyleConstants.h trunk/Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.h Diff Modified: trunk/Source/WebCore/ChangeLog (103208 => 103209) --- trunk/Source/WebCore/ChangeLog 2011-12-19 03:01:29 UTC (rev 103208) +++ trunk/Source/WebCore/ChangeLog 2011-12-19 03:07:55 UTC (rev 103209) @@ -1,5 +1,38 @@ 2011-12-18 Luke Macpherson +Separate box alignment and box pack values into separate enums. +https://bugs.webkit.org/show_bug.cgi?id=74580 + +Reviewed by Andreas Kling. + +No new tests / refactoring only. + +Separating these types cleans up the code by removing several assertions that +values are in the correct ranges, as this is ensured by the type system. + +* css/CSSComputedStyleDeclaration.cpp: +(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): +* css/CSSPrimitiveValueMappings.h: +(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): +(WebCore::CSSPrimitiveValue::operator EBoxPack): +(WebCore::CSSPrimitiveValue::operator EBoxAlignment): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::applyProperty): +* rendering/RenderDeprecatedFlexibleBox.cpp: +(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): +(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): +* rendering/RenderFullScreen.cpp: +(createFullScreenStyle): +* rendering/style/RenderStyle.h: +(WebCore::InheritedFlags::boxPack): +(WebCore::InheritedFlags::setBoxAlign): +(WebCore::InheritedFlags::setBoxPack): +(WebCore::InheritedFlags::initialBoxPack): +* rendering/style/RenderStyleConstants.h: +* rendering/style/StyleDeprecatedFlexibleBoxData.h: + +2011-12-18 Luke Macpherson + Implement CSS font-size property in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=74368 Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (103208 => 103209) --- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2011-12-19 03:01:29 UTC (rev 103208) +++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2011-12-19 03:07:55 UTC (rev 103209) @@ -1396,14 +1396,8 @@ return cssValuePool->createValue(style->boxOrdinalGroup(), CSSPrimitiveValue::CSS_NUMBER); case CSSPropertyWebkitBoxOrient: return cssValuePool->createValue(style->boxOrient()); -case CSSPropertyWebkitBoxPack: { -EBoxAlignment boxPack = style->boxPack(); -ASSERT(boxPack != BSTRETCH); -ASSERT(boxPack != BBASELINE); -if (boxPack == BJUSTIFY || boxPack== BBASELINE) -return 0; -return cssValuePool->createValue(boxPack); -} +case CSSPropertyWebkitBoxPack: +return cssValuePool->createValue(style->boxPack()); case CSSPropertyWebkitBoxReflect: return valueForReflection(style->boxReflect(), style.get(), cssValuePool); case CSSPropertyBoxShadow: Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (103208 => 103209) --- trunk/Source/WebCore/css/CSSPrimitiv
[webkit-changes] [103208] trunk/Source/WebCore
Title: [103208] trunk/Source/WebCore Revision 103208 Author macpher...@chromium.org Date 2011-12-18 19:01:29 -0800 (Sun, 18 Dec 2011) Log Message Implement CSS font-size property in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=74368 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyFontSize::largerFontSize): (WebCore::ApplyPropertyFontSize::smallerFontSize): (WebCore::ApplyPropertyFontSize::applyInheritValue): (WebCore::ApplyPropertyFontSize::applyInitialValue): (WebCore::ApplyPropertyFontSize::applyValue): (WebCore::ApplyPropertyFontSize::createHandler): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::hasParentNode): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp trunk/Source/WebCore/css/CSSStyleSelector.h Diff Modified: trunk/Source/WebCore/ChangeLog (103207 => 103208) --- trunk/Source/WebCore/ChangeLog 2011-12-19 02:59:34 UTC (rev 103207) +++ trunk/Source/WebCore/ChangeLog 2011-12-19 03:01:29 UTC (rev 103208) @@ -1,3 +1,25 @@ +2011-12-18 Luke Macpherson + +Implement CSS font-size property in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=74368 + +Reviewed by Andreas Kling. + +No new tests / refactoring only. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::ApplyPropertyFontSize::largerFontSize): +(WebCore::ApplyPropertyFontSize::smallerFontSize): +(WebCore::ApplyPropertyFontSize::applyInheritValue): +(WebCore::ApplyPropertyFontSize::applyInitialValue): +(WebCore::ApplyPropertyFontSize::applyValue): +(WebCore::ApplyPropertyFontSize::createHandler): +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::applyProperty): +* css/CSSStyleSelector.h: +(WebCore::CSSStyleSelector::hasParentNode): + 2011-12-18 Sheriff Bot Unreviewed, rolling out r103199. Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (103207 => 103208) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2011-12-19 02:59:34 UTC (rev 103207) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2011-12-19 03:01:29 UTC (rev 103208) @@ -578,6 +578,122 @@ static PropertyHandler createHandler() { return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); } }; +class ApplyPropertyFontSize { +private: +// When the CSS keyword "larger" is used, this function will attempt to match within the keyword +// table, and failing that, will simply multiply by 1.2. +static float largerFontSize(float size) +{ +// FIXME: Figure out where we fall in the size ranges (xx-small to xxx-large) and scale up to +// the next size level. +return size * 1.2f; +} + +// Like the previous function, but for the keyword "smaller". +static float smallerFontSize(float size) +{ +// FIXME: Figure out where we fall in the size ranges (xx-small to xxx-large) and scale down to +// the next size level. +return size / 1.2f; +} +public: +static void applyInheritValue(CSSStyleSelector* selector) +{ +float size = selector->parentStyle()->fontDescription().specifiedSize(); + +if (size < 0) +return; + +FontDescription fontDescription = selector->style()->fontDescription(); +fontDescription.setKeywordSize(selector->parentStyle()->fontDescription().keywordSize()); +selector->setFontSize(fontDescription, size); +selector->setFontDescription(fontDescription); +return; +} + +static void applyInitialValue(CSSStyleSelector* selector) +{ +FontDescription fontDescription = selector->style()->fontDescription(); +float size = selector->fontSizeForKeyword(selector->document(), CSSValueMedium, fontDescription.useFixedDefaultSize()); + +if (size < 0) +return; + +fontDescription.setKeywordSize(CSSValueMedium - CSSValueXxSmall + 1); +selector->setFontSize(fontDescription, size); +selector->setFontDescription(fontDescription); +return; +} + +static void applyValue(CSSStyleSelector* selector, CSSValue* value) +{ +if (!value->isPrimitiveValue()) +return; + +CSSPrimitiveValue* primitiveValue = static_cast(value); + +FontDescription fontDescription = selector->style()->fontDescription(); +fontDescription.setKeywordSize(0); +float parentSize = 0; +bool parentIsAbsoluteSize = false; +float size = 0; + +if (
[webkit-changes] [102989] trunk/Source/WebCore
Title: [102989] trunk/Source/WebCore Revision 102989 Author macpher...@chromium.org Date 2011-12-15 15:44:20 -0800 (Thu, 15 Dec 2011) Log Message Separate box alignment and box pack values into separate enums. https://bugs.webkit.org/show_bug.cgi?id=74580 Reviewed by Darin Adler. No new tests / refactoring only. Separating these types cleans up the code by removing several assertions that values are in the correct ranges, as this is ensured by the type system. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EBoxPack): (WebCore::CSSPrimitiveValue::operator EBoxAlignment): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): * rendering/RenderFullScreen.cpp: (createFullScreenStyle): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::boxPack): (WebCore::InheritedFlags::setBoxAlign): (WebCore::InheritedFlags::setBoxPack): (WebCore::InheritedFlags::initialBoxPack): * rendering/style/RenderStyleConstants.h: * rendering/style/StyleDeprecatedFlexibleBoxData.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h trunk/Source/WebCore/css/CSSStyleSelector.cpp trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp trunk/Source/WebCore/rendering/RenderFullScreen.cpp trunk/Source/WebCore/rendering/style/RenderStyle.h trunk/Source/WebCore/rendering/style/RenderStyleConstants.h trunk/Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.h Diff Modified: trunk/Source/WebCore/ChangeLog (102988 => 102989) --- trunk/Source/WebCore/ChangeLog 2011-12-15 23:13:40 UTC (rev 102988) +++ trunk/Source/WebCore/ChangeLog 2011-12-15 23:44:20 UTC (rev 102989) @@ -1,3 +1,36 @@ +2011-12-15 Luke Macpherson + +Separate box alignment and box pack values into separate enums. +https://bugs.webkit.org/show_bug.cgi?id=74580 + +Reviewed by Darin Adler. + +No new tests / refactoring only. + +Separating these types cleans up the code by removing several assertions that +values are in the correct ranges, as this is ensured by the type system. + +* css/CSSComputedStyleDeclaration.cpp: +(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): +* css/CSSPrimitiveValueMappings.h: +(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): +(WebCore::CSSPrimitiveValue::operator EBoxPack): +(WebCore::CSSPrimitiveValue::operator EBoxAlignment): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::applyProperty): +* rendering/RenderDeprecatedFlexibleBox.cpp: +(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): +(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): +* rendering/RenderFullScreen.cpp: +(createFullScreenStyle): +* rendering/style/RenderStyle.h: +(WebCore::InheritedFlags::boxPack): +(WebCore::InheritedFlags::setBoxAlign): +(WebCore::InheritedFlags::setBoxPack): +(WebCore::InheritedFlags::initialBoxPack): +* rendering/style/RenderStyleConstants.h: +* rendering/style/StyleDeprecatedFlexibleBoxData.h: + 2011-12-15 Kentaro Hara REGRESSION(r102663): generate-bindings.pl runs every time Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (102988 => 102989) --- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2011-12-15 23:13:40 UTC (rev 102988) +++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2011-12-15 23:44:20 UTC (rev 102989) @@ -1401,14 +1401,8 @@ return cssValuePool->createValue(style->boxOrdinalGroup(), CSSPrimitiveValue::CSS_NUMBER); case CSSPropertyWebkitBoxOrient: return cssValuePool->createValue(style->boxOrient()); -case CSSPropertyWebkitBoxPack: { -EBoxAlignment boxPack = style->boxPack(); -ASSERT(boxPack != BSTRETCH); -ASSERT(boxPack != BBASELINE); -if (boxPack == BJUSTIFY || boxPack== BBASELINE) -return 0; -return cssValuePool->createValue(boxPack); -} +case CSSPropertyWebkitBoxPack: +return cssValuePool->createValue(style->boxPack()); case CSSPropertyWebkitBoxReflect: return valueForReflection(style->boxReflect(), style.get(), cssValuePool); case CSSPropertyBoxShadow: Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (102988 => 102989) --- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2011-12-15 23:13:40 UTC (rev
[webkit-changes] [102650] trunk/Source/WebCore
Title: [102650] trunk/Source/WebCore Revision 102650 Author macpher...@chromium.org Date 2011-12-12 18:36:47 -0800 (Mon, 12 Dec 2011) Log Message Implement CSS text-decoration property in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=74258 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyTextDecoration::applyValue): (WebCore::ApplyPropertyTextDecoration::createHandler): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (102649 => 102650) --- trunk/Source/WebCore/ChangeLog 2011-12-13 02:32:20 UTC (rev 102649) +++ trunk/Source/WebCore/ChangeLog 2011-12-13 02:36:47 UTC (rev 102650) @@ -1,3 +1,19 @@ +2011-12-12 Luke Macpherson + +Implement CSS text-decoration property in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=74258 + +Reviewed by Andreas Kling. + +No new tests / refactoring only. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::ApplyPropertyTextDecoration::applyValue): +(WebCore::ApplyPropertyTextDecoration::createHandler): +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::applyProperty): + 2011-12-12 Adrienne Walker iframe fails to scroll in composited page Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (102649 => 102650) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2011-12-13 02:32:20 UTC (rev 102649) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2011-12-13 02:36:47 UTC (rev 102650) @@ -870,6 +870,25 @@ } }; +class ApplyPropertyTextDecoration { +public: +static void applyValue(CSSStyleSelector* selector, CSSValue* value) +{ +ETextDecoration t = RenderStyle::initialTextDecoration(); +for (CSSValueListIterator i(value); i.hasMore(); i.advance()) { +CSSValue* item = i.value(); +ASSERT(item->isPrimitiveValue()); +t |= *static_cast(item); +} +selector->style()->setTextDecoration(t); +} +static PropertyHandler createHandler() +{ +PropertyHandler handler = ApplyPropertyDefaultBase::createHandler(); +return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue); +} +}; + class ApplyPropertyPageSize { private: static Length mmLength(double mm) { return CSSPrimitiveValue::create(mm, CSSPrimitiveValue::CSS_MM)->computeLength(0, 0); } @@ -1544,6 +1563,7 @@ setPropertyHandler(CSSPropertyFontWeight, ApplyPropertyFontWeight::createHandler()); setPropertyHandler(CSSPropertyTextAlign, ApplyPropertyTextAlign::createHandler()); +setPropertyHandler(CSSPropertyTextDecoration, ApplyPropertyTextDecoration::createHandler()); setPropertyHandler(CSSPropertyOutlineStyle, ApplyPropertyOutlineStyle::createHandler()); setPropertyHandler(CSSPropertyOutlineColor, ApplyPropertyColor::createHandler()); Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (102649 => 102650) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-12-13 02:32:20 UTC (rev 102649) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-12-13 02:36:47 UTC (rev 102650) @@ -3050,18 +3050,6 @@ } return; } -case CSSPropertyTextDecoration: { -// list of ident -HANDLE_INHERIT_AND_INITIAL(textDecoration, TextDecoration) -ETextDecoration t = RenderStyle::initialTextDecoration(); -for (CSSValueListIterator i = value; i.hasMore(); i.advance()) { -CSSValue* item = i.value(); -ASSERT(item->isPrimitiveValue()); -t |= *static_cast(item); -} -m_style->setTextDecoration(t); -return; -} // shorthand properties case CSSPropertyBackground: if (isInitial) { @@ -3866,6 +3854,7 @@ case CSSPropertyResize: case CSSPropertySize: case CSSPropertyTextAlign: +case CSSPropertyTextDecoration: case CSSPropertyTextIndent: case CSSPropertyMaxHeight: case CSSPropertyHeight: ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [102557] trunk/Source/WebCore
Title: [102557] trunk/Source/WebCore Revision 102557 Author macpher...@chromium.org Date 2011-12-11 20:06:57 -0800 (Sun, 11 Dec 2011) Log Message Implement webkit-line-grid and webkit-line-grid-snap CSS properties in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=74262 Reviewed by Andreas Kling. No new tests / refactoring only. * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (102556 => 102557) --- trunk/Source/WebCore/ChangeLog 2011-12-12 03:55:06 UTC (rev 102556) +++ trunk/Source/WebCore/ChangeLog 2011-12-12 04:06:57 UTC (rev 102557) @@ -1,3 +1,17 @@ +2011-12-11 Luke Macpherson + +Implement webkit-line-grid and webkit-line-grid-snap CSS properties in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=74262 + +Reviewed by Andreas Kling. + +No new tests / refactoring only. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::applyProperty): + 2011-12-11 Kentaro Hara Use the [Supplemental] IDL for webaudio attributes in Chromium Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (102556 => 102557) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2011-12-12 03:55:06 UTC (rev 102556) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2011-12-12 04:06:57 UTC (rev 102557) @@ -1639,6 +1639,9 @@ setPropertyHandler(CSSPropertyWebkitHyphenateLimitBefore, ApplyPropertyNumber::createHandler()); setPropertyHandler(CSSPropertyWebkitHyphenateLimitLines, ApplyPropertyNumber::createHandler()); +setPropertyHandler(CSSPropertyWebkitLineGrid, ApplyPropertyString::createHandler()); +setPropertyHandler(CSSPropertyWebkitLineGridSnap, ApplyPropertyDefault::createHandler()); + setPropertyHandler(CSSPropertyWebkitTextCombine, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitTextEmphasisPosition, ApplyPropertyDefault::createHandler()); setPropertyHandler(CSSPropertyWebkitTextEmphasisStyle, ApplyPropertyTextEmphasisStyle::createHandler()); Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (102556 => 102557) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-12-12 03:55:06 UTC (rev 102556) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-12-12 04:06:57 UTC (rev 102557) @@ -3284,16 +3284,6 @@ else if (isInitial) m_style->resetColumnRule(); return; -case CSSPropertyWebkitLineGrid: -HANDLE_INHERIT_AND_INITIAL(lineGrid, LineGrid); -if (primitiveValue->getIdent() == CSSValueNone) -m_style->setLineGrid(nullAtom); -else -m_style->setLineGrid(primitiveValue->getStringValue()); -return; -case CSSPropertyWebkitLineGridSnap: -HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(lineGridSnap, LineGridSnap) -return; case CSSPropertyWebkitRegionBreakBefore: HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE(regionBreakBefore, RegionBreakBefore, PageBreak) return; @@ -3898,6 +3888,8 @@ case CSSPropertyWebkitHyphenateLimitAfter: case CSSPropertyWebkitHyphenateLimitBefore: case CSSPropertyWebkitHyphenateLimitLines: +case CSSPropertyWebkitLineGrid: +case CSSPropertyWebkitLineGridSnap: case CSSPropertyWebkitTextCombine: case CSSPropertyWebkitTextEmphasisPosition: case CSSPropertyWebkitTextEmphasisStyle: ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [102552] trunk/Source/WebCore
Title: [102552] trunk/Source/WebCore Revision 102552 Author macpher...@chromium.org Date 2011-12-11 18:24:28 -0800 (Sun, 11 Dec 2011) Log Message Implement CSS display property in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=73500 Reviewed by Andreas Kling. Refactoring only / no functionality changed. * css/CSSStyleApplyProperty.cpp: (WebCore::ApplyPropertyDisplay::isValidDisplayValue): (WebCore::ApplyPropertyDisplay::applyInheritValue): (WebCore::ApplyPropertyDisplay::applyInitialValue): (WebCore::ApplyPropertyDisplay::applyValue): (WebCore::ApplyPropertyDisplay::createHandler): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp trunk/Source/WebCore/css/CSSStyleSelector.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (102551 => 102552) --- trunk/Source/WebCore/ChangeLog 2011-12-12 01:22:49 UTC (rev 102551) +++ trunk/Source/WebCore/ChangeLog 2011-12-12 02:24:28 UTC (rev 102552) @@ -1,3 +1,22 @@ +2011-12-11 Luke Macpherson + +Implement CSS display property in CSSStyleApplyProperty. +https://bugs.webkit.org/show_bug.cgi?id=73500 + +Reviewed by Andreas Kling. + +Refactoring only / no functionality changed. + +* css/CSSStyleApplyProperty.cpp: +(WebCore::ApplyPropertyDisplay::isValidDisplayValue): +(WebCore::ApplyPropertyDisplay::applyInheritValue): +(WebCore::ApplyPropertyDisplay::applyInitialValue): +(WebCore::ApplyPropertyDisplay::applyValue): +(WebCore::ApplyPropertyDisplay::createHandler): +(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): +* css/CSSStyleSelector.cpp: +(WebCore::CSSStyleSelector::applyProperty): + 2011-12-11 Geoffrey Garen Try to fix the Qt build. Modified: trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp (102551 => 102552) --- trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2011-12-12 01:22:49 UTC (rev 102551) +++ trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp 2011-12-12 02:24:28 UTC (rev 102552) @@ -1349,6 +1349,49 @@ } }; +class ApplyPropertyDisplay { +private: +static inline bool isValidDisplayValue(CSSStyleSelector* selector, EDisplay displayPropertyValue) +{ +#if ENABLE(SVG) +if (selector->element() && selector->element()->isSVGElement() && selector->style()->styleType() == NOPSEUDO) +return (displayPropertyValue == INLINE || displayPropertyValue == BLOCK || displayPropertyValue == NONE); +#endif +return true; +} +public: +static void applyInheritValue(CSSStyleSelector* selector) +{ +EDisplay display = selector->parentStyle()->display(); +if (!isValidDisplayValue(selector, display)) +return; +selector->style()->setDisplay(display); +} + +static void applyInitialValue(CSSStyleSelector* selector) +{ +selector->style()->setDisplay(RenderStyle::initialDisplay()); +} + +static void applyValue(CSSStyleSelector* selector, CSSValue* value) +{ +if (!value->isPrimitiveValue()) +return; + +EDisplay display = *static_cast(value); + +if (!isValidDisplayValue(selector, display)) +return; + +selector->style()->setDisplay(display); +} + +static PropertyHandler createHandler() +{ +return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); +} +}; + const CSSStyleApplyProperty& CSSStyleApplyProperty::sharedCSSStyleApplyProperty() { DEFINE_STATIC_LOCAL(CSSStyleApplyProperty, cssStyleApplyPropertyInstance, ()); @@ -1373,6 +1416,8 @@ setPropertyHandler(CSSPropertyWebkitBackgroundComposite, ApplyPropertyFillLayer&FillLayer::isCompositeSet, &FillLayer::composite, &FillLayer::setComposite, &FillLayer::clearComposite, &FillLayer::initialFillComposite, &CSSStyleSelector::mapFillComposite>::createHandler()); +setPropertyHandler(CSSPropertyDisplay, ApplyPropertyDisplay::createHandler()); + setPropertyHandler(CSSPropertyBackgroundImage, ApplyPropertyFillLayer&FillLayer::isImageSet, &FillLayer::image, &FillLayer::setImage, &FillLayer::clearImage, &FillLayer::initialFillImage, &CSSStyleSelector::mapFillImage>::createHandler()); Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (102551 => 102552) --- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-12-12 01:22:49 UTC (rev 102551) +++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2011-12-12 02:24:28 UTC (rev 102552) @@ -2504,53 +2504,6 @@ return false; } -class SVGDisplayPropertyGuard { -WTF_MAKE_NONCOPYABLE(SVGDisplayPropertyGuard); -public: -SVGDisplayPr