Changeset 120132 in webkit
- Timestamp:
- Jun 12, 2012 3:39:01 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r120131 r120132 1 2012-06-12 Tony Chang <tony@chromium.org> 2 3 Replaced items in a flexbox should be coerced to display:block 4 https://bugs.webkit.org/show_bug.cgi?id=87068 5 6 Reviewed by Ojan Vafai. 7 8 * css3/flexbox/flexitem-expected.txt: Added. 9 * css3/flexbox/flexitem.html: Added. 10 * css3/flexbox/resources/flexbox.js: 11 (checkExpectedValues): 12 1 13 2012-06-12 Joshua Bell <jsbell@chromium.org> 2 14 -
trunk/LayoutTests/css3/flexbox/resources/flexbox.js
r97783 r120132 66 66 failures.push("Expected " + expectedOffset + " for clientTop+offsetTop, but got " + totalTop + ", clientTop: " + node.clientTop + ", + offsetTop: " + node.offsetTop + ". "); 67 67 } 68 69 var expectedDisplay = node.getAttribute && node.getAttribute("data-expected-display"); 70 if (expectedDisplay) { 71 var actualDisplay = getComputedStyle(node).display; 72 if (actualDisplay != expectedDisplay) 73 failures.push("Expected " + expectedDisplay + " for display, but got " + actualDisplay + ". "); 74 } 68 75 } 69 76 -
trunk/Source/WebCore/ChangeLog
r120131 r120132 1 2012-06-12 Tony Chang <tony@chromium.org> 2 3 Replaced items in a flexbox should be coerced to display:block 4 https://bugs.webkit.org/show_bug.cgi?id=87068 5 6 Reviewed by Ojan Vafai. 7 8 The flexbox spec lists HTML tags that should automatically be converted 9 to display:block when a flex child. It also says that atomic inline-level 10 children should become block (e.g., inline-table should be treated as table). 11 http://dev.w3.org/csswg/css3-flexbox/#flex-items 12 13 Test: css3/flexbox/flexitem.html 14 15 * css/StyleResolver.cpp: 16 (WebCore::StyleResolver::collectMatchingRulesForList): 17 1 18 2012-06-12 Joshua Bell <jsbell@chromium.org> 2 19 -
trunk/Source/WebCore/css/StyleResolver.cpp
r120080 r120132 74 74 #include "LinkHash.h" 75 75 #include "LocaleToScriptMapping.h" 76 #include "MathMLNames.h" 76 77 #include "Matrix3DTransformOperation.h" 77 78 #include "MatrixTransformOperation.h" … … 1920 1921 } 1921 1922 1923 static bool shouldBecomeBlockWhenParentIsFlexbox(const Element* element) 1924 { 1925 return element->hasTagName(imgTag) 1926 || element->hasTagName(canvasTag) 1927 #if ENABLE(SVG) 1928 || element->hasTagName(SVGNames::svgTag) 1929 #endif 1930 #if ENABLE(MATHML) 1931 || element->hasTagName(MathMLNames::mathTag) 1932 #endif 1933 #if ENABLE(VIDEO) 1934 || element->hasTagName(audioTag) 1935 || element->hasTagName(videoTag) 1936 #endif 1937 || element->hasTagName(iframeTag) 1938 || element->hasTagName(objectTag) 1939 || element->hasTagName(embedTag) 1940 || element->hasTagName(appletTag) 1941 #if ENABLE(PROGRESS_TAG) 1942 || element->hasTagName(progressTag) 1943 #endif 1944 #if ENABLE(METER_TAG) 1945 || element->hasTagName(meterTag) 1946 #endif 1947 || element->hasTagName(inputTag) 1948 || element->hasTagName(buttonTag) 1949 || element->hasTagName(selectTag) 1950 || element->hasTagName(textareaTag); 1951 } 1952 1922 1953 static EDisplay equivalentBlockDisplay(EDisplay display, bool isFloating, bool strictParsing) 1923 1954 { … … 2062 2093 if (style->writingMode() != TopToBottomWritingMode && (style->display() == BOX || style->display() == INLINE_BOX)) 2063 2094 style->setWritingMode(TopToBottomWritingMode); 2095 2096 if (e && e->parentNode() && e->parentNode()->renderer() && e->parentNode()->renderer()->isFlexibleBox()) { 2097 if (shouldBecomeBlockWhenParentIsFlexbox(e)) 2098 style->setDisplay(BLOCK); 2099 else if (style->display() != INLINE) 2100 style->setDisplay(equivalentBlockDisplay(style->display(), style->isFloating(), m_checker.strictParsing())); 2101 } 2064 2102 } 2065 2103
Note: See TracChangeset
for help on using the changeset viewer.