Title: [231213] tags/Safari-606.1.15.0.1/Source/WebCore
Revision
231213
Author
[email protected]
Date
2018-05-01 15:03:45 -0700 (Tue, 01 May 2018)

Log Message

Cherry-pick r230979. rdar://problem/39707298

    visitedDependentColor() should take a CSSPropertyID
    https://bugs.webkit.org/show_bug.cgi?id=184949

    Reviewed by Sam Weinig.

    Change RenderStyle::colorIncludingFallback(), RenderStyle::visitedDependentColor()
    and RenderElement::selectionColor() to take CSSPropertyID rather than int.

    No behavior change.

    * rendering/RenderElement.cpp:
    (WebCore::RenderElement::selectionColor const):
    * rendering/RenderElement.h:
    * rendering/RenderTableCell.cpp:
    (WebCore::RenderTableCell::computeCollapsedStartBorder const):
    (WebCore::RenderTableCell::computeCollapsedEndBorder const):
    (WebCore::RenderTableCell::computeCollapsedBeforeBorder const):
    (WebCore::RenderTableCell::computeCollapsedAfterBorder const):
    * rendering/style/RenderStyle.cpp:
    (WebCore::RenderStyle::colorIncludingFallback const):
    (WebCore::RenderStyle::visitedDependentColor const):
    * rendering/style/RenderStyle.h:

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

Modified Paths

Diff

Modified: tags/Safari-606.1.15.0.1/Source/WebCore/ChangeLog (231212 => 231213)


--- tags/Safari-606.1.15.0.1/Source/WebCore/ChangeLog	2018-05-01 21:46:32 UTC (rev 231212)
+++ tags/Safari-606.1.15.0.1/Source/WebCore/ChangeLog	2018-05-01 22:03:45 UTC (rev 231213)
@@ -1,5 +1,59 @@
 2018-04-30  Jason Marcell  <[email protected]>
 
+        Cherry-pick r230979. rdar://problem/39707298
+
+    visitedDependentColor() should take a CSSPropertyID
+    https://bugs.webkit.org/show_bug.cgi?id=184949
+    
+    Reviewed by Sam Weinig.
+    
+    Change RenderStyle::colorIncludingFallback(), RenderStyle::visitedDependentColor()
+    and RenderElement::selectionColor() to take CSSPropertyID rather than int.
+    
+    No behavior change.
+    
+    * rendering/RenderElement.cpp:
+    (WebCore::RenderElement::selectionColor const):
+    * rendering/RenderElement.h:
+    * rendering/RenderTableCell.cpp:
+    (WebCore::RenderTableCell::computeCollapsedStartBorder const):
+    (WebCore::RenderTableCell::computeCollapsedEndBorder const):
+    (WebCore::RenderTableCell::computeCollapsedBeforeBorder const):
+    (WebCore::RenderTableCell::computeCollapsedAfterBorder const):
+    * rendering/style/RenderStyle.cpp:
+    (WebCore::RenderStyle::colorIncludingFallback const):
+    (WebCore::RenderStyle::visitedDependentColor const):
+    * rendering/style/RenderStyle.h:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230979 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2018-04-24  Simon Fraser  <[email protected]>
+
+            visitedDependentColor() should take a CSSPropertyID
+            https://bugs.webkit.org/show_bug.cgi?id=184949
+
+            Reviewed by Sam Weinig.
+
+            Change RenderStyle::colorIncludingFallback(), RenderStyle::visitedDependentColor()
+            and RenderElement::selectionColor() to take CSSPropertyID rather than int.
+
+            No behavior change.
+
+            * rendering/RenderElement.cpp:
+            (WebCore::RenderElement::selectionColor const):
+            * rendering/RenderElement.h:
+            * rendering/RenderTableCell.cpp:
+            (WebCore::RenderTableCell::computeCollapsedStartBorder const):
+            (WebCore::RenderTableCell::computeCollapsedEndBorder const):
+            (WebCore::RenderTableCell::computeCollapsedBeforeBorder const):
+            (WebCore::RenderTableCell::computeCollapsedAfterBorder const):
+            * rendering/style/RenderStyle.cpp:
+            (WebCore::RenderStyle::colorIncludingFallback const):
+            (WebCore::RenderStyle::visitedDependentColor const):
+            * rendering/style/RenderStyle.h:
+
+2018-04-30  Jason Marcell  <[email protected]>
+
         Cherry-pick r231082. rdar://problem/39664967
 
     Implement rendering support for the color-filter CSS property

Modified: tags/Safari-606.1.15.0.1/Source/WebCore/rendering/RenderElement.cpp (231212 => 231213)


--- tags/Safari-606.1.15.0.1/Source/WebCore/rendering/RenderElement.cpp	2018-05-01 21:46:32 UTC (rev 231212)
+++ tags/Safari-606.1.15.0.1/Source/WebCore/rendering/RenderElement.cpp	2018-05-01 22:03:45 UTC (rev 231213)
@@ -1356,7 +1356,7 @@
     return style;
 }
 
-Color RenderElement::selectionColor(int colorProperty) const
+Color RenderElement::selectionColor(CSSPropertyID colorProperty) const
 {
     // If the element is unselectable, or we are only painting the selection,
     // don't override the foreground color with the selection foreground color.

Modified: tags/Safari-606.1.15.0.1/Source/WebCore/rendering/RenderElement.h (231212 => 231213)


--- tags/Safari-606.1.15.0.1/Source/WebCore/rendering/RenderElement.h	2018-05-01 21:46:32 UTC (rev 231212)
+++ tags/Safari-606.1.15.0.1/Source/WebCore/rendering/RenderElement.h	2018-05-01 22:03:45 UTC (rev 231213)
@@ -70,7 +70,7 @@
     bool canContainFixedPositionObjects() const;
     bool canContainAbsolutelyPositionedObjects() const;
 
-    Color selectionColor(int colorProperty) const;
+    Color selectionColor(CSSPropertyID) const;
     std::unique_ptr<RenderStyle> selectionPseudoStyle() const;
 
     // Obtains the selection colors that should be used when painting a selection.

Modified: tags/Safari-606.1.15.0.1/Source/WebCore/rendering/RenderTableCell.cpp (231212 => 231213)


--- tags/Safari-606.1.15.0.1/Source/WebCore/rendering/RenderTableCell.cpp	2018-05-01 21:46:32 UTC (rev 231212)
+++ tags/Safari-606.1.15.0.1/Source/WebCore/rendering/RenderTableCell.cpp	2018-05-01 22:03:45 UTC (rev 231213)
@@ -558,8 +558,8 @@
 {
     // For the start border, we need to check, in order of precedence:
     // (1) Our start border.
-    int startColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderStartColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : 0;
-    int endColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderEndColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : 0;
+    CSSPropertyID startColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderStartColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : CSSPropertyInvalid;
+    CSSPropertyID endColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderEndColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : CSSPropertyInvalid;
     CollapsedBorderValue result(style().borderStart(), includeColor ? style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BCELL);
 
     RenderTable* table = this->table();
@@ -669,8 +669,8 @@
 {
     // For end border, we need to check, in order of precedence:
     // (1) Our end border.
-    int startColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderStartColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : 0;
-    int endColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderEndColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : 0;
+    CSSPropertyID startColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderStartColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : CSSPropertyInvalid;
+    CSSPropertyID endColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderEndColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : CSSPropertyInvalid;
     CollapsedBorderValue result = CollapsedBorderValue(style().borderEnd(), includeColor ? style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BCELL);
 
     RenderTable* table = this->table();
@@ -782,8 +782,8 @@
 {
     // For before border, we need to check, in order of precedence:
     // (1) Our before border.
-    int beforeColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderBeforeColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : 0;
-    int afterColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderAfterColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : 0;
+    CSSPropertyID beforeColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderBeforeColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : CSSPropertyInvalid;
+    CSSPropertyID afterColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderAfterColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : CSSPropertyInvalid;
     CollapsedBorderValue result = CollapsedBorderValue(style().borderBefore(), includeColor ? style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BCELL);
     
     RenderTable* table = this->table();
@@ -879,8 +879,8 @@
 {
     // For after border, we need to check, in order of precedence:
     // (1) Our after border.
-    int beforeColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderBeforeColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : 0;
-    int afterColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderAfterColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : 0;
+    CSSPropertyID beforeColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderBeforeColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : CSSPropertyInvalid;
+    CSSPropertyID afterColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderAfterColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : CSSPropertyInvalid;
     CollapsedBorderValue result = CollapsedBorderValue(style().borderAfter(), includeColor ? style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BCELL);
     
     RenderTable* table = this->table();

Modified: tags/Safari-606.1.15.0.1/Source/WebCore/rendering/style/RenderStyle.cpp (231212 => 231213)


--- tags/Safari-606.1.15.0.1/Source/WebCore/rendering/style/RenderStyle.cpp	2018-05-01 21:46:32 UTC (rev 231212)
+++ tags/Safari-606.1.15.0.1/Source/WebCore/rendering/style/RenderStyle.cpp	2018-05-01 22:03:45 UTC (rev 231213)
@@ -1757,7 +1757,7 @@
     }
 }
 
-Color RenderStyle::colorIncludingFallback(int colorProperty, bool visitedLink) const
+Color RenderStyle::colorIncludingFallback(CSSPropertyID colorProperty, bool visitedLink) const
 {
     Color result;
     EBorderStyle borderStyle = BNONE;
@@ -1821,7 +1821,7 @@
     return result;
 }
 
-Color RenderStyle::visitedDependentColor(int colorProperty) const
+Color RenderStyle::visitedDependentColor(CSSPropertyID colorProperty) const
 {
     Color unvisitedColor = colorIncludingFallback(colorProperty, false);
     if (insideLink() != InsideVisitedLink)

Modified: tags/Safari-606.1.15.0.1/Source/WebCore/rendering/style/RenderStyle.h (231212 => 231213)


--- tags/Safari-606.1.15.0.1/Source/WebCore/rendering/style/RenderStyle.h	2018-05-01 21:46:32 UTC (rev 231212)
+++ tags/Safari-606.1.15.0.1/Source/WebCore/rendering/style/RenderStyle.h	2018-05-01 22:03:45 UTC (rev 231213)
@@ -1408,7 +1408,7 @@
     bool lastChildState() const { return m_nonInheritedFlags.lastChildState; }
     void setLastChildState() { setUnique(); m_nonInheritedFlags.lastChildState = true; }
 
-    WEBCORE_EXPORT Color visitedDependentColor(int colorProperty) const;
+    WEBCORE_EXPORT Color visitedDependentColor(CSSPropertyID) const;
     WEBCORE_EXPORT Color visitedDependentColorWithColorFilter(CSSPropertyID) const;
 
     WEBCORE_EXPORT Color colorByApplyingColorFilter(const Color&) const;
@@ -1825,7 +1825,7 @@
     static bool isDisplayGridBox(EDisplay);
     static bool isDisplayFlexibleOrGridBox(EDisplay);
 
-    Color colorIncludingFallback(int colorProperty, bool visitedLink) const;
+    Color colorIncludingFallback(CSSPropertyID colorProperty, bool visitedLink) const;
 
     bool changeAffectsVisualOverflow(const RenderStyle&) const;
     bool changeRequiresLayout(const RenderStyle&, unsigned& changedContextSensitiveProperties) const;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to