Changeset 275293 in webkit
- Timestamp:
- Mar 31, 2021 10:49:07 AM (16 months ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
inspector/InspectorOverlay.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r275288 r275293 1 2021-03-31 Patrick Angle <pangle@apple.com> 2 3 Web Inspector: CSS Grid overlay track sizes are incorrect when inline styles are applied to the element 4 https://bugs.webkit.org/show_bug.cgi?id=223908 5 6 Reviewed by BJ Burg. 7 8 Add checking the inline style attributes on an element when collecting authored track sizes for grid overlays. 9 10 * inspector/InspectorOverlay.cpp: 11 (WebCore::authoredGridTrackSizes): 12 1 13 2021-03-31 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/Source/WebCore/inspector/InspectorOverlay.cpp
r275128 r275293 36 36 #include "CSSGridIntegerRepeatValue.h" 37 37 #include "CSSGridLineNamesValue.h" 38 #include "CSSStyleDeclaration.h" 38 39 #include "DOMCSSNamespace.h" 39 40 #include "DOMTokenList.h" … … 1495 1496 static Vector<String> authoredGridTrackSizes(Node* node, GridTrackSizingDirection direction, unsigned expectedTrackCount) 1496 1497 { 1497 if (!is< Element>(node))1498 if (!is<StyledElement>(node)) 1498 1499 return { }; 1499 1500 auto element = downcast<Element>(node); 1501 auto styleRules = element->styleResolver().styleRulesForElement(element); 1502 styleRules.reverse(); 1503 RefPtr<CSSValue> cssValue; 1504 for (auto styleRule : styleRules) { 1505 ASSERT(styleRule); 1506 if (!styleRule) 1507 continue; 1508 cssValue = styleRule->properties().getPropertyCSSValue(direction == GridTrackSizingDirection::ForColumns ? CSSPropertyID::CSSPropertyGridTemplateColumns : CSSPropertyID::CSSPropertyGridTemplateRows); 1509 if (cssValue) 1510 break; 1500 1501 auto element = downcast<StyledElement>(node); 1502 auto directionCSSPropertyID = direction == GridTrackSizingDirection::ForColumns ? CSSPropertyID::CSSPropertyGridTemplateColumns : CSSPropertyID::CSSPropertyGridTemplateRows; 1503 RefPtr<CSSValue> cssValue = element->cssomStyle().getPropertyCSSValueInternal(directionCSSPropertyID); 1504 1505 if (!cssValue) { 1506 auto styleRules = element->styleResolver().styleRulesForElement(element); 1507 styleRules.reverse(); 1508 for (auto styleRule : styleRules) { 1509 ASSERT(styleRule); 1510 if (!styleRule) 1511 continue; 1512 cssValue = styleRule->properties().getPropertyCSSValue(directionCSSPropertyID); 1513 if (cssValue) 1514 break; 1515 } 1511 1516 } 1512 1517
Note: See TracChangeset
for help on using the changeset viewer.