[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
hyatt at apple.com
hyatt at apple.com
Wed Dec 22 13:35:07 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 213e566a7829accc068301a2cc35ebef2bfac1a1
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Sep 20 22:49:51 2010 +0000
https://bugs.webkit.org/show_bug.cgi?id=46132, add an isVerticalBlockFlow() method to RenderStyle and
patch callers so that they don't have to check both top-to-bottom and bottom-to-top block flow.
Reviewed by Dan Bernstein.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::availableLogicalWidth):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::logicalWidth):
(WebCore::RenderStyle::logicalHeight):
(WebCore::RenderStyle::logicalMinWidth):
(WebCore::RenderStyle::logicalMaxWidth):
(WebCore::RenderStyle::logicalMinHeight):
(WebCore::RenderStyle::logicalMaxHeight):
(WebCore::RenderStyle::borderStartWidth):
(WebCore::RenderStyle::borderEndWidth):
(WebCore::RenderStyle::marginStart):
(WebCore::RenderStyle::marginEnd):
(WebCore::RenderStyle::paddingStart):
(WebCore::RenderStyle::paddingEnd):
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::isVerticalBlockFlow):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67889 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6aae2d8..a664c49 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,31 @@
Reviewed by Dan Bernstein.
+ https://bugs.webkit.org/show_bug.cgi?id=46132, add an isVerticalBlockFlow() method to RenderStyle and
+ patch callers so that they don't have to check both top-to-bottom and bottom-to-top block flow.
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::availableLogicalWidth):
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::logicalWidth):
+ (WebCore::RenderStyle::logicalHeight):
+ (WebCore::RenderStyle::logicalMinWidth):
+ (WebCore::RenderStyle::logicalMaxWidth):
+ (WebCore::RenderStyle::logicalMinHeight):
+ (WebCore::RenderStyle::logicalMaxHeight):
+ (WebCore::RenderStyle::borderStartWidth):
+ (WebCore::RenderStyle::borderEndWidth):
+ (WebCore::RenderStyle::marginStart):
+ (WebCore::RenderStyle::marginEnd):
+ (WebCore::RenderStyle::paddingStart):
+ (WebCore::RenderStyle::paddingEnd):
+ * rendering/style/RenderStyle.h:
+ (WebCore::InheritedFlags::isVerticalBlockFlow):
+
+2010-09-20 David Hyatt <hyatt at apple.com>
+
+ Reviewed by Dan Bernstein.
+
https://bugs.webkit.org/show_bug.cgi?id=46124, add support for logical padding accessors to
RenderBoxModelObject.
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index 4e8eec3..65a6b0b 100644
--- a/WebCore/rendering/RenderBox.cpp
+++ b/WebCore/rendering/RenderBox.cpp
@@ -1736,7 +1736,7 @@ int RenderBox::availableHeightUsing(const Length& h) const
int RenderBox::availableLogicalWidth() const
{
- if (style()->blockFlow() == TopToBottomBlockFlow || style()->blockFlow() == BottomToTopBlockFlow)
+ if (style()->isVerticalBlockFlow())
return contentWidth();
return contentHeight();
}
diff --git a/WebCore/rendering/style/RenderStyle.cpp b/WebCore/rendering/style/RenderStyle.cpp
index a35f172..4b77d6b 100644
--- a/WebCore/rendering/style/RenderStyle.cpp
+++ b/WebCore/rendering/style/RenderStyle.cpp
@@ -1066,42 +1066,42 @@ const Color RenderStyle::visitedDependentColor(int colorProperty) const
Length RenderStyle::logicalWidth() const
{
- if (blockFlow() == TopToBottomBlockFlow || blockFlow() == BottomToTopBlockFlow)
+ if (isVerticalBlockFlow())
return width();
return height();
}
Length RenderStyle::logicalHeight() const
{
- if (blockFlow() == TopToBottomBlockFlow || blockFlow() == BottomToTopBlockFlow)
+ if (isVerticalBlockFlow())
return height();
return width();
}
Length RenderStyle::logicalMinWidth() const
{
- if (blockFlow() == TopToBottomBlockFlow || blockFlow() == BottomToTopBlockFlow)
+ if (isVerticalBlockFlow())
return minWidth();
return minHeight();
}
Length RenderStyle::logicalMaxWidth() const
{
- if (blockFlow() == TopToBottomBlockFlow || blockFlow() == BottomToTopBlockFlow)
+ if (isVerticalBlockFlow())
return maxWidth();
return maxHeight();
}
Length RenderStyle::logicalMinHeight() const
{
- if (blockFlow() == TopToBottomBlockFlow || blockFlow() == BottomToTopBlockFlow)
+ if (isVerticalBlockFlow())
return minHeight();
return minWidth();
}
Length RenderStyle::logicalMaxHeight() const
{
- if (blockFlow() == TopToBottomBlockFlow || blockFlow() == BottomToTopBlockFlow)
+ if (isVerticalBlockFlow())
return maxHeight();
return maxWidth();
}
@@ -1140,14 +1140,14 @@ unsigned short RenderStyle::borderAfterWidth() const
unsigned short RenderStyle::borderStartWidth() const
{
- if (blockFlow() == TopToBottomBlockFlow || blockFlow() == BottomToTopBlockFlow)
+ if (isVerticalBlockFlow())
return direction() == LTR ? borderLeftWidth() : borderRightWidth();
return direction() == LTR ? borderTopWidth() : borderBottomWidth();
}
unsigned short RenderStyle::borderEndWidth() const
{
- if (blockFlow() == TopToBottomBlockFlow || blockFlow() == BottomToTopBlockFlow)
+ if (isVerticalBlockFlow())
return direction() == LTR ? borderRightWidth() : borderLeftWidth();
return direction() == LTR ? borderBottomWidth() : borderTopWidth();
}
@@ -1186,14 +1186,14 @@ Length RenderStyle::marginAfter() const
Length RenderStyle::marginStart() const
{
- if (blockFlow() == TopToBottomBlockFlow || blockFlow() == BottomToTopBlockFlow)
+ if (isVerticalBlockFlow())
return direction() == LTR ? marginLeft() : marginRight();
return direction() == LTR ? marginTop() : marginBottom();
}
Length RenderStyle::marginEnd() const
{
- if (blockFlow() == TopToBottomBlockFlow || blockFlow() == BottomToTopBlockFlow)
+ if (isVerticalBlockFlow())
return direction() == LTR ? marginRight() : marginLeft();
return direction() == LTR ? marginBottom() : marginTop();
}
@@ -1232,14 +1232,14 @@ Length RenderStyle::paddingAfter() const
Length RenderStyle::paddingStart() const
{
- if (blockFlow() == TopToBottomBlockFlow || blockFlow() == BottomToTopBlockFlow)
+ if (isVerticalBlockFlow())
return direction() == LTR ? paddingLeft() : paddingRight();
return direction() == LTR ? paddingTop() : paddingBottom();
}
Length RenderStyle::paddingEnd() const
{
- if (blockFlow() == TopToBottomBlockFlow || blockFlow() == BottomToTopBlockFlow)
+ if (isVerticalBlockFlow())
return direction() == LTR ? paddingRight() : paddingLeft();
return direction() == LTR ? paddingBottom() : paddingTop();
}
diff --git a/WebCore/rendering/style/RenderStyle.h b/WebCore/rendering/style/RenderStyle.h
index b4aaf86..9616454 100644
--- a/WebCore/rendering/style/RenderStyle.h
+++ b/WebCore/rendering/style/RenderStyle.h
@@ -739,6 +739,7 @@ public:
ETextSecurity textSecurity() const { return static_cast<ETextSecurity>(rareInheritedData->textSecurity); }
EBlockFlowDirection blockFlow() const { return static_cast<EBlockFlowDirection>(inherited_flags._blockFlow); }
+ bool isVerticalBlockFlow() const { return blockFlow() == TopToBottomBlockFlow || blockFlow() == BottomToTopBlockFlow; }
// attribute setter methods
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list