RESOLVED FIXED 238375
Add support for element.computedStyleMap()
https://bugs.webkit.org/show_bug.cgi?id=238375
Summary Add support for element.computedStyleMap()
Attachments
Patch (114.98 KB, patch)
2022-03-25 08:24 PDT, Carlos Garcia Campos
ews-feeder: commit-queue-
Patch (114.97 KB, patch)
2022-03-25 09:05 PDT, Carlos Garcia Campos
ews-feeder: commit-queue-
Patch (119.68 KB, patch)
2022-03-29 05:32 PDT, Carlos Garcia Campos
ews-feeder: commit-queue-
Patch (120.44 KB, patch)
2022-03-30 01:04 PDT, Carlos Garcia Campos
ews-feeder: commit-queue-
Patch (119.70 KB, patch)
2022-03-30 04:18 PDT, Carlos Garcia Campos
ews-feeder: commit-queue-
Patch (154.24 KB, patch)
2022-03-31 00:55 PDT, Carlos Garcia Campos
no flags
Carlos Garcia Campos
Comment 1 2022-03-25 08:24:27 PDT
Created attachment 455763 [details] Patch The xcode changes are missing, since I don't have access to a mac right now.
Adrian Perez
Comment 2 2022-03-25 08:55:38 PDT
Comment on attachment 455763 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455763&action=review This looks fine to me, save for a couple of small comments; but I would rather have someone more familiar with the CSS/WebIDL machinery to give the final r+ :) View in context: https://bugs.webkit.org/attachment.cgi?id=455763&action=review > Source/WebCore/dom/ElementRareData.h:151 > + if (m_m_computedStyleMap) Typo, double “m_” prefix: m_m_computedStyleMap → m_computedStyleMap > Source/WebCore/dom/StyledElement.cpp:102 > + // FIXME: implement. Wouldn't it be better to call the notImplemented() helper function here instead of using a comment? > Source/WebCore/dom/ElementRareData.h:151 > + if (m_m_computedStyleMap) Typo, double “m_” prefix: m_m_computedStyleMap → m_computedStyleMap > Source/WebCore/dom/StyledElement.cpp:102 > + // FIXME: implement. Wouldn't it be better to call the notImplemented() helper function here instead of using a comment?
Carlos Garcia Campos
Comment 3 2022-03-25 09:05:14 PDT
Carlos Garcia Campos
Comment 4 2022-03-26 06:59:10 PDT
Could someone help me with the xcode changes, please?
Carlos Garcia Campos
Comment 5 2022-03-29 05:32:29 PDT
Carlos Garcia Campos
Comment 6 2022-03-29 07:03:31 PDT
download-built-product step failed in gtk-wk2, so I guess it used a previously downloaded build and tests were run with the wrong built product.
Carlos Garcia Campos
Comment 7 2022-03-30 00:50:38 PDT
hmm, I see typed om is only enabled by default in WebKit for GTK and WPE ports, I don't know why. I guess we should enable it in WTR globally instead of adding a header in wpt tests.
Carlos Garcia Campos
Comment 8 2022-03-30 01:04:29 PDT
Carlos Garcia Campos
Comment 9 2022-03-30 04:16:41 PDT
Ah!, I see alex changed typed om api to be EnabledBySetting instead of EnabledAtRuntime in r291867. I'll update the patch again.
Carlos Garcia Campos
Comment 10 2022-03-30 04:18:11 PDT
Carlos Garcia Campos
Comment 11 2022-03-31 00:55:25 PDT
Alex Christensen
Comment 12 2022-03-31 17:08:50 PDT
Comment on attachment 456208 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=456208&action=review > Source/WebCore/css/CSSComputedStyleDeclaration.h:60 > + enum class PropertyValueType { Resolved, Computed }; nit : bool > Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.cpp:67 > +ExceptionOr<Vector<RefPtr<CSSStyleValue>>> ComputedStylePropertyMapReadOnly::getAll(const String& property) const This is mostly duplicate code. Could you factor the shared logic into a helper function? > Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.cpp:102 > +Vector<StylePropertyMapReadOnly::StylePropertyMapEntry> ComputedStylePropertyMapReadOnly::entries() const Could you add a few spec links in this file? There is some interesting logic.
Carlos Garcia Campos
Comment 13 2022-04-01 00:47:24 PDT
Comment on attachment 456208 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=456208&action=review >> Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.cpp:67 >> +ExceptionOr<Vector<RefPtr<CSSStyleValue>>> ComputedStylePropertyMapReadOnly::getAll(const String& property) const > > This is mostly duplicate code. Could you factor the shared logic into a helper function? I'm not sure how to move the common logic, because in the end they return a different value, I'm not sure it's worth using templates for this. I'll leave it as is for now, if you know a better way I'll submit a follow up patch.
Carlos Garcia Campos
Comment 14 2022-04-01 00:47:57 PDT
iOS failures are unrelated, I've seen the same tests failing in other bugs.
Carlos Garcia Campos
Comment 15 2022-04-01 01:30:07 PDT
Radar WebKit Bug Importer
Comment 16 2022-04-01 01:31:18 PDT
Note You need to log in before you can comment on or make changes to this bug.