[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:48:56 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 013f52cd3f6474b88de06fb7a972f7df3d8792a7
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Sep 27 20:16:23 2010 +0000

    https://bugs.webkit.org/show_bug.cgi?id=46647, add getters/setters for the logical position of a box.
    
    Reviewed by Dan Bernstein.
    
    Also made all of the logicalWidth/Height getters/setters inline for performance.
    
    * rendering/RenderBox.cpp:
    * rendering/RenderBox.h:
    (WebCore::RenderBox::logicalLeft):
    (WebCore::RenderBox::logicalTop):
    (WebCore::RenderBox::logicalWidth):
    (WebCore::RenderBox::logicalHeight):
    (WebCore::RenderBox::setLogicalLeft):
    (WebCore::RenderBox::setLogicalTop):
    (WebCore::RenderBox::setLogicalWidth):
    (WebCore::RenderBox::setLogicalHeight):
    (WebCore::RenderBox::setLogicalLocation):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68420 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index a6e0ce1..d528e67 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,25 @@
 2010-09-27  David Hyatt  <hyatt at apple.com>
 
+        Reviewed by Dan Bernstein.
+
+        https://bugs.webkit.org/show_bug.cgi?id=46647, add getters/setters for the logical position of a box.
+
+        Also made all of the logicalWidth/Height getters/setters inline for performance.
+
+        * rendering/RenderBox.cpp:
+        * rendering/RenderBox.h:
+        (WebCore::RenderBox::logicalLeft):
+        (WebCore::RenderBox::logicalTop):
+        (WebCore::RenderBox::logicalWidth):
+        (WebCore::RenderBox::logicalHeight):
+        (WebCore::RenderBox::setLogicalLeft):
+        (WebCore::RenderBox::setLogicalTop):
+        (WebCore::RenderBox::setLogicalWidth):
+        (WebCore::RenderBox::setLogicalHeight):
+        (WebCore::RenderBox::setLogicalLocation):
+
+2010-09-27  David Hyatt  <hyatt at apple.com>
+
         Reviewed by Sam Weinig.
 
         https://bugs.webkit.org/show_bug.cgi?id=46639, make computeLogicalHeight block-flow-aware.
diff --git a/WebCore/rendering/RenderBox.cpp b/WebCore/rendering/RenderBox.cpp
index 14d0270..fc8b305 100644
--- a/WebCore/rendering/RenderBox.cpp
+++ b/WebCore/rendering/RenderBox.cpp
@@ -83,32 +83,6 @@ RenderBox::~RenderBox()
 {
 }
 
-int RenderBox::logicalWidth() const
-{
-    return style()->isVerticalBlockFlow() ? width() : height();
-}
-
-int RenderBox::logicalHeight() const
-{
-    return style()->isVerticalBlockFlow() ? height() : width();
-}
-
-void RenderBox::setLogicalWidth(int size)
-{
-    if (style()->isVerticalBlockFlow())
-        setWidth(size);
-    else
-        setHeight(size);
-}
-
-void RenderBox::setLogicalHeight(int size)
-{
-    if (style()->isVerticalBlockFlow())
-        setHeight(size);
-    else
-        setWidth(size);
-}
-
 int RenderBox::marginBefore() const
 {
     return marginBeforeUsing(style());
diff --git a/WebCore/rendering/RenderBox.h b/WebCore/rendering/RenderBox.h
index 10d9b45..3e0e848 100644
--- a/WebCore/rendering/RenderBox.h
+++ b/WebCore/rendering/RenderBox.h
@@ -50,11 +50,46 @@ public:
     void setWidth(int width) { m_frameRect.setWidth(width); }
     void setHeight(int height) { m_frameRect.setHeight(height); }
 
-    int logicalWidth() const;
-    int logicalHeight() const;
-    void setLogicalWidth(int);
-    void setLogicalHeight(int);
-    
+    int logicalLeft() const { return style()->isVerticalBlockFlow() ? x() : y(); }
+    int logicalTop() const { return style()->isVerticalBlockFlow() ? y() : x(); }
+    int logicalWidth() const { return style()->isVerticalBlockFlow() ? width() : height(); }
+    int logicalHeight() const { return style()->isVerticalBlockFlow() ? height() : width(); }
+    void setLogicalLeft(int left)
+    {
+        if (style()->isVerticalBlockFlow())
+            setX(left);
+        else
+            setY(left);
+    }
+    void setLogicalTop(int top)
+    {
+        if (style()->isVerticalBlockFlow())
+            setY(top);
+        else
+            setX(top);
+    }
+    void setLogicalWidth(int size)
+    {
+        if (style()->isVerticalBlockFlow())
+            setWidth(size);
+        else
+            setHeight(size);
+    }
+    void setLogicalHeight(int size)
+    {
+        if (style()->isVerticalBlockFlow())
+            setHeight(size);
+        else
+            setWidth(size);
+    }
+    void setLogicalLocation(int left, int top)
+    {
+        if (style()->isVerticalBlockFlow())
+            setLocation(left, top);
+        else
+            setLocation(top, left);
+    }
+
     IntPoint location() const { return m_frameRect.location(); }
     IntSize locationOffset() const { return IntSize(x(), y()); }
     IntSize size() const { return m_frameRect.size(); }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list