Title: [167716] trunk
- Revision
- 167716
- Author
- [email protected]
- Date
- 2014-04-23 11:39:57 -0700 (Wed, 23 Apr 2014)
Log Message
REGRESSION (Safari 6 - ToT): Incorrectly assumes that RenderStyle data can be shared
https://bugs.webkit.org/show_bug.cgi?id=113058
Patch by Morten Stenshorne <[email protected]> on 2014-04-23
Reviewed by David Hyatt.
Source/WebCore:
Before sharing CSS properties with an element in the cache, we need to
check that the new element is suitable for this, just like we check
elements before inserting them into the cache.
Test: fast/css/identical-logical-height-decl.html
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyMatchedProperties):
LayoutTests:
* fast/css/identical-logical-height-decl-expected.html: Added.
* fast/css/identical-logical-height-decl.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (167715 => 167716)
--- trunk/LayoutTests/ChangeLog 2014-04-23 18:36:26 UTC (rev 167715)
+++ trunk/LayoutTests/ChangeLog 2014-04-23 18:39:57 UTC (rev 167716)
@@ -1,3 +1,13 @@
+2014-04-23 Morten Stenshorne <[email protected]>
+
+ REGRESSION (Safari 6 - ToT): Incorrectly assumes that RenderStyle data can be shared
+ https://bugs.webkit.org/show_bug.cgi?id=113058
+
+ Reviewed by David Hyatt.
+
+ * fast/css/identical-logical-height-decl-expected.html: Added.
+ * fast/css/identical-logical-height-decl.html: Added.
+
2014-04-23 Lorenzo Tilve <[email protected]>
[GTK] Unreviewed GTK gardening
Added: trunk/LayoutTests/fast/css/identical-logical-height-decl-expected.html (0 => 167716)
--- trunk/LayoutTests/fast/css/identical-logical-height-decl-expected.html (rev 0)
+++ trunk/LayoutTests/fast/css/identical-logical-height-decl-expected.html 2014-04-23 18:39:57 UTC (rev 167716)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Identical style declaration on elements with different writing modes</title>
+ </head>
+ <body style="overflow:hidden;">
+ <p>There should be no red on this page.</p>
+ </body>
+</html>
Added: trunk/LayoutTests/fast/css/identical-logical-height-decl.html (0 => 167716)
--- trunk/LayoutTests/fast/css/identical-logical-height-decl.html (rev 0)
+++ trunk/LayoutTests/fast/css/identical-logical-height-decl.html 2014-04-23 18:39:57 UTC (rev 167716)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Identical style declaration on elements with different writing modes</title>
+ </head>
+ <body style="overflow:hidden;">
+ <p>There should be no red on this page.</p>
+ <div style="-webkit-logical-height:10px;"></div> <!-- set height -->
+ <div style="-webkit-writing-mode:vertical-lr; width:100px; height:100px; background:red;">
+ <div style="-webkit-logical-height:10px;"> <!-- set width! -->
+ <div style="width:100px; background:white;"></div>
+ </div>
+ </div>
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (167715 => 167716)
--- trunk/Source/WebCore/ChangeLog 2014-04-23 18:36:26 UTC (rev 167715)
+++ trunk/Source/WebCore/ChangeLog 2014-04-23 18:39:57 UTC (rev 167716)
@@ -1,3 +1,19 @@
+2014-04-23 Morten Stenshorne <[email protected]>
+
+ REGRESSION (Safari 6 - ToT): Incorrectly assumes that RenderStyle data can be shared
+ https://bugs.webkit.org/show_bug.cgi?id=113058
+
+ Reviewed by David Hyatt.
+
+ Before sharing CSS properties with an element in the cache, we need to
+ check that the new element is suitable for this, just like we check
+ elements before inserting them into the cache.
+
+ Test: fast/css/identical-logical-height-decl.html
+
+ * css/StyleResolver.cpp:
+ (WebCore::StyleResolver::applyMatchedProperties):
+
2014-04-23 Commit Queue <[email protected]>
Unreviewed, rolling out r167713.
Modified: trunk/Source/WebCore/css/StyleResolver.cpp (167715 => 167716)
--- trunk/Source/WebCore/css/StyleResolver.cpp 2014-04-23 18:36:26 UTC (rev 167715)
+++ trunk/Source/WebCore/css/StyleResolver.cpp 2014-04-23 18:39:57 UTC (rev 167716)
@@ -1637,7 +1637,8 @@
unsigned cacheHash = shouldUseMatchedPropertiesCache && matchResult.isCacheable ? computeMatchedPropertiesHash(matchResult.matchedProperties.data(), matchResult.matchedProperties.size()) : 0;
bool applyInheritedOnly = false;
const MatchedPropertiesCacheItem* cacheItem = 0;
- if (cacheHash && (cacheItem = findFromMatchedPropertiesCache(cacheHash, matchResult))) {
+ if (cacheHash && (cacheItem = findFromMatchedPropertiesCache(cacheHash, matchResult))
+ && isCacheableInMatchedPropertiesCache(element, state.style(), state.parentStyle())) {
// We can build up the style by copying non-inherited properties from an earlier style object built using the same exact
// style declarations. We then only need to apply the inherited properties, if any, as their values can depend on the
// element context. This is fast and saves memory by reusing the style data structures.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes