[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:04 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 03db3f0700a666138c64f82614eb4afea995c344
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Sep 20 22:38:40 2010 +0000
https://bugs.webkit.org/show_bug.cgi?id=46124, add support for logical padding accessors to
RenderBoxModelObject.
Reviewed by Dan Bernstein.
Added fast/blockflow/percentage-padding.html even though it fails, so that when more of layout is patched
we can see it start passing.
WebCore:
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paddingTop):
(WebCore::RenderBoxModelObject::paddingBottom):
(WebCore::RenderBoxModelObject::paddingLeft):
(WebCore::RenderBoxModelObject::paddingRight):
(WebCore::RenderBoxModelObject::paddingBefore):
(WebCore::RenderBoxModelObject::paddingAfter):
(WebCore::RenderBoxModelObject::paddingStart):
(WebCore::RenderBoxModelObject::paddingEnd):
* rendering/RenderBoxModelObject.h:
LayoutTests:
* fast/blockflow: Added.
* fast/blockflow/percentage-padding-expected.txt: Added.
* fast/blockflow/percentage-padding.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 02dd515..8ad17d9 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+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.
+
+ Added fast/blockflow/percentage-padding.html even though it fails, so that when more of layout is patched
+ we can see it start passing.
+
+ * fast/blockflow: Added.
+ * fast/blockflow/percentage-padding-expected.txt: Added.
+ * fast/blockflow/percentage-padding.html: Added.
+
2010-09-20 Eric Carlson <eric.carlson at apple.com>
Rubber-stamped by by Simon Fraser.
diff --git a/LayoutTests/fast/blockflow/percentage-padding-expected.txt b/LayoutTests/fast/blockflow/percentage-padding-expected.txt
new file mode 100644
index 0000000..b4b5330
--- /dev/null
+++ b/LayoutTests/fast/blockflow/percentage-padding-expected.txt
@@ -0,0 +1 @@
+FAIL: The floating block should be 300x400 pixels in size.
diff --git a/LayoutTests/fast/blockflow/percentage-padding.html b/LayoutTests/fast/blockflow/percentage-padding.html
new file mode 100644
index 0000000..7bb31dd
--- /dev/null
+++ b/LayoutTests/fast/blockflow/percentage-padding.html
@@ -0,0 +1,32 @@
+<html>
+<head>
+<style>
+.block
+{
+ width:100px;
+ height:200px;
+ padding:50%;
+ background-color:green;
+}
+</style>
+</head>
+<body>
+<div style="width:100px;height:200px; -webkit-block-flow:lr;">
+<div id="test" class="block"></div>
+</div>
+<div id="console"></div>
+<script>
+if (window.layoutTestController)
+ window.layoutTestController.dumpAsText();
+test = document.getElementById("test");
+rect = test.getBoundingClientRect();
+width = rect.right - rect.left;
+height = rect.top - rect.bottom;
+if (width != 300 || height != 400) {
+ document.getElementById('console').innerHTML = "FAIL: The floating block should be 300x400 pixels in size.";
+ test.style.backgroundColor = 'red';
+} else
+ document.getElementById('console').innerHTML = "PASS: The floating block is the correct size.";
+</script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d8f8fab..6aae2d8 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,27 @@
Reviewed by Dan Bernstein.
+ https://bugs.webkit.org/show_bug.cgi?id=46124, add support for logical padding accessors to
+ RenderBoxModelObject.
+
+ Added fast/blockflow/percentage-padding.html even though it fails, so that when more of layout is patched
+ we can see it start passing.
+
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::paddingTop):
+ (WebCore::RenderBoxModelObject::paddingBottom):
+ (WebCore::RenderBoxModelObject::paddingLeft):
+ (WebCore::RenderBoxModelObject::paddingRight):
+ (WebCore::RenderBoxModelObject::paddingBefore):
+ (WebCore::RenderBoxModelObject::paddingAfter):
+ (WebCore::RenderBoxModelObject::paddingStart):
+ (WebCore::RenderBoxModelObject::paddingEnd):
+ * rendering/RenderBoxModelObject.h:
+
+2010-09-20 David Hyatt <hyatt at apple.com>
+
+ Reviewed by Dan Bernstein.
+
https://bugs.webkit.org/show_bug.cgi?id=46126, add availableLogicalWidth() to RenderBox.
* rendering/RenderBlock.cpp:
diff --git a/WebCore/rendering/RenderBoxModelObject.cpp b/WebCore/rendering/RenderBoxModelObject.cpp
index 0fbc9f2..f4c2d2a 100644
--- a/WebCore/rendering/RenderBoxModelObject.cpp
+++ b/WebCore/rendering/RenderBoxModelObject.cpp
@@ -432,7 +432,7 @@ int RenderBoxModelObject::paddingTop(bool) const
int w = 0;
Length padding = style()->paddingTop();
if (padding.isPercent())
- w = containingBlock()->availableWidth();
+ w = containingBlock()->availableLogicalWidth();
return padding.calcMinValue(w);
}
@@ -441,7 +441,7 @@ int RenderBoxModelObject::paddingBottom(bool) const
int w = 0;
Length padding = style()->paddingBottom();
if (padding.isPercent())
- w = containingBlock()->availableWidth();
+ w = containingBlock()->availableLogicalWidth();
return padding.calcMinValue(w);
}
@@ -450,7 +450,7 @@ int RenderBoxModelObject::paddingLeft(bool) const
int w = 0;
Length padding = style()->paddingLeft();
if (padding.isPercent())
- w = containingBlock()->availableWidth();
+ w = containingBlock()->availableLogicalWidth();
return padding.calcMinValue(w);
}
@@ -459,7 +459,43 @@ int RenderBoxModelObject::paddingRight(bool) const
int w = 0;
Length padding = style()->paddingRight();
if (padding.isPercent())
- w = containingBlock()->availableWidth();
+ w = containingBlock()->availableLogicalWidth();
+ return padding.calcMinValue(w);
+}
+
+int RenderBoxModelObject::paddingBefore(bool) const
+{
+ int w = 0;
+ Length padding = style()->paddingBefore();
+ if (padding.isPercent())
+ w = containingBlock()->availableLogicalWidth();
+ return padding.calcMinValue(w);
+}
+
+int RenderBoxModelObject::paddingAfter(bool) const
+{
+ int w = 0;
+ Length padding = style()->paddingAfter();
+ if (padding.isPercent())
+ w = containingBlock()->availableLogicalWidth();
+ return padding.calcMinValue(w);
+}
+
+int RenderBoxModelObject::paddingStart(bool) const
+{
+ int w = 0;
+ Length padding = style()->paddingStart();
+ if (padding.isPercent())
+ w = containingBlock()->availableLogicalWidth();
+ return padding.calcMinValue(w);
+}
+
+int RenderBoxModelObject::paddingEnd(bool) const
+{
+ int w = 0;
+ Length padding = style()->paddingEnd();
+ if (padding.isPercent())
+ w = containingBlock()->availableLogicalWidth();
return padding.calcMinValue(w);
}
diff --git a/WebCore/rendering/RenderBoxModelObject.h b/WebCore/rendering/RenderBoxModelObject.h
index 49d5f3d..e91e799 100644
--- a/WebCore/rendering/RenderBoxModelObject.h
+++ b/WebCore/rendering/RenderBoxModelObject.h
@@ -70,6 +70,10 @@ public:
virtual int paddingBottom(bool includeIntrinsicPadding = true) const;
virtual int paddingLeft(bool includeIntrinsicPadding = true) const;
virtual int paddingRight(bool includeIntrinsicPadding = true) const;
+ virtual int paddingBefore(bool includeIntrinsicPadding = true) const;
+ virtual int paddingAfter(bool includeIntrinsicPadding = true) const;
+ virtual int paddingStart(bool includeIntrinsicPadding = true) const;
+ virtual int paddingEnd(bool includeIntrinsicPadding = true) const;
virtual int borderTop() const { return style()->borderTopWidth(); }
virtual int borderBottom() const { return style()->borderBottomWidth(); }
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list