1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 22:57:35 +00:00
serenity/Libraries/LibWeb
Matthew Olsson dd08c992e8 LibJS: Simplify and normalize publicly-exposed Object functions
Previously, the Object class had many different types of functions for
each action. For example: get_by_index, get(PropertyName),
get(FlyString). This is a bit verbose, so these methods have been
shortened to simply use the PropertyName structure. The methods then
internally call _by_index if necessary. Note that the _by_index
have been made private to enforce this change.

Secondly, a clear distinction has been made between "putting" and
"defining" an object property. "Putting" should mean modifying a
(potentially) already existing property. This is akin to doing "a.b =
'foo'".

This implies two things about put operations:
    - They will search the prototype chain for setters and call them, if
      necessary.
    - If no property exists with a particular key, the put operation
      should create a new property with the default attributes
      (configurable, writable, and enumerable).

In contrast, "defining" a property should completely overwrite any
existing value without calling setters (if that property is
configurable, of course).

Thus, all of the many JS objects have had any "put" calls changed to
"define_property" calls. Additionally, "put_native_function" and
"put_native_property" have had their "put" replaced with "define".

Finally, "put_own_property" has been made private, as all necessary
functionality should be exposed with the put and define_property
methods.
2020-05-27 13:17:35 +02:00
..
Bindings LibJS: Simplify and normalize publicly-exposed Object functions 2020-05-27 13:17:35 +02:00
CodeGenerators Build: Switch to CMake :^) 2020-05-14 20:15:18 +02:00
CSS LibWeb: Add cached global attribute name FlyStrings 2020-05-26 23:45:43 +02:00
DOM LibWeb: s_initialized should be static in the AttributeNames initialiser 2020-05-27 09:57:38 +02:00
Layout LibWeb: Basic support for display:inline-block with width:auto 2020-05-26 22:02:27 +02:00
Parser LibWeb: Handle additional parser inputs in "initial" and "before html". 2020-05-27 11:10:54 +02:00
Scripts LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
CMakeLists.txt LibWeb: Add cached global attribute name FlyStrings 2020-05-26 23:45:43 +02:00
DOMTreeModel.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
DOMTreeModel.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
Dump.cpp LibWeb: Colorize tag names in layout tree dumps + show element IDs 2020-05-23 21:08:25 +02:00
Dump.h LibWeb: Add naive support for document.querySelectorAll() 2020-03-30 11:35:39 +02:00
FontCache.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
FontCache.h LibWeb: Use FlyString in FontCache keys 2020-05-26 23:45:48 +02:00
Forward.h LibWeb: Add HTMLScriptElement to the forwarding header 2020-05-24 23:54:22 +02:00
Frame.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
Frame.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
HtmlView.cpp LibGUI: Change GUI::KeyEvent::key() type to KeyCode 2020-05-27 11:19:38 +02:00
HtmlView.h LibWeb: Add hook to HtmlView when a new document is set 2020-05-24 02:20:08 +02:00
Origin.h LibWeb: Add Origin concept (protocol, host, port tuple) 2020-04-07 23:01:45 +02:00
RenderingContext.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
ResourceLoader.cpp LibWeb: Provide some properties to inspectors of ResourceLoader 2020-05-27 11:13:02 +02:00
ResourceLoader.h LibWeb: Provide some properties to inspectors of ResourceLoader 2020-05-27 11:13:02 +02:00
StylePropertiesModel.cpp LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
StylePropertiesModel.h LibWeb: Rename directory LibHTML => LibWeb 2020-03-07 10:32:51 +01:00
TreeNode.h LibWeb: Add a way to opt out of TreeNode::append_child() notifications 2020-05-24 23:54:22 +02:00
URLEncoder.cpp LibWeb: Make the URL encoding function a little less copy-happy 2020-05-05 15:50:28 +02:00
URLEncoder.h LibWeb: Make the URL encoding function a little less copy-happy 2020-05-05 15:50:28 +02:00