border-radius on html does not render properly.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Aug 2014 18:23:13 +0000 (18:23 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Aug 2014 18:23:13 +0000 (18:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=135706

Reviewed by Simon Fraser.

Ensure that background is initialized when border-radius is present.

Source/WebCore:

Test: fast/borders/border-radius-on-html.html

* rendering/RenderView.cpp:
(WebCore::rendererObscuresBackground):

LayoutTests:

* fast/borders/border-radius-on-html-expected.html: Added.
* fast/borders/border-radius-on-html.html: Added.

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

LayoutTests/ChangeLog
LayoutTests/fast/borders/border-radius-on-html-expected.html [new file with mode: 0644]
LayoutTests/fast/borders/border-radius-on-html.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderView.cpp

index 325a3ad..70f7e95 100644 (file)
@@ -1,3 +1,15 @@
+2014-08-07  Zalan Bujtas  <zalan@apple.com>
+
+        border-radius on html does not render properly.
+        https://bugs.webkit.org/show_bug.cgi?id=135706
+
+        Reviewed by Simon Fraser.
+
+        Ensure that background is initialized when border-radius is present.
+
+        * fast/borders/border-radius-on-html-expected.html: Added.
+        * fast/borders/border-radius-on-html.html: Added.
+
 2014-08-07  Mark Hahnenberg  <mhahnenberg@apple.com>
 
         for-in is failing fast/dom/dataset-xhtml.xhtml and dataset.html tests
diff --git a/LayoutTests/fast/borders/border-radius-on-html-expected.html b/LayoutTests/fast/borders/border-radius-on-html-expected.html
new file mode 100644 (file)
index 0000000..9037402
--- /dev/null
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that border-radius on html renders correctly.</title>
+<style>
+  body { 
+    margin: 0px;
+  }
+  div {
+    border-radius: 100%;
+    background-color: green;
+  }
+</style>
+</head>
+<body>
+<div id=foo></div>
+<script>
+var container = document.getElementById("foo");
+container.style.width = window.innerWidth  + "px";
+container.style.height = window.innerHeight + "px";
+</script>
+</body>
+</html>
diff --git a/LayoutTests/fast/borders/border-radius-on-html.html b/LayoutTests/fast/borders/border-radius-on-html.html
new file mode 100644 (file)
index 0000000..1511bdd
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that border-radius on html renders correctly.</title>
+<style>
+  html {
+    border-radius: 100%;
+    background-color: green;
+  }
+</style>
+</head>
+<body>
+</body>
+</html>
index ac449e1..b124f0e 100644 (file)
@@ -1,3 +1,17 @@
+2014-08-07  Zalan Bujtas  <zalan@apple.com>
+
+        border-radius on html does not render properly.
+        https://bugs.webkit.org/show_bug.cgi?id=135706
+
+        Reviewed by Simon Fraser.
+
+        Ensure that background is initialized when border-radius is present.
+
+        Test: fast/borders/border-radius-on-html.html
+
+        * rendering/RenderView.cpp:
+        (WebCore::rendererObscuresBackground):
+
 2014-08-07  Pratik Solanki  <psolanki@apple.com>
 
         Random resource replacement on beta.icloud.com
index 529f4c3..9670ffa 100644 (file)
@@ -523,6 +523,9 @@ static inline bool rendererObscuresBackground(RenderElement* rootObject)
     if (rootObject->rendererForRootBackground().style().backgroundClip() == TextFillBox)
         return false;
 
+    if (style.hasBorderRadius())
+        return false;
+
     return true;
 }