Skip to content
Browse files

Fixed swipe work with error message. Get rid of superfluous element c…

…reation
  • Loading branch information...
1 parent 0e2627a commit bbcbce9c8d4db836e55dd2874ddd63748d1bff2a @DmitryBaranovskiy DmitryBaranovskiy committed
Showing with 11 additions and 14 deletions.
  1. +2 −2 demos/css-regions/road-trip/css/style.css
  2. +9 −12 demos/css-regions/road-trip/road-trip.html
View
4 demos/css-regions/road-trip/css/style.css
@@ -34,10 +34,10 @@ html, body {
#viewport > div {
display: table; }
-#viewport .hidden-error {
+p.hidden-error {
display: none;
}
-#viewport .error {
+p.error {
font-family: Helvetica, Arial, sans-serif;
background: #ffc;
padding: 15px 30px;
View
21 demos/css-regions/road-trip/road-trip.html
@@ -19,13 +19,13 @@
<link rel="stylesheet" href="css/style.css" media="all">
</head>
<body>
+ <p class="hidden-error">
+ <strong>Warning:</strong>
+ You need to use a
+ <a href="http://nightly.webkit.org/" target="_blank">WebKit nightly</a>
+ browser build to see this example working correctly.
+ </p>
<div id="viewport">
- <p class="hidden-error">
- <strong>Warning:</strong>
- You need to use a
- <a href="http://nightly.webkit.org/" target="_blank">WebKit nightly</a>
- browser build to see this example working correctly.
- </p>
<div>
<div class="page" style="display:block">
<div class="region"></div>
@@ -148,19 +148,16 @@
if (!("webkitGetNamedFlows" in document)) {
return false;
}
- var test = document.createElement("span"),
+ var head = document.getElementsByTagName("head")[0],
hasOverset,
flow;
- // head
- test.style["-webkit-flow-into"] = "testflow";
- document.body.appendChild(test);
+ head.style["-webkit-flow-into"] = "testflow";
flow = document.webkitGetNamedFlows().namedItem("testflow");
// older implementations used to have overflow not overset
hasOverset = "overset" in flow;
// cleanup
- test.style["-webkit-flow-into"] = "none";
- test.parentNode.removeChild(test);
+ head.style["-webkit-flow-into"] = "none";
return hasOverset;
}())
};

0 comments on commit bbcbce9

Please sign in to comment.
Something went wrong with that request. Please try again.