--Thanks for the question. :)Would it have memory implications (use much more memory because all of the properties and their aliases will always be there)?I don't think that memory would be a huge problem. However, if it would be a problem, bindings team is happy to help.Unless you actually instantiate a CSSStyleDeclaration, Blink-V8 bindings doesn't create an interface object nor prototype object nor any attributes. Unless you actually use an attribute, V8 does not instantiate an accessor function. There are several mechanisms that are lazy. So, "all of the properties ... will always be there" is not true.Also, those JS properties of IDL attributes are created per v8::Context (per window). Even if you created 1,000 instances of CSSStyleDeclaration on your page, we don't create 1,000 times properties. 1,000 instances share one set of properties of CSSStyleDeclaration.2019年12月17日(火) 17:50 PhistucK <phis...@gmail.com>:Would it have memory implications (use much more memory because all of the properties and their aliases will always be there)?☆PhistucKOn Tue, Dec 17, 2019 at 8:38 AM Yuki Shiino <yukis...@chromium.org> wrote:Hi layout-dev@,--Is there any chance for layout-dev@ to work on https://crbug.com/700338 ?Roughly speaking, the issue is that CSSStyleDeclaration's IDL attributes are not implemented as IDL attributes. They're implemented as "named properties". It'd be a sort of abuse of "named properties".I heard that the origin trial team is now working to support CSSStyleDeclaration [1][2] just because of the issue above, despite that we already have good support of origin trial for valid IDL attributes. It seems to me that the current implementation of CSSStyleDeclaration is unnecessarily introducing complexity and spec violations.It seems to me that we'd better fix the issue https://crbug.com/700338 before it's getting worse and worse.[1] Design doc[2] 4 patches starting the below one, and maybe more patches.--Yuki Shiino
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architect...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAN0uC_QSVyWcmdA%2Bid%3DB6EfNkkiqg3RwmwdZnLt1%3Dp6maO833g%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architect...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAN0uC_T__3WxSnP5C223DNA8BOFQY7tYW-eKQG2m_np7ethe3Q%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "style-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to style-dev+...@chromium.org.
To view this discussion on the web, visit https://groups.google.com/a/chromium.org/d/msgid/style-dev/CAJL3UpS%2BMQku92Ty7pJF2irA1Vvmtf8anw3H-vUp5dntngNmFQ%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/a/chromium.org/d/msgid/style-dev/CAKFBnUo7gDzpFZRs6q8usp_3PbSexBPjWR3fXUL-raiPYO_u%3DQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAN0uC_QxuoDbWi2AptN5bpNLWO3OOwndQTwtr5afUE4m34CH6A%40mail.gmail.com.
Thanks for the news. It's really good to know and insightful.I agree with your idea. I think we'd like to have an optimization hack similar to 'onxxx' event handlers, which would bloat the binary size if no hack. [CallWith=PropertyName] should be necessary.
void Callback(const v8::FunctionCallbackInfo<v8::Value>& info) {const char* property_name = "property_name";DoEverythingElseForCSSStyleDeclaration(info, property_name);}
What in my head now is:void Callback(const v8::FunctionCallbackInfo<v8::Value>& info) {const char* property_name = "property_name";DoEverythingElseForCSSStyleDeclaration(info, property_name);}Cheers,Yuki Shiino