Title: [225505] trunk/Source/WebKit
- Revision
- 225505
- Author
- wenson_hs...@apple.com
- Date
- 2017-12-04 16:13:09 -0800 (Mon, 04 Dec 2017)
Log Message
Rename a static helper in TouchBarMenuItemData.cpp to match style guidelines.
https://bugs.webkit.org/show_bug.cgi?id=180305
Reviewed by Andy Estes.
Style guidelines state that we should use bare words for getters, so getItemType should just be
itemType. Since this collides with the itemType member variable, this patch also renames that
member variable to the more concise "type".
No change in behavior.
* Shared/TouchBarMenuItemData.cpp:
(WebKit::itemType):
(WebKit::TouchBarMenuItemData::TouchBarMenuItemData):
(WebKit::TouchBarMenuItemData::encode const):
(WebKit::TouchBarMenuItemData::decode):
(WebKit::getItemType): Deleted.
* Shared/TouchBarMenuItemData.h:
(WebKit::operator==):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (225504 => 225505)
--- trunk/Source/WebKit/ChangeLog 2017-12-05 00:11:05 UTC (rev 225504)
+++ trunk/Source/WebKit/ChangeLog 2017-12-05 00:13:09 UTC (rev 225505)
@@ -1,3 +1,25 @@
+2017-12-04 Wenson Hsieh <wenson_hs...@apple.com>
+
+ Rename a static helper in TouchBarMenuItemData.cpp to match style guidelines.
+ https://bugs.webkit.org/show_bug.cgi?id=180305
+
+ Reviewed by Andy Estes.
+
+ Style guidelines state that we should use bare words for getters, so getItemType should just be
+ itemType. Since this collides with the itemType member variable, this patch also renames that
+ member variable to the more concise "type".
+
+ No change in behavior.
+
+ * Shared/TouchBarMenuItemData.cpp:
+ (WebKit::itemType):
+ (WebKit::TouchBarMenuItemData::TouchBarMenuItemData):
+ (WebKit::TouchBarMenuItemData::encode const):
+ (WebKit::TouchBarMenuItemData::decode):
+ (WebKit::getItemType): Deleted.
+ * Shared/TouchBarMenuItemData.h:
+ (WebKit::operator==):
+
2017-12-04 Brian Burg <bb...@apple.com>
Web Automation: add flag to preserve legacy page screenshot behavior
Modified: trunk/Source/WebKit/Shared/TouchBarMenuItemData.cpp (225504 => 225505)
--- trunk/Source/WebKit/Shared/TouchBarMenuItemData.cpp 2017-12-05 00:11:05 UTC (rev 225504)
+++ trunk/Source/WebKit/Shared/TouchBarMenuItemData.cpp 2017-12-05 00:13:09 UTC (rev 225505)
@@ -33,7 +33,7 @@
namespace WebKit {
-static ItemType getItemType(const String&)
+static ItemType itemType(const String&)
{
return ItemType::Button;
}
@@ -40,7 +40,7 @@
TouchBarMenuItemData::TouchBarMenuItemData(const WebCore::HTMLMenuItemElement& element)
{
- itemType = getItemType(element.attributeWithoutSynchronization(WebCore::HTMLNames::typeAttr));
+ type = itemType(element.attributeWithoutSynchronization(WebCore::HTMLNames::typeAttr));
identifier = element.attributeWithoutSynchronization(WebCore::HTMLNames::idAttr);
priority = element.attributeWithoutSynchronization(WebCore::HTMLNames::valueAttr).toFloat();
}
@@ -47,7 +47,7 @@
void TouchBarMenuItemData::encode(IPC::Encoder& encoder) const
{
- encoder.encodeEnum(itemType);
+ encoder.encodeEnum(type);
encoder << identifier;
encoder << priority;
@@ -56,7 +56,7 @@
std::optional<TouchBarMenuItemData> TouchBarMenuItemData::decode(IPC::Decoder& decoder)
{
TouchBarMenuItemData result;
- if (!decoder.decodeEnum(result.itemType))
+ if (!decoder.decodeEnum(result.type))
return std::nullopt;
if (!decoder.decode(result.identifier))
Modified: trunk/Source/WebKit/Shared/TouchBarMenuItemData.h (225504 => 225505)
--- trunk/Source/WebKit/Shared/TouchBarMenuItemData.h 2017-12-05 00:11:05 UTC (rev 225504)
+++ trunk/Source/WebKit/Shared/TouchBarMenuItemData.h 2017-12-05 00:13:09 UTC (rev 225505)
@@ -51,7 +51,7 @@
void encode(IPC::Encoder&) const;
static std::optional<TouchBarMenuItemData> decode(IPC::Decoder&);
- ItemType itemType { ItemType::Button };
+ ItemType type { ItemType::Button };
String identifier;
float priority { 0.0 };
bool validTouchBarDisplay { true };
@@ -80,9 +80,9 @@
inline bool operator==(const TouchBarMenuItemData& lhs, const TouchBarMenuItemData& rhs)
{
- return lhs.itemType == rhs.itemType
- && lhs.identifier == rhs.identifier
- && lhs.priority == rhs.priority;
+ return lhs.type == rhs.type
+ && lhs.identifier == rhs.identifier
+ && lhs.priority == rhs.priority;
}
inline bool operator!=(const TouchBarMenuItemData& lhs, const TouchBarMenuItemData& rhs)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes