Changeset 250914 in webkit
- Timestamp:
- Oct 9, 2019 9:45:00 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r250913 r250914 1 2019-10-09 Antti Koivisto <antti@apple.com> 2 3 [CSS Shadow Parts] Minor exportparts attribute parsing cleanups 4 https://bugs.webkit.org/show_bug.cgi?id=202740 5 6 Reviewed by Zalan Bujtas. 7 8 * dom/ShadowRoot.cpp: 9 (WebCore::parsePartMapping): 10 (WebCore::parsePartMappingsList): 11 12 Return the map as the return value. 13 14 (WebCore::ShadowRoot::partMappings const): 15 1 16 2019-10-09 Andy Estes <aestes@apple.com> 2 17 -
trunk/Source/WebCore/dom/ShadowRoot.cpp
r250902 r250914 259 259 const auto end = mappingString.length(); 260 260 261 auto skipWhitespace = [&] 261 auto skipWhitespace = [&](auto position) { 262 262 while (position < end && isHTMLSpace(mappingString[position])) 263 263 ++position; … … 265 265 }; 266 266 267 auto collectValue = [&] 267 auto collectValue = [&](auto position) { 268 268 while (position < end && (!isHTMLSpace(mappingString[position]) && mappingString[position] != ':')) 269 269 ++position; … … 302 302 } 303 303 304 static void parsePartMappingsList(ShadowRoot::PartMappings& mappings, StringView mappingsListString) 305 { 304 static ShadowRoot::PartMappings parsePartMappingsList(StringView mappingsListString) 305 { 306 if (!RuntimeEnabledFeatures::sharedFeatures().cssShadowPartsEnabled()) 307 return { }; 308 309 ShadowRoot::PartMappings mappings; 310 306 311 const auto end = mappingsListString.length(); 307 312 … … 321 326 begin = mappingEnd + 1; 322 327 } 328 329 return mappings; 323 330 } 324 331 … … 326 333 { 327 334 if (!m_partMappings) { 328 m_partMappings = PartMappings();329 330 335 auto exportpartsValue = host()->attributeWithoutSynchronization(HTMLNames::exportpartsAttr); 331 if (!exportpartsValue.isEmpty() && RuntimeEnabledFeatures::sharedFeatures().cssShadowPartsEnabled()) 332 parsePartMappingsList(*m_partMappings, exportpartsValue); 336 m_partMappings = parsePartMappingsList(exportpartsValue); 333 337 } 334 338
Note: See TracChangeset
for help on using the changeset viewer.