Title: [91654] trunk
Revision
91654
Author
[email protected]
Date
2011-07-24 20:36:52 -0700 (Sun, 24 Jul 2011)

Log Message

Validation message bubble position is incorrect if the containing block has paddings.
https://bugs.webkit.org/show_bug.cgi?id=65091

Reviewed by Hajime Morita.

Source/WebCore:

* html/ValidationMessage.cpp:
(WebCore::adjustBubblePosition):
We don't need to subtract paddings because the origin of
position:aboslute is inside borders and outside of the padding.

LayoutTests:

* fast/forms/validation-message-in-relative-body.html: Update the test to cover a padding case.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (91653 => 91654)


--- trunk/LayoutTests/ChangeLog	2011-07-25 02:16:57 UTC (rev 91653)
+++ trunk/LayoutTests/ChangeLog	2011-07-25 03:36:52 UTC (rev 91654)
@@ -1,3 +1,12 @@
+2011-07-24  Kent Tamura  <[email protected]>
+
+        Validation message bubble position is incorrect if the containing block has paddings.
+        https://bugs.webkit.org/show_bug.cgi?id=65091
+
+        Reviewed by Hajime Morita.
+
+        * fast/forms/validation-message-in-relative-body.html: Update the test to cover a padding case.
+
 2011-07-24  Rob Buis  <[email protected]>
 
         Crash in SVGUseElement::updateContainerOffsets on <use> with no parent

Modified: trunk/LayoutTests/fast/forms/validation-message-in-relative-body.html (91653 => 91654)


--- trunk/LayoutTests/fast/forms/validation-message-in-relative-body.html	2011-07-25 02:16:57 UTC (rev 91653)
+++ trunk/LayoutTests/fast/forms/validation-message-in-relative-body.html	2011-07-25 03:36:52 UTC (rev 91654)
@@ -11,6 +11,7 @@
     margin: 10px auto;
     background-color: #eee;
     border: 13px solid yellow;
+    padding: 9px;
 }
 </style>
 </head>

Modified: trunk/Source/WebCore/ChangeLog (91653 => 91654)


--- trunk/Source/WebCore/ChangeLog	2011-07-25 02:16:57 UTC (rev 91653)
+++ trunk/Source/WebCore/ChangeLog	2011-07-25 03:36:52 UTC (rev 91654)
@@ -1,3 +1,15 @@
+2011-07-24  Kent Tamura  <[email protected]>
+
+        Validation message bubble position is incorrect if the containing block has paddings.
+        https://bugs.webkit.org/show_bug.cgi?id=65091
+
+        Reviewed by Hajime Morita.
+
+        * html/ValidationMessage.cpp:
+        (WebCore::adjustBubblePosition):
+        We don't need to subtract paddings because the origin of
+        position:aboslute is inside borders and outside of the padding.
+
 2011-07-24  Rob Buis  <[email protected]>
 
         Crash in SVGUseElement::updateContainerOffsets on <use> with no parent

Modified: trunk/Source/WebCore/html/ValidationMessage.cpp (91653 => 91654)


--- trunk/Source/WebCore/html/ValidationMessage.cpp	2011-07-25 02:16:57 UTC (rev 91653)
+++ trunk/Source/WebCore/html/ValidationMessage.cpp	2011-07-25 03:36:52 UTC (rev 91654)
@@ -115,8 +115,8 @@
     double hostY = hostRect.y();
     if (RenderBox* container = bubble->renderer()->containingBlock()) {
         FloatPoint containerLocation = container->localToAbsolute();
-        hostX -= containerLocation.x() + container->borderLeft() + container->paddingLeft();
-        hostY -= containerLocation.y() + container->borderTop() + container->paddingTop();
+        hostX -= containerLocation.x() + container->borderLeft();
+        hostY -= containerLocation.y() + container->borderTop();
     }
     bubble->getInlineStyleDecl()->setProperty(CSSPropertyTop, hostY + hostRect.height(), CSSPrimitiveValue::CSS_PX);
     // The 'left' value of ::-webkit-validation-bubble-arrow.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to