Skip to content

Commit

Permalink
Revert "Versioning."
Browse files Browse the repository at this point in the history
This reverts commit dbebfcd.
  • Loading branch information
drobson1005 committed Feb 14, 2024
1 parent dbebfcd commit b8dfb3a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Configurations/Version.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ MAJOR_VERSION = 618;
MINOR_VERSION = 1;
TINY_VERSION = 15;
MICRO_VERSION = 11;
NANO_VERSION = 5;
NANO_VERSION = 4;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION).$(NANO_VERSION);

// The bundle version and short version string are set based on the current build configuration, see below.
Expand Down
24 changes: 8 additions & 16 deletions Source/WebCore/html/HTMLSelectElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ bool HTMLSelectElement::platformHandleKeydownEvent(KeyboardEvent* event)
// Calling focus() may cause us to lose our renderer. Return true so
// that our caller doesn't process the event further, but don't set
// the event as handled.
WeakPtr renderer = dynamicDowncast<RenderMenuList>(this->renderer());
CheckedPtr renderer = dynamicDowncast<RenderMenuList>(this->renderer());
if (!renderer)
return true;

Expand All @@ -1154,7 +1154,7 @@ bool HTMLSelectElement::platformHandleKeydownEvent(KeyboardEvent* event)
// gets called from RenderMenuList::valueChanged, which gets called
// after the user makes a selection from the menu.
saveLastSelection();
renderer->showPopup(); // showPopup() may run JS and cause the renderer to get destroyed.
renderer->showPopup();
event->setDefaultHandled();
}
return true;
Expand Down Expand Up @@ -1244,7 +1244,7 @@ void HTMLSelectElement::menuListDefaultEventHandler(Event& event)
document().updateStyleIfNeeded();

// Calling focus() may remove the renderer or change the renderer type.
WeakPtr renderer = dynamicDowncast<RenderMenuList>(this->renderer());
CheckedPtr renderer = dynamicDowncast<RenderMenuList>(this->renderer());
if (!renderer)
return;

Expand All @@ -1253,7 +1253,7 @@ void HTMLSelectElement::menuListDefaultEventHandler(Event& event)
// gets called from RenderMenuList::valueChanged, which gets called
// after the user makes a selection from the menu.
saveLastSelection();
renderer->showPopup(); // showPopup() may run JS and cause the renderer to get destroyed.
renderer->showPopup();
handled = true;
}
} else if (RenderTheme::singleton().popsMenuByArrowKeys()) {
Expand All @@ -1262,7 +1262,7 @@ void HTMLSelectElement::menuListDefaultEventHandler(Event& event)
document().updateStyleIfNeeded();

// Calling focus() may remove the renderer or change the renderer type.
WeakPtr renderer = dynamicDowncast<RenderMenuList>(this->renderer());
CheckedPtr renderer = dynamicDowncast<RenderMenuList>(this->renderer());
if (!renderer)
return;

Expand All @@ -1271,7 +1271,7 @@ void HTMLSelectElement::menuListDefaultEventHandler(Event& event)
// gets called from RenderMenuList::valueChanged, which gets called
// after the user makes a selection from the menu.
saveLastSelection();
renderer->showPopup(); // showPopup() may run JS and cause the renderer to get destroyed.
renderer->showPopup();
handled = true;
} else if (keyCode == '\r') {
if (RefPtr form = this->form())
Expand All @@ -1290,15 +1290,15 @@ void HTMLSelectElement::menuListDefaultEventHandler(Event& event)
#if !PLATFORM(IOS_FAMILY)
document().updateStyleIfNeeded();

if (WeakPtr menuList = dynamicDowncast<RenderMenuList>(renderer())) {
if (CheckedPtr menuList = dynamicDowncast<RenderMenuList>(renderer())) {
ASSERT(!menuList->popupIsVisible());
// Save the selection so it can be compared to the new
// selection when we call onChange during selectOption,
// which gets called from RenderMenuList::valueChanged,
// which gets called after the user makes a selection from
// the menu.
saveLastSelection();
menuList->showPopup(); // showPopup() may run JS and cause the renderer to get destroyed.
menuList->showPopup();
}
#endif
event.setDefaultHandled();
Expand Down Expand Up @@ -1687,17 +1687,9 @@ ExceptionOr<void> HTMLSelectElement::showPicker()
return Exception { ExceptionCode::NotAllowedError, "Select showPicker() requires a user gesture."_s };

#if !PLATFORM(IOS_FAMILY)
<<<<<<< HEAD
auto* renderer = this->renderer();
if (auto* renderMenuList = dynamicDowncast<RenderMenuList>(renderer))
renderMenuList->showPopup();
||||||| parent of 35318b4d5407 (Crash under ~RenderMenuList due to CheckedPtr usage)
if (CheckedPtr renderMenuList = dynamicDowncast<RenderMenuList>(renderer()))
renderMenuList->showPopup();
=======
if (WeakPtr renderMenuList = dynamicDowncast<RenderMenuList>(renderer()))
renderMenuList->showPopup(); // showPopup() may run JS and cause the renderer to get destroyed.
>>>>>>> 35318b4d5407 (Crash under ~RenderMenuList due to CheckedPtr usage)
#endif

return { };
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/rendering/RenderMenuList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ void RenderMenuList::showPopup()
FloatPoint absTopLeft = localToAbsolute(FloatPoint(), UseTransforms);
IntRect absBounds = absoluteBoundingBoxRectIgnoringTransforms();
absBounds.setLocation(roundedIntPoint(absTopLeft));
m_popup->show(absBounds, &view().frameView(), selectElement().optionToListIndex(selectElement().selectedIndex())); // May destroy `this`.
m_popup->show(absBounds, &view().frameView(), selectElement().optionToListIndex(selectElement().selectedIndex()));
}
#endif

Expand Down

0 comments on commit b8dfb3a

Please sign in to comment.